/* ============================================================
   CET-4 工作台 · 设计系统
   移动优先 · iOS Safari + Windows Chrome/Edge 双端
   令牌：Zinc 中性 + 翡翠绿唯一强调色 · 卡片16px/按钮pill/输入12px
   ============================================================ */

/* ---------- 设计令牌 ---------- */
:root {
  --bg: #f6f6f7;
  --surface: #ffffff;
  --surface-2: #efeff2;
  --surface-3: #e9e9ee;
  --text: #1b1b1f;
  --text-2: #50505a;
  --text-3: #85858f;
  --line: #e5e5ea;
  --line-2: #d9d9e0;

  --accent: #059669;
  --accent-strong: #047857;
  --accent-soft: rgba(5, 150, 105, 0.10);
  --accent-soft-2: rgba(5, 150, 105, 0.16);
  --on-accent: #ffffff;

  --ok: #16a34a;
  --warn: #d97706;
  --warn-soft: rgba(217, 119, 6, 0.12);
  --danger: #dc2626;
  --danger-soft: rgba(220, 38, 38, 0.10);

  --shadow-1: 0 1px 2px rgba(23, 23, 28, 0.05), 0 4px 16px rgba(23, 23, 28, 0.05);
  --shadow-2: 0 4px 12px rgba(23, 23, 28, 0.08), 0 12px 40px rgba(23, 23, 28, 0.10);
  --shadow-pop: 0 8px 24px rgba(23, 23, 28, 0.14), 0 24px 64px rgba(23, 23, 28, 0.18);

  --r-card: 16px;
  --r-input: 12px;
  --r-chip: 10px;

  --tabbar-h: 58px;
  --topbar-h: 56px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC",
          "Segoe UI", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

html[data-theme="dark"] {
  --bg: #0c0c0e;
  --surface: #161619;
  --surface-2: #1e1e23;
  --surface-3: #26262d;
  --text: #ededf0;
  --text-2: #a6a6b0;
  --text-3: #71717c;
  --line: #26262c;
  --line-2: #303039;

  --accent: #34d399;
  --accent-strong: #6ee7b7;
  --accent-soft: rgba(52, 211, 153, 0.12);
  --accent-soft-2: rgba(52, 211, 153, 0.18);
  --on-accent: #06281c;

  --ok: #4ade80;
  --warn: #fbbf24;
  --warn-soft: rgba(251, 191, 36, 0.14);
  --danger: #f87171;
  --danger-soft: rgba(248, 113, 113, 0.14);

  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4), 0 4px 16px rgba(0, 0, 0, 0.35);
  --shadow-2: 0 4px 12px rgba(0, 0, 0, 0.45), 0 12px 40px rgba(0, 0, 0, 0.5);
  --shadow-pop: 0 8px 24px rgba(0, 0, 0, 0.5), 0 24px 64px rgba(0, 0, 0, 0.6);
}

/* ---------- 基础 ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}
button { font-family: inherit; color: inherit; background: none; border: 0; cursor: pointer; touch-action: manipulation; }
input, textarea, select { font-family: inherit; font-size: 16px; color: var(--text); touch-action: manipulation; }
a { color: var(--accent-strong); text-decoration: none; }
.num { font-variant-numeric: tabular-nums; }
svg { display: block; }
[hidden] { display: none !important; }

::selection { background: var(--accent-soft-2); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* 滚动条（Windows 桌面） */
@media (pointer: fine) {
  ::-webkit-scrollbar { width: 10px; height: 10px; }
  ::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 8px; border: 2px solid var(--bg); }
  ::-webkit-scrollbar-thumb:hover { background: var(--text-3); }
}

/* 减少动态效果 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ---------- 应用骨架 ---------- */
.app { display: flex; min-height: 100vh; min-height: 100dvh; }
.main { flex: 1; display: flex; flex-direction: column; min-width: 0; padding-top: var(--safe-t); }

