:root {
  --bg-color: #F5F5F5;
  --text-color: #000000;
  --primary: #4285F4;
  --primary-text: #FFFFFF;
  --card-bg: #FFFFFF;
  --border: #E6E6E6;
  --hint: #6B7280;
  --danger: #B00020;
}

* { box-sizing: border-box; }

/* CSS for [hidden] attribute */
[hidden] {
  display: none !important;
}
html, body { height: 100%; }
body {
  margin: 0;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", Arial, "Noto Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg-color);
  color: var(--text-color);
}

.app { min-height: 100vh; display: flex; flex-direction: column; }
.app-header { padding: 16px; text-align: center; }
.brand { font-weight: 700; font-size: 20px; }

.card {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.06);
}

.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.tab {
  appearance: none; border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px;
  background: #fafafa; cursor: pointer; font-weight: 500;
}
.tab.active { background: var(--primary); color: var(--primary-text); border-color: var(--primary); }

.panel { display: none; }
.panel.active { display: block; }

.form { display: grid; gap: 12px; }
.form-group { display: grid; gap: 6px; }
label { font-size: 14px; font-weight: 500; }
input[type="email"], input[type="password"], input[type="text"], input[type="tel"] {
  width: 100%; padding: 14px 16px; border: 1px solid var(--border); border-radius: 12px;
  font-size: 16px; background: #fff; outline: none; line-height: 1.5;
}
input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(66,133,244,0.15); }
.hint { font-size: 12px; color: var(--hint); }

.btn { width: 100%; padding: 14px 16px; border-radius: 12px; border: none; cursor: pointer; font-size: 16px; font-weight: 600; }
.btn-primary { background: var(--primary); color: var(--primary-text); }
.btn-primary:disabled { opacity: 0.7; cursor: not-allowed; }
.btn-secondary { background: #f0f0f0; color: #333; width: auto; font-size: 14px; font-weight: 500; }
.btn-secondary:hover { background: #e0e0e0; }
.btn-secondary:disabled { background: #f5f5f5; color: #999; cursor: not-allowed; }

/* 登录方式切换按钮 */
.login-method-switch {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem;
}

.method-btn {
  background: none;
  border: none;
  color: var(--hint);
  font-size: 0.9rem;
  cursor: pointer;
  padding: 0.5rem 0;
  position: relative;
}

.method-btn.active {
  color: var(--primary);
  font-weight: 500;
}

.method-btn.active::after {
  content: '';
  position: absolute;
  bottom: -0.5rem; /* 与父容器 padding-bottom 配合 */
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--primary);
}

/* 按钮禁用样式 */
.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.switch-tip { margin-top: 8px; font-size: 14px; text-align: center; }
.switch-tip a { color: var(--primary); text-decoration: none; font-weight: 600; }

.message { margin-top: 14px; padding: 12px; border-radius: 12px; background: #f7fafc; border: 1px solid var(--border); min-height: 20px; }
.message.error { background: #fff5f5; border-color: #fca5a5; color: var(--danger); }
.message.success { background: #f0fdf4; border-color: #86efac; color: #065f46; }

.app-footer { padding: 16px; text-align: center; color: var(--hint); }

@media (max-width: 480px) {
  .card { border-radius: 0; border-left: none; border-right: none; box-shadow: none; }
  .app-header { padding: 12px; }
}

/* 对话页模板样式追加 */

/* 顶部导航栏 */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 56px;
  background: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  z-index: 10;
}
.topbar .nav-left,
.topbar .nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
}
.topbar .nav-center {
  font-weight: 600;
  color: #000000;
  font-size: 16px;
}
.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #E0E0E0;
  background: #FFFFFF;
  cursor: pointer;
}
.icon-btn svg {
  width: 20px;
  height: 20px;
  fill: #000000;
}
.avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #4285F4;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
}

/* 页面容器 */
.dialog-page {
  background: #F5F5F5;
  color: #000000;
  min-height: 100vh;
}
.dialog-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* 助手消息区 */
.assistant-area {
  flex: 1;
  margin-top: 56px; /* 顶部栏高度 */
  margin-bottom: 92px; /* 底部输入栏预留 */
  overflow-y: auto;
  padding: 16px;
}
.assistant-card {
  background: #FFFFFF;
  border-radius: 12px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  padding: 16px;
}
.assistant-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
}
.assistant-content {
  white-space: pre-line;
  font-size: 14px;
  line-height: 1.6;
  color: #000000;
}
.assistant-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.assistant-option-btn {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid #E0E0E0;
  background: #FFFFFF;
  color: #000000;
  font-size: 13px;
  cursor: pointer;
}
.assistant-option-btn.primary {
  border-color: #4285F4;
  background: #EAF2FF;
  color: #1A73E8;
}

