/* ==========================================================================
   Leon基本复习 · Visual system
   Warm paper, ink, vermilion. No external assets, no CDN.
   ========================================================================== */

:root {
  --bg: #f2ecdf;
  --bg-deep: #e9e0cf;
  --paper: #fffdf7;
  --paper-2: #faf5ea;
  --ink: #23251f;
  --ink-soft: #3e433a;
  --muted: #777a6e;
  --muted-2: #99998c;
  --line: #ddd4c3;
  --line-strong: #c9bda8;
  --red: #a33d2f;
  --red-deep: #7d2d23;
  --red-soft: #f2dfd8;
  --green: #315c50;
  --green-deep: #25453c;
  --green-soft: #e2ece6;
  --gold: #b6894e;
  --gold-soft: #f2e7d4;
  --blue: #3f5d70;
  --ok: #2f6b50;
  --bad: #a33d2f;
  --shadow-sm: 0 2px 10px rgba(46, 38, 24, 0.05);
  --shadow: 0 14px 40px rgba(46, 38, 24, 0.08);
  --shadow-lg: 0 26px 70px rgba(46, 38, 24, 0.13);
  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 26px;
  --r-xl: 34px;
  --serif: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC", "SimSun", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --topbar-h: 66px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(1000px 600px at 8% -10%, rgba(255, 253, 247, 0.9), transparent 65%),
    radial-gradient(800px 520px at 95% 4%, rgba(226, 236, 230, 0.55), transparent 64%),
    linear-gradient(180deg, var(--bg), #f7f2e8 42%, var(--bg));
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.7;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.32;
  background-image:
    repeating-linear-gradient(0deg, rgba(92, 77, 55, 0.03) 0, rgba(92, 77, 55, 0.03) 1px, transparent 1px, transparent 4px),
    repeating-linear-gradient(90deg, rgba(92, 77, 55, 0.018) 0, rgba(92, 77, 55, 0.018) 1px, transparent 1px, transparent 5px);
}

::selection { background: rgba(163, 61, 47, 0.18); }

a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
img, svg { max-width: 100%; }

h1, h2, h3, h4, h5 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.28;
  letter-spacing: 0.01em;
}

p { margin: 0; }

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

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

.container {
  width: min(1180px, calc(100% - 48px));
  margin-inline: auto;
}

.narrow { width: min(900px, calc(100% - 48px)); margin-inline: auto; }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  height: var(--topbar-h);
  border-bottom: 1px solid rgba(201, 189, 168, 0.5);
  background: rgba(247, 242, 232, 0.84);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
}

.topbar-inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 18px;
  width: min(1240px, calc(100% - 36px));
  margin-inline: auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  flex-shrink: 0;
}

.brand-mark {
  width: 36px; height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff8ec;
  background:
    radial-gradient(circle at 34% 28%, rgba(255,255,255,0.2), transparent 38%),
    var(--red);
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.24), 0 5px 14px rgba(125,45,35,0.2);
}

.brand-text { display: flex; flex-direction: column; line-height: 1.18; }
.brand-text strong { font-family: var(--serif); font-size: 16px; letter-spacing: 0.04em; }
.brand-text span { font-size: 10px; color: var(--muted); letter-spacing: 0.12em; }

.top-nav {
  display: flex;
  align-items: center;
  gap: 3px;
  margin-left: 8px;
}

.top-nav a {
  padding: 7px 11px;
  border-radius: 999px;
  font-size: 13px;
  color: var(--muted);
  transition: 0.2s ease;
}

.top-nav a:hover { color: var(--ink); background: rgba(255,255,255,0.55); }
.top-nav a.active { color: var(--red-deep); background: rgba(163,61,47,0.09); font-weight: 600; }

.top-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.top-count {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,253,247,0.7);
  white-space: nowrap;
}

.top-count small { font-size: 10px; color: var(--muted); letter-spacing: 0.08em; }
.top-count b { font-family: var(--serif); font-size: 18px; color: var(--red); font-weight: 700; }
.top-count span { font-size: 10px; color: var(--muted); }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 36px; height: 36px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255,253,247,0.7);
  color: var(--ink-soft);
  transition: 0.2s ease;
}

.icon-btn:hover { border-color: var(--line-strong); background: var(--paper); transform: translateY(-1px); }
.icon-btn svg { width: 17px; height: 17px; }

.menu-btn { display: none; }

/* ---------- Global exam timer ---------- */
.global-timer {
  position: sticky;
  top: var(--topbar-h);
  z-index: 55;
  background: var(--green-deep);
  color: #fdf8ed;
  border-bottom: 1px solid rgba(255,255,255,0.09);
  box-shadow: 0 10px 30px rgba(37,69,60,0.18);
}

.global-timer[hidden] { display: none; }

.global-timer-inner {
  width: min(1240px, calc(100% - 36px));
  margin-inline: auto;
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 0;
  flex-wrap: wrap;
}

.timer-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  letter-spacing: 0.04em;
  opacity: 0.9;
  min-width: 0;
}

.timer-label svg { width: 16px; height: 16px; flex: 0 0 auto; }
.timer-label strong { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 280px; }

.timer-clock {
  font-family: var(--mono);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
  margin-left: auto;
}

.timer-clock.warning { color: #ffd3a1; animation: pulse 1s infinite; }
.timer-clock.danger { color: #ffb2a3; }

.timer-actions { display: flex; align-items: center; gap: 6px; }

.timer-btn {
  border: 1px solid rgba(255,255,255,0.22);
  background: rgba(255,255,255,0.08);
  color: #fff9ee;
  border-radius: 999px;
  padding: 5px 11px;
  font-size: 12px;
  transition: 0.2s ease;
  white-space: nowrap;
}

.timer-btn:hover { background: rgba(255,255,255,0.16); }
.timer-btn.primary { background: #f3e6cc; color: var(--green-deep); border-color: transparent; font-weight: 600; }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

/* ---------- Page scaffolding ---------- */
main { min-height: 68vh; padding-bottom: 72px; }

.page-enter { animation: page-in 0.38s ease both; }

@keyframes page-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--red);
  font-weight: 700;
}

.eyebrow::before {
  content: "";
  width: 22px; height: 1px;
  background: currentColor;
  opacity: 0.65;
}

.eyebrow.green { color: var(--green); }
.eyebrow.muted { color: var(--muted); }

.page-head {
  padding: 42px 0 26px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 22px;
  flex-wrap: wrap;
}

.page-head h1 { font-size: clamp(30px, 4vw, 44px); margin-top: 8px; }
.page-head p { color: var(--muted); font-size: 14px; max-width: 640px; margin-top: 8px; }

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--muted);
  padding-top: 26px;
}

.breadcrumb a:hover { color: var(--red); }
.breadcrumb .sep { opacity: 0.45; }
.breadcrumb .current { color: var(--ink-soft); }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
  padding: 7px 0;
}
.back-link:hover { color: var(--red); }
.back-link svg { width: 15px; height: 15px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 17px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--ink);
  color: #fffaf0;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
  white-space: nowrap;
}

.btn:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(35,37,31,0.15); }
.btn:active { transform: translateY(0); }
.btn svg { width: 16px; height: 16px; }
.btn.primary { background: var(--red); }
.btn.primary:hover { background: var(--red-deep); }
.btn.green { background: var(--green); }
.btn.green:hover { background: var(--green-deep); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn.ghost:hover { background: var(--paper); }
.btn.soft { background: var(--paper-2); color: var(--ink); border-color: var(--line); }
.btn.soft:hover { background: var(--paper); }
.btn.danger { background: transparent; color: var(--red); border-color: rgba(163,61,47,0.3); }
.btn.small { min-height: 34px; padding: 5px 12px; font-size: 12px; }
.btn.large { min-height: 50px; padding: 12px 24px; font-size: 15px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: 0.45; pointer-events: none; }

.btn-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--red);
  font-size: 13px;
  font-weight: 600;
}
.text-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.text-link svg { width: 14px; height: 14px; }
.module-card .m-meta .go { display: inline-flex; align-items: center; gap: 4px; }
.module-card .m-meta .go svg { width: 13px; height: 13px; }
.stage-meta .round { display: inline-flex; align-items: center; gap: 4px; }
.stage-meta .round svg { width: 14px; height: 14px; }
.a-hint svg { width: 13px; height: 13px; }
.exam-rule svg { width: 13px; height: 13px; }
.answer-box .ab-head .mark { font-size: 12px; }
.answer-box .ab-head .mark svg { width: 11px; height: 11px; }

