/* ===========================================================
   中考通关 · 样式表
   =========================================================== */
:root {
  --bg: #FAF7F1;
  --bg-2: #F3EEE4;
  --card: #FFFFFF;
  --ink: #1F2430;
  --ink-2: #3C4353;
  --muted: #79808E;
  --line: #EAE3D7;
  --line-2: #F1ECE2;
  --brand: #2F6BFF;
  --brand-ink: #1E4BD8;
  --soft: #EDF2FF;
  --ok: #109B74;
  --ok-soft: #E7F7F0;
  --bad: #D9534F;
  --bad-soft: #FDEDEC;
  --warn: #E8890C;
  --r: 20px;
  --r-sm: 14px;
  --shadow: 0 1px 2px rgba(31, 36, 48, .04), 0 14px 34px -20px rgba(31, 36, 48, .35);
  --shadow-sm: 0 1px 2px rgba(31, 36, 48, .05);
  --ff: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--ff);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
  font-size: 15px;
}
body::before {
  content: "";
  position: fixed; inset: 0;
  background:
    radial-gradient(900px 480px at 8% -12%, rgba(47, 107, 255, .12), transparent 62%),
    radial-gradient(680px 420px at 102% 4%, rgba(232, 137, 12, .12), transparent 60%),
    radial-gradient(700px 500px at 50% 108%, rgba(15, 155, 142, .09), transparent 60%);
  pointer-events: none; z-index: 0;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; font-size: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
input { font-family: inherit; }
h1, h2, h3, h4, p { margin: 0; }
::selection { background: rgba(47, 107, 255, .18); }

/* ---------------- 布局 ---------------- */
.app {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; gap: 22px;
  padding: 26px 18px 20px;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, .55);
  backdrop-filter: blur(14px);
}
.brand { display: flex; align-items: center; gap: 11px; padding: 0 6px; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 13px;
  display: grid; place-items: center;
  background: linear-gradient(140deg, #2F6BFF, #6C5CE7);
  color: #fff; font-weight: 800; font-size: 19px;
  box-shadow: 0 8px 18px -10px rgba(47, 107, 255, .9);
}
.brand b { display: block; font-size: 15.5px; letter-spacing: .2px; }
.brand small { display: block; color: var(--muted); font-size: 11.5px; letter-spacing: .6px; }
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px; border-radius: 12px;
  color: var(--ink-2); font-weight: 550; font-size: 14.5px;
  transition: background .16s, color .16s;
}
.nav-item .ico { width: 19px; height: 19px; opacity: .85; }
.nav-item:hover { background: rgba(31, 36, 48, .045); }
.nav-item.on { background: var(--soft); color: var(--brand-ink); }
.nav-item.on .ico { opacity: 1; }
.dot-num {
  margin-left: auto; font-style: normal; font-size: 11px; font-weight: 700;
  min-width: 18px; height: 18px; border-radius: 9px; padding: 0 5px;
  display: grid; place-items: center; background: var(--bad); color: #fff;
}
.side-foot { margin-top: auto; }
.lv-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px 13px; box-shadow: var(--shadow-sm); }
.lv-row { display: flex; justify-content: space-between; align-items: baseline; font-size: 12px; color: var(--muted); margin-bottom: 7px; }
.lv-row b { color: var(--ink); font-size: 13px; }
.lv-row.small { margin: 8px 0 0; font-size: 11.5px; }

.main {
  width: 100%; max-width: 1020px; margin: 0 auto;
  padding: 30px 34px 70px;
  min-width: 0;
}
.main.fade { animation: fadeUp .3s cubic-bezier(.2, .7, .3, 1) both; }
.tabbar { display: none; }