/* 用户气泡（显示最近一次用户输入） */
.user-bubble {
  position: fixed;
  bottom: 120px;
  left: 50%;
  transform: translateX(-50%);
  display: none;
  z-index: 1000;
}
.user-bubble .bubble {
  min-width: 120px;
  max-width: 70vw;
  padding: 10px 14px;
  border-radius: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  font-size: 14px;
  line-height: 1.4;
}
/* 录音中：红底白字 */
.user-bubble .bubble.recording {
  background-color: #E53935; /* Red 600 */
  color: #FFFFFF;
}
/* 识别中：浅绿色底黑字 */
.user-bubble .bubble.recognizing {
  background-color: #A5D6A7; /* Green 200 */
  color: #1F2937; /* Gray 800 */
}
/* 普通态（识别结果）：白底黑字 */
.user-bubble .bubble.plain {
  background-color: #FFFFFF;
  color: #111827; /* Gray 900 */
}

/* 录音按钮禁用态（确保与 .disabled 类配合） */
.record-btn.disabled,
.record-btn:disabled {
  background-color: #9CA3AF !important; /* Gray 400 */
  color: #FFFFFF !important;
  cursor: not-allowed !important;
  box-shadow: none !important;
}
/* 底部输入栏 */
.input-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: #FFFFFF;
  box-shadow: 0 -2px 8px rgba(0,0,0,0.06);
  padding: 12px 16px;
  z-index: 10;
}
.input-bar .row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
/* 语音态布局 */
.voice-mode .left,
.voice-mode .center,
.voice-mode .right {
  display: flex;
  align-items: center;
}
.voice-mode .center {
  flex: 1;
  justify-content: center;
  gap: 12px;
}
/* 录音按钮：禁用长按选择与触控调用菜单，并设置尺寸与外观 */
.record-btn {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #4285F4;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 14px rgba(66,133,244,0.35);
  cursor: pointer;
  border: none;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  touch-action: none;
}
.record-btn:active {
  transform: scale(0.98);
}
.record-btn svg {
  width: 28px;
  height: 28px;
}
/* 录音按钮禁用态（播放中） */
.record-btn.disabled,
.record-btn:disabled {
  background: #A0AEC0; /* 灰色 */
  box-shadow: 0 0 0 rgba(0,0,0,0.0);
  cursor: not-allowed;
  opacity: 0.7;
}
.record-hint {
  text-align: center;
  font-size: 12px;
  color: #666666;
  margin-top: 8px;
}

/* 文字态布局 */
.text-mode .left { width: 36px; }
.text-mode .center { flex: 1; }
.text-mode .right { width: 72px; }
.text-input {
  width: 100%;
  height: 40px;
  border: 1px solid #E0E0E0;
  border-radius: 20px;
  padding: 0 12px;
  font-size: 14px;
}

.tts-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 12px;
  font-size: 13px;
  color: #333;
  white-space: nowrap;
}
.tts-toggle input[type="checkbox"] {
  width: 16px;
  height: 16px;
}
.send-btn {
  width: 72px;
  height: 40px;
  border-radius: 20px;
  background: #4285F4;
  color: #FFFFFF;
  border: none;
  font-weight: 600;
  cursor: pointer;
}