/* ---------- Tags / chips ---------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  line-height: 1.55;
  border: 1px solid var(--line);
  background: rgba(255,253,247,0.7);
  color: var(--muted);
  white-space: nowrap;
}
.chip.red { color: var(--red-deep); background: var(--red-soft); border-color: transparent; }
.chip.green { color: var(--green-deep); background: var(--green-soft); border-color: transparent; }
.chip.gold { color: #795a2f; background: var(--gold-soft); border-color: transparent; }
.chip.ink { color: #f9f3e7; background: var(--ink); border-color: transparent; }

.tag-row { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------- Cards ---------- */
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}

.card-pad { padding: 24px; }

.card-hover { transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease; }
.card-hover:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-strong); }

/* ---------- Home hero ---------- */
.home-hero {
  position: relative;
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 24px;
  align-items: stretch;
  padding-top: 40px;
}

.hero-main {
  position: relative;
  overflow: hidden;
  padding: clamp(28px, 4.2vw, 52px);
  border-radius: var(--r-xl);
  background:
    radial-gradient(620px 320px at 92% 0%, rgba(255,255,255,0.14), transparent 60%),
    linear-gradient(145deg, #2d4d43, #223931 70%, #1d302a);
  color: #fbf4e6;
  box-shadow: var(--shadow-lg);
  min-height: 440px;
  display: flex;
  flex-direction: column;
}

.hero-main::before {
  content: "";
  position: absolute;
  right: -90px; bottom: -120px;
  width: 380px; height: 380px;
  border: 1px solid rgba(243, 230, 204, 0.14);
  border-radius: 50%;
  box-shadow: 0 0 0 36px rgba(243, 230, 204, 0.035), 0 0 0 76px rgba(243, 230, 204, 0.025);
}

.hero-main::after {
  content: "27";
  position: absolute;
  right: 22px; top: -40px;
  font-family: var(--serif);
  font-size: 250px;
  line-height: 1;
  color: rgba(255, 249, 235, 0.035);
  pointer-events: none;
}

.hero-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: relative;
  z-index: 1;
}

