/* ═══════════════════════════════════════════════════════
   考研题库 · 「纸墨学术」设计系统
   概念：自习室的书卷气——宣纸底、墨色字、朱砂印章、
        靛青批注、苔绿正误、描金会员。
   响应式：手机 <768px 单列+底部导航 ·
          平板 ≥768px 900px 容器 ·
          PC ≥1024px 墨色侧栏 + 双栏内容
   ═══════════════════════════════════════════════════════ */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

:root {
  /* 墨 */
  --ink: #26221B;
  --ink-2: #5B5342;
  --ink-3: #97907B;
  /* 纸 */
  --paper: #F4EFE4;
  --paper-2: #FBF8F0;
  --paper-3: #EDE7D7;
  /* 五色 */
  --seal: #B23A2A;        /* 朱砂 */
  --seal-deep: #8F2E20;
  --seal-soft: #F4E0D8;
  --indigo: #2F5A7D;      /* 靛青 */
  --indigo-deep: #234964;
  --indigo-soft: #E1E9EE;
  --moss: #587551;        /* 苔绿 */
  --moss-soft: #E7EDDD;
  --ochre: #A2732B;       /* 赭石 */
  --ochre-soft: #F3E9D4;
  --gold: #96762F;        /* 描金 */
  --gold-soft: #EFE5CB;

  /* 语义别名（组件沿用） */
  --brand: #2F5A7D;
  --brand-deep: #234964;
  --brand-soft: #E1E9EE;
  --brand-grad: linear-gradient(135deg, #35618A, #234964);
  --bg: #F4EFE4;
  --card: #FBF8F0;
  --text: #26221B;
  --text-sub: #5B5342;
  --line: #E4DECB;
  --line-2: #D5CDB4;
  --red: #B23A2A;
  --green: #587551;
  --orange: #A2732B;
  --blue: #2F5A7D;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(84, 72, 44, .06), 0 4px 12px rgba(84, 72, 44, .07);

  /* 字体：标题用宋体书卷气，正文黑体保可读 */
  --serif: "Noto Serif SC", "Source Han Serif SC", "STSongti-SC", "SimSun", Georgia, serif;
  --song: "Noto Serif SC", "Source Han Serif SC", "STSongti-SC", "SimSun", Georgia, serif; /* 标题宋体别名 */
  --sans: -apple-system, "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Segoe UI", sans-serif;
}

html, body { height: 100%; }
body {
  font-family: var(--sans);
  background: #EDE8DA;
  color: var(--text);
  font-size: 15px;
  line-height: 1.55;
}

/* 宣纸纹理（极淡噪点 + 角落晕染） */
#app::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(150, 118, 47, .05), transparent 60%),
    radial-gradient(900px 420px at -10% 110%, rgba(47, 90, 125, .05), transparent 60%);
}

#app {
  max-width: 520px;
  height: 100vh;
  height: 100dvh;
  margin: 0 auto;
  background: var(--bg);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 40px rgba(64, 56, 38, .12);
}

/* ───────── 视图切换 ───────── */
.view { display: none; flex: 1; flex-direction: column; min-height: 0; overflow: hidden; position: relative; z-index: 1; }
.view.active { display: flex; animation: fadein .22s ease; }
@keyframes fadein { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.page-scroll { flex: 1; overflow-y: auto; padding: 18px 16px 90px; scrollbar-width: none; }
.page-scroll::-webkit-scrollbar { display: none; }
.quiz-scroll { padding-top: 13px; }

/* ───────── 顶部 ───────── */
.home-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.hello { font-family: var(--serif); font-size: 22px; font-weight: 900; letter-spacing: 1px; }
.date-sub { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }

.countdown-pill {
  background: var(--seal); color: #FBF6EA; border-radius: 12px; padding: 8px 14px; text-align: center;
  box-shadow: 0 4px 12px rgba(178, 58, 42, .28);
}
.cd-num { font-family: var(--serif); font-size: 22px; font-weight: 900; font-variant-numeric: tabular-nums; }
.cd-text { font-size: 12px; font-weight: 600; margin-left: 1px; }
.cd-label { display: block; font-size: 10px; opacity: .85; margin-top: -2px; }

.sub-header {
  display: flex; align-items: center; padding: 14px 16px;
  background: var(--card); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 5;
}
.sub-title { flex: 1; text-align: center; font-family: var(--serif); font-size: 16.5px; font-weight: 700; letter-spacing: 2px; }
.back { font-size: 24px; color: var(--ink-3); width: 30px; cursor: pointer; line-height: 1; }
.header-right { width: 30px; }

/* ───────── 通用卡片 ───────── */
.card { background: var(--card); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); margin-bottom: 12px; border: 1px solid var(--line); }

.row-card { display: flex; align-items: center; justify-content: space-between; cursor: pointer; }
.row-card-left { display: flex; align-items: center; gap: 12px; }
.row-icon { width: 42px; height: 42px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 20px; }
.icon-red { background: var(--seal-soft); }
.row-title { font-size: 15px; font-weight: 600; }
.row-title b { color: var(--brand-deep); }
.row-sub { font-size: 12px; color: var(--ink-3); margin-top: 1px; }
.arrow { color: var(--line-2); font-size: 20px; font-weight: 300; }

/* 数据摘要条 */
.stat-strip { display: flex; background: var(--card); border-radius: var(--radius); padding: 14px 0; box-shadow: var(--shadow); margin-bottom: 14px; border: 1px solid var(--line); }
.stat-cell { flex: 1; text-align: center; border-right: 1px solid var(--line); }
.stat-cell:last-child { border-right: none; }
.stat-num { font-family: var(--serif); font-size: 23px; font-weight: 900; color: var(--text); font-variant-numeric: tabular-nums; }
.stat-num span { font-size: 12px; font-weight: 600; color: var(--ink-3); margin-left: 1px; }
.stat-label { font-size: 11.5px; color: var(--ink-3); margin-top: 1px; }

/* 板块进度（标题带朱砂批注线） */
.sec-card { padding: 14px 16px; }
.sec-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.sec-title { font-family: var(--serif); font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 7px; letter-spacing: 1px; }
.sec-title::before { content: ''; width: 3px; height: 14px; background: var(--seal); border-radius: 2px; flex-shrink: 0; }
.sec-sub { font-size: 11.5px; color: var(--ink-3); }
.sec-link { font-size: 12.5px; color: var(--indigo); cursor: pointer; }

.hp-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; }
.hp-name { width: 42px; font-size: 13px; font-weight: 600; }
.hp-bar { flex: 1; height: 7px; background: var(--paper-3); border-radius: 4px; overflow: hidden; }
.hp-bar i { display: block; height: 100%; border-radius: 4px; }
.hp-num { width: 52px; text-align: right; font-size: 11.5px; color: var(--ink-3); }