/* ---------------- 通用组件 ---------------- */
.eyebrow { font-size: 11.5px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--muted); font-weight: 650; }
.sub { color: var(--muted); font-size: 13.5px; margin-top: 4px; }
.muted { color: var(--muted); font-size: 13px; }
.hint { color: var(--muted); font-size: 12.5px; margin-top: 12px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { font-size: clamp(22px, 2.6vw, 30px); letter-spacing: -.4px; line-height: 1.28; margin-top: 6px; }
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r); padding: 22px;
  box-shadow: var(--shadow);
}
.card + .card, section.card + section.card { margin-top: 18px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-head h2 { font-size: 16px; letter-spacing: -.2px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 18px; }
.grid-2 > .card { margin-top: 0; }
.cards-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.card.stat { padding: 16px 18px; }
.card.stat b { display: block; font-size: 26px; letter-spacing: -.6px; }
.card.stat span { color: var(--muted); font-size: 12.5px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 10px 18px; border-radius: 12px; font-weight: 650; font-size: 14px;
  border: 1px solid transparent; background: #fff; color: var(--ink);
  transition: transform .14s, box-shadow .14s, background .14s, border-color .14s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn.primary { background: linear-gradient(180deg, #3B76FF, #2A62F0); color: #fff; box-shadow: 0 10px 22px -12px rgba(47, 107, 255, .95); }
.btn.primary:hover { box-shadow: 0 14px 26px -12px rgba(47, 107, 255, .95); }
.btn.ghost { background: transparent; border-color: var(--line); color: var(--ink-2); }
.btn.ghost:hover { border-color: #D9D1C2; background: rgba(255, 255, 255, .6); }
.btn.tiny { padding: 6px 12px; font-size: 12.5px; border-radius: 9px; }
.btn.danger { color: var(--bad); border-color: #F1C9C6; background: #fff; }
.btn.big { width: 100%; padding: 15px 20px; font-size: 15.5px; border-radius: 14px; }
.btn:disabled { opacity: .55; cursor: default; transform: none; }

.tag { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 650; }
.tag.subj { color: var(--c, var(--brand)); background: var(--bg, var(--soft)); }
.pdot { width: 7px; height: 7px; border-radius: 50%; background: var(--c, var(--brand)); display: inline-block; }
.bar { height: 7px; border-radius: 99px; background: var(--line-2); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 99px; background: var(--brand); transition: width .5s cubic-bezier(.2, .8, .3, 1); }
.ring { transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: var(--line-2); stroke-width: 9; }
.ring-fg { fill: none; stroke: var(--brand); stroke-width: 9; stroke-linecap: round; transition: stroke-dashoffset .7s cubic-bezier(.2, .8, .3, 1); }
.ring-txt { transform: rotate(90deg); transform-origin: 50px 50px; fill: var(--ink); font-size: 19px; font-weight: 750; }
.dots { display: inline-flex; gap: 3px; vertical-align: middle; }
.dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--line); }
.dots i.on { background: var(--warn); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--line); flex: none; }
.dot.ok { background: var(--ok); }
.dot.mid { background: var(--warn); }
.dot.low { background: #E8B4B0; }
.dot.none { background: #D8D2C6; }

.empty { text-align: center; padding: 34px 18px; }
.empty-ico { font-size: 32px; }
.empty h3 { font-size: 17px; margin: 8px 0 4px; }
.empty p { color: var(--muted); font-size: 13.5px; margin-bottom: 14px; }

/* ---------------- 今日 ---------------- */
.lv-pill { min-width: 168px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px 14px; box-shadow: var(--shadow-sm); }
.lv-pill span { font-size: 12px; color: var(--muted); }
.lv-pill b { float: right; font-size: 13px; }
.lv-pill .bar { margin-top: 8px; }

.hero { display: grid; grid-template-columns: auto 1fr auto; gap: 24px; align-items: center; padding: 24px 26px; background: linear-gradient(120deg, #fff, #FBFAF6 60%, #F4F8FF); }
.hero-left { display: grid; place-items: center; }
.hero-mid h2 { font-size: 21px; letter-spacing: -.3px; margin: 2px 0 2px; }
.hero-btns { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.hero-week { width: 176px; }
.week { display: flex; gap: 7px; margin-top: 10px; }
.week-col { flex: 1; text-align: center; }
.week-bar { height: 54px; display: flex; align-items: flex-end; background: var(--line-2); border-radius: 6px; overflow: hidden; }
.week-bar i { display: block; width: 100%; background: linear-gradient(180deg, #6C9BFF, #2F6BFF); border-radius: 5px; opacity: .55; }
.week-col.now .week-bar i { opacity: 1; }
.week-col span { display: block; font-size: 10.5px; color: var(--muted); margin-top: 5px; }
.week-col.now span { color: var(--brand-ink); font-weight: 700; }

.tasks { padding: 20px 24px 8px; margin-top: 18px; }
.task-group { border-top: 1px solid var(--line-2); padding: 14px 0 8px; }
.task-group:first-of-type { border-top: 0; }
.task-group h3 { display: flex; align-items: baseline; gap: 8px; font-size: 13px; color: var(--muted); letter-spacing: .3px; margin-bottom: 6px; }
.task-group h3 small { color: var(--muted); font-weight: 500; }
.task-list { list-style: none; margin: 0; padding: 0; }
.task { border-radius: 12px; }
.task + .task { border-top: 1px dashed var(--line-2); }
.task-hit { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 11px 8px; border-radius: 12px; transition: background .15s; }
.task-hit:hover { background: #FAF8F3; }
.task-mark { width: 20px; height: 20px; border-radius: 7px; border: 1.5px solid #DCD5C7; display: grid; place-items: center; font-size: 12px; color: #fff; flex: none; }
.task-mark.on { background: var(--ok); border-color: var(--ok); }
.task-body { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 3px; }
.task-title { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14.2px; }
.task-sub { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.task-sub .late { font-style: normal; color: var(--warn); font-weight: 600; }
.task-go { font-size: 12.5px; color: var(--brand); font-weight: 650; opacity: .85; }
.task.done .task-title { color: var(--muted); text-decoration: line-through; text-decoration-color: #C9C2B5; }
.wrong-cta { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border-radius: 13px; background: var(--bad-soft); border: 1px solid #F6DAD7; text-align: left; }
.wrong-cta b { display: block; font-size: 13.5px; }
.wrong-cta small { color: var(--muted); font-size: 12px; }
.wrong-cta.done { background: #F7F4EE; border-color: var(--line); }
.wrong-ico { font-size: 20px; }
.stat-mini h3 { font-size: 24px; letter-spacing: -.5px; margin: 4px 0 2px; }
.stat-mini h3 small { font-size: 12px; color: var(--muted); }

/* ---------------- 地图 ---------------- */
.map-legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.map-legend span { display: inline-flex; align-items: center; gap: 5px; }
.pills { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); font-size: 13px; font-weight: 600; color: var(--ink-2); transition: .15s; }
.pill:hover { border-color: #D9D1C2; }
.pill.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.pill.on .pdot { background: #fff; }
.grade-block { margin-bottom: 16px; }
.grade-block > summary { list-style: none; }
.grade-block > summary::-webkit-details-marker { display: none; }
.grade-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 10px; cursor: pointer; padding: 6px 2px; border-radius: 8px; }
.grade-head:hover { background: rgba(31, 36, 48, .03); }
.grade-head h3 { font-size: 14.5px; letter-spacing: .2px; }
.grade-head h3::before {
  content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 10px;
  border-right: 1.7px solid var(--muted); border-bottom: 1.7px solid var(--muted);
  transform: rotate(45deg) translate(-1px, -1px); transition: transform .18s;
}
.grade-block:not([open]) .grade-head h3::before { transform: rotate(-45deg); }
.grade-block:not([open]) .grade-head { margin-bottom: 0; }
.pill.filter { border-style: dashed; font-weight: 600; }
.pcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(238px, 1fr)); gap: 12px; }
.pcard {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 14px 15px; cursor: pointer; position: relative; overflow: hidden;
  transition: transform .16s, box-shadow .16s, border-color .16s;
  box-shadow: var(--shadow-sm);
}
.pcard::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--c); opacity: 0; transition: opacity .16s; }
.pcard:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: #DED6C8; }
.pcard:hover::after { opacity: 1; }
.pcard.started::after { opacity: .55; }
.pcard-top { display: flex; align-items: center; gap: 7px; margin-bottom: 7px; }
.pcard-grade { font-size: 11px; color: var(--muted); }
.pcard .lock { margin-left: auto; font-size: 12px; opacity: .7; }
.pcard h4 { font-size: 14.2px; line-height: 1.45; letter-spacing: -.1px; min-height: 40px; }
.pcard-meta { display: flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--muted); margin: 8px 0 10px; }
.pcard-foot { display: flex; align-items: center; gap: 8px; }
.pcard-foot .bar { flex: 1; }
.pcard-foot span { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.pcard.locked { opacity: .62; background: #FAF8F3; }
.pcard.locked h4 { color: var(--muted); }

/* ---------------- 学习 ---------------- */
.learn-wrap { max-width: 780px; margin: 0 auto; }
.learn-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.learn-crumb { display: flex; align-items: center; gap: 9px; min-width: 0; }
.learn-crumb b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icon-btn { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--card); border: 1px solid var(--line); font-size: 16px; color: var(--ink-2); flex: none; }
.icon-btn:hover { background: #FAF8F3; }
.icon-btn.ghost { border-color: transparent; background: transparent; color: var(--muted); margin-left: auto; }
.learn-steps { display: flex; gap: 8px; margin-bottom: 18px; }
.learn-steps span { flex: 1; text-align: center; font-size: 11.5px; color: var(--muted); padding: 7px 4px; border-radius: 9px; background: var(--line-2); font-weight: 600; }
.learn-steps span.now { background: var(--ink); color: #fff; }
.learn-steps span.done { background: #E4EFE9; color: #2A7D61; }
.learn-card { padding: 28px 30px; }
.learn-meta { display: flex; align-items: center; gap: 12px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.learn-title { font-size: clamp(21px, 2.4vw, 26px); letter-spacing: -.4px; margin: 10px 0 4px; line-height: 1.35; }
.rich { margin-top: 16px; color: var(--ink-2); font-size: 15px; line-height: 1.85; }
.rich p { margin: 0 0 11px; }
.rich ul, .rich ol { margin: 0 0 12px; padding-left: 20px; }
.rich li { margin: 4px 0; }
.rich strong { color: var(--ink); font-weight: 700; background: linear-gradient(transparent 62%, #FFF0C2 62%); }
.rich code { background: #F4F1EA; padding: 1px 6px; border-radius: 5px; font-size: 13.5px; font-family: ui-monospace, Consolas, monospace; }
.learn-actions { display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.q-stem { font-size: 16.5px; line-height: 1.75; margin: 14px 0 16px; font-weight: 550; }
.q-material { margin: 12px 0 4px; border: 1px dashed #DCD4C4; border-radius: 13px; padding: 10px 14px; background: #FCFAF4; }
.q-material summary { cursor: pointer; font-size: 11.5px; letter-spacing: .6px; color: var(--muted); font-weight: 650; }
.q-material .rich { margin-top: 8px; font-size: 14px; line-height: 1.8; }
.q-stem p { margin: 0 0 8px; }
.steps { list-style: none; padding: 0; margin: 18px 0 0; display: flex; flex-direction: column; gap: 10px; }
.steps li { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: #FAF8F3; border: 1px solid var(--line-2); }
.steps li.dim { background: repeating-linear-gradient(135deg, #FAF8F3, #FAF8F3 8px, #F5F2EA 8px, #F5F2EA 16px); }
.steps .step-no { width: 22px; height: 22px; border-radius: 7px; background: var(--brand); color: #fff; font-size: 12px; display: grid; place-items: center; flex: none; font-weight: 700; }
.steps .blur { filter: blur(5px); opacity: .5; user-select: none; }
.answer-box { margin-top: 16px; padding: 12px 16px; border-radius: 12px; background: var(--ok-soft); border: 1px solid #BFE9D6; display: flex; align-items: baseline; gap: 10px; }
.answer-box span { font-size: 11.5px; color: #2A7D61; font-weight: 700; letter-spacing: 1px; }
.answer-box b { font-size: 17px; color: #146B52; }

.quiz-top { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.opts { display: flex; flex-direction: column; gap: 10px; }
.opt {
  display: flex; align-items: flex-start; gap: 12px; text-align: left; width: 100%;
  padding: 14px 16px; border-radius: 14px; border: 1.5px solid var(--line);
  background: #fff; font-size: 15px; line-height: 1.65; transition: .15s;
}
.opt:hover:not(:disabled) { border-color: #C9D6FF; background: #FBFCFF; }
.opt-key { width: 24px; height: 24px; border-radius: 8px; background: var(--line-2); color: var(--muted); display: grid; place-items: center; font-size: 12.5px; flex: none; margin-top: 1px; }
.opt.correct { border-color: #7FD3B4; background: var(--ok-soft); }
.opt.correct .opt-key { background: var(--ok); color: #fff; }
.opt.wrong { border-color: #F0A9A5; background: var(--bad-soft); animation: shake .32s; }
.opt.wrong .opt-key { background: var(--bad); color: #fff; }
.opt.muted { opacity: .5; }
.opt.picked { border-color: var(--brand); background: var(--soft); }
.fill-row { display: flex; gap: 10px; }
.fill-input {
  flex: 1; padding: 13px 16px; border-radius: 13px; border: 1.5px solid var(--line);
  background: #fff; font-size: 16px; outline: none; transition: border-color .15s, box-shadow .15s;
}
.fill-input:focus { border-color: #9DB7FF; box-shadow: 0 0 0 4px rgba(47, 107, 255, .12); }
.fb { margin-top: 18px; padding: 15px 17px; border-radius: 15px; border: 1px solid; animation: popIn .22s ease both; }
.fb.ok { background: var(--ok-soft); border-color: #BFE9D6; }
.fb.bad { background: var(--bad-soft); border-color: #F6C9C6; animation: popIn .22s ease both, shake .3s .05s; }
.fb-head { font-weight: 750; font-size: 14.5px; margin-bottom: 6px; }
.fb.ok .fb-head { color: #14795B; }
.fb.bad .fb-head { color: #B33C38; }
.fb-why { font-size: 14px; line-height: 1.75; color: var(--ink-2); }
.fb-why p { margin: 0 0 6px; }
.fb-ans { margin-top: 8px; font-size: 13.5px; }
.fb-ans b { color: #14795B; }
.fb .btn { margin-top: 12px; }

.result-card { text-align: center; padding: 34px 28px; }
.result-card .ring { margin: 0 auto 6px; }
.result-card h2 { font-size: 22px; margin-top: 10px; letter-spacing: -.3px; }
.result-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 22px 0 6px; }
.result-grid > div { background: #FAF8F3; border-radius: 13px; padding: 12px 8px; border: 1px solid var(--line-2); }
.result-grid b { display: block; font-size: 18px; letter-spacing: -.3px; }
.result-grid span { font-size: 11.5px; color: var(--muted); }
.result-card .learn-actions { justify-content: center; }
.result-tree {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 12px;
  padding: 7px 14px; border-radius: 999px; background: #EFF7EC; border: 1px solid #CDE8C3;
  color: #2C6B36; font-size: 12.5px; font-weight: 650;
}
.result-tree:hover { background: #E4F2DF; }
.new-badges { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 14px; }
.badge-pop { background: #FFF6DE; border: 1px solid #F5DFA4; color: #8A5B00; padding: 5px 12px; border-radius: 99px; font-size: 12.5px; font-weight: 650; animation: popIn .35s both; }

/* ---------------- 模拟考 ---------------- */
.exam-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.exam-subj {
  text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: 18px;
  padding: 18px; display: flex; flex-direction: column; gap: 6px; transition: .16s; box-shadow: var(--shadow-sm);
}
.exam-subj:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--c); }
.exam-subj-top { display: flex; justify-content: space-between; align-items: center; }
.exam-subj-top b { font-size: 12px; color: var(--muted); }
.exam-subj h4 { font-size: 16px; margin-top: 4px; }
.exam-subj .btn { margin-top: 8px; align-self: flex-start; }
.timer { margin-left: auto; font-variant-numeric: tabular-nums; font-weight: 750; font-size: 17px; background: var(--card); border: 1px solid var(--line); padding: 4px 12px; border-radius: 10px; }
.timer.hot { color: var(--bad); border-color: #F1C9C6; background: var(--bad-soft); }
.exam-nav { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; }
.qdot { width: 30px; height: 30px; border-radius: 9px; border: 1px solid var(--line); background: #fff; font-size: 12px; color: var(--muted); }
.qdot.done { background: var(--soft); border-color: #C9D6FF; color: var(--brand-ink); }
.qdot.now { background: var(--ink); border-color: var(--ink); color: #fff; }
.grade-big { font-size: 44px; font-weight: 800; letter-spacing: -1px; margin: 6px 0 0; }
.g-Ap { color: #0F9B8E; } .g-A { color: #109B74; } .g-Bp { color: #2F6BFF; } .g-B { color: #3C6FE0; }
.g-Cp { color: #8A5CF6; } .g-C { color: #A06A2C; } .g-D { color: #D9534F; } .g-E { color: #A33B37; }

/* ---------------- 错题本 ---------------- */
.rev-group { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 18px 20px; margin-bottom: 14px; box-shadow: var(--shadow-sm); }
.rev-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.rev-head b { font-size: 14.5px; }
.rev-head .muted { margin-left: auto; }
.rev-q { border-top: 1px dashed var(--line-2); padding: 12px 0 6px; }
.rev-q:first-of-type { border-top: 0; }
.rev-stem { font-size: 14.5px; line-height: 1.7; font-weight: 550; margin-bottom: 6px; }
.rev-stem p { margin: 0; }
.rev-line { font-size: 12.5px; color: var(--muted); margin-bottom: 4px; }
.rev-line b.ok { color: var(--ok); }
.rev-line b.bad { color: var(--bad); }
.rev-why { font-size: 13px; color: var(--muted); line-height: 1.7; margin-bottom: 8px; }
.rev-why p { margin: 0; }

/* ---------------- 数据 ---------------- */
.subj-row { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line-2); }
.subj-row:first-of-type { border-top: 0; }
.subj-name { width: 104px; flex: none; }
.subj-bar { flex: 1; }
.subj-row .bar { flex: 1; }
.subj-row .muted { width: 56px; text-align: right; font-variant-numeric: tabular-nums; }
.heat { display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, 13px); grid-auto-columns: 13px; gap: 4px; }
.hm { border-radius: 3px; background: #EFEAE0; }
.hm.h1 { background: #C8D8FF; } .hm.h2 { background: #93B1FF; } .hm.h3 { background: #5E8BF9; } .hm.h4 { background: #2F6BFF; }
.medals { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.medal { display: flex; flex-direction: column; gap: 2px; padding: 12px; border-radius: 13px; border: 1px solid var(--line); background: #FAF8F3; }
.medal.got { background: linear-gradient(160deg, #FFF8E6, #FFFDF7); border-color: #F2DFAF; }
.medal-ico { font-size: 20px; filter: grayscale(1); opacity: .5; }
.medal.got .medal-ico { filter: none; opacity: 1; }
.medal b { font-size: 12.5px; }
.medal small { font-size: 11px; color: var(--muted); line-height: 1.4; }

/* ---------------- 表单 ---------------- */
.form .field { display: block; margin-bottom: 18px; }
.form .field > span { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 8px; font-weight: 600; }
.form .field.row { display: flex; align-items: center; justify-content: space-between; }
.form .field.row > span { margin: 0; }
.form input[type="text"] {
  width: 100%; padding: 11px 14px; border-radius: 12px; border: 1.5px solid var(--line);
  background: #fff; font-size: 15px; outline: none;
}
.form input[type="text"]:focus { border-color: #9DB7FF; box-shadow: 0 0 0 4px rgba(47, 107, 255, .1); }
.seg-row { display: flex; flex-wrap: wrap; gap: 8px; }
.seg { padding: 8px 13px; border-radius: 10px; border: 1px solid var(--line); background: #fff; font-size: 13px; color: var(--ink-2); }
.seg.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.switch { width: 46px; height: 27px; border-radius: 99px; background: #DCD5C7; position: relative; transition: background .18s; flex: none; }
.switch i { position: absolute; top: 3px; left: 3px; width: 21px; height: 21px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: transform .18s; }
.switch.on { background: var(--ok); }
.switch.on i { transform: translateX(19px); }
.file-btn { position: relative; overflow: hidden; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table td { padding: 8px 4px; border-top: 1px solid var(--line-2); }
.table tr:first-child td { border-top: 0; }
.table td.num { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.table b[class^="g-"] { font-size: 13px; }
.grade-row { display: flex; flex-wrap: wrap; gap: 6px; }
.grade-chip { padding: 4px 11px; border-radius: 8px; background: #FAF8F3; border: 1px solid var(--line); font-size: 12.5px; font-weight: 700; color: var(--ink-2); }
.cover-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.cover-row .tag { width: 96px; justify-content: center; }
.cover-bar { flex: 1; }
.cover-row .muted { font-size: 11.5px; width: 52px; text-align: right; font-variant-numeric: tabular-nums; }
.notes { margin: 0; padding-left: 18px; color: var(--ink-2); font-size: 13.5px; line-height: 1.85; }
.notes li { margin: 6px 0; }

.paper-row { margin-top: 12px; }
.paper-row h4 { font-size: 11.5px; color: var(--muted); letter-spacing: 1px; margin: 0 0 7px; font-weight: 650; }
.paper-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.paper-chip {
  display: inline-flex; align-items: baseline; gap: 6px; padding: 7px 12px;
  border-radius: 10px; border: 1px solid var(--line); background: #fff;
  font-size: 12.5px; font-weight: 650; color: var(--ink-2); transition: .15s;
}
.paper-chip:hover { border-color: #C9D6FF; background: #FBFCFF; color: var(--brand-ink); }
.paper-chip small { font-weight: 500; color: var(--muted); font-size: 10.5px; }

/* ---------------- 引导 ---------------- */
.onboard { min-height: 100vh; display: grid; place-items: center; padding: 28px 18px; }
.ob-card { width: 100%; max-width: 580px; padding: 34px 34px 26px; }
.ob-card h1 { font-size: clamp(24px, 3.4vw, 30px); letter-spacing: -.6px; margin: 8px 0 6px; }
.ob-card > .sub { margin-bottom: 20px; }
.grade-grid { display: grid; grid-template-columns: repeat(9, 1fr); gap: 6px; }
.grade-pick { padding: 10px 0; border-radius: 11px; border: 1px solid var(--line); background: #fff; display: flex; flex-direction: column; align-items: center; gap: 1px; }
.grade-pick b { font-size: 15px; }
.grade-pick span { font-size: 9.5px; color: var(--muted); }
.grade-pick.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.grade-pick.on span { color: rgba(255, 255, 255, .65); }
.ob-mins { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ob-min { padding: 12px 10px; border-radius: 12px; border: 1px solid var(--line); background: #fff; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.ob-min b { font-size: 13.5px; }
.ob-min span { font-size: 10.5px; color: var(--muted); }
.ob-min.on { border-color: var(--brand); background: var(--soft); }
.ob-card .btn.big { margin-top: 8px; }

/* ---------------- 弹层 / 提示 ---------------- */
.modal-root { position: fixed; inset: 0; z-index: 60; display: none; }
.modal-root.open { display: block; }
.modal-mask { position: absolute; inset: 0; background: rgba(24, 28, 38, .42); backdrop-filter: blur(3px); display: grid; place-items: center; padding: 20px; animation: fadeIn .18s both; }
.modal { width: 100%; max-width: 560px; max-height: 86vh; overflow: auto; background: var(--card); border-radius: 22px; padding: 24px 26px; box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .5); animation: popIn .22s cubic-bezier(.2, .8, .3, 1) both; }
.sheet-top { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.sheet-top .icon-btn { margin-left: auto; }
.modal h2 { font-size: 20px; letter-spacing: -.3px; margin: 4px 0 2px; line-height: 1.4; }
.sheet-stat { display: flex; align-items: center; gap: 10px; margin: 14px 0 4px; font-size: 12.5px; color: var(--muted); }
.sheet-stat b { color: var(--ink); font-size: 15px; }
.sheet-stat .bar { flex: 1; }
.rich.clamp { max-height: 210px; overflow: hidden; position: relative; }
.rich.clamp::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 54px; background: linear-gradient(transparent, #fff); }

.toast-root { position: fixed; left: 50%; bottom: 34px; transform: translateX(-50%); z-index: 80; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: rgba(28, 32, 42, .94); color: #fff; padding: 10px 18px; border-radius: 99px; font-size: 13.5px; font-weight: 550; opacity: 0; transform: translateY(8px); transition: .24s; box-shadow: 0 12px 30px -14px rgba(0, 0, 0, .6); }
.toast.in { opacity: 1; transform: translateY(0); }

.fx-root { position: fixed; inset: 0; pointer-events: none; z-index: 70; overflow: hidden; }
.confetti { position: absolute; top: 26%; width: 8px; height: 12px; border-radius: 2px; animation: fall 1.1s ease-out forwards; }
@keyframes fall {
  0% { transform: translate(0, 0) rotate(0); opacity: 1; }
  100% { transform: translate(var(--dx, 40px), 280px) rotate(var(--rot, 300deg)); opacity: 0; }
}
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn { from { opacity: 0; transform: scale(.96) translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }

/* ---------------- 可视化 ---------------- */
.viz-block {
  margin-top: 18px; padding: 14px 14px 12px;
  border: 1px solid var(--line); border-radius: 16px;
  background: linear-gradient(180deg, #FCFAF4, #fff);
}
.viz-lead { font-size: 12.5px; color: var(--muted); margin-bottom: 10px; }
.viz-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.viz-title { font-size: 12.5px; letter-spacing: .2px; }
.viz-tip { font-size: 11px; color: var(--muted); }
.viz-cv { display: block; width: 100%; touch-action: none; border-radius: 12px; }
.viz-ctl { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; align-items: center; }
.viz-ctl-col { display: flex; flex-direction: column; gap: 7px; margin-top: 10px; }
.viz-btn {
  padding: 6px 11px; border-radius: 9px; border: 1px solid var(--line);
  background: #fff; font-size: 12px; color: var(--ink-2); font-weight: 600;
  transition: .15s;
}
.viz-btn:hover { border-color: #C9D6FF; background: #FBFCFF; }
.viz-btn.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.viz-read {
  margin-top: 10px; font-size: 12.5px; line-height: 1.7; color: var(--ink-2);
  background: #F7F4EC; border: 1px solid var(--line-2); border-radius: 10px;
  padding: 8px 11px; font-variant-numeric: tabular-nums;
}
.viz-note { font-size: 11.5px; color: var(--muted); margin-top: 8px; line-height: 1.65; }
.viz-tabs { display: flex; gap: 6px; margin-bottom: 10px; flex-wrap: wrap; }
.viz-slider { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); }
.viz-slider input[type="range"] { flex: 1; min-width: 90px; accent-color: var(--brand); height: 22px; }
.viz-slider-name { width: 62px; flex: none; }
.viz-slider-val { width: 40px; text-align: right; color: var(--ink); font-variant-numeric: tabular-nums; }

.cube-scene {
  height: 236px; display: grid; place-items: center;
  perspective: 780px; touch-action: none; cursor: grab; margin: 2px 0 4px;
}
.cube { position: relative; width: 118px; height: 118px; transform-style: preserve-3d; transition: transform .35s cubic-bezier(.2, .8, .3, 1); }
.cube-face {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 22px; font-weight: 800; color: #fff; border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, .6); opacity: .96;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .18);
}
.face-front { transform: translateZ(59px); }
.face-back { transform: rotateY(180deg) translateZ(59px); }
.face-right { transform: rotateY(90deg) translateZ(59px); }
.face-left { transform: rotateY(-90deg) translateZ(59px); }
.face-top { transform: rotateX(90deg) translateZ(59px); }
.face-bottom { transform: rotateX(-90deg) translateZ(59px); }
.cube-net-wrap { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin-top: 6px; }
.cube-net { width: 232px; max-width: 100%; height: auto; }
.cube-net-wrap .viz-note { flex: 1; min-width: 150px; margin-top: 0; }

.views-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.views-grids { display: flex; flex-direction: column; gap: 10px; }
.vv-block h5 { font-size: 11.5px; color: var(--muted); margin: 0 0 6px; font-weight: 650; }
.vv-front { display: flex; gap: 8px; align-items: flex-end; }
.vv-grid { display: grid; grid-template-rows: repeat(3, 16px); gap: 3px; width: 42px; }
.vv-cell { display: block; border-radius: 4px; background: var(--line-2); }
.vv-cell.on { background: linear-gradient(180deg, #9FC0FA, #5B8CFF); }
.vv-top-grid { display: flex; flex-direction: column; gap: 4px; }
.vv-row { display: flex; gap: 4px; }
.vv-top {
  width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--line);
  background: #fff; font-size: 13px; font-weight: 700; color: var(--muted); transition: .12s;
}
.vv-top:hover { border-color: #C9D6FF; }
.vv-top.on { background: var(--soft); border-color: #C9D6FF; color: var(--brand-ink); }

.lab-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.lab-card { padding: 18px; margin-top: 0; }
.lab-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 3px; }
.lab-head h2 { font-size: 16px; letter-spacing: -.2px; }

.hint-btn {
  margin-left: 8px; padding: 3px 10px; border-radius: 99px;
  background: #FFF6E0; border: 1px solid #F3DDA8; color: #8A5B00;
  font-size: 11.5px; font-weight: 750; white-space: nowrap;
}
.hint-btn:hover { background: #FFEFC7; }
.quiz-top { align-items: center; }
.quiz-top-right { display: inline-flex; align-items: center; gap: 2px; min-width: 0; }
.opts.short { display: grid; grid-template-columns: repeat(auto-fit, minmax(112px, 1fr)); gap: 8px; }
.opts.short .opt { justify-content: center; font-weight: 650; }
.opts.short .opt-key { display: none; }
.hint-sheet .viz { margin-top: 4px; }
.hint-list { margin: 12px 0 0; padding-left: 20px; font-size: 14px; line-height: 1.8; color: var(--ink-2); }
.hint-list li { margin: 6px 0; }
.hint-list li p { margin: 0; }
.hint-list li::marker { color: var(--brand); }

/* ---------------- 真题库 ---------------- */
.paper-entry { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; background: linear-gradient(120deg, #fff, #FBFAF6 58%, #F2F8FF); }
.pe-left { display: flex; align-items: center; gap: 14px; flex: 1; min-width: 0; }
.pe-icon { font-size: 30px; }
.paper-entry h2 { font-size: 17px; }
.paper-entry .sub { margin-top: 2px; }

.paper-year { margin-bottom: 22px; }
.paper-year-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 10px; }
.paper-year-head h2 { font-size: 16px; letter-spacing: -.2px; }
.paper-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.paper-card {
  display: flex; flex-direction: column; gap: 5px; padding: 14px;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow-sm); transition: .16s; border-top: 3px solid var(--c);
}
.paper-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.paper-subj { font-size: 11px; font-weight: 700; color: var(--c); letter-spacing: .5px; }
.paper-card b { font-size: 18px; letter-spacing: -.4px; }
.paper-meta { font-size: 11px; color: var(--muted); }
.paper-done { font-size: 10.5px; color: var(--muted); }

.paper-reader { max-width: 820px; }
.paper-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.paper-bar-title { display: flex; flex-direction: column; min-width: 0; }
.paper-bar-title b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.paper-bar-title .muted { font-size: 11.5px; }
.paper-bar-prog { margin-left: auto; font-size: 12px; color: var(--muted); white-space: nowrap; }
.pq-nav { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 12px; }
.pq-section {
  margin: 20px 0 10px; padding-left: 10px; border-left: 3px solid var(--brand);
  font-size: 13px; font-weight: 700; color: var(--ink-2); line-height: 1.6;
}
.pq-dot {
  width: 27px; height: 27px; border-radius: 8px; border: 1px solid var(--line);
  display: grid; place-items: center; font-size: 11.5px; color: var(--muted); background: #fff;
}
.pq-dot.done { background: var(--soft); border-color: #C9D6FF; color: var(--brand-ink); }
.pq-dot.flag { box-shadow: inset 0 0 0 2px #F3DDA8; }
.paper-hint {
  font-size: 12px; color: var(--muted); background: #FBF7EE; border: 1px dashed var(--line);
  border-radius: 12px; padding: 9px 12px; margin-bottom: 14px; line-height: 1.65;
}
.pq {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 18px 20px; margin-bottom: 14px; box-shadow: var(--shadow-sm);
}
.pq-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.pq-no {
  width: 26px; height: 26px; border-radius: 8px; background: var(--ink); color: #fff;
  display: grid; place-items: center; font-size: 12.5px; font-weight: 700; flex: none;
}
.pq-sec { font-size: 11px; color: var(--muted); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pq-flag { font-size: 11.5px; color: var(--muted); padding: 3px 9px; border-radius: 99px; border: 1px solid var(--line); }
.pq-flag.on { color: #8A5B00; background: #FFF6E0; border-color: #F3DDA8; }
.pq-check {
  font-size: 11.5px; color: var(--brand-ink); padding: 3px 10px; border-radius: 99px;
  border: 1px solid #C9D6FF; background: var(--soft); font-weight: 650;
}
.pa-toggle {
  font-size: 11.5px; color: var(--muted); border-bottom: 1px dashed var(--muted);
  padding: 0 2px; margin-left: 4px;
}
.pq.is-ok { border-color: #BFE9D6; box-shadow: inset 3px 0 0 var(--ok); }
.pq.is-bad { border-color: #F6C9C6; box-shadow: inset 3px 0 0 var(--bad); }
.pq-answer {
  margin-top: 14px; padding: 12px 14px; border-radius: 12px;
  background: #F7F9FF; border: 1px solid #DDE6FF;
}
.pq-answer.ok { background: var(--ok-soft); border-color: #BFE9D6; }
.pq-answer.bad { background: var(--bad-soft); border-color: #F6C9C6; }
.pa-head { font-weight: 700; font-size: 13.5px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pa-ok { color: var(--ok); font-style: normal; font-size: 12.5px; }
.pa-bad { color: var(--bad); font-style: normal; font-size: 12.5px; }
.pa-conf { font-size: 10.5px; font-weight: 600; padding: 1px 7px; border-radius: 99px; background: #E9EEF9; color: #4A5A78; }
.pa-conf.conf-low { background: #FDECD8; color: #9A5B12; }
.pa-conf.conf-mid { background: #FFF6DE; color: #8A5B00; }
.pa-fig { font-size: 10.5px; color: var(--muted); border: 1px dashed var(--line); padding: 1px 6px; border-radius: 99px; }
.pa-text { margin-top: 8px; font-size: 13.5px; line-height: 1.85; color: var(--ink-2); }
.pa-why { margin-top: 8px; font-size: 13px; line-height: 1.8; color: var(--ink-2); }
.pa-why b { color: var(--brand-ink); margin-right: 6px; font-size: 12px; }
.pa-self { margin-top: 10px; font-size: 12px; color: var(--muted); display: flex; gap: 8px; align-items: center; }
.pa-self button { padding: 3px 10px; border-radius: 99px; border: 1px solid var(--line); background: #fff; font-size: 11.5px; }
.pa-self button:hover { border-color: #C9D6FF; }
.pq-dot.ok { background: var(--ok-soft); border-color: #BFE9D6; color: #14795B; }
.pq-dot.bad { background: var(--bad-soft); border-color: #F6C9C6; color: #B33C38; }
.rev-sec { margin-top: 26px; }
.rev-sec-head { display: flex; align-items: baseline; justify-content: space-between; margin: 0 0 10px; }
.rev-sec-head h2 { font-size: 16px; letter-spacing: -.2px; }
.rev-sec-head .muted { font-size: 11.5px; }
.rev-line .bad { color: var(--bad); }
.pq-material {
  background: #FAF8F3; border: 1px solid var(--line-2); border-radius: 12px;
  padding: 11px 13px; margin-bottom: 12px; font-size: 13.5px; line-height: 1.85; color: var(--ink-2);
}
.pq-ref { font-size: 12px; color: var(--muted); margin: -4px 0 10px; }
.pq-ref b { color: var(--brand-ink); }
.pq-stem { font-size: 15px; line-height: 1.9; margin-bottom: 12px; }
.pq-stem img, .pq-material img, .pq-opt img, .pq-extra img {
  vertical-align: middle; max-width: 100%; height: auto !important;
}
img.f { vertical-align: -0.25em; }
.pq-opts { display: flex; flex-direction: column; gap: 8px; }
.pq-opt {
  display: flex; align-items: flex-start; gap: 10px; text-align: left; width: 100%;
  padding: 9px 12px; border-radius: 11px; border: 1.5px solid var(--line);
  background: #fff; font-size: 14.5px; line-height: 1.8; transition: .14s;
}
.pq-opt:hover { border-color: #C9D6FF; background: #FBFCFF; }
.pq-opt b {
  width: 22px; height: 22px; border-radius: 7px; background: var(--line-2); color: var(--muted);
  display: grid; place-items: center; font-size: 12px; flex: none; margin-top: 2px;
}
.pq-opt.on { border-color: var(--brand); background: var(--soft); }
.pq-opt.on b { background: var(--brand); color: #fff; }
.pq-extra { margin-top: 10px; overflow-x: auto; }
.pq-extra table, .pq-material table { border-collapse: collapse; margin: 8px 0; font-size: 13px; }
.pq-extra td, .pq-material td { border: 1px solid var(--line); padding: 6px 9px; vertical-align: top; }
.pq-note { margin-top: 12px; }
.pq-note textarea {
  width: 100%; resize: vertical; padding: 9px 11px; border-radius: 10px;
  border: 1px solid var(--line); background: #FCFBF8; font: inherit; font-size: 13px;
  line-height: 1.7; color: var(--ink-2); outline: none;
}
.pq-note textarea:focus { border-color: #9DB7FF; box-shadow: 0 0 0 3px rgba(47, 107, 255, .1); }
.paper-end { text-align: center; padding: 10px 0 20px; }
.paper-table { width: 100%; border-collapse: collapse; font-size: 13px; }

/* ---------------- 响应式 ---------------- */
@media (max-width: 1040px) {
  .app { grid-template-columns: 216px minmax(0, 1fr); }
  .main { padding: 24px 22px 64px; }
  .hero { grid-template-columns: auto 1fr; }
  .hero-week { display: none; }
}
@media (max-width: 860px) {
  .app { display: block; }
  .sidebar { display: none; }
  .toast-root { bottom: calc(84px + env(safe-area-inset-bottom)); }
  .main { padding: 18px 16px 96px; max-width: 100%; }
  .tabbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    background: rgba(255, 255, 255, .93); backdrop-filter: blur(14px);
    border-top: 1px solid var(--line);
    padding: 7px 4px calc(7px + env(safe-area-inset-bottom));
    justify-content: space-around;
  }
  .tab { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 10px; color: var(--muted); padding: 4px 6px; border-radius: 10px; position: relative; }
  .tab .ico { width: 21px; height: 21px; }
  .tab.on { color: var(--brand-ink); }
  .tab .dot-num { position: absolute; top: 0; right: 2px; }
  .page-head { margin-bottom: 16px; }
  .hero { padding: 18px; gap: 16px; }
  .hero-mid h2 { font-size: 18px; }
  .cards-4 { grid-template-columns: 1fr 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .learn-card { padding: 20px 18px; }
  .result-grid { grid-template-columns: 1fr 1fr; }
  .learn-steps span { font-size: 10.5px; }
  .learn-title { font-size: 20px; }
  .rich { font-size: 14.5px; }
  .opt { font-size: 14.5px; padding: 12px 13px; }
  .grade-grid { grid-template-columns: repeat(5, 1fr); }
  .pcards { grid-template-columns: 1fr 1fr; }
  .card { padding: 18px; border-radius: 17px; }
  .ob-card { padding: 24px 20px 20px; }
  .modal { padding: 20px; border-radius: 20px; }
}
@media (max-width: 520px) {
  .pcards { grid-template-columns: 1fr; }
  .cards-4 { grid-template-columns: 1fr 1fr; }
  .result-grid { grid-template-columns: 1fr 1fr; }
  .hero { grid-template-columns: 1fr; text-align: center; }
  .hero-left { margin: 0 auto; }
  .hero-btns { justify-content: center; }
  .task-go { display: none; }
  .page-head { display: block; }
  .page-head .btn { width: 100%; margin-top: 12px; }
  .page-head .lv-pill { width: 100%; margin-top: 12px; }
  .ob-mins { grid-template-columns: 1fr; }
  .subj-name { width: 88px; }
  .subj-row .muted { width: 46px; }
  .learn-steps span { font-size: 10px; padding: 6px 2px; }
  .learn-bar { gap: 8px; }
  .learn-crumb b { font-size: 13px; }
  .timer { font-size: 15px; padding: 3px 9px; }
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15171C; --bg-2: #1B1E25; --card: #1E2229; --ink: #ECEDF1; --ink-2: #C6CAD3;
    --muted: #8C929E; --line: #2C313A; --line-2: #262A32; --soft: #1F2A44;
    --ok-soft: #12291F; --bad-soft: #2C1B1B; --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 16px 40px -24px rgba(0, 0, 0, .8);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
  }
  body::before { opacity: .5; }
  .sidebar { background: rgba(24, 27, 33, .7); }
  .hero { background: linear-gradient(120deg, #1E2229, #1C2028 60%, #1A2334); }
  .task-hit:hover, .icon-btn:hover { background: #242832; }
  .opt, .fill-input, .form input[type="text"], .seg, .pill, .grade-pick, .ob-min { background: #23272F; }
  .opt:hover:not(:disabled) { background: #262B35; }
  .steps li { background: #23272F; }
  .steps li.dim { background: repeating-linear-gradient(135deg, #23272F, #23272F 8px, #1F232A 8px, #1F232A 16px); }
  .medal, .result-grid > div, .grade-chip, .wrong-cta.done { background: #24282F; }
  .rich strong { background: linear-gradient(transparent 62%, rgba(245, 200, 60, .25) 62%); }
  .rich.clamp::after { background: linear-gradient(transparent, #1E2229); }
  .pcard.locked { background: #1B1F26; }
  .pcard:hover { border-color: #3A404B; }
  .hm { background: #262A32; }
  .toast { background: rgba(240, 242, 246, .95); color: #17191F; }
  .tabbar { background: rgba(24, 27, 33, .94); }
}

@media (max-width: 640px) {
  .views-wrap { grid-template-columns: 1fr; }
  .lab-grid { grid-template-columns: 1fr; }
  .viz-slider-name { width: 50px; }
  .viz-slider-val { width: 34px; }
  .cube-scene { height: 210px; }
  .cube-net { width: 200px; }
  .opts.short { grid-template-columns: 1fr 1fr; }
}

@media (prefers-color-scheme: dark) {
  .viz-block { background: linear-gradient(180deg, #1B1F26, #1E2229); }
  .viz-btn, .vv-top { background: #23272F; }
  .viz-btn:hover { background: #262B35; }
  .viz-btn.on { background: #E8EAF0; color: #17191F; border-color: #E8EAF0; }
  .viz-read { background: #24282F; }
  .vv-cell { background: #2A2F38; }
  .hint-btn { background: #3A3016; border-color: #5A4A22; color: #F0C674; }
  .hint-btn:hover { background: #463A1B; }
  .result-tree { background: #1B2A1E; border-color: #2E4632; color: #9AD3A6; }
  .paper-chip { background: #23272F; }
  .paper-chip:hover { background: #262B35; }
}

/* ---------------- 成长林 ---------------- */
.forest-page { position: relative; }
.forest-page::before {
  content: ""; position: absolute; left: -8px; right: -8px; top: -8px; height: 300px;
  pointer-events: none; z-index: 0; border-radius: 0 0 48px 48px; opacity: .75;
}
.forest-page.season-spring::before { background: linear-gradient(180deg, rgba(255, 214, 229, .8), transparent); }
.forest-page.season-summer::before { background: linear-gradient(180deg, rgba(198, 236, 183, .7), transparent); }
.forest-page.season-autumn::before { background: linear-gradient(180deg, rgba(246, 206, 146, .75), transparent); }
.forest-page.season-winter::before { background: linear-gradient(180deg, rgba(205, 228, 242, .85), transparent); }
.season-fx { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.forest-page > header, .forest-page > section, .forest-page > .forest-tip, .forest-page > .forest-eggs { position: relative; z-index: 1; }
.sf {
  position: absolute; top: -40px; width: var(--sz, 6px); height: var(--sz, 6px);
  opacity: .85; animation-name: sfFall; animation-timing-function: linear;
  animation-iteration-count: infinite; will-change: transform; user-select: none;
}
.sf-spring { background: #F7A8C4; border-radius: 50% 0 50% 50%; transform: rotate(20deg); }
.sf-summer { background: #FFD86B; border-radius: 50%; box-shadow: 0 0 7px rgba(255, 216, 107, .9); opacity: .6; }
.sf-autumn { background: #D97A2B; border-radius: 50% 0 50% 50%; }
.sf-snow { background: #fff; border-radius: 50%; box-shadow: 0 0 0 1px rgba(170, 200, 222, .85); opacity: .95; }
@keyframes sfFall {
  0% { transform: translate3d(0, -40px, 0) rotate(0deg); }
  100% { transform: translate3d(46px, 106vh, 0) rotate(330deg); }
}
.sf-snow { animation-name: sfSnow; }
@keyframes sfSnow {
  0% { transform: translate3d(0, -40px, 0); }
  50% { transform: translate3d(-26px, 52vh, 0); }
  100% { transform: translate3d(20px, 106vh, 0); }
}
.sf-pollen { opacity: .45; }

.season-pick { display: flex; gap: 6px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 6px; box-shadow: var(--shadow-sm); }
.season-btn { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-size: 16px; opacity: .5; transition: .15s; }
.season-btn:hover { opacity: .9; background: rgba(31, 36, 48, .045); }
.season-btn.on { opacity: 1; background: var(--soft); box-shadow: inset 0 0 0 1px #C9D6FF; }
.season-btn.auto { width: auto; padding: 0 10px; font-size: 11.5px; font-weight: 700; color: var(--muted); }
.season-btn.auto.on { color: var(--brand-ink); }

.guide-card { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; background: linear-gradient(120deg, #fff, #FBFAF6 58%, #F2F8FF); }
.guide-emoji { font-size: 28px; flex: none; }
.guide-text { flex: 1; min-width: 0; }
.guide-text b { font-size: 14.5px; }
.guide-text p { font-size: 13px; color: var(--muted); margin-top: 3px; line-height: 1.6; }
.guide-text em { font-style: normal; color: var(--brand-ink); font-weight: 700; }
.forest-tip { font-size: 12px; color: var(--muted); margin: 4px 0 16px; text-align: center; }

.subject-forest { margin-bottom: 20px; }
.sf-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.sf-progress { font-size: 12px; color: var(--muted); }
.trees { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 8px; }
.tree-card { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-sm); transition: transform .16s, box-shadow .16s, border-color .16s; }
.tree-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: #DED6C8; }
.tree-card.done { background: linear-gradient(180deg, #FFFDF3, #fff); border-color: #F0DFA8; }
.tree-hit { width: 100%; padding: 6px 4px 9px; display: flex; flex-direction: column; align-items: center; gap: 1px; }
.tree-holder { width: 100%; height: 120px; display: grid; place-items: center; }
.tree-svg { width: 92px; height: 122px; overflow: visible; }
.tree-card b { font-size: 12.5px; letter-spacing: .2px; }
.tree-meta { font-size: 10.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.tree-card.done .tree-meta { color: #8A5B00; font-weight: 700; }
@keyframes sway { 0%, 100% { transform: rotate(-1.1deg); } 50% { transform: rotate(1.1deg); } }
.tree-svg .sway { transform-origin: 60px 150px; animation: sway 6.5s ease-in-out infinite; }
.tree-card:nth-child(3n) .tree-svg .sway { animation-duration: 7.8s; }
.tree-card:nth-child(2n) .tree-svg .sway { animation-delay: -2.4s; }

.egg-tree { position: absolute; top: 4px; right: 4px; font-size: 15px; line-height: 1; padding: 2px; animation: bob 2.6s ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
.forest-eggs { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 18px 0 6px; color: var(--muted); font-size: 11.5px; }
.egg { font-size: 22px; animation: bob 3s ease-in-out infinite; }

.chapter-bar { margin: 10px 0 14px; }
.chapter-map { border: 1px solid var(--line-2); border-radius: 14px; padding: 12px 14px; background: #FCFAF4; }
.cm-root { display: inline-block; background: var(--ink); color: #fff; padding: 5px 12px; border-radius: 8px; font-size: 12.5px; font-weight: 700; margin-bottom: 10px; }
.cm-list { list-style: none; margin: 0; padding-left: 16px; border-left: 2px dashed #D9D2C4; }
.cm-list li { position: relative; margin: 1px 0; }
.cm-list li::before { content: ""; position: absolute; left: -16px; top: 50%; width: 14px; height: 2px; background: #D9D2C4; }
.cm-list button { display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 6px; border-radius: 8px; text-align: left; }
.cm-list button:hover { background: rgba(31, 36, 48, .045); }
.cm-leaf { width: 10px; height: 10px; border-radius: 50% 0 50% 50%; background: #D8D2C6; transform: rotate(-45deg); flex: none; }
.cm-list li.ok .cm-leaf { background: var(--ok); }
.cm-list li.mid .cm-leaf { background: var(--warn); }
.cm-title { flex: 1; font-size: 13px; }
.cm-pct { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }

.hint-sec { margin-top: 14px; }
.hint-sec h4 { font-size: 11.5px; color: var(--muted); letter-spacing: 1.2px; margin-bottom: 6px; font-weight: 650; }
.hint-sec ul { margin: 0; padding-left: 18px; font-size: 13.5px; line-height: 1.75; color: var(--ink-2); }
.hint-sec li { margin: 3px 0; }
.hint-sec li::marker { color: var(--brand); }

@media (max-width: 640px) {
  .trees { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
  .tree-holder { height: 104px; }
  .tree-svg { width: 78px; height: 104px; }
  .guide-card { flex-wrap: wrap; }
  .guide-card .btn { width: 100%; }
  .season-pick { width: 100%; justify-content: space-between; }
  .tab { padding: 4px 2px; }
  .tab span { font-size: 9px; }
  .tab .ico { width: 19px; height: 19px; }
}

@media (prefers-color-scheme: dark) {
  .guide-card { background: linear-gradient(120deg, #1E2229, #1C2028 58%, #1A2334); }
  .chapter-map { background: #1B1F26; }
  .tree-card.done { background: linear-gradient(180deg, #26231A, #1E2229); border-color: #4A3F22; }
  .cm-root { background: #E8EAF0; color: #17191F; }
  .season-btn.on { background: #1F2A44; }
}

/* ---- 知识点懒加载 ---- */
.parts-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48vh;
}
.parts-loading-card {
  text-align: center;
  padding: 28px 22px;
  max-width: 360px;
}
.parts-loading-card h2 {
  margin: 14px 0 6px;
  font-size: 18px;
}
.parts-spinner {
  width: 36px;
  height: 36px;
  margin: 0 auto;
  border-radius: 50%;
  border: 3px solid rgba(47, 107, 255, .18);
  border-top-color: var(--brand, #2F6BFF);
  animation: parts-spin .7s linear infinite;
}
@keyframes parts-spin {
  to { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
  .parts-spinner { animation: none; border-top-color: rgba(47, 107, 255, .45); }
}
