/* ============================================================
   金榜苑 · 维港青绿学习台
   语言：暖白底 + 天星小轮维港图 + 金榜绿主操作 + 橙金点睛
   资源版本：20260904-jinbang81
   ============================================================ */
:root {
  color-scheme: light;

  /* 金榜苑品牌色（取自 Logo） */
  --deep: #05543f;
  --main: #057f47;
  --main-deep: color-mix(in srgb, var(--main) 70%, #000);
  --main-tint: color-mix(in srgb, var(--main) 13%, #fff);
  --accent: #07895b;            /* 青绿：主操作、重点标签 */
  --accent-deep: color-mix(in srgb, var(--accent) 74%, #001f1a);
  --accent-tint: color-mix(in srgb, var(--accent) 13%, #fff);
  --accent-btn: #057f47;
  --gold: #e76d21;              /* Logo 闪电橙：进度、提醒 */
  --gold-deep: color-mix(in srgb, var(--gold) 62%, #000);
  --gold-tint: color-mix(in srgb, var(--gold) 22%, #fff);

  /* 中性 */
  --cream: #fef6ef;
  --surface: #ffffff;
  --paper: #fffaf5;
  --ink: #17352d;
  --ink-2: #465b54;
  --muted: #74847e;
  --line: #e7e2d9;
  --line-soft: #f1ece4;

  /* 语义色固定：正确恒绿 / 错误恒红 */
  --good: #1d9b6a;
  --good-tint: #e4f6ee;
  --bad: #d1453c;
  --bad-tint: #fbe9e7;

  --shadow-sm: 0 1px 2px rgba(20, 38, 60, .05), 0 1px 3px rgba(20, 38, 60, .05);
  --shadow-md: 0 10px 24px rgba(20, 38, 60, .08);
  --shadow-lg: 0 22px 50px rgba(12, 30, 50, .2);
  --sh-accent: 0 10px 22px color-mix(in srgb, var(--accent) 24%, transparent);

  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 22px; --sp-6: 30px;

  --fs-2xs: 11.5px; --fs-xs: 13px; --fs-sm: 14px; --fs-base: 15.5px;
  --fs-md: 17px; --fs-lg: 20px; --fs-xl: 25px; --fs-2xl: 31px;
  --lh-body: 1.62;

  --r-sm: 10px; --r-md: 14px; --r-lg: 18px; --r-xl: 22px; --r-pill: 999px;

  --h-tap: 48px; --h-sm: 38px; --h-chip: 34px; --h-nav: 64px;
  --edge: clamp(14px, 3.4vw, 32px);
  --app-frame-width: 100%;
  --frame-gap: 14px;
  --font-zoom: 1;
}

.data-load-status {
  position: fixed;
  z-index: 10000;
  left: 50%;
  top: 18px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: calc(100vw - 32px);
  padding: 11px 14px;
  border: 1px solid rgba(24, 104, 79, 0.2);
  border-radius: 14px;
  background: #fffdf7;
  box-shadow: 0 8px 28px rgba(24, 56, 44, 0.18);
  color: #214d3f;
  font-size: 14px;
  font-weight: 700;
}

.data-load-status button {
  flex: 0 0 auto;
  border: 0;
  border-radius: 999px;
  padding: 6px 12px;
  background: var(--main);
  color: #fff;
  font: inherit;
  cursor: pointer;
}

.storage-warning {
  position: fixed;
  z-index: 9999;
  left: 50%;
  top: 72px;
  transform: translateX(-50%);
  width: min(560px, calc(100vw - 28px));
  padding: 10px 13px;
  border: 1px solid color-mix(in srgb, var(--bad) 28%, transparent);
  border-radius: 12px;
  background: var(--bad-tint);
  box-shadow: var(--shadow-md);
  color: var(--bad);
  font-size: var(--fs-xs);
  font-weight: 800;
  line-height: 1.45;
  text-align: center;
}

.explanation-retry {
  width: 100%;
  min-height: 44px;
  border: 1px solid color-mix(in srgb, var(--bad) 25%, var(--line));
  border-radius: var(--r-sm);
  background: var(--bad-tint);
  color: var(--bad);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

@media (min-width: 768px) {
  :root {
    --fs-2xs: 12px; --fs-xs: 13.5px; --fs-sm: 15px; --fs-base: 16.5px;
    --fs-md: 18px; --fs-lg: 22px; --fs-xl: 28px; --fs-2xl: 36px;
    --app-frame-width: 1040px;
  }
}

@media (min-width: 1120px) {
  :root {
    --edge: clamp(24px, 3vw, 42px);
    --app-frame-width: 1180px;
  }
}

* { box-sizing: border-box; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
html, body { min-height: 100%; overflow-x: hidden; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: "PingFang SC", "Microsoft YaHei", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: var(--fs-base);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-weight: 700; line-height: 1.2; letter-spacing: 0; }
a { color: var(--main-deep); font-weight: 700; text-decoration: none; }
.num { font-variant-numeric: tabular-nums; }
.eyebrow { margin: 0; color: var(--accent-deep); font-size: var(--fs-2xs); font-weight: 800; letter-spacing: 0; }
.subtle { color: var(--muted); font-size: var(--fs-sm); line-height: 1.55; }
.hidden { display: none !important; }

/* ============ 按钮系统 ============ */
button, .file-button {
  min-height: var(--h-tap);
  margin: 0;
  padding: 0 var(--sp-4);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  font-size: var(--fs-sm); font-weight: 700; cursor: pointer;
  transition: transform .12s ease, border-color .14s, background .14s, box-shadow .14s;
}
button:active, .file-button:active { transform: translateY(1px); }
button:disabled { cursor: not-allowed; opacity: .45; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--main) 30%, transparent); outline-offset: 2px;
}
.primary { border-color: var(--accent-btn); background: var(--accent-btn); color: #fff; font-weight: 800; box-shadow: var(--sh-accent); }
.secondary { border-color: color-mix(in srgb, var(--main) 30%, #fff); background: var(--main-tint); color: var(--main-deep); font-weight: 800; box-shadow: var(--shadow-sm); }
.danger, .remove-wrong { border-color: rgba(209,69,60,.28); background: var(--bad-tint); color: var(--bad); font-weight: 800; box-shadow: none; }
.wide, .block { width: 100%; min-height: var(--h-tap); border-radius: var(--r-md); font-size: var(--fs-base); }
.small-button, .mini-action { min-height: var(--h-sm); padding: 0 var(--sp-3); border-radius: var(--r-sm); font-size: var(--fs-xs); font-weight: 700; }
.mini-action { border-color: rgba(209,69,60,.26); background: var(--bad-tint); color: var(--bad); }
.link-button { min-height: var(--h-sm); padding: 0 8px; border: 0; background: transparent; color: var(--accent-deep); font-size: var(--fs-xs); font-weight: 800; }
/* hover 仅给真鼠标设备，避免触屏粘滞 */
@media (hover: hover) {
  .primary:hover, .home-cta:hover { background: var(--accent-deep); }
  .secondary:hover, .lic-swap:hover, .set-pill:hover, .issue-button:hover, .answer-dock #nextQuestion:hover, .ptop-btn:hover:not(:disabled) { filter: brightness(.96); }
  .home-row:hover, .set-row:hover, .list-open:hover, .topic-choice:hover, .exam-entry:hover { background: var(--paper); }
  .danger:hover, .mini-action:hover, .remove-wrong:hover { filter: brightness(.97); }
}

/* ============ 外壳 / 页面 ============ */
.phone-shell { width: 100%; min-height: 100svh; margin: 0 auto; position: relative; background: var(--cream); overflow-x: hidden; }
.phone-shell[data-auth="guest"] {
  min-height: 100svh;
  background:
    linear-gradient(180deg, rgba(3, 49, 37, .58), rgba(5, 84, 63, .86)),
    url("./assets/jinbangyuan-harbour-960.jpg?v=20260904-jinbang81") center / cover no-repeat;
}
.phone-shell[data-auth="guest"] .app-header,
.phone-shell[data-auth="guest"] main,
.phone-shell[data-auth="guest"] .bottom-nav { display: none; }
.phone-shell[data-auth="user"] .login-page { display: none; }
main { display: block; }

.page { display: none; padding: var(--sp-3) var(--edge) calc(var(--h-nav) + env(safe-area-inset-bottom) + 18px); }
.page.active { display: grid; gap: var(--sp-3); align-content: start; }
.phone-shell[data-exam-selected="false"] .page { padding-bottom: var(--sp-6); }

.app-header {
  min-height: 84px; padding: calc(env(safe-area-inset-top) + 14px) var(--edge) var(--sp-3);
  display: flex; align-items: flex-end; justify-content: space-between; gap: var(--sp-2);
  position: sticky; top: 0; z-index: 10; border-bottom: 1px solid var(--line-soft);
  background: color-mix(in srgb, var(--cream) 92%, transparent); backdrop-filter: blur(16px);
}
.app-header > div { min-width: 0; }
.app-header h1 { margin-top: 4px; font-size: var(--fs-xl); line-height: 1.18; overflow-wrap: anywhere; }
.app-header small { display: block; margin-top: 5px; color: var(--muted); font-size: var(--fs-xs); }
.phone-shell[data-exam-selected="true"][data-tab="home"] .app-header,
.phone-shell[data-tab="practice"] .app-header,
.phone-shell[data-tab="wrong"] .app-header,
.phone-shell[data-tab="stats"] .app-header,
.phone-shell[data-tab="settings"] .app-header,
.phone-shell[data-tab="mindset"] .app-header { display: none; }
.phone-shell[data-tab="practice"] .page,
.phone-shell[data-tab="wrong"] .page,
.phone-shell[data-tab="stats"] .page,
.phone-shell[data-tab="settings"] .page,
.phone-shell[data-tab="mindset"] .page,
.phone-shell[data-exam-selected="true"][data-tab="home"] #homePage { padding-top: calc(env(safe-area-inset-top) + 12px); }

/* 通用换行保护 */
.gate-hero, .exam-entry, .lic-hero, .question-title, .option, .answer-panel,
.list-open, .home-row { min-width: 0; max-width: 100%; overflow-wrap: anywhere; }

.screen-title {
  min-height: 96px; position: relative; overflow: hidden; padding: 17px 78px 16px 18px;
  border: 1px solid color-mix(in srgb, var(--main) 18%, var(--line)); border-radius: 20px; color: var(--ink); box-shadow: var(--shadow-sm);
  background:
    radial-gradient(circle at 92% 12%, color-mix(in srgb, var(--main-tint) 72%, transparent), transparent 48%),
    linear-gradient(145deg, var(--surface), var(--paper));
  display: grid; gap: 3px; align-content: center;
}
.screen-title::before {
  content: ""; position: absolute; left: 18px; top: 0; width: 58px; height: 3px;
  border-radius: 0 0 3px 3px; background: var(--gold);
}
.screen-title::after {
  content: ""; position: absolute; right: 16px; top: 50%; width: 48px; height: 48px; transform: translateY(-50%);
  border: 1px solid color-mix(in srgb, var(--main) 22%, var(--line)); border-radius: 15px;
  background: url("./assets/jinbangyuan-mark-256.jpg?v=20260904-jinbang81") center / cover no-repeat;
  box-shadow: var(--shadow-sm);
}
.screen-title h2 {
  min-width: 0;
  color: var(--deep);
  font-size: clamp(27px, 7.8vw, 31px);
  word-break: keep-all;
  overflow-wrap: normal;
  text-wrap: balance;
}
.screen-title .eyebrow { color: var(--accent-deep); }
.screen-summary {
  position: relative; margin: 0; padding: 11px 13px 11px 15px;
  border: 1px solid var(--line); border-radius: var(--r-md);
  background: color-mix(in srgb, var(--surface) 86%, var(--main-tint));
  color: var(--muted); font-size: var(--fs-xs); line-height: 1.55;
  box-shadow: var(--shadow-sm);
}
.screen-summary::before {
  content: ""; position: absolute; left: 0; top: 11px; bottom: 11px; width: 3px;
  border-radius: 0 3px 3px 0; background: var(--main);
}

/* ============ 登录 ============ */
.login-page {
  min-height: 100svh;
  padding: calc(env(safe-area-inset-top) + 28px) var(--edge) calc(env(safe-area-inset-bottom) + 28px);
  display: grid; align-content: center; gap: var(--sp-5);
}
.login-sheet { width: min(100%, 430px); margin: 0 auto; display: grid; gap: var(--sp-4); }
.login-intro { color: #fff; text-shadow: 0 2px 14px rgba(0,0,0,.2); }
.login-intro .eyebrow { color: rgba(255,255,255,.8); }
.login-intro h1 { margin-top: 8px; color: #fff; font-size: var(--fs-2xl); line-height: 1.12; font-weight: 800; }
.login-intro-sub { margin-top: 8px; color: rgba(255,255,255,.84); font-size: var(--fs-sm); font-weight: 600; }
.login-brand, .home-brand { display: flex; align-items: center; gap: 11px; }
.login-brand { margin-bottom: 22px; }
.brand-mark { width: 54px; height: 54px; flex: none; overflow: hidden; border: 1px solid rgba(255,255,255,.58); border-radius: 17px; background: transparent; box-shadow: 0 10px 26px rgba(0,0,0,.2); }
.brand-mark img { width: 100%; height: 100%; display: block; object-fit: cover; }
.login-brand strong, .home-brand strong { display: block; font-size: 25px; line-height: 1.05; letter-spacing: .04em; }
.login-brand small, .home-brand small { display: block; margin-top: 5px; font-size: 10px; font-weight: 800; letter-spacing: .14em; opacity: .74; }
.login-card { padding: var(--sp-4); border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-md); display: grid; gap: var(--sp-3); }
.login-card-head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); }
.login-card-head > span { color: var(--muted); font-size: var(--fs-xs); font-weight: 800; }
.login-name-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-2); max-height: 270px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.login-name-chip {
  min-height: 78px; padding: 10px 4px; border: 1.5px solid var(--line); border-radius: var(--r-md);
  background: var(--paper); color: var(--ink); font-size: var(--fs-xs); font-weight: 800;
  display: grid; place-items: center; gap: 6px; text-align: center;
}
.login-name-chip .chip-avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--main-tint) center/cover no-repeat; box-shadow: var(--shadow-sm); }
.login-name-chip .chip-name { line-height: 1.1; }
.login-name-chip.selected { border-color: var(--main); background: var(--main-tint); color: var(--main-deep); }
.login-name-chip.selected .chip-avatar { box-shadow: 0 0 0 2px var(--main); }
.login-name-empty { grid-column: 1 / -1; padding: var(--sp-3); color: var(--muted); font-size: var(--fs-sm); text-align: center; }
.login-manual, .login-phone-field, .login-pass-field { display: grid; gap: 6px; }
.login-phone-field > span, .login-pass-field > span { color: var(--muted); font-size: var(--fs-xs); font-weight: 800; }
.login-card input[type="text"], .login-card input[type="tel"], .login-card input[type="password"] {
  width: 100%; min-height: var(--h-tap); padding: 0 var(--sp-3); border: 1.5px solid var(--line);
  border-radius: var(--r-md); background: var(--paper); font-size: var(--fs-base);
}
.login-card input:focus { border-color: var(--main); background: #fff; }
.login-card input::placeholder { color: #9aa6b4; }
.form-status { min-height: 16px; margin: 0; color: var(--bad); font-size: var(--fs-xs); font-weight: 700; }

/* ============ 首页 ============ */
.exam-dashboard { display: grid; gap: 15px; }

.home-greet {
  min-height: 206px; padding: 20px; border-radius: 24px; overflow: hidden; color: #fff;
  display: grid; align-content: space-between; gap: 28px; box-shadow: 0 18px 38px rgba(5,84,63,.2);
  background:
    linear-gradient(105deg, rgba(3, 49, 37, .96) 0%, rgba(5, 84, 63, .76) 54%, rgba(5, 84, 63, .16) 100%),
    url("./assets/jinbangyuan-harbour-960.jpg?v=20260904-jinbang81") 68% 52% / cover no-repeat;
}
.home-brand { align-self: start; min-width: 0; }
.home-brand .brand-mark { width: 48px; height: 48px; }
.home-brand strong { font-size: 22px; }
.home-brand small { letter-spacing: .06em; }
.home-profile {
  min-height: 42px; padding: 3px 10px 3px 3px;
  display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line);
  border-radius: var(--r-pill); background: var(--main-tint); color: var(--main-deep); box-shadow: none;
  flex: none; font-size: 11px; font-weight: 800;
}
.home-profile .home-avatar { width: 34px; height: 34px; display: block; border: 2px solid #fff; box-shadow: var(--shadow-sm); }
.home-greet-main { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--sp-3); }
.home-greet-copy { min-width: 0; }
.home-greet .greet-who { color: #fff; font-size: 30px; font-weight: 850; line-height: 1.15; }
.home-avatar { width: 58px; height: 58px; border: 4px solid rgba(255,255,255,.92); border-radius: 50%; flex: none; background: var(--main-tint) center/cover no-repeat; box-shadow: 0 12px 28px rgba(24,63,98,.16); }

.lic-hero {
  position: relative; overflow: hidden; min-height: 214px; padding: 20px 22px; color: #fff; border-radius: 24px;
  box-shadow: 0 18px 38px rgba(5,84,63,.18); background: linear-gradient(135deg, #05543f 0%, #057f47 58%, #19a471 100%);
}
.lic-hero::after { content: ""; position: absolute; inset: auto -15% -58% 35%; height: 220px; border-radius: 50%; background: rgba(39,228,187,.22); filter: blur(30px); pointer-events: none; }
.lic-hero-top { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.lic-hero-info { min-width: 0; }
.lic-title-row { display: flex; align-items: center; gap: 10px; }
.lic-tag { min-height: 36px; padding: 0 12px; display: inline-flex; align-items: center; border: 1px solid rgba(255,255,255,.28); border-radius: 12px; background: rgba(255,255,255,.1); color: #fff; font-size: var(--fs-sm); font-weight: 800; }
.lic-hero h2 { margin: 0; font-size: 29px; font-weight: 800; }
.lic-sub { color: rgba(255,255,255,.94); font-size: var(--fs-base); margin-top: 14px; font-weight: 750; }
.lic-swap { min-height: var(--h-sm); padding: 0 16px; border: 0; border-radius: var(--r-pill); background: rgba(255, 255, 255, .94); color: var(--main-deep); font-size: var(--fs-xs); font-weight: 800; white-space: nowrap; flex: none; }
.lic-progress-ring { --progress-angle: 0deg; width: 104px; height: 104px; padding: 9px; border-radius: 50%; flex: none; position: relative; display: grid; place-items: center; text-align: center; background: conic-gradient(var(--gold) var(--progress-angle), rgba(255,255,255,.3) 0); }
.lic-progress-ring::before { content: ""; position: absolute; inset: 8px; border-radius: 50%; background: rgba(5,84,63,.82); box-shadow: inset 0 0 24px rgba(255,255,255,.12); }
.lic-progress-ring strong, .lic-progress-ring span { position: relative; z-index: 1; display: block; }
.lic-progress-ring strong { font-size: 30px; line-height: 1; font-weight: 800; }
.lic-progress-ring span { margin-top: 6px; color: rgba(255,255,255,.86); font-size: var(--fs-2xs); font-weight: 750; }
.lic-frost { position: relative; z-index: 1; margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.22); }
.frost-tri { display: grid; grid-template-columns: repeat(2, 1fr); }
.frost-tri div { min-height: 46px; display: grid; align-content: center; text-align: center; }
.frost-tri div + div { border-left: 1px solid rgba(255,255,255,.26); }
.frost-tri b { display: block; color: #ffd057; font-size: 24px; font-weight: 800; }
.frost-tri span { font-size: var(--fs-xs); color: rgba(255,255,255,.84); font-weight: 700; }

.home-cta {
  width: 100%; min-height: 64px; border: 0; border-radius: 20px; background: linear-gradient(105deg, #05543f, #07895b 88%); color: #fff;
  font-size: var(--fs-md); font-weight: 850; box-shadow: 0 14px 28px rgba(5,84,63,.2); display: flex; align-items: center; justify-content: center; gap: 12px;
}
.home-cta svg { width: 30px; height: 30px; padding: 6px; border-radius: 50%; background: #fff; color: var(--main); stroke-width: 2.2; }
.home-continue-note { margin: -4px 0 4px; color: #77879c; font-size: var(--fs-xs); font-weight: 700; text-align: center; }
.home-continue-note b { color: var(--gold-deep); }
.home-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.home-row {
  min-height: 108px; position: relative; display: grid; grid-template-columns: 46px minmax(0, 1fr); align-content: center; gap: 10px; width: 100%; text-align: left; padding: 12px 13px;
  border-radius: 20px; background: rgba(255,255,255,.78); border: 1px solid rgba(255,255,255,.94); box-shadow: 0 10px 24px rgba(30,67,100,.07);
}
.home-row .row-ic { width: 46px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: linear-gradient(160deg, #b8dff4, #247cc4); color: #fff; box-shadow: 0 8px 18px rgba(42,119,181,.18); }
.home-row .row-ic svg { width: 25px; height: 25px; }
.home-row .row-ic.t { background: var(--bad-tint); color: var(--bad); }
.home-row .row-ic.y { background: var(--gold-tint); color: var(--gold-deep); }
.home-row .row-ic.c { background: var(--good-tint); color: var(--good); }
.home-row .row-tx { flex: 1; min-width: 0; }
.home-row .row-tx b { display: block; padding-right: 12px; font-size: var(--fs-sm); font-weight: 850; line-height: 1.25; }
.home-row .row-tx small { display: block; margin-top: 5px; padding-right: 6px; font-size: var(--fs-2xs); line-height: 1.42; color: var(--muted); }
.home-row .row-go { position: absolute; right: 9px; top: 50%; transform: translateY(-50%); color: #91a0b1; }
.home-row .row-go svg { width: 17px; height: 17px; }
.study-bank-options { gap: 10px; }
.study-bank-group-title { padding: 6px 4px 0; color: var(--muted); font-size: var(--fs-xs); font-weight: 800; letter-spacing: .08em; }
.study-bank-option { width: 100%; min-height: 74px; padding: 12px; display: grid; grid-template-columns: 44px minmax(0, 1fr) 20px; gap: 12px; align-items: center; border-color: var(--line-soft); background: var(--surface); text-align: left; }
.study-bank-index { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 14px; background: linear-gradient(145deg, var(--main-tint), #ccefe8); color: var(--main-deep); font-size: var(--fs-md); font-weight: 850; }
.study-bank-option > span:nth-child(2) { min-width: 0; display: grid; gap: 3px; }
.study-bank-option b { font-size: var(--fs-base); }
.study-bank-option small { color: var(--muted); font-size: var(--fs-xs); line-height: 1.4; }
.study-bank-option i { color: var(--muted); font-style: normal; font-size: 20px; }

/* 牌照选择门（未选时） */
.license-gate { display: grid; gap: var(--sp-3); }
.gate-hero {
  min-height: 150px; padding: var(--sp-4); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; color: var(--ink);
  display: grid; align-content: center; gap: 6px; box-shadow: var(--shadow-sm);
  background: var(--surface);
}
.gate-hero .eyebrow { color: var(--accent-deep); }
.gate-hero h2 { color: var(--deep); font-size: var(--fs-xl); }
.gate-hero p:last-child { color: var(--muted); font-size: var(--fs-sm); }
.exam-entry-grid { display: grid; gap: var(--sp-2); }
.exam-entry { width: 100%; display: block; padding: 0; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); box-shadow: var(--shadow-sm); overflow: hidden; }
.exam-entry:active { transform: scale(.99); }
.exam-entry-banner { width: 100%; min-height: 74px; padding: var(--sp-3) var(--sp-4); display: flex; align-items: center; gap: var(--sp-3); color: #fff; text-align: left; background: linear-gradient(135deg, var(--deep), var(--main)); }
.exam-entry-s .exam-entry-banner { background: linear-gradient(135deg, var(--deep), var(--accent-deep)); }
.license-chip { width: 46px; height: 46px; min-width: 46px; display: grid; place-items: center; position: relative; border: 1px solid rgba(255, 255, 255, .34); border-radius: var(--r-sm); overflow: hidden; background: rgba(255, 255, 255, .12); }
.license-chip b { position: relative; z-index: 1; color: #fff; font-size: 24px; font-weight: 800; }
.license-chip i { position: absolute; right: -10px; bottom: -10px; width: 26px; height: 26px; border-radius: 50%; background: var(--gold); opacity: .85; }
.exam-entry strong { display: block; font-size: var(--fs-md); line-height: 1.2; }
.exam-entry small { display: block; margin-top: 4px; color: rgba(255, 255, 255, .78); font-size: var(--fs-xs); }
.info-strip { padding: var(--sp-2); border: 1px solid var(--line); border-radius: var(--r-md); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-2); background: var(--surface); }
.info-strip a { min-height: var(--h-sm); display: inline-flex; align-items: center; justify-content: center; padding: 0 var(--sp-2); border: 1px solid color-mix(in srgb, var(--main) 24%, #fff); border-radius: var(--r-sm); background: var(--main-tint); color: var(--main-deep); font-size: var(--fs-xs); font-weight: 800; text-align: center; }

/* 报名 / 考期 */
.schedule-panel { padding: var(--sp-3); border: 1px solid var(--line); border-radius: var(--r-md); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-2); background: var(--surface); box-shadow: var(--shadow-sm); }
.schedule-panel div { min-height: 52px; padding: var(--sp-2); border-radius: var(--r-sm); display: grid; align-content: center; gap: 3px; background: var(--paper); text-align: center; }
.schedule-panel span { color: var(--muted); font-size: var(--fs-2xs); font-weight: 700; }
.schedule-panel strong { font-size: var(--fs-xs); line-height: 1.25; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.schedule-panel a { grid-column: 1 / -1; min-height: var(--h-sm); display: inline-flex; align-items: center; justify-content: center; border-radius: var(--r-sm); color: #fff; background: var(--accent-btn); font-size: var(--fs-sm); font-weight: 800; }
.schedule-note { grid-column: 1 / -1; margin: 2px 0 0; color: var(--muted); font-size: var(--fs-2xs); line-height: 1.4; text-align: center; }

/* ============ 练习页 ============ */
.phone-shell[data-tab="practice"] .page.active { gap: var(--sp-2); }
.practice-top { display: flex; align-items: center; gap: var(--sp-2); position: sticky; top: env(safe-area-inset-top); z-index: 8; padding-bottom: 4px; background: linear-gradient(180deg, var(--cream) 78%, transparent); }
.practice-counter { flex: 1; min-width: 0; min-height: 44px; padding: 5px 14px; border: 1px solid var(--line); border-radius: var(--r-md); display: grid; gap: 5px; align-content: center; background: var(--surface); box-shadow: var(--shadow-sm); }
.practice-counter span { font-size: var(--fs-xs); font-weight: 800; color: var(--ink); }
/* 顶部两侧控制键：上一题 / 选择主题，淡蓝实底 + 描边；高度比底部导航(48)更轻一档(44)，与计数器平衡、不抢戏 */
.ptop-btn {
  min-height: 44px; flex: none; gap: 6px;
  border: 1px solid color-mix(in srgb, var(--main) 30%, #fff);
  border-radius: var(--r-md);
  background: color-mix(in srgb, var(--main) 15%, #fff);
  color: var(--main-deep); font-size: var(--fs-sm); font-weight: 800;
  box-shadow: var(--shadow-sm);
}
.ptop-btn svg { width: 20px; height: 20px; }
.ptop-prev { min-width: 76px; padding: 0 12px 0 9px; }
.ptop-prev span { font-size: var(--fs-xs); white-space: nowrap; }
.ptop-prev.is-exit { color: var(--muted); background: var(--paper); border-color: var(--line); }
.ptop-topic { padding: 0 var(--sp-4); max-width: 42%; }
.ptop-topic span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ptop-btn:disabled { background: var(--paper); border-color: var(--line); color: var(--muted); box-shadow: none; opacity: 1; }
.mini-progress { height: 5px; border-radius: var(--r-pill); background: var(--line); overflow: hidden; }
.mini-progress i { display: block; width: 0; height: 100%; border-radius: var(--r-pill); background: var(--main); }

.mock-meta { min-height: 40px; padding: var(--sp-2) var(--sp-3); border: 1px solid color-mix(in srgb, var(--main) 22%, #fff); border-radius: var(--r-md); display: flex; justify-content: space-between; align-items: center; background: var(--main-tint); }
.mock-meta span { color: var(--main-deep); font-size: var(--fs-md); font-weight: 800; }
.mock-meta strong { font-size: var(--fs-xs); }

.reference-card { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); box-shadow: var(--shadow-sm); overflow: hidden; }
.reference-card.reference-attention:not([open]) {
  border-color: transparent;
  background:
    linear-gradient(var(--surface), var(--surface)) padding-box,
    conic-gradient(from var(--reference-border-angle), transparent 0 70%, var(--main) 82%, var(--gold) 90%, transparent 100%) border-box;
  animation: reference-border-orbit 2.8s linear infinite;
}
@property --reference-border-angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}
@keyframes reference-border-orbit {
  to { --reference-border-angle: 360deg; }
}
@media (prefers-reduced-motion: reduce) {
  .reference-card.reference-attention:not([open]) {
    border-color: color-mix(in srgb, var(--main) 42%, var(--line));
    background: var(--surface);
    animation: none;
  }
}
/* 个案题无独立附件时的提示条（套话假附件被隐藏后，告知凭题干/选项作答）*/
.case-noattach { display: flex; align-items: flex-start; gap: 8px; margin: 0; padding: 10px 12px; border: 1px solid color-mix(in srgb, var(--main) 26%, #fff); border-radius: var(--r-md); background: var(--main-tint); color: var(--main-deep); font-size: var(--fs-xs); font-weight: 700; line-height: 1.5; }
.case-noattach svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.case-noattach span { min-width: 0; }
.reference-card summary { min-height: var(--h-tap); padding: var(--sp-3) var(--sp-4); display: flex; align-items: center; cursor: pointer; color: var(--ink-2); font-size: var(--fs-sm); font-weight: 700; list-style: none; }
.reference-card summary::-webkit-details-marker { display: none; }
.reference-card summary::before { content: "▦"; margin-right: 8px; color: var(--main); }
.reference-card summary::after { content: "⌄"; margin-left: auto; color: var(--muted); font-size: 18px; }
.reference-card[open] summary::after { content: "⌃"; }
.reference-content { padding: 0 var(--sp-4) var(--sp-4); display: grid; gap: var(--sp-2); font-size: calc(var(--fs-sm) * var(--font-zoom)); }
.case-reference-card { border: 1px solid color-mix(in srgb, var(--main) 38%, var(--line)); border-radius: var(--r-md); background: var(--surface); box-shadow: var(--shadow-sm); overflow: hidden; }
.case-reference-card:not([open]) { background: color-mix(in srgb, var(--main-tint) 74%, #fff); }
.case-reference-card summary { width: 100%; min-height: 52px; padding: 11px var(--sp-4); border: 0; border-radius: 0; justify-content: flex-start; gap: 8px; background: transparent; color: var(--main-deep); font-size: calc(var(--fs-sm) * var(--font-zoom)); font-weight: 850; line-height: 1.4; }
.case-reference-card summary::before { content: none; }
.case-reference-card summary::after { flex: none; margin-left: auto; }
.case-reference-card[open] summary { border-bottom: 1px solid color-mix(in srgb, var(--main) 22%, var(--line)); background: color-mix(in srgb, var(--main-tint) 62%, #fff); }
.case-reference-card .reference-content { margin-top: 0; padding: var(--sp-3) var(--sp-4) var(--sp-4); border: 0; border-radius: 0; }
.case-reference-card[open] .reference-content {
  max-height: 62vh;
  max-height: 62dvh;
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
}
.reference-content h3 { margin: 6px 0 0; color: var(--main-deep); font-size: var(--fs-sm); line-height: 1.3; }
.reference-content p, .reference-content li { color: var(--ink-2); line-height: 1.72; }
.reference-content ol { margin: 0; padding-left: 18px; display: grid; gap: 5px; }
.reference-content strong { color: var(--deep); font-weight: 800; }
.case-reference-content > p, .case-reference-content > h3, .case-reference-content > ol { padding: 0 2px; }
.reference-image-gallery { display: grid; gap: var(--sp-3); margin-top: var(--sp-2); }
.reference-image-link { display: grid; gap: 8px; padding: 8px; border: 1px solid var(--line); border-radius: var(--r-md); background: #fff; color: var(--main-deep); text-decoration: none; box-shadow: var(--shadow-sm); }
.reference-image-link img { display: block; width: 100%; height: auto; border-radius: var(--r-sm); background: var(--paper); }
.reference-image-link span { padding: 2px 4px 4px; font-size: calc(var(--fs-xs) * var(--font-zoom)); font-weight: 800; text-align: center; }
.land-register-layout { display: grid; gap: var(--sp-3); }
.land-register-header { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--sp-3); padding: var(--sp-4); border-radius: var(--r-md); background: linear-gradient(135deg, var(--main-deep), var(--main)); color: #fff; }
.land-register-header > div:first-child { min-width: 0; }
.land-register-header span { display: block; margin-bottom: 5px; color: color-mix(in srgb, #fff 78%, transparent); font-size: calc(var(--fs-2xs) * var(--font-zoom)); font-weight: 800; letter-spacing: .06em; }
.land-register-header h3 { margin: 0; color: #fff; font-size: calc(var(--fs-lg) * var(--font-zoom)); line-height: 1.28; }
.land-register-header p { margin: 6px 0 0; color: color-mix(in srgb, #fff 84%, transparent); font-size: calc(var(--fs-xs) * var(--font-zoom)); line-height: 1.45; }
.land-register-badges { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; max-width: 42%; }
.land-register-badges b { padding: 5px 9px; border: 1px solid color-mix(in srgb, #fff 32%, transparent); border-radius: var(--r-pill); background: color-mix(in srgb, #fff 13%, transparent); color: #fff; font-size: calc(var(--fs-2xs) * var(--font-zoom)); white-space: nowrap; }
.land-register-section {
  --land-section-line: #b9c9d5;
  --land-section-soft: #f3f7fa;
  --land-section-title: #29495f;
  display: grid;
  gap: var(--sp-2);
  padding: var(--sp-3);
  border: 2px solid var(--land-section-line);
  border-radius: var(--r-md);
  background: var(--land-section-soft);
}
.land-register-section[data-section="property"] { --land-section-line: #8db9d8; --land-section-soft: #eef7fd; --land-section-title: #175a86; }
.land-register-section[data-section="owners"] { --land-section-line: #86c7ad; --land-section-soft: #eef9f4; --land-section-title: #176548; }
.land-register-section[data-section="incumbrances"] { --land-section-line: #e5b66e; --land-section-soft: #fff8eb; --land-section-title: #84520d; }
.land-register-section[data-section="pending"] { --land-section-line: #b7a5d8; --land-section-soft: #f7f3fc; --land-section-title: #5c4785; }
.land-register-section h4 { margin: calc(var(--sp-3) * -1) calc(var(--sp-3) * -1) 0; padding: 10px var(--sp-3); border-bottom: 1px solid var(--land-section-line); border-radius: calc(var(--r-md) - 2px) calc(var(--r-md) - 2px) 0 0; background: color-mix(in srgb, var(--land-section-line) 24%, #fff); color: var(--land-section-title); font-size: calc(var(--fs-sm) * var(--font-zoom)); }
.land-register-facts dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; }
.land-register-facts dl > div { min-width: 0; padding: 10px 12px; border: 1px solid color-mix(in srgb, var(--land-section-line) 58%, #fff); border-radius: var(--r-sm); background: #fff; }
.land-register-facts dl > div.is-emphasis { background: var(--accent-tint); }
.land-register-facts dt { color: var(--muted); font-size: calc(var(--fs-2xs) * var(--font-zoom)); font-weight: 800; }
.land-register-facts dd { margin: 4px 0 0; color: var(--deep); font-size: calc(var(--fs-sm) * var(--font-zoom)); font-weight: 800; line-height: 1.45; overflow-wrap: anywhere; }
.land-register-status { max-width: 100%; padding: 5px 8px; border-radius: var(--r-pill); font-size: calc(var(--fs-2xs) * var(--font-zoom)); line-height: 1.2; text-align: center; }
.land-register-status.is-info { background: var(--main-tint); color: var(--main-deep); }
.land-register-status.is-cleared { background: #e8f7ef; color: #16734a; }
.land-register-status.is-warning { background: #fff4d8; color: #93610a; }
.land-register-status.is-current { background: var(--accent-tint); color: var(--accent-deep); }
.land-register-status.is-danger { background: #fde9e7; color: #a3382e; }
.land-register-status.is-muted { background: var(--paper); color: var(--muted); }
.land-register-table-wrap { overflow: visible; border: 0; background: transparent; }
.land-register-table-wrap table,
.land-register-table-wrap tbody { display: block; min-width: 0; }
.land-register-table-wrap thead { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.land-register-table-wrap tr { display: block; margin-bottom: 10px; overflow: hidden; border: 1px solid color-mix(in srgb, var(--land-section-line) 68%, #fff); border-left-width: 4px; border-radius: var(--r-sm); background: #fff; }
.land-register-table-wrap tr:last-child { margin-bottom: 0; }
.land-register-table-wrap td,
.land-register-table-wrap td:first-child,
.land-register-table-wrap td:nth-child(4),
.land-register-table-wrap .land-register-table-state {
  display: grid;
  grid-template-columns: minmax(96px, .42fr) minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  min-width: 0 !important;
  padding: 8px 10px;
  border-right: 0;
  overflow-wrap: anywhere;
}
.land-register-table-wrap td::before { content: attr(data-label); color: var(--land-section-title); font-weight: 800; }
.land-register-table-wrap td:last-child { border-bottom: 0; }
.land-register-table-wrap code { color: var(--deep); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .92em; font-weight: 800; white-space: nowrap; }
.land-register-table-state p { margin: 7px 0 0 !important; color: var(--muted) !important; font-size: calc(var(--fs-2xs) * var(--font-zoom)) !important; line-height: 1.5 !important; }
.land-register-table-state .land-register-status { position: static; display: inline-flex; max-width: 100%; }
.land-register-table-wrap .land-register-table-state p { grid-column: 2; }
.land-register-source { margin: 0; padding: 9px 11px; border-radius: var(--r-sm); background: var(--paper); color: var(--muted) !important; font-size: calc(var(--fs-2xs) * var(--font-zoom)); line-height: 1.5 !important; }
.land-register-original { display: grid; gap: var(--sp-2); }
.land-register-original > h3 { margin: 0; color: var(--main-deep); font-size: calc(var(--fs-sm) * var(--font-zoom)); }
.land-register-layout.is-original .land-register-header { background: linear-gradient(135deg, #263846, #40596a); }
.land-register-layout.is-original .land-register-section h4,
.land-register-layout.is-original .land-register-table-wrap td::before { color: var(--land-section-title); }
.land-register-layout.is-original .land-register-status { display: none; }
.reference-translation { margin-top: var(--sp-3); border: 1px solid var(--main); border-radius: var(--r-md); background: #fff; overflow: hidden; }
.reference-translation > summary { min-height: 44px; padding: 10px 14px; display: flex; align-items: center; justify-content: center; cursor: pointer; background: var(--main-tint); color: var(--main-deep); font-size: calc(var(--fs-sm) * var(--font-zoom)); font-weight: 800; list-style: none; }
.reference-translation > summary::-webkit-details-marker { display: none; }
.reference-translation > summary::after { content: "＋"; margin-left: 8px; }
.reference-translation[open] > summary::after { content: "－"; }
.reference-translation:not([open]) > .reference-translation-content { display: none; }
.reference-translation-content { padding: var(--sp-3); border-top: 1px solid var(--line); }
.reference-originals { border: 1px solid var(--line); border-radius: var(--r-md); background: #fff; overflow: hidden; }
.reference-originals > summary { min-height: 42px; padding: 10px 12px; display: flex; align-items: center; cursor: pointer; color: var(--main-deep); font-size: calc(var(--fs-xs) * var(--font-zoom)); font-weight: 800; list-style: none; }
.reference-originals > summary::-webkit-details-marker { display: none; }
.reference-originals > summary::before { content: "▣"; margin-right: 8px; color: var(--main); }
.reference-originals > summary::after { content: "⌕"; margin-left: auto; color: var(--muted); }
.reference-originals[open] > summary::after { content: "⌓"; }
.reference-originals .reference-image-gallery { margin: 0; padding: 0 10px 10px; }
@media (max-width: 760px) {
  .land-register-header { display: grid; }
  .land-register-badges { justify-content: flex-start; max-width: none; }
  .land-register-facts dl { grid-template-columns: 1fr; }
}
/* 个案题附件卡片（从 /x 移植）*/
.legacy-case-intro { display: grid; gap: var(--sp-2); }
.legacy-attachment { display: grid; gap: var(--sp-3); padding: var(--sp-3); border: 1px solid var(--line); border-radius: var(--r-md); background: #fff; box-shadow: var(--shadow-sm); }
.legacy-attachment + .legacy-attachment { margin-top: var(--sp-2); }
.legacy-attachment-header { display: grid; gap: 4px; padding-bottom: 8px; border-bottom: 1px solid var(--line-soft); }
.legacy-attachment-header span { color: var(--main); font-size: calc(11px * var(--font-zoom)); font-weight: 800; letter-spacing: 0; }
.legacy-attachment-header h4 { margin: 0; color: var(--deep); font-size: calc(var(--fs-base) * var(--font-zoom)); line-height: 1.35; }
.legacy-section { display: grid; gap: 8px; }
.legacy-section h5 { margin: 0; color: var(--main-deep); font-size: calc(var(--fs-sm) * var(--font-zoom)); line-height: 1.35; }
.legacy-section dl { display: grid; grid-template-columns: minmax(88px, .42fr) minmax(0, 1fr); margin: 0; overflow: hidden; border: 1px solid var(--line-soft); border-radius: var(--r-sm); background: #fff; }
.legacy-section dt, .legacy-section dd { margin: 0; padding: 8px 10px; border-bottom: 1px solid var(--line-soft); font-size: calc(var(--fs-xs) * var(--font-zoom)); line-height: 1.55; overflow-wrap: anywhere; }
.legacy-section dt { border-right: 1px solid var(--line-soft); background: var(--main-tint); color: var(--main-deep); font-weight: 800; }
.legacy-section dd { color: var(--ink-2); }
.legacy-section dt:nth-last-child(2), .legacy-section dd:last-child { border-bottom: 0; }
.legacy-section-compact dl { grid-template-columns: minmax(104px, .5fr) minmax(0, 1fr); }
.legacy-table-wrap table { min-width: 620px; }
.legacy-table-wrap th { white-space: nowrap; }
.legacy-table-wrap td { min-width: 96px; }
.legacy-raw { display: grid; gap: var(--sp-2); }
.reference-table-wrap { width: 100%; max-width: 100%; min-width: 0; overflow-x: auto; overflow-y: hidden; border: 1px solid var(--line); border-radius: var(--r-sm); background: #fff; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; }
.reference-content table { width: max-content; min-width: 100%; border-collapse: separate; border-spacing: 0; background: #fff; font-size: calc(var(--fs-xs) * var(--font-zoom)); }
.reference-content th, .reference-content td { padding: 8px 10px; border-bottom: 1px solid var(--line-soft); border-right: 1px solid var(--line-soft); vertical-align: top; text-align: left; line-height: 1.55; }
.reference-content th { min-width: 120px; white-space: nowrap; }
.reference-content td { min-width: 120px; max-width: 320px; overflow-wrap: anywhere; }
.reference-content tr:last-child td { border-bottom: 0; }
.reference-content th:last-child, .reference-content td:last-child { border-right: 0; }
.reference-content th { color: var(--main-deep); background: var(--main-tint); font-weight: 800; }

.question-title { scroll-margin-top: calc(env(safe-area-inset-top) + 58px); padding: 17px 14px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); box-shadow: var(--shadow-sm); font-size: calc(18px * var(--font-zoom)); font-weight: 560; line-height: 1.72; letter-spacing: .005em; text-wrap: wrap; }
.question-title.case-question { display: grid; gap: var(--sp-2); padding: 0; border: 0; background: transparent; box-shadow: none; font-size: calc(var(--fs-base) * var(--font-zoom)); }
.question-title.question-structured { display: grid; gap: 9px; }
.question-stem { min-width: 0; }
.question-statement-list { min-width: 0; display: grid; gap: 2px; font-size: calc(16.5px * var(--font-zoom)); line-height: 1.72; }
.question-statement-item { min-width: 0; }
.question-statement-marker { display: inline; color: var(--deep); font-weight: 650; font-variant-numeric: tabular-nums; }
.question-statement-text { display: inline; min-width: 0; }
.case-question h3 { margin: 6px 0 0; padding: 0 2px 6px; border-bottom: 1px solid var(--line); color: var(--deep); font-size: calc(16.5px * var(--font-zoom)); line-height: 1.45; }
.case-question h3:first-child { margin-top: 0; }
.case-question p, .case-question ol { margin: 0; padding: 14px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); color: var(--ink-2); font-size: calc(15.5px * var(--font-zoom)); line-height: 1.75; box-shadow: var(--shadow-sm); }
.case-question p { white-space: pre-line; }
.case-question ol { padding-left: 32px; }
.case-question li + li { margin-top: 8px; }
.case-question strong { color: var(--deep); font-weight: 800; }

.options { display: grid; gap: 9px; }
.option { width: 100%; min-height: 54px; padding: 10px 13px; border: 1.5px solid var(--line); border-radius: var(--r-md); display: flex; align-items: center; gap: 11px; justify-content: flex-start; text-align: left; background: var(--surface); box-shadow: var(--shadow-sm); }
.option .letter { width: 30px; height: 30px; min-width: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--paper); color: var(--ink-2); font-weight: 800; }
.option span:last-child { min-width: 0; line-height: 1.55; font-size: calc(16.5px * var(--font-zoom)); font-weight: 620; letter-spacing: .003em; text-wrap: wrap; }
.option.selected { border-color: var(--main); background: var(--main-tint); }
.option.selected .letter { color: #fff; background: var(--main); }
.option.correct { border-color: var(--good); background: var(--good-tint); }
.option.correct .letter { color: #fff; background: var(--good); }
.option.wrong { border-color: var(--bad); background: var(--bad-tint); }
.option.wrong .letter { color: #fff; background: var(--bad); }
.option.correct::after, .option.wrong::after { margin-left: auto; align-self: center; font-size: 18px; font-weight: 900; line-height: 1; }
.option.correct::after { content: "✓"; color: var(--good); }
.option.wrong::after { content: "✗"; color: var(--bad); }

.answer-panel { padding: var(--sp-3) var(--sp-4); border: 1px solid var(--line); border-radius: var(--r-md); display: grid; gap: var(--sp-2); background: var(--surface); box-shadow: var(--shadow-sm); }
.question-issue-warning { margin: 0; padding: 0 2px 6px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: calc(var(--fs-2xs) * var(--font-zoom)); font-weight: 600; line-height: 1.45; }
.answer-result { display: flex; justify-content: space-between; align-items: center; gap: var(--sp-3); }
.answer-result strong { font-size: var(--fs-base); }
.answer-result span { color: var(--muted); font-size: var(--fs-xs); }
.knowledge-notice { margin: 0; padding: var(--sp-2) var(--sp-3); border: 1px solid #ead39a; border-radius: var(--r-sm); background: #fff8e8; color: #7a5112; font-size: calc(var(--fs-xs) * var(--font-zoom)); line-height: 1.45; white-space: pre-line; }
.statement-analysis { display: grid; gap: 6px; }
.statement-analysis > strong { color: var(--ink); font-size: var(--fs-sm); }
.statement-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) 32px; gap: var(--sp-2); align-items: start; padding: var(--sp-2); border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--paper); }
.statement-row span, .statement-row b { min-height: 26px; display: inline-grid; place-items: center; border-radius: var(--r-sm); font-weight: 900; }
.statement-row span { color: var(--main-deep); background: var(--main-tint); }
.statement-row b { color: #fff; background: var(--muted); }
.statement-row p { color: var(--ink-2); font-size: calc(var(--fs-xs) * var(--font-zoom)); line-height: 1.55; }
.statement-true { border-color: rgba(29,155,106,.32); background: var(--good-tint); }
.statement-true b { background: var(--good); }
.statement-false { border-color: rgba(209,69,60,.26); background: var(--bad-tint); }
.statement-false b { background: var(--bad); }
#explanation {
  color: var(--ink-2);
  line-height: 1.52;
  font-size: calc(var(--fs-xs) * var(--font-zoom));
}
#explanation p { margin: 0 0 0.65em; }
#explanation p:last-child { margin-bottom: 0; }
#explanation ul,
#explanation ol { margin: 0.35em 0 0.75em; padding-left: 1.45em; }
#explanation li { margin: 0.22em 0; }
#explanation strong { color: var(--ink); font-weight: 850; }
#explanation code {
  padding: 0.08em 0.32em;
  border-radius: 4px;
  background: var(--main-tint);
  color: var(--main-deep);
  font: inherit;
}
.issue-notice { margin: 0; padding: var(--sp-2) var(--sp-3); border: 1px solid rgba(209,69,60,.22); border-radius: var(--r-sm); background: var(--bad-tint); color: #8f2f29; font-size: var(--fs-xs); font-weight: 700; line-height: 1.45; }
.answer-actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-top: 2px; }
.answer-actions .issue-button { border-color: color-mix(in srgb, var(--main) 28%, #fff); background: var(--main-tint); color: var(--main-deep); box-shadow: var(--shadow-sm); }
.answer-actions .issue-button.active { border-color: color-mix(in srgb, var(--bad) 30%, #fff); background: var(--bad-tint); color: var(--bad); }
.remove-wrong { min-height: var(--h-sm); }

.phone-shell[data-tab="practice"] #practicePage { padding-bottom: calc(var(--h-nav) + env(safe-area-inset-bottom) + 92px); }
.answer-dock {
  position: fixed;
  left: 50%;
  bottom: calc(var(--h-nav) + env(safe-area-inset-bottom) + 6px);
  z-index: 11;
  width: min(calc(100vw - (var(--edge) * 2)), calc(var(--app-frame-width) - (var(--edge) * 2)));
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: 0.95fr 1.3fr 0.95fr;
  gap: var(--sp-2);
  padding: 12px 0 4px;
  background: linear-gradient(180deg, rgba(254,246,239,0), var(--cream) 34%);
}
.answer-dock button { min-height: 54px; border-radius: var(--r-md); font-size: var(--fs-base); }
.answer-dock #nextQuestion { background: var(--main-tint); border: 1px solid color-mix(in srgb, var(--main) 30%, #fff); color: var(--main-deep); font-weight: 800; box-shadow: var(--shadow-sm); }
.answer-dock #prevQuestionBtn { background: var(--main-tint); border: 1px solid color-mix(in srgb, var(--main) 34%, #fff); color: var(--main-deep); font-weight: 850; box-shadow: var(--shadow-sm); }
.answer-dock #prevQuestionBtn:disabled { opacity: .5; }

.phone-shell[data-font-size="large"] { --font-zoom: 1.1; }
.phone-shell[data-font-size="xlarge"] { --font-zoom: 1.24; }

/* ============ 错题列表 ============ */
.list-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--sp-2);
}
.list-head span { color: var(--muted); font-size: var(--fs-xs); font-weight: 700; }
.wrong-filter { min-width: 0; display: inline-flex; align-items: center; justify-content: center; gap: 6px; color: var(--muted); font-size: var(--fs-xs); font-weight: 700; white-space: nowrap; }
.wrong-filter select { min-width: 0; width: min(132px, 100%); min-height: var(--h-sm); padding: 0 28px 0 var(--sp-2); border-radius: var(--r-sm); font-size: var(--fs-xs); font-weight: 700; }
.question-list { display: grid; gap: var(--sp-2); }
.list-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-2); }
.list-row.has-action { grid-template-columns: minmax(0, 1fr) auto; }
.list-open { min-height: 54px; justify-content: flex-start; align-items: center; gap: var(--sp-3); text-align: left; padding: var(--sp-2) var(--sp-3); border-color: var(--line); background: var(--surface); box-shadow: var(--shadow-sm); }
.list-open strong { width: 32px; height: 32px; min-width: 32px; display: grid; place-items: center; border-radius: 10px; color: var(--accent-deep); background: var(--accent-tint); font-size: var(--fs-xs); }
.list-open span { min-width: 0; color: var(--ink); font-size: var(--fs-sm); line-height: 1.45; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.progress-card { padding: var(--sp-5); border: 1px dashed var(--line); border-radius: var(--r-md); background: var(--surface); text-align: center; }

/* ============ 设置 ============ */
.settings-group-label { margin: var(--sp-4) 0 calc(-1 * var(--sp-1)); padding-left: var(--sp-1); color: var(--muted); font-size: var(--fs-2xs); font-weight: 800; letter-spacing: 0; }
.settings-group-label:first-of-type { margin-top: var(--sp-1); }
.account-panel { padding: var(--sp-3) var(--sp-4); border: 1px solid var(--line); border-radius: var(--r-md); display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); background: var(--surface); box-shadow: var(--shadow-sm); }
.account-panel-me .settings-avatar { width: 46px; height: 46px; border-radius: 50%; flex: none; background: var(--main-tint) center/cover no-repeat; box-shadow: var(--shadow-sm); }
.account-panel > div:not(.account-actions) { min-width: 0; display: grid; gap: 2px; flex: 1; }
.account-panel span { color: var(--muted); font-size: var(--fs-2xs); font-weight: 700; }
.account-panel strong { font-size: var(--fs-md); line-height: 1.2; }
.account-panel p { margin: 2px 0 0; color: var(--muted); font-size: var(--fs-xs); line-height: 1.5; }
.admin-account-panel p { margin: 0; }
.account-actions { display: flex; gap: var(--sp-2); flex-wrap: wrap; justify-content: flex-end; flex-shrink: 0; }
.account-actions button { min-height: var(--h-sm); padding: 0 var(--sp-3); border-radius: var(--r-pill); border-color: rgba(77,138,224,.18); background: var(--main-tint); color: var(--main-deep); font-size: var(--fs-xs); font-weight: 800; }
.account-actions #logoutBtn { border-color: rgba(209,69,60,.26); background: var(--bad-tint); color: var(--bad); }
.contact-card { padding: var(--sp-4); border: 1px solid var(--line); border-radius: var(--r-md); display: grid; gap: var(--sp-2); background: transparent; }
.collector-card, .settings-group { padding: var(--sp-4); border: 1px solid var(--line); border-radius: var(--r-md); display: grid; gap: var(--sp-2); background: var(--surface); box-shadow: var(--shadow-sm); }
.collector-card strong { font-size: var(--fs-base); }
.collector-card p { color: var(--muted); font-size: var(--fs-xs); line-height: 1.5; }
.collector-card code { padding: var(--sp-3); border-radius: var(--r-sm); display: block; overflow-x: auto; color: var(--ink-2); background: var(--paper); font-size: var(--fs-xs); }
.settings-group label { display: grid; gap: 5px; color: var(--muted); font-size: var(--fs-xs); font-weight: 700; }
.font-controls { min-height: var(--h-tap); padding: 3px; border: 1px solid var(--line); border-radius: var(--r-md); display: grid; grid-template-columns: 38px minmax(34px, auto) 38px; align-items: center; background: var(--paper); }
.font-controls button { min-width: 36px; min-height: 38px; padding: 0; border: 0; border-radius: var(--r-sm); background: var(--main-tint); color: var(--main-deep); font-size: var(--fs-xs); font-weight: 900; }
.font-controls span { padding: 0 4px; color: var(--muted); font-size: var(--fs-2xs); font-weight: 800; text-align: center; white-space: nowrap; }
.segmented { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--paper); }
.segmented button { min-height: var(--h-sm); border: 0; border-radius: var(--r-pill); background: transparent; color: var(--muted); font-size: var(--fs-sm); font-weight: 700; }
.segmented button.active { background: var(--surface); color: var(--main-deep); box-shadow: var(--shadow-sm); }
.file-button input { display: none; }
select, input[type="search"], input[type="text"], input[type="tel"], input[type="password"], textarea { width: 100%; min-height: var(--h-tap); padding: 0 var(--sp-3); border: 1px solid var(--line); border-radius: var(--r-md); background: #fff; color: var(--ink); font-size: var(--fs-base); }
textarea { min-height: 84px; padding: var(--sp-2) var(--sp-3); resize: vertical; line-height: 1.55; }
input:focus, select:focus, textarea:focus { border-color: var(--main); }

/* ============ 设置：统一分组卡片 + 行 ============ */
.set-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-sm); overflow: hidden; }
.set-row { display: flex; align-items: center; gap: var(--sp-3); padding: 14px 16px; }
.set-row + .set-row { border-top: 1px solid var(--line-soft); }
.set-row .set-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none; background: var(--main-tint); color: var(--main); }
.set-row .set-ic svg { width: 21px; height: 21px; }
.set-row .set-ic.gold { background: var(--gold-tint); color: var(--gold-deep); }
.set-row .set-ic.bad { background: var(--bad-tint); color: var(--bad); }
.set-row .set-av { width: 44px; height: 44px; border-radius: 50%; flex: none; background: var(--main-tint) center/cover no-repeat; box-shadow: var(--shadow-sm); cursor: pointer; position: relative; }
.set-row .set-av::after { content: "✎"; position: absolute; right: -2px; bottom: -2px; width: 19px; height: 19px; display: grid; place-items: center; border-radius: 50%; background: var(--accent); color: #fff; font-size: 10px; border: 2px solid var(--surface); }
.set-row .set-tx { flex: 1; min-width: 0; }
.set-row .set-tx b { display: block; font-weight: 700; font-size: var(--fs-base); line-height: 1.25; }
.set-row .set-tx span { display: block; font-size: var(--fs-xs); color: var(--muted); line-height: 1.35; }
.set-pill { min-height: var(--h-sm); min-width: 0; padding: 0 16px; border: 1px solid color-mix(in srgb, var(--main) 28%, #fff); border-radius: var(--r-pill); background: var(--main-tint); color: var(--main-deep); font-size: var(--fs-xs); font-weight: 800; box-shadow: var(--shadow-sm); flex: none; white-space: nowrap; }
.set-pill.bad { border-color: color-mix(in srgb, var(--bad) 26%, #fff); background: var(--bad-tint); color: var(--bad); }
.set-jump { display: flex; align-items: center; gap: 8px; flex: none; }
.set-jump input { width: 70px; min-height: 38px; padding: 0 8px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--paper); text-align: center; font-size: var(--fs-sm); font-weight: 800; }
.set-row .font-controls { flex: none; min-height: 42px; padding: 3px; grid-template-columns: 34px minmax(30px, auto) 34px; }
.set-row .font-controls button { min-height: 34px; min-width: 32px; }
.set-row-search { align-items: flex-start; }
.bank-search-box { margin-top: 10px; display: grid; gap: 8px; }
.bank-search-box input { min-height: 40px; font-size: var(--fs-sm); }
.bank-search-status { min-height: 18px; color: var(--muted); font-size: var(--fs-2xs); font-weight: 700; line-height: 1.35; }
.bank-search-results { display: grid; gap: 8px; max-height: 320px; overflow-y: auto; padding-right: 2px; }
.bank-search-hit { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--paper); display: grid; gap: 3px; text-align: left; box-shadow: var(--shadow-sm); }
.bank-search-hit span { color: var(--muted); font-size: var(--fs-2xs); font-weight: 800; line-height: 1.35; }
.bank-search-hit b { color: var(--main-deep); font-size: var(--fs-sm); line-height: 1.35; }
.bank-search-hit p { margin: 0; color: var(--ink-2); font-size: var(--fs-xs); line-height: 1.45; }

/* ============ 心法 ============ */
.mindset-content { display: grid; gap: var(--sp-3); }
.mindset-empty { padding: var(--sp-5); color: var(--muted); text-align: center; }
.panel { background: var(--surface); border-radius: var(--r-md); box-shadow: var(--shadow-sm); }

/* ============ 备考指南 ============ */
.guide-nav { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; overflow: visible; padding-bottom: 2px; }
.guide-nav::-webkit-scrollbar { display: none; }
.guide-nav button { width: 100%; min-width: 0; min-height: var(--h-sm); padding: 0 6px; border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--surface); color: var(--ink-2); font-size: clamp(11.5px, 3.45vw, var(--fs-sm)); font-weight: 700; white-space: nowrap; }
.guide-nav button.active { background: var(--main); border-color: var(--main); color: #fff; }
.guide-content { display: grid; gap: var(--sp-3); }
.guide-content strong { color: var(--main-deep); font-weight: 900; }
.g-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-sm); padding: var(--sp-4); display: grid; gap: var(--sp-2); }
.g-bt { font-size: var(--fs-sm); font-weight: 800; color: var(--main-deep); display: flex; align-items: center; gap: 6px; }
.g-bt small { color: var(--muted); font-weight: 600; font-size: var(--fs-2xs); }
.g-bt.hot { color: var(--gold-deep); }
.g-bt.trap { color: var(--bad); }
.g-bt.card { color: var(--accent-deep); }
.g-bt.gold { color: var(--gold-deep); }
.g-note { color: var(--ink-2); font-size: var(--fs-sm); line-height: 1.7; }
.g-tip { color: var(--gold-deep); font-weight: 600; }
.g-tablewrap { width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-sm); -webkit-overflow-scrolling: touch; }
.g-table { min-width: 100%; border-collapse: separate; border-spacing: 0; background: #fff; font-size: var(--fs-xs); }
.g-table th, .g-table td { padding: 8px 10px; border-bottom: 1px solid var(--line-soft); border-right: 1px solid var(--line-soft); vertical-align: top; text-align: left; line-height: 1.5; }
.g-table tr:last-child td { border-bottom: 0; }
.g-table th:last-child, .g-table td:last-child { border-right: 0; }
.g-table th { color: var(--main-deep); background: var(--main-tint); font-weight: 800; white-space: nowrap; }
.g-table td:first-child { font-weight: 700; color: var(--ink); white-space: nowrap; }

.g-part { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-sm); overflow: hidden; }
.g-part > summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 14px 16px; cursor: pointer; min-height: var(--h-tap); }
.g-part > summary::-webkit-details-marker { display: none; }
.g-part-tag { width: 34px; height: 28px; flex: none; display: grid; place-items: center; border-radius: 8px; background: var(--main-tint); color: var(--main-deep); font-size: var(--fs-2xs); font-weight: 800; }
.g-part > summary b { flex: 1; min-width: 0; font-size: var(--fs-base); font-weight: 700; }
.g-part-lv { flex: none; color: var(--muted); font-size: var(--fs-2xs); font-weight: 700; text-align: right; }
.g-part[open] > summary { border-bottom: 1px solid var(--line-soft); }
.g-part-body { padding: 14px 16px; display: grid; gap: var(--sp-2); }
.g-one { color: var(--ink-2); font-size: var(--fs-sm); line-height: 1.6; padding: 10px 12px; background: var(--paper); border-radius: var(--r-sm); }
.g-hot { margin: 0; padding-left: 20px; display: grid; gap: 6px; color: var(--ink); font-size: var(--fs-sm); line-height: 1.6; }
.g-hot li::marker { color: var(--gold-deep); font-weight: 800; }
.g-traps { display: grid; gap: 8px; }
.g-trap { border: 1px solid color-mix(in srgb, var(--bad) 24%, #fff); border-radius: var(--r-sm); overflow: hidden; }
.g-trap-x, .g-trap-ok { display: flex; gap: 8px; padding: 8px 10px; font-size: var(--fs-xs); line-height: 1.5; }
.g-trap-x { background: var(--bad-tint); color: #8f2f29; }
.g-trap-ok { background: var(--good-tint); color: #14533a; }
.g-trap-x span, .g-trap-ok span { flex: none; width: 26px; height: 20px; display: grid; place-items: center; border-radius: 6px; font-weight: 800; font-size: 11px; color: #fff; }
.g-trap-x span { background: var(--bad); }
.g-trap-ok span { background: var(--good); }
.g-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.gcard { display: block; width: 100%; min-height: 70px; padding: 12px 14px; text-align: left; border: 1px solid color-mix(in srgb, var(--accent) 30%, #fff); border-radius: var(--r-md); background: var(--accent-tint); }
.gc-front { font-weight: 800; color: var(--accent-deep); font-size: var(--fs-sm); line-height: 1.35; }
.gc-back { display: none; color: var(--ink-2); font-size: var(--fs-xs); line-height: 1.55; }
.gcard.flipped { background: var(--surface); border-color: var(--line); }
.gcard.flipped .gc-front { display: none; }
.gcard.flipped .gc-back { display: block; }
.g-steps { display: grid; gap: 8px; }
.g-step { padding: 10px 12px; border-radius: var(--r-sm); background: var(--paper); }
.g-step b { display: block; color: var(--main-deep); font-size: var(--fs-sm); font-weight: 800; margin-bottom: 2px; }
.g-step p { color: var(--ink-2); font-size: var(--fs-xs); line-height: 1.6; }
.g-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.g-chip-bad { padding: 5px 12px; border-radius: var(--r-pill); background: var(--bad-tint); color: var(--bad); font-size: var(--fs-xs); font-weight: 700; }
.g-list, .g-pre { margin: 0; padding-left: 20px; display: grid; gap: 7px; color: var(--ink); font-size: var(--fs-sm); line-height: 1.6; }
.g-pre li::marker, .g-list li::marker { color: var(--main); font-weight: 800; }
.sprint-hero { border-color: color-mix(in srgb, var(--gold) 28%, #fff); background: color-mix(in srgb, var(--gold-tint) 32%, var(--surface)); }
.sprint-grid { display: grid; gap: 8px; }
.sprint-step { display: grid; grid-template-columns: 66px minmax(0, 1fr); column-gap: 10px; row-gap: 2px; align-items: start; padding: 10px 12px; border: 1px solid var(--line-soft); border-radius: var(--r-sm); background: var(--paper); }
.sprint-step span { grid-row: span 2; min-height: 30px; display: grid; place-items: center; border-radius: 9px; background: var(--main); color: #fff; font-size: var(--fs-2xs); font-weight: 900; text-align: center; }
.sprint-step b { color: var(--main-deep); font-size: var(--fs-sm); font-weight: 900; }
.sprint-step p { color: var(--ink-2); font-size: var(--fs-xs); line-height: 1.55; }
.onepager { border-color: color-mix(in srgb, var(--main) 20%, #fff); background: color-mix(in srgb, var(--main-tint) 22%, var(--surface)); }
.onepager-grid { display: grid; gap: 8px; }
.onepager-group { padding: 10px 12px; border: 1px solid var(--line-soft); border-radius: var(--r-sm); background: var(--surface); }
.onepager-group b { display: block; margin-bottom: 6px; color: var(--main-deep); font-size: var(--fs-sm); font-weight: 900; }
.onepager-group ul { margin: 0; padding-left: 18px; display: grid; gap: 5px; color: var(--ink-2); font-size: var(--fs-xs); line-height: 1.55; }
.onepager-group li::marker { color: var(--main); font-weight: 800; }
.logic-intro { border-color: color-mix(in srgb, var(--gold) 28%, #fff); background: color-mix(in srgb, var(--gold-tint) 34%, var(--surface)); }
.logic-flow { display: grid; gap: 8px; }
.logic-step { display: grid; grid-template-columns: 30px minmax(0, 1fr); column-gap: 10px; row-gap: 2px; align-items: start; padding: 10px 12px; border-radius: var(--r-sm); background: var(--surface); border: 1px solid color-mix(in srgb, var(--gold) 18%, #fff); }
.logic-step span { grid-row: span 2; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--gold); color: #fff; font-size: var(--fs-xs); font-weight: 900; }
.logic-step b { color: var(--gold-deep); font-size: var(--fs-sm); }
.logic-step p { color: var(--ink-2); font-size: var(--fs-xs); line-height: 1.55; }
.logic-crash { display: grid; gap: 8px; padding: 10px 12px; border: 1px solid color-mix(in srgb, var(--main) 18%, #fff); border-radius: var(--r-sm); background: var(--surface); }
.logic-crash > span { color: var(--main-deep); font-size: var(--fs-2xs); font-weight: 900; }
.logic-crash div { display: grid; gap: 2px; padding-top: 8px; border-top: 1px solid var(--line-soft); }
.logic-crash div:first-of-type { padding-top: 0; border-top: 0; }
.logic-crash b { color: var(--ink); font-size: var(--fs-xs); font-weight: 900; }
.logic-crash p { color: var(--ink-2); font-size: var(--fs-xs); line-height: 1.55; }
.logic-tips { display: grid; gap: 10px; border-color: color-mix(in srgb, var(--main) 20%, #fff); }
.logic-tip-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.logic-tip { min-height: 42px; display: flex; align-items: center; padding: 9px 10px; border: 1px solid var(--line-soft); border-radius: var(--r-sm); background: var(--paper); color: var(--ink-2); font-size: var(--fs-xs); font-weight: 800; line-height: 1.45; }
.logic-patterns { display: grid; gap: 6px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--surface); border: 1px solid var(--line-soft); }
.logic-patterns p { margin: 0; color: var(--ink-2); font-size: var(--fs-xs); line-height: 1.5; }
.logic-patterns b { color: var(--main-deep); font-weight: 900; }
.logic-patterns b::after { content: "："; color: var(--muted); }
.logic-tip-note { margin: 0; color: var(--muted); font-size: var(--fs-2xs); line-height: 1.55; }
.logic-rule { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-sm); overflow: hidden; }
.logic-rule > summary { min-height: var(--h-tap); list-style: none; display: flex; align-items: center; gap: 10px; padding: 13px 14px; cursor: pointer; }
.logic-rule > summary::-webkit-details-marker { display: none; }
.logic-rule > summary b { flex: 1; min-width: 0; font-size: var(--fs-base); font-weight: 800; }
.logic-tag { flex: none; min-width: 58px; padding: 5px 8px; border-radius: var(--r-pill); background: var(--main-tint); color: var(--main-deep); text-align: center; font-size: var(--fs-2xs); font-weight: 900; }
.logic-rule[open] > summary { border-bottom: 1px solid var(--line-soft); }
.logic-body { display: grid; gap: 9px; padding: 12px 14px 14px; }
.logic-line { display: grid; gap: 5px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--paper); }
.logic-line span { color: var(--main-deep); font-size: var(--fs-2xs); font-weight: 900; }
.logic-line p, .logic-line li { color: var(--ink-2); font-size: var(--fs-xs); line-height: 1.6; }
.logic-line.core { background: var(--good-tint); }
.logic-line.core span { color: var(--good); }
.logic-line.plain { background: var(--main-tint); }
.logic-line.plain span { color: var(--main-deep); }
.logic-line.trap { background: var(--bad-tint); }
.logic-line.trap span { color: var(--bad); }
.logic-line ul { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
.logic-examples { display: flex; flex-wrap: wrap; gap: 7px; }
.logic-examples span { padding: 5px 9px; border-radius: var(--r-pill); background: var(--main-tint); color: var(--main-deep); font-size: var(--fs-2xs); font-weight: 800; }
.logic-drills { display: grid; gap: 7px; padding: 10px 12px; border: 1px solid color-mix(in srgb, var(--accent) 18%, #fff); border-radius: var(--r-sm); background: color-mix(in srgb, var(--accent-tint) 48%, var(--surface)); }
.logic-drills > span { color: var(--accent-deep); font-size: var(--fs-2xs); font-weight: 900; }
.logic-drills p { margin: 0; color: var(--ink-2); font-size: var(--fs-xs); line-height: 1.55; }
.logic-drills b { color: var(--ink); font-weight: 900; }
.logic-drills b::after { content: "："; color: var(--muted); }
.logic-practice-btn { min-height: var(--h-tap); border: 0; border-radius: var(--r-md); background: linear-gradient(135deg, var(--main), var(--accent)); color: #fff; font-size: var(--fs-sm); font-weight: 900; box-shadow: var(--shadow-sm); }
.book-grid { display: grid; gap: 12px; }
.book-card { display: grid; gap: 9px; }
.book-card-head { display: grid; gap: 5px; }
.book-card-head span { width: fit-content; padding: 4px 8px; border-radius: var(--r-pill); background: var(--gold-tint); color: var(--gold-deep); font-size: var(--fs-2xs); font-weight: 900; }
.book-card-head b { color: var(--ink); font-size: var(--fs-base); font-weight: 900; line-height: 1.45; }
/* 白话入门：流程 + 术语词典 + 速查卡 */
.primer-flow { display: grid; gap: 8px; }
.primer-step { display: grid; grid-template-columns: 26px minmax(0, 1fr); column-gap: 10px; align-items: start; padding: 11px 12px; border-radius: var(--r-sm); background: var(--surface); border: 1px solid var(--line-soft); }
.primer-step > i { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--main); color: #fff; font-size: var(--fs-2xs); font-weight: 900; font-style: normal; }
.primer-step-main { display: grid; gap: 4px; min-width: 0; }
.primer-step-main b { color: var(--main-deep); font-size: var(--fs-sm); font-weight: 900; }
.primer-step-main p { color: var(--ink-2); font-size: var(--fs-xs); line-height: 1.7; }
.primer-step-terms { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 3px; }
.primer-step-terms span { padding: 3px 8px; border-radius: var(--r-pill); background: var(--main-tint); color: var(--main-deep); font-size: var(--fs-2xs); font-weight: 800; }
.primer-terms { display: grid; gap: 7px; }
.primer-term { border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--paper); overflow: hidden; }
.primer-term > summary { list-style: none; cursor: pointer; min-height: var(--h-sm); display: flex; align-items: center; gap: 8px; padding: 10px 12px; font-size: var(--fs-sm); font-weight: 800; color: var(--ink); }
.primer-term > summary::-webkit-details-marker { display: none; }
.primer-term > summary::after { content: "＋"; margin-left: auto; color: var(--muted); font-weight: 900; }
.primer-term[open] > summary { color: var(--main-deep); border-bottom: 1px solid var(--line-soft); }
.primer-term[open] > summary::after { content: "－"; }
.primer-term p { margin: 0; padding: 11px 12px; color: var(--ink-2); font-size: var(--fs-xs); line-height: 1.75; }
.primer-block-body { padding: 10px 12px 12px; display: grid; gap: 8px; }
.primer-block-body > p { margin: 0; padding: 0; color: var(--ink-2); font-size: var(--fs-xs); line-height: 1.7; }
.primer-block-body ul { margin: 0; padding-left: 17px; display: grid; gap: 7px; }
.primer-block-body li { color: var(--ink-2); font-size: var(--fs-xs); line-height: 1.7; }
.question-term {
  color: inherit; font: inherit; font-weight: inherit; line-height: inherit;
  text-decoration-line: underline; text-decoration-style: dotted;
  text-decoration-color: color-mix(in srgb, var(--main) 38%, transparent);
  text-decoration-thickness: 1px; text-underline-offset: 3px;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.question-term:focus-visible { outline: 2px solid color-mix(in srgb, var(--main) 32%, transparent); outline-offset: 2px; }
.question-term:active { color: var(--main-deep); }
@media (min-width: 768px) { .g-cards { grid-template-columns: repeat(3, 1fr); } }

/* ============ 底部导航 ============ */
.bottom-nav {
  position: fixed; left: 50%; bottom: 0; z-index: 12; transform: translateX(-50%);
  width: 100%; height: calc(var(--h-nav) + env(safe-area-inset-bottom));
  padding: var(--sp-2) var(--sp-2) calc(var(--sp-2) + env(safe-area-inset-bottom));
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px;
  background: color-mix(in srgb, var(--surface) 92%, transparent); border-top: 1px solid var(--line); backdrop-filter: blur(18px); box-shadow: 0 -8px 24px rgba(12, 30, 50, .06);
}
.phone-shell[data-exam-selected="false"] .bottom-nav { display: none; }
.bottom-nav button { min-height: 48px; border: 0; border-radius: var(--r-md); background: transparent; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--muted); padding: 6px 2px; }
.bottom-nav button.active { color: var(--main-deep); background: var(--main-tint); }
.bottom-nav svg { width: 23px; height: 23px; display: block; }
.bottom-nav button.active svg { stroke-width: 2.2; }
.bottom-nav span { font-size: var(--fs-2xs); line-height: 1; font-weight: 700; }

/* ============ 弹窗 / 底部卡片 ============ */
dialog { width: min(calc(100vw - 32px), 380px); margin: auto; padding: 0; border: 0; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-lg); color: var(--ink); }
dialog::backdrop { background: rgba(12, 24, 40, .42); backdrop-filter: blur(3px); }
dialog h2 { font-size: var(--fs-lg); line-height: 1.2; color: var(--deep); }
dialog p { color: var(--muted); line-height: 1.55; }
dialog label { display: grid; gap: 6px; color: var(--ink-2); font-size: var(--fs-xs); font-weight: 700; }
.dialog-head, .sheet-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--sp-3); }
.dialog-head h2, .sheet-title-row h2 { min-width: 0; }
.dialog-close, .sheet-close { width: 38px; min-width: 38px; height: 38px; min-height: 38px; padding: 0; border-radius: 50%; border-color: var(--line); background: var(--paper); color: var(--muted); font-size: 22px; font-weight: 600; flex-shrink: 0; }
.message-dialog form, .auth-dialog form { padding: var(--sp-5) var(--sp-4) var(--sp-4); display: grid; gap: var(--sp-3); }
.message-dialog #messageBody { color: var(--ink-2); font-size: var(--fs-base); }
.message-dialog.term-dialog form { max-height: calc(100svh - 28px); padding: 18px 16px 14px; gap: 10px; }
.message-dialog.term-dialog .dialog-head { align-items: center; }
.message-dialog.term-dialog #messageBody { margin: 0; overflow-y: auto; color: var(--ink-2); font-size: var(--fs-sm); line-height: 1.58; }
.message-dialog.term-dialog .primary { min-height: 44px; }
.auth-dialog input[type="text"], .auth-dialog input[type="tel"], .auth-dialog input[type="password"] {
  appearance: none; -webkit-appearance: none;
  min-height: var(--h-tap); width: 100%; padding: 0 var(--sp-3);
  border: 1.5px solid var(--line); border-radius: var(--r-md);
  background: var(--paper); color: var(--ink); box-shadow: inset 0 1px 0 rgba(255,255,255,.75);
  font: inherit; font-size: var(--fs-base); font-weight: 750; line-height: 1.2;
  transition: border-color .18s ease, background-color .18s ease, box-shadow .18s ease;
}
.auth-dialog input[type="text"]:focus, .auth-dialog input[type="tel"]:focus, .auth-dialog input[type="password"]:focus {
  border-color: var(--main); background: #fff; box-shadow: 0 0 0 3px color-mix(in srgb, var(--main) 16%, transparent);
}
.auth-dialog input::placeholder { color: #9aa6b4; font-weight: 650; }
.dialog-status { min-height: 16px; margin: 0; color: var(--bad); font-size: var(--fs-xs); font-weight: 800; line-height: 1.35; }
.dialog-status:empty { display: none; }
.dialog-actions { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-2); }
.dialog-actions .wide { grid-column: 1 / -1; }
.content-admin-dialog { width: min(calc(100vw - 18px), 820px); max-height: min(92svh, 860px); overflow: hidden; }
.content-admin { max-height: inherit; padding: var(--sp-4); display: grid; gap: var(--sp-3); overflow-y: auto; }
.content-admin .dialog-head p { margin-top: 4px; font-size: var(--fs-xs); }
.content-admin-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--paper); position: sticky; top: 0; z-index: 2; }
.content-admin-tabs button { min-height: 36px; border: 0; border-radius: var(--r-pill); background: transparent; color: var(--muted); font-size: var(--fs-xs); font-weight: 800; }
.content-admin-tabs button.active { background: var(--surface); color: var(--main-deep); box-shadow: var(--shadow-sm); }
.content-admin-section { display: grid; gap: var(--sp-3); }
.content-question-results { max-height: 230px; overflow-y: auto; display: grid; gap: 8px; padding-right: 2px; }
.content-question-hit { padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); display: grid; gap: 3px; text-align: left; box-shadow: var(--shadow-sm); }
.content-question-hit.overridden { border-color: color-mix(in srgb, var(--gold) 45%, #fff); background: var(--gold-tint); }
.content-question-hit b { color: var(--main-deep); font-size: var(--fs-sm); }
.content-question-hit span { color: var(--muted); font-size: var(--fs-2xs); font-weight: 800; }
.content-question-hit p { margin: 0; color: var(--ink-2); font-size: var(--fs-xs); line-height: 1.45; }
.content-form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-2); }
.content-admin textarea { min-height: 96px; }
.content-admin #contentQuestionExplanation { min-height: 160px; }
.content-empty { margin: 0; padding: var(--sp-3); border: 1px dashed var(--line); border-radius: var(--r-md); color: var(--muted); background: var(--paper); font-size: var(--fs-xs); text-align: center; }
.content-revision-head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); }
.content-revision-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--sp-2); }
.content-revision-summary div { padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--paper); display: grid; gap: 2px; }
.content-revision-summary b { color: var(--main-deep); font-size: var(--fs-sm); }
.content-revision-summary span { color: var(--muted); font-size: var(--fs-2xs); font-weight: 800; }
.content-revision-list { display: grid; gap: var(--sp-2); }
.content-revision-item { padding: var(--sp-3); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); box-shadow: var(--shadow-sm); display: grid; gap: 6px; }
.content-revision-item div { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-2); }
.content-revision-item b { color: var(--main-deep); font-size: var(--fs-sm); }
.content-revision-item span, .content-revision-item small { color: var(--muted); font-size: var(--fs-2xs); font-weight: 700; }
.content-revision-item p { margin: 0; color: var(--ink-2); font-size: var(--fs-xs); }
@media (max-width: 640px) {
  .content-form-grid { grid-template-columns: 1fr 1fr; }
  .content-revision-item div { display: grid; }
}
.sheet-dialog { width: min(calc(100vw - 16px), 560px); max-height: min(86svh, 760px); margin: auto auto max(10px, env(safe-area-inset-bottom)); border-radius: var(--r-lg); overflow: hidden; }
.sheet-dialog form { max-height: inherit; padding: 0; display: flex; flex-direction: column; background: var(--surface); }
.sheet-head { padding: var(--sp-4); color: #fff; background: linear-gradient(135deg, var(--deep), var(--main)); }
.sheet-head h2 { color: #fff; }
.sheet-sub, .sheet-head p { margin-top: 6px; color: rgba(255, 255, 255, .8); font-size: var(--fs-xs); }
.sheet-close { border-color: rgba(255, 255, 255, .22); background: rgba(255, 255, 255, .14); color: #fff; }
.sheet-body { padding: var(--sp-4); display: grid; gap: var(--sp-3); overflow-y: auto; }
.sheet-actions { padding: var(--sp-3) var(--sp-4) max(var(--sp-4), env(safe-area-inset-bottom)); display: flex; gap: var(--sp-2); border-top: 1px solid var(--line-soft); background: var(--surface); }
.sheet-actions .btn, .sheet-actions button { min-height: var(--h-tap); border-radius: var(--r-md); }
.sheet-actions .primary { flex: 1; }
.sheet-actions .quiet { flex: 0 0 auto; min-width: 120px; }
.quiet { border-color: var(--line); background: var(--paper); color: var(--ink-2); font-weight: 700; }
.topic-list { padding: var(--sp-4); display: grid; gap: var(--sp-2); overflow-y: auto; }
.topic-list h3 { margin: var(--sp-2) 0 0; padding-top: var(--sp-3); border-top: 1px solid var(--line); color: var(--muted); font-size: var(--fs-sm); }
.topic-choice { min-height: 58px; padding: var(--sp-3); border: 1px solid var(--line); border-radius: var(--r-md); display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); background: var(--surface); box-shadow: var(--shadow-sm); }
.topic-choice span { min-width: 0; color: var(--ink); font-weight: 800; text-align: left; line-height: 1.35; }
.topic-choice small { flex-shrink: 0; color: var(--muted); font-size: var(--fs-xs); font-weight: 700; }
.topic-choice.active { border-color: var(--main); box-shadow: inset 0 0 0 1px var(--main); }
.topic-choice.active::after { content: "✓"; width: 26px; height: 26px; display: inline-grid; place-items: center; border-radius: 50%; color: #fff; background: var(--main); font-weight: 900; }
.topic-choice-primary { min-height: 66px; }
.topic-choice-special { border-color: color-mix(in srgb, var(--good) 40%, #fff); background: var(--good-tint); }
.sheet-dialog .wide { margin: 0 var(--sp-4) var(--sp-4); width: calc(100% - var(--sp-4) * 2); }
.field { display: grid; gap: 6px; }
.field-label { margin: 0; color: var(--ink-2); font-size: var(--fs-xs); font-weight: 800; }
.issue-guide { display: grid; gap: 3px; }
.issue-guide strong { color: var(--ink); font-size: var(--fs-sm); }
.issue-guide span { color: var(--muted); font-size: var(--fs-xs); line-height: 1.45; }
.issue-sheet .chip-group { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-2); }
.issue-sheet .chip { min-height: 70px; padding: 9px 34px 9px 12px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); color: var(--ink-2); display: grid; align-content: center; gap: 3px; position: relative; text-align: left; }
.issue-sheet .chip:last-child { grid-column: 1 / -1; min-height: 58px; }
.issue-sheet .chip span { font-size: var(--fs-xs); font-weight: 850; }
.issue-sheet .chip small { color: var(--muted); font-size: var(--fs-2xs); font-weight: 650; line-height: 1.4; }
.issue-sheet .chip::after { content: ""; width: 20px; height: 20px; border: 2px solid var(--line); border-radius: 50%; position: absolute; right: 14px; top: 50%; transform: translateY(-50%); }
.issue-sheet .chip.selected { border-color: var(--main); background: var(--main-tint); color: var(--main-deep); box-shadow: inset 0 0 0 1px var(--main); }
.issue-sheet .chip.selected small { color: var(--main-deep); }
.issue-sheet .chip.selected::after { border: 6px solid var(--main); background: #fff; }
.issue-sheet .field-label small { color: var(--muted); font-size: inherit; font-weight: 650; }
.issue-sheet textarea { min-height: 88px; resize: vertical; }
.issue-sheet .sheet-actions .primary:disabled { color: var(--muted); background: var(--paper); border-color: var(--line); box-shadow: none; }
.issue-question-label { color: var(--muted); font-size: var(--fs-xs); }

/* 头像可点更换 */
.home-avatar, .account-panel-me .settings-avatar { cursor: pointer; position: relative; }
.account-panel-me .settings-avatar::after {
  content: "✎"; position: absolute; right: -2px; bottom: -2px; width: 20px; height: 20px;
  display: grid; place-items: center; border-radius: 50%; background: var(--accent); color: #fff;
  font-size: 11px; box-shadow: 0 2px 6px rgba(20,38,60,.25); border: 2px solid var(--cream);
}
.account-panel-me .settings-avatar::after { border-color: var(--surface); }

/* 头像选择网格 */
.avatar-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--sp-2); }
.avatar-pick { width: 100%; aspect-ratio: 1; min-height: 0; padding: 0; overflow: hidden; border-radius: 50%; border: 2px solid transparent; background: var(--paper); box-shadow: var(--shadow-sm); }
.avatar-pick img { width: 100%; height: 100%; display: block; border-radius: inherit; object-fit: cover; }
.avatar-pick.selected { border-color: var(--main); box-shadow: 0 0 0 3px color-mix(in srgb, var(--main) 45%, transparent); }
.avatar-load-more { grid-column: 1 / -1; min-height: 42px; border-radius: var(--r-pill); background: var(--main-tint); color: var(--main-deep); box-shadow: none; }
@media (min-width: 480px) { .avatar-grid { grid-template-columns: repeat(6, 1fr); } }

/* ============ 响应式 ============ */
@media (min-width: 560px) {
  body { background: radial-gradient(120% 60% at 50% -10%, #dde7f1, transparent 60%), #e4eaf2; }
  .phone-shell {
    width: min(calc(100vw - var(--frame-gap) * 2), var(--app-frame-width));
    min-height: calc(100svh - var(--frame-gap) * 2); margin: var(--frame-gap) auto;
    border: 1px solid rgba(13, 59, 99, .1); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); overflow: hidden;
  }
  .phone-shell[data-auth="guest"] { min-height: calc(100svh - var(--frame-gap) * 2); }
  .bottom-nav { left: 50%; bottom: var(--frame-gap); width: min(calc(100vw - var(--frame-gap) * 2), var(--app-frame-width)); border: 1px solid var(--line); border-radius: var(--r-lg); }
  dialog { position: fixed; }
}
@media (min-width: 768px) {
  .exam-dashboard {
    grid-template-columns: minmax(0, 1.08fr) minmax(300px, .92fr);
    align-items: start;
  }
  .home-greet, .lic-hero, .home-sect, .home-cta { grid-column: 1; }
  .home-list { grid-column: 2; grid-row: 1 / span 5; grid-template-columns: 1fr; align-self: stretch; }
  .schedule-panel { grid-column: 1 / -1; grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .schedule-panel a { grid-column: auto; }
  .schedule-note { grid-column: 1 / -1; }
  .license-gate { grid-template-columns: minmax(0, 1.1fr) minmax(280px, .9fr); align-items: stretch; }
  .gate-hero { min-height: 100%; }
  .exam-entry-grid, .info-strip { grid-column: 2; }
  .question-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .list-open span { -webkit-line-clamp: 3; line-clamp: 3; }
  .guide-content, .mindset-content { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .guide-content > .g-card:first-child,
  .guide-content > .g-part:first-child,
  .mindset-content > .g-card:first-child,
  .mindset-content > .panel:first-child { grid-column: 1 / -1; }
  .options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .login-name-grid { grid-template-columns: repeat(4, 1fr); max-height: 300px; }
}
@media (min-width: 960px) {
  .phone-shell {
    border-radius: 18px;
  }
  .page {
    padding-left: var(--edge);
    padding-right: var(--edge);
  }
  .home-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .phone-shell[data-tab="practice"] #practicePage.page.active {
    grid-template-columns: minmax(0, 1fr) minmax(310px, .72fr);
    align-items: start;
  }
  .practice-top, .mock-meta, .reference-card, .case-noattach, .question-title { grid-column: 1; }
  .options, .answer-panel, .answer-dock { grid-column: 2; }
  .options { position: sticky; top: calc(env(safe-area-inset-top) + 64px); grid-template-columns: 1fr; }
  .answer-dock { bottom: calc(var(--h-nav) + var(--frame-gap) + env(safe-area-inset-bottom) + 8px); }
  .reference-content table { font-size: calc(var(--fs-sm) * var(--font-zoom)); }
  .g-cards { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 1180px) {
  .question-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .guide-content, .mindset-content { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .guide-content > .g-card:first-child,
  .guide-content > .g-part:first-child,
  .mindset-content > .g-card:first-child,
  .mindset-content > .panel:first-child { grid-column: span 2; }
}
@media (hover: hover) and (pointer: fine) and (min-width: 900px) {
  :root {
    --edge: 20px;
    --app-frame-width: 1040px;
    --desktop-nav-w: 74px;
  }
  body { background: #eef3f8; }
  .phone-shell {
    width: min(calc(100vw - 48px), var(--app-frame-width));
    min-height: calc(100svh - 36px);
    margin: 18px auto;
    border-radius: 20px;
    overflow: visible;
  }
  .page {
    padding-left: calc(var(--desktop-nav-w) + var(--edge) + 12px);
    padding-right: var(--edge);
    padding-bottom: 28px;
  }
  .phone-shell[data-tab="practice"] .page,
  .phone-shell[data-tab="wrong"] .page,
  .phone-shell[data-tab="stats"] .page,
  .phone-shell[data-tab="settings"] .page,
  .phone-shell[data-tab="mindset"] .page,
  .phone-shell[data-exam-selected="true"][data-tab="home"] #homePage {
    padding-top: 20px;
  }
  .bottom-nav {
    left: calc(50% - min(calc(100vw - 48px), var(--app-frame-width)) / 2 + 18px);
    top: 36px;
    bottom: 36px;
    transform: none;
    width: var(--desktop-nav-w);
    height: auto;
    padding: 8px;
    grid-template-columns: 1fr;
    grid-template-rows: repeat(4, minmax(0, 1fr));
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow-md);
  }
  .bottom-nav button {
    min-height: 0;
    border-radius: 14px;
    padding: 8px 4px;
  }
  .bottom-nav span { font-size: 11px; }
  .exam-dashboard { grid-template-columns: minmax(0, .92fr) minmax(300px, .82fr); }
  .home-list { grid-template-columns: 1fr; }
  .lic-hero { padding: 18px; }
  .lic-hero h2 { font-size: 30px; }
  .lic-frost { margin-top: 14px; }
  .home-row { min-height: 78px; padding: 12px 14px; }
  .schedule-panel { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .phone-shell[data-tab="practice"] #practicePage.page.active {
    grid-template-columns: minmax(0, 1fr) minmax(300px, .7fr);
    column-gap: 12px;
  }
  .phone-shell[data-tab="practice"] .reference-card,
  .phone-shell[data-tab="practice"] .case-noattach {
    grid-column: 1 / -1;
  }
.question-title { font-size: calc(18px * var(--font-zoom)); }
  .option { min-height: 50px; }
  .answer-dock {
    bottom: 18px;
    background: linear-gradient(180deg, rgba(239,243,248,0), var(--cream) 34%);
  }
}
@media (hover: hover) and (pointer: fine) and (min-width: 900px) {
  :root {
    --edge: 20px;
    --app-frame-width: 960px;
  }
  .phone-shell {
    width: min(calc(100vw - 48px), var(--app-frame-width));
    overflow: hidden;
  }
  .page {
    padding-left: var(--edge);
    padding-right: var(--edge);
    padding-bottom: calc(var(--h-nav) + env(safe-area-inset-bottom) + 18px);
  }
  .phone-shell[data-tab="practice"] .page,
  .phone-shell[data-tab="wrong"] .page,
  .phone-shell[data-tab="stats"] .page,
  .phone-shell[data-tab="settings"] .page,
  .phone-shell[data-tab="mindset"] .page,
  .phone-shell[data-exam-selected="true"][data-tab="home"] #homePage {
    padding-top: 20px;
  }
  .bottom-nav {
    left: 50%;
    top: auto;
    bottom: var(--frame-gap);
    transform: translateX(-50%);
    width: min(calc(100vw - 48px), var(--app-frame-width));
    height: calc(var(--h-nav) + env(safe-area-inset-bottom));
    padding: var(--sp-2) var(--sp-2) calc(var(--sp-2) + env(safe-area-inset-bottom));
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-template-rows: none;
    border-radius: var(--r-lg);
  }
  .bottom-nav button {
    min-height: 48px;
    padding: 6px 2px;
  }
  .exam-dashboard { grid-template-columns: 1fr; }
  .home-greet, .lic-hero, .home-sect, .home-cta, .home-list, .schedule-panel { grid-column: 1; grid-row: auto; }
  .home-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .phone-shell[data-tab="practice"] #practicePage.page.active {
    grid-template-columns: 1fr;
  }
  .practice-top, .mock-meta, .reference-card, .case-noattach,
  .question-title, .options, .answer-panel, .answer-dock {
    grid-column: 1;
  }
  .options {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .answer-dock {
    bottom: calc(var(--h-nav) + var(--frame-gap) + env(safe-area-inset-bottom) + 8px);
  }
}
@media (max-width: 350px) {
  .schedule-panel { grid-template-columns: 1fr; }
  .info-strip { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
.sqe-focus-note {
  margin: 14px 0 18px;
  padding: 15px 16px;
  border: 1px solid rgba(0, 147, 125, 0.2);
  border-radius: 16px;
  background: rgba(0, 147, 125, 0.07);
}
.sqe-focus-note strong { color: #076b5d; }
.sqe-focus-note p { margin: 7px 0 4px; line-height: 1.55; }
.sqe-focus-note small { color: var(--muted, #687682); line-height: 1.45; }
.mock-paper-list { min-height: 0; gap: 10px; }
.mock-paper-option {
  width: 100%; min-height: 72px; padding: 12px 14px; display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 22px; gap: 12px; align-items: center;
  border: 1px solid var(--line-soft); border-radius: var(--r-md); background: var(--surface);
  color: var(--text); text-align: left;
}
.mock-paper-option > span {
  width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px;
  background: var(--main-tint); color: var(--main-deep); font-weight: 850;
}
.mock-paper-option div { display: grid; gap: 4px; }
.mock-paper-option b { font-size: var(--fs-md); }
.mock-paper-option small { color: var(--muted); line-height: 1.4; }
.mock-paper-option svg { width: 20px; height: 20px; color: var(--muted); }
.mock-paper-hint { flex: none; margin: 0; padding: 8px var(--sp-4) max(var(--sp-4), env(safe-area-inset-bottom)); border-top: 1px solid var(--line-soft); background: var(--surface); color: var(--muted); font-size: var(--fs-xs); line-height: 1.55; }
.message-dialog #messageBody { white-space: pre-line; }
.focus-mode [data-dashboard-action="realexam"],
.focus-mode [data-dashboard-action="casebank"] { display: none !important; }
.sqe-only-mode #heroExamSwitch,
.sqe-only-mode .license-toggle,
.sqe-only-mode #licenseGate { display: none !important; }

/* ============ 金榜苑 · 已选手机 H5 定稿还原 ============ */
@media (min-width: 560px) {
  :root { --app-frame-width: 480px; }
  .phone-shell { width: min(calc(100vw - 28px), 480px); }
  .bottom-nav { width: min(calc(100vw - 28px), 480px); }
}

.phone-shell[data-exam-selected="true"][data-tab="home"] #homePage {
  padding-top: 0;
}
.exam-dashboard { gap: 14px; }
.home-greet {
  min-height: 218px;
  margin: 0 calc(var(--edge) * -1) -54px;
  padding: calc(env(safe-area-inset-top) + 20px) 20px 74px;
  border-radius: 0;
  gap: 26px;
  box-shadow: none;
  background:
    linear-gradient(90deg, rgba(3,48,41,.94) 0%, rgba(3,62,51,.72) 48%, rgba(3,49,42,.22) 100%),
    url("./assets/jinbangyuan-harbour-960.jpg?v=20260904-jinbang81") 61% 50% / cover no-repeat;
}
.home-brand .brand-mark {
  width: 48px; height: 48px; border: 0; border-radius: 15px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.6);
}
.home-brand strong { font-size: 21px; }
.home-brand small { margin-top: 3px; font-size: 10px; letter-spacing: .12em; }
.home-greet-main { justify-content: flex-start; align-items: flex-end; }
.home-greet .greet-who { font-size: 28px; letter-spacing: -.03em; }

.lic-hero {
  z-index: 2; min-height: 0; padding: 21px; color: var(--ink);
  border: 1px solid rgba(209,164,90,.42); border-radius: 23px;
  background: var(--paper); box-shadow: 0 14px 34px rgba(11,60,45,.09);
}
.lic-hero::after {
  content: ""; position: absolute; inset: -1px auto auto 24px;
  width: 74px; height: 3px; border-radius: 3px; background: var(--gold); filter: none;
}
.lic-hero-top { align-items: center; }
.lic-hero h2 { color: var(--ink); font-size: 15px; font-weight: 800; }
.lic-sub { margin-top: 0; color: var(--main); font-size: 12px; font-weight: 750; }
.lic-swap { color: var(--main); background: var(--main-tint); }
.lic-progress-main {
  margin-top: 18px; display: grid; grid-template-columns: minmax(0,1fr) 112px;
  gap: 16px; align-items: center;
}
.lic-progress-number { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.lic-progress-number strong {
  color: #101512; font-size: clamp(48px, 14vw, 58px); line-height: .95;
  font-weight: 850; letter-spacing: -.065em; font-variant-numeric: tabular-nums;
}
.lic-progress-number span { color: var(--muted); font-size: 20px; font-weight: 650; white-space: nowrap; }
.lic-progress-copy small { display: block; margin-top: 8px; color: var(--muted); font-size: 12px; }
.lic-progress-ring {
  width: 108px; height: 108px; padding: 10px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: conic-gradient(var(--main) var(--progress-angle), var(--main-tint) 0);
}
.lic-progress-ring::before { inset: 10px; background: var(--paper); box-shadow: none; }
.lic-progress-ring strong { color: var(--ink); font-size: 27px; }
.lic-progress-ring span { margin-top: 2px; color: var(--muted); font-size: 10px; }
.lic-frost { margin-top: 20px; padding-top: 17px; border-top: 1px solid var(--line); }
.frost-tri { grid-template-columns: repeat(3, minmax(0,1fr)); }
.frost-tri div { min-height: 52px; }
.frost-tri div + div { border-left: 1px solid var(--line); }
.frost-tri b { color: var(--main); font-size: 23px; }
.frost-tri span { color: var(--muted); font-size: 11px; }
.frost-tri .today-metric b { color: var(--gold); }
.lic-hero .home-cta {
  min-height: 54px; margin-top: 19px; border-radius: 15px;
  background: var(--main); box-shadow: 0 9px 18px rgba(5,127,71,.2);
  font-size: 18px;
}
.lic-hero .home-cta svg { width: 20px; height: 20px; padding: 0; color: #fff; background: transparent; }

.home-mode-head { margin: 3px 4px -5px; display: flex; align-items: baseline; gap: 10px; }
.home-mode-head h2 { font-size: 14px; }
.home-list { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.home-row {
  min-height: 102px; padding: 15px; border: 1px solid var(--line); border-radius: 18px;
  display: grid; grid-template-columns: 1fr; align-content: center; justify-items: start;
  gap: 0; background: var(--paper); box-shadow: 0 8px 22px rgba(11,60,45,.045); text-align: left;
}
.home-row .row-tx b { display: block; padding: 0; font-size: 15px; white-space: nowrap; }
.home-row .row-tx small { display: block; margin-top: 7px; padding-right: 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.home-row .row-go { position: static; right: auto; top: auto; transform: none; display: block; margin-top: 10px; color: var(--main); font-size: 11px; font-weight: 800; }
.home-row[data-dashboard-action="mock"] .row-go { color: var(--gold); }

.schedule-panel {
  margin-top: 0; padding: 19px; border-radius: 22px; background: var(--paper);
  box-shadow: 0 10px 25px rgba(11,60,45,.05);
}
.schedule-panel div { background: transparent; }
.schedule-panel a { min-height: 48px; border-radius: 15px; font-size: 16px; }

@media (min-width: 768px) {
  .exam-dashboard, .license-gate { grid-template-columns: 1fr; }
  .home-greet, .lic-hero, .home-list, .schedule-panel,
  .exam-entry-grid, .info-strip { grid-column: 1; grid-row: auto; }
  .home-list { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .schedule-panel { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .schedule-panel a, .schedule-note { grid-column: 1 / -1; }
  .question-list, .guide-content, .mindset-content, .options { grid-template-columns: 1fr; }
  .guide-content > .g-card:first-child,
  .guide-content > .g-part:first-child,
  .mindset-content > .g-card:first-child,
  .mindset-content > .panel:first-child { grid-column: 1; }
}

@media (min-width: 560px) {
  .home-greet { border-radius: 18px 18px 0 0; }
}

@media (max-width: 370px) {
  .home-profile { padding-right: 8px; gap: 5px; }
  .home-row .row-tx b { font-size: 14px; }
  .lic-progress-main { grid-template-columns: minmax(0,1fr) 98px; }
  .lic-progress-ring { width: 98px; height: 98px; }
  .schedule-panel strong { font-size: 12px; }
}

/* ============ 2026-08 全站统一：复习仪表盘视觉系统 ============ */
.phone-shell[data-tab="wrong"] .page,
.phone-shell[data-tab="stats"] .page,
.phone-shell[data-tab="settings"] .page,
.phone-shell[data-tab="mindset"] .page {
  gap: 13px;
  padding-top: calc(env(safe-area-inset-top) + 12px);
  background: var(--cream);
}

.screen-title {
  min-height: 112px;
  padding: 14px 82px 14px 4px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  align-content: center;
  gap: 9px;
  overflow: visible;
}
.screen-title::before { display: none; }
.screen-title::after { display: none; }
.screen-mark {
  position: absolute;
  right: 3px;
  top: 50%;
  transform: translateY(-50%);
  width: 58px;
  height: 58px;
  border: 1px solid rgba(255,255,255,.8);
  border-radius: 18px;
  object-fit: cover;
  box-shadow: 0 10px 24px rgba(5,84,63,.14);
}
.screen-title .eyebrow {
  color: var(--main-deep);
  font-size: 14px;
  font-weight: 850;
}
.screen-title h2 {
  color: var(--deep);
  font-size: clamp(31px, 9vw, 38px);
  line-height: 1.08;
  font-weight: 850;
  letter-spacing: -.035em;
  text-wrap: balance;
}

.task-board {
  position: relative;
  min-width: 0;
  padding: 21px 19px 22px;
  display: grid;
  gap: 18px;
  border: 1px solid rgba(209,164,90,.42);
  border-radius: 24px;
  background: var(--paper);
  box-shadow: 0 14px 34px rgba(11,60,45,.075);
  overflow: hidden;
}
.task-board::before {
  content: "";
  position: absolute;
  left: 24px;
  top: 0;
  width: 72px;
  height: 3px;
  border-radius: 0 0 4px 4px;
  background: var(--gold);
}
.task-board-head {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.task-board-head > div { min-width: 0; }
.task-board-head h3 {
  color: #131b17;
  font-size: 20px;
  font-weight: 850;
  letter-spacing: -.02em;
}
.task-board-head p {
  margin-top: 5px;
  color: var(--main);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.45;
}
.board-count {
  min-height: 32px;
  padding: 0 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border-radius: var(--r-pill);
  background: var(--main-tint);
  color: var(--main-deep);
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}
.board-count b { font-size: 16px; }

.wrong-board {
  padding: 17px;
  gap: 13px;
}
.wrong-summary {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.wrong-summary-main,
.wrong-summary-status { display: flex; align-items: baseline; gap: 5px; }
.wrong-summary-main strong {
  color: #101512;
  font-size: 30px;
  line-height: 1;
  font-weight: 850;
  letter-spacing: -.045em;
  font-variant-numeric: tabular-nums;
}
.wrong-summary-main span,
.wrong-summary-status span { color: var(--muted); font-size: 12px; font-weight: 700; }
.wrong-summary-status strong { color: var(--main); font-size: 17px; line-height: 1; }

.board-control-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 10px;
}
.wrong-filter {
  width: 100%;
  display: grid;
  gap: 6px;
  color: var(--ink);
  font-size: 11px;
  font-weight: 800;
  white-space: normal;
}
.wrong-filter select {
  width: 100%;
  min-height: 42px;
  padding: 0 30px 0 11px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background-color: #fff;
  font-size: 13px;
  font-weight: 750;
}
.board-primary {
  width: 100%;
  min-height: 50px;
  border-radius: 14px;
  background: var(--main);
  font-size: 16px;
  font-weight: 850;
  box-shadow: 0 8px 16px rgba(5,127,71,.16);
}
.board-list:empty { display: none; }
.board-list { padding-top: 2px; }
.wrong-board .progress-card {
  min-height: 158px;
  padding: 82px 18px 18px;
  border: 0;
  border-top: 1px solid var(--line-soft);
  border-radius: 0;
  background: url("./assets/jinbangyuan-mark-256.jpg?v=20260904-jinbang81") center 26px / 46px 46px no-repeat;
  box-shadow: none;
}
.wrong-board .progress-card .subtle { color: var(--muted); font-size: 13px; }
.wrong-board .list-row { padding-top: 10px; border-top: 1px solid var(--line-soft); }
.wrong-board .list-open { border-radius: 15px; background: #fff; box-shadow: none; }
.wrong-board .mini-action { min-height: 44px; border-radius: 14px; }

.phone-shell[data-tab="wrong"] .screen-title {
  min-height: 84px;
  padding-top: 8px;
  padding-bottom: 8px;
}
.phone-shell[data-tab="wrong"] .screen-title h2 { font-size: clamp(27px, 7.8vw, 32px); }
.phone-shell[data-tab="wrong"] .screen-mark { width: 50px; height: 50px; border-radius: 16px; }

.wrong-topic-group { display: grid; gap: 9px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.wrong-topic-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.wrong-topic-head div { min-width: 0; display: grid; gap: 3px; }
.wrong-topic-head b { color: var(--deep); font-size: 14px; line-height: 1.35; }
.wrong-topic-head small { color: var(--muted); font-size: 11px; }
.wrong-topic-head button { min-height: 38px; padding: 0 12px; border-radius: 12px; color: var(--main-deep); background: var(--main-tint); font-size: 12px; font-weight: 800; }
.mastery-badge { align-self: center; padding: 5px 8px; border-radius: 999px; color: var(--muted); background: var(--paper); font-size: 10px; font-weight: 800; white-space: nowrap; }
.mastery-badge { font-style: normal; }
.mastery-badge.conquered { color: var(--main-deep); background: var(--main-tint); }

.learning-insight-board, .weakness-board { gap: 14px; }
.insight-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.insight-head p { margin: 0 0 3px; }
.insight-head h3 { margin: 0; color: var(--deep); font-size: 20px; }
.insight-head > span { color: var(--muted); font-size: 11px; font-weight: 800; }
.trend-badge { padding: 6px 9px; border-radius: 999px; background: var(--paper); }
.trend-badge.up { color: var(--main-deep); background: var(--main-tint); }
.trend-badge.down { color: #a04b32; background: #fff0ea; }
.insight-metrics { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); border: 1px solid var(--line-soft); border-radius: 15px; overflow: hidden; background: #fff; }
.insight-metrics div { min-width: 0; padding: 13px 5px; display: grid; gap: 5px; text-align: center; }
.insight-metrics div + div { border-left: 1px solid var(--line-soft); }
.insight-metrics b { color: var(--main-deep); font-size: 21px; }
.insight-metrics span { color: var(--muted); font-size: 10.5px; }
.insight-empty { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.weakness-list { display: grid; gap: 10px; }
.weakness-item { padding: 13px; display: grid; gap: 10px; border: 1px solid var(--line-soft); border-radius: 15px; background: #fff; }
.weakness-item-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.weakness-item-head b { color: var(--ink); font-size: 14px; line-height: 1.4; }
.weakness-item-head span { flex: none; color: #a04b32; font-size: 13px; font-weight: 900; }
.weakness-item p { margin: 0; color: var(--muted); font-size: 11.5px; line-height: 1.5; }
.weakness-actions { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; }
.weakness-actions button { min-height: 40px; border-radius: 12px; font-size: 11.5px; font-weight: 800; }
.weakness-actions .guide-jump { justify-content: flex-start; padding: 0 11px; overflow: hidden; color: var(--main-deep); background: var(--main-tint); text-overflow: ellipsis; white-space: nowrap; }
.weakness-actions .topic-drill { padding: 0 11px; color: #fff; background: var(--main); }
.confusion-link { color: #9a6810; background: #fff5db; }

.difficulty-panel { margin: 0 var(--sp-4); padding: 14px; display: grid; gap: 11px; border: 1px solid var(--line-soft); border-radius: 16px; background: var(--paper); }
.difficulty-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.difficulty-head div { display: grid; gap: 2px; }
.difficulty-head b { color: var(--deep); font-size: 14px; }
.difficulty-head span, .difficulty-head small { color: var(--muted); font-size: 10.5px; }
.difficulty-presets { display: flex; gap: 7px; overflow-x: auto; scrollbar-width: none; }
.difficulty-presets::-webkit-scrollbar { display: none; }
.difficulty-presets button { flex: none; min-height: 36px; padding: 0 11px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--muted); font-size: 11.5px; font-weight: 800; }
.difficulty-presets button.active { color: #fff; border-color: var(--main); background: var(--main); }
.difficulty-custom { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
.difficulty-custom label { display: grid; grid-template-columns: auto minmax(0,1fr); align-items: center; gap: 5px; color: var(--ink); font-size: 12px; font-weight: 800; }
.difficulty-custom input { width: 100%; min-height: 40px; padding: 0 6px; text-align: center; }
.difficulty-custom p { grid-column: 1/-1; margin: 0; color: var(--muted); font-size: 11px; text-align: right; }

.settings-group-label {
  margin: 7px 0 -8px;
  padding-left: 5px;
  color: var(--main-deep);
  font-size: 12px;
  font-weight: 850;
}
.set-card {
  border-color: rgba(209,164,90,.28);
  border-radius: 20px;
  background: var(--paper);
  box-shadow: 0 10px 28px rgba(11,60,45,.055);
}
.set-row { min-height: 74px; padding: 15px 16px; }
.set-row .set-ic { border-radius: 13px; background: #fff; box-shadow: inset 0 0 0 1px var(--line-soft); }
.set-row .set-av { width: 46px; height: 46px; }
.set-row .set-tx b { font-size: 14.5px; font-weight: 800; }
.set-row .set-tx span { margin-top: 3px; font-size: 11px; line-height: 1.45; }
.set-pill { min-height: 38px; padding: 0 13px; border-radius: 12px; box-shadow: none; }
.set-jump input { background: #fff; }

.guide-board { gap: 15px; }
.guide-board .guide-nav { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.guide-nav { gap: 7px; }
.guide-nav button {
  min-height: 42px;
  padding: 0 5px;
  border-radius: 13px;
  background: #fff;
  font-size: clamp(11px, 3.25vw, 13px);
  font-weight: 800;
}
.guide-nav button.active { background: var(--main); box-shadow: 0 7px 16px rgba(5,127,71,.16); }
.guide-content { gap: 12px; }
.g-card, .g-part, .logic-rule {
  border-color: rgba(209,164,90,.28);
  border-radius: 20px;
  background: var(--paper);
  box-shadow: 0 9px 25px rgba(11,60,45,.05);
}
.g-card { padding: 18px; gap: 10px; }
.g-part > summary, .logic-rule > summary { min-height: 58px; padding: 15px 17px; }
.g-part-body, .logic-body { padding: 15px 17px 17px; }

.phone-shell[data-tab="practice"] #practicePage { gap: 10px; }
.practice-top {
  padding: 0 0 3px;
  border: 0;
  border-radius: 0;
  background: linear-gradient(180deg, var(--cream) 78%, transparent);
  box-shadow: none;
}
.practice-top .ptop-btn { border-radius: 12px; background: #fff; }
.question-title {
  padding: 17px 14px;
  border-color: rgba(209,164,90,.32);
  border-radius: 20px;
  background: var(--paper);
  box-shadow: none;
}
.option { min-height: 54px; border-radius: 17px; background: #fff; box-shadow: none; }
.answer-panel { border-radius: 20px; background: var(--paper); }
.answer-dock { gap: 8px; }
.answer-dock button { min-height: 52px; border-radius: 15px; }

.bottom-nav { background: rgba(255,250,245,.95); border-top-color: rgba(209,164,90,.24); }
.bottom-nav button { border-radius: 13px; }
.bottom-nav button.active { color: var(--main-deep); background: transparent; }
.bottom-nav button.active::before {
  content: "";
  width: 22px;
  height: 3px;
  margin-bottom: -2px;
  border-radius: 3px;
  background: var(--gold);
}

@media (max-width: 370px) {
  .screen-title { min-height: 104px; padding-right: 72px; }
  .screen-mark { width: 54px; height: 54px; border-radius: 17px; }
  .screen-title h2 { font-size: 29px; }
  .task-board { padding: 19px 16px 20px; border-radius: 21px; }
  .guide-nav { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

/* 首页头部统一为单一暖白底；收紧品牌与问候间距，头像自然融入右上角。 */
.home-greet {
  min-height: 0;
  margin-bottom: -8px;
  padding: calc(env(safe-area-inset-top) + 10px) 20px 12px;
  align-content: start;
  gap: 7px;
  color: var(--ink);
  background: var(--cream);
}
.home-greet-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}
.home-brand strong,
.home-greet .greet-who { color: var(--ink); }
.home-greet .greet-who { font-size: 26px; line-height: 1.08; }
.home-brand small { color: var(--ink-2); }
.home-greet .home-profile {
  width: 58px;
  min-height: 58px;
  padding: 4px;
  justify-content: center;
  border-color: transparent;
  background: transparent;
  color: var(--main-deep);
  box-shadow: none;
}
.home-greet .home-avatar {
  width: 48px;
  height: 48px;
  border-width: 2px;
  border-color: color-mix(in srgb, var(--main) 12%, var(--cream));
  box-shadow: 0 2px 8px rgba(11, 60, 45, .08);
}

@media (max-width: 370px) {
  .home-greet .home-profile { width: 54px; min-height: 54px; }
  .home-greet .home-avatar { width: 44px; height: 44px; }
}

.schedule-panel a {
  color: var(--main-deep);
  border: 1px solid rgba(5,127,71,.32);
  background: rgba(224,244,232,.52);
  box-shadow: none;
}

/* 全題庫搜尋：取代原成績頁，首次進入時才載入兩類牌照的題目與解析。 */
.search-page .screen-title { margin-bottom: 2px; }
.search-board { display: grid; gap: 14px; }
.bank-search-form { display: grid; gap: 9px; }
.bank-search-form > label { color: var(--ink); font-size: 15px; font-weight: 850; }
.bank-search-control { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; }
.bank-search-control input {
  min-width: 0; min-height: 48px; padding: 0 14px; border: 1px solid var(--line);
  border-radius: 14px; background: var(--paper); color: var(--ink); font-size: 16px;
}
.bank-search-control button {
  min-height: 48px; padding: 0 17px; border-radius: 14px;
  color: #fff; background: var(--main); font-size: 15px; font-weight: 850;
}
.bank-search-status { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.bank-search-results {
  display: grid; gap: 9px; max-height: none; overflow: visible; padding-right: 0;
}
.bank-search-hit {
  width: 100%; padding: 13px 14px; border: 1px solid var(--line); border-radius: 15px;
  display: grid; gap: 5px; color: var(--ink); background: var(--paper); text-align: left;
}
.bank-search-hit span { color: var(--main); font-size: 11px; font-weight: 800; }
.bank-search-hit b { font-size: 14px; line-height: 1.4; }
.bank-search-hit p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.search-history-board {
  display: grid; gap: 13px; padding: 13px 0 2px; border-top: 1px solid var(--line-soft);
}
.search-history-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.search-history-head h3 { margin: 2px 0 0; font-size: 17px; }
.search-history-head button { min-height: 40px; padding: 0 12px; color: var(--main); background: transparent; font-size: 13px; font-weight: 800; }
.search-history-head button:disabled { color: var(--muted); opacity: .55; }
.bank-search-history { display: flex; flex-wrap: wrap; gap: 8px; }
.bank-search-history button {
  min-height: 40px; padding: 0 13px; border: 1px solid rgba(5,127,71,.24);
  border-radius: 999px; color: var(--main-deep); background: rgba(224,244,232,.52); font-size: 13px; font-weight: 750;
}
.search-history-empty { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }

/* 新手指南 v2：单页章节折叠、例题跳转与术语分组。 */
.guide-v2 { display: grid; gap: 12px; }
.guide-v2-chapter,
.guide-v2-section,
.guide-term { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); overflow: hidden; box-shadow: var(--shadow-sm); }
.guide-v2-chapter > summary,
.guide-v2-section > summary,
.guide-term > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 9px; min-height: var(--h-tap); padding: 13px 15px; color: var(--ink); font-weight: 850; line-height: 1.45; }
.guide-v2-chapter > summary::-webkit-details-marker,
.guide-v2-section > summary::-webkit-details-marker,
.guide-term > summary::-webkit-details-marker { display: none; }
.guide-v2-chapter > summary::after,
.guide-v2-section > summary::after,
.guide-term > summary::after { content: "＋"; margin-left: auto; color: var(--muted); font-weight: 900; }
.guide-v2-chapter[open] > summary::after,
.guide-v2-section[open] > summary::after,
.guide-term[open] > summary::after { content: "−"; }
.guide-v2-chapter > summary span { flex: none; padding: 4px 8px; border-radius: var(--r-pill); background: var(--main-tint); color: var(--main-deep); font-size: var(--fs-2xs); }
.guide-v2-chapter > summary b { font-size: var(--fs-base); }
.guide-v2-chapter-body,
.guide-v2-body,
.guide-term > div { display: grid; gap: 11px; padding: 14px 15px 16px; border-top: 1px solid var(--line-soft); }
.guide-location-link { border: 0; padding: 0; background: transparent; color: var(--main-deep); font: inherit; font-weight: 700; text-align: left; text-decoration: underline dotted; text-underline-offset: 3px; cursor: pointer; }
.guide-location-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }
.guide-location-highlight { animation: guide-location-pulse 1.8s ease-out; }
@keyframes guide-location-pulse { 0%, 35% { box-shadow: 0 0 0 4px rgba(209,164,90,.28); } 100% { box-shadow: 0 0 0 0 rgba(209,164,90,0); } }
.guide-v2-body { padding: 12px; }
.guide-v2-section { box-shadow: none; }
.guide-v2-section.depth-1 { margin-left: 8px; background: var(--paper); }
.guide-v2 p,
.guide-v2 li,
.guide-v2 blockquote { margin: 0; color: var(--ink-2); font-size: var(--fs-sm); line-height: 1.75; }
.guide-v2 ul,
.guide-v2 ol { margin: 0; padding-left: 21px; display: grid; gap: 7px; }
.guide-v2 blockquote { padding: 10px 12px; border-left: 3px solid var(--main); border-radius: 0 var(--r-sm) var(--r-sm) 0; background: var(--main-tint); }
.guide-table-wrap { max-width: 100%; overflow-x: auto; border: 1px solid var(--line-soft); border-radius: var(--r-sm); }
.guide-table-wrap table { width: 100%; min-width: 420px; border-collapse: collapse; font-size: var(--fs-xs); line-height: 1.55; }
.guide-table-wrap th,
.guide-table-wrap td { padding: 9px 10px; border-bottom: 1px solid var(--line-soft); border-right: 1px solid var(--line-soft); text-align: left; vertical-align: top; }
.guide-table-wrap th { background: var(--main-tint); color: var(--main-deep); font-weight: 850; }
.guide-example { display: grid; gap: 9px; padding: 13px; border: 1px solid color-mix(in srgb, var(--gold) 32%, var(--line)); border-radius: var(--r-sm); background: color-mix(in srgb, var(--gold-tint) 38%, var(--surface)); }
.guide-example-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.guide-example-head span { color: var(--gold-deep); font-size: var(--fs-2xs); font-weight: 900; }
.guide-example-head code { max-width: 70%; overflow-wrap: anywhere; color: var(--muted); font-size: 11px; }
.guide-example button { min-height: var(--h-tap); border: 0; border-radius: var(--r-sm); background: var(--main); color: #fff; font-weight: 850; }
.guide-glossary-group { display: grid; gap: 8px; }
.guide-glossary-group h3 { margin: 5px 0 0; color: var(--main-deep); font-size: var(--fs-base); }
.guide-term { border-radius: var(--r-sm); box-shadow: none; }
.guide-term > summary { font-size: var(--fs-sm); }
.guide-term > div { padding: 11px 12px 13px; }