/* 顶栏 */
.topbar {
  position: sticky; top: 0; z-index: 40;
  height: calc(var(--topbar-h) + var(--safe-t));
  display: flex; align-items: flex-end;
  padding: 0 16px;
  padding-left: max(16px, env(safe-area-inset-left));
  padding-right: max(16px, env(safe-area-inset-right));
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--line);
}
.topbar > * { height: var(--topbar-h); display: flex; align-items: center; }
.topbar-left { gap: 10px; min-width: 0; }
.topbar-title { font-weight: 700; font-size: 17px; letter-spacing: -0.01em; white-space: nowrap; }
.topbar-right { gap: 10px; justify-content: flex-end; }

.brand-mark {
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(135deg, var(--accent) 0%, color-mix(in srgb, var(--accent) 62%, #0ea5e9) 100%);
  color: var(--on-accent);
  display: grid; place-items: center;
  font-weight: 800; font-size: 17px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
  flex: none;
}
.brand-mark.sm { width: 30px; height: 30px; font-size: 15px; border-radius: 9px; }

.countdown-chip {
  display: flex; align-items: center; gap: 5px;
  padding: 5px 12px 5px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 13px;
  border: 1px solid var(--accent-soft-2);
  cursor: pointer;
  height: auto !important;
}
.countdown-chip svg { width: 15px; height: 15px; }
.countdown-chip b { font-size: 15px; font-weight: 800; }

.icon-btn {
  width: 38px; height: 38px; border-radius: 999px;
  display: grid; place-items: center;
  color: var(--text-2);
  transition: background 0.15s var(--ease-out), transform 0.1s var(--ease-out);
  flex: none;
}
.icon-btn:hover { background: var(--surface-2); }
.icon-btn:active { transform: scale(0.92); }
.icon-btn svg { width: 20px; height: 20px; }

/* 内容区 */
.view {
  flex: 1;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 18px 16px calc(var(--tabbar-h) + var(--safe-b) + 28px);
  -webkit-overflow-scrolling: touch;
}

/* ---------- 底部 Tab ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  backdrop-filter: saturate(180%) blur(18px);
  border-top: 1px solid var(--line);
  padding-bottom: var(--safe-b);
}
.tabbar-inner { display: flex; max-width: 560px; margin: 0 auto; height: var(--tabbar-h); }
.tab-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--text-3); font-size: 10.5px; font-weight: 600;
  transition: color 0.15s var(--ease-out);
  position: relative;
}
.tab-item svg { width: 23px; height: 23px; transition: transform 0.2s var(--ease-out); }
.tab-item:active svg { transform: scale(0.88); }
.tab-item.active { color: var(--accent); }

/* ---------- 桌面侧边栏 ---------- */
.sidebar { display: none; }
@media (min-width: 1024px) {
  .app { flex-direction: row; }
  .sidebar {
    display: flex; flex-direction: column;
    width: 232px; flex: none;
    padding: 20px 12px 16px;
    border-right: 1px solid var(--line);
    background: var(--surface);
    position: sticky; top: 0;
    height: 100vh; height: 100dvh;
  }
  .tabbar { display: none; }
  .topbar { display: none; } /* 桌面端信息由侧边栏承担，避免标题孤悬错位 */
  .view { max-width: 780px; padding-top: 34px; }
  .sidebar-brand { display: flex; align-items: center; gap: 10px; padding: 0 8px 18px; }
  .brand-mark { width: 38px; height: 38px; font-size: 19px; border-radius: 11px; }
  .brand-text { display: flex; flex-direction: column; line-height: 1.3; }
  .brand-text strong { font-size: 15px; letter-spacing: -0.01em; }
  .brand-text span { font-size: 12px; color: var(--text-3); }
  .sidebar-nav { flex: 1; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
  .side-item {
    display: flex; align-items: center; gap: 11px;
    padding: 9px 12px; border-radius: var(--r-input);
    color: var(--text-2); font-size: 14px; font-weight: 600;
    transition: background 0.15s var(--ease-out), color 0.15s var(--ease-out);
  }
  .side-item svg { width: 20px; height: 20px; flex: none; }
  .side-item:hover { background: var(--surface-2); color: var(--text); }
  .side-item.active { background: var(--accent-soft); color: var(--accent-strong); }
  .sidebar-foot { display: flex; align-items: center; gap: 8px; padding: 10px 8px 0; border-top: 1px solid var(--line); }
  .foot-note { font-size: 12px; color: var(--text-3); }
  .topbar .brand-mark.sm { display: none; }
}

/* ---------- 通用组件 ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 18px;
  box-shadow: var(--shadow-1);
}
.card + .card, .card + .section, .section + .card, .section + .section { margin-top: 14px; }

.section-title {
  display: flex; align-items: baseline; justify-content: space-between;
  margin: 22px 2px 10px;
}
.section-title:first-child { margin-top: 0; }
.section-title h2 { font-size: 16px; font-weight: 700; letter-spacing: -0.01em; }
.section-title .more-link { font-size: 13px; color: var(--accent-strong); font-weight: 600; display: flex; align-items: center; gap: 2px; }
.section-title .more-link svg { width: 14px; height: 14px; }

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  border-radius: 999px;
  padding: 11px 20px;
  font-size: 15px; font-weight: 700;
  transition: transform 0.12s var(--ease-out), background 0.15s var(--ease-out), opacity 0.15s;
  -webkit-user-select: none; user-select: none;
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; }
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-strong); }
html[data-theme="dark"] .btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { background: var(--surface-2); color: var(--text); }
.btn-ghost:hover { background: var(--surface-3); }
.btn-outline { border: 1.5px solid var(--line-2); color: var(--text-2); background: transparent; }
.btn-outline:hover { border-color: var(--text-3); color: var(--text); }
.btn-danger { background: var(--danger-soft); color: var(--danger); }
.btn-block { width: 100%; }
.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn:disabled { opacity: 0.45; pointer-events: none; }

/* 徽章 / 标签 */
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600;
  background: var(--surface-2); color: var(--text-2);
  white-space: nowrap;
}
.chip-accent { background: var(--accent-soft); color: var(--accent-strong); }
.chip-warn { background: var(--warn-soft); color: var(--warn); }
.chip-danger { background: var(--danger-soft); color: var(--danger); }

/* 表单 */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.input, textarea.input {
  width: 100%;
  background: var(--surface);
  border: 1.5px solid var(--line-2);
  border-radius: var(--r-input);
  padding: 11px 14px;
  font-size: 16px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea.input { resize: vertical; min-height: 96px; line-height: 1.65; }

/* 进度条（细线型） */
.bar { height: 4px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 999px; background: var(--accent); width: 0; }

/* Toast */
.toast-wrap {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(var(--tabbar-h) + var(--safe-b) + 20px);
  z-index: 90; display: flex; flex-direction: column; gap: 8px; align-items: center;
  pointer-events: none; width: max-content; max-width: 88vw;
}
@media (min-width: 1024px) { .toast-wrap { bottom: 28px; } }
.toast {
  background: var(--text); color: var(--bg);
  padding: 10px 18px; border-radius: 999px;
  font-size: 14px; font-weight: 600;
  box-shadow: var(--shadow-2);
  max-width: 88vw; text-align: center;
}

/* ---------- 「更多」抽屉 ---------- */
.sheet-mask {
  position: fixed; inset: 0; z-index: 70;
  background: rgba(10, 10, 14, 0.45);
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
}
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 71;
  background: var(--surface);
  border-radius: 20px 20px 0 0;
  padding: 10px 18px calc(18px + var(--safe-b));
  box-shadow: var(--shadow-pop);
}
.sheet-handle { width: 38px; height: 4px; border-radius: 999px; background: var(--line-2); margin: 4px auto 14px; }
.sheet-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.sheet-item {
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  padding: 13px 4px; border-radius: 14px;
  font-size: 12.5px; font-weight: 600; color: var(--text-2);
  transition: background 0.15s;
}
.sheet-item:active { background: var(--surface-2); }
.sheet-item .ic {
  width: 44px; height: 44px; border-radius: 14px;
  display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent-strong);
}
.sheet-item .ic svg { width: 22px; height: 22px; }

/* ---------- 查词弹层 ---------- */
.dict-pop {
  position: fixed; z-index: 80;
  width: min(320px, 86vw);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-pop);
  padding: 14px 16px;
}
.dict-pop .dict-word { display: flex; align-items: center; gap: 8px; font-size: 18px; font-weight: 700; }
.dict-pop .dict-word .ipa { font-size: 13px; color: var(--text-3); font-weight: 400; }
.dict-pop .dict-pos { font-size: 13px; color: var(--accent-strong); font-weight: 700; margin-top: 2px; }
.dict-pop .dict-mean { font-size: 14.5px; color: var(--text-2); margin-top: 2px; line-height: 1.55; }
.dict-pop .dict-actions { display: flex; gap: 8px; margin-top: 10px; }