/* 简易响应式 */
@media (min-width: 768px) {
  .assistant-area { max-width: 640px; margin: 56px auto 92px; }
  .user-bubble { left: calc(50% - 320px + 16px); right: calc(50% - 320px + 16px); }
}
.play-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  font-size: 18px;
  font-weight: 700;
  user-select: none;
  z-index: 999; /* 高于内容与输入栏 */
}
.play-overlay:focus { outline: none; }
/* 课程列表样式，参考 old 前端 */
.course-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  padding: 8px 0;
}
.assistant-card {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 12px 14px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.assistant-title {
  font-size: 16px;
  font-weight: 600;
  color: #111827;
  margin-bottom: 8px;
}
.assistant-content {
  font-size: 14px;
  line-height: 1.5;
  color: #6b7280;
  margin-bottom: 12px;
  min-height: 40px;
}
.assistant-options {
  display: flex;
  gap: 8px;
}
.assistant-option-btn {
  font-size: 14px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  background: #f9fafb;
  color: #374151;
  cursor: pointer;
}
.assistant-option-btn:hover {
  border-color: #2563eb;
  background: #2563eb;
  color: #fff;
}

/* Summary Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  z-index: 1000;
}
.modal {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 90vw;
  max-width: 420px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.2);
  z-index: 1001;
  display: grid;
  grid-template-rows: auto 1fr auto;
}
/* Modal styles moved to below */
.summary-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 12px;
}
.summary-table th {
  background-color: #f9fafb;
  font-weight: 600;
  color: #374151;
  border: 1px solid #e5e7eb;
  padding: 8px;
  text-align: left;
  font-size: 13px;
}
.summary-table td {
  border: 1px solid #e5e7eb;
  padding: 8px;
  color: #1f2937;
  font-size: 13px;
}
.modal-header {
  padding: 16px;
  border-bottom: 1px solid #e5e7eb;
  font-weight: 600;
  font-size: 18px;
  background-color: #f9fafb;
  border-radius: 12px 12px 0 0;
  color: #111827;
}
.modal-body {
  padding: 20px;
  max-height: 60vh;
  overflow: auto;
  font-size: 14px;
  background-color: #fff;
  color: #1f2937;
}
.modal-footer {
  padding: 16px;
  border-top: 1px solid #e5e7eb;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  background-color: #f9fafb;
  border-radius: 0 0 12px 12px;
}
.assistant-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: block;
  margin: 0 auto 12px auto; /* 顶部居中并与内容留白 */
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

/* 设置页：开关控件 */
.setting-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.switch { position: relative; display: inline-block; width: 52px; height: 28px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider { position: absolute; inset: 0; cursor: pointer; background: #ddd; border-radius: 999px; transition: background 0.2s; }
.switch .slider:before { content: ""; position: absolute; height: 24px; width: 24px; left: 2px; top: 2px; background: #fff; border-radius: 50%; box-shadow: 0 1px 4px rgba(0,0,0,0.2); transition: transform 0.2s; }
.switch input:checked + .slider { background: var(--primary); }
.switch input:checked + .slider:before { transform: translateX(24px); }

/* 顶部进度条 */
.practice-progress {
  position: fixed;
  top: 56px; /* Below topbar */
  left: 0;
  right: 0;
  background: #FFFFFF;
  padding: 8px 16px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.04);
  z-index: 9;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.practice-progress .progress-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: #666;
}
.practice-progress .progress-bar-bg {
  height: 4px;
  background: #E0E0E0;
  border-radius: 2px;
  overflow: hidden;
}
.practice-progress .progress-bar-fill {
  height: 100%;
  background: #4285F4;
  border-radius: 2px;
  transition: width 0.3s ease;
}

.onboarding-page {
  background: #1a1a2e;
  min-height: 100vh;
}
.onboarding-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.onboarding-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.38);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  padding: 20px;
}
.onboarding-overlay-card {
  width: 100%;
  max-width: 360px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.24);
  padding: 18px 16px;
  text-align: center;
}
.onboarding-overlay-title {
  font-size: 16px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 8px;
}
.onboarding-overlay-desc {
  font-size: 13px;
  color: #6b7280;
  line-height: 1.5;
  margin-bottom: 14px;
}
.onboarding-overlay-btn {
  width: 100%;
  border: 0;
  border-radius: 12px;
  padding: 12px 14px;
  background: #4285f4;
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}
.onboarding-overlay-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}
.onboarding-card {
  width: 100%;
  max-width: 420px;
  border-radius: 24px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}