/* VIP 横幅（墨底描金） */
.vip-banner {
  background: var(--ink); border: 1px solid rgba(150, 118, 47, .45); border-radius: 12px;
  padding: 13px 16px; color: #D9C489; font-size: 13.5px;
  display: flex; justify-content: space-between; align-items: center; cursor: pointer;
  margin-top: 2px;
}
.vip-banner b { color: #E8D5A2; font-size: 15px; font-family: var(--serif); }
.vip-go { font-size: 12.5px; color: #A98F55; }

/* ───────── 刷题中心（科目 × 模式） ───────── */
.ps-card { background: var(--card); border-radius: var(--radius); padding: 12px 14px; box-shadow: var(--shadow); margin-bottom: 12px; border: 1px solid var(--line); }
.ps-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.ps-name { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; }
.ps-ic { width: 26px; height: 26px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 14px; }
.ps-code { font-style: normal; font-size: 10.5px; font-weight: 600; color: var(--ink-3); background: var(--paper-3); padding: 1.5px 8px; border-radius: 999px; }
.ps-bar { height: 6px; background: var(--paper-3); border-radius: 3px; overflow: hidden; }
.ps-bar i { display: block; height: 100%; border-radius: 3px; }
.ps-nums { font-size: 11.5px; color: var(--ink-3); margin-top: 6px; }
.ps-nums b { color: var(--text); }
.ps-building { background: var(--card); border: 1px dashed var(--line-2); border-radius: var(--radius); padding: 14px; text-align: center; font-size: 12.5px; color: var(--ink-3); margin-bottom: 12px; }
.ps-continue {
  margin-top: 10px; width: 100%; display: flex; align-items: center; justify-content: center; gap: 7px;
  background: var(--brand-grad); color: #F5F9FC; border: none; border-radius: 10px;
  padding: 10.5px 0; font-size: 13.5px; font-weight: 700; cursor: pointer; font-family: var(--sans);
  box-shadow: 0 4px 12px rgba(47, 90, 125, .3);
}
.ps-continue:active { transform: scale(.98); }
.ps-play { font-size: 11px; }

/* 功能宫格 2x2 */
.pm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.pm-cell {
  background: var(--card); border-radius: 10px; padding: 9px 12px;
  display: flex; flex-direction: column; align-items: flex-start; gap: 1px;
  cursor: pointer; box-shadow: var(--shadow); border: 1.5px solid var(--line);
  position: relative; transition: transform .15s, border-color .15s;
}
.pm-cell:active { transform: scale(.97); }
.pm-cell.on { border-color: var(--indigo); background: linear-gradient(160deg, #EEF3F6, #FBF8F0); }
.pm-name { font-size: 12.5px; font-weight: 700; }
.pm-badge { font-size: 10px; color: var(--ink-3); }
.pm-vip {
  position: absolute; top: 8px; right: 9px;
  background: var(--gold); color: #FBF6EA;
  font-size: 9px; font-weight: 800; padding: 1.5px 6px; border-radius: 999px;
}

/* 模式内容面板 */
.mode-pane { display: none; }
.mode-pane.on { display: block; animation: fadein .2s ease; }

/* 章节练习：快速开始卡 */
.qs-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.qs-card { background: var(--card); border-radius: 12px; padding: 12px 14px; display: flex; align-items: center; gap: 10px; cursor: pointer; box-shadow: var(--shadow); border: 1px solid var(--line); }
.qs-card:active { transform: scale(.98); }
.qs-icon { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 15px; flex-shrink: 0; }
.qi-order { background: var(--indigo-soft); } .qi-rand { background: var(--ochre-soft); }
.qs-info b { display: block; font-size: 13.5px; font-weight: 700; }
.qs-info span { font-size: 11px; color: var(--ink-3); }

.ch-group { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 10px; overflow: hidden; border: 1px solid var(--line); }
.ch-head { display: flex; align-items: center; padding: 14px 16px; cursor: pointer; }
.ch-dot { width: 10px; height: 10px; border-radius: 3px; margin-right: 10px; }
.ch-name { flex: 1; font-size: 15px; font-weight: 600; }
.ch-prog { font-size: 12px; color: var(--ink-3); }
.ch-prog b { color: var(--text); }
.ch-caret { margin-left: 10px; color: var(--line-2); transition: transform .2s; font-size: 12px; }
.ch-group.open .ch-caret { transform: rotate(90deg); }
.ch-bar { height: 4px; background: var(--paper-3); margin: 0 16px 12px; border-radius: 2px; overflow: hidden; }
.ch-bar i { display: block; height: 100%; border-radius: 2px; }
.ch-subs { display: none; border-top: 1px solid var(--line); }
.ch-group.open .ch-subs { display: block; animation: fadein .2s ease; }
.ch-sub-row { display: flex; justify-content: space-between; align-items: center; padding: 11px 16px 11px 36px; cursor: pointer; }
.ch-sub-row:active { background: var(--paper); }
.ch-sub-name { font-size: 14px; }
.ch-sub-num { font-size: 12px; color: var(--ink-3); }
.ch-sub-row .arrow { font-size: 17px; }

/* ───────── 刷题页 ───────── */
.quiz-header {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px;
  background: var(--card); border-bottom: 1px solid var(--line);
}
.quiz-progress { flex: 1; height: 6px; background: var(--paper-3); border-radius: 3px; overflow: hidden; }
.quiz-progress i { display: block; height: 100%; width: 30%; background: var(--indigo); border-radius: 3px; transition: width .3s; }
.quiz-count { font-size: 12.5px; font-weight: 700; color: var(--brand-deep); font-variant-numeric: tabular-nums; }
.quiz-timer { font-size: 12.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }

.quiz-meta { display: flex; gap: 6px; margin-bottom: 10px; flex-wrap: wrap; }
.q-tag { font-size: 11px; padding: 2.5px 9px; border-radius: 4px; font-weight: 600; }
.t-chap { background: var(--indigo-soft); color: var(--indigo-deep); }
.t-type { background: var(--ochre-soft); color: var(--ochre); }
.t-src { background: var(--moss-soft); color: var(--moss); }
.t-multi { background: var(--seal-soft); color: var(--seal); }
.t-fill { background: var(--indigo-soft); color: var(--indigo); }
.t-solve { background: var(--gold-soft); color: var(--gold); }
.t-diff { background: var(--ochre-soft); color: var(--ochre); letter-spacing: 1.5px; font-size: 10.5px; }

/* ── 数学题：填空 / 解答 / 答案卡 / 自评 ── */
.fill-input {
  width: 100%; padding: 10px 12px; border: 1.5px solid var(--line-2); border-radius: 10px;
  font-size: 13.5px; margin-top: 6px; background: var(--paper-2); outline: none; font-family: inherit; color: var(--text);
}
.fill-input:focus { border-color: var(--indigo); background: #fff; }
.solve-hint { background: var(--ochre-soft); color: var(--ochre); border-radius: 9px; padding: 8px 11px; font-size: 12px; margin-top: 6px; line-height: 1.55; }
.ans-key { background: var(--moss-soft); border: 1px solid #CFDCC2; border-radius: 10px; padding: 9px 12px; margin-bottom: 10px; }
.ans-key-label { font-size: 10.5px; color: var(--moss); font-weight: 700; }
.ans-key-val { font-size: 15.5px; font-weight: 800; color: #37492F; margin-top: 2px; overflow-x: auto; }
.ans-mine { font-size: 11.5px; color: #4A6142; margin-top: 5px; padding-top: 5px; border-top: 1px dashed #CFDCC2; }
.self-eval { background: var(--card); border-radius: 10px; padding: 10px 12px; box-shadow: var(--shadow); margin-bottom: 10px; border: 1px solid var(--line); }
.se-btns { display: flex; gap: 8px; margin-top: 8px; }
.se-btn {
  flex: 1; padding: 8px 0; border-radius: 8px; border: 1.5px solid var(--line-2);
  background: var(--paper); font-size: 12.5px; font-weight: 700; cursor: pointer; font-family: inherit; color: var(--ink-2);
}
.se-btn.se-ok.on { background: var(--moss-soft); border-color: var(--moss); color: var(--moss); }
.se-btn.se-no.on { background: var(--seal-soft); border-color: var(--seal); color: var(--seal); }
/* 数学公式：保持大尺寸渲染但行内混排，不独占一行 */
.katex-display {
  display: inline-block !important;
  max-width: 100%;
  margin: 0 !important;
  padding: 2px 0;
  text-align: initial;
  vertical-align: middle;
  overflow-x: auto; overflow-y: hidden;
}
.katex-display > .katex { display: inline-block; text-align: initial; white-space: nowrap; }
.q-stem, .opt-text, .ai-p, .ans-key-val { overflow-wrap: break-word; }

.q-stem { font-size: 15.5px; font-weight: 600; line-height: 1.6; margin-bottom: 13px; }

.opt {
  display: flex; align-items: flex-start; gap: 10px; background: var(--card);
  border: 1.5px solid var(--line); border-radius: 10px; padding: 11px 12px;
  margin-bottom: 8px; cursor: pointer; transition: all .15s;
}
.opt:active { transform: scale(.985); }
.opt .opt-key {
  width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--line-2);
  display: flex; align-items: center; justify-content: center;
  font-size: 12.5px; font-weight: 700; color: var(--ink-3); flex-shrink: 0;
}
.opt .opt-text { font-size: 14.5px; padding-top: 1px; line-height: 1.55; }

.opt.selected { border-color: var(--indigo); background: #F0F4F6; }
.opt.selected .opt-key { border-color: var(--indigo); background: var(--indigo); color: #fff; }

.opt.correct { border-color: var(--moss); background: var(--moss-soft); }
.opt.correct .opt-key { border-color: var(--moss); background: var(--moss); color: #fff; }
.opt.wrong { border-color: var(--seal); background: var(--seal-soft); }
.opt.wrong .opt-key { border-color: var(--seal); background: var(--seal); color: #fff; }
.opt.correct .opt-text::after { content: ' ✓'; color: var(--moss); font-weight: 800; }
.opt.wrong .opt-text::after { content: ' ✗'; color: var(--seal); font-weight: 800; }
.opt.disabled { pointer-events: none; }

/* AI 解析卡（中式批注竖线） */
.ai-card { background: var(--card); border-radius: 12px; margin-top: 12px; box-shadow: var(--shadow); overflow: hidden; animation: fadein .3s ease; border: 1px solid var(--line); }
.ai-head { display: flex; align-items: center; gap: 7px; padding: 9px 13px; background: var(--paper); border-bottom: 1px solid var(--line); }
.ai-badge { background: var(--indigo); color: #F5F9FC; font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 999px; letter-spacing: 1px; }
.ai-head-title { font-size: 12.5px; font-weight: 700; }
.ai-sec { padding: 9px 13px; border-bottom: 1px dashed var(--line); }
.ai-sec:last-child { border-bottom: none; }
.ai-sec-title { display: flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; margin-bottom: 3px; }
.ai-sec-title i { font-style: normal; width: 3.5px; height: 12px; border-radius: 2px; display: inline-block; }
.ai-locate .ai-sec-title { color: var(--indigo-deep); } .ai-locate i { background: var(--indigo); }
.ai-good .ai-sec-title { color: var(--moss); } .ai-good i { background: var(--moss); }
.ai-trap .ai-sec-title { color: var(--seal); } .ai-trap i { background: var(--seal); }
.ai-p { font-size: 13px; color: #3E382C; line-height: 1.62; }
.ai-trap-item { margin-bottom: 6px; }
.ai-trap-item:last-child { margin-bottom: 0; }
.ai-trap-key { display: inline-flex; width: 18px; height: 18px; border-radius: 5px; background: var(--seal-soft); color: var(--seal); font-size: 11px; font-weight: 800; align-items: center; justify-content: center; margin-right: 5px; vertical-align: -3px; }
.trap-type-tag { display: inline-block; background: var(--ochre-soft); color: var(--ochre); font-size: 10.5px; font-weight: 700; padding: 1.5px 9px; border-radius: 999px; margin-top: 3px; }

/* 错因标记 */
.reason-row { margin-top: 10px; background: var(--card); border-radius: 10px; padding: 10px 12px; box-shadow: var(--shadow); border: 1px solid var(--line); }
.reason-title { font-size: 12px; color: var(--ink-3); margin-bottom: 7px; }
.reason-title b { color: var(--text); }
.reason-chips { display: flex; gap: 7px; }
.reason-chip { flex: 1; text-align: center; border: 1.5px solid var(--line-2); border-radius: 8px; padding: 6px 0; font-size: 12.5px; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.reason-chip.on { border-color: var(--indigo); color: var(--indigo-deep); background: var(--indigo-soft); }

/* 答题操作 */
.quiz-actions { margin-top: 12px; display: flex; gap: 9px; }
.btn-confirm {
  flex: 1; background: var(--brand-grad); color: #F5F9FC; border: none; border-radius: 10px;
  padding: 11px 0; font-size: 14.5px; font-weight: 700; cursor: pointer; font-family: var(--sans);
  box-shadow: 0 5px 14px rgba(47, 90, 125, .28);
}
.btn-confirm:disabled { background: var(--line-2); box-shadow: none; }
.btn-next {
  flex: 1; background: var(--card); color: var(--indigo-deep); border: 1.5px solid var(--indigo);
  border-radius: 10px; padding: 11px 0; font-size: 14.5px; font-weight: 700; cursor: pointer; font-family: var(--sans);
}

/* ───────── 错题本 ───────── */
.wrong-tabs { display: flex; background: var(--paper-3); border-radius: 10px; padding: 3px; margin-bottom: 14px; }
.wrong-tab { flex: 1; border: none; background: transparent; border-radius: 8px; padding: 8px 0; font-size: 13.5px; font-weight: 600; color: var(--ink-3); cursor: pointer; font-family: var(--sans); }
.wrong-tab.active { background: var(--card); color: var(--text); box-shadow: 0 1px 4px rgba(64,56,38,.12); }
.tab-badge { background: var(--seal-soft); color: var(--seal); font-size: 10.5px; font-weight: 700; padding: 1px 7px; border-radius: 999px; margin-left: 3px; }
.tab-badge.gray { background: var(--line); color: var(--ink-3); }

.wrong-card { background: var(--card); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); margin-bottom: 10px; cursor: pointer; border: 1px solid var(--line); border-left: 3px solid var(--seal); }

/* 错题本总览：科目单行紧凑列表 */
.wov-row {
  display: flex; align-items: center; gap: 9px; background: var(--card);
  border-radius: 12px; padding: 10px 13px; box-shadow: var(--shadow);
  margin-bottom: 8px; cursor: pointer; transition: transform .12s; border: 1px solid var(--line);
}
.wov-row:active { transform: scale(.98); }
.wov-ic { width: 31px; height: 31px; border-radius: 9px; display: flex; align-items: center; justify-content: center; font-size: 15px; flex-shrink: 0; }
.wov-name { flex: 1; font-size: 13.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wov-num { font-size: 11px; color: var(--ink-3); flex-shrink: 0; }
.wov-today { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--line); color: var(--ink-3); flex-shrink: 0; }
.wov-today.has { background: var(--seal-soft); color: var(--seal); }

/* 错题本科目详情：统计条 */
.ws-statbar { display: flex; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px 0; margin-bottom: 12px; border: 1px solid var(--line); }
.ws-cell { flex: 1; text-align: center; }
.ws-cell + .ws-cell { border-left: 1px solid var(--line); }
.ws-cell b { display: block; font-size: 16px; font-weight: 800; font-variant-numeric: tabular-nums; }
.ws-cell b.c-red { color: var(--seal); }
.ws-cell span { font-size: 10.5px; color: var(--ink-3); }
.wrong-stem {
  font-size: 14.5px; font-weight: 600; line-height: 1.6; margin-bottom: 10px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.wrong-tags { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.w-tag { font-size: 11px; padding: 2.5px 9px; border-radius: 4px; font-weight: 600; }
.wt-chap { background: var(--indigo-soft); color: var(--indigo-deep); }
.wt-type { background: var(--paper-3); color: var(--ink-2); }
.wt-count { background: var(--seal-soft); color: var(--seal); }
.wt-reason { padding: 2.5px 9px; border-radius: 4px; font-size: 11px; font-weight: 700; }
.wr-bhy { background: var(--seal-soft); color: var(--seal); }   /* 不会 */
.wr-mh { background: var(--ochre-soft); color: var(--ochre); }    /* 马虎 */
.wr-jc { background: var(--indigo-soft); color: var(--indigo); }  /* 记错 */
.wt-due { margin-left: auto; font-size: 11px; color: var(--ink-3); }

/* 错题卡片操作行（hover 显示，触屏常显） */
.wc-acts { display: flex; justify-content: flex-end; gap: 8px; margin-top: 9px; opacity: 0; transition: opacity .15s; }
.wrong-card:hover .wc-acts, .wrong-card:focus-within .wc-acts { opacity: 1; }
@media (hover: none) { .wc-acts { opacity: 1; } }
.wc-act { border: 1px solid var(--line); background: var(--paper); border-radius: 8px; padding: 3.5px 12px; font-size: 11.5px; font-weight: 700; color: var(--ink-2); cursor: pointer; font-family: var(--sans); }
.wc-act:hover { border-color: var(--seal); color: var(--seal); background: var(--seal-soft); }

/* 已毕业错题: 苔绿左边线 + 题干灰显 */
.wrong-card.wc-done { border-left-color: var(--moss); }
.wrong-card.wc-done .wrong-stem { color: var(--ink-3); font-weight: 500; }
.wrong-card.wc-done .wt-due { color: var(--moss); font-weight: 800; }
.wrong-card.wc-done .wc-act:hover { border-color: var(--moss); color: var(--moss); background: var(--moss-soft, rgba(106,138,79,.12)); }

/* 全部错题 tab 底部「已毕业」分区头 */
.ws-done-head {
  display: flex; align-items: baseline; gap: 8px; margin: 18px 2px 10px;
  font-size: 13px; font-weight: 800; color: var(--moss);
}
.ws-done-head span { font-size: 11px; font-weight: 500; color: var(--ink-3); }
.ws-done-head::before { content: '✓'; font-size: 12px; }

/* ───────── 数据中心 ───────── */
.big-stat-card {
  background: var(--brand-grad); border-radius: 16px; padding: 20px;
  color: #F5F9FC; display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 12px; box-shadow: 0 8px 22px rgba(47, 90, 125, .3);
}
.bs-num { font-family: var(--serif); font-size: 38px; font-weight: 900; line-height: 1; font-variant-numeric: tabular-nums; }
.bs-num span { font-size: 16px; font-weight: 600; opacity: .85; }
.bs-label { font-size: 12.5px; opacity: .85; margin-top: 6px; letter-spacing: 1px; }
.bs-trend { font-size: 12.5px; background: rgba(251, 246, 234, .16); padding: 5px 12px; border-radius: 999px; font-weight: 600; }

.duo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.duo-card { margin-bottom: 0; text-align: center; padding: 16px 10px; }
.duo-num { font-family: var(--serif); font-size: 24px; font-weight: 900; font-variant-numeric: tabular-nums; }
.duo-num.g { color: var(--moss); } .duo-num.r { color: var(--seal); }
.duo-label { font-size: 12.5px; color: var(--ink-3); margin-top: 3px; }
.duo-sub { font-size: 11px; color: var(--seal); margin-top: 5px; }
.tip { font-style: normal; background: var(--ochre-soft); color: var(--ochre); font-size: 10px; font-weight: 800; width: 14px; height: 14px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; vertical-align: 2px; margin-left: 3px; }

.bar-chart { display: flex; align-items: flex-end; justify-content: space-between; height: 110px; padding-top: 6px; }
.bar-col { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 11%; }
.bar-block { width: 100%; border-radius: 5px 5px 2px 2px; background: linear-gradient(180deg, #4A7396, #2F5A7D); min-height: 8px; }
.bar-col:last-child .bar-block { background: linear-gradient(180deg, #C55A45, #B23A2A); }
.bar-label { font-size: 10.5px; color: var(--ink-3); }
.bar-val { font-size: 10.5px; color: var(--text); font-weight: 700; font-variant-numeric: tabular-nums; }

.mastery-rows .m-row { display: flex; align-items: center; gap: 10px; padding: 6.5px 0; }
.m-name { width: 46px; font-size: 13px; font-weight: 600; }
.m-bar { flex: 1; height: 8px; background: var(--paper-3); border-radius: 4px; overflow: hidden; }
.m-bar i { display: block; height: 100%; border-radius: 4px; }
.m-val { width: 30px; text-align: right; font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.lv-red { background: #B23A2A; } .lv-orange { background: #A2732B; } .lv-blue { background: #3E6E93; } .lv-green { background: #587551; }
.lv-r { background: #B23A2A; } .lv-o { background: #A2732B; } .lv-b { background: #3E6E93; } .lv-g { background: #587551; }
.m-val.r { color: var(--seal); } .m-val.o { color: var(--ochre); } .m-val.b { color: #3E6E93; } .m-val.g { color: var(--moss); }

.legend-row { display: flex; gap: 14px; margin-top: 12px; font-size: 11px; color: var(--ink-3); }
.legend-row span { display: flex; align-items: center; gap: 4px; }
.dot { width: 8px; height: 8px; border-radius: 3px; display: inline-block; }

/* ───────── 定位测报告 ───────── */
.score-hero {
  background: var(--brand-grad); border-radius: 16px;
  padding: 24px 20px; text-align: center; color: #F5F9FC; margin-bottom: 12px;
  box-shadow: 0 8px 22px rgba(47, 90, 125, .3);
}
.score-label { font-size: 13px; opacity: .85; letter-spacing: 2px; }
.score-num { font-family: var(--serif); font-size: 44px; font-weight: 900; margin: 6px 0 4px; font-variant-numeric: tabular-nums; }
.score-num span { font-size: 18px; font-weight: 600; opacity: .85; }
.score-target { font-size: 12.5px; opacity: .9; }
.score-target b { font-size: 15px; }

.weak-list .weak-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 0; font-size: 14px;
  border-bottom: 1px dashed var(--line);
}
.weak-list .weak-item:last-child { border-bottom: none; }
.weak-rank { width: 20px; height: 20px; border-radius: 6px; background: var(--paper-3); color: var(--ink-3); font-size: 11.5px; font-weight: 800; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.weak-item span.weak-val { margin-left: auto; font-weight: 700; }
.weak-val.r { color: var(--seal); } .weak-val.o { color: var(--ochre); }

.path-card .path-step { position: relative; padding: 0 0 12px 0; padding-left: 14px; font-size: 13.5px; color: #3E382C; }
.path-card .path-step b { color: var(--indigo-deep); margin-right: 6px; }
.path-card .path-step:not(:last-child)::before {
  content: ''; position: absolute; left: 4px; top: 4px; bottom: -6px; width: 2px;
  background: var(--line-2); border-radius: 1px;
}
.path-card .path-step::after {
  content: ''; position: absolute; left: 0; top: 5px; width: 10px; height: 10px;
  border-radius: 50%; background: var(--indigo); border: 2px solid var(--indigo-soft);
}

/* ───────── 真题模考 ───────── */
.vip-chip { background: var(--gold); color: #FBF6EA; font-size: 11px; font-weight: 800; padding: 3px 11px; border-radius: 4px; }

.paper-card { background: var(--card); border-radius: var(--radius); padding: 15px 16px; box-shadow: var(--shadow); margin-bottom: 10px; display: flex; align-items: center; justify-content: space-between; border: 1px solid var(--line); }
.paper-year { width: 46px; height: 46px; border-radius: 10px; background: var(--brand-grad); color: #F5F9FC; display: flex; flex-direction: column; align-items: center; justify-content: center; flex-shrink: 0; }
.paper-year b { font-family: var(--serif); font-size: 15px; font-weight: 900; line-height: 1; }
.paper-year span { font-size: 9px; opacity: .85; margin-top: 2px; letter-spacing: 1px; }
.paper-info { flex: 1; margin: 0 12px; }
.paper-title { font-size: 14.5px; font-weight: 600; }
.paper-meta { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.paper-score { font-size: 12.5px; color: var(--ink-3); text-align: center; }
.paper-score b { display: block; font-size: 17px; color: var(--text); font-variant-numeric: tabular-nums; }
.paper-btn {
  background: var(--brand-grad); color: #F5F9FC; border: none; border-radius: 999px;
  padding: 7px 16px; font-size: 12.5px; font-weight: 700; cursor: pointer; white-space: nowrap; font-family: var(--sans);
}

/* ───────── 智能组卷配置 ───────── */
.spc-card { background: var(--card); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); margin-bottom: 12px; border: 1px solid var(--line); }
.spc-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.spc-title { font-size: 15px; font-weight: 700; }
.spc-sub { font-size: 12px; color: var(--ink-3); margin-bottom: 14px; }
.spc-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; }
.spc-label { width: 34px; font-size: 12.5px; color: var(--ink-3); font-weight: 600; flex-shrink: 0; }
.spc-fixed { font-size: 13px; font-weight: 600; }
.spc-chips { display: flex; gap: 7px; flex: 1; }
.spc-chips .sp {
  flex: 1; text-align: center; font-size: 12px; font-weight: 600; color: var(--ink-2);
  background: var(--paper); border: 1.5px solid var(--line-2); border-radius: 999px;
  padding: 6px 0; cursor: pointer;
}
.spc-chips .sp.on { background: var(--brand-grad); color: #F5F9FC; border-color: transparent; box-shadow: 0 3px 8px rgba(47, 90, 125, .25); }
.spc-note { font-size: 11.5px; color: var(--ink-3); background: var(--paper); border-radius: 10px; padding: 9px 12px; margin: 8px 0 12px; }

/* ───────── 错题强化 ───────── */
.wd-hero { background: var(--card); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); margin-bottom: 12px; border: 1px solid var(--line); }
.wd-stats { display: flex; margin-bottom: 12px; }
.wd-cell { flex: 1; text-align: center; }
.wd-cell b { display: block; font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; }
.wd-cell span { font-size: 10.5px; color: var(--ink-3); }
.wd-more { text-align: center; font-size: 12px; color: var(--indigo); padding: 11px 0 2px; cursor: pointer; font-weight: 600; }

/* ───────── 会员（描金） ───────── */
.vip-hero { text-align: center; padding: 22px 0 16px; }
.vip-hero-title { font-family: var(--serif); font-size: 21px; font-weight: 900; background: linear-gradient(135deg, #B08D3E, #7A6127); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; letter-spacing: 2px; }
.vip-hero-sub { font-size: 12.5px; color: var(--ink-3); margin-top: 5px; }

.plan-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.plan-card { background: var(--card); border-radius: 14px; padding: 15px 8px; text-align: center; border: 2px solid var(--line); cursor: pointer; position: relative; box-shadow: var(--shadow); }
.plan-card.sel { border-color: var(--gold); background: #FDFAF1; }
.plan-tag { position: absolute; top: -9px; left: 50%; transform: translateX(-50%); background: var(--seal); color: #FBF6EA; font-size: 10px; font-weight: 800; padding: 2px 10px; border-radius: 4px; white-space: nowrap; }
.plan-name { font-size: 13.5px; font-weight: 700; }
.plan-price { font-family: var(--serif); font-size: 22px; font-weight: 900; color: var(--text); margin-top: 5px; font-variant-numeric: tabular-nums; }
.plan-price::before { content: '¥'; font-size: 13px; font-weight: 600; }
.plan-old { font-size: 10.5px; color: var(--ink-3); text-decoration: line-through; margin-top: -2px; }
.plan-days { font-size: 10.5px; color: var(--ink-3); margin-top: 5px; }

.benefit-card .cmp-row { display: grid; grid-template-columns: 1.5fr .7fr .7fr; padding: 8.5px 0; font-size: 13px; border-bottom: 1px dashed var(--line); align-items: center; }
.cmp-row:last-child { border-bottom: none; }
.cmp-row.head { font-size: 11.5px; color: var(--ink-3); font-weight: 600; }
.cmp-row.head span:last-child { color: var(--gold); }
.cmp-row span:not(:first-child) { text-align: center; color: var(--ink-3); }
.cmp-row .hl { color: var(--gold); font-weight: 700; }

/* ───────── 我的 ───────── */
.me-card { background: linear-gradient(150deg, #234964 0%, #2F5A7D 55%, #3E6E93 100%); border-radius: 16px; padding: 18px; color: #F5F9FC; margin-bottom: 12px; box-shadow: 0 8px 22px rgba(47, 90, 125, .32); }
.me-top { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.avatar { width: 52px; height: 52px; border-radius: 50%; background: rgba(251, 246, 234, .18); display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 800; font-family: var(--serif); border: 2px solid rgba(251, 246, 234, .4); }
.me-name { font-family: var(--serif); font-size: 18px; font-weight: 700; letter-spacing: 1px; }
.vip-tag { font-size: 10.5px; background: rgba(251, 246, 234, .14); border: 1px solid rgba(217, 196, 137, .5); color: #E8D5A2; padding: 2px 9px; border-radius: 4px; margin-left: 6px; font-weight: 600; vertical-align: 2px; }
.me-phone { font-size: 12.5px; opacity: .8; margin-top: 3px; }
.me-grid { display: flex; background: rgba(251, 246, 234, .1); border-radius: 12px; padding: 12px 0; }
.me-cell { flex: 1; text-align: center; }
.me-cell b { font-family: var(--serif); font-size: 18px; font-weight: 900; display: block; font-variant-numeric: tabular-nums; }
.me-cell span { font-size: 11px; opacity: .8; }

.target-card .gap-bar { height: 8px; background: var(--paper-3); border-radius: 4px; overflow: hidden; margin: 4px 0 6px; }
.target-card .gap-bar i { display: block; height: 100%; width: 61%; background: linear-gradient(90deg, #35618A, #234964); border-radius: 4px; }
.gap-nums { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--ink-3); }
.gap-nums span:nth-child(2) { color: var(--indigo-deep); font-weight: 700; }

.menu-list { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; border: 1px solid var(--line); }
.menu-item { display: flex; align-items: center; gap: 12px; padding: 14.5px 16px; border-bottom: 1px solid var(--line); font-size: 14.5px; cursor: pointer; }
.menu-item:last-child { border-bottom: none; }
.menu-item:active { background: var(--paper); }
.mi-icon { font-size: 17px; }
.menu-item .arrow { margin-left: auto; }

/* ───────── 底部导航 ───────── */
.tabbar {
  position: absolute; bottom: 0; left: 0; right: 0; z-index: 20;
  display: flex; background: rgba(251, 248, 240, .96); backdrop-filter: blur(12px);
  border-top: 1px solid var(--line); padding: 6px 0 max(8px, env(safe-area-inset-bottom));
}
.tab { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 1px; font-size: 10.5px; color: var(--ink-3); cursor: pointer; font-weight: 500; }
.tab-icon { font-size: 21px; line-height: 1.15; filter: grayscale(1) opacity(.55); transition: filter .15s; }
.tab.active { color: var(--seal); font-weight: 700; }
.tab.active .tab-icon { filter: none; transform: scale(1.06); }

/* ───────── 按钮 / Toast ───────── */
.btn-primary {
  width: 100%; background: var(--brand-grad); color: #F5F9FC; border: none; border-radius: 11px;
  padding: 13.5px 0; font-size: 15.5px; font-weight: 700; cursor: pointer; margin-top: 6px; font-family: var(--sans);
  box-shadow: 0 6px 16px rgba(47, 90, 125, .3);
}
#toast {
  position: absolute; left: 50%; bottom: 110px; transform: translateX(-50%) translateY(8px);
  background: rgba(38, 34, 27, .92); color: #F5F1E6; padding: 9px 20px; border-radius: 999px;
  font-size: 13px; opacity: 0; pointer-events: none; transition: all .25s; z-index: 50; white-space: nowrap;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ═══════════════════ 响应式适配 ═══════════════════ */

/* ── PC 侧边导航（仅 ≥1024px 显示） ── */
.sidebar { display: none; }

/* ───────── 平板（≥768px） ───────── */
@media (min-width: 768px) {
  #app { max-width: 900px; margin: 0; border-radius: 0; height: 100vh; height: 100dvh; }
  .page-scroll { padding: 24px 28px 104px; }
  .pm-grid { grid-template-columns: repeat(4, 1fr); gap: 10px; }
  .hs-subj-list { display: grid; grid-template-columns: 1fr 1fr; gap: 9px 20px; }
  #wrong-overview { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 10px; }
  .subj-tabs { flex-wrap: wrap; overflow: visible; }
  .quick-cell { padding: 14px 18px; }
}

/* ───────── PC（≥1024px）墨色书脊侧栏 ───────── */
@media (min-width: 1024px) {
  body { background: var(--paper); }
  #app { max-width: none; margin: 0; border-radius: 0; height: 100vh; flex-direction: row; box-shadow: none; }
  .tabbar { display: none; }

  /* 侧栏：深墨书脊 */
  .sidebar {
    display: flex; flex-direction: column; width: 236px; flex-shrink: 0;
    background: var(--ink); border-right: 1px solid #3A342A; padding: 26px 16px 20px;
  }
  .snav-logo { display: flex; align-items: center; gap: 10px; font-family: var(--serif); font-size: 19px; font-weight: 900; padding: 0 12px 24px; color: #EFE9D8; letter-spacing: 2px; }
  .snav-seal {
    width: 30px; height: 30px; border-radius: 6px; background: var(--seal);
    color: #FBF6EA; font-size: 16px; font-weight: 900; display: flex; align-items: center; justify-content: center;
    box-shadow: 0 2px 6px rgba(178, 58, 42, .4); flex-shrink: 0;
  }
  .snav-logo i { font-style: normal; }
  .snav-item {
    display: flex; align-items: center; gap: 12px; padding: 11.5px 14px; border-radius: 9px;
    font-size: 14.5px; font-weight: 600; color: #B5AD97; cursor: pointer;
    margin-bottom: 3px; transition: all .15s;
  }
  .snav-item:hover { background: #332D22; color: #EFE9D8; }
  .snav-item.active { background: var(--seal); color: #FBF6EA; box-shadow: 0 4px 12px rgba(178, 58, 42, .35); }
  .snav-ic { font-size: 17px; width: 22px; text-align: center; }
  .snav-foot { margin-top: auto; }
  .snav-vip { background: #332D22; border: 1px solid rgba(150, 118, 47, .45); border-radius: 12px; padding: 13px 14px; color: #C9BB96; cursor: pointer; }
  .snav-vip span { font-size: 11px; display: block; }
  .snav-vip b { font-family: var(--serif); font-size: 13.5px; color: #E8D5A2; display: block; margin-top: 2px; }

  /* 内容区：居中限宽，边距对齐 */
  .page-scroll { padding: 30px 40px 56px; }
  .page-scroll > * { max-width: 900px; margin-left: auto; margin-right: auto; }
  #view-onboard .page-scroll > * { max-width: 600px; }
  #view-me .page-scroll > * { max-width: 720px; }

  /* 首页：双栏布局（主列 + 右侧栏） */
  .pc-only { display: block !important; }
  .pc-streak.pc-only { display: flex !important; }
  #view-home .page-scroll {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    grid-template-areas:
      "target quick"
      "stats   quick"
      "chart   streak"
      "chart   vip";
    gap: 14px 16px;
    align-content: start;
    max-width: 1080px; margin-left: auto; margin-right: auto;
  }
  #view-home .page-scroll > * { max-width: none; margin: 0; }
  #view-home .target-school-card { grid-area: target; }
  #view-home .card.sec-card { grid-area: stats; }
  #view-home #pc-weekly-card { grid-area: chart; }
  #view-home .quick-row { grid-area: quick; flex-direction: column; gap: 14px; }
  #view-home .quick-cell { flex: 1; justify-content: center; }
  #view-home .pc-streak { grid-area: streak; }
  #view-home .vip-banner { grid-area: vip; margin-top: 0; }

  /* 数据中心：图表双列 */
  #view-stats .page-scroll {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px 16px;
    align-content: start;
    max-width: 980px; margin-left: auto; margin-right: auto;
  }
  #view-stats .page-scroll > * { max-width: none; margin: 0; }
  #view-stats .subj-tabs, #view-stats .big-stat-card { grid-column: 1 / -1; }

  /* 错题本总览：限宽对齐 */
  #view-wrong .page-scroll > * { max-width: 880px; }

  /* ── 刷题页：左题目 + 右答题卡面板（考试系统布局） ── */
  #view-quiz .quiz-scroll {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 276px;
    gap: 0 32px;
    align-content: start;
  }
  #view-quiz .quiz-main { max-width: 780px; }
  #view-quiz .quiz-side { position: sticky; top: 14px; align-self: start; }
  .qs-panel {
    background: var(--card); border: 1px solid var(--line); border-radius: 14px;
    padding: 18px; box-shadow: var(--shadow);
  }
  .qsp-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
  .qsp-head b { font-family: var(--serif); font-size: 14.5px; font-weight: 700; letter-spacing: 1px; }
  .qsp-count { font-size: 12px; color: var(--ink-3); font-weight: 700; font-variant-numeric: tabular-nums; }
  .qsp-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin-bottom: 16px; }
  .qsp-cell {
    aspect-ratio: 1; border-radius: 8px; background: var(--paper-3); color: var(--ink-3);
    font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: transform .12s;
  }
  .qsp-cell:hover { transform: scale(1.08); }
  .qsp-cell.did { background: var(--indigo-soft); color: var(--indigo-deep); }
  .qsp-cell.ok { background: var(--moss-soft); color: var(--moss); }
  .qsp-cell.no { background: var(--seal-soft); color: var(--seal); }
  .qsp-cell.cur { outline: 2.5px solid var(--indigo); outline-offset: 1.5px; }
  .qsp-stats { display: flex; border-top: 1px dashed var(--line); padding-top: 14px; }
  .qsp-stats > div { flex: 1; text-align: center; }
  .qsp-stats b { display: block; font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; }
  .qsp-stats b.g { color: var(--moss); } .qsp-stats b.r { color: var(--seal); }
  .qsp-stats span { font-size: 10.5px; color: var(--ink-3); }
  .qsp-exit {
    width: 100%; margin-top: 14px; background: var(--paper); border: 1.5px solid var(--line-2);
    border-radius: 9px; padding: 9px 0; font-size: 12.5px; font-weight: 700;
    color: var(--ink-2); cursor: pointer; font-family: var(--sans);
  }
  .qsp-exit:hover { border-color: var(--seal); color: var(--seal); }

  /* ── 模式页（真题模考/章节练习/组卷/错题强化）：宽版 ── */
  #view-mode .page-scroll > .mode-pane { max-width: 920px; }
  #view-mode .qs-row { grid-template-columns: 1fr 1fr; }
  #view-mode #chapter-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-content: start; }
  #view-mode #chapter-list .ch-group { margin-bottom: 0; }
  #view-mode #paper-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-content: start; }
  #view-mode #paper-list .paper-card { margin-bottom: 0; }

  /* ── 错题本详情：错题卡双列 ── */
  #view-wrongsubject .page-scroll > * { max-width: 920px; }
  #view-wrongsubject #ws-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-content: start; }
  #view-wrongsubject #ws-list .wrong-card { margin-bottom: 0; }
  #view-wrongsubject .btn-primary { margin-top: 14px; }

  /* 刷题页内容容器：与双栏宽度匹配并居中 */
  #view-quiz .quiz-scroll { max-width: 1088px; margin-left: auto; margin-right: auto; }

  /* 次页头部与内容对齐 */
  .sub-header {
    padding-left: max(40px, calc((100% - 900px) / 2 + 40px));
    padding-right: max(40px, calc((100% - 900px) / 2 + 40px));
  }
  .quiz-header {
    padding-left: max(40px, calc((100% - 1088px) / 2 + 40px));
    padding-right: max(40px, calc((100% - 1088px) / 2 + 40px));
  }

  /* 按钮不拉满 */
  .btn-primary { width: fit-content; min-width: 220px; display: block; margin-left: auto; margin-right: auto; }
  .btn-next, .btn-confirm { width: fit-content; min-width: 180px; padding-left: 34px; padding-right: 34px; }

  /* 卡片与文字：桌面级留白与字号 */
  .card { padding: 20px 24px; margin-bottom: 16px; }
  .sec-card { padding: 18px 22px; }
  .sec-title { font-size: 16px; }
  .hello { font-size: 24px; }
  .ts-school { font-size: 19px; }
  .target-school-card { padding: 20px 24px; border-radius: 18px; }
  .quick-row { gap: 12px; }
  .quick-cell { padding: 18px 22px; }
  .ch-head { padding: 16px 20px; }
  .ch-name { font-size: 15.5px; }
  .wrong-card { padding: 17px 20px; }
  .menu-item { padding: 15px 20px; font-size: 15px; }
  .pm-cell { padding: 13px 16px; }
  .pm-name { font-size: 13.5px; }
  .pm-badge { font-size: 11px; }
  .ps-card { padding: 16px 20px; }
  .wov-row { padding: 13px 16px; margin-bottom: 10px; }

  /* 桌面 hover 反馈 */
  .opt:hover { border-color: var(--line-2); }
  .pm-cell:hover { border-color: var(--indigo); transform: translateY(-1px); }
  .wov-row:hover, .wrong-card:hover, .menu-item:hover, .qs-card:hover, .ob-school-row:hover, .ob-major-row:hover { box-shadow: 0 2px 6px rgba(84,72,44,.1), 0 8px 22px rgba(84,72,44,.09); }

  /* 刷题页阅读体验 */
  .q-stem { font-size: 16.5px; }
  .opt { padding: 13px 16px; }
  .opt .opt-text { font-size: 15px; }
  .opt .opt-key { width: 26px; height: 26px; font-size: 13px; }
  .ai-p { font-size: 14px; }
  .ai-sec { padding: 11px 15px; }

  /* 数据中心 / 图表放大 */
  .big-stat-card { padding: 24px 28px; }
  .bs-num { font-size: 44px; }
  .bar-chart { height: 140px; }
  .m-row { padding: 8.5px 0; }
  .m-name { width: 56px; font-size: 14px; }
  .m-bar { height: 9px; }
  .m-val { width: 38px; font-size: 13.5px; }

  /* 桌面显示细滚动条 */
  .page-scroll { scrollbar-width: thin; scrollbar-color: #C9C0A8 transparent; }
  .page-scroll::-webkit-scrollbar { display: block; width: 6px; }
  .page-scroll::-webkit-scrollbar-thumb { background: #C9C0A8; border-radius: 3px; }
  .page-scroll::-webkit-scrollbar-track { background: transparent; }

  #toast { bottom: 48px; }
}

/* 手机框样式仅限 560-767px；平板/PC 由响应式接管 */
@media (min-width: 560px) and (max-width: 767px) {
  body { background: linear-gradient(180deg, #26221B, #3A342A 220px, #EDE8DA 220px); }
  #app { margin-top: 28px; margin-bottom: 28px; height: calc(100vh - 56px); border-radius: 24px; overflow: hidden; }
}

/* ═══════════════════════════════════════════
   引导流程 / 目标卡 / 科目Tab / 筛选
   ═══════════════════════════════════════════ */

/* ── 引导流程 ── */
.ob-scroll { padding: 40px 18px 40px; }
.ob-logo { font-size: 44px; text-align: center; margin-bottom: 10px; }
.ob-title { font-family: var(--serif); font-size: 22px; font-weight: 900; text-align: center; letter-spacing: 2px; }
.ob-sub { font-size: 12.5px; color: var(--ink-3); text-align: center; margin: 6px 0 22px; line-height: 1.6; }

.ob-step { display: none; animation: fadein .25s ease; }
.ob-step.active { display: block; }

.ob-step-label {
  display: flex; align-items: center; gap: 8px;
  font-size: 14.5px; font-weight: 700; margin-bottom: 12px;
}
.ob-step-label b { color: var(--seal); font-weight: 800; font-family: var(--serif); }
.ob-step-label .back { font-size: 22px; color: var(--ink-3); cursor: pointer; line-height: 1; width: 24px; }

.ob-search {
  display: flex; align-items: center; gap: 8px; background: var(--card);
  border: 1.5px solid var(--line-2); border-radius: 10px; padding: 10px 14px; margin-bottom: 14px;
}
.ob-search:focus-within { border-color: var(--indigo); }
.ob-search-icon { font-size: 14px; }
.ob-search input { flex: 1; border: none; outline: none; font-size: 14.5px; background: transparent; color: var(--text); }

.ob-sec-label { font-size: 11.5px; color: var(--ink-3); font-weight: 600; margin: 14px 0 8px; }
.ob-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ob-chip {
  background: var(--card); border: 1px solid var(--line-2); border-radius: 999px;
  padding: 6px 14px; font-size: 13px; font-weight: 600; cursor: pointer; color: var(--ink-2);
}
.ob-chip:active { border-color: var(--seal); color: var(--seal); }

.ob-group { margin-bottom: 6px; }
.ob-school-row {
  display: flex; align-items: center; gap: 10px; background: var(--card);
  border-radius: 10px; padding: 13px 14px; margin-bottom: 8px; cursor: pointer;
  box-shadow: var(--shadow); border: 1px solid var(--line);
}
.ob-school-row:active { transform: scale(.985); }
.ob-school-name { flex: 1; font-size: 15px; font-weight: 700; }
.ob-school-tag { font-size: 11px; color: var(--indigo-deep); background: var(--indigo-soft); padding: 2px 9px; border-radius: 4px; font-weight: 600; }

.ob-major-row {
  display: flex; justify-content: space-between; align-items: center; background: var(--card);
  border-radius: 10px; padding: 14px; margin-bottom: 8px; cursor: pointer; box-shadow: var(--shadow); border: 1px solid var(--line);
}
.ob-major-row:active { transform: scale(.985); }
.ob-major-name { font-size: 15px; font-weight: 700; }
.ob-building { font-size: 10.5px; color: var(--ochre); background: var(--ochre-soft); padding: 2px 8px; border-radius: 4px; font-weight: 600; margin-left: 6px; vertical-align: 2px; }
.ob-major-exams { font-size: 11.5px; color: var(--ink-3); margin-top: 3px; }

.ob-confirm-sub { font-size: 14px; font-weight: 700; margin-bottom: 12px; }
.ob-subjects { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.ob-subj-card {
  display: flex; align-items: center; gap: 12px; background: var(--card);
  border-radius: 10px; padding: 12px 14px; box-shadow: var(--shadow); border: 1px solid var(--line);
}
.ob-subj-icon { width: 38px; height: 38px; border-radius: 9px; display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
.ob-subj-name { font-size: 14.5px; font-weight: 700; }
.ob-subj-code { font-size: 11px; color: var(--ink-3); margin-left: 8px; font-weight: 600; }
.ob-subj-type { font-size: 11.5px; color: var(--ink-3); margin-top: 2px; }
.ob-hint { text-align: center; font-size: 11.5px; color: var(--ink-3); margin-top: 12px; }

/* ── 引导：折叠分组 ── */
.ob-region { background: var(--card); border-radius: 12px; box-shadow: var(--shadow); margin-bottom: 10px; overflow: hidden; border: 1px solid var(--line); }
.ob-region-head { display: flex; align-items: center; gap: 8px; padding: 13px 14px; cursor: pointer; }
.ob-region-name { font-family: var(--serif); font-size: 14.5px; font-weight: 800; letter-spacing: 1px; }
.ob-region-count { font-size: 11px; color: var(--ink-3); background: var(--paper-3); padding: 2px 9px; border-radius: 999px; font-weight: 600; }
.ob-caret { margin-left: auto; font-size: 10px; color: var(--line-2); transition: transform .2s; }
.ob-region.open .ob-caret { transform: rotate(90deg); }
.ob-region-body { display: none; padding: 0 8px 8px; }
.ob-region.open .ob-region-body { display: block; }
.ob-region-body .ob-school-row, .ob-region-body .ob-major-row { box-shadow: none; background: var(--paper); border: 1px solid var(--line); margin-bottom: 6px; }

.ob-school-city { font-style: normal; font-size: 11px; color: var(--ink-3); font-weight: 400; margin-left: 8px; }
.ob-school-tag.g985 { background: var(--seal-soft); color: var(--seal); }
.ob-school-tag.g211 { background: var(--ochre-soft); color: var(--ochre); }
.ob-school-tag.gdy { background: var(--moss-soft); color: var(--moss); }
.ob-school-tag.gyjs { background: var(--indigo-soft); color: var(--indigo); }

.ob-building.gray { color: var(--ink-3); background: var(--paper-3); }
.ob-major-exams { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ob-subj-info { flex: 1; min-width: 0; }
.ob-subj-ok { width: 22px; height: 22px; border-radius: 50%; background: var(--moss-soft); color: var(--moss); font-size: 12px; font-weight: 800; display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-left: auto; }
.ob-subj-ok.pending { background: var(--ochre-soft); color: var(--ochre); }

/* ── 首页目标院校卡（靛青书封） ── */
.target-school-card {
  background: linear-gradient(135deg, #234964, #2F5A7D 60%, #3A6A8E); border-radius: 16px;
  padding: 15px 16px; color: #F5F9FC; display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 11px; cursor: pointer; box-shadow: 0 6px 18px rgba(47, 90, 125, .32);
  position: relative; overflow: hidden;
}
.target-school-card::after {
  content: ''; position: absolute; right: -20px; bottom: -40px; width: 110px; height: 110px;
  background: rgba(251, 246, 234, .07); border-radius: 50%;
}
.ts-school { font-family: var(--serif); font-size: 17px; font-weight: 800; display: flex; align-items: center; gap: 8px; letter-spacing: 1px; }
.ts-tag { font-size: 10px; background: rgba(251, 246, 234, .16); padding: 2px 8px; border-radius: 4px; font-weight: 600; letter-spacing: 0; }
.ts-major { font-size: 12.5px; opacity: .85; margin-top: 3px; }
.ts-right { display: flex; align-items: center; gap: 12px; position: relative; z-index: 1; }
.ts-cd { text-align: center; line-height: 1.15; }
.ts-cd b { font-family: var(--serif); font-size: 24px; font-weight: 900; font-variant-numeric: tabular-nums; }
.ts-cd span { font-size: 11px; opacity: .8; margin-left: 1px; }
.ts-cd-label { font-size: 9.5px; opacity: .7; text-align: center; margin-top: 1px; letter-spacing: 2px; }
.ts-edit { font-size: 12px; color: #AFC8DB; }

/* ── 首页快捷入口 ── */
.quick-row { display: flex; gap: 9px; margin-bottom: 11px; }

/* ── PC 专属区块（<1024px 隐藏） ── */
.pc-only { display: none !important; }

/* ── 学习打卡卡（PC 首页右侧栏） ── */
.pc-streak {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; border: 1px solid var(--line);
}
.stk-head { display: flex; justify-content: space-between; align-items: center; }
.stk-head b { font-family: var(--serif); font-size: 14px; font-weight: 700; letter-spacing: 1px; }
.stk-head span { font-size: 11px; color: var(--moss); background: var(--moss-soft); padding: 2px 8px; border-radius: 4px; font-weight: 600; }
.stk-dots { display: flex; gap: 7px; }
.stk-dot {
  flex: 1; aspect-ratio: 1; border-radius: 9px; display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: var(--ink-3); background: var(--paper-3); cursor: default;
}
.stk-dot.on { background: var(--moss-soft); color: var(--moss); }
.stk-dot.today { background: var(--seal); color: #FBF6EA; box-shadow: 0 4px 10px rgba(178, 58, 42, .35); }
.stk-foot { font-size: 11px; color: var(--ink-3); }

/* ── 首页刷题数据卡 ── */
.hs-grid { display: flex; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 10px 0; margin-bottom: 10px; }
.hs-cell { flex: 1; text-align: center; }
.hs-cell + .hs-cell { border-left: 1px solid var(--line); }
.hs-cell b { font-family: var(--serif); font-size: 17px; font-weight: 900; display: block; color: var(--text); font-variant-numeric: tabular-nums; }
.hs-cell span { font-size: 10.5px; color: var(--ink-3); }
.hs-subj-list { display: flex; flex-direction: column; gap: 7px; }
.hs-subj-row { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.hs-subj-name { width: 64px; font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex-shrink: 0; }
.hs-subj-row .m-bar { height: 6px; }
.hs-subj-val { width: 50px; text-align: right; font-size: 11.5px; font-weight: 700; color: var(--ink-3); font-variant-numeric: tabular-nums; flex-shrink: 0; }
.hs-subj-val.g { color: var(--moss); } .hs-subj-val.b { color: #3E6E93; } .hs-subj-val.o { color: var(--ochre); } .hs-subj-val.r { color: var(--seal); }
.quick-cell {
  flex: 1; border-radius: 12px; padding: 11px 14px; cursor: pointer;
  display: flex; flex-direction: column; gap: 1px; transition: transform .12s;
}
.quick-cell:active { transform: scale(.97); }
.quick-cell b { font-family: var(--serif); font-size: 19px; font-weight: 900; line-height: 1.2; font-variant-numeric: tabular-nums; }
.quick-cell b i { font-style: normal; font-size: 11px; font-weight: 600; opacity: .75; margin-left: 1px; }
.quick-cell span { font-size: 12.5px; font-weight: 600; }
.quick-cell > i {
  font-style: normal; font-size: 10.5px; opacity: .75; margin-top: 3px;
  border-top: 1px dashed rgba(251, 246, 234, .3); padding-top: 5px;
}
.qc-wrong { background: linear-gradient(135deg, #B23A2A, #8F2E20); color: #FBF6EA; box-shadow: 0 5px 14px rgba(178, 58, 42, .26); }
.qc-locator { background: linear-gradient(135deg, #3E6E93, #234964); color: #F5F9FC; box-shadow: 0 5px 14px rgba(47, 90, 125, .26); }

/* ── 科目 Tab（刷题中心 / 数据中心 顶部） ── */
.subj-tabs {
  display: flex; gap: 8px; overflow-x: auto; padding: 3px 2px 10px; scrollbar-width: none;
  margin-bottom: 4px;
}
.subj-tabs::-webkit-scrollbar { display: none; }
.subj-tabs-top { margin: -4px 0 8px; padding-top: 0; }
.subj-tab {
  flex-shrink: 0; background: var(--card); border: 1.5px solid var(--line);
  border-radius: 999px; padding: 7px 15px; font-size: 13px; font-weight: 600;
  color: var(--ink-2); cursor: pointer; white-space: nowrap; box-shadow: var(--shadow);
}
.subj-tab.active { background: var(--c, var(--indigo)); border-color: transparent; color: #FBF6EA; box-shadow: 0 4px 10px rgba(64, 56, 38, .22); }

/* ── 我的页目标行 ── */
.me-target-row { display: flex; gap: 12px; padding: 6px 0; font-size: 13px; }
.me-target-row span { color: var(--ink-3); width: 60px; flex-shrink: 0; }
.me-target-row b { font-weight: 600; line-height: 1.5; }

/* ── 空状态 ── */
.empty-state {
  text-align: center; padding: 40px 20px; color: var(--ink-3);
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 12px; border: 1px dashed var(--line-2);
}
.empty-icon { font-size: 36px; margin-bottom: 10px; }
.empty-title { font-size: 14.5px; font-weight: 700; color: var(--text); margin-bottom: 5px; }
.empty-sub { font-size: 12px; line-height: 1.6; }

/* ═══════════════════════════════════════════
   拍照搜题（纸墨风格）
   ═══════════════════════════════════════════ */

/* ── 底部导航中间凸起按钮 ── */
.tab-cam { position: relative; flex: 1; }
.cam-fab {
  display: flex; align-items: center; justify-content: center;
  width: 52px; height: 52px; margin: -26px auto 3px;
  background: var(--seal); color: #FBF8F0; font-size: 22px;
  border-radius: 50%; border: 3px solid var(--paper-2);
  box-shadow: 0 6px 14px rgba(178, 58, 42, .38), inset 0 1px 0 rgba(255,255,255,.25);
  cursor: pointer; transition: transform .15s, box-shadow .15s;
}
.tab-cam.active .cam-fab, .cam-fab:active { transform: translateY(-2px) scale(1.05); box-shadow: 0 9px 18px rgba(178, 58, 42, .45); }
.cam-label { font-size: 10.5px; color: var(--ink-3); font-weight: 500; }
.tab-cam.active .cam-label { color: var(--seal); font-weight: 700; }
@media (min-width: 1024px) { .tabbar { display: none; } }

/* ── 搜题页 ── */
.ps-scroll { max-width: 900px; }

/* 拍摄区 */
.ps-camera {
  background: var(--card); border: 1.5px dashed var(--ochre); border-radius: 14px;
  padding: 24px 18px 18px; text-align: center; margin-bottom: 14px;
  box-shadow: var(--shadow);
}
.ps-cam-top { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.ps-cam-icon { font-size: 40px; line-height: 1; }
.ps-cam-t { font-size: 15px; color: var(--ink); font-family: var(--song); letter-spacing: 2px; margin-top: 7px; }
.ps-cam-hint { font-size: 11px; color: var(--ink-3); font-style: normal; margin-top: 3px; }
.ps-cam-acts { display: flex; gap: 10px; margin-top: 16px; }
.ps-cam-btn {
  flex: 1; padding: 11.5px 0; border: none; border-radius: 10px; cursor: pointer;
  background: var(--seal); color: #FBF8F0; font-size: 14px; font-weight: 700;
  font-family: var(--sans); box-shadow: 0 4px 10px rgba(178, 58, 42, .25); transition: all .15s;
}
.ps-cam-btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.ps-cam-btn.alt { background: var(--indigo-soft); color: var(--indigo); border: 1px solid var(--indigo); box-shadow: none; }
.ps-cam-btn.alt:hover { background: var(--indigo); color: #fff; }

/* 图片预览 */
.ps-preview { position: relative; margin-bottom: 14px; }
.ps-preview img {
  width: 100%; border-radius: 12px; border: 1px solid var(--line);
  box-shadow: var(--shadow); cursor: zoom-in; display: block;
}
.ps-repick {
  position: absolute; top: 10px; right: 10px; padding: 5px 14px;
  background: rgba(38, 34, 27, .78); color: #F5F1E6; font-size: 12px;
  border-radius: 999px; cursor: pointer; backdrop-filter: blur(4px);
}

/* OCR 识别区 */
.ps-loading { display: flex; align-items: center; justify-content: center; gap: 9px; padding: 26px 0; color: var(--ink-2); font-size: 13.5px; }
.spin {
  width: 17px; height: 17px; border: 2.5px solid var(--paper-3); border-top-color: var(--seal);
  border-radius: 50%; animation: ps-spin .8s linear infinite;
}
@keyframes ps-spin { to { transform: rotate(360deg); } }

.ps-ocr-box { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 14px; box-shadow: var(--shadow); }
.ps-ocr-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.ps-ocr-head span { font-size: 12px; font-weight: 800; color: var(--indigo); letter-spacing: 2px; font-family: var(--song); }
.ps-ocr-head i { font-size: 11.5px; color: var(--ink-3); font-style: normal; cursor: pointer; }
.ps-ocr-head i:hover { color: var(--seal); }
.ps-ocr-box textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 8px; background: var(--paper-2);
  padding: 10px 12px; font-size: 13.5px; line-height: 1.7; font-family: inherit;
  color: var(--ink); resize: vertical; min-height: 76px;
}
.ps-ocr-box textarea:focus { outline: none; border-color: var(--indigo); }
.ps-search-btn {
  margin-top: 9px; width: 100%; padding: 10.5px 0; border: none; border-radius: 9px;
  background: var(--brand-grad); color: #F5F9FC; font-size: 14px; font-weight: 700;
  cursor: pointer; font-family: var(--sans);
}
.ps-search-btn:hover { filter: brightness(1.08); }

/* 结果区 */
.ps-found-tip {
  background: var(--moss-soft); color: var(--moss); border: 1px solid #D4DFC6;
  border-radius: 10px; padding: 10px 14px; font-size: 13.5px; font-weight: 700; margin-bottom: 10px;
}
.ps-none-tip {
  background: var(--ochre-soft); color: var(--ochre); border: 1px solid #E4D3AE;
  border-radius: 10px; padding: 10px 14px; font-size: 13.5px; font-weight: 700; margin-bottom: 12px;
}
.ps-error { background: var(--seal-soft); color: var(--seal-deep); border-radius: 10px; padding: 14px; font-size: 13px; line-height: 1.7; margin-bottom: 12px; }
.ps-retry { display: inline-block; margin-top: 8px; color: var(--seal); font-weight: 700; cursor: pointer; text-decoration: underline; }

/* 命中题卡片 */
.ps-hit-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 16px 18px; margin-bottom: 12px; box-shadow: var(--shadow);
}
.ps-hit-tags { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 10px; }
.ps-tag-subj { background: var(--indigo); color: #fff; font-size: 10.5px; padding: 2px 9px; border-radius: 999px; font-weight: 700; }
.ps-tag { background: var(--paper-3); color: var(--ink-2); font-size: 10.5px; padding: 2px 9px; border-radius: 999px; }
.ps-hit-stem { font-size: 15px; line-height: 1.85; color: var(--ink); font-weight: 500; margin-bottom: 10px; }
.ps-opt {
  font-size: 13.5px; line-height: 1.75; color: var(--ink-2);
  padding: 7px 11px; border-radius: 8px; background: var(--paper-2); margin-bottom: 5px;
  border: 1px solid transparent; transition: border-color .15s;
}
.ps-opt:hover { border-color: var(--line-2); }
.ps-answer {
  background: var(--moss-soft); border-radius: 10px; padding: 11px 14px; margin-top: 10px;
  border-left: 3px solid var(--moss);
}
.ps-answer-t { font-size: 11.5px; font-weight: 800; color: var(--moss); letter-spacing: 1.5px; margin-bottom: 4px; }
.ps-answer-b { font-size: 14.5px; font-weight: 700; color: var(--ink); line-height: 1.7; }
.ps-ana { background: var(--indigo-soft); border-radius: 10px; padding: 11px 14px; margin-top: 8px; border-left: 3px solid var(--indigo); }
.ps-ana-l { font-size: 11.5px; font-weight: 800; color: var(--indigo); letter-spacing: 1.5px; margin-bottom: 4px; }
.ps-ana-c { font-size: 13px; line-height: 1.8; color: var(--ink-2); }
.ps-actions { margin-top: 12px; }
.ps-add-wrong {
  width: 100%; padding: 11px 0; border-radius: 10px; border: 1.5px solid var(--seal);
  background: transparent; color: var(--seal); font-size: 14px; font-weight: 800;
  cursor: pointer; font-family: var(--sans); transition: all .15s;
}
.ps-add-wrong:hover { background: var(--seal); color: #fff; }

/* 相似题 */
.ps-similar { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 12px; }
.ps-similar-t { font-size: 11.5px; font-weight: 800; color: var(--ink-3); letter-spacing: 2px; margin-bottom: 8px; font-family: var(--song); }
.ps-similar-row {
  display: flex; align-items: center; gap: 9px; padding: 8px 4px;
  font-size: 12.5px; color: var(--ink-2); border-bottom: 1px dashed var(--line);
  cursor: pointer; line-height: 1.5;
}
.ps-similar-row:last-child { border-bottom: 0; }
.ps-similar-row:hover { color: var(--indigo); }
.ps-sim-pct { background: var(--paper-3); color: var(--ochre); font-size: 10.5px; font-weight: 800; padding: 1px 7px; border-radius: 999px; flex-shrink: 0; }

/* AI 解题卡片 */
.ps-ai-card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; box-shadow: var(--shadow); }
.ps-ai-head { font-size: 15px; font-weight: 800; color: var(--ink); font-family: var(--song); margin-bottom: 10px; padding-left: 10px; border-left: 3px solid var(--seal); }
.ps-ai-body { font-size: 13.5px; line-height: 1.85; color: var(--ink-2); }
.ps-ai-body ul { padding-left: 20px; margin: 6px 0; }
.ps-ai-body li { margin-bottom: 5px; }
.ps-ai-body b { color: var(--ink); }
.ps-ai-body .katex-display { display: inline-block; margin: 4px 0; }
.ps-md-h { font-size: 14px; font-weight: 800; color: var(--indigo); margin: 10px 0 5px; }
.ps-code { background: var(--paper-3); border-radius: 8px; padding: 10px 12px; font-size: 12.5px; overflow-x: auto; margin: 8px 0; }
.ps-ai-btn {
  margin-top: 12px; width: 100%; padding: 11.5px 0; border: none; border-radius: 10px;
  background: var(--brand-grad); color: #F5F9FC; font-size: 14.5px; font-weight: 700;
  cursor: pointer; font-family: var(--sans); box-shadow: 0 5px 14px rgba(47, 90, 125, .3);
}
.ps-ai-btn:hover { filter: brightness(1.08); }
.ps-ai-btn:disabled { opacity: .55; cursor: not-allowed; }

/* OCR 来源标签（RapidOCR 本机 / AI 视觉） */
.ps-ocr-src { font-size: 11px; color: var(--moss); font-weight: 700; margin: -2px 0 7px; letter-spacing: .5px; }
.ps-ocr-warn { font-size: 11.5px; color: var(--seal); font-weight: 700; margin: -2px 0 7px; letter-spacing: .3px; }

/* 流式解题: 思路区（可折叠）+ 答案区 + 打字光标 */
.ps-thinking {
  background: var(--paper-2); border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 13px; margin-bottom: 11px;
}
.ps-thinking-t {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12px; font-weight: 800; color: var(--ink-2); cursor: pointer;
  letter-spacing: 1px; user-select: none;
}
.ps-thinking-arrow { font-size: 10px; transition: transform .2s; }
.ps-thinking.folded .ps-thinking-arrow { transform: rotate(-90deg); }
.ps-thinking-b {
  margin-top: 8px; font-size: 12.5px; line-height: 1.75; color: var(--ink-3);
  white-space: pre-wrap; max-height: 180px; overflow-y: auto;
}
.ps-thinking.folded .ps-thinking-b { display: none; }
.ps-ai-stream { font-size: 13.5px; line-height: 1.85; color: var(--ink-2); }
.ps-ai-stream ul { padding-left: 20px; margin: 6px 0; }
.ps-ai-stream li { margin-bottom: 5px; }
.ps-ai-stream b { color: var(--ink); }
.ps-ai-final { font-size: 13.5px; line-height: 1.85; color: var(--ink-2); }
.ps-ai-final ul { padding-left: 20px; margin: 6px 0; }
.ps-ai-final li { margin-bottom: 5px; }
.ps-ai-final b { color: var(--ink); }
.ps-ai-final .katex-display { display: inline-block; margin: 4px 0; }
.ps-cursor {
  display: inline-block; width: 7px; height: 15px; margin-left: 2px; vertical-align: -2px;
  background: var(--seal); border-radius: 1.5px; animation: ps-blink .85s steps(1) infinite;
}
@keyframes ps-blink { 50% { opacity: 0; } }

/* 手动输入（兜底） */
.ps-manual { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 13px 14px; margin-bottom: 14px; box-shadow: var(--shadow); }
.ps-manual-head { font-size: 12px; font-weight: 800; color: var(--ochre); letter-spacing: 2px; margin-bottom: 8px; font-family: var(--song); }
.ps-manual textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 8px; background: var(--paper-2);
  padding: 10px 12px; font-size: 13.5px; line-height: 1.7; font-family: inherit;
  color: var(--ink); resize: vertical;
}
.ps-manual textarea:focus { outline: none; border-color: var(--ochre); }
.ps-manual-btn {
  margin-top: 9px; width: 100%; padding: 10.5px 0; border: 1.5px solid var(--ochre); border-radius: 9px;
  background: transparent; color: var(--ochre); font-size: 14px; font-weight: 800; cursor: pointer;
  font-family: var(--sans); transition: all .15s;
}
.ps-manual-btn:hover { background: var(--ochre); color: #fff; }
.ps-manual-tag { font-size: 11.5px; color: var(--ochre); font-weight: 800; letter-spacing: 1.5px; }

/* ══════════════ 登录弹窗（手机号 · 分步合一式） ══════════════ */
.modal-mask {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(38, 34, 27, .48); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.login-modal {
  width: 100%; max-width: 356px;
  background: var(--paper-2); border: 1px solid var(--line);
  border-radius: 16px; padding: 20px 22px 16px;
  box-shadow: 0 18px 50px rgba(38, 34, 27, .35);
  animation: lm-in .18s ease-out;
}
@keyframes lm-in { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }
.lm-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.lm-title { font-family: var(--song); font-size: 17px; font-weight: 800; color: var(--ink); letter-spacing: 1px; }
.lm-close {
  width: 26px; height: 26px; display: flex; align-items: center; justify-content: center;
  border-radius: 50%; color: var(--ink-3); font-size: 14px; cursor: pointer;
  background: var(--paper-3); transition: all .15s;
}
.lm-close:hover { color: var(--seal); background: var(--seal-soft); }
.lm-body { display: flex; flex-direction: column; }
.lm-phone-row {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--indigo-soft); border-radius: 9px; padding: 9px 12px; margin-bottom: 12px;
}
.lm-ph { font-size: 14px; font-weight: 800; color: var(--indigo-deep); letter-spacing: .5px; }
.lm-edit { font-size: 12px; color: var(--indigo); font-weight: 700; cursor: pointer; text-decoration: underline; }
.lm-label { font-size: 12px; font-weight: 800; color: var(--ink-2); margin-bottom: 6px; letter-spacing: 1px; }
.lm-input {
  width: 100%; border: 1.5px solid var(--line); border-radius: 10px;
  background: #fff; padding: 11.5px 13px; font-size: 15.5px; color: var(--ink);
  font-family: inherit; transition: border-color .15s;
}
.lm-input:focus { outline: none; border-color: var(--indigo); }
.lm-input::placeholder { color: var(--ink-3); font-size: 14px; }
.lm-btn {
  margin-top: 14px; width: 100%; padding: 12px 0; border: none; border-radius: 10px;
  background: var(--brand-grad); color: #F5F9FC; font-size: 15.5px; font-weight: 800;
  letter-spacing: 4px; cursor: pointer; font-family: var(--sans);
  box-shadow: 0 5px 14px rgba(47, 90, 125, .32); transition: all .15s;
}
.lm-btn:hover { filter: brightness(1.1); transform: translateY(-1px); }
.lm-btn:disabled { opacity: .6; cursor: not-allowed; transform: none; }
.lm-tip { margin-top: 10px; font-size: 11px; color: var(--ink-3); text-align: center; line-height: 1.6; }

/* 我的页 · 未登录引导卡 */
.avatar-off { font-size: 22px; }
.me-login-btn {
  margin-left: auto; padding: 9px 22px; border: none; border-radius: 999px;
  background: rgba(251, 246, 234, .95); color: var(--indigo-deep);
  font-size: 14px; font-weight: 800; letter-spacing: 2px; cursor: pointer;
  font-family: var(--sans); transition: all .15s; flex-shrink: 0;
}
.me-login-btn:hover { background: #fff; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,.2); }
.me-cell b.c-red { color: #F0A08E; }