/* ---------- 今日页 ---------- */
.hero-card {
  position: relative; overflow: hidden;
  background: linear-gradient(140deg, var(--accent) 0%, color-mix(in srgb, var(--accent) 55%, #0f766e) 100%);
  border-radius: 20px;
  color: #ffffff;
  padding: 22px 20px 20px;
  box-shadow: 0 8px 28px var(--accent-soft-2);
}
html[data-theme="dark"] .hero-card { box-shadow: none; }
.hero-card::after {
  content: ""; position: absolute; right: -46px; top: -46px;
  width: 170px; height: 170px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.10);
  pointer-events: none;
}
.hero-date { font-size: 13px; font-weight: 600; opacity: 0.85; }
.hero-count { display: flex; align-items: baseline; gap: 8px; margin-top: 2px; }
.hero-count b { font-size: 52px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.hero-count span { font-size: 15px; font-weight: 600; opacity: 0.9; }
.hero-sub { font-size: 13px; opacity: 0.85; margin-top: 2px; }
.hero-streak {
  position: absolute; top: 20px; right: 18px;
  display: flex; align-items: center; gap: 5px;
  background: rgba(255, 255, 255, 0.16);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  border-radius: 999px; padding: 5px 12px;
  font-size: 13px; font-weight: 700;
}
.hero-streak svg { width: 15px; height: 15px; }

.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 14px; }
.stat-cell { text-align: center; }
.ring-wrap { position: relative; width: 56px; height: 56px; margin: 0 auto; }
.ring-wrap svg { width: 56px; height: 56px; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: var(--surface-3); stroke-width: 5; }
.ring-fg { fill: none; stroke: var(--accent); stroke-width: 5; stroke-linecap: round; }
.ring-label { position: absolute; inset: 0; display: grid; place-items: center; font-size: 12px; font-weight: 800; color: var(--text); font-variant-numeric: tabular-nums; }
.stat-cell p { font-size: 11.5px; color: var(--text-3); font-weight: 600; margin-top: 5px; }

/* 任务清单 */
.task-item {
  display: flex; align-items: center; gap: 13px;
  padding: 13px 4px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  width: 100%; text-align: left;
}
.task-item:last-child { border-bottom: 0; }
.task-check {
  width: 24px; height: 24px; border-radius: 999px; flex: none;
  border: 2px solid var(--line-2);
  display: grid; place-items: center;
  color: transparent;
  transition: all 0.18s var(--ease-out);
}
.task-check svg { width: 13px; height: 13px; stroke-width: 3; }
.task-item.done .task-check { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.task-body { flex: 1; min-width: 0; }
.task-body h3 { font-size: 15px; font-weight: 650; }
.task-body p { font-size: 12.5px; color: var(--text-3); margin-top: 1px; }
.task-item.done .task-body h3 { color: var(--text-3); text-decoration: line-through; text-decoration-color: var(--line-2); }
.task-go { color: var(--text-3); flex: none; }
.task-go svg { width: 18px; height: 18px; }

/* ---------- 单词模块 ---------- */
.mode-tabs { display: flex; gap: 6px; background: var(--surface-2); border-radius: 999px; padding: 4px; margin-bottom: 16px; }
.mode-tab {
  flex: 1; text-align: center; padding: 8px 4px;
  border-radius: 999px; font-size: 13.5px; font-weight: 650; color: var(--text-2);
  transition: all 0.18s var(--ease-out);
}
.mode-tab.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-1); }

