/*!
 * 关务刷题本  样式
 * 配色来自 PDF 资料：深蓝标题条、金色题号、红色答案、绿色一句话、黄色怎么记、蓝色说明、灰色依据
 * 数字字体 Barlow Semi Condensed（SIL OFL 1.1，见 fonts/OFL.txt）
 */

@font-face { font-family: "GW Num"; src: url("../fonts/num-200.woff2") format("woff2"); font-weight: 200; font-display: swap; }
@font-face { font-family: "GW Num"; src: url("../fonts/num-300.woff2") format("woff2"); font-weight: 300; font-display: swap; }
@font-face { font-family: "GW Num"; src: url("../fonts/num-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "GW Num"; src: url("../fonts/num-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

/* ---------- 色板 ---------- */

:root {
  --bg: #f1f3f7;
  --surface: #ffffff;
  --surface-2: #f6f8fa;
  --ink: #14223a;
  --ink-2: #4a5568;
  --ink-3: #8691a3;
  --line: #dce1e9;
  --line-2: #ebeef3;
  --line-strong: #c9d2de;

  --navy-0: #0c1f3b;      /* 首页主卡、模考、成绩单、作答顶栏 */
  --navy: #1f3a5f;        /* PDF 标题条、主按钮 */
  --navy-h: #284b78;
  --navy-ink: #1f3a5f;    /* 深蓝文字（深色模式下变浅） */
  --gold: #e4b23c;
  --gold-2: #f3c95f;

  --red: #d12f2f;   --red-bg: #fdeded;
  --green: #2e7d32; --green-bg: #e9f5ea;
  --amber: #8f6200; --amber-bar: #e5a21a; --amber-bg: #fff5d9; --amber-bd: #b7791f;
  --blue: #3567cf;  --blue-bg: #ebf1fc;
  --gray-bd: #98a2b0;
  --case: #f2f4f7;
  --link: #1f5fb0;

  --cb-s: #1f3a5f; --cb-m: #7c98c6; --cb-j: #e4b23c;

  --bar-bg: rgba(241, 243, 247, .9);
  --shell-bg: rgba(255, 255, 255, .9);
  --shadow-pop: 0 24px 64px rgba(8, 16, 30, .28);

  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC", "MiSans", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC", "Helvetica Neue", Arial, sans-serif;
  --num: "GW Num", "DIN Alternate", "Bahnschrift", var(--sans);

  --side: 232px;
  --top: 0px;
  --pad-x: 40px;
  --pad-y: 32px;
  color-scheme: light;
}

/* 考点领域：标签、色条、题号下划线共用 */
.d-gl { --mod: #0f7287; --mod-bg: #e3f3f6; --mod-line: #8fcad6; }
.d-ss { --mod: #b35a07; --mod-bg: #fdf1e4; --mod-line: #edb98a; }
.d-tg { --mod: #2550c7; --mod-bg: #e9effc; --mod-line: #9db4ee; }
.d-jy { --mod: #1d7a3e; --mod-bg: #e6f4ea; --mod-line: #93cda6; }
.d-xy { --mod: #c0264f; --mod-bg: #fce9ef; --mod-line: #eda2b8; }
.d-gz { --mod: #6b3fc9; --mod-bg: #f0ebfc; --mod-line: #bca6ec; }

/* 模块色：每套资料里按模块顺序分配，和 PDF 一致 */
.mc0 { --mod: #c0264f; --mod-bg: #fce9ef; --mod-line: #eda2b8; }
.mc1 { --mod: #0f7287; --mod-bg: #e3f3f6; --mod-line: #8fcad6; }
.mc2 { --mod: #b35a07; --mod-bg: #fdf1e4; --mod-line: #edb98a; }
.mc3 { --mod: #1d7a3e; --mod-bg: #e6f4ea; --mod-line: #93cda6; }
.mc4 { --mod: #a1287f; --mod-bg: #f9e8f4; --mod-line: #e0a3cf; }
.mc5 { --mod: #6b3fc9; --mod-bg: #f0ebfc; --mod-line: #bca6ec; }
.mc6 { --mod: #7d6608; --mod-bg: #f7f1d8; --mod-line: #d9c77f; }
.mc7 { --mod: #2550c7; --mod-bg: #e9effc; --mod-line: #9db4ee; }

html[data-theme="dark"] {
  --bg: #0d1626;
  --surface: #131e31;
  --surface-2: #18243a;
  --ink: #e5eaf2;
  --ink-2: #a9b4c5;
  --ink-3: #75819a;
  --line: #263450;
  --line-2: #1d2a42;
  --line-strong: #2f4060;
  --navy-0: #0f2546;
  --navy: #1f3a5f;
  --navy-h: #2a4b77;
  --navy-ink: #9dbbeb;
  --red: #f07a7a;   --red-bg: #3a1c22;
  --green: #6cc27a; --green-bg: #15301f;
  --amber: #f0c24e; --amber-bar: #d9a21c; --amber-bg: #33290f; --amber-bd: #a8761c;
  --blue: #84a8f5;  --blue-bg: #18284a;
  --gray-bd: #5f6b80;
  --case: #1a2740;
  --link: #8db5f5;
  --cb-s: #7fa3dc; --cb-m: #4c6c9f; --cb-j: #e4b23c;
  --bar-bg: rgba(13, 22, 38, .9);
  --shell-bg: rgba(19, 30, 49, .92);
  --shadow-pop: 0 24px 64px rgba(0, 0, 0, .55);
  color-scheme: dark;
}
html[data-theme="dark"] .mc0 { --mod: #f48aa8; --mod-bg: #3d1724; --mod-line: #7e3550; }
html[data-theme="dark"] .mc1 { --mod: #5cc3d6; --mod-bg: #10313a; --mod-line: #2b6b78; }
html[data-theme="dark"] .mc2 { --mod: #f2a35e; --mod-bg: #3a2614; --mod-line: #7a4f2a; }
html[data-theme="dark"] .mc3 { --mod: #6fcb8c; --mod-bg: #133222; --mod-line: #2f6b45; }
html[data-theme="dark"] .mc4 { --mod: #e88ccd; --mod-bg: #3a1733; --mod-line: #7a3a6a; }
html[data-theme="dark"] .mc5 { --mod: #b79bf5; --mod-bg: #2a1e4a; --mod-line: #574393; }
html[data-theme="dark"] .mc6 { --mod: #e0cb6a; --mod-bg: #33300f; --mod-line: #6e6324; }
html[data-theme="dark"] .mc7 { --mod: #8eaaf5; --mod-bg: #1a2850; --mod-line: #3b5394; }
html[data-theme="dark"] .d-gl { --mod: #5cc3d6; --mod-bg: #10313a; --mod-line: #2b6b78; }
html[data-theme="dark"] .d-ss { --mod: #f2a35e; --mod-bg: #3a2614; --mod-line: #7a4f2a; }
html[data-theme="dark"] .d-tg { --mod: #8eaaf5; --mod-bg: #1a2850; --mod-line: #3b5394; }
html[data-theme="dark"] .d-jy { --mod: #6fcb8c; --mod-bg: #133222; --mod-line: #2f6b45; }
html[data-theme="dark"] .d-xy { --mod: #f48aa8; --mod-bg: #3d1724; --mod-line: #7e3550; }
html[data-theme="dark"] .d-gz { --mod: #b79bf5; --mod-bg: #2a1e4a; --mod-line: #574393; }

/* ---------- 基础 ---------- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
img, svg { display: block; }
h1, h2, h3, h4 { line-height: 1.3; }

.num { font-family: var(--num); font-variant-numeric: tabular-nums lining-nums; font-weight: 600; letter-spacing: .01em; }
b .num, strong .num, .num b { font-weight: 700; }

.ic { width: 1.2em; height: 1.2em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

:focus-visible { outline: 3px solid rgba(228, 178, 60, .75); outline-offset: 2px; }
button:focus:not(:focus-visible), a:focus:not(:focus-visible) { outline: none; }
[hidden] { display: none !important; }

.c-red { color: var(--red); }
.c-green { color: var(--green); }

/* ---------- 外框：电脑是左侧栏；平板是顶部悬浮的玻璃导航条；手机是底部悬浮的玻璃标签栏 ---------- */

.shell {
  position: fixed;
  top: 0; bottom: 0; left: 0;
  width: var(--side);
  z-index: 40;
  display: flex;
  flex-direction: column;
  padding: 22px 14px calc(18px + env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
  background: var(--surface);
  border-right: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 11px; padding: 2px 10px 26px; }
.brand-mark {
  position: relative;
  width: 36px; height: 36px;
  border-radius: 10px;
  display: grid; place-items: center;
  background: var(--navy-0);
  color: #fff;
  font-weight: 800;
  font-size: 1.0625rem;
  flex: none;
}
.brand-mark::after { content: ""; position: absolute; left: 9px; right: 9px; bottom: 6px; height: 2px; border-radius: 2px; background: var(--gold); }
.brand-t { display: flex; flex-direction: column; font-weight: 800; font-size: 1.0625rem; line-height: 1.3; }
.brand-t small { font-size: .75rem; font-weight: 500; color: var(--ink-3); }
.shell-title, .shell-me { display: none; }

.nav {
  position: fixed;
  z-index: 45;
  top: 96px;
  left: max(14px, env(safe-area-inset-left));
  width: calc(var(--side) - 28px);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.nav-i {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--ink-2);
  font-weight: 600;
  transition: background-color .15s, color .15s;
}
.nav-i .ic { width: 20px; height: 20px; }
.nav-i:hover { background: var(--surface-2); color: var(--ink); }
.nav-i.is-on { background: var(--surface-2); color: var(--navy-ink); }
.nav-i.is-on::before { content: ""; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--gold); }
.nav-s { display: none; }
.nav-badge {
  margin-left: auto;
  font-style: normal;
  font-family: var(--num);
  font-size: .75rem;
  font-weight: 700;
  line-height: 1.5;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
}

.shell-foot { margin-top: auto; }
.sf { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px 12px; }
.sf small { display: block; font-size: .75rem; color: var(--ink-3); }
.sf b { display: flex; align-items: baseline; gap: 4px; margin: 2px 0; font-size: 2.25rem; line-height: 1.1; color: var(--navy-ink); }
.sf b .num { font-weight: 700; }
.sf b span:last-child { font-size: .875rem; font-weight: 600; color: var(--ink-2); }

.main { margin-left: var(--side); padding: var(--pad-y) var(--pad-x) 80px; min-height: 100vh; }
.page { max-width: 1120px; margin: 0 auto; }
.page--narrow { max-width: 880px; }
.page--reader { max-width: 1200px; }

body.is-run .shell, body.is-run .nav { display: none; }
body.is-run .main { margin: 0; padding: 0; }
body.is-home .shell-foot { visibility: hidden; }

/* ---------- 按钮与控件 ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 40px; padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font-size: .9375rem;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  transition: background-color .15s, border-color .15s, color .15s, transform .1s;
}
.btn:active { transform: translateY(1px); }
.btn .ic { width: 18px; height: 18px; }
.btn--sm { height: 34px; padding: 0 12px; font-size: .875rem; border-radius: 8px; }
.btn--sm .ic { width: 16px; height: 16px; }
.btn--lg { height: 48px; padding: 0 22px; font-size: 1rem; border-radius: 12px; }
.btn--xl { height: 60px; padding: 0 48px; font-size: 1.1875rem; border-radius: 14px; letter-spacing: .04em; }
.btn--navy { background: var(--navy); color: #fff; }
.btn--navy:hover { background: var(--navy-h); }
.btn--gold { background: var(--gold); color: #231a04; }
.btn--gold:hover { background: var(--gold-2); }
.btn--line { border-color: var(--line); background: var(--surface); }
.btn--line:hover { border-color: var(--line-strong); background: var(--surface-2); }
.btn--ghost { border-color: rgba(255, 255, 255, .3); background: transparent; color: #fff; }
.btn--ghost:hover { background: rgba(255, 255, 255, .08); }
.btn--danger { background: var(--red); color: #fff; }
.btn--warn { color: var(--red); }
.btn--icon { width: 48px; padding: 0; flex: none; }
.btn--icon.is-on { color: var(--amber-bd); border-color: var(--amber-bar); background: var(--amber-bg); }
.btn--icon.is-on .ic { fill: currentColor; }
.btn[disabled] { opacity: .42; cursor: default; transform: none; }

.lnk { padding: 0; border: 0; background: none; color: var(--link); font-weight: 600; cursor: pointer; }
.lnk:hover { text-decoration: underline; text-underline-offset: 3px; }
.lnk--light { color: var(--gold-2); margin-left: 8px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 34px; padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-2);
  font-size: .875rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}
.chip span { font-family: var(--num); font-weight: 600; color: var(--ink-3); }
.chip:hover { border-color: var(--line-strong); }
.chip.is-on { background: var(--navy); border-color: var(--navy); color: #fff; }
.chip.is-on span { color: rgba(255, 255, 255, .7); }

.tg {
  display: inline-flex; align-items: center; gap: 8px;
  height: 34px; padding: 0 12px 0 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-2);
  font-size: .875rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}
.tg i { position: relative; flex: none; width: 30px; height: 18px; border-radius: 999px; background: #c9d0da; transition: background-color .2s; }
.tg i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .25); transition: transform .2s; }
.tg[aria-pressed="true"] { color: var(--navy-ink); border-color: var(--line-strong); }
.tg[aria-pressed="true"] i { background: var(--navy); }
html[data-theme="dark"] .tg[aria-pressed="true"] i { background: var(--link); }
.tg[aria-pressed="true"] i::after { transform: translateX(12px); }
.tg--dark { background: transparent; border-color: rgba(255, 255, 255, .22); color: rgba(255, 255, 255, .82); }
.tg--dark i { background: rgba(255, 255, 255, .25); }
.tg--dark[aria-pressed="true"] { color: #fff; border-color: rgba(228, 178, 60, .7); }
.tg--dark[aria-pressed="true"] i, html[data-theme="dark"] .tg--dark[aria-pressed="true"] i { background: var(--gold); }

.sel { position: relative; display: inline-flex; max-width: 100%; }
.sel select {
  -webkit-appearance: none; appearance: none;
  height: 34px; max-width: 15em;
  padding: 0 30px 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: .875rem;
  font-weight: 600;
  text-overflow: ellipsis;
  cursor: pointer;
}
.sel-ic { position: absolute; right: 9px; top: 50%; width: 14px; height: 14px; transform: translateY(-50%) rotate(-90deg); color: var(--ink-3); pointer-events: none; }

.segs { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--line-2); }
.segs button { padding: 6px 12px; border: 0; border-radius: 8px; background: none; color: var(--ink-2); font-size: .875rem; font-weight: 600; cursor: pointer; white-space: nowrap; }
.segs button.is-on { background: var(--surface); color: var(--navy-ink); box-shadow: 0 1px 2px rgba(16, 24, 40, .14); }

/* ---------- 页面标题、分区 ---------- */

.ph { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.ph h1 { margin: 0; font-size: 1.875rem; font-weight: 800; letter-spacing: .01em; }
.ph p { margin: 6px 0 0; color: var(--ink-2); max-width: 46em; }

.sec { margin-top: 40px; }
.sec-hd { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 14px; margin-bottom: 14px; }
.sec-hd h2 { margin: 0; font-size: 1.3125rem; font-weight: 800; }
.sec-hd p { margin: 0; font-size: .875rem; color: var(--ink-3); }
.sec-hd--sub { margin-top: 22px; }
.sec-hd--sub h3 { margin: 0; font-size: 1rem; }

.empty { padding: 44px 20px; text-align: center; color: var(--ink-3); background: var(--surface); border: 1px dashed var(--line-strong); border-radius: 14px; }
.empty p { margin: 0 auto 14px; max-width: 30em; }
.empty p:last-child { margin-bottom: 0; }

/* ---------- 深色主卡共用：首页、模考、成绩单 ---------- */

.hero, .term, .score {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: 22px;
  background: var(--navy-0);
  color: #fff;
}
html[data-theme="dark"] .hero, html[data-theme="dark"] .term, html[data-theme="dark"] .score { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07); }
.hero::before, .term::before, .score::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, .055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .055) 1px, transparent 1px);
  background-size: 32px 32px;
  background-position: -1px -1px;
  -webkit-mask-image: linear-gradient(100deg, transparent 32%, #000 82%);
  mask-image: linear-gradient(100deg, transparent 32%, #000 82%);
}

/* 翻牌数字：口岸、机场的翻牌显示屏 */
.count { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.count small { font-size: .8125rem; color: rgba(255, 255, 255, .62); white-space: nowrap; }
.flaps { display: flex; align-items: flex-end; gap: 6px; }
.flap {
  position: relative;
  display: grid; place-items: center;
  width: 64px; height: 86px;
  overflow: hidden;
  border-radius: 10px;
  background: linear-gradient(180deg, #1b3760 0 50%, #16315a 50% 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08), 0 8px 20px rgba(0, 0, 0, .28);
}
.flap::after { content: ""; position: absolute; left: 0; right: 0; top: calc(50% - 1px); height: 2px; background: rgba(6, 18, 38, .9); }
.flap i { font-style: normal; font-family: var(--num); font-weight: 700; font-size: 66px; line-height: 1; color: #f6f2e6; }
.flap--word { width: auto; padding: 0 16px; }
.flap--word i { font-family: var(--sans); font-size: 2.25rem; font-weight: 800; }
.flap-unit { padding: 0 0 8px 4px; font-size: 1.125rem; font-weight: 700; color: rgba(255, 255, 255, .86); }
.is-enter .flap i { transform: translateY(-115%); }
.is-enter.is-on .flap i { transform: none; transition: transform .75s cubic-bezier(.2, .9, .25, 1.08); }
.is-enter.is-on .flap:nth-child(2) i { transition-delay: .12s; }

/* ---------- 首页：今天的备考面板 + 四个入口 ---------- */

.home { display: grid; gap: 14px; }

.today {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  min-width: 0;
  border-radius: 26px;
  background: #0a1730;
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), inset 0 0 0 1px rgba(255, 255, 255, .04), 0 30px 60px -32px rgba(10, 24, 48, .55);
}
html[data-theme="dark"] .today { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .09), inset 0 0 0 1px rgba(255, 255, 255, .07); }
/* 右上一束冷光、左下一点暖光 */
.today::before { content: ""; position: absolute; inset: 0; z-index: -2; background: radial-gradient(55% 90% at 90% -8%, rgba(78, 124, 206, .38), transparent 62%), radial-gradient(45% 70% at -6% 112%, rgba(228, 178, 60, .1), transparent 60%); }
/* 细噪点，让深色表面有一点磨砂质感 */
.today::after { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .5; pointer-events: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }

/* 四格：每格上面一个标签，中间主视觉，下面一行说明 */
.td-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) repeat(3, minmax(0, 1fr)); padding: 26px 0 22px; }
.td-cell { position: relative; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; min-width: 0; padding: 0 28px; }
.td-cell + .td-cell::before { content: ""; position: absolute; left: 0; top: 2px; bottom: 2px; width: 1px; background: linear-gradient(180deg, transparent, rgba(255, 255, 255, .12) 18%, rgba(255, 255, 255, .12) 82%, transparent); }
.td-lb { margin: 0; font-size: .8125rem; letter-spacing: .06em; color: rgba(255, 255, 255, .56); }
.td-main { display: flex; flex-direction: column; justify-content: center; min-height: 0; padding: 16px 0 14px; }
.td-sub { margin: 0; overflow: hidden; font-size: .8125rem; color: rgba(255, 255, 255, .48); text-overflow: ellipsis; white-space: nowrap; }
.td-sub .num { font-weight: 600; color: rgba(255, 255, 255, .82); }

.td-days { display: flex; align-items: baseline; gap: 8px; margin: 0; line-height: 1; }
.td-days b { font-family: var(--num); font-weight: 200; font-size: 8rem; line-height: .82; letter-spacing: -.02em; color: transparent; background: linear-gradient(180deg, #fff 35%, #a7b8d6 100%); -webkit-background-clip: text; background-clip: text; }
.td-days b.is-word, .td-days--word b { font-family: var(--sans); font-size: 3.5rem; line-height: 1; letter-spacing: .02em; }
.td-days span { font-size: 1.125rem; font-weight: 500; color: rgba(255, 255, 255, .72); }

.td-ring { position: relative; width: 132px; height: 132px; margin: 0; }
.td-ring svg { display: block; width: 100%; height: 100%; overflow: visible; }
.td-trk { fill: none; stroke: rgba(255, 255, 255, .1); stroke-width: 5; }
.td-arc { fill: none; stroke-width: 5; stroke-linecap: round; stroke-dasharray: var(--c); stroke-dashoffset: var(--o); }
.td-ring figcaption { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.td-ring figcaption > b { font-size: 2.625rem; line-height: 1; }
.td-ring figcaption > b .num { font-weight: 300; }
.td-ring figcaption > b small { font-family: var(--num); font-size: 1rem; color: rgba(255, 255, 255, .6); }

.td-big { display: flex; align-items: baseline; gap: 6px; margin: 0 0 16px; line-height: 1; }
.td-big b { font-size: 3.75rem; }
.td-big b .num { font-weight: 300; }
.td-big small { font-size: .875rem; color: rgba(255, 255, 255, .56); }
.td-meter { display: block; height: 4px; overflow: hidden; border-radius: 2px; background: rgba(255, 255, 255, .1); }
.td-meter i { display: block; width: var(--w); height: 100%; border-radius: 2px; background: linear-gradient(90deg, #dea13a, #fbe7ae); }

.td-bars { display: flex; align-items: flex-end; gap: 8px; height: 88px; }
.td-bars i { flex: 1 1 0; max-width: 18px; height: var(--h); min-height: 4px; border-radius: 5px 5px 2px 2px; background: rgba(255, 255, 255, .26); }
.td-bars i.is-zero { background: rgba(255, 255, 255, .08); }
.td-bars i.is-today { background: linear-gradient(180deg, #fbe7ae, #dea13a); box-shadow: 0 0 14px rgba(240, 196, 92, .35); }
.td-bars i.is-today.is-zero { background: rgba(243, 201, 95, .3); box-shadow: none; }

.td-go {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 0 24px;
  width: 100%;
  padding: 16px 28px 18px;
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .03);
  color: #fff;
  text-align: left;
  cursor: pointer;
  transition: background-color .15s;
}
.td-go:hover { background: rgba(255, 255, 255, .06); }
.td-gt { display: flex; flex-direction: column; min-width: 0; }
.td-gk { font-size: .75rem; letter-spacing: .06em; color: var(--gold-2); }
.td-gt b { overflow: hidden; font-size: 1.25rem; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.td-bar { height: 3px; overflow: hidden; border-radius: 2px; background: rgba(255, 255, 255, .1); }
.td-bar i { display: block; width: var(--w); height: 100%; border-radius: 2px; background: linear-gradient(90deg, #dea13a, #fbe7ae); }
.td-gn { font-size: 1.0625rem; white-space: nowrap; }
.td-gn .num { font-weight: 600; }
.td-gn small { font-size: .875rem; color: rgba(255, 255, 255, .5); }
.td-play { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; color: #1d1503; background: var(--gold); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), 0 8px 24px rgba(228, 178, 60, .34); transition: transform .15s; }
.td-go:hover .td-play { transform: scale(1.05); }
.td-go:active .td-play { transform: scale(.96); }
.td-play .ic { width: 22px; height: 22px; margin-left: 3px; }

/* 第一次打开：光环画一圈，柱子和进度条长出来 */
.today.is-enter .td-arc { stroke-dashoffset: var(--c); }
.today.is-enter .td-head { opacity: 0; }
.today.is-enter .td-bar i, .today.is-enter .td-meter i { width: 0; }
.today.is-enter .td-bars i { height: 4px; }
.today.is-enter.is-on .td-arc { stroke-dashoffset: var(--o); transition: stroke-dashoffset 1.6s cubic-bezier(.2, .7, .2, 1) .1s; }
.today.is-enter.is-on .td-head { opacity: 1; transition: opacity .6s 1.35s; }
.today.is-enter.is-on .td-bar i, .today.is-enter.is-on .td-meter i { width: var(--w); transition: width 1.2s cubic-bezier(.2, .7, .2, 1) .35s; }
.today.is-enter.is-on .td-bars i { height: var(--h); transition: height .9s cubic-bezier(.2, .8, .2, 1) calc(var(--i) * 60ms + .2s); }

.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.tile {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 200px;
  padding: 18px 20px 20px;
  border-radius: 22px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(16, 30, 54, .04), 0 12px 30px -14px rgba(16, 30, 54, .16);
  transition: transform .15s, box-shadow .15s;
}
.tile:hover { transform: translateY(-2px); box-shadow: 0 1px 2px rgba(16, 30, 54, .05), 0 18px 36px -14px rgba(16, 30, 54, .22); }
.tile:active { transform: scale(.985); }
html[data-theme="dark"] .tile { box-shadow: inset 0 0 0 1px var(--line); }
.tile-top { display: flex; align-items: center; gap: 10px; font-size: .9375rem; font-weight: 700; }
.tile-ic { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: #eef2f8; color: var(--navy-ink); }
html[data-theme="dark"] .tile-ic { background: var(--surface-2); }
.tile-ic .ic { width: 18px; height: 18px; stroke-width: 1.8; }
.tile-big { display: flex; align-items: baseline; gap: 6px; min-width: 0; margin: auto 0; padding-top: 8px; }
.tile-big b { font-size: 3.125rem; line-height: 1; letter-spacing: -.01em; }
.tile-big b .num { font-weight: 300; }
.tile-big small { overflow: hidden; font-size: .8125rem; color: var(--ink-3); text-overflow: ellipsis; white-space: nowrap; }
.tile-viz { display: flex; align-items: center; height: 16px; margin-top: 14px; }

.tile-seg { display: flex; gap: 3px; width: 100%; height: 6px; }
.tile-seg i { flex: 1; border-radius: 3px; background: #e3e8f0; }
html[data-theme="dark"] .tile-seg i { background: var(--line); }
.tile-seg i.d, html[data-theme="dark"] .tile-seg i.d { background: var(--gold); }
.tile-seg i.p, html[data-theme="dark"] .tile-seg i.p { background: #7ea2e6; }
.books { display: flex; align-items: flex-end; gap: 3px; height: 16px; }
.books i { width: 5px; border-radius: 1.5px; background: #2c4b75; }
.books i:nth-child(4n+2) { background: #4f74ae; }
.books i:nth-child(4n+3) { background: #1f3a5f; }
.books i:nth-child(5n) { background: #7c98c6; }
html[data-theme="dark"] .books i { opacity: .85; }
.meter { position: relative; width: 100%; height: 16px; }
.meter::before { content: ""; position: absolute; left: 0; right: 0; top: 7px; height: 2px; border-radius: 1px; background: #e3e8f0; }
html[data-theme="dark"] .meter::before { background: var(--line); }
.mt-fill { position: absolute; left: 0; top: 7px; height: 2px; border-radius: 1px; background: linear-gradient(90deg, #f6dc98, #e4b23c); }
.mt-pass { position: absolute; top: 2px; width: 1.5px; height: 12px; margin-left: -.75px; background: #9aa4b4; }
.mt-dot { position: absolute; top: 3px; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 4px rgba(228, 178, 60, .18); }
.split { display: flex; gap: 3px; width: 100%; height: 6px; }
.split i { border-radius: 3px; }
.sp-s { background: #e8796f; }
.sp-m { background: #f0a59d; }
.sp-j { background: #f6cbc6; }
.sp-none { flex: 1; background: #e3e8f0; }
html[data-theme="dark"] .sp-none { background: var(--line); }

/* 模拟考试页预计得分用的半圆仪表 */
.gauge { display: block; width: 100%; height: auto; overflow: visible; }
.gauge path { fill: none; stroke-width: 10; stroke-linecap: round; }
.g-bg { stroke: var(--line); }
.g-fg { stroke: var(--gold); }
.g-fg.is-low { stroke: #e8796f; }
.g-tick { stroke: var(--ink-3); stroke-width: 2; }

.tip { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink-2); font-size: .875rem; }
.tip .ic { width: 20px; height: 20px; color: var(--link); }
.tip p { flex: 1; margin: 0; }

/* ---------- 试卷练习 ---------- */

.tlg { display: flex; gap: 14px; align-self: center; font-size: .8125rem; color: var(--ink-3); }
.tlg span { display: inline-flex; align-items: center; gap: 6px; }
.chips + #papers { margin-top: 20px; }
.pgroup + .pgroup { margin-top: 28px; }
.pgroup-h { display: flex; align-items: baseline; gap: 10px; margin: 0 0 12px; font-size: 1rem; font-weight: 800; }
.pgroup-h span { font-size: .8125rem; font-weight: 600; color: var(--ink-3); }
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 12px; }

.pt { display: flex; flex-direction: column; min-width: 0; padding: 16px 18px 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); transition: border-color .15s; }
.pt:hover { border-color: var(--line-strong); }
.pt.is-doing { border-color: var(--line-strong); box-shadow: inset 3px 0 0 var(--gold); }
.pt-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.pt-name { margin: 0; font-size: 1.1875rem; font-weight: 800; letter-spacing: .01em; }
.pt-badge { display: inline-flex; align-items: center; gap: 5px; margin-top: 3px; font-size: .875rem; font-weight: 600; white-space: nowrap; }
.pt-badge small { font-size: .75rem; }
.pt-badge--doing { color: var(--link); }
.pt-badge--done { color: var(--green); }
.pt-badge .ic { width: 14px; height: 14px; stroke-width: 3; }
.mring { width: 16px; height: 16px; transform: rotate(-90deg); }
.mring circle { fill: none; stroke: var(--line); stroke-width: 3; }
.mring .mring-fg { stroke: var(--link); }
.pt-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 14px; }
.pt-n { font-size: 1.25rem; line-height: 1; color: var(--ink-2); }
.pt-n .num { font-weight: 700; }
.pt-n small { margin-left: 2px; font-size: .75rem; color: var(--ink-3); }
.pt-acts { display: inline-flex; align-items: center; gap: 14px; }

.cb-bar { display: flex; gap: 2px; height: 6px; overflow: hidden; border-radius: 3px; }
.cb-bar i { display: block; min-width: 3px; }
.cb-s { background: var(--cb-s); }
.cb-m { background: var(--cb-m); }
.cb-j { background: var(--cb-j); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 2px; flex: none; }
.dot[class*="d-"] { background: var(--mod); }

/* ---------- 学习：书架与搜索 ---------- */

.legend { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 0 0 16px; font-size: .8125rem; color: var(--ink-2); }
.legend > span { display: inline-flex; align-items: center; gap: 6px; }
.legend .bd { margin: 0; }
.lg { font-style: normal; font-size: .75rem; font-weight: 800; line-height: 1.75; padding: 0 7px; border-radius: 5px; }
.lg-ans { color: var(--red); border: 1.5px solid var(--red); }
.lg-one { color: var(--green); background: var(--green-bg); border-left: 3px solid var(--green); border-radius: 0 5px 5px 0; }
.lg-mem { color: var(--amber); background: var(--amber-bg); border-left: 3px solid var(--amber-bar); border-radius: 0 5px 5px 0; }

.search {
  display: flex; align-items: center; gap: 10px;
  height: 54px; padding: 0 18px;
  margin-bottom: 26px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  cursor: text;
}
.search:focus-within { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(31, 58, 95, .14); }
.search .ic { width: 20px; height: 20px; color: var(--ink-3); }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: var(--ink); font: inherit; font-size: max(16px, 1rem); }
.search input::-webkit-search-cancel-button { cursor: pointer; }

.found { margin: 0 0 10px; font-size: .875rem; color: var(--ink-3); }
.hits { display: grid; gap: 8px; }
.hit { display: block; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.hit:hover { border-color: var(--line-strong); }
.hit-src { display: flex; align-items: center; gap: 8px; font-size: .8125rem; color: var(--ink-3); }
.hit-h { display: block; margin: 4px 0 2px; font-weight: 700; }
.hit-x { display: block; font-size: .875rem; color: var(--ink-2); }
mark { padding: 0 1px; border-radius: 2px; background: #ffe7a0; color: inherit; }
html[data-theme="dark"] mark { background: #6b5514; color: #fff; }

.dgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 14px; }
.dt { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.dt-cover { display: block; padding: 14px 16px 16px; background: var(--navy); color: #fff; }
.dt-cover small { display: block; font-size: .6875rem; color: rgba(255, 255, 255, .62); }
.dt-cover b { display: block; margin: 3px 0 4px; font-size: 1.375rem; font-weight: 800; letter-spacing: .02em; }
.dt-cover span { font-size: .75rem; font-weight: 700; color: var(--gold-2); }
.dt-meta { padding: 12px 16px 12px; }
.dt-dom { display: flex; gap: 2px; height: 5px; overflow: hidden; border-radius: 3px; }
.dt-dom i { display: block; background: var(--mod); }
.dt-meta p { margin: 8px 0 0; font-size: .8125rem; color: var(--ink-2); }
.dt-links { display: flex; margin-top: auto; border-top: 1px solid var(--line-2); }
.dt-links a { flex: 1; padding: 10px 0; text-align: center; font-size: .875rem; font-weight: 700; color: var(--link); }
.dt-links a:hover { background: var(--surface-2); }
.dt-links a + a { border-left: 1px solid var(--line-2); }

/* ---------- 学习：逐题解析（PDF 版式） ---------- */

.rd-bar {
  position: sticky;
  top: var(--top);
  z-index: 20;
  margin: calc(var(--pad-y) * -1) calc(var(--pad-x) * -1) 24px;
  padding: 12px var(--pad-x);
  background: var(--bar-bg);
  -webkit-backdrop-filter: saturate(1.3) blur(14px);
  backdrop-filter: saturate(1.3) blur(14px);
  border-bottom: 1px solid var(--line);
}
.rd-bar-in, .rd-tools { max-width: 1200px; margin: 0 auto; }
.rd-bar-in { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 16px; }
.rd-back { display: inline-flex; align-items: center; gap: 2px; color: var(--ink-2); font-weight: 600; font-size: .9375rem; }
.rd-back:hover { color: var(--ink); }
.rd-title { margin: 0; font-size: 1.375rem; font-weight: 800; }
.seg { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--line-2); }
.seg a { padding: 5px 14px; border-radius: 8px; font-size: .9375rem; font-weight: 700; color: var(--ink-2); white-space: nowrap; }
.seg a.is-on { background: var(--surface); color: var(--navy-ink); box-shadow: 0 1px 2px rgba(16, 24, 40, .14); }
.rd-practice { margin-left: auto; }
.rd-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-top: 10px; }
.rd-ixbtn { display: none; }

.rd-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 204px; gap: 28px; align-items: start; }
.rd-side { position: sticky; top: calc(var(--top) + 132px); }
.rd-ix { max-height: calc(100vh - var(--top) - 160px); overflow: auto; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.rd-ix h4 { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 0 0 10px; font-size: .9375rem; }
.rd-ix h4 small { font-size: .6875rem; font-weight: 500; color: var(--ink-3); }
.ix-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(38px, 1fr)); gap: 6px; }
.ix {
  position: relative;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink-2);
  font-family: var(--num);
  font-weight: 600;
  font-size: .9375rem;
  cursor: pointer;
}
.ix::after { content: ""; position: absolute; left: 7px; right: 7px; bottom: 4px; height: 3px; border-radius: 2px; background: var(--mod); }
.ix:hover { border-color: var(--line-strong); }
.ix.is-cur { background: var(--navy); border-color: var(--navy); color: #fff; }

.cov { padding: 26px 30px 22px; border-radius: 16px; background: var(--navy); color: #fff; }
.cov-k { margin: 0; font-size: 1rem; color: rgba(255, 255, 255, .9); }
.cov-t { margin: 4px 0 6px; font-size: 2.375rem; font-weight: 900; letter-spacing: .05em; line-height: 1.2; }
.cov-s { margin: 0; font-size: 1.25rem; font-weight: 800; letter-spacing: .04em; color: var(--gold-2); }
.cov-m { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 12px 0 0; font-size: .8125rem; color: rgba(255, 255, 255, .72); }
.cov-m i { width: 1px; height: 12px; background: rgba(255, 255, 255, .35); }

.h-bar { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; margin: 30px 0 12px; padding-left: 12px; border-left: 5px solid var(--navy); font-size: 1.1875rem; font-weight: 800; line-height: 1.3; }
html[data-theme="dark"] .h-bar { border-left-color: var(--navy-ink); }
.h-bar small { font-size: .8125rem; font-weight: 500; color: var(--ink-3); }

.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0 0 14px; padding: 0; list-style: none; }
.steps li { padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.steps b { display: block; font-weight: 800; }
.steps li:nth-child(1) b::before { content: "① "; }
.steps li:nth-child(2) b::before { content: "② "; }
.steps li:nth-child(3) b::before { content: "③ "; }
.steps span { display: block; margin-top: 2px; font-size: .875rem; color: var(--ink-2); }

.dist-list { display: grid; gap: 4px; }
.dist-i {
  display: grid;
  grid-template-columns: minmax(0, 15em) minmax(0, 1fr) 4.5em;
  align-items: center;
  gap: 14px;
  padding: 6px 10px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: none;
  text-align: left;
  cursor: pointer;
}
.dist-i:hover { background: var(--surface); border-color: var(--line); }
.dist-i.is-on { background: var(--surface); border-color: var(--navy); }
.dist-i .mod { justify-self: start; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.dist-bar { height: 10px; overflow: hidden; border-radius: 5px; background: var(--line-2); }
.dist-bar i { display: block; height: 100%; border-radius: 5px; background: var(--mod); }
.dist-n { font-size: .8125rem; color: var(--ink-2); text-align: right; white-space: nowrap; }

#rd-list { margin-top: 26px; }

/* 题目卡片 */
.qc {
  margin: 0 0 18px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--surface);
  scroll-margin-top: calc(var(--top) + 140px);
}
.qc.is-flash { box-shadow: 0 0 0 3px var(--gold); transition: box-shadow .3s; }
.qc-bar { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 9px 10px 9px 18px; background: var(--navy); color: #fff; }
.qc-no { flex: none; font-size: 1.0625rem; font-weight: 800; color: var(--gold-2); white-space: nowrap; }
.qc-h { flex: 1; min-width: 0; margin: 0; font-size: 1.0625rem; font-weight: 700; line-height: 1.4; }
.qc-h small { margin-left: 10px; font-size: .8125rem; font-weight: 500; color: rgba(255, 255, 255, .62); }
.qc-tags { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 6px; }
.qtype { display: inline-block; padding: 0 7px; border: 1.5px solid var(--navy-ink); border-radius: 6px; font-size: .75rem; font-weight: 800; line-height: 1.65; color: var(--navy-ink); white-space: nowrap; }
.qc-bar .qtype { border-color: #fff; background: #fff; color: var(--navy); }
.mod { display: inline-block; padding: 0 10px; border: 1.5px solid var(--mod-line); border-radius: 999px; background: var(--mod-bg); color: var(--mod); font-size: .8125rem; font-weight: 700; line-height: 1.7; white-space: nowrap; }
.res { display: inline-block; padding: 0 8px; border-radius: 6px; font-size: .75rem; font-weight: 800; line-height: 1.75; background: rgba(255, 255, 255, .16); color: #fff; }
.res-ok { background: #3f9a49; }
.res-bad { background: #d84a4a; }
.qc-fav { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 8px; background: none; color: rgba(255, 255, 255, .5); cursor: pointer; }
.qc-fav:hover { background: rgba(255, 255, 255, .08); color: rgba(255, 255, 255, .8); }
.qc-fav .ic { width: 18px; height: 18px; }
.qc-fav.is-on { color: var(--gold-2); }
.qc-fav.is-on .ic { fill: currentColor; }

.qc-body { padding: 16px 22px 18px; }
.qc-src { margin: 0 0 8px; font-size: .8125rem; color: var(--ink-3); }
.qc-case { margin-bottom: 12px; padding: 12px 14px; border-radius: 10px; background: var(--case); color: var(--ink-2); font-size: .9375rem; line-height: 1.75; }
.qc-stem { font-size: 1.0625rem; font-weight: 700; line-height: 1.65; }
.qc-stem p { margin: 0 0 6px; }
.qc-opts { display: grid; gap: 2px 28px; margin: 8px 0 0; padding: 0; list-style: none; }
.qc-opts.is-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.qc-opts li { display: flex; align-items: flex-start; gap: 8px; margin: 0 -10px; padding: 5px 10px; border-radius: 8px; line-height: 1.6; }
.qc-opts li > b { flex: none; font-weight: 800; color: var(--navy-ink); }
.qc-opts li > span { flex: 1; min-width: 0; }
.qc-opts .is-key { background: var(--green-bg); }
.qc-opts .is-key > b, .qc-opts .is-key > span { color: var(--green); font-weight: 700; }
.qc-opts .is-miss { background: var(--red-bg); }
.tick { flex: none; color: var(--green); }
.tick .ic { width: 18px; height: 18px; margin-top: 3px; stroke-width: 2.6; }
.miss { flex: none; align-self: center; padding: 0 5px; border: 1px solid var(--red); border-radius: 4px; font-style: normal; font-size: .75rem; font-weight: 700; color: var(--red); }

.qc-cut { display: flex; align-items: center; gap: 12px; margin: 14px 0; font-size: .8125rem; color: var(--ink-3); }
.qc-cut::before, .qc-cut::after { content: ""; flex: 1; border-top: 1.5px dashed var(--line-strong); }
.qc-cut span::before { content: "▼ "; font-size: .625rem; }
.qc-cut span::after { content: " ▼"; font-size: .625rem; }
.qc-open { display: none; }
.qc.is-covered .qc-after { display: none; }
.qc.is-covered .qc-open {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 48px;
  border: 1.5px dashed var(--line-strong);
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--navy-ink);
  font-weight: 700;
  cursor: pointer;
}
.qc.is-covered .qc-opts .is-key { background: none; }
.qc.is-covered .qc-opts .is-key > b { color: var(--navy-ink); font-weight: 800; }
.qc.is-covered .qc-opts .is-key > span { color: inherit; font-weight: inherit; }
.qc.is-covered .tick { display: none; }

.qc-key { display: flex; align-items: stretch; gap: 14px; }
.ansbox {
  flex: none;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-width: 96px;
  padding: 6px 14px;
  border: 2px solid var(--red);
  border-radius: 12px;
  background: var(--surface);
  color: var(--red);
}
.ansbox small { font-size: .75rem; font-weight: 800; letter-spacing: .12em; }
.ansbox b { font-family: var(--num); font-size: 2.125rem; font-weight: 700; line-height: 1.05; letter-spacing: .04em; }
.ansbox--word b { font-family: var(--sans); font-size: 1.5rem; font-weight: 900; letter-spacing: .08em; }
.yours { flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 84px; padding: 6px 12px; border: 1.5px dashed var(--line-strong); border-radius: 12px; color: var(--ink-3); }
.yours small { font-size: .75rem; font-weight: 700; }
.yours b { font-family: var(--num); font-size: 1.5rem; line-height: 1.15; }
.yours.is-ok { border-color: var(--green); color: var(--green); }
.yours.is-bad { border-color: var(--red); color: var(--red); }
.yours.is-bad b { text-decoration: line-through; text-decoration-thickness: 2px; }
.one { flex: 1; min-width: 0; padding: 10px 16px; border-left: 5px solid var(--green); border-radius: 0 10px 10px 0; background: var(--green-bg); line-height: 1.75; }
.one > b:first-child { color: var(--green); }
.ansnote { margin: 10px 0 0; padding: 8px 12px; border-radius: 8px; background: var(--blue-bg); color: var(--ink-2); font-size: .875rem; }

.qc-more { margin-top: 12px; }
.qs { margin-top: 10px; line-height: 1.8; }
.qs p { margin: 0 0 6px; }
.qs p:last-child { margin-bottom: 0; }
.qs .bul { padding-left: 1.1em; text-indent: -1.1em; }
.qs-gray { font-size: .875rem; color: var(--ink-3); }
.bd { display: inline-block; margin-right: 8px; padding: 0 7px; border-radius: 5px; font-style: normal; font-size: .75rem; font-weight: 800; line-height: 1.75; color: #fff; vertical-align: 1px; text-indent: 0; white-space: nowrap; }
.bd-navy { background: var(--navy); }
html[data-theme="dark"] .bd-navy { background: #33598e; }
.bd-red { background: #d12f2f; }
.bd-blue { background: #3567cf; }
.bd-gray { background: var(--gray-bd); }
.bd-amber { background: var(--amber-bd); }
.bd-line { margin-bottom: 4px !important; }
.qc em, .nt em, .ask-ana em { font-style: normal; font-weight: 800; color: var(--red); }
.xref { color: var(--link); font-weight: 700; cursor: pointer; text-decoration: underline; text-decoration-color: rgba(31, 95, 176, .35); text-underline-offset: 3px; }

.mem { margin-top: 14px; padding: 10px 16px; border-left: 5px solid var(--amber-bar); border-radius: 0 10px 10px 0; background: var(--amber-bg); line-height: 1.8; }
.mem p { margin: 0 0 6px; }
.mem p:last-child { margin-bottom: 0; }
.mem strong { color: var(--amber); }
.mem .tbwrap { margin: 8px 0 4px; }

.oe { margin: 6px 0 0; padding: 0; overflow: hidden; list-style: none; border: 1px solid var(--line); border-radius: 10px; }
.oe li { display: grid; grid-template-columns: 24px 64px minmax(0, 1fr); gap: 8px; align-items: baseline; padding: 8px 12px; border-top: 1px solid var(--line-2); line-height: 1.65; }
.oe li:first-child { border-top: 0; }
.oe li.is-yes { background: var(--green-bg); }
.oe b { font-family: var(--num); color: var(--navy-ink); }
.oe i { font-style: normal; font-size: .8125rem; font-weight: 700; }
.oe .is-yes i { color: var(--green); }
.oe .is-no i { color: var(--red); }

.tbwrap { margin: 8px 0; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tb { width: 100%; border-collapse: collapse; background: var(--surface); font-size: .875rem; line-height: 1.6; }
.tb th { padding: 8px 12px; background: var(--navy); color: #fff; font-weight: 700; text-align: left; white-space: nowrap; }
.tb td { padding: 8px 12px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.tb tbody tr:nth-child(even) td { background: var(--surface-2); }
.mem .tb tbody tr:nth-child(even) td { background: rgba(255, 255, 255, .5); }
html[data-theme="dark"] .mem .tb tbody tr:nth-child(even) td { background: rgba(0, 0, 0, .15); }

.flow { margin: 8px 0; }
.flow-t { margin-bottom: 6px; font-weight: 700; }
.flow ol { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 0; padding: 0; list-style: none; }
.flow li { position: relative; display: flex; flex-direction: column; padding: 8px 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); font-size: .875rem; }
.flow li + li::before { content: "→"; position: absolute; left: -18px; top: 50%; transform: translateY(-50%); color: var(--ink-3); }
.flow li span { color: var(--ink-2); }

.rd.is-lite .qc-more { display: none; }

/* 考前速记 */
.rd-notes { max-width: 1000px; margin: 0 auto; }
.nt .tbwrap { border: 1px solid var(--line); border-radius: 12px; }
.nt .tb { font-size: .9375rem; }
.tb--map td:first-child { width: 1%; white-space: nowrap; }
.tb--map ul { margin: 0; padding-left: 1.1em; }
.tb--map li { margin: 2px 0; }
.refs { width: 1%; white-space: nowrap; font-family: var(--num); }
.refs .xref { display: inline-block; min-width: 1.5em; }
.tb--one td:first-child { box-shadow: inset 4px 0 0 var(--mod); }
.ans-c { width: 1%; font-family: var(--num); font-weight: 700; color: var(--red); white-space: nowrap; }
.key-n { font-family: var(--num); font-weight: 700; color: var(--navy-ink); white-space: nowrap; }
.key-c { font-weight: 800; color: var(--navy-ink); min-width: 8em; }

.akey { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.akey-row { display: grid; grid-template-columns: 76px minmax(0, 1fr); border-top: 1px solid var(--line-2); }
.akey-row:first-child { border-top: 0; }
.akey-h { display: grid; place-items: center; background: var(--navy); color: #fff; font-size: .875rem; }
.akey-cells { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); }
.akey-c { display: flex; flex-direction: column; align-items: center; padding: 6px 2px; border: 0; border-left: 1px solid var(--line-2); background: none; cursor: pointer; }
.akey-c:first-child { border-left: 0; }
.akey-c:hover { background: var(--surface-2); }
.akey-c small { font-size: .6875rem; color: var(--ink-3); }
.akey-c b { font-family: var(--num); font-size: 1.0625rem; font-weight: 700; color: var(--red); }
.akey-c b.is-word { font-family: var(--sans); font-size: .8125rem; }

/* ---------- 模拟考试 ---------- */

.term { padding: 30px 36px 32px; }
.term-head { display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.term-t { margin: 0; font-size: 2.375rem; font-weight: 800; letter-spacing: .02em; line-height: 1.15; }
.count--term { flex-direction: row; align-items: center; gap: 10px; }
.count--term small:last-child { display: none; }
.count--term .flap { width: 46px; height: 60px; border-radius: 8px; }
.count--term .flap i { font-size: 46px; }
.count--term .flap-unit { padding-bottom: 4px; font-size: 1rem; }

.term-spec { display: grid; grid-template-columns: repeat(4, max-content); margin: 30px 0 26px; }
.spec { padding: 0 40px; border-left: 1px solid rgba(255, 255, 255, .12); }
.spec:first-child { padding-left: 0; border-left: 0; }
.spec > b { display: block; font-size: 4.5rem; line-height: .95; }
.spec > b .num { font-weight: 700; }
.spec > span { display: block; margin-top: 8px; font-size: .875rem; color: rgba(255, 255, 255, .62); }
.spec--gold > b { color: var(--gold-2); }

.tc-bar { display: flex; gap: 3px; height: 38px; overflow: hidden; border-radius: 9px; }
.tc-bar > i { display: flex; align-items: center; padding: 0 12px; overflow: hidden; font-style: normal; font-size: .875rem; font-weight: 700; white-space: nowrap; }
.tc-bar .cb-s { background: #2d5389; }
.tc-bar .cb-m { background: #4f74ae; }
.tc-bar .cb-j { background: var(--gold); color: #231a04; }
.term.is-enter .tc-bar { clip-path: inset(0 100% 0 0); }
.term.is-enter.is-on .tc-bar { clip-path: inset(0 0 0 0); transition: clip-path 1s cubic-bezier(.3, .7, .2, 1) .2s; }

.term-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 36px; align-items: center; margin-top: 30px; padding-top: 30px; border-top: 1px solid rgba(255, 255, 255, .1); }
.btn--xl .ic { width: 20px; height: 20px; }
.term-hint { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin: 14px 0 0; font-size: .875rem; color: rgba(255, 255, 255, .7); }
.term-hint .num { color: #fff; }
.lnk--light { margin: 0; }
.rules { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 0; padding: 0; list-style: none; }
.rules li { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 13px 0 11px; border-radius: 999px; background: rgba(255, 255, 255, .07); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); font-size: .8125rem; color: rgba(255, 255, 255, .86); white-space: nowrap; }
.rules .ic { width: 15px; height: 15px; color: var(--gold-2); }

.est { padding: 16px 18px; border: 1px solid rgba(255, 255, 255, .14); border-radius: 16px; background: rgba(255, 255, 255, .03); }
.est > small { font-size: .8125rem; color: rgba(255, 255, 255, .62); }
.est-g { position: relative; width: 190px; margin: 6px auto 0; }
.est-g .g-bg { stroke: rgba(255, 255, 255, .12); }
.est-g .g-tick { stroke: rgba(255, 255, 255, .5); }
.est-g > b { position: absolute; left: 0; right: 0; bottom: -4px; text-align: center; font-size: 2.75rem; line-height: 1; }
.est-g > b .num { font-weight: 700; }
.est--empty .est-g > b { color: rgba(255, 255, 255, .35); }
.est ul { display: flex; justify-content: center; gap: 14px; margin: 12px 0 0; padding: 0; list-style: none; font-size: .8125rem; color: rgba(255, 255, 255, .7); }
.hist { margin-top: 12px; padding: 14px 18px; border: 1px solid rgba(255, 255, 255, .14); border-radius: 16px; }
.hist-row { display: flex; gap: 22px; }
.hist-row > span { display: flex; flex-direction: column; font-size: 1.375rem; }
.hist-row > span .num { font-weight: 700; }
.hist-row small { font-size: .75rem; color: rgba(255, 255, 255, .6); }
.spark { width: 100%; height: 56px; margin-top: 10px; overflow: visible; }
.spark polyline { fill: none; stroke: var(--gold); stroke-width: 2; stroke-linejoin: round; }
.spark circle { fill: var(--gold); }
.spark-pass { stroke: rgba(255, 255, 255, .28); stroke-dasharray: 3 4; }

.recs { display: grid; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.rec { display: grid; grid-template-columns: 88px minmax(0, 1fr) auto 18px; align-items: center; gap: 14px; padding: 12px 16px; border-top: 1px solid var(--line-2); }
.rec:first-child { border-top: 0; }
.rec:hover { background: var(--surface-2); }
.rec-score { font-size: 1.625rem; line-height: 1; color: var(--green); }
.rec-score .num { font-weight: 700; }
.rec-score small { margin-left: 2px; font-size: .75rem; color: var(--ink-3); }
.rec-score.is-low { color: var(--red); }
.rec-main { display: flex; flex-direction: column; min-width: 0; }
.rec-main b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rec-main span { font-size: .8125rem; color: var(--ink-2); }
.rec-at { font-size: .8125rem; color: var(--ink-3); }
.rec > .ic { width: 16px; height: 16px; color: var(--ink-3); }

/* ---------- 作答 ---------- */

.run { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
.run-hd { position: sticky; top: 0; z-index: 30; padding-top: env(safe-area-inset-top); background: var(--navy-0); color: #fff; }
.run-hd-in { display: flex; align-items: center; gap: 10px; max-width: 1320px; height: 60px; margin: 0 auto; padding: 0 max(16px, env(safe-area-inset-right)) 0 max(12px, env(safe-area-inset-left)); }
.run-x { display: inline-flex; align-items: center; gap: 2px; height: 40px; padding: 0 12px 0 6px; border: 0; border-radius: 10px; background: none; color: rgba(255, 255, 255, .85); font-weight: 600; cursor: pointer; }
.run-x:hover { background: rgba(255, 255, 255, .08); }
.run-x .ic { width: 20px; height: 20px; }
.run-title { display: flex; align-items: baseline; gap: 12px; flex: 1; min-width: 0; }
.run-title b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 1.0625rem; }
#run-pos { color: rgba(255, 255, 255, .62); font-size: 1rem; white-space: nowrap; }
.run-time { display: inline-flex; align-items: center; gap: 6px; padding: 0 6px; color: rgba(255, 255, 255, .72); font-size: 1.0625rem; white-space: nowrap; }
.run-time .ic { width: 18px; height: 18px; color: rgba(255, 255, 255, .45); }
.run--mock .run-time { font-size: 1.5rem; color: var(--gold-2); }
.run--mock .run-time .num { font-weight: 700; letter-spacing: .04em; }
.run-time.is-low, .run--mock .run-time.is-low { color: #ff8f87; }
.run-cardbtn { display: none; align-items: center; gap: 6px; height: 38px; padding: 0 12px; border: 1px solid rgba(255, 255, 255, .22); border-radius: 10px; background: none; color: #fff; font-weight: 600; cursor: pointer; }
.run-cardbtn .ic { width: 18px; height: 18px; }
.run-prog { height: 3px; background: rgba(255, 255, 255, .1); }
.run-prog i { display: block; width: 0; height: 100%; background: var(--gold); transition: width .3s; }

.run-body {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 316px;
  align-items: start;
  gap: 24px;
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 24px max(24px, env(safe-area-inset-right)) 32px max(24px, env(safe-area-inset-left));
}
.run-side { position: sticky; top: calc(63px + env(safe-area-inset-top) + 24px); }
.run-card { max-height: calc(100vh - 230px); overflow: auto; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.rc-hd { display: flex; justify-content: space-between; align-items: baseline; }
.rc-hd span { font-size: .875rem; color: var(--ink-2); }
.rc-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 14px; font-size: .75rem; color: var(--ink-3); }
.rc-legend > span { display: inline-flex; align-items: center; gap: 5px; }
.rc-legend .ac { display: inline-block; width: 14px; height: 14px; border-radius: 4px; cursor: default; }
.rc-legend .ac.is-flag::after { top: -2px; right: -2px; }
.rc-note { margin: 12px 0 0; padding: 8px 10px; border-radius: 8px; background: var(--amber-bg); font-size: .8125rem; color: var(--ink-2); }

.ac-sec h4 { display: flex; justify-content: space-between; margin: 14px 0 8px; font-size: .8125rem; font-weight: 700; color: var(--ink-2); }
.ac-sec h4 span { font-weight: 500; color: var(--ink-3); }
.ac-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)); gap: 6px; }
.ac { position: relative; height: 40px; padding: 0; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink-2); font-family: var(--num); font-size: .9375rem; font-weight: 600; cursor: pointer; }
.ac:hover { border-color: var(--line-strong); }
.ac.is-done { border-color: var(--navy); background: var(--navy); color: #fff; }
html[data-theme="dark"] .ac.is-done { border-color: #33598e; background: #33598e; }
.ac.is-right { border-color: var(--green); background: var(--green); color: #fff; }
.ac.is-wrong { border-color: var(--red); background: var(--red); color: #fff; }
.ac.is-flag::after { content: ""; position: absolute; top: 3px; right: 3px; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 1.5px var(--surface); }
.ac.is-cur { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--gold); }

.run-ft { position: sticky; bottom: 0; z-index: 20; padding: 10px max(16px, env(safe-area-inset-right)) calc(10px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); border-top: 1px solid var(--line); background: var(--surface); }
.run-ft-in { display: flex; gap: 10px; max-width: 1320px; margin: 0 auto; }
.run-prev, .run-next { flex: 1 1 0; max-width: 260px; }
.run-next { margin-left: auto; }
.run-ft .btn--icon { flex: none; }

.ask { overflow: hidden; border: 1px solid var(--line-strong); border-radius: 14px; background: var(--surface); }
.ask .qc-bar { padding-right: 18px; }
.ask-body { padding: 22px 26px 26px; }
.ask-stem { margin-bottom: 18px; font-size: 1.1875rem; font-weight: 700; line-height: 1.75; }
.ask-stem p { margin: 0 0 8px; }
.ask-stem p:last-child { margin-bottom: 0; }
.opts { display: grid; gap: 10px; }
.opt {
  display: flex; align-items: flex-start; gap: 14px;
  width: 100%; min-height: 58px;
  padding: 14px 16px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  text-align: left;
  font-size: 1.0625rem;
  line-height: 1.6;
  cursor: pointer;
  transition: border-color .12s, background-color .12s;
}
.opt:hover:not([disabled]) { border-color: var(--line-strong); }
.opt[disabled] { cursor: default; }
.opt-key { flex: none; display: grid; place-items: center; width: 30px; height: 30px; margin-top: -1px; border: 1.5px solid #b7c0cc; border-radius: 50%; color: var(--ink-2); font-family: var(--num); font-weight: 700; font-size: 1rem; }
.opt--multi .opt-key { border-radius: 8px; }
.opt-text { flex: 1; min-width: 0; }
.opt-note { flex: none; align-self: center; font-size: .8125rem; font-weight: 700; }
.opt.is-on { border-color: var(--navy); background: #eef3fa; }
html[data-theme="dark"] .opt.is-on { border-color: #5e86c4; background: #182a48; }
.opt.is-on .opt-key { border-color: var(--navy); background: var(--navy); color: #fff; }
html[data-theme="dark"] .opt.is-on .opt-key { border-color: #5e86c4; background: #5e86c4; }
.opt.is-right { border-color: var(--green); background: var(--green-bg); }
.opt.is-right .opt-key { border-color: var(--green); background: var(--green); color: #fff; }
.opt.is-right .opt-note { color: var(--green); }
.opt.is-wrong { border-color: var(--red); background: var(--red-bg); }
.opt.is-wrong .opt-key { border-color: var(--red); background: var(--red); color: #fff; }
.opt.is-wrong .opt-note { color: var(--red); }
.opts--tf { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.opts--tf .opt { justify-content: center; align-items: center; min-height: 76px; font-size: 1.25rem; font-weight: 800; }
.opts--tf .opt-text { flex: none; }
.opts--tf .opt-key { font-family: var(--sans); }
.ask-ok { display: flex; justify-content: flex-end; margin-top: 16px; }
.ask-ana { margin-top: 16px; padding: 18px 22px 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.ask-topic { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0 0 14px; }
.ask-topic b { font-size: 1rem; }
.ask-src { margin-left: auto; font-size: .8125rem; color: var(--ink-3); }

/* ---------- 成绩单 ---------- */

.score { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 36px; padding: 34px 38px; }
.score-ring { position: relative; width: 184px; height: 184px; }
.ring { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 10; }
.ring-bg { stroke: rgba(255, 255, 255, .1); }
.ring-fg { stroke: var(--gold); stroke-linecap: round; stroke-dasharray: var(--c); stroke-dashoffset: var(--o); }
.ring-fg.is-low { stroke: #f08a80; }
.is-enter .ring-fg { stroke-dashoffset: var(--c); }
.is-enter.is-on .ring-fg { stroke-dashoffset: var(--o); transition: stroke-dashoffset 1.2s cubic-bezier(.2, .7, .2, 1) .1s; }
.score-num { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 2px; }
.score-num b { font-size: 3.5rem; line-height: 1; }
.score-num b .num { font-weight: 700; }
.score-num small { align-self: flex-end; margin-bottom: 52px; font-size: 1rem; color: rgba(255, 255, 255, .7); }
.score-k { margin: 0; font-weight: 700; color: var(--gold-2); }
.score-t { margin: 6px 0 16px; font-size: 1.875rem; font-weight: 800; }
.score-stats { display: flex; flex-wrap: wrap; gap: 10px 30px; }
.score-stats > span { display: flex; flex-direction: column; font-size: 1.375rem; font-weight: 700; }
.score-stats small { font-size: .75rem; font-weight: 500; color: rgba(255, 255, 255, .6); }
.score-btns { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.score .btn--line { border-color: rgba(255, 255, 255, .3); background: transparent; color: #fff; }
.score .btn--line:hover { background: rgba(255, 255, 255, .08); }
.score-note { margin: 14px 0 0; font-size: .8125rem; color: rgba(255, 255, 255, .55); }

.breakdown { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.bk { padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.bk h3 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; margin: 0 0 10px; font-size: 1rem; }
.bk h3 small { font-size: .75rem; font-weight: 500; color: var(--ink-3); }
.br { display: grid; grid-template-columns: minmax(0, 10em) minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 6px 0; }
.br-l { display: flex; align-items: center; gap: 6px; overflow: hidden; font-size: .875rem; white-space: nowrap; text-overflow: ellipsis; }
.br-bar { height: 8px; overflow: hidden; border-radius: 4px; background: var(--line-2); }
.br-bar i { display: block; height: 100%; width: var(--w); border-radius: 4px; background: var(--cb-s); }
.br-bar i[class*="d-"] { background: var(--mod); }
.br-v { font-size: .9375rem; white-space: nowrap; text-align: right; }
.br-v small { margin-left: 6px; font-size: .75rem; color: var(--ink-3); }
#rf-tabs { margin-bottom: 16px; }

/* ---------- 错题本 ---------- */

.wtabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.wtab { display: flex; flex-direction: column; gap: 2px; padding: 14px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink-2); }
.wtab > b { font-size: 2.125rem; line-height: 1.1; color: var(--ink); }
.wtab b .num { font-weight: 700; }
.wtab > span { font-size: .875rem; font-weight: 600; }
.wtab.is-on { border-color: var(--navy); box-shadow: inset 0 -3px 0 var(--gold); }
html[data-theme="dark"] .wtab.is-on { border-color: var(--navy-ink); }
.wtab.is-on > b { color: var(--navy-ink); }
.wbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.wrs { display: grid; gap: 10px; }
.wr { overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.wr-hd { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; width: 100%; padding: 14px 16px; border: 0; background: none; text-align: left; cursor: pointer; }
.wr-hd:hover { background: var(--surface-2); }
.wr-src { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: .8125rem; color: var(--ink-3); }
.wr-stem { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-weight: 600; line-height: 1.6; }
.wr-meta { font-size: .8125rem; color: var(--ink-2); }
.wr-meta i { display: inline-block; width: 1px; height: 10px; margin: 0 10px; background: var(--line-strong); }
.wr-meta b { font-family: var(--num); }
.wr-src, .wr-stem, .wr-meta { grid-column: 1; }
.wr-ic { grid-column: 2; grid-row: 1 / span 3; align-self: center; width: 18px; height: 18px; color: var(--ink-3); transform: rotate(-90deg); transition: transform .2s; }
.wr.is-open .wr-ic { transform: rotate(90deg); }
.wr-bd { padding: 0 14px 14px; }
.wr-bd .qc { margin: 0; }
.wr-acts { margin: 10px 0 0; text-align: right; }
.wfoot { margin: 18px 0 0; text-align: center; }

/* ---------- 我的 ---------- */

.mstats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.mstats > div { display: flex; flex-direction: column; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.mstats small { font-size: .8125rem; color: var(--ink-3); }
.mstats > div > b { margin: 4px 0 2px; font-size: 2.125rem; line-height: 1.1; }
.mstats b .num { font-weight: 700; }
.mstats > div > span { font-size: .75rem; color: var(--ink-3); }
.setlist { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.setrow { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 16px; border-top: 1px solid var(--line-2); }
.setrow:first-child { border-top: 0; }
.setrow > span { display: flex; flex-direction: column; font-weight: 600; }
.setrow small { font-size: .8125rem; font-weight: 500; color: var(--ink-3); }
.notes { margin: 0; padding: 0; list-style: none; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.notes li { display: grid; grid-template-columns: 14em minmax(0, 1fr) auto; align-items: baseline; gap: 12px; padding: 10px 16px; border-top: 1px solid var(--line-2); font-size: .875rem; }
.notes li:first-child { border-top: 0; }
.notes em { font-style: normal; font-family: var(--num); color: var(--ink-2); white-space: nowrap; }
.about { margin: 36px 0 0; text-align: center; font-size: .8125rem; color: var(--ink-3); }

/* ---------- 弹层、提示 ---------- */

html.has-layer, html.has-layer body { overflow: hidden; }
.ly { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 24px; }
.ly-mask { position: absolute; inset: 0; background: rgba(8, 16, 30, .5); opacity: 0; transition: opacity .2s; }
.ly-box { position: relative; width: min(560px, 100%); max-height: calc(100vh - 48px); max-height: calc(100dvh - 48px); overflow: auto; overscroll-behavior: contain; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-pop); opacity: 0; transform: translateY(12px) scale(.98); transition: transform .22s cubic-bezier(.2, .8, .2, 1), opacity .2s; outline: none; }
.ly.is-in .ly-mask { opacity: 1; }
.ly.is-in .ly-box { opacity: 1; transform: none; }
.ly--sheet .ly-box { width: min(780px, 100%); }
.pn-hd { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line-2); background: var(--surface); }
.pn-hd h3 { margin: 0; font-size: 1.0625rem; }
.pn-x { display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 10px; background: var(--surface-2); color: var(--ink-2); cursor: pointer; }
.pn-bd { padding: 16px 18px 20px; }
.pn-bd .qc { margin: 0; scroll-margin-top: 0; }
.pn-bd .ix-grid { grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); }
.pn-bd .ix { height: 44px; }
.dlg { padding: 24px 24px 20px; }
.dlg h3 { margin: 0 0 8px; font-size: 1.25rem; }
.dlg p { margin: 0; color: var(--ink-2); }
.dlg-ft { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }

.toast { position: fixed; left: 50%; bottom: calc(100px + env(safe-area-inset-bottom)); z-index: 200; max-width: calc(100vw - 32px); padding: 10px 18px; border-radius: 12px; background: rgba(12, 31, 59, .95); color: #fff; font-size: .9375rem; font-weight: 600; text-align: center; opacity: 0; pointer-events: none; transform: translate(-50%, 16px); transition: opacity .2s, transform .2s; }
.toast.is-in { opacity: 1; transform: translate(-50%, 0); }

/* ======================================================================
 * 响应式
 * ==================================================================== */

/* 题号侧栏只在够宽时常驻 */
@media (max-width: 1279px) {
  .rd-wrap { grid-template-columns: minmax(0, 1fr); }
  .rd-side { display: none; }
  .rd-ixbtn { display: inline-flex; }
}

/* 平板横竖屏：顶部悬浮玻璃导航，左边品牌，右边“我的” */
@media (max-width: 1279px) {
  :root { --top: calc(74px + env(safe-area-inset-top)); --pad-x: 28px; --pad-y: 12px; }
  .shell {
    right: 0; bottom: auto;
    width: auto; height: var(--top);
    flex-direction: row; align-items: center; justify-content: space-between;
    padding: env(safe-area-inset-top) max(20px, env(safe-area-inset-right)) 0 max(20px, env(safe-area-inset-left));
    background: var(--bar-bg);
    -webkit-backdrop-filter: saturate(1.3) blur(14px);
    backdrop-filter: saturate(1.3) blur(14px);
    border: 0;
    pointer-events: none;
  }
  .shell > * { pointer-events: auto; }
  body.is-home .shell { background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .brand, .shell-me, .nav {
    background: rgba(13, 30, 56, .82);
    -webkit-backdrop-filter: blur(24px) saturate(1.7);
    backdrop-filter: blur(24px) saturate(1.7);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), inset 0 0 0 1px rgba(255, 255, 255, .08), 0 12px 32px rgba(10, 22, 44, .22);
  }
  .brand { gap: 9px; padding: 5px 16px 5px 5px; border-radius: 999px; color: #fff; }
  .brand-mark { width: 36px; height: 36px; border-radius: 50%; background: rgba(255, 255, 255, .1); }
  .brand-mark::after { left: 11px; right: 11px; bottom: 7px; }
  .brand-t { font-size: 1rem; }
  .brand-t small, .shell-foot { display: none; }
  .shell-me { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; color: rgba(255, 255, 255, .86); }
  .shell-me .ic { width: 21px; height: 21px; }
  .shell-me.is-on { background: #fff; color: var(--navy); }
  .nav { top: calc(14px + env(safe-area-inset-top)); left: 50%; width: auto; transform: translateX(-50%); flex-direction: row; gap: 2px; padding: 5px; border-radius: 999px; }
  .nav-i { height: 36px; padding: 0 18px; border-radius: 999px; color: rgba(255, 255, 255, .78); white-space: nowrap; }
  .nav-i .ic { display: none; }
  .nav-i:hover { background: rgba(255, 255, 255, .1); color: #fff; }
  .nav-i.is-on { background: #fff; color: var(--navy); }
  .nav-i.is-on::before { display: none; }
  .nav-i--me { display: none; }
  .nav-badge { margin-left: 6px; }
  .main { margin-left: 0; padding-top: calc(var(--top) + var(--pad-y)); }
}

@media (max-width: 1023px) {
  .run-body { grid-template-columns: minmax(0, 1fr); padding: 18px max(18px, env(safe-area-inset-right)) 28px max(18px, env(safe-area-inset-left)); }
  .run-side { display: none; }
  .run-cardbtn { display: inline-flex; }
  .term-grid { grid-template-columns: minmax(0, 1fr) 260px; gap: 28px; }
  .spec { padding: 0 28px; }
  .spec > b { font-size: 3.75rem; }
}

@media (max-width: 899px) {
  .brand { padding: 5px; }
  .brand-t { display: none; }
  .nav-i { padding: 0 15px; }
}

@media (max-width: 860px) {
  .term-t { font-size: 2rem; }
  .term-grid { grid-template-columns: minmax(0, 1fr); }
  .breakdown { grid-template-columns: minmax(0, 1fr); }
  .mstats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .steps li { display: flex; gap: 10px; align-items: baseline; }
  .steps span { margin: 0; }
}

/* 手机：顶部标题栏，底部悬浮玻璃标签栏 */
@media (max-width: 639px) {
  :root { --top: calc(56px + env(safe-area-inset-top)); --pad-x: 16px; --pad-y: 14px; }
  .shell { padding: env(safe-area-inset-top) 12px 0 16px; background: var(--surface); border-bottom: 1px solid var(--line); pointer-events: auto; }
  .brand { padding: 0; background: none; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; color: var(--ink); }
  .brand-mark { width: 32px; height: 32px; border-radius: 9px; background: var(--navy-0); font-size: .9375rem; }
  .brand-mark::after { left: 8px; right: 8px; bottom: 5px; }
  .shell-title { display: block; flex: 1; margin: 0 0 0 10px; font-size: 1.0625rem; font-weight: 800; }
  .shell-me { width: 40px; height: 40px; background: var(--surface-2); color: var(--ink-2); box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .shell-me.is-on { background: var(--navy); color: #fff; }
  .nav { top: auto; bottom: calc(10px + env(safe-area-inset-bottom)); left: max(12px, env(safe-area-inset-left)); right: max(12px, env(safe-area-inset-right)); transform: none; justify-content: space-between; height: 64px; padding: 6px; border-radius: 32px; }
  .nav-i { flex: 1; flex-direction: column; justify-content: center; gap: 1px; height: 52px; padding: 0; border-radius: 26px; font-size: .6875rem; }
  .nav-i .ic { display: block; width: 22px; height: 22px; }
  .nav-i.is-on { background: rgba(255, 255, 255, .16); color: #fff; }
  .nav-l { display: none; }
  .nav-s { display: block; }
  .nav-badge { position: absolute; top: 3px; left: calc(50% + 7px); margin: 0; padding: 0 5px; font-size: .6875rem; }
  .main { padding-bottom: calc(104px + env(safe-area-inset-bottom)); }
  .toast { bottom: calc(92px + env(safe-area-inset-bottom)); }
  body.is-run .toast { bottom: calc(90px + env(safe-area-inset-bottom)); }

  .ph h1 { font-size: 1.5rem; }
  .tlg { display: none; }
  .sec { margin-top: 32px; }
  .chips { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 0 16px 2px; scrollbar-width: none; }
  .chips::-webkit-scrollbar { display: none; }

  .count--term .flap { width: 32px; height: 42px; border-radius: 6px; }
  .count--term .flap i { font-size: 32px; }
  .count--term .flap-unit { padding-bottom: 2px; font-size: .875rem; }

  .hero, .term, .score { border-radius: 18px; }
  .pgrid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .dgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .dt-cover { padding: 12px 12px 14px; }
  .dt-cover small, .dt-cover span { display: none; }
  .dt-cover b { font-size: 1.125rem; }
  .dt-meta { padding: 10px 12px; }
  .dt-links a { font-size: .8125rem; }

  .rd-bar { position: static; margin-bottom: 16px; padding: 10px 16px 12px; }
  .rd-title { font-size: 1.1875rem; }
  .rd-practice { display: none; }
  .rd-tools { flex-wrap: nowrap; overflow-x: auto; margin-left: -16px; margin-right: -16px; padding: 0 16px 2px; scrollbar-width: none; }
  .rd-tools::-webkit-scrollbar { display: none; }
  .rd-tools > * { flex: none; }
  .cov { padding: 20px 18px 18px; }
  .cov-t { font-size: 1.875rem; }
  .cov-s { font-size: 1.0625rem; }
  .dist-i { grid-template-columns: minmax(0, 1fr) 4em; gap: 6px 10px; }
  .dist-bar { grid-column: 1 / -1; grid-row: 2; }
  .dist-n { grid-column: 2; grid-row: 1; }
  .qc { scroll-margin-top: calc(var(--top) + 12px); }
  .qc-bar { flex-wrap: wrap; gap: 6px 10px; padding: 10px 8px 10px 14px; }
  .qc-h { flex-basis: calc(100% - 140px); }
  .qc-fav { order: 3; }
  .qc-tags { order: 4; flex-basis: 100%; justify-content: flex-start; }
  .qc-body { padding: 14px 14px 16px; }
  .qc-opts.is-2 { grid-template-columns: minmax(0, 1fr); }
  .qc-key { flex-wrap: wrap; gap: 10px; }
  .one { flex-basis: 100%; }
  .ansbox { min-width: 84px; }
  .oe li { grid-template-columns: 20px 58px minmax(0, 1fr); padding: 8px 10px; }
  .akey-row { grid-template-columns: 52px minmax(0, 1fr); }
  .akey-cells { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .akey-c:nth-child(6) { border-left: 0; }
  .akey-c:nth-child(n+6) { border-top: 1px solid var(--line-2); }

  .term { padding: 20px 18px 22px; }
  .term-t { font-size: 1.75rem; }
  .term-spec { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 0; margin: 22px 0 20px; }
  .spec, .spec:first-child { padding: 0 0 0 16px; border-left: 1px solid rgba(255, 255, 255, .12); }
  .spec:nth-child(odd) { padding-left: 0; border-left: 0; }
  .spec > b { font-size: 3.25rem; }
  .tc-bar > i { padding: 0 8px; font-size: .8125rem; }
  .term-grid { margin-top: 22px; padding-top: 22px; gap: 22px; }
  .term-go .btn--xl { width: 100%; }
  .rules li { height: 32px; padding: 0 11px 0 9px; font-size: .75rem; }

  .rec { grid-template-columns: 64px minmax(0, 1fr) 16px; padding: 12px 14px; }
  .rec-at { display: none; }
  .rec-score { font-size: 1.375rem; }

  .run-hd-in { gap: 6px; height: 56px; }
  .run-x span, .run-title b, .run-cardbtn span { display: none; }
  .run-x { padding: 0 6px 0 2px; }
  .run:not(.run--mock) .run-time { display: none; }
  .run--mock .run-time { font-size: 1.25rem; }
  .run-instant { padding-right: 10px; font-size: .8125rem; }
  .run-cardbtn { width: 40px; padding: 0; justify-content: center; }
  .run-body { padding: 14px 12px 20px; }
  .ask-body { padding: 16px 14px 18px; }
  .ask-stem { font-size: 1.0625rem; }
  .opt { gap: 12px; padding: 12px 14px; font-size: 1rem; }
  .ask-ana { padding: 14px 14px 16px; }
  .ask-src { margin-left: 0; flex-basis: 100%; }
  .run-ft { padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); }
  .run-ft-in { gap: 8px; }
  .run-prev, .run-next { max-width: none; }

  .score { grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 18px; padding: 26px 20px 22px; text-align: center; }
  .score-ring { width: 156px; height: 156px; }
  .score-num b { font-size: 3rem; }
  .score-num small { margin-bottom: 42px; }
  .score-t { font-size: 1.5rem; }
  .score-stats { justify-content: center; gap: 10px 22px; }
  .score-btns .btn { flex: 1; }
  .br { grid-template-columns: minmax(0, 7.5em) minmax(0, 1fr) auto; gap: 8px; }

  .wtabs { gap: 8px; }
  .wtab { padding: 12px 12px; }
  .wtab > b { font-size: 1.75rem; }
  .wbar { flex-direction: column; align-items: stretch; }
  .wbar .btn { width: 100%; }
  .wbar .chips { margin: 0 -16px; }

  .setrow { flex-direction: column; align-items: flex-start; gap: 10px; }
  .notes li { grid-template-columns: minmax(0, 1fr); gap: 2px; }

  .ly--sheet { align-items: flex-end; padding: 0; }
  .ly--sheet .ly-box { width: 100%; max-height: 90vh; max-height: 90dvh; border-radius: 18px 18px 0 0; padding-bottom: env(safe-area-inset-bottom); transform: translateY(100%); }
  .ly--sheet.is-in .ly-box { transform: none; }
  .ly--modal { padding: 16px; }
}

/* ---- 首页：平板横屏和电脑，上面主卡四格一排，下面四个入口，正好一屏 ---- */
@media (min-width: 900px) and (orientation: landscape), (min-width: 1280px) {
  .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .home {
    grid-template-rows: minmax(min-content, 1fr) clamp(200px, 40%, 280px);
    height: clamp(560px, calc(100vh - var(--top) - var(--pad-y) - 20px), 660px);
    height: clamp(560px, calc(100dvh - var(--top) - var(--pad-y) - 20px), 660px);
  }
  .home .tile { min-height: 0; }
}

/* ---- 平板竖屏：主卡两行两格，下面四个入口填满 ---- */
@media (min-width: 640px) and (max-width: 1279px) and (orientation: portrait) {
  .home {
    grid-template-rows: auto minmax(0, 1fr);
    height: clamp(760px, calc(100vh - var(--top) - var(--pad-y) - 20px), 1100px);
    height: clamp(760px, calc(100dvh - var(--top) - var(--pad-y) - 20px), 1100px);
  }
  .home .tiles { grid-template-rows: repeat(2, minmax(0, 1fr)); }
  .home .tile { min-height: 0; }
  .tile-big b { font-size: 3.5rem; }
  .td-days b { font-size: 8.5rem; }
  .td-ring { width: 144px; height: 144px; }
  .td-bars { height: 96px; }
}

/* ---- 平板竖屏和手机：主卡两行两格 ---- */
@media (min-width: 640px) and (max-width: 1279px) and (orientation: portrait), (max-width: 639px) {
  .td-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .td-cell:nth-child(odd)::before { display: none; }
  .td-cell:nth-child(n+3) { margin-top: 18px; padding-top: 18px; }
  .td-cell:nth-child(n+3)::after { content: ""; position: absolute; top: 0; left: 28px; right: 28px; height: 1px; background: rgba(255, 255, 255, .08); }
}

@media (max-width: 639px) {
  .today { border-radius: 22px; }
  .td-grid { padding: 18px 0 16px; }
  .td-cell { padding: 0 16px; }
  .td-cell:nth-child(n+3)::after { left: 16px; right: 16px; }
  .td-lb { font-size: .75rem; letter-spacing: .02em; }
  .td-main { padding: 10px 0 8px; }
  .td-sub { font-size: .6875rem; }
  .td-wd { display: none; }
  .td-days b { font-size: 4.75rem; }
  .td-days b.is-word, .td-days--word b { font-size: 2.5rem; }
  .td-days span { font-size: .9375rem; }
  .td-ring { width: 92px; height: 92px; }
  .td-ring figcaption > b { font-size: 1.75rem; }
  .td-ring figcaption > b small { font-size: .75rem; }
  .td-big { margin-bottom: 12px; }
  .td-big b { font-size: 2.5rem; }
  .td-big small { font-size: .75rem; }
  .td-bars { gap: 5px; height: 60px; }
  .td-go { grid-template-columns: minmax(0, 1fr) auto auto; grid-template-rows: auto auto; gap: 10px 14px; padding: 14px 16px 16px; }
  .td-gt { grid-column: 1; grid-row: 1; }
  .td-gn { grid-column: 2; grid-row: 1; }
  .td-play { grid-column: 3; grid-row: 1 / span 2; width: 52px; height: 52px; }
  .td-bar { grid-column: 1 / span 2; grid-row: 2; }
  .tiles { gap: 10px; }
  .tile { min-height: 156px; padding: 14px 14px 16px; border-radius: 18px; }
  .tile-top { gap: 8px; font-size: .875rem; }
  .tile-ic { width: 30px; height: 30px; border-radius: 9px; }
  .tile-big b { font-size: 2.5rem; }
  .tile-big small { font-size: .75rem; }
  .tile-viz { margin-top: 12px; }
  .tile-seg, .books { gap: 2px; }
  .books i { width: 4px; }
}

@media (hover: none) {
  .tile:hover { transform: none; box-shadow: 0 1px 2px rgba(16, 30, 54, .04), 0 12px 30px -14px rgba(16, 30, 54, .16); }
  .pt:hover, .hit:hover, .chip:hover, .bt:hover { border-color: var(--line); }
}

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

.pn-bd .rc-hd b { display: none; }
