/* ============ 审计学刷题室 · 样式 ============ */
:root {
  --bg: #f5f2ea;
  --bg-soft: #efeae0;
  --surface: #fffdf8;
  --surface-2: #faf7f0;
  --surface-3: #f1ece2;
  --ink: #1f2a30;
  --ink-2: #44535c;
  --ink-3: #74828a;
  --line: #e2dbce;
  --line-strong: #cfc6b6;
  --brand: #0f766e;
  --brand-2: #0d9488;
  --brand-soft: #e2f2ef;
  --brand-ink: #0b5c56;
  --gold: #b7791f;
  --gold-soft: #fbf1dc;
  --red: #b4423a;
  --red-soft: #fbe9e7;
  --green: #237a57;
  --green-soft: #e6f4ec;
  --blue: #315f9e;
  --blue-soft: #e8effa;
  --shadow-sm: 0 1px 2px rgba(31, 42, 48, .05), 0 4px 14px rgba(31, 42, 48, .04);
  --shadow-md: 0 10px 30px rgba(31, 42, 48, .08), 0 2px 6px rgba(31, 42, 48, .04);
  --shadow-lg: 0 24px 70px rgba(20, 30, 36, .18);
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 22px;
  --sans: "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --serif: "Songti SC", "STSong", "SimSun", Georgia, serif;
  --mono: "Cascadia Code", "Consolas", "SFMono-Regular", monospace;
  --topbar-h: 66px;
  --bottom-h: 72px;
}
html[data-theme="dark"] {
  --bg: #0f1419;
  --bg-soft: #121920;
  --surface: #171f26;
  --surface-2: #1b242c;
  --surface-3: #222d36;
  --ink: #e7edf1;
  --ink-2: #b3c0c8;
  --ink-3: #83919a;
  --line: #2a3740;
  --line-strong: #3a4953;
  --brand: #4fd1c5;
  --brand-2: #38b2a6;
  --brand-soft: #14312f;
  --brand-ink: #8ee6dc;
  --gold: #e0a94a;
  --gold-soft: #332815;
  --red: #ef8a80;
  --red-soft: #3a211f;
  --green: #7fd6ac;
  --green-soft: #173127;
  --blue: #8db6ec;
  --blue-soft: #1a273a;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.3);
  --shadow-md: 0 10px 30px rgba(0,0,0,.35);
  --shadow-lg: 0 24px 70px rgba(0,0,0,.55);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(900px 500px at 8% -10%, rgba(15,118,110,.07), transparent 60%),
    radial-gradient(700px 500px at 100% 0%, rgba(183,121,31,.06), transparent 55%),
    var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(var(--bottom-h) + 14px);
}
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--brand); }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.skip-link { position: fixed; left: 12px; top: -60px; z-index: 999; background: var(--brand); color: #fff; padding: 8px 14px; border-radius: 8px; transition: top .2s; }
.skip-link:focus { top: 12px; }

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 60;
  height: var(--topbar-h);
  display: flex; align-items: center; gap: 18px;
  padding: 0 22px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(16px) saturate(1.2);
  border-bottom: 1px solid var(--line);
}
.topbar-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: var(--ink); }
.brand-mark {
  width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center;
  background: linear-gradient(145deg, var(--brand), var(--brand-2));
  color: #fff; font-family: var(--serif); font-size: 21px; font-weight: 700;
  box-shadow: 0 6px 16px rgba(15,118,110,.25);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text strong { font-family: var(--serif); font-size: 18px; letter-spacing: .02em; }
.brand-text small { color: var(--ink-3); font-size: 11px; letter-spacing: .02em; }
.topbar-center { flex: 1; display: flex; justify-content: center; }
.searchbox {
  width: min(460px, 100%); display: flex; align-items: center; gap: 9px;
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 12px; padding: 8px 12px; transition: border-color .15s, box-shadow .15s;
}
.searchbox:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.searchbox svg { color: var(--ink-3); flex: 0 0 auto; }
.searchbox input { border: 0; outline: 0; background: transparent; width: 100%; font-size: 14px; }
.searchbox kbd { flex: 0 0 auto; }
.topbar-right { display: flex; align-items: center; gap: 8px; }
.mini-stat { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--ink-2); padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-2); white-space: nowrap; }
.mini-stat .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.icon-btn {
  width: 38px; height: 38px; display: grid; place-items: center;
  border: 1px solid transparent; border-radius: 10px; background: transparent; color: var(--ink-2);
  transition: background .15s, color .15s, border-color .15s;
}
.icon-btn:hover { background: var(--surface-3); color: var(--ink); }
.icon-btn:focus-visible, .btn:focus-visible, .nav-item:focus-visible, .type-chip:focus-visible, .option:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.ico-moon { display: none; }
html[data-theme="dark"] .ico-sun { display: none; }
html[data-theme="dark"] .ico-moon { display: block; }
kbd {
  font-family: var(--mono); font-size: 11px; line-height: 1; color: var(--ink-3);
  background: var(--surface-3); border: 1px solid var(--line); border-bottom-color: var(--line-strong);
  border-radius: 5px; padding: 3px 5px;
}