.word-card { text-align: center; padding: 34px 22px 26px; position: relative; }
.word-unit-chip { position: absolute; top: 14px; left: 14px; }
.word-speak { position: absolute; top: 10px; right: 10px; }
.word-main { font-size: 38px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; }
.word-ipa { color: var(--text-3); font-size: 15px; margin-top: 4px; }
.word-tap-hint { font-size: 12px; color: var(--text-3); margin-top: 22px; }
.word-detail { margin-top: 18px; text-align: left; }
.word-detail .wp { font-size: 14px; color: var(--text-2); margin-bottom: 10px; }
.word-detail .wp b { color: var(--accent-strong); margin-right: 8px; font-weight: 700; }
.word-example {
  background: var(--surface-2); border-radius: 12px;
  padding: 13px 15px; font-size: 14.5px; line-height: 1.7;
}
.word-example .ex-en b { color: var(--accent-strong); font-weight: 700; }
.word-example .ex-cn { color: var(--text-3); font-size: 13px; margin-top: 4px; }

.word-actions { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 9px; margin-top: 14px; }
.rate-btn {
  padding: 13px 6px; border-radius: 14px;
  font-size: 14px; font-weight: 700;
  border: 1.5px solid var(--line-2);
  color: var(--text-2);
  transition: all 0.15s var(--ease-out);
}
.rate-btn:active { transform: scale(0.95); }
.rate-btn.no:hover, .rate-btn.no.on { border-color: var(--danger); color: var(--danger); background: var(--danger-soft); }
.rate-btn.fuzzy:hover, .rate-btn.fuzzy.on { border-color: var(--warn); color: var(--warn); background: var(--warn-soft); }
.rate-btn.yes:hover, .rate-btn.yes.on { border-color: var(--accent); color: var(--accent-strong); background: var(--accent-soft); }

