/* ==========================================================================
   一页纸 · 考研政治刷题 — 设计系统
   宣纸 / 朱印：浅色为纸，深色为夜读
   ========================================================================== */

:root {
  --serif: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC", "SimSun", serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --paper: #f4efe4;
  --bg: #f2ecdf;
  --surface: #fffdf7;
  --surface-2: #efe8d9;
  --ink: #221d17;
  --ink-2: #4b4337;
  --muted: #8b7f6d;
  --line: #e3d9c6;
  --line-strong: #d2c5ac;
  --accent: #b23a2e;
  --accent-ink: #8e2b21;
  --accent-soft: #f8e8e2;
  --gold: #a57f37;
  --ok: #2f6b4f;
  --ok-soft: #e7f0e9;
  --bad: #b23a2e;
  --bad-soft: #f9e8e3;
  --shadow-sm: 0 1px 2px rgba(78, 54, 30, .06);
  --shadow: 0 2px 4px rgba(78, 54, 30, .05), 0 18px 40px -28px rgba(78, 54, 30, .45);
  --radius: 18px;
  --radius-sm: 12px;
  --sidebar: 252px;
}

html[data-theme="dark"] {
  --paper: #141210;
  --bg: #0f0d0b;
  --surface: #1b1815;
  --surface-2: #241f1a;
  --ink: #f1e9dd;
  --ink-2: #cfc4b4;
  --muted: #948878;
  --line: #2f2822;
  --line-strong: #423a30;
  --accent: #e2705f;
  --accent-ink: #f0a294;
  --accent-soft: #2d1d19;
  --gold: #d4ae66;
  --ok: #7fc39d;
  --ok-soft: #16261e;
  --bad: #e2705f;
  --bad-soft: #2c1a17;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow: 0 2px 6px rgba(0, 0, 0, .35), 0 22px 50px -30px #000;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background:
    radial-gradient(900px 500px at 88% -10%, rgba(178, 58, 46, .06), transparent 70%),
    radial-gradient(700px 420px at -10% 100%, rgba(165, 127, 55, .07), transparent 70%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: .5;
  background-image:
    repeating-linear-gradient(0deg, rgba(120, 95, 60, .022) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(90deg, rgba(120, 95, 60, .02) 0 1px, transparent 1px 4px);
}

html[data-theme="dark"] body::before { opacity: .35; }

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; }

/* ============================ 骨架 ============================ */

.app {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: var(--sidebar) minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 26px;
  padding: 30px 20px 22px;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, color-mix(in srgb, var(--surface) 70%, transparent), transparent 55%);
  backdrop-filter: blur(6px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 6px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--accent);
  color: #fdf6ea;
  font-family: var(--serif);
  font-size: 24px;
  line-height: 1;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .18), 0 6px 14px -8px var(--accent);
}

.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text strong { font-family: var(--serif); font-size: 19px; letter-spacing: .06em; }
.brand-text em { font-style: normal; font-size: 11px; color: var(--muted); letter-spacing: .12em; margin-top: 3px; }

.nav { display: flex; flex-direction: column; gap: 3px; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 14px;
  color: var(--ink-2);
  transition: background .18s, color .18s, transform .18s;
}
.nav-item:hover { background: var(--surface-2); color: var(--ink); }
.nav-item.active { background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }
.nav-ico { width: 18px; text-align: center; opacity: .75; font-size: 13px; }

.dot-badge {
  margin-left: auto;
  min-width: 20px;
  padding: 1px 6px;
  border-radius: 99px;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  text-align: center;
  font-family: var(--mono);
}

.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 14px; }

.side-progress {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.ring {
  --p: 0;
  width: 52px;
  height: 52px;
  flex: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(var(--accent) calc(var(--p) * 1%), var(--surface-2) 0);
  position: relative;
}
.ring::after {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  background: var(--surface);
}
.ring span {
  position: relative;
  z-index: 1;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-2);
}

.side-progress-txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.side-progress-txt b { font-family: var(--mono); font-size: 13px; letter-spacing: .02em; }
.side-progress-txt span { font-size: 11px; color: var(--muted); }