.hero-main .eyebrow { color: #e2c89b; }
.hero-main .eyebrow::before { background: #e2c89b; }

.hero-edition {
  font-size: 10px;
  letter-spacing: 0.14em;
  color: rgba(251,244,230,0.55);
  border: 1px solid rgba(251,244,230,0.18);
  padding: 4px 9px;
  border-radius: 999px;
}

.hero-title {
  position: relative;
  z-index: 1;
  margin-top: 28px;
  font-size: clamp(36px, 5.4vw, 64px);
  letter-spacing: 0.015em;
  color: #fff9ec;
}

.hero-title em {
  font-style: normal;
  color: #e5c994;
}

.hero-sub {
  position: relative;
  z-index: 1;
  margin-top: 12px;
  max-width: 500px;
  color: rgba(251,244,230,0.68);
  font-size: 14px;
  line-height: 1.9;
}

.countdown-block {
  position: relative;
  z-index: 1;
  margin-top: auto;
  padding-top: 30px;
  display: flex;
  align-items: flex-end;
  gap: 20px;
  flex-wrap: wrap;
}

.countdown-main { display: flex; align-items: baseline; gap: 8px; }
.countdown-main .num {
  font-family: var(--serif);
  font-size: clamp(64px, 9vw, 104px);
  line-height: 0.85;
  font-weight: 600;
  letter-spacing: -0.04em;
  color: #fff8e9;
  font-variant-numeric: tabular-nums;
}
.countdown-main .unit { font-family: var(--serif); font-size: 20px; color: #dfc79d; padding-bottom: 6px; }

.countdown-meta { display: flex; flex-direction: column; gap: 4px; padding-bottom: 5px; }
.countdown-meta strong { font-size: 13px; font-weight: 600; color: #f4ead6; }
.countdown-meta span { font-size: 11px; color: rgba(251,244,230,0.5); letter-spacing: 0.03em; }

.countdown-ring {
  margin-left: auto;
  width: 82px; height: 82px;
  position: relative;
  flex: 0 0 auto;
}
.countdown-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.countdown-ring circle { fill: none; stroke-width: 3; }
.countdown-ring .track { stroke: rgba(251,244,230,0.13); }
.countdown-ring .bar { stroke: #e1c28e; stroke-linecap: round; transition: stroke-dashoffset 0.6s ease; }
.countdown-ring .inner {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-size: 9px; letter-spacing: 0.12em; color: rgba(251,244,230,0.6);
  text-align: center;
}
.countdown-ring .inner b { font-family: var(--serif); font-size: 19px; color: #f7ecd8; letter-spacing: 0; line-height: 1.1; }

.hero-footnote {
  position: relative; z-index: 1;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(251,244,230,0.12);
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  font-size: 11px; color: rgba(251,244,230,0.45);
}

.hero-side { display: flex; flex-direction: column; gap: 16px; }

.pulse-card {
  flex: 1;
  padding: 26px;
  border-radius: var(--r-xl);
  background: rgba(255,253,247,0.82);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.pulse-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pulse-head h3 { font-size: 19px; }
.pulse-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 5px rgba(163,61,47,0.1); }

.pulse-list { display: flex; flex-direction: column; gap: 0; margin-top: 14px; }
.pulse-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0;
  border-bottom: 1px dashed var(--line);
}
.pulse-row:last-child { border-bottom: 0; }
.pulse-row .ico {
  width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center;
  background: var(--paper-2); color: var(--red);
  flex: 0 0 auto;
}
.pulse-row .ico svg { width: 16px; height: 16px; }
.pulse-row .txt { min-width: 0; }
.pulse-row .txt b { display: block; font-size: 13px; font-weight: 600; }
.pulse-row .txt span { display: block; font-size: 11px; color: var(--muted); margin-top: 1px; }
.pulse-row .val { margin-left: auto; font-family: var(--serif); font-size: 20px; font-weight: 600; white-space: nowrap; }
.pulse-row .val small { font-family: var(--sans); font-size: 10px; color: var(--muted); margin-left: 2px; }

.today-plan { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.today-plan .tp-label { display: block; font-size: 9px; letter-spacing: 0.13em; color: var(--muted-2); margin-bottom: 4px; }
.today-plan a { display: flex; align-items: center; gap: 7px; padding: 5px 0; font-size: 11.5px; color: var(--ink-soft); }
.today-plan a:hover { color: var(--red); }
.today-plan a i { width: 5px; height: 5px; border-radius: 50%; background: var(--red); opacity: 0.7; flex: 0 0 auto; }
.today-plan a span { margin-left: auto; color: var(--muted-2); font-size: 10px; }

.pulse-cta { margin-top: auto; padding-top: 16px; }

.side-note {
  border-radius: var(--r-lg);
  padding: 16px 18px;
  background: var(--gold-soft);
  border: 1px solid #e6d4b6;
  font-size: 11.5px;
  color: #705733;
  line-height: 1.75;
  display: flex;
  gap: 10px;
}
.side-note svg { width: 16px; height: 16px; flex: 0 0 auto; margin-top: 2px; }

/* ---------- Section header ---------- */
.section { margin-top: 52px; }
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.section-head h2 { font-size: clamp(24px, 3vw, 32px); margin-top: 6px; }
.section-head p { color: var(--muted); font-size: 13px; margin-top: 5px; }

/* ---------- Subject cards ---------- */
.subject-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

.subject-card {
  position: relative;
  overflow: hidden;
  padding: 28px;
  border-radius: var(--r-xl);
  background: var(--paper);
  border: 1px solid var(--line);
  min-height: 238px;
  display: flex;
  flex-direction: column;
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}
.subject-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--line-strong); }

.subject-card::after {
  content: "";
  position: absolute;
  width: 200px; height: 200px;
  right: -74px; top: -74px;
  border-radius: 50%;
  background: var(--sub-soft, var(--red-soft));
  opacity: 0.65;
  transition: transform 0.3s ease;
}
.subject-card:hover::after { transform: scale(1.1); }

.subject-top { position: relative; z-index: 1; display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }

.subject-icon {
  width: 52px; height: 52px;
  border-radius: 16px;
  display: grid; place-items: center;
  background: var(--sub-soft, var(--red-soft));
  color: var(--sub, var(--red));
}
.subject-icon svg { width: 24px; height: 24px; }

.subject-arrow {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: grid; place-items: center;
  color: var(--muted);
  background: rgba(255,253,247,0.6);
  transition: 0.2s ease;
}
.subject-card:hover .subject-arrow { background: var(--ink); color: #fff; border-color: var(--ink); transform: rotate(-45deg); }
.subject-arrow svg { width: 15px; height: 15px; }

.subject-card h3 { position: relative; z-index: 1; font-size: 27px; margin-top: 22px; }
.subject-card .en { position: relative; z-index: 1; font-size: 9px; letter-spacing: 0.22em; color: var(--muted-2); margin-top: 2px; }
.subject-card p { position: relative; z-index: 1; color: var(--muted); font-size: 12.5px; margin-top: 8px; max-width: 90%; }

.subject-mini {
  position: relative; z-index: 1;
  margin-top: auto; padding-top: 18px;
  display: flex; gap: 16px; flex-wrap: wrap;
}
.subject-mini span { font-size: 11px; color: var(--muted); display: inline-flex; align-items: center; gap: 5px; }
.subject-mini b { color: var(--ink); font-size: 16px; font-family: var(--serif); }

/* ---------- Module grid ---------- */
.module-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

.module-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 182px;
  padding: 22px;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: rgba(255,253,247,0.78);
  overflow: hidden;
  transition: 0.22s ease;
}
.module-card:hover { background: var(--paper); border-color: var(--line-strong); box-shadow: var(--shadow-sm); transform: translateY(-2px); }
.module-card .m-icon {
  width: 38px; height: 38px; border-radius: 11px;
  display: grid; place-items: center;
  background: var(--paper-2); color: var(--red);
  border: 1px solid var(--line);
}
.module-card .m-icon.green { color: var(--green); }
.module-card .m-icon svg { width: 18px; height: 18px; }
.module-card h3 { font-size: 20px; margin-top: 16px; }
.module-card p { font-size: 11.5px; color: var(--muted); margin-top: 5px; line-height: 1.7; }
.module-card .m-meta {
  margin-top: auto; padding-top: 14px;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  font-size: 11px; color: var(--muted-2);
}
.module-card .m-meta .go { color: var(--red); font-weight: 600; }
.module-card.wide { grid-column: span 2; }

/* ---------- Stats strip ---------- */
.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.stat-cell { background: rgba(255,253,247,0.9); padding: 18px 20px; }
.stat-cell .label { font-size: 10px; letter-spacing: 0.1em; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.stat-cell .label svg { width: 13px; height: 13px; }
.stat-cell .value { font-family: var(--serif); font-size: 30px; line-height: 1.2; margin-top: 6px; font-weight: 600; }
.stat-cell .value small { font-family: var(--sans); font-size: 11px; color: var(--muted); margin-left: 2px; font-weight: 400; }
.stat-cell .sub { font-size: 10px; color: var(--muted-2); margin-top: 1px; }

/* ---------- Subject page hero ---------- */
.subject-hero {
  margin-top: 28px;
  padding: clamp(26px, 4vw, 42px);
  border-radius: var(--r-xl);
  background:
    radial-gradient(500px 260px at 100% 0%, rgba(255,255,255,0.14), transparent 65%),
    var(--hero-bg, var(--red-deep));
  color: #fff8ec;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 26px;
  align-items: end;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.subject-hero::after {
  content: attr(data-en);
  position: absolute; right: 20px; top: -28px;
  font-family: var(--serif); font-size: 150px; line-height: 1;
  color: rgba(255,255,255,0.05); letter-spacing: 0.04em;
  pointer-events: none;
}
.subject-hero .eyebrow { color: rgba(255,248,236,0.65); }
.subject-hero .eyebrow::before { background: rgba(255,248,236,0.5); }
.subject-hero h1 { font-size: clamp(34px, 5vw, 54px); margin-top: 8px; color: #fff9ed; }
.subject-hero p { color: rgba(255,248,236,0.68); font-size: 13px; max-width: 600px; margin-top: 8px; }
.subject-hero .hero-badge {
  position: relative; z-index: 1;
  border: 1px solid rgba(255,248,236,0.24);
  border-radius: 16px;
  padding: 14px 18px;
  text-align: right;
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(8px);
  min-width: 150px;
}
.hero-badge span { display: block; font-size: 9px; letter-spacing: 0.15em; color: rgba(255,248,236,0.55); }
.hero-badge b { display: block; font-family: var(--serif); font-size: 32px; margin-top: 2px; }

.subject-stats { margin-top: 16px; }
.daily-plan-strip { margin-top: 14px; display: grid; grid-template-columns: 1.1fr repeat(4, 1fr); gap: 0; overflow: hidden; }
.dp-title { padding: 15px 18px; background: var(--green-soft); display: flex; flex-direction: column; justify-content: center; gap: 2px; }
.dp-title b { font-family: var(--serif); font-size: 18px; }
.dp-title > span:last-child { font-size: 10px; color: var(--green-deep); }
.daily-plan-strip a { padding: 14px 15px; border-left: 1px solid var(--line); display: flex; flex-direction: column; justify-content: center; gap: 1px; transition: background .18s ease; }
.daily-plan-strip a:hover { background: var(--paper-2); }
.daily-plan-strip a > span { font-size: 10px; color: var(--muted); }
.daily-plan-strip a > b { font-family: var(--serif); font-size: 17px; }
.daily-plan-strip a > small { font-size: 9px; color: var(--muted-2); }

/* ---------- Paper list ---------- */
.filter-bar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-bottom: 20px;
}
.filter-btn {
  border: 1px solid var(--line);
  background: rgba(255,253,247,0.65);
  color: var(--muted);
  border-radius: 999px;
  padding: 6px 13px;
  font-size: 12px;
  transition: 0.2s ease;
}
.filter-btn:hover { border-color: var(--line-strong); color: var(--ink); }
.filter-btn.active { background: var(--ink); color: #fffaf0; border-color: var(--ink); }

.paper-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }

.paper-card {
  display: flex;
  align-items: stretch;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: rgba(255,253,247,0.8);
  overflow: hidden;
  transition: 0.22s ease;
}
.paper-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow-sm); transform: translateY(-2px); }
.paper-card .year-box {
  width: 96px;
  flex: 0 0 auto;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: linear-gradient(160deg, var(--paper-2), #f2e9da);
  border-right: 1px solid var(--line);
  padding: 16px 10px;
}
.paper-card .year-box b { font-family: var(--serif); font-size: 30px; line-height: 1; }
.paper-card .year-box span { font-size: 9px; letter-spacing: 0.14em; color: var(--muted); margin-top: 5px; }
.paper-card .p-body { padding: 16px 18px; display: flex; flex-direction: column; min-width: 0; flex: 1; }
.paper-card h3 { font-family: var(--sans); font-size: 14px; font-weight: 600; }
.paper-card p { font-size: 11px; color: var(--muted); margin-top: 3px; }
.paper-card .p-foot { margin-top: auto; padding-top: 9px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.paper-card .p-foot .chip { font-size: 10px; }
.paper-card.disabled { opacity: 0.66; background: rgba(247,242,232,0.6); }
.paper-card.disabled:hover { transform: none; box-shadow: none; border-color: var(--line); }

/* ---------- Stage subject cards ---------- */
.stage-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.stage-card {
  position: relative;
  padding: 22px;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: rgba(255,253,247,0.8);
  display: flex;
  flex-direction: column;
  min-height: 200px;
  transition: 0.22s ease;
  overflow: hidden;
}
.stage-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow-sm); transform: translateY(-2px); }
.stage-card::after {
  content: attr(data-index);
  position: absolute; right: 8px; bottom: -22px;
  font-family: var(--serif); font-size: 92px; color: rgba(35,37,31,0.04);
  line-height: 1;
}
.stage-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.stage-head .subject-icon { width: 42px; height: 42px; border-radius: 13px; }
.stage-card h3 { font-size: 23px; margin-top: 14px; }
.stage-card .full { font-size: 10px; color: var(--muted-2); margin-top: 1px; }
.stage-card p { font-size: 11.5px; color: var(--muted); margin-top: 6px; }
.stage-meta { margin-top: auto; padding-top: 14px; display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 10.5px; color: var(--muted); }
.stage-meta .round { color: var(--red); font-weight: 600; }

/* ---------- Empty state ---------- */
.empty {
  text-align: center;
  padding: 54px 24px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-lg);
  background: rgba(255,253,247,0.45);
}
.empty .empty-icon {
  width: 54px; height: 54px; border-radius: 18px;
  display: grid; place-items: center;
  margin: 0 auto 14px;
  background: var(--paper-2); border: 1px solid var(--line);
  color: var(--muted);
}
.empty .empty-icon svg { width: 24px; height: 24px; }
.empty h3 { font-size: 20px; }
.empty p { font-size: 12px; color: var(--muted); margin: 6px auto 16px; max-width: 420px; }

/* ---------- Mistakes / favorites list ---------- */
.collection-layout { display: grid; grid-template-columns: 240px 1fr; gap: 22px; align-items: start; }
.filter-panel { position: sticky; top: calc(var(--topbar-h) + 18px); }
.filter-panel .card { padding: 18px; }
.filter-panel h4 { font-family: var(--sans); font-size: 11px; letter-spacing: 0.1em; color: var(--muted); text-transform: uppercase; margin-bottom: 9px; }
.filter-list { display: flex; flex-direction: column; gap: 3px; }
.filter-list button {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  border: 0; background: transparent; color: var(--ink-soft);
  padding: 7px 9px; border-radius: 8px; font-size: 12px; text-align: left;
}
.filter-list button:hover { background: var(--paper-2); }
.filter-list button.active { background: var(--red-soft); color: var(--red-deep); font-weight: 600; }
.filter-list button span { font-size: 10px; color: var(--muted); }
.filter-divider { height: 1px; background: var(--line); margin: 12px 0; }

.collection-list { display: flex; flex-direction: column; gap: 10px; }
.collection-item {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: rgba(255,253,247,0.8);
  transition: 0.18s ease;
}
.collection-item:hover { border-color: var(--line-strong); background: var(--paper); }
.collection-item .ci-top { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.collection-item .ci-stem { font-size: 13px; line-height: 1.7; margin-top: 8px; color: var(--ink-soft); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.collection-item .ci-path { font-size: 10.5px; color: var(--muted); margin-top: 8px; line-height: 1.6; }
.collection-item .ci-actions { display: flex; align-items: center; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.collection-item .ci-actions .meta { font-size: 10px; color: var(--muted-2); margin-left: auto; }

/* ---------- Current affairs ---------- */
.month-tabs {
  display: flex; gap: 6px; overflow-x: auto; padding-bottom: 8px;
  scrollbar-width: thin;
}
.month-tab {
  border: 1px solid var(--line);
  background: rgba(255,253,247,0.6);
  color: var(--muted);
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 12px; white-space: nowrap;
  transition: 0.18s ease;
}
.month-tab:hover { color: var(--ink); }
.month-tab.active { background: var(--green); border-color: var(--green); color: #fff9ec; }
.month-tab .dot { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--red); margin-left: 5px; vertical-align: 1px; }

.affair-list { display: flex; flex-direction: column; gap: 12px; }
.affair-card {
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: rgba(255,253,247,0.82);
  position: relative;
  transition: 0.2s ease;
  user-select: none;
  -webkit-user-select: none;
}
.affair-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.affair-card .a-date { display: flex; align-items: center; gap: 8px; font-size: 10px; color: var(--muted); letter-spacing: 0.05em; }
.affair-card .a-date b { color: var(--red); font-family: var(--mono); font-weight: 600; }
.affair-card h3 { font-size: 20px; margin-top: 7px; }
.affair-card .a-summary { font-size: 12.5px; color: var(--ink-soft); line-height: 1.85; margin-top: 7px; }
.affair-card .a-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line); flex-wrap: wrap; }
.affair-card .a-source { font-size: 10px; color: var(--muted-2); }
.affair-card .a-hint { font-size: 10px; color: var(--red); display: inline-flex; align-items: center; gap: 4px; }
.affair-card .a-hint svg { width: 13px; height: 13px; }
.affair-card .longpress-ring {
  position: absolute; right: 16px; bottom: 16px;
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: grid; place-items: center;
  color: var(--muted);
  background: var(--paper);
  opacity: 0;
  transition: 0.2s ease;
}
.affair-card:hover .longpress-ring { opacity: 1; }
.longpress-ring svg { width: 15px; height: 15px; }

.month-placeholder {
  padding: 38px;
  text-align: center;
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-lg);
  color: var(--muted);
  font-size: 12px;
  background: rgba(255,253,247,0.4);
}

/* ---------- Knowledge ---------- */
.knowledge-layout { display: grid; grid-template-columns: 280px 1fr; gap: 22px; align-items: start; }
.knowledge-side { position: sticky; top: calc(var(--topbar-h) + 18px); max-height: calc(100vh - var(--topbar-h) - 36px); overflow: auto; scrollbar-width: thin; }
.k-side-card { border: 1px solid var(--line); border-radius: var(--r-lg); background: rgba(255,253,247,0.8); padding: 14px; }
.k-root-tabs { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 12px; }
.k-root-tab {
  border: 1px solid var(--line); background: transparent; border-radius: 999px;
  font-size: 11px; padding: 4px 10px; color: var(--muted);
}
.k-root-tab.active { background: var(--red); border-color: var(--red); color: #fff; }

.k-module { margin-bottom: 4px; }
.k-module-head {
  width: 100%; border: 0; background: transparent;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 9px 7px; border-radius: 8px; text-align: left;
  font-size: 12px; font-weight: 600;
}
.k-module-head:hover { background: var(--paper-2); }
.k-module-head svg { width: 14px; height: 14px; color: var(--muted); transition: transform 0.2s ease; }
.k-module.open .k-module-head svg { transform: rotate(90deg); }
.k-chapters { display: none; padding-left: 7px; }
.k-module.open .k-chapters { display: block; }
.k-chapter { margin: 2px 0 6px; }
.k-chapter-name { font-size: 10px; color: var(--muted-2); padding: 4px 6px; letter-spacing: 0.02em; }
.k-point-link {
  display: block; width: 100%; text-align: left; border: 0; background: transparent;
  padding: 5px 7px; border-radius: 6px; font-size: 11.5px; color: var(--ink-soft);
  line-height: 1.55;
}
.k-point-link:hover { background: var(--paper-2); color: var(--red-deep); }
.k-point-link.active { background: var(--red-soft); color: var(--red-deep); font-weight: 600; }

.k-main { min-width: 0; }
.k-empty { padding: 44px; text-align: center; color: var(--muted); font-size: 13px; }
.k-detail { padding: clamp(22px, 3.5vw, 36px); }
.k-detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.k-detail h2 { font-size: clamp(24px, 3vw, 34px); margin-top: 7px; }
.k-detail .k-page { font-size: 10px; color: var(--muted); border: 1px solid var(--line); padding: 4px 9px; border-radius: 999px; }
.k-section { margin-top: 24px; }
.k-section h4 { font-family: var(--sans); font-size: 10px; letter-spacing: 0.14em; color: var(--red); text-transform: uppercase; margin-bottom: 7px; }
.k-section p { font-size: 14px; line-height: 1.95; color: var(--ink-soft); }
.k-quote {
  border-left: 3px solid var(--gold);
  padding: 2px 0 2px 16px;
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1.9;
}
.k-example {
  background: var(--green-soft);
  border: 1px solid #cfe0d6;
  border-radius: var(--r-md);
  padding: 15px 17px;
  font-size: 13px;
  line-height: 1.9;
  color: #29473e;
}
.k-mnemonic {
  background: var(--gold-soft);
  border: 1px solid #e7d4b4;
  border-radius: var(--r-md);
  padding: 13px 16px;
  font-size: 13px;
  color: #6e542f;
}
.k-detail-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); }

.k-visual-card {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
  margin-top: 14px;
}
.k-visual-node {
  border: 1px solid var(--line);
  background: var(--paper-2);
  border-radius: 14px;
  padding: 14px;
  position: relative;
}
.k-visual-node::before {
  content: ""; position: absolute; left: 14px; top: 0; width: 22px; height: 2px; background: var(--gold);
}
.k-visual-node b { display: block; font-family: var(--serif); font-size: 17px; }
.k-visual-node span { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; }

/* ---------- China map ---------- */
.map-wrap {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: linear-gradient(160deg, #f8f1e2, #eee2cb);
  border: 1px solid var(--line);
  min-height: 0;
}
.map-wrap svg { display: block; width: 100%; height: 430px; }
.map-wrap .map-bg { fill: #e9dcc3; stroke: #bfa87f; stroke-width: 1.05; }
.map-wrap .map-marker { cursor: pointer; transition: 0.2s ease; }
.map-wrap .map-marker circle.core { fill: var(--red); stroke: #fff8ea; stroke-width: 2; }
.map-wrap .map-marker circle.halo { fill: rgba(163,61,47,0.16); }
.map-wrap .map-marker text { font-family: var(--sans); font-size: 9.5px; fill: #3f382b; font-weight: 700; paint-order: stroke; stroke: #f8f1e2; stroke-width: 3.5px; }
.map-wrap .map-marker:hover circle.core { fill: var(--green); }
.map-wrap .map-marker.dim { opacity: 0.25; }
.map-legend { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 10px; font-size: 10px; color: var(--muted); }
.map-legend span { display: inline-flex; align-items: center; gap: 5px; }
.map-legend i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.map-year-tabs { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 12px; }
.map-year-tab { border: 1px solid var(--line); background: var(--paper); border-radius: 999px; font-size: 10px; padding: 4px 10px; color: var(--muted); }
.map-year-tab.active { background: var(--green); color: #fff; border-color: var(--green); }

/* ---------- Exam intro ---------- */
.exam-intro {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 20px;
  margin-top: 28px;
  align-items: start;
}
.exam-intro-main { padding: clamp(24px, 4vw, 40px); }
.exam-intro h1 { font-size: clamp(28px, 4vw, 42px); margin-top: 9px; }
.exam-intro .intro-sub { color: var(--muted); font-size: 13px; margin-top: 9px; }
.exam-rules { margin-top: 26px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.exam-rule {
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 13px 14px;
  background: var(--paper-2);
}
.exam-rule b { display: block; font-size: 12px; }
.exam-rule span { display: block; font-size: 10.5px; color: var(--muted); margin-top: 2px; }
.exam-intro-side { padding: 22px; }
.exam-intro-side h3 { font-size: 18px; }
.exam-summary-list { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.exam-summary-list div { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-bottom: 8px; border-bottom: 1px dashed var(--line); font-size: 11.5px; }
.exam-summary-list div:last-child { border: 0; }
.exam-summary-list b { font-family: var(--serif); font-size: 15px; }
.exam-start-box { margin-top: 18px; }
.exam-warning { font-size: 10.5px; color: var(--muted); line-height: 1.7; margin-top: 9px; }

/* ---------- Exam running ---------- */
.exam-shell { padding-top: 18px; }
.exam-head {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 13px 0 15px; border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.exam-head-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.exam-head-left h1 { font-size: 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.exam-head-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.exam-progress-text { font-size: 11px; color: var(--muted); }
.exam-progress-bar { width: 130px; height: 5px; border-radius: 99px; background: var(--line); overflow: hidden; }
.exam-progress-bar i { display: block; height: 100%; background: var(--red); border-radius: 99px; transition: width 0.25s ease; }

.exam-layout { display: grid; grid-template-columns: 1fr 220px; gap: 20px; align-items: start; margin-top: 18px; }
.q-panel { padding: clamp(20px, 3vw, 34px); min-height: 440px; }
.q-meta { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.q-number { font-family: var(--serif); font-size: 13px; color: var(--muted); letter-spacing: 0.05em; }
.q-type { font-size: 10px; letter-spacing: 0.08em; color: var(--red); background: var(--red-soft); padding: 3px 8px; border-radius: 999px; }
.q-fav {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: 5px;
  border: 1px solid var(--line); background: transparent;
  border-radius: 999px; padding: 4px 10px; font-size: 10.5px; color: var(--muted);
}
.q-fav:hover { border-color: var(--gold); color: var(--gold); }
.q-fav.on { background: var(--gold-soft); border-color: #e1c79f; color: #7b5c2e; }
.q-fav svg { width: 13px; height: 13px; }

.q-passage {
  margin: 18px 0 4px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  background: var(--paper-2);
  font-size: 12.5px;
  line-height: 1.95;
  color: var(--ink-soft);
  white-space: pre-line;
  max-height: 320px;
  overflow: auto;
}
.q-passage-title { font-family: var(--serif); font-size: 15px; margin-bottom: 6px; color: var(--ink); }
.q-stem {
  margin-top: 18px;
  font-family: var(--serif);
  font-size: clamp(18px, 2.3vw, 23px);
  line-height: 1.72;
  white-space: pre-line;
}

.options { display: flex; flex-direction: column; gap: 9px; margin-top: 20px; }
.option {
  display: flex; align-items: flex-start; gap: 12px;
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  background: rgba(255,253,247,0.6);
  border-radius: var(--r-sm);
  padding: 13px 15px;
  font-size: 13px;
  line-height: 1.7;
  transition: 0.16s ease;
}
.option:hover { border-color: var(--line-strong); background: var(--paper); }
.option .key {
  flex: 0 0 auto;
  width: 24px; height: 24px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  font-family: var(--serif); font-size: 12px; color: var(--muted);
  transition: 0.16s ease;
}
.option.selected { border-color: var(--red); background: var(--red-soft); }
.option.selected .key { background: var(--red); border-color: var(--red); color: #fff; }
.option.correct { border-color: #8ab49f; background: var(--green-soft); }
.option.correct .key { background: var(--green); border-color: var(--green); color: #fff; }
.option.wrong { border-color: #d5a095; background: #f7e5df; }
.option.wrong .key { background: var(--red); border-color: var(--red); color: #fff; }
.option[disabled] { cursor: default; }

.subjective-wrap { margin-top: 20px; }
.subjective-wrap textarea {
  width: 100%;
  min-height: 180px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--paper-2);
  padding: 15px 16px;
  font-size: 14px;
  line-height: 1.9;
  color: var(--ink);
}
.subjective-wrap textarea:focus { outline: 2px solid rgba(163,61,47,0.3); border-color: var(--red); }
.subjective-tools { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 8px; font-size: 10px; color: var(--muted); flex-wrap: wrap; }

.self-score { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.self-score button {
  border: 1px solid var(--line); background: var(--paper); border-radius: 999px;
  padding: 5px 12px; font-size: 11px; color: var(--muted);
}
.self-score button.active { background: var(--green); border-color: var(--green); color: #fff; }

.answer-box {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--paper-2);
  padding: 16px 18px;
  animation: page-in 0.3s ease both;
}
.answer-box.correct-box { border-color: #cfe0d6; background: #f3f8f4; }
.answer-box.wrong-box { border-color: #e7cec6; background: #fbf1ed; }
.answer-box .ab-head { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; }
.answer-box .ab-head .mark { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; color: #fff; }
.answer-box.correct-box .ab-head .mark { background: var(--ok); }
.answer-box.wrong-box .ab-head .mark { background: var(--bad); }
.answer-box .ab-head .mark svg { width: 12px; height: 12px; }
.answer-box .ab-answer { font-size: 12px; color: var(--ink-soft); margin-top: 8px; }
.answer-box .ab-answer b { color: var(--red); }
.answer-box .ab-explain { font-size: 12.5px; line-height: 1.9; color: var(--ink-soft); margin-top: 8px; }
.answer-box .ab-reference { font-size: 12.5px; line-height: 1.95; color: var(--ink-soft); margin-top: 8px; white-space: pre-line; }
.answer-box .ab-scoring { margin-top: 9px; padding-top: 9px; border-top: 1px dashed var(--line); font-size: 11.5px; color: var(--muted); line-height: 1.8; }

.q-actions { display: flex; align-items: center; gap: 9px; margin-top: 22px; flex-wrap: wrap; }
.q-actions .spacer { flex: 1; }

.q-nav-card { padding: 15px; position: sticky; top: calc(var(--topbar-h) + 18px); }
.q-nav-card h4 { font-family: var(--sans); font-size: 10px; letter-spacing: 0.12em; color: var(--muted); text-transform: uppercase; }
.q-nav-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; margin-top: 10px; }
.q-nav-btn {
  aspect-ratio: 1;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 7px;
  font-size: 11px;
  color: var(--muted);
  display: grid; place-items: center;
  transition: 0.14s ease;
}
.q-nav-btn:hover { border-color: var(--ink-soft); color: var(--ink); }
.q-nav-btn.current { border-color: var(--ink); background: var(--ink); color: #fff; }
.q-nav-btn.done { background: var(--green-soft); border-color: #bcd4c7; color: var(--green-deep); }
.q-nav-btn.wrong { background: var(--red-soft); border-color: #e3bdb2; color: var(--red-deep); }
.q-nav-legend { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; font-size: 9px; color: var(--muted); }
.q-nav-legend span { display: inline-flex; align-items: center; gap: 4px; }
.q-nav-legend i { width: 7px; height: 7px; border-radius: 2px; }
.q-nav-legend .l-done { background: var(--green-soft); border: 1px solid #bcd4c7; }
.q-nav-legend .l-wrong { background: var(--red-soft); border: 1px solid #e3bdb2; }
.q-nav-legend .l-todo { background: var(--paper); border: 1px solid var(--line); }

.exam-bottom-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 16px; padding: 12px 0;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}
.exam-bottom-bar .progress-copy { font-size: 11px; color: var(--muted); }

/* ---------- Result ---------- */
.result-hero {
  padding: clamp(26px, 4vw, 42px);
  border-radius: var(--r-xl);
  background: linear-gradient(145deg, #2d4d43, #223931);
  color: #fff8ec;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 28px;
  align-items: center;
  margin-top: 26px;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}
.result-hero::after {
  content: "RESULT";
  position: absolute; right: -8px; bottom: -26px;
  font-family: var(--serif); font-size: 110px; color: rgba(255,255,255,0.04);
  letter-spacing: 0.05em;
}
.result-ring { width: 132px; height: 132px; position: relative; flex: 0 0 auto; }
.result-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.result-ring circle { fill: none; stroke-width: 7; }
.result-ring .track { stroke: rgba(255,255,255,0.12); }
.result-ring .bar { stroke: #e3c58f; stroke-linecap: round; }
.result-ring .inner { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.result-ring .inner b { font-family: var(--serif); font-size: 36px; line-height: 1; }
.result-ring .inner span { font-size: 9px; letter-spacing: 0.12em; color: rgba(255,248,236,0.55); margin-top: 3px; }
.result-copy h1 { font-size: clamp(26px, 3.4vw, 38px); color: #fff9ec; }
.result-copy p { font-size: 12px; color: rgba(255,248,236,0.6); margin-top: 6px; }
.result-stats { display: flex; gap: 20px; flex-wrap: wrap; margin-top: 18px; }
.result-stats div span { display: block; font-size: 9px; letter-spacing: 0.1em; color: rgba(255,248,236,0.5); }
.result-stats div b { display: block; font-family: var(--serif); font-size: 24px; margin-top: 1px; }

.review-list { display: flex; flex-direction: column; gap: 9px; margin-top: 20px; }
.review-item { border: 1px solid var(--line); border-radius: var(--r-md); background: rgba(255,253,247,0.8); overflow: hidden; }
.review-item summary {
  list-style: none; cursor: pointer;
  padding: 13px 16px; display: flex; align-items: center; gap: 9px; flex-wrap: wrap;
  font-size: 12px;
}
.review-item summary::-webkit-details-marker { display: none; }
.review-item summary .r-no { font-family: var(--serif); color: var(--muted); }
.review-item summary .r-stem { flex: 1; min-width: 180px; color: var(--ink-soft); }
.review-item summary .r-state { font-size: 10px; padding: 2px 7px; border-radius: 999px; }
.review-item summary .r-state.ok { background: var(--green-soft); color: var(--green-deep); }
.review-item summary .r-state.bad { background: var(--red-soft); color: var(--red-deep); }
.review-item summary .r-state.mid { background: var(--gold-soft); color: #77582d; }
.review-item .review-body { padding: 0 16px 16px; font-size: 12px; line-height: 1.85; color: var(--ink-soft); border-top: 1px dashed var(--line); }
.review-item .review-body .rb-line { margin-top: 9px; }
.review-item .review-body .rb-line b { color: var(--red); }

/* ---------- Words ---------- */
.word-dashboard { display: grid; grid-template-columns: 1.35fr 0.65fr; gap: 18px; margin-top: 26px; }
.word-main { padding: 24px; }
.word-side { display: flex; flex-direction: column; gap: 12px; }
.word-stat-card { padding: 17px 18px; }
.word-stat-card .label { font-size: 10px; letter-spacing: 0.1em; color: var(--muted); }
.word-stat-card .value { font-family: var(--serif); font-size: 28px; margin-top: 2px; }
.word-stat-card .sub { font-size: 10px; color: var(--muted-2); }
.word-plan-card { padding: 16px 18px; }

.word-stage {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-xl);
  background: linear-gradient(150deg, #2f584d, #244139 72%);
  color: #fff8ec;
  padding: clamp(24px, 4vw, 38px);
  min-height: 360px;
  display: flex;
  flex-direction: column;
}
.word-stage::after {
  content: "Aa";
  position: absolute; right: 20px; top: -20px;
  font-family: var(--serif); font-size: 150px; line-height: 1;
  color: rgba(255,255,255,0.04);
}
.word-stage-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; position: relative; z-index: 1; }
.word-stage-head span { font-size: 10px; letter-spacing: 0.16em; color: rgba(255,248,236,0.5); }
.word-index { font-family: var(--mono); font-size: 11px; color: rgba(255,248,236,0.55); }

.word-core { position: relative; z-index: 1; margin-top: 24px; }
.word-big { font-family: var(--serif); font-size: clamp(38px, 6vw, 58px); line-height: 1.08; letter-spacing: 0.01em; color: #fff9ed; }
.word-phonetic { font-family: var(--mono); font-size: 12px; color: #dfc79d; margin-top: 5px; }
.word-pos { display: inline-block; font-size: 9px; letter-spacing: 0.08em; color: rgba(255,248,236,0.55); border: 1px solid rgba(255,248,236,0.18); border-radius: 4px; padding: 1px 6px; margin-left: 7px; vertical-align: 2px; }

.word-visual {
  position: relative; z-index: 1;
  margin-top: 16px;
  display: flex; align-items: center; gap: 14px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 15px;
  padding: 13px 15px;
}
.word-visual .emoji { font-size: 34px; line-height: 1; filter: saturate(0.9); }
.word-visual p { font-size: 11.5px; color: rgba(255,248,236,0.7); line-height: 1.7; }

.word-answer { position: relative; z-index: 1; margin-top: 14px; }
.word-meaning { font-size: 17px; font-family: var(--serif); color: #f6e8d0; min-height: 30px; }
.word-hidden { color: rgba(255,248,236,0.38); font-family: var(--sans); font-size: 12px; letter-spacing: 0.05em; }
.word-detail { margin-top: 8px; font-size: 11.5px; color: rgba(255,248,236,0.62); line-height: 1.8; }
.word-detail b { color: #e2c89b; font-weight: 600; }
.word-actions { position: relative; z-index: 1; display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; padding-top: 22px; }
.word-actions .btn { min-height: 40px; }
.word-actions .btn.ghost { color: #fff7e8; border-color: rgba(255,255,255,0.26); background: rgba(255,255,255,0.04); }
.word-actions .btn.ghost:hover { background: rgba(255,255,255,0.12); }
.word-actions .btn.gold { background: #e2c89b; color: #3b2e1b; }

.word-progress-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; font-size: 10px; color: var(--muted); }
.word-progress-line { height: 5px; border-radius: 99px; background: var(--line); overflow: hidden; }
.word-progress-line i { display: block; height: 100%; background: var(--green); border-radius: 99px; transition: width 0.3s ease; }

.word-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 14px; }
.search-box {
  display: flex; align-items: center; gap: 7px;
  border: 1px solid var(--line); background: var(--paper);
  border-radius: 999px; padding: 6px 12px;
}
.search-box svg { width: 14px; height: 14px; color: var(--muted); }
.search-box input { border: 0; background: transparent; outline: 0; font-size: 12px; width: 160px; }

.word-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.word-item {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  border: 1px solid var(--line); background: rgba(255,253,247,0.7);
  border-radius: 10px; padding: 9px 11px; font-size: 12px;
}
.word-item b { font-family: var(--serif); font-weight: 600; }
.word-item span { font-size: 9px; color: var(--muted); }
.word-item.known { border-color: #c8dbcf; background: var(--green-soft); }

/* ---------- Reading & sentences ---------- */
.reading-daily {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 24px 26px;
  background: linear-gradient(135deg, #f8f5ea, #eef5ef);
  border-color: #cfdfd5;
}
.reading-daily h2 { font-size: 25px; margin-top: 5px; }
.reading-daily p { font-size: 12px; color: var(--muted); margin-top: 6px; max-width: 640px; }
.reading-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.reading-card { padding: 22px; display: flex; flex-direction: column; min-height: 230px; position: relative; overflow: hidden; }
.reading-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.reading-index { position: absolute; right: 14px; bottom: 28px; font-family: var(--serif); font-size: 80px; line-height: 1; color: rgba(49,92,80,0.06); pointer-events: none; }
.reading-card h3 { font-family: var(--sans); font-size: 18px; font-weight: 650; margin-top: 16px; position: relative; z-index: 1; line-height: 1.45; }
.reading-card p { font-size: 11px; color: var(--muted); margin-top: 6px; }
.reading-card-foot { margin-top: auto; padding-top: 14px; display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 10.5px; color: var(--muted); position: relative; z-index: 1; }
.sentence-guide { padding: 20px 22px; margin-bottom: 18px; }
.sentence-steps { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 10px; }
.sentence-steps span { border: 1px solid var(--line); background: var(--paper-2); border-radius: 999px; padding: 4px 9px; font-size: 10.5px; color: var(--ink-soft); }
.sentence-guide p { font-size: 11px; color: var(--muted); margin-top: 10px; line-height: 1.8; }
.sentence-list { display: flex; flex-direction: column; gap: 10px; }
.sentence-card { overflow: hidden; }
.sentence-card summary { list-style: none; cursor: pointer; padding: 18px 20px; }
.sentence-card summary::-webkit-details-marker { display: none; }
.sentence-summary-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.sentence-en { font-family: var(--serif); font-size: 18px; line-height: 1.75; margin-top: 10px; color: var(--ink); }
.sentence-open { display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; color: var(--green); margin-top: 8px; }
.sentence-open svg { width: 13px; height: 13px; transition: transform .2s ease; }
.sentence-card[open] .sentence-open svg { transform: rotate(90deg); }
.sentence-body { padding: 0 20px 20px; border-top: 1px dashed var(--line); }
.sentence-block { margin-top: 15px; }
.sentence-block h4 { font-family: var(--sans); font-size: 10px; color: var(--red); letter-spacing: .12em; margin-bottom: 6px; }
.sentence-block p { font-size: 12.5px; line-height: 1.9; color: var(--ink-soft); }
.structure-list { display: flex; flex-direction: column; gap: 6px; }
.structure-row { border: 1px solid var(--line); background: var(--paper-2); border-radius: 10px; padding: 9px 11px; }
.structure-row code { font-family: var(--mono); font-size: 10.5px; color: var(--green-deep); display: block; line-height: 1.6; }
.structure-row span { font-size: 10px; color: var(--red); display: inline-block; margin-top: 2px; }
.structure-row p { font-size: 11px; color: var(--muted); margin-top: 2px; }

/* ---------- Modal ---------- */
.modal-root { position: fixed; inset: 0; z-index: 100; display: none; }
.modal-root.open { display: block; }
.modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(28, 30, 26, 0.5);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  animation: fade-in 0.2s ease both;
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

.modal {
  position: relative;
  width: min(680px, calc(100% - 32px));
  max-height: calc(100vh - 60px);
  overflow: auto;
  margin: 30px auto;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  padding: 26px;
  animation: modal-in 0.26s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  scrollbar-width: thin;
}
.modal.wide { width: min(900px, calc(100% - 32px)); }
@keyframes modal-in { from { opacity: 0; transform: translateY(14px) scale(0.985); } to { opacity: 1; transform: none; } }

.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.modal-head h2 { font-size: 24px; }
.modal-head p { font-size: 11px; color: var(--muted); margin-top: 3px; }
.modal-close {
  width: 32px; height: 32px; border-radius: 50%;
  border: 1px solid var(--line); background: transparent;
  display: grid; place-items: center; color: var(--muted); flex: 0 0 auto;
}
.modal-close:hover { background: var(--paper-2); color: var(--ink); }
.modal-close svg { width: 15px; height: 15px; }
.modal-body { margin-top: 18px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; flex-wrap: wrap; }

.prediction-card {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 16px;
}
.prediction-card h4 { font-family: var(--sans); font-size: 10px; color: var(--red); letter-spacing: 0.12em; margin-bottom: 5px; }
.prediction-card p { font-size: 12px; line-height: 1.85; color: var(--ink-soft); }

.visual-card { margin-top: 14px; }
.visual-card .concept-row { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.visual-card .concept-node {
  border: 1px solid var(--line); border-radius: 12px; padding: 12px;
  background: var(--paper-2);
}
.visual-card .concept-node b { display: block; font-family: var(--serif); font-size: 17px; }
.visual-card .concept-node span { font-size: 10px; color: var(--muted); }
.visual-card .concept-caption { font-size: 11px; color: var(--muted); margin-top: 8px; text-align: center; }

/* ---------- Toast ---------- */
.toast-root { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 140; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toast {
  background: var(--ink);
  color: #fff9ed;
  border-radius: 999px;
  padding: 9px 17px;
  font-size: 12px;
  box-shadow: var(--shadow);
  animation: toast-in 0.25s ease both;
  max-width: calc(100vw - 40px);
}
.toast.ok { background: var(--green-deep); }
.toast.warn { background: #7b5a2e; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid rgba(201,189,168,0.55);
  padding: 26px 0 40px;
  margin-top: 10px;
}
.footer-inner { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.footer-brand { display: flex; align-items: center; gap: 9px; font-family: var(--serif); font-size: 14px; }
.footer-note { font-size: 10.5px; color: var(--muted); line-height: 1.8; max-width: 640px; }
.footer-links { display: flex; gap: 12px; flex-wrap: wrap; font-size: 10.5px; color: var(--muted); }
.footer-links a:hover { color: var(--red); }

/* ---------- Info banner ---------- */
.info-banner {
  display: flex; align-items: flex-start; gap: 10px;
  border: 1px solid #e5d3b6;
  background: var(--gold-soft);
  color: #6c522e;
  border-radius: var(--r-md);
  padding: 12px 15px;
  font-size: 11.5px;
  line-height: 1.8;
  margin-top: 18px;
}
.info-banner svg { width: 16px; height: 16px; flex: 0 0 auto; margin-top: 2px; }
.info-banner a { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Misc ---------- */
.mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; } .mt-24 { margin-top: 24px; } .mt-32 { margin-top: 32px; }
.muted { color: var(--muted); }
.small { font-size: 11px; }
.center { text-align: center; }
.hidden { display: none !important; }

/* ---------- Responsive ---------- */
@media (max-width: 1020px) {
  .top-nav { display: none; }
  .menu-btn { display: inline-grid; }
  .home-hero { grid-template-columns: 1fr; }
  .hero-main { min-height: 400px; }
  .hero-side { display: grid; grid-template-columns: 1fr 1fr; }
  .pulse-card { min-height: 250px; }
  .module-grid { grid-template-columns: repeat(2, 1fr); }
  .module-card.wide { grid-column: span 1; }
  .subject-grid { grid-template-columns: 1fr; }
  .exam-intro { grid-template-columns: 1fr; }
  .exam-intro-side { order: -1; }
  .knowledge-layout { grid-template-columns: 230px 1fr; }
  .collection-layout { grid-template-columns: 200px 1fr; }
  .word-dashboard { grid-template-columns: 1fr; }
  .daily-plan-strip { grid-template-columns: 1fr 1fr; }
  .dp-title { grid-column: 1 / -1; }
  .daily-plan-strip a:nth-child(2) { border-left: 0; }
  .word-side { display: grid; grid-template-columns: repeat(3, 1fr); }
  .word-list { grid-template-columns: repeat(2, 1fr); }
  .reading-daily { flex-direction: column; align-items: flex-start; }
  .reading-grid { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  :root { --topbar-h: 60px; }
  .container, .narrow { width: calc(100% - 32px); }
  .brand-text span { display: none; }
  .top-count { padding: 5px 9px; }
  .top-count small, .top-count span { display: none; }
  .top-count b { font-size: 17px; }
  .top-count b::after { content: " 天"; font-family: var(--sans); font-size: 9px; color: var(--muted); }
  .hero-side { grid-template-columns: 1fr; }
  .stats-strip { grid-template-columns: 1fr 1fr; }
  .paper-grid { grid-template-columns: 1fr; }
  .stage-grid { grid-template-columns: 1fr; }
  .exam-layout { grid-template-columns: 1fr; }
  .q-nav-card { position: static; }
  .q-nav-grid { grid-template-columns: repeat(10, 1fr); }
  .knowledge-layout { grid-template-columns: 1fr; }
  .knowledge-side { position: static; max-height: none; order: 2; }
  .k-main { order: 1; }
  .collection-layout { grid-template-columns: 1fr; }
  .filter-panel { position: static; }
  .result-hero { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .result-stats { justify-content: center; }
  .word-side { grid-template-columns: repeat(3, 1fr); }
  .exam-rules { grid-template-columns: 1fr; }
  .timer-label strong { max-width: 150px; }
}

@media (max-width: 560px) {
  body { font-size: 14px; }
  .container, .narrow { width: calc(100% - 24px); }
  .topbar-inner { width: calc(100% - 20px); gap: 8px; }
  .brand-mark { width: 32px; height: 32px; font-size: 17px; }
  .brand-text strong { font-size: 14px; }
  .icon-btn { width: 32px; height: 32px; }
  .home-hero { padding-top: 22px; }
  .hero-main { padding: 24px; min-height: 420px; }
  .hero-title { font-size: 38px; margin-top: 22px; }
  .hero-sub { font-size: 12.5px; }
  .countdown-block { gap: 12px; }
  .countdown-main .num { font-size: 68px; }
  .countdown-ring { width: 64px; height: 64px; }
  .hero-footnote { font-size: 10px; }
  .section { margin-top: 38px; }
  .section-head { margin-bottom: 14px; }
  .subject-card { padding: 22px; min-height: 218px; }
  .subject-card h3 { font-size: 24px; }
  .module-grid { grid-template-columns: 1fr; }
  .module-card { min-height: 150px; }
  .stats-strip { grid-template-columns: 1fr 1fr; }
  .stat-cell { padding: 14px; }
  .stat-cell .value { font-size: 25px; }
  .subject-hero { grid-template-columns: 1fr; padding: 24px; }
  .subject-hero .hero-badge { text-align: left; width: min(240px, 100%); }
  .subject-hero::after { font-size: 100px; }
  .page-head { padding-top: 28px; }
  .page-head h1 { font-size: 30px; }
  .paper-card .year-box { width: 78px; }
  .paper-card .year-box b { font-size: 25px; }
  .affair-card { padding: 17px; }
  .affair-card h3 { font-size: 18px; }
  .collection-item { padding: 14px; }
  .k-detail { padding: 20px; }
  .k-visual-card { grid-template-columns: 1fr; }
  .k-detail-actions { flex-direction: column; align-items: stretch; }
  .k-detail-actions .btn { width: 100%; }
  .word-list { grid-template-columns: 1fr; }
  .word-side { grid-template-columns: 1fr 1fr 1fr; gap: 7px; }
  .word-stat-card { padding: 12px; }
  .word-stat-card .value { font-size: 23px; }
  .word-stage { padding: 22px; min-height: 400px; }
  .word-big { font-size: 40px; }
  .word-actions .btn { flex: 1; }
  .modal { width: calc(100% - 18px); max-height: calc(100vh - 20px); margin: 10px auto; padding: 19px; border-radius: 22px; }
  .modal.wide { width: calc(100% - 18px); }
  .modal-head h2 { font-size: 21px; }
  .q-panel { padding: 18px; }
  .q-stem { font-size: 18px; }
  .q-nav-grid { grid-template-columns: repeat(8, 1fr); }
  .exam-head-left h1 { font-size: 17px; }
  .exam-progress-bar { width: 80px; }
  .result-ring { width: 110px; height: 110px; }
  .result-ring .inner b { font-size: 30px; }
  .global-timer-inner { gap: 6px; padding: 6px 0; }
  .timer-clock { font-size: 17px; }
  .timer-label { font-size: 10px; }
  .timer-label strong { max-width: 110px; }
  .timer-btn { padding: 4px 8px; font-size: 10.5px; }
  .footer-inner { flex-direction: column; }
  .map-wrap { min-height: 0; }
  .map-wrap svg { height: 300px; }
  .toast { font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  .topbar, .global-timer, .site-footer, .q-actions, .q-nav-card, .btn { display: none !important; }
  body { background: #fff; }
  .card, .q-panel { box-shadow: none; border-color: #ccc; }
}