.word-progress-line { display: flex; align-items: center; gap: 10px; margin: 0 2px 12px; font-size: 12.5px; color: var(--text-3); font-weight: 600; }
.word-progress-line .bar { flex: 1; }

/* 测验 */
.quiz-opt {
  display: flex; align-items: center; gap: 12px;
  width: 100%; text-align: left;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px; margin-top: 10px;
  font-size: 15px; font-weight: 600;
  background: var(--surface);
  transition: border-color 0.15s, background 0.15s;
}
.quiz-opt .opt-letter {
  width: 26px; height: 26px; border-radius: 8px; flex: none;
  background: var(--surface-2); color: var(--text-2);
  display: grid; place-items: center; font-size: 13px; font-weight: 700;
}
.quiz-opt .opt-text { flex: 1; min-width: 0; line-height: 1.55; }
.quiz-opt:hover { border-color: var(--line-2); background: var(--surface-2); }
.quiz-opt.correct { border-color: var(--ok); background: var(--accent-soft); }
.quiz-opt.correct .opt-letter { background: var(--ok); color: #ffffff; }
.quiz-opt.wrong { border-color: var(--danger); background: var(--danger-soft); }
.quiz-opt.wrong .opt-letter { background: var(--danger); color: #ffffff; }

/* ---------- 阅读 ---------- */
.reading-head { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 12px; }
.passage { font-size: 15.5px; line-height: 1.85; color: var(--text); }
.passage p { margin-bottom: 14px; }
.passage p.p-num::before { content: attr(data-pn); display: inline-block; font-weight: 800; color: var(--accent-strong); margin-right: 10px; font-size: 13px; }
.passage .blank {
  display: inline-block; min-width: 64px;
  border-bottom: 2px solid var(--accent);
  color: var(--accent-strong); font-weight: 700;
  text-align: center; padding: 0 4px;
}
.passage w { cursor: pointer; border-bottom: 1px dashed transparent; transition: border-color 0.12s; }
.passage w:hover { border-bottom-color: var(--accent); }
.bank-options { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 6px; }
.bank-opt {
  border: 1.5px solid var(--line); border-radius: var(--r-input);
  padding: 9px 11px; font-size: 13.5px; font-weight: 600;
  background: var(--surface); text-align: left;
  transition: all 0.12s;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.bank-opt.used { opacity: 0.35; }
.bank-opt.picked { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-strong); }
.bank-opt b { color: var(--accent-strong); margin-right: 6px; }

.q-item { padding: 15px 0; border-bottom: 1px solid var(--line); }
.q-item:last-child { border-bottom: 0; }
.q-stem { font-size: 15px; font-weight: 650; line-height: 1.6; }
.q-stem .q-no { color: var(--accent-strong); margin-right: 6px; }
.q-opts { margin-top: 9px; }
.q-explain {
  margin-top: 10px; padding: 12px 14px;
  background: var(--surface-2); border-radius: 12px;
  font-size: 13.5px; color: var(--text-2); line-height: 1.7;
}
.q-explain b { color: var(--accent-strong); }
.para-trans { border-left: 3px solid var(--accent-soft-2); padding: 2px 0 2px 12px; margin: -6px 0 14px; font-size: 13.5px; color: var(--text-3); line-height: 1.7; }

/* ---------- 听力 ---------- */
.listen-player { display: flex; align-items: center; gap: 14px; padding: 16px; }
.play-btn {
  width: 52px; height: 52px; border-radius: 999px; flex: none;
  background: var(--accent); color: var(--on-accent);
  display: grid; place-items: center;
  transition: transform 0.12s var(--ease-out);
}
.play-btn:active { transform: scale(0.92); }
.play-btn svg { width: 22px; height: 22px; }
.player-meta { flex: 1; min-width: 0; }
.player-meta h3 { font-size: 15px; font-weight: 700; }
.player-meta p { font-size: 12.5px; color: var(--text-3); }
.speed-pill { display: flex; background: var(--surface-2); border-radius: 999px; padding: 3px; }
.speed-pill button { padding: 5px 11px; border-radius: 999px; font-size: 12px; font-weight: 700; color: var(--text-3); }
.speed-pill button.on { background: var(--surface); color: var(--accent-strong); box-shadow: var(--shadow-1); }
.sent-row { display: flex; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line); align-items: flex-start; }
.sent-row:last-child { border-bottom: 0; }
.sent-idx { font-size: 12px; color: var(--text-3); font-weight: 700; padding-top: 3px; width: 20px; flex: none; text-align: center; }
.sent-body { flex: 1; min-width: 0; font-size: 14.5px; line-height: 1.7; }
.sent-cn { font-size: 13px; color: var(--text-3); margin-top: 2px; }
.sent-speak { color: var(--text-3); flex: none; padding: 4px; }
.sent-speak svg { width: 16px; height: 16px; }
.sent-speak:active { color: var(--accent-strong); }

.dictation-input {
  width: 100%; border: none; border-bottom: 2px solid var(--line-2);
  background: transparent; padding: 6px 2px; font-size: 15px;
}
.dictation-input:focus { outline: none; border-bottom-color: var(--accent); }
.check-line { margin: 2px 0 0; font-size: 12.5px; font-weight: 650; }
.check-line.ok { color: var(--ok); }
.check-line.no { color: var(--danger); }

/* ---------- 写作 / 翻译 ---------- */
.tpl-block {
  background: var(--surface-2); border-radius: 14px;
  padding: 15px 16px; font-size: 14.5px; line-height: 1.85;
  white-space: pre-wrap;
}
.tpl-block b { color: var(--accent-strong); }
.key-phrase { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.key-phrase:last-child { border-bottom: 0; }
.key-phrase .kp-en { font-weight: 650; flex: 1; min-width: 0; }
.key-phrase .kp-cn { color: var(--text-3); font-size: 13px; }
.cn-src { font-size: 16px; line-height: 2; }
.cn-src p { margin-bottom: 10px; text-indent: 2em; }

/* ---------- 预测页 ---------- */
.fore-block { border-left: 3px solid var(--accent); padding-left: 14px; margin-bottom: 16px; }
.fore-block h3 { font-size: 15px; font-weight: 700; }
.fore-block p { font-size: 13.5px; color: var(--text-2); margin-top: 3px; line-height: 1.65; }
.fore-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 8px; }

/* ---------- 进度统计 ---------- */
.heat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(13px, 1fr)); gap: 4px; }
.heat-cell { aspect-ratio: 1; border-radius: 4px; background: var(--surface-3); }
.heat-cell.lv1 { background: var(--accent-soft-2); }
.heat-cell.lv2 { background: color-mix(in srgb, var(--accent) 45%, var(--surface-3)); }
.heat-cell.lv3 { background: var(--accent); }
.heat-cell.today { outline: 2px solid var(--accent-strong); outline-offset: 1px; }
.stat-big-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat-big { text-align: center; padding: 14px 4px; }
.stat-big b { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; display: block; }
.stat-big span { font-size: 12px; color: var(--text-3); font-weight: 600; }
.wrong-row { display: flex; align-items: center; gap: 10px; padding: 11px 2px; border-bottom: 1px solid var(--line); font-size: 14px; }
.wrong-row:last-child { border-bottom: 0; }
.wrong-row .wr-meta { flex: 1; min-width: 0; }
.wrong-row .wr-meta p { font-size: 12px; color: var(--text-3); }
.wrong-row .ans { font-weight: 800; color: var(--danger); font-size: 13px; flex: none; }