.ghost-btn {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-2);
  border-radius: 10px;
  padding: 9px 12px;
  cursor: pointer;
  transition: background .18s, border-color .18s, color .18s;
}
.ghost-btn:hover { background: var(--surface-2); border-color: var(--line-strong); color: var(--ink); }
.ghost-btn.small { font-size: 12px; padding: 8px 10px; }

.side-note { margin: 0; font-size: 10.5px; color: var(--muted); text-align: center; letter-spacing: .02em; }

.main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 44px clamp(20px, 4vw, 56px) 28px;
}

.app-view { flex: 1; width: 100%; max-width: 940px; margin: 0 auto; }

.foot {
  max-width: 940px;
  width: 100%;
  margin: 40px auto 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 11px;
  color: var(--muted);
  line-height: 1.7;
}

.tabbar { display: none; }
.mobile-top { display: none; }

/* ============================ 通用排版 ============================ */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  letter-spacing: .18em;
  color: var(--muted);
  text-transform: uppercase;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--accent);
}

h1, h2, h3 { font-family: var(--serif); font-weight: 600; margin: 0; letter-spacing: .01em; }

.view-head { margin-bottom: 26px; }
.view-head h1 { font-size: clamp(26px, 3.4vw, 34px); line-height: 1.25; margin: 10px 0 8px; }
.view-head p { margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.7; }

.section-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin: 38px 0 16px;
}
.section-row h2 { font-size: 19px; }
.section-row .aside { font-size: 12px; color: var(--muted); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 11px;
  border: 1px solid transparent;
  background: var(--accent);
  color: #fdf6ea;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 10px 22px -14px var(--accent);
  transition: transform .16s, box-shadow .16s, background .16s, opacity .16s;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 14px 26px -14px var(--accent); }
.btn:active { transform: translateY(0); }
.btn[disabled] { opacity: .42; cursor: not-allowed; transform: none; box-shadow: none; }

.btn.line {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--ink);
  box-shadow: none;
}
.btn.line:hover { background: var(--surface-2); }
.btn.plain {
  background: transparent;
  color: var(--muted);
  box-shadow: none;
  padding: 10px 12px;
  font-weight: 500;
}
.btn.plain:hover { color: var(--ink); }

.btn.sm { padding: 8px 14px; font-size: 12.5px; border-radius: 9px; }

/* ============================ 首页 ============================ */

.hero {
  position: relative;
  padding: 38px 34px 34px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    radial-gradient(120% 150% at 100% 0%, color-mix(in srgb, var(--accent) 9%, transparent), transparent 55%),
    var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.hero h1 {
  font-size: clamp(30px, 4.2vw, 44px);
  line-height: 1.2;
  margin: 14px 0 12px;
  max-width: 15em;
}
.hero h1 em {
  font-style: normal;
  color: var(--accent);
  position: relative;
}
.hero h1 em {
  background: linear-gradient(transparent 66%, color-mix(in srgb, var(--accent) 16%, transparent) 66%);
  padding: 0 .06em;
}
.hero p.lead { margin: 0; max-width: 34em; color: var(--ink-2); font-size: 14px; line-height: 1.85; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 26px;
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px dashed var(--line-strong);
}
.hero-stats div { display: flex; flex-direction: column; gap: 3px; }
.hero-stats b { font-family: var(--mono); font-size: 20px; letter-spacing: -.02em; }
.hero-stats span { font-size: 11px; color: var(--muted); letter-spacing: .06em; }

.cta-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 16px; }

.cta-card {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  text-align: left;
  transition: transform .18s, border-color .18s, box-shadow .18s;
}
.cta-card:hover { transform: translateY(-2px); border-color: var(--line-strong); box-shadow: var(--shadow); }
.cta-ico {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: none;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-size: 17px;
}
.cta-card b { display: block; font-size: 14.5px; font-weight: 600; margin-bottom: 4px; }
.cta-card span { font-size: 12px; color: var(--muted); line-height: 1.5; }
.cta-card .arrow { margin-left: auto; color: var(--muted); font-size: 15px; transition: transform .18s; }
.cta-card:hover .arrow { transform: translateX(3px); color: var(--accent); }

.topic-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }

.topic-card {
  position: relative;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  text-align: left;
  transition: transform .18s, border-color .18s, box-shadow .18s;
}
.topic-card:hover { transform: translateY(-2px); border-color: var(--line-strong); box-shadow: var(--shadow); }
.topic-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.topic-name { font-family: var(--serif); font-size: 17px; }
.topic-count { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.topic-meta { margin-top: 14px; display: flex; align-items: center; gap: 8px; }
.bar { flex: 1; height: 4px; border-radius: 99px; background: var(--line); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 99px; background: var(--accent); width: 0; transition: width .5s cubic-bezier(.2,.7,.2,1); }
.topic-meta em { font-style: normal; font-family: var(--mono); font-size: 10.5px; color: var(--muted); }

/* ============================ 练习 ============================ */

.pq-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}
.pq-bar .back {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  cursor: pointer;
  flex: none;
}
.pq-bar .back:hover { background: var(--surface-2); }
.pq-bar .title { min-width: 0; flex: 1; }
.pq-bar .title b { display: block; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pq-bar .title span { font-size: 11.5px; color: var(--muted); }
.pq-count { font-family: var(--mono); font-size: 12px; color: var(--muted); white-space: nowrap; }
.pq-count b { color: var(--ink); font-size: 14px; }

.progress-line {
  height: 3px;
  background: var(--surface-2);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 24px;
}
.progress-line i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--gold)); transition: width .4s ease; }

.pq-card {
  padding: clamp(20px, 3.2vw, 32px);
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow);
  animation: rise .35s cubic-bezier(.2,.7,.2,1) both;
}
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.pq-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 99px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  font-size: 11px;
  color: var(--ink-2);
  letter-spacing: .02em;
}
.chip.accent { background: var(--accent-soft); border-color: transparent; color: var(--accent-ink); }
.chip.mono { font-family: var(--mono); }
.star-btn {
  margin-left: auto;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
  transition: color .18s, background .18s, border-color .18s;
}
.star-btn:hover { background: var(--surface-2); color: var(--gold); }
.star-btn.on { color: var(--gold); border-color: color-mix(in srgb, var(--gold) 45%, transparent); background: color-mix(in srgb, var(--gold) 10%, transparent); }

.stem {
  font-family: var(--serif);
  font-size: clamp(16.5px, 2.1vw, 18.5px);
  line-height: 1.95;
  letter-spacing: .01em;
  color: var(--ink);
  margin: 0 0 24px;
  white-space: pre-wrap;
  word-break: break-word;
}

.options { display: flex; flex-direction: column; gap: 10px; }

.opt {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  text-align: left;
  cursor: pointer;
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--ink-2);
  transition: border-color .16s, background .16s, transform .12s, color .16s;
}
.opt:hover { border-color: var(--line-strong); background: var(--surface-2); }
.opt:active { transform: scale(.995); }

.opt-key {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  flex: none;
  margin-top: 1px;
  border-radius: 8px;
  border: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  background: var(--surface-2);
  transition: all .16s;
}
.opt-text { flex: 1; }

.opt.sel { border-color: var(--accent); background: var(--accent-soft); color: var(--ink); }
.opt.sel .opt-key { background: var(--accent); border-color: var(--accent); color: #fff; }

.opt.correct { border-color: color-mix(in srgb, var(--ok) 55%, transparent); background: var(--ok-soft); color: var(--ink); }
.opt.correct .opt-key { background: var(--ok); border-color: var(--ok); color: #fff; }
.opt.wrong { border-color: color-mix(in srgb, var(--bad) 55%, transparent); background: var(--bad-soft); color: var(--ink); }
.opt.wrong .opt-key { background: var(--bad); border-color: var(--bad); color: #fff; }
.opt.dim { opacity: .62; }
.opt[disabled] { cursor: default; }
.opt[disabled]:hover { transform: none; }

.pq-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px dashed var(--line-strong);
}
.pq-actions .hint { font-size: 11.5px; color: var(--muted); margin-right: auto; }
.pq-actions .hint kbd {
  font-family: var(--mono);
  font-size: 10px;
  padding: 2px 5px;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 5px;
  background: var(--surface-2);
  color: var(--ink-2);
}

/* 判定 + 解析 */
.verdict {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 22px;
  padding: 14px 18px;
  border-radius: 14px;
  border: 1px solid transparent;
  animation: rise .3s ease both;
}
.verdict.ok { background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 30%, transparent); }
.verdict.bad { background: var(--bad-soft); border-color: color-mix(in srgb, var(--bad) 30%, transparent); }
.verdict .mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 14px;
  color: #fff;
  flex: none;
}
.verdict.ok .mark { background: var(--ok); }
.verdict.bad .mark { background: var(--bad); }
.verdict b { font-size: 14.5px; }
.verdict span { font-size: 12px; color: var(--ink-2); display: block; margin-top: 2px; }
.verdict.neutral { background: color-mix(in srgb, var(--gold) 10%, transparent); border-color: color-mix(in srgb, var(--gold) 30%, transparent); }
.verdict.neutral .mark { background: var(--gold); }
.verdict .ans { margin-left: auto; font-family: var(--mono); font-size: 13px; letter-spacing: .12em; color: var(--ink); }