.onboarding-header {
  background: linear-gradient(135deg, #4285f4, #7b1fa2);
  color: #ffffff;
  padding: 20px 16px;
  text-align: center;
}
.onboarding-header h1 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
}
.onboarding-header p {
  margin: 6px 0 0 0;
  font-size: 13px;
  opacity: 0.9;
}
.onboarding-content {
  background: #f0f4f8;
  padding: 22px 18px;
}
.onboarding-progress {
  display: flex;
  gap: 6px;
  margin-bottom: 20px;
}
.onboarding-pip {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: #e2e8f0;
}
.onboarding-pip.active {
  background: #4285f4;
}
.onboarding-text {
  min-height: 72px;
  line-height: 2;
  font-size: 16px;
  font-weight: 500;
  color: #718096;
  margin-bottom: 16px;
  word-break: break-word;
  white-space: pre-wrap;
}
.onboarding-char {
  transition: color 0.12s ease, background-color 0.1s ease;
}
.onboarding-char.read {
  color: #1a202c;
  font-weight: 600;
}
.onboarding-char.current {
  color: #4285f4;
  font-weight: 700;
  background: rgba(66, 133, 244, 0.16);
  border-radius: 3px;
}
.onboarding-video-wrap {
  border-radius: 18px;
  overflow: hidden;
  background: #0f172a;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  margin-bottom: 18px;
}
.onboarding-video {
  width: 100%;
  display: block;
  aspect-ratio: 16 / 9;
  background: #111827;
}
.onboarding-question {
  margin-bottom: 14px;
  font-size: 22px;
  line-height: 1.4;
  font-weight: 700;
  text-align: center;
  color: #1a202c;
}
.onboarding-options {
  display: grid;
  gap: 10px;
}
.onboarding-options.cols-1 {
  grid-template-columns: 1fr;
}
.onboarding-options.cols-2 {
  grid-template-columns: 1fr 1fr;
}
.onboarding-option {
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 14px;
  border: 2px solid #e2e8f0;
  background: #ffffff;
  padding: 16px 14px;
  font-size: 15px;
  font-weight: 500;
  color: #1a202c;
  cursor: pointer;
  transition: all 0.2s ease;
}
.onboarding-option:hover {
  border-color: #c7d2fe;
  background: #eef2ff;
  transform: translateY(-1px);
}
.onboarding-option.is-submitting {
  pointer-events: none;
  opacity: 0.75;
}
.onboarding-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid #e2e8f0;
  flex-shrink: 0;
}
.onboarding-option.selected {
  border-color: #4285f4;
  background: #eef6ff;
}
.onboarding-option.selected .onboarding-dot {
  border-color: #4285f4;
  background: radial-gradient(circle at center, #ffffff 0 28%, #4285f4 30% 100%);
}

/* ─── icon_detail_button ─────────────────────────────── */
.onboarding-option.icon-detail-btn {
  border-width: 2px;
  border-style: solid;
  flex-direction: row;
  align-items: center;
  padding: 14px 16px;
}
.onboarding-option.icon-detail-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
.ob-icon {
  font-size: 28px;
  flex-shrink: 0;
  margin-right: 14px;
  line-height: 1;
}
.ob-texts {
  display: flex;
  flex-direction: column;
  gap: 3px;
  text-align: left;
}
.ob-main {
  font-size: 16px;
  font-weight: 600;
  color: #1a202c;
  line-height: 1.3;
}
.ob-sub {
  font-size: 13px;
  color: #64748b;
  line-height: 1.3;
}
.onboarding-option.icon-detail-btn.selected {
  border-color: #4285f4 !important;
  background: rgba(66, 133, 244, 0.12) !important;
}

/* planning level icon_detail_btn */
.planning-level-btn.icon-detail-btn {
  flex-direction: row;
  align-items: center;
  border-width: 2px;
  border-style: solid;
}
.planning-level-btn.icon-detail-btn:hover:not(:disabled) {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.onboarding-continue {
  width: 100%;
  margin-top: 4px;
  border: 0;
  border-radius: 14px;
  background: #4285f4;
  color: #ffffff;
  font-size: 16px;
  font-weight: 700;
  padding: 15px 16px;
  cursor: pointer;
}
.onboarding-continue:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}
.onboarding-content .message {
  margin-top: 14px;
  min-height: 0;
}

/* ─── Planning Page ─────────────────────────────────────────── */
.planning-page {
  background: #1a1a2e;
  min-height: 100vh;
}

.planning-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
}
.planning-overlay-card {
  background: #fff;
  border-radius: 20px;
  padding: 36px 28px;
  text-align: center;
  max-width: 320px;
  width: 90%;
}
.planning-overlay-title {
  font-size: 20px;
  font-weight: 700;
  color: #1a202c;
  margin-bottom: 8px;
}
.planning-overlay-desc {
  font-size: 14px;
  color: #718096;
  margin-bottom: 20px;
  line-height: 1.5;
}
.planning-overlay-btn {
  background: #4285f4;
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 12px 32px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
}
.planning-overlay-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.planning-shell {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px 16px;
}

.planning-card {
  background: #fff;
  border-radius: 24px;
  width: 100%;
  max-width: 420px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}