/* ---------- 空状态 ---------- */
.empty { text-align: center; padding: 44px 20px; color: var(--text-3); }
.empty svg { width: 44px; height: 44px; margin: 0 auto 12px; opacity: 0.5; }
.empty h3 { font-size: 15px; color: var(--text-2); font-weight: 700; }
.empty p { font-size: 13px; margin-top: 4px; }

/* ---------- 列表页 ---------- */
.pick-list { display: flex; flex-direction: column; gap: 9px; }
.pick-item {
  display: flex; align-items: center; gap: 13px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-card); padding: 15px 16px;
  box-shadow: var(--shadow-1);
  transition: transform 0.12s var(--ease-out), border-color 0.15s;
  text-align: left; width: 100%;
}
.pick-item:active { transform: scale(0.985); }
@media (hover: hover) { .pick-item:hover { border-color: var(--accent); } }
.pick-ic {
  width: 42px; height: 42px; border-radius: 13px; flex: none;
  background: var(--accent-soft); color: var(--accent-strong);
  display: grid; place-items: center; font-weight: 800; font-size: 14px;
}
.pick-ic svg { width: 21px; height: 21px; }
.pick-body { flex: 1; min-width: 0; }
.pick-body h3 { font-size: 15px; font-weight: 700; }
.pick-body p { font-size: 12.5px; color: var(--text-3); margin-top: 1px; }
.pick-meta { display: flex; align-items: center; gap: 8px; flex: none; }
.pick-done { width: 22px; height: 22px; border-radius: 999px; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; flex: none; }
.pick-done svg { width: 12px; height: 12px; stroke-width: 3; }