/* ---------- 布局 ---------- */
.layout { display: grid; grid-template-columns: 286px minmax(0, 1fr); gap: 0; align-items: start; }
.sidebar {
  position: sticky; top: var(--topbar-h); height: calc(100vh - var(--topbar-h));
  overflow-y: auto; padding: 22px 18px 120px;
  border-right: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 55%, transparent);
  scrollbar-width: thin;
}
.side-nav { display: flex; flex-direction: column; gap: 5px; }
.nav-item {
  display: flex; align-items: center; gap: 11px; width: 100%;
  padding: 10px 12px; border: 1px solid transparent; border-radius: 11px;
  background: transparent; color: var(--ink-2); text-align: left; transition: .15s;
}
.nav-item:hover { background: var(--surface-2); color: var(--ink); }
.nav-item.is-active { background: var(--brand-soft); color: var(--brand-ink); border-color: color-mix(in srgb, var(--brand) 22%, transparent); font-weight: 600; }
.nav-ico { width: 22px; text-align: center; font-size: 16px; }
.nav-label { flex: 1; font-size: 14px; }
.nav-count { font-size: 12px; color: var(--ink-3); background: var(--surface-3); border-radius: 999px; padding: 1px 8px; }
.nav-item.is-active .nav-count { background: color-mix(in srgb, var(--brand) 16%, transparent); color: var(--brand-ink); }
.nav-hint { font-size: 11px; color: var(--ink-3); }
.accent-red { color: var(--red) !important; }
.accent-gold { color: var(--gold) !important; }
.side-section { margin-top: 24px; }
.side-section h3 { margin: 0 0 10px; font-size: 12px; font-weight: 700; letter-spacing: .08em; color: var(--ink-3); text-transform: uppercase; display: flex; justify-content: space-between; align-items: center; }
.side-section h3 span { font-weight: 400; letter-spacing: 0; text-transform: none; font-size: 11px; }
.chapter-list { display: flex; flex-direction: column; gap: 3px; }
.chapter-item {
  display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 8px;
  width: 100%; padding: 8px 9px; border: 0; border-radius: 9px; background: transparent; text-align: left; color: var(--ink-2);
}
.chapter-item:hover { background: var(--surface-2); }
.chapter-item.is-active { background: var(--surface-3); color: var(--ink); font-weight: 600; }
.chapter-no { font-family: var(--mono); font-size: 11px; color: var(--ink-3); background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; text-align: center; padding: 1px 0; }
.chapter-name { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chapter-bar { width: 46px; height: 4px; background: var(--surface-3); border-radius: 99px; overflow: hidden; }
.chapter-bar i { display: block; height: 100%; background: var(--brand); border-radius: inherit; }
.type-list { display: flex; flex-wrap: wrap; gap: 7px; }
.type-chip {
  border: 1px solid var(--line); background: var(--surface-2); color: var(--ink-2);
  border-radius: 999px; padding: 6px 12px; font-size: 12.5px; transition: .15s;
}
.type-chip:hover { border-color: var(--brand); color: var(--brand-ink); }
.type-chip.is-active { background: var(--brand); border-color: var(--brand); color: #fff; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.switch-row input { position: absolute; opacity: 0; pointer-events: none; }
.switch { width: 38px; height: 22px; border-radius: 99px; background: var(--line-strong); position: relative; transition: .2s; flex: 0 0 auto; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch-row input:checked + .switch { background: var(--brand); }
.switch-row input:checked + .switch::after { transform: translateX(16px); }
.side-tip { margin: 10px 0 0; font-size: 11.5px; color: var(--ink-3); line-height: 1.9; }
.ring-wrap { display: flex; align-items: center; gap: 14px; }
.ring {
  --p: 0; width: 66px; height: 66px; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--brand) calc(var(--p) * 1%), var(--surface-3) 0);
  position: relative; flex: 0 0 auto;
}
.ring::before { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: var(--surface); }
.ring span { position: relative; font-size: 13px; font-weight: 700; color: var(--brand-ink); }
.ring-info { display: flex; flex-direction: column; line-height: 1.45; }
.ring-info strong { font-size: 22px; color: var(--ink); }
.ring-info span { font-size: 11.5px; color: var(--ink-3); }
.menu-btn { display: none; }
.sidebar-mask { position: fixed; inset: var(--topbar-h) 0 0; background: rgba(10,18,22,.45); z-index: 49; backdrop-filter: blur(2px); }

/* ---------- 主区 ---------- */
.main { min-width: 0; padding: 24px 26px 40px; }
.main-inner { max-width: 940px; margin: 0 auto; }
.quiz-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; min-height: 30px; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; color: var(--ink-3); font-size: 12.5px; }
.crumbs b { color: var(--ink-2); font-weight: 600; }
.crumbs .sep { color: var(--line-strong); }
.quiz-top-right { display: flex; align-items: center; gap: 10px; }
.progress-pill { font-size: 12px; color: var(--ink-2); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 5px 11px; white-space: nowrap; }
.text-btn { border: 0; background: transparent; color: var(--brand); font-size: 12.5px; padding: 4px; }
.text-btn:hover { text-decoration: underline; }
.question-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm); padding: 26px 30px 24px; position: relative;
}
.q-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 12px; }
.q-tags { display: flex; flex-wrap: wrap; gap: 7px; }
.tag { font-size: 11.5px; padding: 3px 9px; border-radius: 999px; background: var(--surface-3); color: var(--ink-2); border: 1px solid var(--line); white-space: nowrap; }
.tag.chapter { background: var(--brand-soft); color: var(--brand-ink); border-color: color-mix(in srgb, var(--brand) 22%, transparent); }
.tag.type-single { background: var(--blue-soft); color: var(--blue); border-color: transparent; }
.tag.type-multi { background: #f1e9fb; color: #6d4d9e; border-color: transparent; }
html[data-theme="dark"] .tag.type-multi { background: #2a2038; color: #c4a8ea; }
.tag.type-judge { background: var(--green-soft); color: var(--green); border-color: transparent; }
.tag.type-business, .tag.type-card, .tag.type-case { background: var(--gold-soft); color: var(--gold); border-color: transparent; }
.fav-btn { display: flex; align-items: center; gap: 5px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink-3); border-radius: 999px; padding: 6px 11px; font-size: 12px; flex: 0 0 auto; }
.fav-btn svg { width: 15px; height: 15px; }
.fav-btn:hover { border-color: var(--gold); color: var(--gold); }
.fav-btn.is-on { background: var(--gold-soft); border-color: var(--gold); color: var(--gold); }
.fav-btn.is-on svg { fill: currentColor; }
.q-stem { font-family: var(--serif); font-size: 20px; line-height: 1.75; color: var(--ink); letter-spacing: .01em; }
.q-stem p { margin: 0 0 10px; }
.q-stem p:last-child { margin-bottom: 0; }
.q-stem .stem-num { color: var(--brand); font-family: var(--sans); font-weight: 700; margin-right: 4px; }
.q-sub { margin-top: 10px; color: var(--ink-3); font-size: 12.5px; }
.q-sub:empty { display: none; }

/* ---------- 选项 ---------- */
.options { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }
.option {
  display: flex; align-items: flex-start; gap: 13px; width: 100%;
  padding: 13px 15px; border: 1.5px solid var(--line); border-radius: 13px;
  background: var(--surface-2); color: var(--ink); text-align: left;
  transition: border-color .14s, background .14s, transform .08s;
}
.option:hover:not(:disabled) { border-color: color-mix(in srgb, var(--brand) 55%, var(--line)); background: var(--surface); }
.option:active:not(:disabled) { transform: scale(.997); }
.option .letter {
  width: 28px; height: 28px; flex: 0 0 auto; display: grid; place-items: center;
  border-radius: 8px; background: var(--surface-3); color: var(--ink-2);
  font-family: var(--mono); font-size: 13px; font-weight: 700; transition: .14s;
}
.option .opt-text { flex: 1; font-size: 15px; line-height: 1.65; padding-top: 1px; }
.option .mark { flex: 0 0 auto; width: 22px; height: 22px; display: grid; place-items: center; font-size: 15px; font-weight: 700; opacity: 0; transition: .15s; }
.option.is-selected { border-color: var(--brand); background: var(--brand-soft); }
.option.is-selected .letter { background: var(--brand); color: #fff; }
.option.is-selected .mark { opacity: 1; color: var(--brand-ink); }
.option.is-correct { border-color: var(--green); background: var(--green-soft); }
.option.is-correct .letter { background: var(--green); color: #fff; }
.option.is-correct .mark { opacity: 1; color: var(--green); }
.option.is-wrong { border-color: var(--red); background: var(--red-soft); }
.option.is-wrong .letter { background: var(--red); color: #fff; }
.option.is-wrong .mark { opacity: 1; color: var(--red); }
.option.is-missed { border-style: dashed; border-color: var(--gold); background: var(--gold-soft); }
.option.is-missed .letter { background: var(--gold); color: #fff; }
.option.is-missed .mark { opacity: 1; color: var(--gold); }
.option:disabled { cursor: default; opacity: 1; }
.option.judge-option .letter { font-family: var(--sans); font-size: 16px; }

/* ---------- 判题与反馈 ---------- */
.answer-actions { display: flex; align-items: center; gap: 14px; margin-top: 18px; }
.action-hint { color: var(--ink-3); font-size: 12px; }
.btn {
  border: 1px solid transparent; border-radius: 11px; padding: 10px 20px;
  font-size: 14px; font-weight: 600; display: inline-flex; align-items: center; gap: 7px;
  transition: .15s; background: var(--surface-3); color: var(--ink);
}
.btn:hover { filter: brightness(.97); transform: translateY(-1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn-primary { background: linear-gradient(180deg, var(--brand-2), var(--brand)); color: #fff; box-shadow: 0 6px 16px rgba(15,118,110,.2); }
.btn-primary:hover { filter: brightness(1.04); }
.btn-ghost { background: var(--surface); border-color: var(--line); color: var(--ink-2); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand-ink); }
.feedback { margin-top: 22px; border-top: 1px dashed var(--line-strong); padding-top: 18px; animation: rise .25s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.fb-verdict {
  display: flex; gap: 14px; align-items: flex-start; padding: 16px 17px; border-radius: 14px;
  border: 1px solid var(--line); background: var(--surface-2);
}
.fb-verdict.is-correct { background: var(--green-soft); border-color: color-mix(in srgb, var(--green) 36%, transparent); }
.fb-verdict.is-wrong { background: var(--red-soft); border-color: color-mix(in srgb, var(--red) 36%, transparent); }
.fb-verdict.is-neutral { background: var(--gold-soft); border-color: color-mix(in srgb, var(--gold) 30%, transparent); }
.fb-icon { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; flex: 0 0 auto; font-size: 19px; font-weight: 800; color: #fff; }
.is-correct .fb-icon { background: var(--green); }
.is-wrong .fb-icon { background: var(--red); }
.is-neutral .fb-icon { background: var(--gold); }
.fb-verdict-main { flex: 1; min-width: 0; }
.fb-title { font-size: 16px; font-weight: 700; margin-bottom: 3px; }
.is-correct .fb-title { color: var(--green); }
.is-wrong .fb-title { color: var(--red); }
.is-neutral .fb-title { color: var(--gold); }
.fb-answer-line { font-size: 13px; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 6px 14px; }
.fb-answer-line b { font-family: var(--mono); color: var(--ink); font-size: 14px; }
.fb-detail { margin-top: 7px; font-size: 12.5px; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 6px; }
.pill { display: inline-flex; align-items: center; gap: 4px; border-radius: 999px; padding: 2px 9px; font-size: 11.5px; border: 1px solid var(--line); background: var(--surface); }
.pill.missed { color: var(--gold); border-color: color-mix(in srgb, var(--gold) 40%, transparent); background: var(--gold-soft); }
.pill.extra { color: var(--red); border-color: color-mix(in srgb, var(--red) 35%, transparent); background: var(--red-soft); }
.fb-block { margin-top: 16px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; padding: 15px 17px; }
.fb-block h4 { margin: 0 0 8px; font-size: 13px; letter-spacing: .04em; color: var(--brand-ink); display: flex; align-items: center; gap: 7px; }
.fb-block h4 .num { width: 20px; height: 20px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-size: 11px; font-family: var(--mono); }
.fb-block .body { font-size: 14px; line-height: 1.85; color: var(--ink-2); white-space: pre-wrap; }
.fb-block.knowledge { background: linear-gradient(180deg, var(--gold-soft), var(--surface-2)); border-color: color-mix(in srgb, var(--gold) 24%, var(--line)); }
.fb-block.knowledge h4 { color: var(--gold); }
.fb-block.knowledge h4 .num { background: var(--gold); }
.fb-next { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 18px; padding-top: 2px; }
.fb-next .hint { font-size: 12px; color: var(--ink-3); }
.fb-next .btn { min-width: 130px; justify-content: center; }
.fb-tools { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.mini-btn { border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); border-radius: 8px; padding: 5px 10px; font-size: 12px; }
.mini-btn:hover { border-color: var(--brand); color: var(--brand-ink); }
.mini-btn.danger:hover { border-color: var(--red); color: var(--red); }

/* ---------- 业务题 / 背诵题 ---------- */
.essay-area { margin-top: 20px; }
.essay-label { display: block; font-size: 12.5px; color: var(--ink-3); margin-bottom: 7px; }
.essay-area textarea {
  width: 100%; min-height: 140px; resize: vertical; padding: 13px 15px;
  border: 1.5px solid var(--line); border-radius: 13px; background: var(--surface-2);
  font-size: 14px; line-height: 1.8; outline: none; transition: .15s;
}
.essay-area textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); background: var(--surface); }
.essay-actions { display: flex; align-items: center; gap: 14px; margin-top: 12px; flex-wrap: wrap; }
.answer-doc { margin-top: 18px; }
.answer-doc .doc-block { margin: 0 0 11px; font-size: 14.5px; line-height: 1.9; }
.answer-doc h5 { margin: 18px 0 8px; font-size: 13.5px; color: var(--brand-ink); }
.answer-doc h5:first-child { margin-top: 0; }
.answer-doc table { width: 100%; border-collapse: collapse; margin: 10px 0 14px; font-size: 12.5px; }
.answer-doc th, .answer-doc td { border: 1px solid var(--line); padding: 7px 9px; text-align: left; vertical-align: top; }
.answer-doc th { background: var(--surface-3); }
.answer-doc ul { margin: 6px 0 12px; padding-left: 22px; }
.answer-doc li { margin: 5px 0; }
.doc-section { margin-top: 18px; border-top: 1px dashed var(--line-strong); padding-top: 16px; }
.doc-section-title { font-size: 13px; font-weight: 700; letter-spacing: .05em; color: var(--brand-ink); margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.doc-section-title::before { content: ""; width: 4px; height: 15px; border-radius: 3px; background: var(--brand); }
.self-assess { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin-top: 18px; padding: 14px 16px; border-radius: 13px; background: var(--surface-2); border: 1px solid var(--line); }
.self-assess .label { font-size: 13px; color: var(--ink-2); margin-right: 4px; }
.assess-btn { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 7px 15px; font-size: 13px; color: var(--ink-2); }
.assess-btn:hover { border-color: var(--brand); }
.assess-btn.is-mastered { background: var(--green-soft); border-color: var(--green); color: var(--green); font-weight: 600; }
.assess-btn.is-review { background: var(--gold-soft); border-color: var(--gold); color: var(--gold); font-weight: 600; }
.assess-state { font-size: 12.5px; color: var(--ink-3); margin-left: auto; }
.card-points { margin: 0; padding-left: 22px; }
.card-points li { margin: 8px 0; font-size: 14.5px; line-height: 1.9; }
.points-block { background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; margin-top: 16px; }
.points-block h4 { margin: 0 0 10px; font-size: 13px; color: var(--brand-ink); letter-spacing: .04em; }

/* ---------- 底部导航 ---------- */
.pager { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 18px; }
.pager .btn { min-width: 110px; justify-content: center; }
.foot-note { text-align: center; color: var(--ink-3); font-size: 11.5px; margin: 26px 0 0; }
.bottom-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 55;
  height: var(--bottom-h); padding: 8px 16px calc(8px + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  border-top: 1px solid var(--line); backdrop-filter: blur(16px);
  display: block;
}
.bottom-inner { max-width: 720px; margin: 0 auto; height: 100%; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.bottom-btn { border: 0; background: transparent; color: var(--ink-3); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border-radius: 10px; font-size: 10.5px; }
.bottom-btn svg { width: 21px; height: 21px; }
.bottom-btn:active { background: var(--surface-3); }
.bottom-btn.is-on { color: var(--gold); }
.bottom-btn.is-on svg { fill: currentColor; }
.bottom-next { color: var(--brand); font-weight: 700; }
@media (min-width: 861px) {
  .bottom-bar { padding: 6px 16px; height: 58px; box-shadow: 0 -6px 24px rgba(15,35,40,.06); }
  .bottom-inner { max-width: 560px; gap: 4px; }
  .bottom-btn { flex-direction: row; gap: 7px; font-size: 12px; }
  .bottom-btn svg { width: 18px; height: 18px; }
  .bottom-next { justify-content: center; }
}
.backtop { position: fixed; right: 18px; bottom: calc(var(--bottom-h) + 18px); z-index: 40; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow-md); color: var(--ink-2); font-size: 18px; }

/* ---------- 答题卡抽屉 ---------- */
.drawer-mask, .modal-mask { position: fixed; inset: 0; background: rgba(12,20,24,.48); z-index: 70; backdrop-filter: blur(2px); }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(480px, 94vw); z-index: 71;
  background: var(--surface); border-left: 1px solid var(--line); box-shadow: var(--shadow-lg);
  transform: translateX(102%); transition: transform .26s cubic-bezier(.2,.8,.2,1);
  display: flex; flex-direction: column;
}
.drawer.is-open { transform: none; }
.drawer-head, .modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 20px 22px 14px; border-bottom: 1px solid var(--line); }
.drawer-head h2, .modal-head h2 { margin: 0; font-family: var(--serif); font-size: 20px; }
.drawer-head p, .modal-head p { margin: 3px 0 0; font-size: 12px; color: var(--ink-3); }
.drawer-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 15px 22px 4px; }
.stat-box { background: var(--surface-2); border: 1px solid var(--line); border-radius: 11px; padding: 9px 10px; text-align: center; }
.stat-box strong { display: block; font-size: 19px; line-height: 1.3; }
.stat-box span { font-size: 10.5px; color: var(--ink-3); }
.stat-box.good strong { color: var(--green); }
.stat-box.bad strong { color: var(--red); }
.stat-box.gold strong { color: var(--gold); }
.legend { display: flex; flex-wrap: wrap; gap: 13px; padding: 10px 22px 6px; font-size: 11px; color: var(--ink-3); }
.legend span { display: flex; align-items: center; gap: 5px; }
.lg { width: 11px; height: 11px; border-radius: 3px; display: inline-grid; place-items: center; font-style: normal; font-size: 9px; }
.lg-correct { background: var(--green); }
.lg-wrong { background: var(--red); }
.lg-unanswered { background: var(--surface-3); border: 1px solid var(--line-strong); }
.lg-fav { background: var(--gold); color: #fff; }
.drawer-body { flex: 1; overflow-y: auto; padding: 10px 22px 30px; }
.ac-group { margin-top: 16px; }
.ac-group h4 { margin: 0 0 8px; font-size: 12px; color: var(--ink-3); font-weight: 600; display: flex; justify-content: space-between; }
.ac-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(42px, 1fr)); gap: 7px; }
.ac-cell {
  position: relative; height: 38px; border-radius: 9px; border: 1px solid var(--line);
  background: var(--surface-2); color: var(--ink-2); font-family: var(--mono); font-size: 12px;
  display: grid; place-items: center; transition: .12s;
}
.ac-cell:hover { border-color: var(--brand); transform: translateY(-1px); }
.ac-cell.is-correct { background: var(--green); border-color: var(--green); color: #fff; }
.ac-cell.is-wrong { background: var(--red); border-color: var(--red); color: #fff; }
.ac-cell.is-current { outline: 2px solid var(--brand); outline-offset: 2px; }
.ac-cell .star { position: absolute; top: -4px; right: -3px; font-size: 10px; color: var(--gold); background: var(--surface); border-radius: 50%; width: 13px; height: 13px; display: grid; place-items: center; border: 1px solid var(--gold); }
.ac-cell.is-done { font-weight: 700; }

/* ---------- 考点速查 ---------- */
.modal {
  position: fixed; z-index: 71; left: 50%; top: 50%; transform: translate(-50%, -48%) scale(.98);
  width: min(880px, 94vw); max-height: 86vh; background: var(--surface); border: 1px solid var(--line);
  border-radius: 20px; box-shadow: var(--shadow-lg); display: flex; flex-direction: column;
  opacity: 0; pointer-events: none; transition: .2s;
}
.modal.is-open { opacity: 1; pointer-events: auto; transform: translate(-50%, -50%) scale(1); }
.ref-toolbar { display: flex; align-items: center; gap: 12px; padding: 12px 22px; border-bottom: 1px solid var(--line); }
.ref-tabs { display: flex; gap: 5px; flex-wrap: wrap; flex: 1; }
.ref-tab { border: 1px solid var(--line); background: var(--surface-2); border-radius: 999px; padding: 4px 10px; font-size: 11.5px; color: var(--ink-2); }
.ref-tab.is-active { background: var(--brand); border-color: var(--brand); color: #fff; }
.ref-toolbar input { width: 210px; border: 1px solid var(--line); background: var(--surface-2); border-radius: 9px; padding: 7px 11px; font-size: 12px; outline: none; }
.ref-toolbar input:focus { border-color: var(--brand); }
.ref-body { overflow-y: auto; padding: 18px 22px 28px; }
.ref-card { border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); padding: 15px 17px; margin-bottom: 12px; }
.ref-card h4 { margin: 0 0 8px; font-size: 14px; color: var(--ink); line-height: 1.6; }
.ref-card h4 span { font-family: var(--mono); font-size: 11px; color: var(--brand); margin-right: 7px; }
.ref-card ul { margin: 0; padding-left: 20px; }
.ref-card li { margin: 6px 0; font-size: 13px; line-height: 1.8; color: var(--ink-2); }
.ref-empty { text-align: center; color: var(--ink-3); padding: 40px 0; font-size: 13px; }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--bottom-h) + 24px); transform: translate(-50%, 14px);
  z-index: 120; background: var(--ink); color: var(--surface); padding: 9px 18px; border-radius: 999px;
  font-size: 12.5px; opacity: 0; pointer-events: none; transition: .22s; box-shadow: var(--shadow-md);
  max-width: 88vw; text-align: center;
}
.toast.is-show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 响应式 ---------- */
@media (max-width: 1080px) {
  .layout { grid-template-columns: 250px minmax(0, 1fr); }
  .sidebar { padding-left: 12px; padding-right: 12px; }
  .main { padding: 20px 18px 36px; }
  .question-card { padding: 22px 22px 20px; }
}
@media (max-width: 860px) {
  :root { --topbar-h: 58px; --bottom-h: 66px; }
  body { padding-bottom: calc(var(--bottom-h) + 10px); }
  .menu-btn { display: grid; }
  .brand-text small { display: none; }
  .topbar { padding: 0 12px; gap: 8px; }
  .topbar-center { display: none; }
  .layout { display: block; }
  .sidebar {
    position: fixed; z-index: 50; left: 0; top: 0; bottom: 0; width: min(310px, 86vw);
    height: 100%; transform: translateX(-104%); transition: transform .24s; padding-top: 18px;
    background: var(--surface); box-shadow: var(--shadow-lg);
  }
  .sidebar.is-open { transform: none; }
  .sidebar-mask { inset: 0; }
  .main { padding: 16px 12px 26px; }
  .question-card { border-radius: 17px; padding: 18px 16px 16px; }
  .q-stem { font-size: 18px; }
  .bottom-bar { display: block; }
  .pager { display: block; }
  .quiz-top { margin-bottom: 9px; }
  .mini-stat { display: none; }
  .q-head { gap: 8px; }
  .fav-btn span { display: none; }
  .feedback { margin-top: 18px; }
  .fb-next { flex-direction: column; align-items: stretch; }
  .fb-next .btn { width: 100%; }
  .drawer-stats { grid-template-columns: repeat(4, 1fr); padding-left: 14px; padding-right: 14px; }
  .drawer-head, .modal-head { padding: 16px 16px 12px; }
  .ref-toolbar { flex-direction: column; align-items: stretch; padding: 10px 16px; }
  .ref-toolbar input { width: 100%; }
  .ref-body { padding: 14px 16px 22px; }
  .modal { width: 96vw; max-height: 90vh; }
}
@media (max-width: 560px) {
  .brand-text strong { font-size: 15.5px; }
  .brand-mark { width: 34px; height: 34px; font-size: 18px; }
  .topbar-right { gap: 2px; }
  .icon-btn { width: 34px; height: 34px; }
  .q-stem { font-size: 17px; line-height: 1.8; }
  .option { padding: 11px 12px; gap: 10px; }
  .option .opt-text { font-size: 14.5px; }
  .option .letter { width: 25px; height: 25px; font-size: 12px; }
  .fb-verdict { padding: 13px; gap: 10px; }
  .fb-icon { width: 32px; height: 32px; font-size: 16px; }
  .fb-answer-line { flex-direction: column; gap: 3px; }
  .fb-block { padding: 13px 13px; }
  .fb-block .body { font-size: 13.5px; }
  .drawer-stats { grid-template-columns: repeat(2, 1fr); }
  .toast { bottom: calc(var(--bottom-h) + 14px); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
/* ---------- 交互补充 ---------- */
[hidden] { display: none !important; }
body.is-locked { overflow: hidden; }
.question-card { scroll-margin-top: calc(var(--topbar-h) + 14px); }
.q-stem table, .answer-doc table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.q-stem th, .q-stem td, .answer-doc th, .answer-doc td { border: 1px solid var(--line); padding: 7px 9px; text-align: left; vertical-align: top; }
.q-stem th, .answer-doc th { background: var(--surface-3); }
.table-wrap { width: 100%; overflow-x: auto; margin: 10px 0 14px; }
.table-wrap table { min-width: 460px; margin: 0; }
.fb-block .answer-doc { margin-top: 0; }
.fb-block .answer-doc .doc-block { font-size: 14px; }
.fb-block .answer-doc h5 { margin-top: 14px; }
.fb-verdict .pill { max-width: 100%; white-space: normal; line-height: 1.65; }