.planning-header {
  background: linear-gradient(135deg, #1A202C, #2D3748);
  padding: 32px 24px 24px;
  text-align: center;
}
.planning-header h1 {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 4px;
}
.planning-header p {
  font-size: 13px;
  color: rgba(255,255,255,0.65);
  margin: 0;
}

.planning-content {
  padding: 20px 20px 28px;
}

.planning-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.planning-back-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #f7f7f7;
  border: 1px solid #e6e6e6;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1a202c;
  transition: background 0.15s;
}
.planning-back-btn:hover {
  background: #eeeeee;
}
.planning-topbar-title {
  font-size: 15px;
  font-weight: 700;
  color: #1a202c;
}

/* typewriter text area */
.ob-text {
  min-height: 56px;
  font-size: 15px;
  line-height: 1.6;
  color: #2d3748;
  margin-bottom: 16px;
  word-break: break-word;
}
.ob-text .onboarding-char {
  display: inline;
}
.ob-text .onboarding-char.current {
  color: #1a202c;
  font-weight: 500;
}
.ob-text .onboarding-char.read {
  color: #a0aec0;
}

/* level select grid */
.planning-level-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}
.planning-level-grid.cols-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.planning-level-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: #f7f7f7;
  border: 1px solid #e6e6e6;
  border-radius: 14px;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s;
  width: 100%;
}
.planning-level-btn:hover:not(:disabled) {
  background: #eee;
  border-color: #c0c0c0;
}
.planning-level-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}
.planning-level-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #4285f4;
  flex-shrink: 0;
}
.planning-level-text {
  font-size: 15px;
  font-weight: 500;
  color: #1a202c;
}

/* lesson list section */
.planning-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.planning-section-label {
  font-size: 15px;
  font-weight: 700;
  color: #1a202c;
}
.planning-section-hint {
  font-size: 12px;
  color: #a0aec0;
}

/* horizontal scroll lesson cards */
.pl-lessons-scroll {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  gap: 12px;
  padding-bottom: 8px;
  -webkit-overflow-scrolling: touch;
}
.pl-lessons-scroll::-webkit-scrollbar {
  height: 4px;
}
.pl-lessons-scroll::-webkit-scrollbar-track {
  background: #f0f0f0;
  border-radius: 2px;
}
.pl-lessons-scroll::-webkit-scrollbar-thumb {
  background: #c0c0c0;
  border-radius: 2px;
}

.pl-lesson-card {
  width: 160px;
  flex-shrink: 0;
  scroll-snap-align: start;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  border: 1px solid #e6e6e6;
  transition: transform 0.15s, box-shadow 0.15s;
}
.pl-lesson-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.pl-lesson-cover {
  width: 100%;
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  overflow: hidden;
}
.pl-lesson-cover.done {
  background: linear-gradient(135deg, #48bb78, #38a169);
}
.pl-lesson-cover.current {
  background: linear-gradient(135deg, #9f7aea, #805ad5);
}
.pl-lesson-cover.pending {
  background: linear-gradient(135deg, #cbd5e0, #a0aec0);
}
.pl-lesson-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pl-lesson-info {
  padding: 10px 12px 12px;
}
.pl-lesson-name {
  font-size: 13px;
  font-weight: 600;
  color: #1a202c;
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pl-lesson-desc {
  font-size: 11px;
  color: #718096;
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pl-progress-bar {
  height: 4px;
  background: #edf2f7;
  border-radius: 2px;
  margin-bottom: 6px;
  overflow: hidden;
}
.pl-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #9f7aea, #805ad5);
  border-radius: 2px;
  transition: width 0.4s ease;
}
.pl-lesson-status {
  font-size: 11px;
  font-weight: 600;
  text-align: center;
  border-radius: 6px;
  padding: 3px 0;
}
.pl-lesson-status.status-done {
  color: #276749;
  background: #c6f6d5;
}
.pl-lesson-status.status-current {
  color: #553c9a;
  background: #e9d8fd;
}
.pl-lesson-status.status-pending {
  color: #4a5568;
  background: #edf2f7;
}

/* advance message */
.planning-advance-msg {
  text-align: center;
  font-size: 14px;
  color: #4a5568;
  padding: 10px 0;
  margin-top: 8px;
}
.planning-advance-msg.all-complete {
  font-size: 18px;
  font-weight: 700;
  color: #276749;
  padding: 16px 0;
}

/* message area */
.planning-content .message {
  margin-top: 12px;
}