/* 结果条 */
.result-banner {
  display: flex; align-items: center; gap: 12px;
  border-radius: var(--r-card); padding: 14px 16px; margin: 14px 0;
  background: var(--accent-soft); color: var(--accent-strong);
  font-weight: 700; font-size: 15px;
}
.result-banner svg { width: 22px; height: 22px; flex: none; }
.result-banner.bad { background: var(--warn-soft); color: var(--warn); }

/* 工具条 */
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.toolbar .tb-title { font-size: 15px; font-weight: 700; }
.toolbar .tb-title p { font-size: 12px; color: var(--text-3); font-weight: 500; }

@media (min-width: 1440px) {
  .view { max-width: 820px; }
}

/* ---------- 听力：真题精听 ---------- */
.voice-tip {
  display: flex; gap: 10px; align-items: flex-start;
  background: var(--accent-soft);
  border: 1px solid var(--accent-soft-2);
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 14px;
}
.voice-tip svg { width: 18px; height: 18px; flex: none; color: var(--accent-strong); margin-top: 2px; }
.voice-tip p { font-size: 12.5px; color: var(--text-2); line-height: 1.7; }
.voice-tip b { color: var(--accent-strong); }

.real-card { padding: 15px 16px; }
.real-head { display: flex; align-items: center; gap: 10px; }
.real-title { flex: 1; min-width: 0; }
.real-title h3 { font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.real-title p { font-size: 12px; color: var(--text-3); margin-top: 1px; }
.step-row { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 12px; }
.step-chip {
  display: flex; align-items: center; gap: 6px;
  padding: 9px 11px; border-radius: var(--r-input);
  border: 1.5px solid var(--line); background: var(--surface);
  font-size: 13px; font-weight: 600; color: var(--text-3);
  transition: all 0.15s var(--ease-out);
}
.step-chip svg { width: 14px; height: 14px; flex: none; opacity: 0; }
.step-chip.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-strong); }
.step-chip.on svg { opacity: 1; }
.step-chip:active { transform: scale(0.97); }