.explain {
  margin-top: 16px;
  padding: 20px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 4px var(--radius-sm) var(--radius-sm) 4px;
  background: color-mix(in srgb, var(--surface-2) 55%, var(--surface));
  animation: rise .32s ease both;
}
.explain h4 {
  margin: 0 0 10px;
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: .18em;
  color: var(--muted);
  font-weight: 600;
}
.explain-body { font-size: 14px; line-height: 1.95; color: var(--ink-2); white-space: pre-wrap; }
.explain-body .x { color: var(--bad); font-weight: 600; }
.explain-body .v { color: var(--ok); font-weight: 600; }
.explain-foot { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 8px; }

/* ============================ 结果页 ============================ */

.result-card {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.big-ring { --p: 0; width: 180px; height: 180px; border-radius: 50%; display: grid; place-items: center; position: relative; background: conic-gradient(var(--accent) calc(var(--p) * 1%), var(--surface-2) 0); }
.big-ring::after { content: ""; position: absolute; inset: 14px; border-radius: 50%; background: var(--surface); }
.big-ring-txt { position: relative; z-index: 1; text-align: center; }
.big-ring-txt b { display: block; font-family: var(--mono); font-size: 40px; line-height: 1; letter-spacing: -.03em; }
.big-ring-txt span { font-size: 11px; color: var(--muted); letter-spacing: .12em; }

.result-info h2 { font-size: 26px; margin-bottom: 10px; }
.result-info p { margin: 0 0 18px; color: var(--muted); font-size: 13px; line-height: 1.7; }
.result-facts { display: flex; flex-wrap: wrap; gap: 26px; }
.result-facts div b { display: block; font-family: var(--mono); font-size: 18px; }
.result-facts div span { font-size: 11px; color: var(--muted); }

.review-list { margin-top: 26px; display: flex; flex-direction: column; gap: 10px; }
.review-item {
  display: flex;
  gap: 14px;
  padding: 15px 18px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--bad);
  border-radius: 4px var(--radius-sm) var(--radius-sm) 4px;
  background: var(--surface);
  cursor: pointer;
  transition: background .16s, transform .16s;
}
.review-item:hover { background: var(--surface-2); transform: translateX(2px); }
.review-item .ri-no { font-family: var(--mono); font-size: 11px; color: var(--muted); flex: none; padding-top: 3px; }
.review-item .ri-stem { font-size: 13.5px; line-height: 1.7; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.review-item .ri-ans { margin-left: auto; flex: none; font-family: var(--mono); font-size: 11px; color: var(--bad); padding-top: 3px; }

/* ============================ 统计 ============================ */

.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.stat {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.stat span { font-size: 11px; color: var(--muted); letter-spacing: .06em; }
.stat b { display: block; margin-top: 8px; font-family: var(--mono); font-size: 26px; letter-spacing: -.03em; }
.stat em { font-style: normal; font-size: 11px; color: var(--muted); }

.panel {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.panel + .panel { margin-top: 14px; }
.panel h3 { font-size: 16px; margin-bottom: 4px; }
.panel .panel-sub { font-size: 11.5px; color: var(--muted); margin-bottom: 18px; }

.acc-row { display: grid; grid-template-columns: 76px minmax(0, 1fr) 92px; align-items: center; gap: 14px; padding: 9px 0; }
.acc-row .nm { font-size: 13px; }
.acc-row .bar { height: 6px; }
.acc-row .bar i { background: linear-gradient(90deg, var(--accent), var(--gold)); }
.acc-row .num { text-align: right; font-family: var(--mono); font-size: 11px; color: var(--muted); }
.acc-row .num b { color: var(--ink); font-size: 12.5px; margin-right: 7px; }

.day-bars { display: flex; align-items: flex-end; gap: 10px; height: 130px; padding-top: 10px; }
.day-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; justify-content: flex-end; }
.day-col .bar-v { width: 100%; max-width: 38px; border-radius: 6px 6px 3px 3px; background: var(--line); min-height: 4px; transition: height .4s ease; position: relative; }
.day-col .bar-v.has { background: linear-gradient(180deg, var(--accent), color-mix(in srgb, var(--accent) 60%, var(--gold))); }
.day-col em { font-style: normal; font-family: var(--mono); font-size: 10px; color: var(--muted); }
.day-col .bar-v span { position: absolute; top: -17px; left: 50%; transform: translateX(-50%); font-family: var(--mono); font-size: 9.5px; color: var(--muted); }

/* ============================ 方法手册 ============================ */

.method-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  position: sticky;
  top: 0;
  z-index: 5;
  padding: 10px 0 14px;
  background: linear-gradient(180deg, var(--bg) 65%, transparent);
}
.mnav {
  padding: 7px 13px;
  border-radius: 99px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 12px;
  color: var(--ink-2);
  cursor: pointer;
  transition: all .16s;
}
.mnav:hover { border-color: var(--line-strong); }
.mnav.on { background: var(--accent); border-color: var(--accent); color: #fdf6ea; }

.search {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
  font-size: 13.5px;
  color: var(--ink);
  margin-bottom: 18px;
}
.search::placeholder { color: var(--muted); }
.search:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

.m-section { margin-bottom: 34px; scroll-margin-top: 70px; }
.m-section-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.m-section-head h2 { font-size: 20px; }
.m-section-head span { font-size: 11.5px; color: var(--muted); }

.m-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.m-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.m-card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.m-card-head h3 { font-size: 15.5px; flex: 1; }
.tag { font-size: 10px; padding: 2px 7px; border-radius: 5px; background: var(--accent-soft); color: var(--accent-ink); letter-spacing: .04em; flex: none; }
.m-card ol { margin: 0; padding-left: 19px; display: flex; flex-direction: column; gap: 8px; }
.m-card li { font-size: 13px; line-height: 1.8; color: var(--ink-2); }
.m-card li::marker { color: var(--accent); font-family: var(--mono); font-size: 11px; }

.quote-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.quote-item {
  padding: 14px 16px;
  border-left: 2px solid var(--gold);
  border-radius: 3px 10px 10px 3px;
  background: var(--surface);
  font-family: var(--serif);
  font-size: 13.5px;
  line-height: 1.85;
  color: var(--ink-2);
}

.sheet-wrap { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
table.sheet { width: 100%; border-collapse: collapse; font-size: 13px; }
table.sheet th {
  text-align: left;
  padding: 11px 16px;
  background: var(--surface-2);
  font-size: 10.5px;
  letter-spacing: .1em;
  color: var(--muted);
  font-weight: 600;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
table.sheet td { padding: 11px 16px; border-bottom: 1px solid var(--line); color: var(--ink-2); line-height: 1.6; }
table.sheet tr:last-child td { border-bottom: 0; }
table.sheet tr:hover td { background: color-mix(in srgb, var(--surface-2) 55%, transparent); }
table.sheet td:first-child { font-family: var(--serif); color: var(--ink); font-weight: 600; }
.v-badge { display: inline-block; padding: 2px 7px; border-radius: 5px; font-size: 10.5px; white-space: nowrap; }
.v-badge.hi { background: var(--bad-soft); color: var(--bad); }
.v-badge.mid { background: color-mix(in srgb, var(--gold) 14%, transparent); color: var(--gold); }
.v-badge.lo { background: var(--ok-soft); color: var(--ok); }

/* ============================ 列表（错题/收藏） ============================ */

.filter-row { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 16px; }

.q-list { display: flex; flex-direction: column; gap: 9px; }
.q-row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 15px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  transition: border-color .16s, transform .16s, box-shadow .16s;
}
.q-row:hover { border-color: var(--line-strong); transform: translateX(2px); box-shadow: var(--shadow-sm); }
.q-row .no { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.q-row .body { min-width: 0; }
.q-row .body b {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.65;
  color: var(--ink);
}
.q-row .body span { font-size: 11px; color: var(--muted); }
.q-row .acts { display: flex; gap: 6px; }
.icon-btn {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  transition: all .16s;
}
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.icon-btn.danger:hover { color: var(--bad); border-color: var(--bad); }

.empty {
  padding: 60px 20px;
  text-align: center;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 60%, transparent);
}
.empty .ico { font-family: var(--serif); font-size: 34px; color: var(--line-strong); }
.empty h3 { margin: 12px 0 6px; font-size: 16px; }
.empty p { margin: 0 0 18px; font-size: 12.5px; color: var(--muted); }

/* ============================ Toast ============================ */

.toast {
  position: fixed;
  left: 50%;
  bottom: 30px;
  transform: translate(-50%, 16px);
  padding: 10px 18px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--paper);
  font-size: 12.5px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s, transform .22s;
  z-index: 60;
  box-shadow: 0 12px 30px -12px rgba(0, 0, 0, .5);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ============================ 响应式 ============================ */

@media (max-width: 1080px) {
  .topic-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 920px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { display: none; }

  .mobile-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: -6px 0 14px;
    padding: 8px 4px;
  }
  .mobile-top .brand-mini { display: flex; align-items: center; gap: 9px; }
  .mobile-top .brand-mini b { font-family: var(--serif); font-size: 16px; letter-spacing: .05em; }
  body[data-route="practice"] .mobile-top { display: none; }

  .pq-actions {
    position: sticky;
    bottom: calc(62px + env(safe-area-inset-bottom));
    z-index: 8;
    margin: 22px -20px -20px;
    padding: 12px 20px;
    background: color-mix(in srgb, var(--surface) 93%, transparent);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--line);
    border-radius: 0 0 20px 20px;
  }
  .main { padding: 22px 16px calc(88px + env(safe-area-inset-bottom)); }
  .foot { display: none; }
  .tabbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    padding: 7px 6px calc(7px + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    border-top: 1px solid var(--line);
    backdrop-filter: blur(12px);
  }
  .tab { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 0; font-size: 10px; color: var(--muted); border-radius: 9px; }
  .tab span { font-size: 14px; opacity: .8; }
  .tab.active { color: var(--accent); }
  .tab.active span { opacity: 1; }
  .hero { padding: 28px 22px 26px; }
  .result-card { grid-template-columns: 1fr; gap: 22px; text-align: center; justify-items: center; padding: 26px; }
  .big-ring { width: 150px; height: 150px; }
  .result-facts { justify-content: center; }
  .m-cards, .quote-list { grid-template-columns: 1fr; }
  .acc-row { grid-template-columns: 64px minmax(0, 1fr) 80px; gap: 10px; }
  .pq-actions .hint { display: none; }
  .pq-actions .btn { flex: 1; }
}

@media (max-width: 560px) {
  .cta-grid, .topic-grid { grid-template-columns: 1fr; }
  .hero-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 14px; margin-top: 22px; }
  .hero-actions .btn { flex: 1 1 auto; }
  .hero-actions .btn.plain { flex: 1 1 100%; justify-content: flex-start; padding-left: 4px; }
  .view-head h1 { font-size: 24px; }
  .hero h1 { font-size: 27px; }
  .stem { font-size: 16px; line-height: 1.9; }
  .opt { font-size: 14px; padding: 13px 14px; }
  .q-row { grid-template-columns: 44px minmax(0, 1fr); }
  .q-row .acts { grid-column: 1 / -1; justify-content: flex-end; }
  .stat b { font-size: 22px; }
  .review-item .ri-ans { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
