/* =========================================================
   墨卷 · 公专备考
   纸本、墨绿、朱砂。无外部依赖，离线可用。
   ========================================================= */
:root {
  --bg: #f4efe4;
  --bg-deep: #eae2d2;
  --surface: #fffdf8;
  --surface-2: #faf6ec;
  --surface-3: #f2ecdf;
  --ink: #202b26;
  --ink-2: #35443d;
  --muted: #7a8179;
  --muted-2: #9ba096;
  --line: #e6ddcc;
  --line-strong: #d7cbb6;
  --jade: #235c4f;
  --jade-2: #2f7060;
  --jade-3: #5d8e80;
  --jade-soft: #e3ede8;
  --jade-wash: #eff4f0;
  --red: #b24432;
  --red-2: #c45843;
  --red-soft: #f8e7e1;
  --gold: #b18946;
  --gold-soft: #f2e8d1;
  --sidebar: #17241f;
  --sidebar-2: #1d2e27;
  --white: #fff;
  --shadow-sm: 0 2px 8px rgba(52, 45, 30, .04);
  --shadow: 0 18px 50px -30px rgba(43, 37, 26, .35);
  --shadow-lg: 0 30px 80px -36px rgba(30, 33, 24, .45);
  --serif: "Songti SC", "STSong", "Noto Serif SC", "SimSun", serif;
  --sans: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, sans-serif;
  --radius: 18px;
  --radius-sm: 12px;
  --sidebar-w: 248px;
  --ease: cubic-bezier(.22, .8, .25, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(178, 137, 70, .09), transparent 60%),
    radial-gradient(900px 500px at -10% 30%, rgba(35, 92, 79, .06), transparent 55%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: .3;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.16'/%3E%3C/svg%3E");
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
::selection { background: rgba(178, 137, 70, .28); }
:focus-visible { outline: 2px solid var(--jade-3); outline-offset: 3px; }

/* ---------- Shell ---------- */
.app-shell { min-height: 100vh; }
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  padding: 28px 18px 22px;
  color: #e8e3d7;
  background:
    radial-gradient(340px 220px at 10% 0%, rgba(178, 137, 70, .16), transparent 70%),
    linear-gradient(180deg, var(--sidebar), #131e1a 72%);
  z-index: 40;
  overflow-y: auto;
}
.sidebar::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .18;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 20h100M0 50h100M0 80h100' stroke='%23c1a36b' stroke-width='.4' stroke-dasharray='1 5' opacity='.5'/%3E%3C/svg%3E");
}
.brand { position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; padding: 0 8px 26px; }
.brand-seal {
  width: 46px; height: 46px; flex: 0 0 46px;
  display: grid; place-items: center;
  color: #fbeee1; background: var(--red);
  border: 1px solid rgba(255, 236, 215, .55);
  box-shadow: inset 0 0 0 3px rgba(255, 238, 218, .13);
  font-family: var(--serif); font-size: 25px; font-weight: 700;
  border-radius: 9px;
  transform: rotate(-2deg);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font-family: var(--serif); font-size: 25px; letter-spacing: .14em; color: #f6f0e3; }
.brand-text small { margin-top: 6px; font-size: 10px; letter-spacing: .32em; color: #a9b1a6; }
.side-nav { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 4px; }
.nav-label { margin: 18px 14px 7px; font-size: 10px; letter-spacing: .26em; color: #7f8d83; }
.nav-link {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px;
  color: #c4ccc3;
  border-radius: 11px;
  font-size: 14px;
  transition: color .2s, background .2s, transform .2s;
}
.nav-link svg { width: 19px; height: 19px; opacity: .82; }
.nav-link:hover { color: #fff8e9; background: rgba(255, 248, 232, .06); transform: translateX(2px); }
.nav-link.active { color: #fff8e9; background: linear-gradient(90deg, rgba(178, 137, 70, .2), rgba(255, 255, 255, .04)); }
.nav-link.active::before {
  content: ""; position: absolute; left: 0; top: 9px; bottom: 9px; width: 2px;
  border-radius: 2px; background: #d4b477; box-shadow: 0 0 12px rgba(212, 180, 119, .6);
}
.nav-badge {
  margin-left: auto; min-width: 20px; padding: 1px 6px;
  font-size: 10px; font-weight: 600; text-align: center;
  color: #241f15; background: #d9bb7e; border-radius: 99px;
}
.side-foot { position: relative; z-index: 1; margin-top: auto; padding: 24px 8px 0; }
.streak-card {
  display: flex; align-items: center; gap: 11px;
  padding: 12px 12px; margin-bottom: 16px;
  background: rgba(255, 251, 239, .055);
  border: 1px solid rgba(255, 251, 239, .09);
  border-radius: 13px;
}
.streak-icon { width: 34px; height: 34px; display: grid; place-items: center; color: #e0a755; background: rgba(224, 167, 85, .12); border-radius: 50%; }
.streak-icon svg { width: 18px; height: 18px; }
.streak-card b { display: block; font-size: 15px; color: #f5edda; }
.streak-card small { font-size: 10px; color: #9aa69d; letter-spacing: .08em; }
.goal-mini-head { display: flex; justify-content: space-between; margin-bottom: 7px; font-size: 11px; color: #9da99f; }
.goal-mini-head b { color: #d9c69e; font-weight: 500; }
.side-note { margin-top: 15px; font-size: 10px; color: #6d7b72; letter-spacing: .08em; text-align: center; }

.shell-main { margin-left: var(--sidebar-w); min-height: 100vh; position: relative; z-index: 1; }
.topbar {
  position: sticky; top: 0; z-index: 30;
  height: 76px; padding: 0 34px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  background: rgba(244, 239, 228, .82);
  backdrop-filter: blur(18px) saturate(1.1);
  border-bottom: 1px solid rgba(215, 203, 182, .65);
}
.topbar-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.topbar-kicker { font-size: 10px; letter-spacing: .25em; color: var(--muted); text-transform: uppercase; }
.topbar-title { margin-top: 1px; font-family: var(--serif); font-size: 20px; font-weight: 600; letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.today-chip, .xp-chip, .sync-chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 11px;
  font-size: 11px; color: var(--muted);
  background: rgba(255, 253, 248, .62);
  border: 1px solid var(--line);
  border-radius: 99px;
  white-space: nowrap;
}
.today-chip svg { width: 14px; height: 14px; color: var(--gold); }
.xp-chip { color: var(--jade); border-color: #cfded6; background: var(--jade-wash); font-weight: 600; letter-spacing: .03em; }
.sync-chip { cursor: pointer; transition: .18s; }
.sync-chip:hover { border-color: #c7d8cf; background: var(--jade-wash); color: var(--jade); }
.sync-dot { width: 6px; height: 6px; flex: 0 0 6px; border-radius: 50%; background: var(--muted-2); box-shadow: 0 0 0 3px rgba(120, 130, 120, .1); }
.sync-chip.synced { color: var(--jade); border-color: #cfded6; background: var(--jade-wash); }
.sync-chip.synced .sync-dot { background: #4c8a70; box-shadow: 0 0 0 3px rgba(76, 138, 112, .12); }
.sync-chip.syncing .sync-dot { background: var(--gold); animation: pulse 1s infinite; }
.sync-chip.error { color: var(--red); border-color: #ebc9bf; background: var(--red-soft); }
.sync-chip.error .sync-dot { background: var(--red); }
.sync-chip.checking .sync-dot { background: var(--gold); animation: pulse 1s infinite; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid #d8c9ad;
  color: #fff6e8; background: linear-gradient(145deg, var(--jade-2), #1b473d);
  font-family: var(--serif); font-size: 14px; box-shadow: 0 3px 10px rgba(35, 92, 79, .2);
}
.icon-btn.menu-btn { display: none; }
.view { max-width: 1160px; margin: 0 auto; padding: 28px 34px 70px; outline: none; }
.mobile-nav { display: none; }

/* ---------- Typography & primitives ---------- */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 24px; }
.eyebrow { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 10px; font-weight: 600; letter-spacing: .24em; color: var(--gold); text-transform: uppercase; }
.eyebrow::before { content: ""; width: 22px; height: 1px; background: currentColor; opacity: .7; }
.page-title { font-family: var(--serif); font-size: clamp(26px, 3vw, 34px); line-height: 1.25; font-weight: 600; letter-spacing: .03em; }
.page-sub { margin-top: 7px; font-size: 13px; color: var(--muted); max-width: 660px; }
.page-actions { display: flex; gap: 9px; flex-shrink: 0; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 28px 0 13px; }
.section-title { display: flex; align-items: center; gap: 9px; font-family: var(--serif); font-size: 19px; font-weight: 600; }
.section-title::before { content: ""; width: 3px; height: 15px; border-radius: 2px; background: var(--red); }
.section-link { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); }
.section-link:hover { color: var(--jade); }
.section-link svg { width: 14px; height: 14px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 40px; padding: 0 17px;
  border: 1px solid transparent; border-radius: 10px;
  font-size: 13px; font-weight: 500; letter-spacing: .01em;
  transition: transform .18s var(--ease), box-shadow .18s, background .18s, border-color .18s;
  white-space: nowrap;
}
.btn svg { width: 16px; height: 16px; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .5; pointer-events: none; }
.btn-primary { color: #fffaf0; background: var(--jade); box-shadow: 0 10px 22px -12px rgba(35, 92, 79, .65); }
.btn-primary:hover { background: #1c4f43; box-shadow: 0 14px 25px -12px rgba(35, 92, 79, .7); }
.btn-red { color: #fff8ee; background: var(--red); box-shadow: 0 10px 22px -12px rgba(178, 68, 50, .55); }
.btn-red:hover { background: #9f3a2a; }
.btn-soft { color: var(--jade); background: var(--jade-soft); border-color: #d5e3dc; }
.btn-soft:hover { background: #d9e8e1; }
.btn-ghost { color: var(--ink-2); background: rgba(255, 253, 248, .55); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--line-strong); background: var(--surface); }
.btn-sm { min-height: 32px; padding: 0 12px; font-size: 12px; border-radius: 8px; }
.btn-lg { min-height: 48px; padding: 0 24px; font-size: 14px; border-radius: 12px; }
.btn-block { width: 100%; }
.icon-btn { width: 36px; height: 36px; display: grid; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 9px; color: var(--muted); background: var(--surface); transition: .18s; }
.icon-btn:hover { color: var(--jade); border-color: #c9d8d1; }
.icon-btn svg { width: 17px; height: 17px; }

.chip { display: inline-flex; align-items: center; gap: 5px; height: 27px; padding: 0 10px; border: 1px solid var(--line); border-radius: 99px; color: var(--muted); background: rgba(255, 253, 248, .6); font-size: 11px; white-space: nowrap; }
.chip.active { color: var(--jade); border-color: #bfd4ca; background: var(--jade-soft); font-weight: 500; }
.chip-red { color: var(--red); border-color: #ebc9bf; background: var(--red-soft); }
.chip-gold { color: #8e6a2d; border-color: #e4d2ad; background: var(--gold-soft); }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 7px; border-radius: 5px; font-size: 10px; font-weight: 600; letter-spacing: .03em; }
.badge-jade { color: var(--jade); background: var(--jade-soft); }
.badge-red { color: var(--red); background: var(--red-soft); }
.badge-gold { color: #8b682c; background: var(--gold-soft); }
.badge-gray { color: var(--muted); background: var(--surface-3); }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.tiny { font-size: 10px; }
.serif { font-family: var(--serif); }
.dot-sep::before { content: "·"; margin: 0 6px; color: var(--muted-2); }
.hidden { display: none !important; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.card-pad { padding: 22px; }
.progress { position: relative; height: 7px; overflow: hidden; border-radius: 99px; background: #e6dccb; box-shadow: inset 0 1px 2px rgba(59, 48, 29, .07); }
.progress > i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--jade-2), #6d9b87); transition: width .5s var(--ease); }
.progress.slim { height: 5px; }
.progress.red > i { background: linear-gradient(90deg, var(--red), #d8826f); }
.progress.gold > i { background: linear-gradient(90deg, var(--gold), #d8b87c); }

.ring { --p: 0; --size: 116px; --thick: 9px; width: var(--size); height: var(--size); border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--ring-color, #d8b87c) calc(var(--p) * 1%), rgba(255, 255, 255, .14) 0); position: relative; flex: 0 0 auto; }
.ring::before { content: ""; position: absolute; inset: var(--thick); border-radius: 50%; background: var(--ring-bg, #20332b); }
.ring-inner { position: relative; z-index: 1; text-align: center; }
.ring-inner b { display: block; font-family: var(--serif); font-size: 25px; line-height: 1; color: #fff8e9; }
.ring-inner small { display: block; margin-top: 5px; font-size: 9px; letter-spacing: .14em; color: #b7c0b5; }

/* ---------- Home ---------- */
.home-hero {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: 1.5fr .9fr; gap: 30px;
  padding: 30px 34px;
  color: #f4eee1;
  background:
    radial-gradient(500px 260px at 100% 0%, rgba(178, 137, 70, .28), transparent 70%),
    linear-gradient(135deg, #1c3129 0%, #14241f 58%, #21362d 100%);
  border: 1px solid #2d443a;
  border-radius: 22px;
  box-shadow: 0 24px 55px -34px rgba(20, 36, 31, .8);
}
.home-hero::after {
  content: "公";
  position: absolute; right: 34%; bottom: -68px;
  font-family: var(--serif); font-size: 230px; line-height: 1;
  color: rgba(238, 228, 205, .035);
  pointer-events: none;
}
.hero-copy { position: relative; z-index: 1; }
.hero-kicker { display: inline-flex; align-items: center; gap: 7px; padding: 5px 10px; margin-bottom: 17px; font-size: 10px; letter-spacing: .15em; color: #d8c294; border: 1px solid rgba(216, 194, 148, .3); border-radius: 99px; background: rgba(216, 194, 148, .07); }
.hero-kicker svg { width: 13px; height: 13px; }
.hero-title { font-family: var(--serif); font-size: clamp(25px, 2.7vw, 33px); line-height: 1.35; font-weight: 500; letter-spacing: .04em; color: #fff9ed; }
.hero-title em { font-style: normal; color: #d9bb7e; }
.hero-desc { margin-top: 10px; max-width: 480px; font-size: 12.5px; line-height: 1.8; color: #aebbb1; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.hero-actions .btn-primary { color: #1c2c26; background: #e4cf9f; box-shadow: 0 12px 26px -14px rgba(228, 207, 159, .75); }
.hero-actions .btn-primary:hover { background: #efdcb1; }
.hero-actions .btn-ghost { color: #e8e1d2; border-color: rgba(238, 228, 205, .22); background: rgba(255, 255, 255, .04); }
.hero-actions .btn-ghost:hover { background: rgba(255, 255, 255, .08); }
.hero-meta { display: flex; flex-wrap: wrap; gap: 19px; margin-top: 24px; padding-top: 17px; border-top: 1px solid rgba(238, 228, 205, .11); }
.hero-meta div { display: flex; align-items: baseline; gap: 6px; }
.hero-meta b { font-family: var(--serif); font-size: 18px; font-weight: 500; color: #f2e5ca; }
.hero-meta span { font-size: 10px; color: #93a196; letter-spacing: .06em; }
.hero-progress { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; min-width: 190px; }
.hero-progress .ring { --size: 148px; --thick: 10px; --ring-bg: #1b2f27; }
.hero-progress .ring-inner b { font-size: 32px; }
.hero-progress .ring-inner small { font-size: 10px; }
.hero-progress-note { text-align: center; font-size: 11px; color: #aab7ad; }
.hero-progress-note b { color: #e2cc9d; font-weight: 500; }
.hero-task-pill { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 99px; font-size: 10px; color: #ddc797; background: rgba(221, 199, 151, .1); border: 1px solid rgba(221, 199, 151, .2); }
.hero-task-pill svg { width: 12px; height: 12px; }

.exam-strip { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 14px; margin-top: 12px; padding: 11px 15px; background: linear-gradient(100deg, #fffdf8, #faf2e3); border: 1px solid #e5d7bf; border-radius: 14px; box-shadow: var(--shadow-sm); }
.exam-strip-title { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.exam-strip-title .eyebrow { margin: 0; font-size: 9px; }
.exam-strip-title b { font-family: var(--serif); font-size: 15px; font-weight: 600; letter-spacing: .02em; }
.exam-cards { display: flex; gap: 8px; }
.exam-card { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 9px; align-items: center; min-width: 145px; padding: 7px 11px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255, 253, 248, .8); }
.exam-name { grid-row: 1 / 3; font-size: 11px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.exam-days { display: flex; align-items: baseline; gap: 3px; grid-column: 2; }
.exam-days b { font-family: var(--serif); font-size: 25px; line-height: 1; color: var(--red); font-weight: 600; }
.exam-days small { font-size: 9px; color: var(--muted); white-space: nowrap; }
.exam-date { grid-column: 2; margin-top: 2px; font-size: 8.5px; color: var(--muted-2); letter-spacing: .04em; }
.exam-card.past { opacity: .58; }
.exam-card.past .exam-days b { color: var(--muted); }
.exam-card.today { border-color: #d9b279; background: #fff8e8; }
.exam-note { max-width: 125px; text-align: right; font-size: 9px; line-height: 1.6; color: var(--muted-2); }

.metric-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }.metric-card { display: flex; align-items: center; gap: 12px; padding: 15px 17px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-sm); }
.metric-icon { width: 36px; height: 36px; flex: 0 0 36px; display: grid; place-items: center; border-radius: 10px; color: var(--jade); background: var(--jade-soft); }
.metric-icon.red { color: var(--red); background: var(--red-soft); }
.metric-icon.gold { color: #94702f; background: var(--gold-soft); }
.metric-icon svg { width: 18px; height: 18px; }
.metric-card b { display: block; font-family: var(--serif); font-size: 21px; line-height: 1.1; font-weight: 600; }
.metric-card small { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; letter-spacing: .05em; }

.home-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, .75fr); gap: 18px; align-items: start; }
.home-grid > * { min-width: 0; }
.quick-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.quick-card {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; align-items: flex-start; gap: 9px;
  min-height: 126px; padding: 17px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 15px;
  transition: transform .22s var(--ease), box-shadow .22s, border-color .22s;
}
.quick-card:hover { transform: translateY(-3px); border-color: #d4c6ae; box-shadow: var(--shadow); }
.quick-card::after { content: ""; position: absolute; right: -28px; bottom: -32px; width: 96px; height: 96px; border-radius: 50%; background: var(--quick-wash, var(--jade-soft)); opacity: .7; }
.quick-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; color: var(--quick-color, var(--jade)); background: var(--quick-wash, var(--jade-soft)); }
.quick-icon svg { width: 18px; height: 18px; }
.quick-card b { position: relative; z-index: 1; font-family: var(--serif); font-size: 16px; font-weight: 600; }
.quick-card small { position: relative; z-index: 1; color: var(--muted); font-size: 10.5px; }
.quick-arrow { position: absolute; right: 14px; top: 15px; color: var(--muted-2); }
.quick-arrow svg { width: 15px; height: 15px; }

.rec-list { display: flex; flex-direction: column; gap: 7px; }
.rec-item { display: flex; align-items: center; gap: 10px; padding: 10px 11px; border: 1px solid transparent; border-radius: 11px; transition: .18s; }
.rec-item:hover { background: var(--surface-2); border-color: var(--line); }
.rec-dot { width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }
.rec-dot.gold { background: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
.rec-dot.jade { background: var(--jade-2); box-shadow: 0 0 0 3px var(--jade-soft); }
.rec-body { min-width: 0; flex: 1; }
.rec-body b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 500; }
.rec-body small { display: block; margin-top: 1px; color: var(--muted); font-size: 10px; }
.rec-score { font-family: var(--serif); font-size: 12px; color: var(--red); }
.rec-score.jade { color: var(--jade); }

.insight-card { padding: 20px; background: linear-gradient(160deg, #fffdf8, #faf3e5); border: 1px solid #e7d9c3; border-radius: 17px; }
.insight-mark { width: 32px; height: 32px; display: grid; place-items: center; color: #8d682c; background: var(--gold-soft); border-radius: 9px; margin-bottom: 13px; }
.insight-mark svg { width: 17px; height: 17px; }
.insight-card h3 { font-family: var(--serif); font-size: 18px; font-weight: 600; }
.insight-card p { margin-top: 7px; color: var(--muted); font-size: 11.5px; line-height: 1.8; }
.insight-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 13px; }
.insight-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 17px; padding-top: 13px; border-top: 1px dashed var(--line-strong); }
.insight-foot span { font-size: 10px; color: var(--muted); }
.insight-foot a { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; color: var(--jade); }

.module-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.module-card { position: relative; overflow: hidden; padding: 15px; background: var(--surface); border: 1px solid var(--line); border-radius: 13px; transition: .2s; }
.module-card:hover { border-color: #cdbfa7; transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.module-card .mod-icon { width: 27px; height: 27px; display: grid; place-items: center; margin-bottom: 10px; color: var(--mod-color, var(--jade)); background: var(--mod-wash, var(--jade-soft)); border-radius: 7px; }
.module-card .mod-icon svg { width: 15px; height: 15px; }
.module-card b { display: block; font-size: 12px; font-weight: 600; }
.module-card small { display: block; margin: 2px 0 9px; color: var(--muted); font-size: 9.5px; }
.module-card .progress { height: 4px; }
.module-card .mod-pct { position: absolute; top: 14px; right: 12px; font-family: var(--serif); font-size: 11px; color: var(--muted); }

.heat-card { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 17px 20px; }
.heat-info b { font-family: var(--serif); font-size: 15px; font-weight: 600; }
.heat-info p { margin-top: 3px; font-size: 10.5px; color: var(--muted); }
.heatmap { display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, 9px); gap: 3px; }
.heatmap i { width: 9px; height: 9px; border-radius: 2px; background: #ece5d7; }
.heatmap i[data-level="1"] { background: #cfe0d6; }
.heatmap i[data-level="2"] { background: #94bbaa; }
.heatmap i[data-level="3"] { background: #5b917d; }
.heatmap i[data-level="4"] { background: #235c4f; }
.heat-legend { display: flex; align-items: center; gap: 3px; margin-top: 7px; justify-content: flex-end; font-size: 8px; color: var(--muted-2); }
.heat-legend i { width: 8px; height: 8px; border-radius: 2px; background: #ece5d7; }

/* ---------- Practice landing ---------- */
.practice-hero { display: grid; grid-template-columns: 1.2fr .8fr; gap: 18px; margin-bottom: 18px; }
.smart-panel { position: relative; overflow: hidden; padding: 26px 28px; color: #f8f2e5; background: linear-gradient(135deg, #214137, #162a23); border-radius: 20px; box-shadow: var(--shadow); }
.smart-panel::after { content: "练"; position: absolute; right: 18px; bottom: -43px; font-family: var(--serif); font-size: 160px; color: rgba(244, 238, 227, .045); }
.smart-panel .eyebrow { color: #d6ba83; }
.smart-title { font-family: var(--serif); font-size: 25px; line-height: 1.35; }
.smart-panel p { margin-top: 8px; max-width: 460px; font-size: 12px; color: #aebbb1; line-height: 1.8; }
.smart-stats { display: flex; gap: 20px; margin-top: 18px; }
.smart-stats b { display: block; font-family: var(--serif); font-size: 19px; color: #e7d5ae; }
.smart-stats small { font-size: 9.5px; color: #91a096; }
.smart-panel .btn { margin-top: 19px; background: #e3ce9e; color: #1a2b24; }
.smart-panel .btn:hover { background: #efddb7; }
.mode-panel { padding: 21px; }
.mode-panel h3 { font-family: var(--serif); font-size: 18px; }
.mode-list { display: flex; flex-direction: column; gap: 6px; margin-top: 13px; }
.mode-row { display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 9px; border: 1px solid transparent; transition: .18s; cursor: pointer; }
.mode-row:hover { background: var(--surface-2); }
.mode-row.active { background: var(--jade-wash); border-color: #d4e3db; }
.mode-row .mode-ico { width: 29px; height: 29px; flex: 0 0 29px; display: grid; place-items: center; border-radius: 8px; color: var(--muted); background: var(--surface-3); }
.mode-row.active .mode-ico { color: var(--jade); background: var(--jade-soft); }
.mode-row .mode-ico svg { width: 15px; height: 15px; }
.mode-row b { font-size: 12px; font-weight: 500; }
.mode-row small { display: block; color: var(--muted); font-size: 9.5px; }
.mode-check { margin-left: auto; color: var(--jade); opacity: 0; }
.mode-row.active .mode-check { opacity: 1; }
.mode-check svg { width: 15px; height: 15px; }

.setup-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .9fr); gap: 18px; align-items: start; }
.setup-card { padding: 22px; }
.setup-card h3 { font-family: var(--serif); font-size: 18px; }
.setup-card .setup-note { margin-top: 3px; font-size: 10.5px; color: var(--muted); }
.count-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 15px; }
.count-btn { padding: 13px 8px; text-align: center; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-2); transition: .18s; }
.count-btn b { display: block; font-family: var(--serif); font-size: 22px; color: var(--ink-2); }
.count-btn small { font-size: 9.5px; color: var(--muted); }
.count-btn.active { border-color: var(--jade); background: var(--jade-wash); box-shadow: inset 0 0 0 1px var(--jade); }
.count-btn.active b { color: var(--jade); }
.chapter-select { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 13px; max-height: 232px; overflow-y: auto; padding-right: 3px; }
.chapter-select .chip { height: 30px; cursor: pointer; }
.start-box { margin-top: 18px; padding: 14px; border: 1px dashed var(--line-strong); border-radius: 12px; background: var(--surface-2); }
.start-box-line { display: flex; justify-content: space-between; align-items: center; font-size: 11px; color: var(--muted); }
.start-box-line b { color: var(--ink); font-weight: 600; }
.start-box .btn { margin-top: 11px; }
.focus-card { margin-top: 13px; padding: 13px; border-radius: 11px; background: var(--red-soft); border: 1px solid #edcec4; }
.focus-card b { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--red); }
.focus-card p { margin-top: 4px; font-size: 10.5px; color: #8c5a4f; line-height: 1.7; }

.session-list { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.session-row { display: flex; align-items: center; gap: 11px; padding: 10px 11px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); }
.session-ico { width: 31px; height: 31px; display: grid; place-items: center; color: var(--jade); background: var(--jade-soft); border-radius: 8px; }
.session-ico svg { width: 15px; height: 15px; }
.session-row b { display: block; font-size: 11px; font-weight: 500; }
.session-row small { display: block; color: var(--muted); font-size: 9.5px; }
.session-row .session-score { margin-left: auto; font-family: var(--serif); font-size: 15px; color: var(--jade); }

/* ---------- Quiz ---------- */
.quiz-wrap { max-width: 850px; margin: 0 auto; }
.quiz-top { display: flex; align-items: center; gap: 13px; margin-bottom: 17px; }
.quiz-top .icon-btn { flex: 0 0 34px; }
.quiz-progress { flex: 1; }
.quiz-progress-meta { display: flex; justify-content: space-between; margin-bottom: 7px; font-size: 10.5px; color: var(--muted); }
.quiz-progress-meta b { color: var(--ink); font-weight: 500; }
.quiz-progress .progress { height: 6px; }
.quiz-score { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--jade); white-space: nowrap; }
.quiz-score svg { width: 14px; height: 14px; }
.quiz-card { position: relative; padding: 26px 30px 24px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); }
.quiz-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-bottom: 16px; }
.quiz-type { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 5px; color: var(--jade); background: var(--jade-soft); font-size: 10px; font-weight: 600; letter-spacing: .04em; }
.quiz-type.red { color: var(--red); background: var(--red-soft); }
.quiz-type.gold { color: #8e6a2c; background: var(--gold-soft); }
.quiz-source { margin-left: auto; font-size: 9.5px; color: var(--muted-2); }
.q-stem { font-family: var(--serif); font-size: clamp(18px, 2.3vw, 23px); line-height: 1.7; font-weight: 500; letter-spacing: .01em; }
.q-stem .blank {
  display: inline-block; min-width: 76px; margin: 0 4px; padding: 0 7px 2px;
  border-bottom: 2px solid var(--gold); color: var(--red);
  text-align: center; font-family: var(--sans); font-size: .82em;
}
.q-tip { margin-top: 8px; font-size: 10.5px; color: var(--muted-2); }

.options { display: flex; flex-direction: column; gap: 9px; margin-top: 23px; }
.option {
  width: 100%; display: flex; align-items: flex-start; gap: 12px; text-align: left;
  padding: 13px 15px; border: 1px solid var(--line); border-radius: 11px;
  background: var(--surface-2); color: var(--ink-2); font-size: 13.5px; line-height: 1.6;
  transition: border-color .17s, background .17s, transform .17s, box-shadow .17s;
}
.option:hover:not(.disabled) { border-color: #bccec5; background: var(--jade-wash); transform: translateX(2px); }
.option-key { width: 24px; height: 24px; flex: 0 0 24px; display: grid; place-items: center; margin-top: 1px; border: 1px solid var(--line-strong); border-radius: 6px; color: var(--muted); background: var(--surface); font-family: var(--serif); font-size: 12px; font-weight: 600; }
.option.selected { border-color: var(--jade); background: var(--jade-wash); }
.option.selected .option-key { color: #fff; background: var(--jade); border-color: var(--jade); }
.option.correct { border-color: #78a794; background: #edf6f0; }
.option.correct .option-key { color: #fff; background: var(--jade-2); border-color: var(--jade-2); }
.option.wrong { border-color: #d79280; background: #fcf0ec; }
.option.wrong .option-key { color: #fff; background: var(--red); border-color: var(--red); }
.option.disabled { pointer-events: none; }
.option-result { margin-left: auto; flex: 0 0 auto; color: var(--jade); }
.option-result svg { width: 17px; height: 17px; }
.option.wrong .option-result { color: var(--red); }

.cloze-area { margin-top: 24px; }
.cloze-label { display: block; margin-bottom: 7px; font-size: 10.5px; color: var(--muted); letter-spacing: .04em; }
.cloze-input {
  width: 100%; min-height: 52px; padding: 12px 15px;
  border: 1px solid var(--line-strong); border-radius: 10px;
  background: var(--surface-2); font-size: 16px; font-family: var(--serif);
  transition: border-color .18s, box-shadow .18s, background .18s;
}
.cloze-input:focus { outline: none; border-color: var(--jade-2); background: var(--surface); box-shadow: 0 0 0 3px rgba(35, 92, 79, .09); }
.cloze-input.correct { border-color: #78a794; background: #edf6f0; }
.cloze-input.wrong { border-color: #d79280; background: #fcf0ec; }
.cloze-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }
.cloze-hint { margin-top: 7px; font-size: 10px; color: var(--muted-2); }

.judge-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; margin-top: 24px; }
.judge-btn { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 58px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); font-size: 15px; font-family: var(--serif); transition: .18s; }
.judge-btn:hover:not(.disabled) { border-color: var(--jade-2); background: var(--jade-wash); }
.judge-btn .j-mark { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 50%; background: var(--surface-3); color: var(--muted); font-size: 14px; }
.judge-btn.correct { border-color: #78a794; background: #edf6f0; color: var(--jade); }
.judge-btn.wrong { border-color: #d79280; background: #fcf0ec; color: var(--red); }
.judge-btn.disabled { pointer-events: none; }

.feedback { margin-top: 18px; padding: 15px 17px; border-radius: 12px; border: 1px solid #cfe2d8; background: #f1f7f3; animation: slideUp .3s var(--ease); }
.feedback.bad { border-color: #ebc8bd; background: #fdf2ee; }
.feedback-head { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; color: var(--jade); }
.feedback.bad .feedback-head { color: var(--red); }
.feedback-head svg { width: 17px; height: 17px; }
.feedback-answer { margin-top: 8px; font-size: 12px; color: var(--ink-2); line-height: 1.8; }
.feedback-answer b { color: var(--red); font-weight: 600; }
.feedback-explain { margin-top: 6px; font-size: 11.5px; color: #5f6c64; line-height: 1.8; }
.feedback-point { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; padding-top: 9px; border-top: 1px dashed rgba(120, 140, 128, .3); font-size: 10px; color: var(--muted); }
.feedback-point button { border: 0; background: none; padding: 0; color: var(--jade); font-size: 10px; text-decoration: underline; text-underline-offset: 2px; }
.quiz-next { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; }
.quiz-next .shortcut { font-size: 9.5px; color: var(--muted-2); }
.kbd { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 4px; margin: 0 2px; border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 4px; background: var(--surface); font-family: var(--sans); font-size: 9px; color: var(--muted); }

/* ---------- Result ---------- */
.result-wrap { max-width: 760px; margin: 0 auto; }
.result-hero { position: relative; overflow: hidden; padding: 32px; text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); }
.result-hero::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 5px; background: linear-gradient(90deg, var(--jade), #89ab97, var(--gold)); }
.result-seal { width: 64px; height: 64px; display: grid; place-items: center; margin: 3px auto 12px; border: 2px solid #d7b87e; border-radius: 50%; color: var(--jade); font-family: var(--serif); font-size: 28px; background: var(--jade-wash); }
.result-kicker { font-size: 10px; letter-spacing: .25em; color: var(--gold); }
.result-title { margin-top: 7px; font-family: var(--serif); font-size: 28px; font-weight: 600; }
.result-sub { margin-top: 5px; font-size: 12px; color: var(--muted); }
.result-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 23px auto 0; max-width: 460px; }
.result-stat { padding: 13px 8px; border-radius: 11px; background: var(--surface-2); border: 1px solid var(--line); }
.result-stat b { display: block; font-family: var(--serif); font-size: 25px; color: var(--jade); line-height: 1.2; }
.result-stat small { display: block; font-size: 9.5px; color: var(--muted); letter-spacing: .06em; }
.result-stat.red b { color: var(--red); }
.result-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 9px; margin-top: 23px; }
.result-review { margin-top: 17px; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.result-review h3 { display: flex; align-items: center; gap: 7px; font-family: var(--serif); font-size: 17px; }
.result-review h3 svg { width: 17px; height: 17px; color: var(--red); }
.review-list { display: flex; flex-direction: column; gap: 8px; margin-top: 13px; }
.review-item { padding: 11px 12px; border-left: 3px solid #ddb2a5; border-radius: 0 8px 8px 0; background: #fdf6f2; }
.review-item b { display: block; font-size: 11.5px; font-weight: 500; line-height: 1.6; }
.review-item small { display: block; margin-top: 3px; font-size: 10px; color: var(--muted); }
.review-item small em { font-style: normal; color: var(--red); font-weight: 600; }

/* ---------- Recite ---------- */
.recite-hero { position: relative; overflow: hidden; display: grid; grid-template-columns: 1.3fr .7fr; gap: 22px; padding: 28px 30px; background: linear-gradient(125deg, #fdf9f0, #f4ead7); border: 1px solid #e3d3b8; border-radius: 20px; }
.recite-hero::after { content: "背"; position: absolute; right: 20%; bottom: -50px; font-family: var(--serif); font-size: 170px; color: rgba(178, 137, 70, .07); }
.recite-hero h2 { font-family: var(--serif); font-size: 27px; font-weight: 600; }
.recite-hero p { margin-top: 6px; font-size: 12px; color: var(--muted); max-width: 480px; line-height: 1.8; }
.recite-stats { position: relative; z-index: 1; display: flex; align-items: center; justify-content: flex-end; gap: 22px; }
.recite-stat b { display: block; font-family: var(--serif); font-size: 29px; color: var(--red); line-height: 1.1; }
.recite-stat small { font-size: 9.5px; color: var(--muted); letter-spacing: .05em; }
.recite-stat.jade b { color: var(--jade); }
.recite-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; margin-top: 18px; align-items: start; }
.recite-options { padding: 18px; }
.recite-options h3 { font-family: var(--serif); font-size: 16px; }
.recite-options .chapter-select { max-height: 195px; }
.recite-start { margin-top: 15px; }
.recite-list-card { margin-top: 18px; padding: 20px; }
.card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin-top: 13px; }
.mini-card { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); transition: .18s; text-align: left; }
.mini-card:hover { border-color: #c8d6ce; background: var(--jade-wash); }
.mini-card b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11.5px; font-weight: 500; }
.mini-card small { display: block; color: var(--muted); font-size: 9.5px; }
.mini-card .mini-dot { width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: var(--line-strong); }
.mini-card.due .mini-dot { background: var(--red); }
.mini-card.mastered .mini-dot { background: var(--jade-2); }

.recite-wrap { max-width: 780px; margin: 0 auto; }
.recite-top { display: flex; align-items: center; gap: 12px; margin-bottom: 15px; }
.recite-top .progress { flex: 1; }
.recite-count { font-size: 11px; color: var(--muted); white-space: nowrap; }
.flash-card { position: relative; min-height: 410px; padding: 32px 36px; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); overflow: hidden; }
.flash-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: linear-gradient(180deg, var(--red), var(--gold)); opacity: .75; }
.flash-card::after { content: "墨卷"; position: absolute; right: 25px; bottom: 21px; font-family: var(--serif); font-size: 12px; letter-spacing: .35em; color: rgba(178, 137, 70, .28); }
.flash-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.flash-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.flash-index { font-family: var(--serif); font-size: 12px; color: var(--muted-2); }
.flash-body { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 25px 0; }
.flash-prompt { font-family: var(--serif); font-size: clamp(24px, 3.2vw, 33px); line-height: 1.55; font-weight: 500; letter-spacing: .02em; text-align: center; }
.flash-hint { margin-top: 15px; text-align: center; font-size: 10.5px; color: var(--muted-2); letter-spacing: .1em; }
.flash-divider { width: 42px; height: 2px; margin: 20px auto 18px; background: var(--gold); opacity: .55; }
.flash-answer { text-align: center; font-size: clamp(17px, 2.1vw, 21px); line-height: 1.8; color: var(--jade); font-weight: 500; }
.flash-detail { max-width: 590px; margin: 14px auto 0; text-align: center; font-size: 12px; line-height: 1.85; color: var(--muted); }
.flash-foot { display: flex; align-items: center; justify-content: space-between; padding-top: 13px; border-top: 1px solid var(--line); font-size: 9.5px; color: var(--muted-2); }
.flash-actions { display: flex; gap: 8px; margin-top: 14px; }
.rating-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.rate-btn { min-height: 52px; padding: 7px 5px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); transition: .18s; }
.rate-btn b { display: block; font-family: var(--serif); font-size: 14px; }
.rate-btn small { display: block; margin-top: 1px; font-size: 9px; color: var(--muted); }
.rate-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.rate-btn.again:hover { border-color: #d79b8b; background: #fdf1ec; }
.rate-btn.hard:hover { border-color: #dfc08a; background: #fbf4e6; }
.rate-btn.good:hover { border-color: #9dbfae; background: #eff6f1; }
.rate-btn.easy:hover { border-color: #8bb3a0; background: #e9f4ed; }
.reveal-btn { width: 100%; min-height: 52px; border: 1px dashed #c9b895; border-radius: 11px; background: var(--surface-2); color: var(--muted); font-size: 12px; transition: .18s; }
.reveal-btn:hover { color: var(--jade); border-color: var(--jade-2); background: var(--jade-wash); }
.recite-footnote { margin-top: 12px; text-align: center; font-size: 9.5px; color: var(--muted-2); }

/* ---------- Weak points ---------- */
.weak-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px; margin-bottom: 16px; }
.weak-sum { padding: 16px 18px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); }
.weak-sum small { font-size: 10px; color: var(--muted); }
.weak-sum b { display: block; margin-top: 2px; font-family: var(--serif); font-size: 25px; color: var(--ink-2); }
.weak-sum.red b { color: var(--red); }
.weak-sum.jade b { color: var(--jade); }
.weak-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 13px; }
.tabs { display: inline-flex; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.tab-btn { padding: 7px 13px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font-size: 11.5px; }
.tab-btn.active { color: var(--jade); background: var(--surface); box-shadow: 0 1px 5px rgba(50, 40, 25, .08); font-weight: 500; }
.weak-list { display: flex; flex-direction: column; gap: 9px; }
.weak-item { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); transition: .18s; }
.weak-item:hover { border-color: #d3c4ac; box-shadow: var(--shadow-sm); }
.weak-rank { width: 25px; height: 25px; flex: 0 0 25px; display: grid; place-items: center; border-radius: 7px; color: var(--red); background: var(--red-soft); font-family: var(--serif); font-size: 12px; }
.weak-main { flex: 1; min-width: 0; }
.weak-main b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; font-weight: 500; }
.weak-main small { display: block; margin-top: 2px; color: var(--muted); font-size: 9.5px; }
.weak-mastery { width: 125px; flex: 0 0 125px; }
.weak-mastery-meta { display: flex; justify-content: space-between; margin-bottom: 4px; font-size: 9px; color: var(--muted); }
.weak-mastery-meta b { color: var(--red); font-weight: 500; }
.weak-actions { display: flex; gap: 5px; }
.weak-actions .btn { min-height: 29px; padding: 0 9px; font-size: 10.5px; }
.wrong-list { display: flex; flex-direction: column; gap: 8px; }
.wrong-item { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); overflow: hidden; }
.wrong-head { display: flex; align-items: flex-start; gap: 10px; width: 100%; padding: 13px 15px; border: 0; background: none; text-align: left; }
.wrong-num { width: 23px; height: 23px; flex: 0 0 23px; display: grid; place-items: center; margin-top: 1px; border-radius: 6px; color: var(--red); background: var(--red-soft); font-size: 10px; font-weight: 600; }
.wrong-q { flex: 1; min-width: 0; font-size: 12px; line-height: 1.65; }
.wrong-q small { display: block; margin-top: 2px; color: var(--muted); font-size: 9.5px; }
.wrong-body { display: none; padding: 0 15px 14px 48px; }
.wrong-item.open .wrong-body { display: block; animation: slideUp .2s var(--ease); }
.wrong-answer { padding: 9px 11px; border-radius: 8px; background: #f2f7f4; font-size: 11.5px; line-height: 1.7; }
.wrong-answer b { color: var(--jade); }
.wrong-explain { margin-top: 6px; font-size: 10.5px; line-height: 1.75; color: var(--muted); }
.wrong-foot { display: flex; justify-content: flex-end; gap: 6px; margin-top: 9px; }

/* ---------- Library ---------- */
.library-toolbar { display: flex; gap: 9px; align-items: center; margin-bottom: 14px; }
.search-box { position: relative; flex: 1; }
.search-box svg { position: absolute; left: 13px; top: 50%; width: 17px; height: 17px; transform: translateY(-50%); color: var(--muted); }
.search-box input { width: 100%; height: 42px; padding: 0 14px 0 40px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); font-size: 12.5px; transition: .18s; }
.search-box input:focus { outline: none; border-color: #b6cdc2; box-shadow: 0 0 0 3px rgba(35, 92, 79, .07); }
.library-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 17px; align-items: start; }
.filter-panel { position: sticky; top: 94px; padding: 15px; max-height: calc(100vh - 112px); overflow-y: auto; }
.filter-panel h3 { margin: 0 0 8px 3px; font-size: 9.5px; letter-spacing: .2em; color: var(--muted); font-weight: 600; }
.filter-item { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 7px 9px; border: 0; border-radius: 7px; background: none; color: var(--muted); font-size: 11px; text-align: left; }
.filter-item:hover { background: var(--surface-2); color: var(--ink); }
.filter-item.active { color: var(--jade); background: var(--jade-soft); font-weight: 500; }
.filter-item small { font-size: 9px; opacity: .7; }
.point-list { display: flex; flex-direction: column; gap: 8px; }
.point-row { display: flex; gap: 13px; padding: 14px 15px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); transition: .18s; }
.point-row:hover { border-color: #d1c3ab; box-shadow: var(--shadow-sm); }
.point-mastery { width: 42px; height: 42px; flex: 0 0 42px; display: grid; place-items: center; position: relative; border-radius: 50%; background: conic-gradient(var(--mc, var(--jade-2)) calc(var(--mp, 0) * 1%), var(--surface-3) 0); }
.point-mastery::before { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--surface); }
.point-mastery span { position: relative; z-index: 1; font-size: 9px; color: var(--muted); }
.point-main { flex: 1; min-width: 0; }
.point-main h4 { font-size: 12.5px; font-weight: 600; }
.point-main p { margin-top: 2px; display: -webkit-box; overflow: hidden; -webkit-line-clamp: 2; -webkit-box-orient: vertical; color: var(--muted); font-size: 10.5px; line-height: 1.65; }
.point-main .point-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.point-side { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; gap: 6px; flex: 0 0 auto; }
.point-side .btn { min-height: 27px; padding: 0 8px; font-size: 9.5px; }
.doc-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.doc-card { padding: 14px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); transition: .18s; text-align: left; }
.doc-card:hover { border-color: #cfc0a7; background: var(--surface-2); }
.doc-card b { display: block; font-size: 12px; font-weight: 500; }
.doc-card small { display: block; margin-top: 2px; color: var(--muted); font-size: 9.5px; }
.doc-card .doc-meta { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; font-size: 9px; color: var(--muted-2); }

/* ---------- Stats ---------- */
.stats-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr); gap: 11px; }
.stat-big { padding: 19px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.stat-big small { font-size: 10px; color: var(--muted); letter-spacing: .06em; }
.stat-big b { display: block; margin-top: 3px; font-family: var(--serif); font-size: 33px; line-height: 1.1; color: var(--jade); }
.stat-big b.red { color: var(--red); }
.stat-big b.gold { color: #9b7738; }
.stat-big span { font-size: 10px; color: var(--muted-2); }
.chart-card { padding: 20px; }
.chart-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 17px; }
.chart-head h3 { font-family: var(--serif); font-size: 17px; }
.chart-head span { font-size: 10px; color: var(--muted); }
.bars { display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); align-items: end; gap: 8px; height: 130px; padding-top: 8px; border-bottom: 1px solid var(--line); background-image: repeating-linear-gradient(to top, transparent 0 31px, rgba(120, 105, 79, .07) 31px 32px); }
.bar-col { min-width: 0; width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; height: 100%; }
.bar-col b { font-size: 8px; color: var(--muted); font-weight: 500; }
.bar-col i { width: 100%; max-width: 24px; min-height: 2px; border-radius: 3px 3px 0 0; background: linear-gradient(180deg, #75a28d, #2f6b5f); transition: height .4s var(--ease); }
.bar-col.empty i { background: var(--surface-3); }
.bar-labels { display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); gap: 8px; margin-top: 7px; }
.bar-labels span { min-width: 0; text-align: center; font-size: 8px; color: var(--muted-2); }
.mastery-list { display: flex; flex-direction: column; gap: 11px; margin-top: 3px; }
.mastery-row { display: flex; align-items: center; gap: 11px; }
.mastery-row .m-name { width: 110px; flex: 0 0 110px; font-size: 11px; }
.mastery-row .m-bar { flex: 1; }
.mastery-row .m-val { width: 38px; flex: 0 0 38px; text-align: right; font-family: var(--serif); font-size: 12px; color: var(--muted); }
.achievement-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
.achievement { padding: 14px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); text-align: center; opacity: .48; }
.achievement.unlocked { opacity: 1; border-color: #dfccab; background: linear-gradient(160deg, #fffdf8, #faf2e2); }
.achievement .ach-icon { width: 34px; height: 34px; display: grid; place-items: center; margin: 0 auto 7px; border-radius: 50%; color: #9c7b40; background: var(--gold-soft); }
.achievement .ach-icon svg { width: 17px; height: 17px; }
.achievement b { display: block; font-size: 10.5px; }
.achievement small { display: block; margin-top: 2px; font-size: 8.5px; color: var(--muted); }
.settings-card { padding: 20px; }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.setting-row:last-child { border-bottom: 0; }
.setting-row b { display: block; font-size: 12px; font-weight: 500; }
.setting-row small { display: block; margin-top: 2px; color: var(--muted); font-size: 10px; }
.goal-choices { display: flex; gap: 5px; }
.goal-choice { min-width: 35px; height: 29px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-2); color: var(--muted); font-size: 10.5px; }
.goal-choice.active { color: var(--jade); border-color: var(--jade-2); background: var(--jade-soft); font-weight: 600; }
.storage-actions { display: flex; gap: 6px; }
.file-input { display: none; }

/* ---------- Account & sync ---------- */
.auth-tabs { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 4px; padding: 4px; margin-bottom: 18px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 11px; }
.auth-tab { min-height: 34px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: 12px; }
.auth-tab.active { color: var(--jade); background: var(--surface); box-shadow: 0 1px 6px rgba(50, 40, 25, .08); font-weight: 600; }
.auth-field { display: block; margin-bottom: 13px; }
.auth-field span { display: block; margin-bottom: 5px; font-size: 10.5px; color: var(--muted); letter-spacing: .04em; }
.auth-field input { width: 100%; height: 44px; padding: 0 13px; border: 1px solid var(--line-strong); border-radius: 9px; background: var(--surface-2); font-size: 14px; transition: .18s; }
.auth-field input:focus { outline: none; border-color: var(--jade-2); background: var(--surface); box-shadow: 0 0 0 3px rgba(35, 92, 79, .08); }
.auth-hint { font-size: 10px; line-height: 1.7; color: var(--muted-2); }
.auth-error { display: none; margin: 0 0 11px; padding: 8px 10px; border-radius: 7px; background: var(--red-soft); color: var(--red); font-size: 10.5px; line-height: 1.6; }
.auth-error.show { display: block; }
.auth-warning { margin: 0 0 13px; padding: 8px 10px; border: 1px solid #ebc9bf; border-radius: 8px; background: var(--red-soft); color: #7d4035; font-size: 10px; line-height: 1.7; }
.auth-warning b { color: var(--red); }
.auth-submit { width: 100%; margin-top: 4px; }
.auth-sep { display: flex; align-items: center; gap: 10px; margin: 16px 0 12px; color: var(--muted-2); font-size: 9px; letter-spacing: .1em; }
.auth-sep::before, .auth-sep::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-foot { font-size: 10px; line-height: 1.8; color: var(--muted); text-align: center; }
.account-head { display: flex; align-items: center; gap: 13px; padding: 5px 0 16px; }
.account-avatar { width: 52px; height: 52px; flex: 0 0 52px; display: grid; place-items: center; border-radius: 50%; color: #fff7e9; background: linear-gradient(145deg, var(--jade-2), #1b473d); font-family: var(--serif); font-size: 22px; box-shadow: 0 5px 16px rgba(35, 92, 79, .2); }
.account-head b { display: block; font-family: var(--serif); font-size: 20px; font-weight: 600; }
.account-head small { display: block; margin-top: 2px; font-size: 10px; color: var(--muted); }
.account-status { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 13px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.account-status b { display: flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 500; }
.account-status small { display: block; margin-top: 2px; color: var(--muted); font-size: 9.5px; }
.account-status .sync-dot { width: 7px; height: 7px; }
.account-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 15px; }
.account-note { margin-top: 14px; padding: 10px 12px; border-radius: 8px; background: var(--gold-soft); border: 1px solid #e7d5b2; color: #745a2d; font-size: 10px; line-height: 1.75; }
.account-note b { color: #624a22; }
.account-danger { margin-left: auto; color: var(--red) !important; }
@media (max-width: 980px) {
  .sync-chip { display: none; }
}

/* ---------- Modal, toast, empty ---------- */
.modal-root { position: fixed; inset: 0; z-index: 90; display: none; align-items: center; justify-content: center; padding: 20px; background: rgba(20, 27, 23, .46); backdrop-filter: blur(4px); }
.modal-root.open { display: flex; animation: fadeIn .18s ease; }
.modal { width: min(620px, 100%); max-height: 86vh; overflow-y: auto; background: var(--surface); border: 1px solid #ddd0b8; border-radius: 18px; box-shadow: var(--shadow-lg); animation: modalUp .25s var(--ease); }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 20px 22px 14px; border-bottom: 1px solid var(--line); }
.modal-head h3 { font-family: var(--serif); font-size: 20px; font-weight: 600; line-height: 1.4; }
.modal-head p { margin-top: 3px; font-size: 10px; color: var(--muted); }
.modal-body { padding: 18px 22px 22px; }
.modal-close { flex: 0 0 30px; width: 30px; height: 30px; }
.modal-point-answer { padding: 13px 15px; border-radius: 10px; background: var(--jade-wash); border: 1px solid #d7e4dd; color: var(--jade); font-size: 13px; line-height: 1.8; }
.modal-detail { margin-top: 10px; font-size: 12px; line-height: 1.85; color: var(--muted); }
.modal-qlist { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; }
.modal-q { padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); font-size: 11px; line-height: 1.6; }
.modal-q .badge { margin-right: 5px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 7px; margin-top: 15px; }

.toast-stack { position: fixed; z-index: 120; left: 50%; bottom: 26px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 7px; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 7px; padding: 9px 14px; border: 1px solid #d6c7ae; border-radius: 9px; background: #fffaf0; box-shadow: 0 12px 30px -14px rgba(35, 30, 20, .4); color: var(--ink-2); font-size: 11.5px; animation: toastIn .22s var(--ease); }
.toast svg { width: 15px; height: 15px; color: var(--jade); }
.toast.red svg { color: var(--red); }
.empty { padding: 42px 20px; text-align: center; }
.empty-icon { width: 52px; height: 52px; display: grid; place-items: center; margin: 0 auto 12px; border-radius: 50%; color: var(--muted); background: var(--surface-3); }
.empty-icon svg { width: 23px; height: 23px; }
.empty h3 { font-family: var(--serif); font-size: 18px; }
.empty p { margin: 5px auto 0; max-width: 330px; font-size: 11.5px; line-height: 1.8; color: var(--muted); }
.empty .btn { margin-top: 15px; }
.divider { height: 1px; background: var(--line); margin: 18px 0; }
.notice { display: flex; align-items: flex-start; gap: 9px; padding: 11px 13px; border-radius: 9px; background: var(--gold-soft); border: 1px solid #e7d5b2; color: #745a2d; font-size: 10.5px; line-height: 1.7; }
.notice svg { flex: 0 0 15px; width: 15px; height: 15px; margin-top: 1px; }
.fade-in { animation: fadeUp .36s var(--ease); }
.delay-1 { animation-delay: .04s; animation-fill-mode: both; }
.delay-2 { animation-delay: .08s; animation-fill-mode: both; }

@keyframes fadeUp { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }
@keyframes modalUp { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes pulse { 0%, 100% { opacity: .65; } 50% { opacity: 1; } }

/* ---------- Responsive ---------- */
@media (max-width: 1120px) {
  .module-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .home-grid { grid-template-columns: 1.3fr .8fr; }
  .recite-layout { grid-template-columns: minmax(0, 1fr) 270px; }
  .library-layout { grid-template-columns: 195px minmax(0, 1fr); }
}
@media (max-width: 980px) {
  :root { --sidebar-w: 220px; }
  .sidebar { padding-left: 13px; padding-right: 13px; }
  .view { padding-left: 24px; padding-right: 24px; }
  .topbar { padding: 0 24px; }
  .home-hero { grid-template-columns: 1.35fr .8fr; padding: 25px; gap: 18px; }
  .hero-progress .ring { --size: 126px; }
  .practice-hero { grid-template-columns: minmax(0, 1fr); }
  .setup-grid { grid-template-columns: minmax(0, 1fr); }
  .recite-layout { grid-template-columns: minmax(0, 1fr); }
  .recite-options { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 18px; }
  .recite-options h3 { grid-column: 1 / -1; }
  .recite-start { grid-column: 1 / -1; }
  .library-layout { grid-template-columns: minmax(0, 1fr); }
  .filter-panel { position: static; display: flex; flex-wrap: wrap; gap: 5px; padding: 9px; max-height: none; overflow: visible; }
  .filter-panel h3 { display: none; }
  .filter-item { width: auto; gap: 5px; padding: 6px 9px; }
  .filter-item small { display: none; }
  .weak-mastery { width: 100px; flex-basis: 100px; }
  .doc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .sidebar { transform: translateX(-100%); transition: transform .28s var(--ease); width: 260px; box-shadow: 20px 0 60px rgba(0,0,0,.35); }
  .sidebar.open { transform: none; }
  .shell-main { margin-left: 0; }
  .icon-btn.menu-btn { display: grid; }
  .topbar { height: 64px; padding: 0 17px; }
  .topbar-kicker { display: none; }
  .topbar-title { font-size: 17px; }
  .topbar-right .today-chip { display: none; }
  .view { padding: 20px 17px 108px; }
  .mobile-nav {
    position: fixed; z-index: 45; left: 0; right: 0; bottom: 0; height: 66px;
    display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
    padding: 5px 5px max(5px, env(safe-area-inset-bottom));
    background: rgba(255, 252, 245, .94);
    backdrop-filter: blur(18px);
    border-top: 1px solid var(--line);
  }
  .mobile-nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--muted); font-size: 9px; border-radius: 8px; }
  .mobile-nav a svg { width: 20px; height: 20px; }
  .mobile-nav a.active { color: var(--jade); background: var(--jade-wash); font-weight: 500; }
  .home-hero { grid-template-columns: minmax(0, 1fr); padding: 24px 22px; }
  .exam-strip { grid-template-columns: minmax(0, 1fr); gap: 9px; padding: 11px 12px; }
  .exam-cards { width: 100%; }
  .exam-card { flex: 1; min-width: 0; }
  .exam-note { max-width: none; text-align: left; }
  .hero-progress { flex-direction: row; justify-content: flex-start; gap: 18px; min-width: 0; padding-top: 4px; }
  .hero-progress .ring { --size: 104px; }
  .hero-progress-note { text-align: left; }
  .metric-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-grid { grid-template-columns: minmax(0, 1fr); }
  .module-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .heat-card { flex-direction: column; align-items: flex-start; }
  .heatmap { align-self: center; }
  .page-head { align-items: flex-start; flex-direction: column; gap: 12px; }
  .page-actions { width: 100%; }
  .page-actions .btn { flex: 1; }
  .quiz-card { padding: 20px 18px 18px; border-radius: 16px; }
  .quiz-source { width: 100%; margin-left: 0; }
  .recite-hero { grid-template-columns: minmax(0, 1fr); padding: 22px; }
  .recite-stats { justify-content: flex-start; }
  .recite-hero-side { display: none !important; }
  .hero-progress-note { flex: 1; }
  .chapter-select { max-height: none; overflow: visible; }
  .flash-card { min-height: 360px; padding: 24px 21px; }
  .result-stats { gap: 7px; }
  .weak-item { flex-wrap: wrap; gap: 9px 11px; }
  .weak-main { flex-basis: calc(100% - 38px); }
  .weak-mastery { width: calc(100% - 38px); flex-basis: calc(100% - 38px); margin-left: 36px; }
  .weak-actions { margin-left: auto; }
  .card-grid { grid-template-columns: minmax(0, 1fr); }
  .achievement-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats-hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .stats-hero .stat-big:last-child { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .topbar-title { font-size: 15px; }
  .xp-chip { display: none; }
  .avatar { width: 31px; height: 31px; }
  .home-hero { border-radius: 17px; }
  .hero-title { font-size: 24px; }
  .hero-desc { font-size: 11.5px; }
  .hero-meta { gap: 12px; }
  .hero-progress { gap: 13px; }
  .hero-task-pill { display: none; }
  .metric-card { padding: 12px; gap: 9px; }
  .metric-icon { width: 31px; height: 31px; flex-basis: 31px; }
  .metric-card b { font-size: 18px; }
  .quick-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .quick-card { min-height: 115px; padding: 14px; }
  .module-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .section-title { font-size: 17px; }
  .count-row { gap: 6px; }
  .count-btn b { font-size: 19px; }
  .q-stem { font-size: 18px; line-height: 1.65; }
  .option { padding: 11px 12px; font-size: 12.5px; }
  .quiz-top { gap: 9px; }
  .rating-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .flash-prompt { font-size: 24px; }
  .flash-answer { font-size: 17px; }
  .recite-options { display: block; }
  .weak-summary { gap: 7px; }
  .weak-sum { padding: 12px; }
  .weak-sum b { font-size: 21px; }
  .weak-actions .btn span { display: none; }
  .doc-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .result-hero { padding: 24px 18px; }
  .result-stats { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr); }
  .result-stat b { font-size: 22px; }
  .stats-hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .stats-hero .stat-big b { font-size: 27px; }
  .chart-card { padding: 15px; }
  .bars { gap: 4px; }
  .bar-labels { gap: 4px; }
  .toast-stack { bottom: 82px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