.audio-name { font-size: 13.5px; font-weight: 650; margin: 12px 0 8px; word-break: break-all; }
.audio-ctl { display: flex; align-items: center; gap: 9px; margin-top: 10px; flex-wrap: wrap; }
.ab-status { font-size: 12.5px; color: var(--text-3); margin-top: 10px; line-height: 1.6; }
#audioZone audio { margin-top: 4px; border-radius: 10px; }

/* 音频库条目：窄屏时按钮换行右对齐 */
.pick-item[data-lib] { flex-wrap: wrap; }
.pick-item[data-lib] .pick-body { flex: 1 1 calc(100% - 120px); }
.pick-item[data-lib] .pick-meta { width: 100%; justify-content: flex-end; margin-top: 9px; }

/* ---------- 听力模考 ---------- */
.mock-player { position: sticky; top: calc(var(--topbar-h) + 8px); z-index: 30; box-shadow: var(--shadow-2); }
.mock-player input[type="range"] { -webkit-appearance: none; appearance: none; height: 5px; border-radius: 999px; background: var(--surface-3); outline: none; }
.mock-player input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 16px; height: 16px; border-radius: 999px; background: var(--accent); border: 2px solid var(--surface); box-shadow: var(--shadow-1); cursor: pointer; }
.exam-nav { display: grid; grid-template-columns: repeat(9, 1fr); gap: 5px; margin: 14px 0; }
.nav-q {
  aspect-ratio: 1; border-radius: 8px; border: 1.5px solid var(--line);
  background: var(--surface); color: var(--text-3);
  font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums;
  display: grid; place-items: center; transition: all 0.12s;
}
.nav-q.done { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-strong); }
.submit-bar {
  position: sticky; bottom: calc(var(--tabbar-h) + var(--safe-b) + 8px); z-index: 30;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border: 1px solid var(--line); border-radius: 16px;
  padding: 10px 14px; margin: 16px 0 4px;
  box-shadow: var(--shadow-2);
}
@media (min-width: 1024px) { .submit-bar { bottom: 16px; } }

/* ---------- 布局密度优化 ---------- */
.voice-tip { padding: 10px 13px; }
.voice-tip p { font-size: 12px; line-height: 1.65; }
.pick-item[data-lib] { padding: 13px 14px; }
.pick-item[data-lib] .pick-ic { width: 36px; height: 36px; border-radius: 11px; }
.pick-item[data-lib] .pick-meta { margin-top: 6px; }
.pick-item[data-lib] .pick-body h3 { font-size: 14.5px; }
.mock-player { padding: 14px 16px; }
