:root {
  --bg: #f1f5f9;
  --card: #ffffff;
  --ink: #0f172a;
  --text: #1f2937;
  --body: #374151;
  --muted: #6b7280;
  --faint: #94a3b8;
  --line: #e2e8f0;
  --line-strong: #cbd5e1;
  --primary: #0f172a;
  --primary-hover: #1e293b;
  --green: #16a34a;
  --green-bg: #f0fdf4;
  --red: #dc2626;
  --red-bg: #fef2f2;
  --amber: #d97706;
  --blue: #2563eb;
  --radius: 16px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 4px 12px rgba(15, 23, 42, 0.04);
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue',
    Arial, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--body);
  min-height: 100vh;
  line-height: 1.5;
  touch-action: manipulation;
}

a { color: inherit; text-decoration: none; }
.ai-icon, .brand-mark svg, .b-ico svg { width: 100%; height: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input { font-family: inherit; }
ul { list-style: none; }

.app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  padding: 0 16px 40px;
  padding-top: env(safe-area-inset-top);
}

/* ---------- 顶栏 ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 2px 14px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 10px;
  background: var(--ink); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 800; line-height: 1;
}
.brand-name { font-size: 20px; font-weight: 800; color: var(--ink); letter-spacing: -0.02em; }
.topbar-actions { display: flex; align-items: center; gap: 8px; min-width: 0; }
/* 账号（邮箱）过长时省略号截断，避免撑破顶栏 */
.topbar-link {
  font-size: 15px; font-weight: 600; color: var(--text);
  padding: 8px 12px; border-radius: 10px;
  min-width: 0; max-width: 170px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* 设置按钮不参与压缩，始终完整显示 */
.topbar-actions .icon-btn { flex: none; }
.topbar-link:hover { background: rgba(15, 23, 42, 0.05); }
.icon-btn {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #1C2430;
}
/* 齿轮图标与内页（lesson 页 22px）同尺寸，避免首页图标显得过大 */
.icon-btn .ai-icon { width: 22px; height: 22px; }
.icon-btn:hover { background: rgba(15, 23, 42, 0.05); color: var(--text); }

/* ---------- 通用排版 / 卡片 ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.section { margin-top: 26px; }
.section-head {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 12px; padding: 0 2px;
}
.section-head h2 { font-size: 18px; font-weight: 800; color: var(--ink); }
.section-head .spacer { flex: 1; }
.section-head a { font-size: 13px; color: var(--muted); font-weight: 500; }
/* 分组标题右侧提示（与小程序 section-hint 一致） */
.section-head .section-hint { font-size: 11.5px; color: #9AA3B2; font-weight: 500; }
/* 航班广播试听提醒：醒目琥珀色胶囊 */
.section-head .section-hint.flight-hint {
  font-size: 11.5px; font-weight: 700; color: #B26A00;
  background: #FFF4E5; border: 1px solid #FFD8A8; border-radius: 999px;
  padding: 3px 9px; white-space: nowrap;
}

/* 首页「进阶测验」标题旁的小程序提示气泡 */
.section-head h2 { flex-shrink: 0; }
.wx-bubble {
  position: relative;
  flex: 0 1 auto;
  min-width: 0;
  margin-left: 2px;
  padding: 5px 10px;
  border-radius: 8px;
  background: #EAF1FF; border: 1px solid #C7DBFF;
  color: #1D4ED8; font-size: 11.5px; font-weight: 600; line-height: 1.35;
}
.wx-bubble::before {
  content: '';
  position: absolute;
  left: -4px; top: 50%;
  width: 7px; height: 7px; margin-top: -3.5px;
  background: #EAF1FF;
  border-left: 1px solid #C7DBFF;
  border-bottom: 1px solid #C7DBFF;
  transform: rotate(45deg);
}

/* ---------- 首页分组白色面板（对标小程序 group-panel：白底圆角包裹，内层格子浅灰内嵌） ---------- */
.home-panel {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 10px;
  box-shadow: var(--shadow);
}
.home-panel .topic-btn, .home-panel .chip, .home-panel .action-row {
  background: #F5F7FA; border-color: transparent;
}
.home-panel .topic-btn:hover, .home-panel .chip:hover, .home-panel .action-row:hover {
  background: #ECEFF4;
}
.home-panel .action-row.primary { background: var(--primary); }
.home-panel .action-row.primary:hover { background: var(--primary-hover); }
.home-panel .topic-btn.is-locked, .home-panel .chip.is-locked { background: #F1F3F7; }
.muted { color: var(--muted); }
.tiny { font-size: 12px; }

/* ---------- 首页 Hero ---------- */
.hero { padding: 26px 2px 8px; }
.hero h1 {
  font-size: 34px; line-height: 1.2; font-weight: 800;
  color: var(--ink); letter-spacing: -0.02em;
}
.hero .sub { margin-top: 12px; font-size: 15px; color: var(--muted); }
.hero .sub .emoji { margin-right: 4px; }
.hero .social { margin-top: 10px; font-size: 13px; color: var(--faint); }

/* ---------- 操作大按钮（Start / Review / Statistics） ---------- */
.action-list { display: flex; flex-direction: column; gap: 10px; margin-top: 22px; }
.action-row {
  display: flex; align-items: center; gap: 14px;
  width: 100%; padding: 16px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: #fff;
  font-size: 16px; font-weight: 600; color: var(--text);
  text-align: left;
  transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease;
}
.action-row:hover { background: #f8fafc; }
.action-row:active { transform: scale(0.985); }
.action-row .ai-icon { width: 22px; height: 22px; flex: none; color: var(--ink); }
.action-row.badge { position: relative; }
.badge-count {
  margin-left: auto; background: var(--red); color: #fff;
  min-width: 22px; height: 22px; padding: 0 7px;
  border-radius: 999px; font-size: 12px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}
.action-row.primary {
  background: var(--primary); border-color: var(--primary); color: #fff;
  padding: 23px 20px; font-size: 18px; border-radius: 14px;
}
.action-row.primary:hover { background: var(--primary-hover); }
.action-row.primary .ai-icon { color: #fff; }

/* ---------- 评价横滑 ---------- */
.testi-scroll {
  display: flex; gap: 12px; overflow-x: auto;
  margin: 0 -16px; padding: 4px 16px 10px;
  scroll-snap-type: x mandatory;
  -ms-overflow-style: none; scrollbar-width: none;
}
.testi-scroll::-webkit-scrollbar { display: none; }
.testi-card {
  scroll-snap-align: start;
  flex: 0 0 240px;
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px;
  box-shadow: var(--shadow);
}
.stars { color: #f59e0b; letter-spacing: 2px; font-size: 13px; margin-bottom: 10px; }
.testi-card p { font-size: 14px; color: var(--text); line-height: 1.6; }
.testi-card .who { margin-top: 12px; font-size: 12px; color: var(--faint); }

/* ---------- 双列题型入口 ---------- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.topic-btn {
  display: flex; align-items: center; gap: 10px;
  padding: 15px 14px;
  background: #fff; border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  font-size: 15px; font-weight: 600; color: var(--text);
  transition: transform 0.12s ease, background 0.15s ease;
}
.topic-btn:hover { background: #f8fafc; }
.topic-btn:active { transform: scale(0.97); }
.topic-btn .ai-icon { width: 20px; height: 20px; flex: none; }
.topic-btn .lock { margin-left: auto; width: 15px; height: 15px; color: var(--faint); }
.topic-btn.is-locked {
  color: var(--faint); background: #f8fafc;
  cursor: pointer;
}
.topic-btn.is-locked .ai-icon { color: var(--faint); }

/* ---------- 航班场景小芯片 ---------- */
.chip-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.chip {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 10px; background: #fff;
  font-size: 13.5px; font-weight: 500; color: var(--text);
  transition: transform 0.12s ease, background 0.15s ease;
}
.chip:hover { background: #f8fafc; }
.chip:active { transform: scale(0.97); }
.chip .ai-icon { width: 16px; height: 16px; color: var(--muted); flex: none; }
.chip .emoji-icon { font-size: 15px; line-height: 1; flex: none; }
.chip .lock { margin-left: auto; width: 13px; height: 13px; color: var(--faint); }
.chip.is-locked { color: var(--faint); background: #f8fafc; pointer-events: auto; cursor: pointer; }
.chip.is-locked .ai-icon { color: var(--faint); }
.chip.is-locked .emoji-icon { opacity: .45; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: 15px; font-weight: 700;
  transition: transform 0.12s ease, background 0.15s ease, opacity 0.15s ease;
}
.btn:active { transform: scale(0.985); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-primary:disabled { background: #cbd5e1; color: #f8fafc; cursor: not-allowed; transform: none; }
.btn-outline { background: #fff; color: var(--text); border: 1px solid var(--line-strong); }
.btn-outline:hover { background: #f8fafc; }
.btn-outline.on-style { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn-row { display: flex; gap: 10px; }
.btn-row .btn { width: auto; flex: 1; }
.btn-sm { padding: 9px 14px; font-size: 13px; width: auto; border-radius: 10px; }

/* ---------- 表单 ---------- */
.form { display: flex; flex-direction: column; gap: 14px; }
.field label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 7px; }
.input {
  width: 100%; padding: 14px 15px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  background: #fff; color: var(--ink);
  font-size: 16px; outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.input::placeholder { color: var(--faint); }
.input:focus { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.06); }
.field-error { color: var(--red); font-size: 13px; margin-top: 6px; display: none; }
.field-error.show { display: block; }
.alert {
  padding: 12px 14px; border-radius: var(--radius-sm);
  font-size: 13.5px; margin-bottom: 14px; display: none;
}
.alert.show { display: block; }
.alert-error { background: var(--red-bg); color: var(--red); border: 1px solid #fecaca; }
.alert-ok { background: var(--green-bg); color: var(--green); border: 1px solid #bbf7d0; }

/* 6 位验证码输入 */
.code-input {
  width: 100%;
  padding: 14px 15px;
  font-size: 22px;
  letter-spacing: 14px;
  text-align: center;
  font-weight: 700;
  color: var(--ink);
}
.send-row { display: flex; gap: 10px; align-items: stretch; }
.send-row .input { flex: 1; }
.text-btn {
  flex: none; padding: 0 16px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  background: #fff; color: var(--text); font-size: 14px; font-weight: 600;
  white-space: nowrap;
}
.text-btn:disabled { color: var(--faint); cursor: not-allowed; }

/* ---------- 登录页 ---------- */
.auth-wrap { padding-top: 6vh; }
.auth-card { padding: 26px 22px; }
.auth-card h1 { font-size: 24px; color: var(--ink); font-weight: 800; letter-spacing: -0.01em; }
.auth-card .lead { color: var(--muted); font-size: 14px; margin: 8px 0 22px; }
.auth-foot { text-align: center; margin-top: 18px; font-size: 13px; color: var(--faint); line-height: 1.8; }
.back-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 14px; color: var(--muted); font-weight: 500; margin-bottom: 18px;
}
.back-link:hover { color: var(--text); }
/* 覆盖 .ai-icon 全局 width:100%，避免「返回首页」文字被挤成竖排 */
.back-link .ai-icon { width: 17px; height: 17px; flex: none; }
.auth-email { color: var(--ink); font-weight: 700; }

/* ---------- 练习页（排版与小程序 pages/practice 一致） ---------- */
.lesson-app { padding-bottom: 24px; }

/* 头部：黑方块 logo + 标题 + 齿轮（练习页 / 航班页共用，与小程序 app-header 一致） */
.app-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 0 12px;
}
.app-header .brand { display: flex; align-items: center; }
.app-header .brand-logo {
  width: 32px; height: 32px; border-radius: 9px; flex: none;
  background: #171D28; color: #fff; font-size: 17px; font-weight: 800;
  display: flex; align-items: center; justify-content: center; margin-right: 10px;
}
.app-header .brand-info { display: flex; flex-direction: column; }
.app-header .brand-name { font-size: 15px; font-weight: 800; color: #171D28; letter-spacing: 0.5px; line-height: 1.25; }
.app-header .brand-sub { font-size: 10px; color: #9AA3B2; margin-top: 2px; }
.lesson-app .icon-btn {
  width: 36px; height: 36px; border-radius: 50%; flex: none;
  display: flex; align-items: center; justify-content: center; background: transparent;
}
.lesson-app .icon-btn:active { background: #E8EBF0; }

/* 白色分组容器 */
.lesson-app .group-panel {
  background: #fff; border-radius: 14px; padding: 14px; margin-bottom: 12px;
  box-shadow: var(--shadow);
}

/* 进度卡 */
.progress-card { padding: 12px 14px; }
.progress-wrap { display: flex; align-items: center; }
.progress-bar { flex: 1; height: 4px; background: #E8EBF0; border-radius: 2px; overflow: hidden; }
.progress-fill {
  display: block; height: 100%; width: 0;
  background: #1C2430; border-radius: 2px; transition: width 0.3s;
}
.progress-text { font-size: 13px; font-weight: 700; color: #171D28; margin-left: 10px; min-width: 40px; text-align: right; }

/* 播放器行 */
.p-audio-row {
  display: flex; align-items: center;
  background: #F5F7FA; border-radius: 10px; padding: 7px 10px; margin-bottom: 12px;
}
.p-play {
  width: 32px; height: 32px; border-radius: 50%; flex: none;
  background: #1C2430; color: #fff; font-size: 13px;
  display: flex; align-items: center; justify-content: center;
}
.p-bar {
  flex: 1; height: 3px; background: #E8EBF0; border-radius: 2px;
  overflow: hidden; margin: 0 8px; cursor: pointer;
}
.p-fill { display: block; height: 100%; width: 0; background: #1C2430; border-radius: 2px; }
.p-time { font-size: 11px; color: #9AA3B2; min-width: 38px; text-align: right; }
.p-speed {
  flex: none; font-size: 11px; font-weight: 700; color: #171D28;
  background: #fff; border: 1px solid #E5E8EE; border-radius: 999px;
  padding: 4px 9px; margin-left: 6px;
}

/* 题干 */
.question-text { text-align: center; font-size: 13px; color: #9AA3B2; margin-bottom: 14px; }

/* 答案格：始终单行，位数多自动收窄 */
.answer-boxes { display: flex; justify-content: center; flex-wrap: nowrap; margin-bottom: 16px; }
.answer-box {
  flex: 1 1 0; min-width: 0; max-width: 44px; height: 44px; margin: 0 3px;
  background: #F5F7FA; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 700; color: transparent;
}
/* 中等长度：7~9 位 */
.answer-boxes.md .answer-box { max-width: 37px; height: 41px; font-size: 18px; margin: 0 2.5px; }
/* 较长：电话 / 金额 10 位以上 */
.answer-boxes.sm .answer-box { max-width: 31px; height: 38px; font-size: 15px; margin: 0 2px; border-radius: 7px; }
/* 最长：日期 8 位 + 年月日 三个分隔符，格子再收窄一档 */
.answer-boxes.xs .answer-box { max-width: 28px; height: 37px; font-size: 14px; margin: 0 1.5px; border-radius: 6px; }

/* 分隔占位符：时间 ":"，日期 "年/月/日" */
.answer-sep {
  flex: 0 0 auto; align-self: center;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; font-weight: 800; color: #171D28; line-height: 1; margin: 0 3px;
}
.answer-boxes.xs .answer-sep { font-size: 12px; font-weight: 700; margin: 0 1px; }

.answer-box.filled { background: #1C2430; color: #fff; }
.answer-box.correct { background: #34C759; color: #fff; }
.answer-box.wrong { background: #F4573B; color: #fff; }

/* 操作按钮 */
.action-row { display: flex; gap: 8px; }
.action-btn { flex: 1; padding: 13px 0; border-radius: 10px; text-align: center; font-size: 14px; font-weight: 700; }
.action-btn.primary { background: #1C2430; color: #fff; }
.action-btn.ghost { background: #fff; color: #171D28; border: 1px solid #E5E8EE; }
.action-btn.disabled { background: #E8EBF0; color: #B4BAC6; }

/* 数字键盘（练习页专用；类名避开通用 .keypad，以免与 dialogue 共用样式冲突） */
.lesson-app .lesson-keypad { display: flex; flex-wrap: wrap; margin: -4px; }
.keypad-btn {
  width: calc(33.333% - 8px); margin: 4px; height: 44px; border-radius: 10px;
  background: #F5F7FA; color: #171D28; font-size: 20px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.1s;
}
.keypad-btn:active { background: #E8EBF0; }
.keypad-btn.del { font-size: 13px; color: #9AA3B2; }

/* 练习页设置弹层 */
.sheet-title-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.sheet-title-row h3 { margin: 0; text-align: left; }
.sheet-close { font-size: 15px; color: var(--muted); padding: 4px; line-height: 1; }
.set-item { margin-bottom: 16px; }
.set-label { display: block; font-size: 12px; color: #9AA3B2; margin-bottom: 6px; }
.set-picker {
  width: 100%; padding: 11px 12px; border: none; border-radius: 8px;
  font-size: 15px; font-weight: 600; color: #171D28; background: #F5F7FA;
}
.save-row { display: flex; align-items: center; }
.save-tip { color: #34C759; font-size: 12px; margin-left: 10px; }
.login-tip-text { font-size: 14px; color: #4A5468; line-height: 1.6; text-align: center; padding: 8px 0 20px; }

/* 练习页结算 */
.result-head { padding: 18px 0 14px; text-align: center; }
.result-accuracy { font-size: 13px; color: #9AA3B2; margin-top: 6px; }
.wrong-list { max-height: 220px; overflow-y: auto; }
.wrong-item { background: #FDF1EF; border-radius: 8px; padding: 9px 10px; margin-bottom: 6px; }
.wrong-index { font-size: 11px; color: #9AA3B2; display: block; margin-bottom: 3px; }
.wrong-detail { display: flex; align-items: center; flex-wrap: wrap; font-size: 13px; font-weight: 600; }
.wrong-mine { color: #F4573B; }
.wrong-arrow { margin: 0 6px; color: #C3C9D4; }
.wrong-right { color: #34C759; }
.wrong-list .mini-play { margin-left: auto; }
.perfect { text-align: center; color: #34C759; padding: 20px 0; font-size: 13px; }
.result-btns { display: flex; gap: 10px; margin-top: 12px; }

.audio-bar {
  margin-top: 14px;
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 12px 14px;
  box-shadow: var(--shadow);
}
.audio-bar audio { width: 100%; height: 40px; }
.speed-btn {
  margin-top: 10px;
  padding: 6px 14px; border: 1px solid var(--line-strong);
  border-radius: 999px; background: #fff;
  font-size: 13px; font-weight: 700; color: var(--text);
}

.prompt {
  text-align: center;
  font-size: 24px; font-weight: 800; color: var(--ink);
  margin: 44px 0 22px; letter-spacing: -0.01em;
}

.hint {
  margin-top: 22px; text-align: center;
  font-size: 13px; color: var(--faint);
}

.lesson-actions {
  margin-top: 28px;
  display: flex; gap: 10px;
}
.lesson-actions .btn { flex: 1; }

/* ---------- 答案槽与数字键盘（dialogue 共用，勿删） ---------- */
.slots {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px;
  min-height: 60px;
}
.slot {
  width: 46px; height: 60px;
  border-radius: 12px;
  background: #e9edf2;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; font-weight: 800; color: var(--ink);
  border: 2px solid transparent;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.slot.empty { background: #e9edf2; color: transparent; }
.slot.filled { background: #e2e8f0; color: var(--ink); }
.slot.ok { background: var(--green); color: #fff; border-color: var(--green); }
.slot.bad { background: var(--red); color: #fff; border-color: var(--red); }

.keypad {
  margin-top: 22px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
}
.keypad button {
  padding: 16px 0;
  background: #fff; border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  font-size: 20px; font-weight: 700; color: var(--ink);
  transition: transform 0.1s ease, background 0.15s ease;
}
.keypad button:active { transform: scale(0.95); background: #f1f5f9; }
.keypad button.del { color: var(--muted); font-size: 15px; }

.lock-panel { text-align: center; padding: 70px 24px; }
.lock-panel .lock-ico { font-size: 46px; }
.lock-panel h2 { margin: 14px 0 8px; color: var(--ink); font-size: 20px; }
.lock-panel p { color: var(--muted); font-size: 14px; margin-bottom: 20px; }
.lock-panel .btn { margin-bottom: 10px; }

/* ---------- 结算弹层 ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(15, 23, 42, 0.45);
  display: none; align-items: flex-end; justify-content: center;
  padding: 16px;
}
.overlay.show { display: flex; }
.sheet {
  width: 100%; max-width: 480px;
  background: #fff; border-radius: 20px;
  padding: 24px 20px 22px;
  max-height: 84vh; overflow-y: auto;
}
@media (min-width: 560px) {
  .overlay { align-items: center; }
}
.sheet h3 { font-size: 19px; color: var(--ink); font-weight: 800; text-align: center; }
.result-score { text-align: center; font-size: 40px; font-weight: 800; color: var(--ink); margin: 10px 0 2px; }
.result-acc { text-align: center; color: var(--muted); font-size: 14px; margin-bottom: 18px; }
.wrong-row {
  display: flex; align-items: center; gap: 10px;
  background: var(--red-bg); border-radius: 12px;
  padding: 10px 12px; margin-bottom: 8px;
  font-size: 13.5px;
}
.wrong-row .qno { color: var(--muted); flex: none; }
.wrong-row .ua { color: var(--red); font-weight: 700; }
.wrong-row .arr { color: var(--faint); }
.wrong-row .ca { color: var(--green); font-weight: 700; margin-right: auto; }
.mini-play {
  width: 28px; height: 28px; border-radius: 50%;
  background: #fff; border: 1px solid var(--line);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text); flex: none;
}
.all-correct { text-align: center; color: var(--green); font-weight: 700; padding: 18px 0; font-size: 15px; }
.sheet .btn-row { margin-top: 16px; }

/* ---------- 统计 ---------- */
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat-card { padding: 18px 14px; text-align: center; }
.stat-value { font-size: 30px; font-weight: 800; color: var(--ink); line-height: 1.1; }
.stat-label { font-size: 12.5px; color: var(--muted); margin-top: 5px; }
.type-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 2px; border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.type-row:last-child { border-bottom: none; }
.type-row .tname { color: var(--text); font-weight: 600; }
.type-row .tnum { color: var(--muted); }

/* ---------- 错题本 ---------- */
.wrong-group-title {
  font-size: 13px; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.05em;
  margin: 18px 2px 8px;
}
.wrong-item {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 14px; margin-bottom: 8px;
}
.wrong-item .wi-val { font-weight: 700; color: var(--ink); margin-right: auto; }
.wrong-item .wi-meta { font-size: 12px; color: var(--faint); }
.wi-del {
  width: 30px; height: 30px; border-radius: 8px;
  color: var(--faint); display: flex; align-items: center; justify-content: center;
}
.wi-del:hover { color: var(--red); background: var(--red-bg); }
.empty-state { text-align: center; padding: 70px 24px; color: var(--muted); }
.empty-state .es-ico { font-size: 42px; display: block; margin-bottom: 12px; }
.empty-state p { font-size: 14px; margin-bottom: 18px; }

/* ---------- 航班广播页（排版与小程序 pages/flights 一致） ---------- */
.flight-app { padding-bottom: 24px; }
.flight-app .card { padding: 14px; margin-bottom: 12px; }

/* 文本块：英文 / 中文各一块，带小标题 */
.text-block { margin-bottom: 12px; }
.block-label { font-size: 11px; color: #9AA3B2; margin-bottom: 6px; }
.en-text {
  font-size: 14px; line-height: 1.7; color: #171D28;
  background: #F7F8FA; border-left: 3px solid #1C2430;
  border-radius: 8px; padding: 10px;
}
.cn-text {
  font-size: 14px; line-height: 1.7; color: #4B5563;
  background: #F7F8FA; border-left: 3px solid #C3C9D4;
  border-radius: 8px; padding: 10px;
}
/* 遮罩态：文字模糊不可读（与小程序 masked 一致） */
.en-text.masked, .cn-text.masked {
  color: transparent; background: #F3F4F6; border-left-color: #E5E8EE;
  text-shadow: 0 0 8px rgba(107, 114, 128, 0.55);
  user-select: none;
}

/* 胶囊切换按钮 */
.flight-app .chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.flight-app .chip {
  width: auto; display: inline-flex; align-items: center;
  padding: 7px 13px; border: 1px solid #E5E8EE; border-radius: 999px;
  font-size: 13px; font-weight: 600; color: #171D28; background: #fff;
}
.flight-app .chip.on { background: #1C2430; border-color: #1C2430; color: #fff; }

/* 航班试听弹层（与小程序 pages/index 试听弹层一致） */
/* 弹层在屏幕正中显示，不贴底 */
#demoOverlay { align-items: center; }
.demo-tabs { display: flex; gap: 8px; overflow-x: auto; margin-bottom: 12px; }
.demo-tabs::-webkit-scrollbar { display: none; }
.demo-tab {
  flex: none; white-space: nowrap; padding: 5px 13px;
  border: 1px solid #E5E8EE; border-radius: 999px;
  font-size: 12.5px; font-weight: 600; color: #171D28; background: #fff;
}
.demo-tab.on { background: #1C2430; border-color: #1C2430; color: #fff; }
.demo-sheet .chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.demo-sheet .chip {
  width: auto; display: inline-flex; align-items: center;
  padding: 7px 13px; border: 1px solid #E5E8EE; border-radius: 999px;
  font-size: 13px; font-weight: 600; color: #171D28; background: #fff;
}
.demo-sheet .chip.on { background: #1C2430; border-color: #1C2430; color: #fff; }
/* 「升级 PRO」入口：琥珀色，比切换类胶囊更醒目 */
.demo-sheet .chip.vip-chip { background: #F59E0B; border-color: #F59E0B; color: #fff; font-weight: 700; }
.demo-sheet .chip.vip-chip:hover { background: #D97706; border-color: #D97706; }

/* 答案行：航班号 */
.answer-line { margin-top: 12px; font-size: 15px; font-weight: 700; color: #1C2430; }

/* 上一题 / 下一题（航班页、句子跟读页共用） */
.nav-row { display: flex; gap: 10px; }
.nav-btn {
  flex: 1; padding: 13px 0; border-radius: 10px;
  text-align: center; font-size: 15px; font-weight: 700;
}
.nav-btn.ghost { background: #fff; color: #171D28; border: 1px solid #E5E8EE; }
.nav-btn.primary { background: #1C2430; color: #fff; }

/* ---------- 句子跟读（排版与小程序 pages/play 一致） ---------- */
.sentence-card { padding: 16px 14px 14px; }
/* 跟读页按钮统一加高（上一句 / 下一句 单独更高），避免宽而扁显得拉长 */
.sentence-card .btn-sm {
  min-height: 54px; padding: 0 10px; font-size: 14px; line-height: 1.2;
  border-radius: 11px;
}
/* 星标按钮随行高自适应，避免比同行按钮矮一截 */
.sentence-card .star-btn { width: 54px; height: auto; align-self: stretch; }
.sentence-no { font-size: 11px; color: #9AA3B2; font-weight: 600; letter-spacing: 0.5px; }
.sentence-en {
  margin-top: 7px; font-size: 20px; font-weight: 800; color: #171D28;
  line-height: 1.6; word-break: break-word; cursor: pointer;
}
.sentence-ipa { margin-top: 5px; font-size: 12px; color: #9AA3B2; line-height: 1.5; }
/* 中文：默认只留一句提示，点击后正常显示 */
.sentence-cn {
  margin-top: 10px; font-size: 14px; line-height: 1.7; color: #B4BAC6;
  min-height: 20px; transition: color 0.2s; cursor: pointer;
}
.sentence-cn.revealed { color: #6B7280; }

.sentence-tools { display: flex; align-items: center; gap: 7px; margin-top: 9px; }
.star-btn {
  flex: 0 0 auto; width: 38px; height: 38px; border-radius: 8px;
  background: #fff; border: 1px solid #E5E8EE; color: #9AA3B2;
  font-size: 18px; line-height: 1; display: flex; align-items: center; justify-content: center;
}
.star-btn.on { color: #F59E0B; border-color: #FDE68A; background: #FFFBEB; }

/* 上一句 / 下一句（加大，点击即播） */
.sentence-card .nav-row { margin-top: 14px; }
.nav-row .nav-btn {
  padding: 19px 0; border-radius: 12px; font-size: 17px; font-weight: 800;
  letter-spacing: 0.5px; background: #fff; color: #171D28; border: 1px solid #E5E8EE;
}
.nav-row .nav-btn.primary { background: #1C2430; color: #fff; border-color: #1C2430; }

/* 进度点 */
.sentence-dots { display: flex; gap: 5px; justify-content: center; margin-top: 12px; }
.sentence-dots i { width: 6px; height: 6px; border-radius: 50%; background: #E5E8EE; }
.sentence-dots i.on { background: #1C2430; }

/* 底部提示条（与上方句子卡等宽，并留出间距） */
.tip {
  display: flex; align-items: center; margin: 12px 0 8px; padding: 13px 14px;
  border-radius: 11px; background: #FFF7E6; border: 1px solid #FCD34D;
}
.tip-ico { font-size: 22px; line-height: 1; margin-right: 9px; }
.tip-main { flex: 1; }
.tip-strong { font-size: 15px; font-weight: 800; color: #8A4B00; line-height: 1.4; }
.tip-sub { margin-top: 4px; font-size: 12.5px; color: #A16207; line-height: 1.4; }

/* 头部右侧胶囊按钮（句子列表入口） */
.header-right { display: flex; align-items: center; gap: 6px; }
.chip-btn {
  flex-shrink: 0; font-size: 11px; font-weight: 700; color: #171D28;
  background: #fff; border: 1px solid #E5E8EE; border-radius: 999px; padding: 5px 11px;
  cursor: pointer; font-family: inherit;
}
.chip-btn.on { background: #1C2430; border-color: #1C2430; color: #fff; }

/* ---------- 分组播放弹层（会员功能，与小程序 pages/play 一致） ---------- */
.group-sheet { max-width: 380px; }
.group-vip-tip {
  display: block; margin-bottom: 12px; padding: 10px 12px;
  border-radius: 8px; background: #FFF7E6; border: 1px solid #FCD34D;
  font-size: 13px; color: #8A4B00; font-weight: 600; text-align: center;
  text-decoration: none;
}
.group-list { max-height: 55vh; overflow-y: auto; margin: 0 -4px; }
.group-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 10px; font-size: 14px; color: #171D28;
  border-bottom: 1px solid #F1F3F8; cursor: pointer;
}
.group-item:last-child { border-bottom: none; }
.group-item.on { color: #1C2430; font-weight: 800; background: #F4F6FA; border-radius: 8px; }
.group-item.locked { color: #C0C4CC; cursor: default; }
.group-item-check { color: #16A34A; font-weight: 800; }
.group-item-lock { font-size: 12px; }

/* ---------- 句子列表（排版与小程序 pages/list 一致） ---------- */
.list-card { padding: 4px 14px; margin-top: 6px; }
.list-card .row {
  display: flex; align-items: flex-start; padding: 12px 2px;
  border-bottom: 1px solid #E8EBF0;
}
.list-card .row:last-child { border-bottom: none; }
.list-card .no {
  width: 28px; height: 28px; border-radius: 50%; background: #F5F7FA; color: #9AA3B2;
  font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center;
  margin-right: 10px; flex-shrink: 0;
}
.list-card .content { flex: 1; min-width: 0; }
.list-card .en {
  font-size: 14px; font-weight: 600; color: #171D28; line-height: 1.5;
  word-break: break-word; cursor: pointer;
}
.list-card .cn { font-size: 12px; color: #9AA3B2; margin-top: 4px; line-height: 1.5; word-break: break-word; }
.list-card .empty { padding: 28px 0; text-align: center; font-size: 13px; color: #9AA3B2; }
.list-card .play {
  width: 32px; height: 32px; border-radius: 50%; background: #1C2430; color: #fff;
  font-size: 12px; display: flex; align-items: center; justify-content: center;
  margin-left: 8px; flex-shrink: 0;
}
.pager { display: flex; gap: 8px; align-items: center; margin: 0 16px 12px; }
.pager-btn {
  flex: 1; padding: 13px 0; border-radius: 10px; text-align: center;
  font-size: 14px; font-weight: 700; background: #fff; color: #171D28; border: 1px solid #E5E8EE;
}
.pager-btn.disabled { color: #B4BAC6; background: #E8EBF0; border-color: #E8EBF0; }
.pager select {
  flex: 0 0 auto; min-width: 105px; padding: 13px 10px; border-radius: 10px;
  font-size: 13px; font-weight: 700; color: #171D28;
  background: #fff; border: 1px solid #E5E8EE;
}
.vip-note {
  margin-top: 10px; padding: 12px 14px;
  background: #fffbeb; border: 1px solid #fde68a; border-radius: var(--radius-sm);
  font-size: 13px; color: var(--amber); line-height: 1.6;
}

/* ---------- PRO 升级页 ---------- */
.pro-hero { text-align: center; padding: 22px 6px 8px; }
.pro-hero .crown { font-size: 42px; }
.pro-hero h1 { font-size: 27px; color: var(--ink); font-weight: 800; margin: 10px 0; }
.pro-hero .price { font-size: 30px; font-weight: 800; color: var(--ink); }
.pro-hero .price span { font-size: 15px; color: var(--muted); font-weight: 500; }
.benefit { display: flex; align-items: center; gap: 12px; padding: 13px 16px; margin-bottom: 8px; }
.benefit .b-ico {
  width: 34px; height: 34px; border-radius: 10px;
  background: #f8fafc; border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center; flex: none;
  font-size: 16px;
}
.benefit b { color: var(--ink); font-size: 14.5px; }
.benefit p { color: var(--muted); font-size: 12.5px; margin-top: 1px; }
.qr-box { text-align: center; padding: 22px 0 6px; }
.qr-box canvas, .qr-box img { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; background: #fff; }
.qr-tip { font-size: 13px; color: var(--muted); margin-top: 12px; }
.pro-status { text-align: center; }
.pro-status .big { font-size: 46px; margin: 12px 0; }

/* ---------- PRO 三档方案（与小程序 pages/pro 一致） ---------- */
.benefit-card {
  background: #F5F7FA; border-radius: 14px;
  padding: 16px 18px; margin-bottom: 20px;
}
.benefit-row {
  display: flex; align-items: center; gap: 12px;
  padding: 7px 0; font-size: 14px; color: var(--ink);
}
.benefit-row.excluded { color: #B4BAC6; }
.b-check {
  width: 21px; height: 21px; border-radius: 50%; flex: none;
  background: #34C759; color: #fff; font-size: 12px;
  display: flex; align-items: center; justify-content: center;
}
.b-check.b-check-no { background: #F4573B; }

/* 「选择方案」上方的气泡提醒（支付后未回跳指引） */
.plan-hint {
  position: relative; width: fit-content; max-width: 100%;
  margin: 0 2px 14px; padding: 8px 12px;
  background: #FFF7E6; border: 1px solid #FCD34D; border-radius: 10px;
  font-size: 12.5px; font-weight: 600; color: #8A4B00; line-height: 1.5;
}
.plan-hint::after {
  content: ''; position: absolute; left: 18px; bottom: -6px;
  width: 10px; height: 10px; background: #FFF7E6;
  border-right: 1px solid #FCD34D; border-bottom: 1px solid #FCD34D;
  transform: rotate(45deg);
}
.plan-section-title {
  font-size: 16px; font-weight: 800; color: var(--ink);
  margin: 0 2px 12px;
}
.plan-list { margin-bottom: 14px; }
.plan-item {
  background: #F5F7FA; border-radius: 14px;
  padding: 15px 16px; margin-bottom: 10px;
  display: flex; align-items: center; justify-content: space-between;
  border: 2px solid transparent; cursor: pointer;
}
.plan-item.selected { background: #EAF4FC; border-color: #2F86D6; }
.plan-item.lifetime { background: #FBF3DC; }
.plan-item.lifetime.selected { background: #EAF4FC; }
.plan-left { flex: 1; min-width: 0; }
.plan-name-row { display: flex; align-items: center; }
.plan-name { font-size: 16px; font-weight: 800; color: var(--ink); }
.plan-badge {
  background: #F5A623; color: #fff;
  font-size: 11px; font-weight: 700;
  padding: 2px 7px; border-radius: 5px; margin-left: 8px;
}
.plan-sub { font-size: 12px; color: #9AA3B2; margin-top: 5px; }
.plan-right { text-align: right; flex-shrink: 0; margin-left: 12px; }
.plan-price { font-size: 17px; font-weight: 800; color: var(--ink); }
.plan-note {
  font-size: 12px; color: #8A94A6; line-height: 1.5;
  margin: 0 2px 14px;
}

/* ---------- 博客 ---------- */
.blog-item { display: block; padding: 18px; margin-bottom: 10px; transition: box-shadow 0.15s ease; }
.blog-item:hover { box-shadow: 0 6px 18px rgba(15, 23, 42, 0.07); }
.blog-item h2 { font-size: 17px; color: var(--ink); font-weight: 800; }
.blog-item time { display: block; font-size: 12.5px; color: var(--faint); margin-top: 6px; }

/* 文章正文 */
.article { max-width: 760px; margin: 0 auto; padding-bottom: 50px; }
.article .back-link { padding: 16px 0; }
.prose {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px 24px; box-shadow: var(--shadow);
  color: var(--body); font-size: 15.5px; line-height: 1.85;
}
.prose h1 { font-size: 26px; color: var(--ink); font-weight: 800; line-height: 1.3; margin-bottom: 10px; }
.prose .article-date { color: var(--faint); font-size: 13px; margin-bottom: 20px; }
.prose h2 { font-size: 19px; color: var(--ink); font-weight: 700; margin: 26px 0 10px; }
.prose p { margin: 12px 0; }
.prose ul { margin: 12px 0; padding-left: 4px; }
.prose ul li { position: relative; padding-left: 20px; margin: 8px 0; }
.prose ul li::before {
  content: ''; position: absolute; left: 4px; top: 12px;
  width: 6px; height: 6px; border-radius: 50%; background: var(--line-strong);
}
.prose table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 14px; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--line); padding: 9px 12px; text-align: left; }
.prose th { background: #f8fafc; font-weight: 700; color: var(--ink); }
.prose a { color: var(--blue); }
.prose a.btn-table {
  display: inline-block; background: var(--ink); color: #fff;
  padding: 10px 18px; border-radius: 10px; font-weight: 700; margin: 8px 0;
}
.prose strong { color: var(--ink); }

/* ---------- 页脚 ---------- */
.foot {
  margin-top: 30px; padding: 22px 4px 6px;
  text-align: center; color: var(--faint); font-size: 12.5px; line-height: 2;
}
.foot a { color: var(--muted); }
.foot .foot-links { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; margin: 8px 0; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 34px; transform: translateX(-50%) translateY(20px);
  background: rgba(15, 23, 42, 0.92); color: #fff;
  padding: 11px 20px; border-radius: 999px;
  font-size: 13.5px; z-index: 200; opacity: 0; pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  max-width: 88%; text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- 设置弹层 ---------- */
.sheet .opt-row { display: flex; align-items: center; justify-content: space-between; padding: 13px 0; border-bottom: 1px solid var(--line); }
.sheet .opt-row:last-child { border-bottom: none; }
.sheet .opt-row label { font-size: 14px; font-weight: 600; color: var(--text); }
.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 10px; overflow: hidden; }
.seg button { padding: 7px 12px; font-size: 13px; font-weight:600; color: var(--muted); background: #fff; }
.seg button.on { background: var(--ink); color: #fff; }
/* 选项较多（数字 / 金额上限 6 档）：换行排列，标签单独一行 */
.sheet .opt-row.col { flex-direction: column; align-items: flex-start; gap: 10px; }
.seg.wrap { flex-wrap: wrap; }
.seg.wrap button { flex: 0 0 auto; }

.hidden { display: none !important; }
