/* 刷题台组件（Material Design 3）。依赖 tokens.css。
   约定：颜色只用 --md-sys-* / --md-ext-*；圆角用形状令牌；深度靠色调层级，只有浮层有阴影。 */

/* ───────── 状态层：hover 8% / focus 10% / pressed 10% ───────── */
.btn, .chip, .seg button, .rail a, .navbar a, .subnav a, .mod, .sys, .hist-row, .opt, .num, .menu a, .menu button,
.icon-btn, .flag-btn, .material > summary, .rv > summary { position: relative; }
.btn::before, .chip::before, .seg button::before, .subnav a::before, .mod::before, .sys::before, .hist-row::before, .opt::before,
.num::before, .menu a::before, .menu button::before, .icon-btn::before, .flag-btn::before, .material > summary::before,
.rv > summary::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: currentColor;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--md-sys-motion-duration-short2) var(--md-sys-motion-easing-standard);
}
.btn:hover:not(:disabled)::before, .chip:hover::before, .seg button:hover::before, .subnav a:hover::before, .mod:hover::before, .sys:hover::before,
.hist-row:hover::before, .opt:hover:not(:disabled)::before, .num:hover::before, .menu a:hover::before,
.menu button:hover::before, .icon-btn:hover::before, .flag-btn:hover::before, .material > summary:hover::before,
.rv > summary:hover::before { opacity: var(--md-sys-state-hover); }
.btn:focus-visible::before, .chip:focus-visible::before, .seg button:focus-visible::before, .subnav a:focus-visible::before, .mod:focus-visible::before,
.sys:focus-visible::before, .hist-row:focus-visible::before, .opt:focus-visible::before, .num:focus-visible::before,
.icon-btn:focus-visible::before, .flag-btn:focus-visible::before { opacity: var(--md-sys-state-focus); }
.btn:active:not(:disabled)::before, .chip:active::before, .mod:active::before, .sys:active::before, .hist-row:active::before,
.opt:active:not(:disabled)::before, .num:active::before, .icon-btn:active::before, .flag-btn:active::before { opacity: var(--md-sys-state-pressed); }

/* 跳到内容：平时藏起来，Tab 聚焦时显出来 */
.skip-link { position: absolute; left: -9999px; top: var(--s-2); }
.skip-link:focus { left: var(--s-4); z-index: 100; padding: var(--s-3) var(--s-4); border-radius: var(--md-sys-shape-corner-small); background: var(--md-sys-color-inverse-surface); color: var(--md-sys-color-inverse-on-surface); font: var(--md-sys-typescale-label-large); }

/* ───────── 外壳：导航轨（≥600）/ 导航栏（<600）+ 顶部应用栏 ───────── */
.shell { display: flex; min-height: 100vh; }
.shell-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
#chrome { position: sticky; top: 0; z-index: 20; }

.appbar { background: var(--md-sys-color-surface); transition: background var(--md-sys-motion-duration-medium2) var(--md-sys-motion-easing-standard); }
.appbar.is-scrolled { background: var(--md-sys-color-surface-container); }
.appbar-inner { min-height: 64px; padding: 0 var(--s-4) 0 var(--s-5); display: flex; align-items: center; gap: var(--s-3); }
.appbar-title { min-width: 0; display: grid; }
.appbar-title strong { font: var(--md-sys-typescale-title-large); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.appbar-title small { font: var(--md-sys-typescale-body-small); color: var(--md-sys-color-on-surface-variant); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.appbar-end { margin-left: auto; display: flex; align-items: center; gap: var(--s-2); }
.brand { display: flex; align-items: center; gap: var(--s-3); min-width: 0; }
.brand-svg { color: var(--md-sys-color-primary); flex: none; }
.appbar-brand { display: none; }

.rail {
  flex: none; width: 80px; padding: var(--s-3) 0 var(--s-4);
  position: sticky; top: 0; height: 100vh; align-self: flex-start;
  display: flex; flex-direction: column; align-items: center; gap: var(--s-1);
  background: var(--md-sys-color-surface);
  border-right: 1px solid var(--md-sys-color-outline-variant);
}
.rail-brand { height: 56px; display: grid; place-items: center; margin-bottom: var(--s-2); }
.rail a, .navbar a {
  display: grid; justify-items: center; align-content: start; gap: var(--s-1);
  color: var(--md-sys-color-on-surface-variant);
  font: var(--md-sys-typescale-label-medium);
}
.rail a { width: 72px; padding: var(--s-2) 0 var(--s-3); border-radius: var(--md-sys-shape-corner-large); }
.nav-ind {
  width: 56px; height: 32px; display: grid; place-items: center;
  border-radius: var(--md-sys-shape-corner-full);
  transition: background var(--md-sys-motion-duration-short4) var(--md-sys-motion-easing-standard);
}
.rail a:hover .nav-ind, .navbar a:hover .nav-ind { background: color-mix(in srgb, var(--md-sys-color-on-surface) 8%, transparent); }
.rail a[aria-current="page"], .navbar a[aria-current="page"] { color: var(--md-sys-color-on-surface); }
.rail a[aria-current="page"] .nav-ind, .navbar a[aria-current="page"] .nav-ind { background: var(--md-sys-color-secondary-container); color: var(--md-sys-color-on-secondary-container); }
.rail a[aria-current="page"] .nav-label, .navbar a[aria-current="page"] .nav-label { font-weight: 700; }

.navbar { display: none; }
.navbar[hidden], .rail[hidden] { display: none !important; }

@media (max-width: 599px) {
  .rail { display: none; }
  .appbar-brand { display: flex; }
  .appbar-inner { padding: 0 var(--s-2) 0 var(--s-4); min-height: 56px; }
  .navbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 25;
    display: grid; grid-template-columns: repeat(5, 1fr);
    padding: var(--s-3) var(--s-2) calc(var(--s-4) + env(safe-area-inset-bottom));
    background: var(--md-sys-color-surface-container);
  }
  .navbar a { padding: 0; }
  .navbar .nav-ind { width: 64px; }
}

/* ───────── 页面 ───────── */
.page {
  width: min(1040px, 100% - 2 * var(--s-5));
  margin: 0 auto;
  padding: var(--s-5) 0 var(--s-8);
  display: grid; gap: var(--s-5); align-content: start;
}
.page--narrow { width: min(680px, 100% - 2 * var(--s-5)); }
.page-head { display: grid; gap: var(--s-2); }
.lead { font: var(--md-sys-typescale-body-large); color: var(--md-sys-color-on-surface-variant); max-width: 62ch; }
.muted { color: var(--md-sys-color-on-surface-variant); }
.row { display: flex; align-items: center; gap: var(--s-3); flex-wrap: wrap; }
.row--between { justify-content: space-between; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-3); margin-bottom: var(--s-3); }
.section-title h2 { font: var(--md-sys-typescale-title-medium); }
.section-title span { font: var(--md-sys-typescale-body-medium); color: var(--md-sys-color-on-surface-variant); }
@media (max-width: 599px) {
  .page { width: min(1040px, 100% - 2 * var(--s-4)); padding: var(--s-4) 0 calc(var(--s-8) + var(--s-7)); gap: var(--s-4); }
  h1 { font: var(--md-sys-typescale-headline-small); }
  .section-title { flex-direction: column; align-items: flex-start; gap: 2px; }
}

/* ───────── 按钮（全圆角 pill；点击区撑到 48px）───────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  height: 40px; padding: 0 var(--s-5);
  border: 1px solid var(--md-sys-color-outline); border-radius: var(--md-sys-shape-corner-full);
  background: transparent; color: var(--md-sys-color-primary);
  font: var(--md-sys-typescale-label-large); white-space: nowrap;
  transition: box-shadow var(--md-sys-motion-duration-short4) var(--md-sys-motion-easing-standard);
}
.btn::after { content: ""; position: absolute; inset: -4px 0; }
.btn .icon { width: 1.125rem; height: 1.125rem; }
.btn:disabled { color: color-mix(in srgb, var(--md-sys-color-on-surface) 38%, transparent); border-color: color-mix(in srgb, var(--md-sys-color-on-surface) 12%, transparent); background: transparent; }
.btn--primary { background: var(--md-sys-color-primary); border-color: transparent; color: var(--md-sys-color-on-primary); }
.btn--primary:hover:not(:disabled) { box-shadow: var(--md-sys-elevation-1); }
.btn--primary:disabled { background: color-mix(in srgb, var(--md-sys-color-on-surface) 12%, transparent); color: color-mix(in srgb, var(--md-sys-color-on-surface) 38%, transparent); border-color: transparent; }
.btn--tonal { background: var(--md-sys-color-secondary-container); border-color: transparent; color: var(--md-sys-color-on-secondary-container); }
.btn--ghost { border-color: transparent; padding: 0 var(--s-3); }
.btn--lg { height: 48px; padding: 0 var(--s-6); }
.btn--lg::after { inset: 0; }
.btn--block { width: 100%; }
.icon-btn {
  width: 40px; height: 40px; display: inline-grid; place-items: center; flex: none;
  border: 0; border-radius: var(--md-sys-shape-corner-full); background: transparent; color: var(--md-sys-color-on-surface-variant);
}
.icon-btn::after { content: ""; position: absolute; inset: -4px; }
.link { border: 0; background: none; padding: 0; color: var(--md-sys-color-primary); font: var(--md-sys-typescale-label-large); text-decoration: underline; text-underline-offset: 3px; }

/* ───────── 账号菜单 ───────── */
.usermenu { position: relative; }
.usermenu summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: var(--s-2); height: 40px; padding: 0 var(--s-1) 0 var(--s-3); border-radius: var(--md-sys-shape-corner-full); color: var(--md-sys-color-on-surface-variant); font: var(--md-sys-typescale-label-large); }
.usermenu summary::-webkit-details-marker { display: none; }
.usermenu summary:hover { background: color-mix(in srgb, var(--md-sys-color-on-surface) 8%, transparent); }
.avatar { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: var(--md-sys-color-primary-container); color: var(--md-sys-color-on-primary-container); font: var(--md-sys-typescale-title-small); text-transform: uppercase; }
.menu {
  position: absolute; right: 0; top: calc(100% + 4px); z-index: 30; min-width: 240px; padding: var(--s-2) 0;
  border-radius: var(--md-sys-shape-corner-medium); background: var(--md-sys-color-surface-container); box-shadow: var(--md-sys-elevation-2);
  display: grid;
}
.menu .menu-note { padding: var(--s-3) var(--s-4); font: var(--md-sys-typescale-body-medium); color: var(--md-sys-color-on-surface-variant); }
.menu .menu-note b { display: block; font: var(--md-sys-typescale-title-medium); color: var(--md-sys-color-on-surface); }
.menu a, .menu button { display: flex; align-items: center; gap: var(--s-3); min-height: 48px; padding: 0 var(--s-4); border: 0; background: transparent; text-align: left; font: var(--md-sys-typescale-label-large); color: var(--md-sys-color-on-surface); border-radius: 0; }
@media (max-width: 599px) { .usermenu summary .user-name { display: none; } .usermenu summary { padding: 0 var(--s-1); } }

/* ───────── 标签 / 筛选芯片 / 分段按钮 ───────── */
.tag {
  display: inline-flex; align-items: center; gap: var(--s-1); height: 24px; padding: 0 var(--s-2);
  border-radius: var(--md-sys-shape-corner-small); background: var(--md-sys-color-surface-container-high); color: var(--md-sys-color-on-surface-variant);
  font: var(--md-sys-typescale-label-medium); white-space: nowrap;
}
.tag .icon { width: 0.875rem; height: 0.875rem; }
.tag--official { background: var(--md-sys-color-tertiary-container); color: var(--md-sys-color-on-tertiary-container); }
.tag--ai { background: var(--md-ext-color-flag-container); color: var(--md-ext-color-on-flag-container); }
.tag--unknown { background: var(--md-sys-color-error-container); color: var(--md-sys-color-on-error-container); }
.tag--knowledge { background: var(--md-sys-color-secondary-container); color: var(--md-sys-color-on-secondary-container); }
.tag--school { background: #E8DEF8; color: #4A3366; }
.tags { display: flex; flex-wrap: wrap; gap: var(--s-2); }

.chips { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.chip {
  display: inline-flex; align-items: center; gap: var(--s-2); height: 32px; padding: 0 var(--s-3);
  border: 1px solid var(--md-sys-color-outline); border-radius: var(--md-sys-shape-corner-small);
  background: transparent; color: var(--md-sys-color-on-surface-variant); font: var(--md-sys-typescale-label-large);
}
.chip[aria-pressed="true"] { background: var(--md-sys-color-secondary-container); border-color: transparent; color: var(--md-sys-color-on-secondary-container); }
.chip .count { font: var(--md-sys-typescale-label-medium); opacity: .8; }
@media (max-width: 599px) {
  .chips { flex-wrap: nowrap; overflow-x: auto; margin: 0 calc(-1 * var(--s-4)); padding: 0 var(--s-4) var(--s-1); scroll-snap-type: x proximity; }
  .chip { flex: none; scroll-snap-align: start; }
}

.seg { display: inline-flex; border: 1px solid var(--md-sys-color-outline); border-radius: var(--md-sys-shape-corner-full); overflow: hidden; }
.seg button { height: 40px; padding: 0 var(--s-4); border: 0; border-right: 1px solid var(--md-sys-color-outline); background: transparent; color: var(--md-sys-color-on-surface); font: var(--md-sys-typescale-label-large); }
.seg button:last-child { border-right: 0; }
.seg button[aria-pressed="true"] { background: var(--md-sys-color-secondary-container); color: var(--md-sys-color-on-secondary-container); }

/* 手指操作：把次要控件撑到 44px（M3 要求 48dp 点击区） */
@media (pointer: coarse) {
  .chip, .flag-btn, .seg button, .field-box button, .usermenu summary { height: 44px; }
  .jumpers button { min-width: 44px; height: 44px; }
  .appbar .btn, .appbar .icon-btn { height: 44px; min-width: 44px; }
}

/* ───────── 卡片 ───────── */
.mod, .choice, .wb, .rv, .bars, .toggle, .material, .hist {
  border: 1px solid var(--md-sys-color-outline-variant); background: var(--md-sys-color-surface-container-lowest); color: var(--md-sys-color-on-surface);
}
.start, .resume, .compose, .wb, .rv, .bars, .card-panel, .material, .feedback, .empty, .errorbox, .choice, .toggle, .mod, .sys, .day, .grade, .hist {
  border-radius: var(--md-sys-shape-corner-large);
}

/* ───────── 首页 ───────── */
.start {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: var(--s-5); padding: var(--s-5) var(--s-6);
  background: var(--md-sys-color-primary-container); color: var(--md-sys-color-on-primary-container);
}
.start h2 { font: var(--md-sys-typescale-headline-small); }
.start p { margin-top: var(--s-1); font: var(--md-sys-typescale-body-medium); }
@media (max-width: 599px) { .start { grid-template-columns: 1fr; padding: var(--s-5); gap: var(--s-4); } .start .btn { width: 100%; } }

.resume { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); padding: var(--s-3) var(--s-3) var(--s-3) var(--s-5); background: var(--md-sys-color-secondary-container); color: var(--md-sys-color-on-secondary-container); }
.resume strong { display: block; font: var(--md-sys-typescale-title-medium); }
.resume span { font: var(--md-sys-typescale-body-medium); }
.resume .btn--primary { flex: none; }

.tiles { display: grid; gap: var(--s-3); grid-template-columns: repeat(auto-fill, minmax(var(--tile-min, 220px), 1fr)); }
.week { --tile-min: 0; grid-template-columns: repeat(7, 1fr); gap: var(--s-2); }
.day { display: grid; gap: 2px; place-items: center; align-content: center; min-height: 88px; padding: var(--s-3) var(--s-1); background: var(--md-sys-color-surface-container-low); }
.day small { font: var(--md-sys-typescale-label-medium); color: var(--md-sys-color-on-surface-variant); }
.day b { font: var(--md-sys-typescale-headline-small); }
.day--zero b { color: var(--md-sys-color-on-surface-variant); font-weight: 400; }
.day--today { background: var(--md-sys-color-primary-container); color: var(--md-sys-color-on-primary-container); }
.day--today small { color: var(--md-sys-color-on-primary-container); font-weight: 700; }

.mods { --tile-min: 232px; }
.mod { display: grid; grid-template-columns: auto 1fr; gap: var(--s-4); align-items: center; padding: var(--s-4); text-align: left; min-height: 88px; }
.avatar-tile { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; font: var(--md-sys-typescale-title-medium); background: var(--av-bg); color: var(--av-fg); }
.av-1 { --av-bg: var(--md-sys-color-primary-container); --av-fg: var(--md-sys-color-on-primary-container); }
.av-2 { --av-bg: var(--md-sys-color-secondary-container); --av-fg: var(--md-sys-color-on-secondary-container); }
.av-3 { --av-bg: var(--md-sys-color-tertiary-container); --av-fg: var(--md-sys-color-on-tertiary-container); }
.av-4 { --av-bg: var(--md-sys-color-surface-container-highest); --av-fg: var(--md-sys-color-on-surface-variant); }
.mod-name { display: block; font: var(--md-sys-typescale-title-medium); line-height: 1.35; }
.mod-meta { display: block; margin-top: 2px; font: var(--md-sys-typescale-body-small); color: var(--md-sys-color-on-surface-variant); }
.mod-meta b { color: var(--md-sys-color-error); font-weight: 700; }
@media (max-width: 599px) { .mods { --tile-min: 150px; } .mod { grid-template-columns: 1fr; gap: var(--s-2); align-items: start; } }

/* ───────── 专项设置 ───────── */
.choices { --tile-min: 300px; gap: var(--s-4); }
.choice { display: grid; gap: var(--s-3); align-content: start; padding: var(--s-5); min-height: 200px; }
.choice h2 { font: var(--md-sys-typescale-title-large); }
.choice p { font: var(--md-sys-typescale-body-medium); color: var(--md-sys-color-on-surface-variant); }
.choice .btn { justify-self: start; margin-top: auto; }
.meter { height: 8px; border-radius: var(--md-sys-shape-corner-full); background: var(--md-sys-color-secondary-container); overflow: hidden; }
.meter > i { display: block; width: 100%; height: 100%; background: var(--md-sys-color-primary); transform-origin: left; transition: transform var(--md-sys-motion-duration-medium2) var(--md-sys-motion-easing-standard); }
.meter-note { font: var(--md-sys-typescale-body-small); color: var(--md-sys-color-on-surface-variant); }

.toggle { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); min-height: 72px; padding: var(--s-3) var(--s-5); cursor: pointer; }
.toggle span { display: grid; }
.toggle small { font: var(--md-sys-typescale-body-small); color: var(--md-sys-color-on-surface-variant); }
.toggle input { appearance: none; -webkit-appearance: none; position: relative; flex: none; width: 52px; height: 32px; margin: 0; border: 2px solid var(--md-sys-color-outline); border-radius: var(--md-sys-shape-corner-full); background: var(--md-sys-color-surface-container-highest); cursor: pointer; transition: background var(--md-sys-motion-duration-short4) var(--md-sys-motion-easing-standard), border-color var(--md-sys-motion-duration-short4) var(--md-sys-motion-easing-standard); }
.toggle input::before { content: ""; position: absolute; top: 50%; left: 6px; width: 16px; height: 16px; border-radius: 50%; background: var(--md-sys-color-outline); transform: translateY(-50%); transition: left var(--md-sys-motion-duration-short4) var(--md-sys-motion-easing-standard), width var(--md-sys-motion-duration-short4) var(--md-sys-motion-easing-standard), height var(--md-sys-motion-duration-short4) var(--md-sys-motion-easing-standard), background var(--md-sys-motion-duration-short4) var(--md-sys-motion-easing-standard); }
.toggle input:checked { background: var(--md-sys-color-primary); border-color: var(--md-sys-color-primary); }
.toggle input:checked::before { left: 20px; width: 24px; height: 24px; background: var(--md-sys-color-on-primary); }

/* ───────── 答题 ───────── */
.exam { width: min(1040px, 100% - 2 * var(--s-5)); margin: 0 auto; padding: var(--s-5) 0 calc(var(--s-8) + var(--s-5)); display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: var(--s-5); align-items: start; }
.exam-main { display: grid; gap: var(--s-4); min-width: 0; max-width: 720px; }
.appbar--session .appbar-title small { color: var(--md-sys-color-on-surface); font: var(--md-sys-typescale-title-small); }
.timer { display: inline-flex; align-items: center; gap: var(--s-2); height: 32px; padding: 0 var(--s-3); border-radius: var(--md-sys-shape-corner-small); border: 1px solid var(--md-sys-color-outline-variant); font: var(--md-sys-typescale-label-large); color: var(--md-sys-color-on-surface-variant); }
.timer .icon { width: 1.125rem; height: 1.125rem; }

.progress { height: 4px; border-radius: var(--md-sys-shape-corner-full); background: var(--md-sys-color-secondary-container); overflow: hidden; }
.progress > i { display: block; width: 100%; height: 100%; background: var(--md-sys-color-primary); transform-origin: left; transition: transform var(--md-sys-motion-duration-medium2) var(--md-sys-motion-easing-standard); }

.q-meta { display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap; font: var(--md-sys-typescale-label-large); color: var(--md-sys-color-on-surface-variant); }
.q-no { display: inline-grid; place-items: center; min-width: 40px; height: 32px; padding: 0 var(--s-3); border-radius: var(--md-sys-shape-corner-small); background: var(--md-sys-color-primary-container); color: var(--md-sys-color-on-primary-container); font: var(--md-sys-typescale-title-small); }
.flag-btn { margin-left: auto; display: inline-flex; align-items: center; gap: var(--s-2); height: 32px; padding: 0 var(--s-3); border: 1px solid var(--md-sys-color-outline); border-radius: var(--md-sys-shape-corner-small); background: transparent; color: var(--md-sys-color-on-surface-variant); font: var(--md-sys-typescale-label-large); }
.flag-btn .icon { width: 1.125rem; height: 1.125rem; }
.flag-btn[aria-pressed="true"] { background: var(--md-ext-color-flag-container); border-color: transparent; color: var(--md-ext-color-on-flag-container); }

.material { background: var(--md-sys-color-surface-container-low); border-color: transparent; }
.material > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: var(--s-2); min-height: 48px; padding: 0 var(--s-4); border-radius: var(--md-sys-shape-corner-large); color: var(--md-sys-color-on-surface-variant); font: var(--md-sys-typescale-label-large); }
.material > summary::-webkit-details-marker { display: none; }
.material > summary .icon { transition: transform var(--md-sys-motion-duration-short4) var(--md-sys-motion-easing-standard); }
.material[open] > summary .icon { transform: rotate(180deg); }
.material-body { padding: 0 var(--s-4) var(--s-4); font: var(--md-ext-typescale-reading); white-space: pre-wrap; overflow-wrap: break-word; color: var(--md-sys-color-on-surface); }
@media (max-width: 599px) { .material-body { font: var(--md-sys-typescale-body-large); line-height: 1.75; } }

.q-stem { font: var(--md-ext-typescale-reading); white-space: pre-wrap; overflow-wrap: break-word; max-width: 68ch; }
.q-stem:focus { outline: none; }
@media (max-width: 599px) { .q-stem { font: var(--md-sys-typescale-body-large); font-size: 1.0625rem; line-height: 1.85; } }

.opts { display: grid; gap: var(--s-2); }
.opt {
  display: grid; grid-template-columns: auto 1fr auto; align-items: start; gap: var(--s-4);
  width: 100%; min-height: 56px; padding: var(--s-3) var(--s-4);
  border: 1px solid var(--md-sys-color-outline); border-radius: var(--md-sys-shape-corner-medium);
  background: var(--md-sys-color-surface-container-lowest); color: var(--md-sys-color-on-surface); text-align: left;
  transition: background var(--md-sys-motion-duration-short4) var(--md-sys-motion-easing-standard), border-color var(--md-sys-motion-duration-short4) var(--md-sys-motion-easing-standard);
}
.opt-letter { width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid var(--md-sys-color-outline); border-radius: 50%; font: var(--md-sys-typescale-label-large); color: var(--md-sys-color-on-surface-variant); transition: background var(--md-sys-motion-duration-short4) var(--md-sys-motion-easing-standard), color var(--md-sys-motion-duration-short4) var(--md-sys-motion-easing-standard), border-color var(--md-sys-motion-duration-short4) var(--md-sys-motion-easing-standard); }
.opt-text { font: var(--md-sys-typescale-body-large); line-height: 1.75; overflow-wrap: break-word; white-space: pre-wrap; padding-top: 3px; }
.opt-mark { display: none; margin-top: 4px; }
.opt[data-state="selected"] { border-color: var(--md-sys-color-primary); border-width: 2px; padding: calc(var(--s-3) - 1px) calc(var(--s-4) - 1px); background: var(--md-sys-color-secondary-container); color: var(--md-sys-color-on-secondary-container); }
.opt[data-state="selected"] .opt-letter { background: var(--md-sys-color-primary); border-color: var(--md-sys-color-primary); color: var(--md-sys-color-on-primary); }
.opt[data-state="right"] { border-color: var(--md-sys-color-tertiary); border-width: 2px; padding: calc(var(--s-3) - 1px) calc(var(--s-4) - 1px); background: var(--md-sys-color-tertiary-container); color: var(--md-sys-color-on-tertiary-container); }
.opt[data-state="right"] .opt-letter { background: var(--md-sys-color-tertiary); border-color: var(--md-sys-color-tertiary); color: var(--md-sys-color-on-tertiary); }
.opt[data-state="wrong"] { border-color: var(--md-sys-color-error); border-width: 2px; padding: calc(var(--s-3) - 1px) calc(var(--s-4) - 1px); background: var(--md-sys-color-error-container); color: var(--md-sys-color-on-error-container); }
.opt[data-state="wrong"] .opt-letter { background: var(--md-sys-color-error); border-color: var(--md-sys-color-error); color: var(--md-sys-color-on-error); }
.opt[data-state="right"] .opt-mark, .opt[data-state="wrong"] .opt-mark { display: inline-block; }
.opt:disabled { cursor: default; }
.opt:disabled:not([data-state]) { color: var(--md-sys-color-on-surface-variant); background: var(--md-sys-color-surface-container-low); border-color: var(--md-sys-color-outline-variant); }

.feedback { scroll-margin-bottom: 96px; display: grid; gap: var(--s-3); padding: var(--s-4) var(--s-5); background: var(--md-sys-color-surface-container-low); color: var(--md-sys-color-on-surface); animation: rise var(--md-sys-motion-duration-medium2) var(--md-sys-motion-easing-emphasized-decelerate); }
.feedback:focus { outline: none; }
.feedback-head { display: flex; align-items: center; gap: var(--s-3); flex-wrap: wrap; font: var(--md-sys-typescale-title-medium); }
.feedback .state { display: inline-flex; align-items: center; gap: var(--s-2); }
.feedback--ok { background: var(--md-sys-color-tertiary-container); color: var(--md-sys-color-on-tertiary-container); }
.feedback--bad { background: var(--md-sys-color-error-container); color: var(--md-sys-color-on-error-container); }
.feedback .tag { background: color-mix(in srgb, var(--md-sys-color-surface-container-lowest) 70%, transparent); color: inherit; }
.feedback .tag--ai { background: var(--md-ext-color-flag-container); color: var(--md-ext-color-on-flag-container); }
.explain { font: var(--md-sys-typescale-body-large); line-height: 1.8; white-space: pre-wrap; overflow-wrap: break-word; }
.explain-none { font: var(--md-sys-typescale-body-medium); opacity: .8; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.qnav { display: flex; align-items: center; gap: var(--s-3); position: sticky; bottom: 0; z-index: 10; padding: var(--s-3) 0 calc(var(--s-3) + env(safe-area-inset-bottom)); background: linear-gradient(to top, var(--md-sys-color-surface) 72%, transparent); }
.qnav .btn { flex: 1; min-width: 0; height: 48px; padding: 0 var(--s-3); }
.qnav .btn::after { inset: 0; }
.qnav .btn--primary { flex: 1.4; }
.qnav .only-mobile { display: none; }
.keys { font: var(--md-sys-typescale-body-small); color: var(--md-sys-color-on-surface-variant); }
kbd { display: inline-block; min-width: 20px; padding: 0 var(--s-1); border: 1px solid var(--md-sys-color-outline-variant); border-bottom-width: 2px; border-radius: var(--md-sys-shape-corner-extra-small); background: var(--md-sys-color-surface-container-lowest); font: var(--md-sys-typescale-label-small); text-align: center; color: var(--md-sys-color-on-surface-variant); }

.card-panel { position: sticky; top: 80px; max-height: calc(100vh - 96px); overflow-x: hidden; overflow-y: auto; display: grid; gap: var(--s-4); padding: var(--s-4) var(--s-5) var(--s-5); background: var(--md-sys-color-surface-container-low); }
.card-panel h2 { font: var(--md-sys-typescale-title-medium); display: flex; justify-content: space-between; align-items: baseline; }
.card-panel h2 span { font: var(--md-sys-typescale-body-medium); color: var(--md-sys-color-on-surface-variant); }
.nums { --tile-min: 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: var(--s-2); }
.num {
  aspect-ratio: 1; min-height: 40px; display: grid; place-items: center;
  border: 1px solid var(--md-sys-color-outline-variant); border-radius: var(--md-sys-shape-corner-small);
  background: var(--md-sys-color-surface-container-lowest); color: var(--md-sys-color-on-surface-variant); font: var(--md-sys-typescale-label-large);
}
.num[data-state="done"] { background: var(--md-sys-color-secondary-container); border-color: transparent; color: var(--md-sys-color-on-secondary-container); }
.num[data-state="right"] { background: var(--md-sys-color-tertiary-container); border-color: transparent; color: var(--md-sys-color-on-tertiary-container); }
.num[data-state="wrong"] { background: var(--md-sys-color-error-container); border-color: transparent; color: var(--md-sys-color-on-error-container); }
.num[aria-current="true"] { outline: 2px solid var(--md-sys-color-primary); outline-offset: 1px; font-weight: 700; color: var(--md-sys-color-primary); }
.num[data-state="right"][aria-current="true"], .num[data-state="wrong"][aria-current="true"], .num[data-state="done"][aria-current="true"] { color: inherit; }
.num[data-flag="1"]::after { content: ""; position: absolute; top: 3px; right: 3px; width: 8px; height: 8px; border-radius: 50%; background: var(--md-ext-color-flag); }
.num .icon { position: absolute; right: 2px; bottom: 2px; width: 12px; height: 12px; }
.legend { display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-4); font: var(--md-sys-typescale-label-small); color: var(--md-sys-color-on-surface-variant); }
.legend i { display: inline-block; width: 12px; height: 12px; margin-right: 6px; vertical-align: -2px; border: 1px solid var(--md-sys-color-outline-variant); border-radius: var(--md-sys-shape-corner-extra-small); background: var(--md-sys-color-surface-container-lowest); }
.legend .l-done { background: var(--md-sys-color-secondary-container); border-color: transparent; }
.legend .l-flag { background: var(--md-ext-color-flag); border-radius: 50%; border-color: transparent; }
.legend .l-cur { border: 2px solid var(--md-sys-color-primary); }

@media (max-width: 899px) {
  .exam { grid-template-columns: 1fr; padding-top: var(--s-4); width: min(1040px, 100% - 2 * var(--s-4)); }
  .card-panel { display: none; }
  .qnav .only-mobile { display: inline-flex; }
  .keys { display: none; }
}
@media (max-width: 599px) {
  .appbar--session .appbar-title strong { display: none; }
  .appbar--session .timer { padding: 0 var(--s-2); }
}

/* ───────── 对话框（28dp）/ 底部抽屉 ───────── */
dialog {
  width: min(560px, calc(100% - 2 * var(--s-4))); max-height: 86vh; padding: 0; border: 0;
  border-radius: var(--md-sys-shape-corner-extra-large);
  background: var(--md-sys-color-surface-container-high); color: var(--md-sys-color-on-surface); box-shadow: var(--md-sys-elevation-3);
}
dialog[open] { animation: dialog-in var(--md-sys-motion-duration-medium4) var(--md-sys-motion-easing-emphasized-decelerate); }
dialog::backdrop { background: var(--md-sys-color-scrim); }
@keyframes dialog-in { from { opacity: 0; transform: scale(.9); } to { opacity: 1; transform: none; } }
.dialog-body { display: grid; gap: var(--s-4); padding: var(--s-5) var(--s-5) var(--s-4); }
.dialog-body h2 { font: var(--md-sys-typescale-headline-small); }
.dialog-body > p { font: var(--md-sys-typescale-body-medium); color: var(--md-sys-color-on-surface-variant); }
.dialog-actions { display: flex; gap: var(--s-2); justify-content: flex-end; flex-wrap: wrap; padding-top: var(--s-2); }
.dialog-sheet { align-self: end; margin: auto auto 0; width: min(640px, 100%); max-height: 88vh; overflow-y: auto; border-radius: var(--md-sys-shape-corner-extra-large) var(--md-sys-shape-corner-extra-large) 0 0; animation-name: sheet-in; }
@keyframes sheet-in { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.dialog-sheet .dialog-actions { position: sticky; bottom: 0; padding: var(--s-3) 0; background: var(--md-sys-color-surface-container-high); }
.jumpers { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.jumpers button { min-width: 40px; height: 40px; border: 1px solid var(--md-sys-color-outline); border-radius: var(--md-sys-shape-corner-small); background: transparent; font: var(--md-sys-typescale-label-large); color: var(--md-sys-color-primary); }
.jumpers button:hover { background: color-mix(in srgb, var(--md-sys-color-primary) 8%, transparent); }

/* ───────── 批阅（结果）───────── */
.grade { display: grid; grid-template-columns: auto 1fr; gap: var(--s-6); align-items: center; padding: var(--s-6); background: var(--md-sys-color-primary-container); color: var(--md-sys-color-on-primary-container); }
.score { display: grid; justify-items: start; gap: var(--s-1); min-width: 140px; }
.score b { font: var(--md-sys-typescale-display-large); font-weight: 400; }
.score b small { font: var(--md-sys-typescale-headline-small); opacity: .7; }
.score--pending b { font: var(--md-sys-typescale-headline-medium); }
.grade-text { display: grid; gap: var(--s-3); }
.grade-text h1 { font: var(--md-sys-typescale-headline-small); }
.grade-stats { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.grade-stats span { display: inline-flex; align-items: center; gap: var(--s-1); height: 32px; padding: 0 var(--s-3); border-radius: var(--md-sys-shape-corner-small); background: color-mix(in srgb, var(--md-sys-color-on-primary-container) 10%, transparent); font: var(--md-sys-typescale-label-large); }
.grade-text p { font: var(--md-sys-typescale-body-medium); opacity: .85; }
@media (max-width: 599px) { .grade { grid-template-columns: 1fr; padding: var(--s-5); gap: var(--s-4); } .score b { font: var(--md-sys-typescale-display-medium); } }

.nums--result { grid-template-columns: repeat(auto-fill, 48px); }
.nums--result .num { min-height: 48px; }

.bars { overflow: hidden; }
.bar-row { display: grid; grid-template-columns: minmax(96px, 1.1fr) 3fr 64px; gap: var(--s-4); align-items: center; padding: var(--s-3) var(--s-5); }
.bar-row + .bar-row { border-top: 1px solid var(--md-sys-color-outline-variant); }
.bar-row .name { font: var(--md-sys-typescale-body-medium); overflow-wrap: anywhere; }
.bar-row .val { text-align: right; font: var(--md-sys-typescale-label-large); color: var(--md-sys-color-on-surface-variant); }
.bar { height: 8px; border-radius: var(--md-sys-shape-corner-full); background: var(--md-sys-color-error-container); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: var(--md-sys-shape-corner-full); background: var(--md-sys-color-tertiary); }

.reviews { display: grid; gap: var(--s-2); }
.rv { scroll-margin-top: 80px; }
.rv > summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: auto 1fr auto; gap: var(--s-4); align-items: start; padding: var(--s-3) var(--s-4); border-radius: var(--md-sys-shape-corner-large); }
.rv > summary::-webkit-details-marker { display: none; }
.rv-no { display: inline-grid; place-items: center; min-width: 36px; height: 28px; border-radius: var(--md-sys-shape-corner-small); font: var(--md-sys-typescale-label-large); background: var(--md-sys-color-surface-container-high); color: var(--md-sys-color-on-surface-variant); }
.rv[data-state="right"] .rv-no { background: var(--md-sys-color-tertiary-container); color: var(--md-sys-color-on-tertiary-container); }
.rv[data-state="wrong"] .rv-no { background: var(--md-sys-color-error-container); color: var(--md-sys-color-on-error-container); }
.rv-stem { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font: var(--md-sys-typescale-body-large); line-height: 1.7; }
.rv[open] .rv-stem { display: none; }
.rv-ans { font: var(--md-sys-typescale-body-small); color: var(--md-sys-color-on-surface-variant); white-space: nowrap; }
.rv-body { display: grid; gap: var(--s-3); padding: 0 var(--s-4) var(--s-4); }
.rv-body .q-stem { font: var(--md-sys-typescale-body-large); line-height: 1.85; }
.rv-note { font: var(--md-sys-typescale-body-small); color: var(--md-sys-color-on-surface-variant); display: flex; align-items: center; gap: var(--s-2); }
@media (max-width: 599px) { .rv > summary { grid-template-columns: auto 1fr; row-gap: 2px; } .rv-ans { grid-column: 2; white-space: normal; } }

.actions { display: flex; flex-wrap: wrap; gap: var(--s-3); }

/* ───────── 错题集 ───────── */
.compose { display: grid; grid-template-columns: 1fr auto; gap: var(--s-4); align-items: center; padding: var(--s-4) var(--s-5); background: var(--md-sys-color-secondary-container); color: var(--md-sys-color-on-secondary-container); }
.compose strong { font: var(--md-sys-typescale-title-medium); }
.compose p { font: var(--md-sys-typescale-body-medium); }
.compose .meter { margin-top: var(--s-2); max-width: 320px; background: color-mix(in srgb, var(--md-sys-color-on-secondary-container) 16%, transparent); }
@media (max-width: 599px) { .compose { grid-template-columns: 1fr; } .compose .btn { width: 100%; } }

.wb-list { display: grid; gap: var(--s-3); }
.wb { display: grid; gap: var(--s-3); padding: var(--s-4) var(--s-5); }
.wb-meta { display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap; font: var(--md-sys-typescale-body-small); color: var(--md-sys-color-on-surface-variant); }
.wb-meta .grow { margin-left: auto; }
.dots { display: inline-flex; align-items: center; gap: var(--s-1); }
.dots i { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--md-sys-color-tertiary); }
.dots i.on { background: var(--md-sys-color-tertiary); }
.wb-opts { display: grid; gap: var(--s-2); }
.sopt { display: flex; gap: var(--s-3); padding: var(--s-2) var(--s-3); border: 1px solid var(--md-sys-color-outline-variant); border-radius: var(--md-sys-shape-corner-small); font: var(--md-sys-typescale-body-large); line-height: 1.7; }
.sopt b { flex: none; width: 24px; font-weight: 500; color: var(--md-sys-color-on-surface-variant); }
.sopt[data-state="right"] { border-color: transparent; background: var(--md-sys-color-tertiary-container); color: var(--md-sys-color-on-tertiary-container); }
.sopt[data-state="right"] b { color: inherit; }
.sopt[data-state="mine"] { border-color: transparent; background: var(--md-sys-color-error-container); color: var(--md-sys-color-on-error-container); }
.sopt[data-state="mine"] b { color: inherit; }
.wb-actions { display: flex; align-items: center; gap: var(--s-3); flex-wrap: wrap; }

/* ───────── 记录（列表）───────── */
.hist { overflow: hidden; }
.hist-row { display: grid; grid-template-columns: 1fr auto; gap: var(--s-4); align-items: center; min-height: 72px; padding: var(--s-3) var(--s-5); }
.hist-row + .hist-row { border-top: 1px solid var(--md-sys-color-outline-variant); }
.hist-row strong { display: block; font: var(--md-sys-typescale-body-large); font-weight: 500; }
.hist-row small { font: var(--md-sys-typescale-body-medium); color: var(--md-sys-color-on-surface-variant); }
.hist-end { display: flex; align-items: center; gap: var(--s-3); color: var(--md-sys-color-on-surface-variant); font: var(--md-sys-typescale-body-medium); }
.hist-end b { font: var(--md-sys-typescale-title-medium); color: var(--md-sys-color-on-surface); }

/* ───────── 状态：加载 / 空 / 错误 / 提示条 ───────── */
.skeleton { display: grid; gap: var(--s-3); }
.skeleton i { display: block; height: 20px; border-radius: var(--md-sys-shape-corner-small); background: linear-gradient(90deg, var(--md-sys-color-surface-container) 25%, var(--md-sys-color-surface-container-high) 37%, var(--md-sys-color-surface-container) 63%); background-size: 400% 100%; animation: shimmer 1.4s ease infinite; }
.skeleton i:nth-child(1) { width: 38%; height: 32px; }
.skeleton i:nth-child(3) { width: 72%; }
.skeleton i.block { height: 120px; border-radius: var(--md-sys-shape-corner-large); }
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

.empty { display: grid; justify-items: start; gap: var(--s-3); padding: var(--s-6); background: var(--md-sys-color-surface-container-low); }
.empty p { font: var(--md-sys-typescale-body-large); color: var(--md-sys-color-on-surface-variant); max-width: 52ch; }
.errorbox { display: grid; gap: var(--s-3); justify-items: start; padding: var(--s-5); background: var(--md-sys-color-error-container); color: var(--md-sys-color-on-error-container); }
.errorbox h2 { display: flex; align-items: center; gap: var(--s-2); font: var(--md-sys-typescale-title-large); }

.toast {
  position: fixed; left: 50%; bottom: calc(var(--s-5) + env(safe-area-inset-bottom)); z-index: 60; transform: translateX(-50%);
  max-width: calc(100% - 2 * var(--s-4)); min-height: 48px; display: flex; align-items: center; padding: var(--s-3) var(--s-4);
  border-radius: var(--md-sys-shape-corner-extra-small); background: var(--md-sys-color-inverse-surface); color: var(--md-sys-color-inverse-on-surface);
  font: var(--md-sys-typescale-body-medium); box-shadow: var(--md-sys-elevation-3);
  animation: rise var(--md-sys-motion-duration-medium2) var(--md-sys-motion-easing-emphasized-decelerate);
}
@media (max-width: 599px) { .toast { bottom: calc(96px + env(safe-area-inset-bottom)); } }

#app:focus { outline: none; }

/* ───────── 门户（/hub）───────── */
.systems { --tile-min: 320px; gap: var(--s-4); }
.sys { display: grid; gap: var(--s-3); align-content: start; padding: var(--s-5); min-height: 208px; border: 1px solid var(--md-sys-color-outline-variant); background: var(--md-sys-color-surface-container-lowest); color: var(--md-sys-color-on-surface); }
.sys-top { display: flex; align-items: center; gap: var(--s-4); }
.sys-top h2 { font: var(--md-sys-typescale-title-large); }
.sys-glyph { width: 48px; height: 48px; display: grid; place-items: center; flex: none; border-radius: 50%; font: var(--md-sys-typescale-title-large); background: var(--av-bg); color: var(--av-fg); }
.sys p { font: var(--md-sys-typescale-body-medium); color: var(--md-sys-color-on-surface-variant); }
.sys-meta { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.sys-meta span { display: inline-flex; align-items: center; height: 28px; padding: 0 var(--s-3); border-radius: var(--md-sys-shape-corner-small); background: var(--md-sys-color-surface-container); font: var(--md-sys-typescale-label-medium); color: var(--md-sys-color-on-surface-variant); }
.sys-meta b { margin: 0 3px; font-weight: 700; color: var(--md-sys-color-on-surface); }
.sys-meta .bad { color: var(--md-sys-color-error); }
.sys-go { margin-top: auto; display: inline-flex; align-items: center; gap: var(--s-2); color: var(--md-sys-color-primary); font: var(--md-sys-typescale-label-large); }
.sys--soon { background: var(--md-sys-color-surface-container); border-color: transparent; color: var(--md-sys-color-on-surface-variant); }
.sys--soon .sys-glyph { background: var(--md-sys-color-surface-container-highest); color: var(--md-sys-color-on-surface-variant); }
.soon-tag { margin-left: auto; }

/* ───────── 登录 ───────── */
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.auth-side { display: grid; align-content: center; gap: var(--s-6); padding: var(--s-7) clamp(var(--s-5), 6vw, 96px); background: var(--md-sys-color-primary-container); color: var(--md-sys-color-on-primary-container); }
.auth-side .brand { font: var(--md-sys-typescale-title-large); }
.auth-side .brand-svg { color: var(--md-sys-color-on-primary-container); }
.auth-side h1 { font: var(--md-sys-typescale-headline-large); max-width: 14em; }
.auth-side .lead { color: var(--md-sys-color-on-primary-container); opacity: .85; margin-top: var(--s-2); }
.auth-list { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3); }
.auth-list > div { padding: var(--s-3) var(--s-4); border-radius: var(--md-sys-shape-corner-medium); background: color-mix(in srgb, var(--md-sys-color-surface-container-lowest) 72%, transparent); color: var(--md-sys-color-on-surface); }
.auth-list b { display: block; font: var(--md-sys-typescale-title-small); }
.auth-list small { font: var(--md-sys-typescale-body-small); color: var(--md-sys-color-on-surface-variant); }
.auth-main { display: grid; align-content: center; justify-items: center; padding: var(--s-6) var(--s-5); }
.auth-card { width: min(400px, 100%); display: grid; gap: var(--s-5); }
.auth-card h2 { font: var(--md-sys-typescale-headline-small); }
.auth-card form { display: grid; gap: var(--s-5); }

/* M3 描边文本框（浮动标签）*/
.field { position: relative; display: grid; gap: var(--s-1); }
.field-box { position: relative; }
.field input {
  width: 100%; height: 56px; padding: 0 var(--s-4);
  border: 1px solid var(--md-sys-color-outline); border-radius: var(--md-sys-shape-corner-extra-small);
  background: transparent; color: var(--md-sys-color-on-surface); font: var(--md-sys-typescale-body-large);
  transition: border-color var(--md-sys-motion-duration-short4) var(--md-sys-motion-easing-standard), box-shadow var(--md-sys-motion-duration-short4) var(--md-sys-motion-easing-standard);
}
.field input:hover { border-color: var(--md-sys-color-on-surface); }
.field input:focus { outline: none; border-color: var(--md-sys-color-primary); box-shadow: inset 0 0 0 1px var(--md-sys-color-primary); }
.field input[aria-invalid="true"] { border-color: var(--md-sys-color-error); }
.field label {
  position: absolute; left: var(--s-3); top: 16px; padding: 0 var(--s-1); pointer-events: none;
  background: var(--md-sys-color-surface); color: var(--md-sys-color-on-surface-variant); font: var(--md-sys-typescale-body-large);
  transform-origin: left top; transition: transform var(--md-sys-motion-duration-short4) var(--md-sys-motion-easing-standard), color var(--md-sys-motion-duration-short4) var(--md-sys-motion-easing-standard);
}
.field input:focus + label, .field input:not(:placeholder-shown) + label { transform: translateY(-26px) scale(.75); }
.field input:focus + label { color: var(--md-sys-color-primary); }
.field small { padding: 0 var(--s-4); font: var(--md-sys-typescale-body-small); color: var(--md-sys-color-on-surface-variant); }
.field-box--pw input { padding-right: 72px; }
.field-box button { position: absolute; right: var(--s-1); top: 50%; transform: translateY(-50%); height: 40px; padding: 0 var(--s-3); border: 0; border-radius: var(--md-sys-shape-corner-full); background: transparent; color: var(--md-sys-color-primary); font: var(--md-sys-typescale-label-large); }
.field-box button:hover { background: color-mix(in srgb, var(--md-sys-color-primary) 8%, transparent); }
.form-error { display: flex; gap: var(--s-3); align-items: flex-start; padding: var(--s-3) var(--s-4); border-radius: var(--md-sys-shape-corner-medium); background: var(--md-sys-color-error-container); color: var(--md-sys-color-on-error-container); font: var(--md-sys-typescale-body-medium); }
.form-error .icon { margin-top: 1px; }
@media (max-width: 899px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-side { order: 2; padding: var(--s-6) var(--s-5); }
  .auth-main { order: 1; padding-top: var(--s-6); }
  .auth-side h1 { font: var(--md-sys-typescale-headline-small); }
}

/* 单列 grid 必须允许列收缩，否则内容的最小宽度会把列撑出屏幕（手机上会出现 6px 的横向溢出） */
.page, .page-head, .exam-main, .card-panel, .wb, .wb-list, .reviews, .rv-body, .dialog-body, .choice,
.feedback, .opts, .wb-opts, .skeleton, .errorbox, .empty, .auth-card, .auth-card form, .auth-main { grid-template-columns: minmax(0, 1fr); }

/* ───────── 第二轮审查后的修正 ───────── */
:root { --md-ext-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5 9.8 17 19 7.5' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }

/* 选中状态不能只靠颜色：筛选芯片与分段按钮选中时前面加对勾（M3 规范） */
.seg button { display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2); }
.chip[aria-pressed="true"]::after, .seg button[aria-pressed="true"]::after {
  content: ""; order: -1; flex: none; width: 18px; height: 18px; background: currentColor;
  -webkit-mask: var(--md-ext-check) center / contain no-repeat; mask: var(--md-ext-check) center / contain no-repeat;
}
/* 已答题号：模拟卷里没有对错图标，已答与未答不能只靠 1.2:1 的底色区分 */
.num[data-state="done"] { border: 1px solid var(--md-sys-color-primary); font-weight: 700; }
.legend .l-done { border-color: var(--md-sys-color-primary); }
.legend { font: var(--md-sys-typescale-label-medium); }

/* 在会裁剪的容器里，焦点环往里收 */
.seg button:focus-visible, .hist-row:focus-visible, .chips .chip:focus-visible, .bars :focus-visible { outline-offset: -3px; }

/* 头像统一用中性的主色容器：绿和红是语义色，不能拿来做装饰 */
.av-1, .av-2, .av-3, .av-4 { --av-bg: var(--md-sys-color-primary-container); --av-fg: var(--md-sys-color-on-primary-container); }

/* 有「继续」时它是首要入口，做成浅色卡片，不再和「开始模拟」两块浅蓝叠在一起 */
.resume { background: var(--md-sys-color-surface-container-low); color: var(--md-sys-color-on-surface); border: 1px solid var(--md-sys-color-outline-variant); }

/* 占位卡不可点，不要悬停反馈 */
.sys--soon::before { display: none; }

/* 反馈面板只在刚揭晓时播放动画，重绘（点标记等）不再重放 */
.feedback { animation: none; }
.feedback.is-new { animation: rise var(--md-sys-motion-duration-medium2) var(--md-sys-motion-easing-emphasized-decelerate); }

/* iPad 横屏也会显示右侧答题卡：粗指针下格子放大到 44px 以上 */
@media (pointer: coarse) { .card-panel .nums { grid-template-columns: repeat(5, 1fr); } }

/* 浏览器自动填充时浮动标签要让位 */
.field input:-webkit-autofill + label { transform: translateY(-26px) scale(.75); }

/* 登录：表单标题是页面的 h1；手机上表单上方放品牌，下方宣传区用中性色，不再整块饱和 */
.auth-card h1 { font: var(--md-sys-typescale-headline-small); }
.auth-side h2 { font: var(--md-sys-typescale-headline-large); max-width: 14em; }
.auth-brand { display: none; align-items: center; gap: var(--s-3); font: var(--md-sys-typescale-title-large); }
@media (max-width: 899px) {
  .auth-brand { display: flex; }
  .auth-side h2 { font: var(--md-sys-typescale-headline-small); }
  .auth-side { background: var(--md-sys-color-surface-container-low); color: var(--md-sys-color-on-surface); }
  .auth-side .brand-svg { color: var(--md-sys-color-primary); }
  .auth-side .lead { color: var(--md-sys-color-on-surface-variant); opacity: 1; }
  .auth-list > div { background: var(--md-sys-color-surface-container-lowest); }
}

/* ───────── 统一导航、标签页、外观菜单 ───────── */

/* 题库内的标签页（M3 Primary tabs）：在顶栏下面，随顶栏一起吸顶 */
.subnav {
  display: flex; gap: var(--s-1); overflow-x: auto; scrollbar-width: none;
  padding: 0 var(--s-4) 0 var(--s-5);
  border-bottom: 1px solid var(--md-sys-color-outline-variant);
}
.subnav::-webkit-scrollbar { display: none; }
.subnav a {
  flex: none; display: inline-flex; align-items: center; height: 48px; padding: 0 var(--s-4);
  border-radius: var(--md-sys-shape-corner-small) var(--md-sys-shape-corner-small) 0 0;
  color: var(--md-sys-color-on-surface-variant); font: var(--md-sys-typescale-label-large); white-space: nowrap;
}
.subnav a::before { border-radius: inherit; }
.subnav a[aria-current="page"] { color: var(--md-sys-color-primary); }
.subnav a[aria-current="page"]::after {
  content: ""; position: absolute; left: var(--s-4); right: var(--s-4); bottom: 0; height: 3px;
  border-radius: 3px 3px 0 0; background: var(--md-sys-color-primary);
}
@media (max-width: 599px) {
  .subnav { padding: 0; gap: 0; }
  .subnav a { flex: 1; justify-content: center; padding: 0 var(--s-2); }
  .subnav a[aria-current="page"]::after { left: var(--s-6); right: var(--s-6); }
}

/* 账号菜单里的「外观」三选一 */
.menu-group { display: grid; border-top: 1px solid var(--md-sys-color-outline-variant); margin-top: var(--s-2); padding-top: var(--s-2); }
.menu-label { padding: var(--s-2) var(--s-4) var(--s-1); font: var(--md-sys-typescale-label-medium); color: var(--md-sys-color-on-surface-variant); }
.menu-check { width: 24px; height: 24px; flex: none; }
.menu-group button[aria-checked="true"] .menu-check {
  background: var(--md-sys-color-primary);
  -webkit-mask: var(--md-ext-check) center / contain no-repeat; mask: var(--md-ext-check) center / contain no-repeat;
}
.menu-group + a { border-top: 1px solid var(--md-sys-color-outline-variant); margin-top: var(--s-2); }

/* 登录页右上角的深浅切换 */
.auth-main { position: relative; }
.auth-tools { position: absolute; top: var(--s-3); right: var(--s-3); }

/* 手机上的答题顶栏：多了深浅切换按钮，要把「第 n / 总数 题」挤回来——计时器去掉钟表图标，间距收紧 */
@media (max-width: 599px) {
  .appbar--session .appbar-inner, .appbar--session .appbar-end { gap: var(--s-1); }
  .appbar--session .timer .icon { display: none; }
}

/* ═════════ 视觉方向 A「苹果式产品展示」：和落地页同一套观感（2026-10-13 起）═════════
   规则：浅灰页面底上放无边框白卡片；标题半粗、字距收紧；按钮一律胶囊；强调色只有一个蓝；
   深色主卡（开始模拟、成绩、登录页右侧）用 --md-ext-hero。下面覆盖前面 Material 3 时期的组件写法。 */

/* 顶栏、手机底部导航栏：毛玻璃 */
.appbar, .appbar.is-scrolled { background: var(--md-ext-glass); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); }
.appbar.is-scrolled { box-shadow: 0 1px 0 var(--md-sys-color-outline-variant); }
.appbar-title strong { letter-spacing: -.02em; }

/* 侧边栏：当前项是白色滑块加蓝色图标；手机底部栏只把当前项染蓝（iOS 标签栏） */
.rail { background: var(--md-sys-color-surface); }
.rail a[aria-current="page"], .navbar a[aria-current="page"] { color: var(--md-sys-color-primary); }
.rail a[aria-current="page"] .nav-ind { background: var(--md-sys-color-surface-container-lowest); color: var(--md-sys-color-primary); box-shadow: 0 0 0 1px var(--md-sys-color-outline-variant), var(--md-ext-card-shadow); }
.navbar a[aria-current="page"] .nav-ind { background: transparent; color: var(--md-sys-color-primary); }
.rail a[aria-current="page"] .nav-label, .navbar a[aria-current="page"] .nav-label { font-weight: 600; }
.rail a:hover .nav-ind, .navbar a:hover .nav-ind { background: var(--md-sys-color-surface-container); }
.rail a[aria-current="page"]:hover .nav-ind { background: var(--md-sys-color-surface-container-lowest); }
@media (max-width: 599px) {
  .navbar { padding-top: var(--s-2); background: var(--md-ext-glass); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); box-shadow: 0 -1px 0 var(--md-sys-color-outline-variant); }
  .navbar .nav-ind { height: 28px; }
}

/* 题库内的首页 / 练习记录 / 错题集：分段控件（灰色轨道 + 白色滑块） */
.subnav { width: max-content; max-width: calc(100% - 2 * var(--s-5)); margin: 0 var(--s-5) var(--s-3); padding: 2px; gap: 2px; border: 0; border-radius: 10px; background: var(--md-sys-color-surface-container-high); }
.subnav a { height: 32px; padding: 0 var(--s-4); border-radius: 8px; color: var(--md-sys-color-on-surface); }
.subnav a::before, .subnav a[aria-current="page"]::after { display: none; }
.subnav a[aria-current="page"] { background: var(--md-sys-color-surface-container-lowest); color: var(--md-sys-color-on-surface); font-weight: 600; box-shadow: 0 1px 3px rgb(0 0 0 / .12), 0 0 0 .5px rgb(0 0 0 / .04); }
@media (max-width: 599px) { .subnav { width: auto; max-width: none; margin: 0 var(--s-4) var(--s-3); } .subnav a { flex: 1; } }

/* 按钮：胶囊；主按钮蓝底白字，次按钮灰底蓝字 */
.btn { height: 44px; border: 0; background: var(--md-sys-color-secondary-container); color: var(--md-sys-color-primary); font-weight: 500; transition: transform .15s var(--md-sys-motion-easing-standard), filter .2s, background .2s; }
.btn:active:not(:disabled) { transform: scale(.97); }
.btn--primary { background: var(--md-sys-color-primary); color: var(--md-sys-color-on-primary); }
.btn--primary:hover:not(:disabled) { box-shadow: none; filter: brightness(1.08); }
.btn--tonal { background: var(--md-sys-color-secondary-container); color: var(--md-sys-color-on-secondary-container); }
.btn--ghost { background: transparent; color: var(--md-sys-color-primary); }
.btn:disabled, .btn--primary:disabled { background: var(--md-sys-color-surface-container); color: color-mix(in srgb, var(--md-sys-color-on-surface) 38%, transparent); }
.btn--lg { height: 50px; font: var(--md-sys-typescale-title-medium); font-weight: 500; }

/* 筛选：胶囊，选中反白；分段：灰色轨道 + 白色滑块 */
.chip { height: 34px; padding: 0 var(--s-4); border: 0; border-radius: var(--md-sys-shape-corner-full); background: var(--md-sys-color-surface-container-lowest); color: var(--md-sys-color-on-surface); box-shadow: inset 0 0 0 1px var(--md-sys-color-outline-variant); }
.chip[aria-pressed="true"] { background: var(--md-sys-color-on-surface); color: var(--md-sys-color-surface-container-lowest); box-shadow: none; }
.seg { border: 0; padding: 2px; gap: 2px; border-radius: 10px; background: var(--md-sys-color-surface-container-high); overflow: visible; }
.seg button { height: 32px; padding: 0 var(--s-3); border: 0; border-radius: 8px; background: transparent; color: var(--md-sys-color-on-surface); }
.seg button[aria-pressed="true"] { background: var(--md-sys-color-surface-container-lowest); color: var(--md-sys-color-on-surface); font-weight: 600; box-shadow: 0 1px 3px rgb(0 0 0 / .12), 0 0 0 .5px rgb(0 0 0 / .04); }
.seg button[aria-pressed="true"]::after { display: none; }
:root[data-theme="dark"] .subnav a[aria-current="page"], :root[data-theme="dark"] .seg button[aria-pressed="true"] { background: var(--md-sys-color-surface-container-highest); box-shadow: none; }
@media (pointer: coarse) { .seg button { height: 40px; } .subnav a { height: 40px; } }

/* 卡片：无边框白卡片，轻投影 */
.mod, .choice, .wb, .rv, .bars, .toggle, .material, .hist, .sys, .day, .empty, .card-panel, .resume, .compose {
  border: 0; background: var(--md-sys-color-surface-container-lowest); color: var(--md-sys-color-on-surface); box-shadow: var(--md-ext-card-shadow);
}
.section-title h2 { font: var(--md-sys-typescale-title-large); letter-spacing: -.02em; }
.lead { color: var(--md-sys-color-on-surface-variant); }

.page-head--bank { grid-template-columns: auto minmax(0, 1fr); align-items: center; column-gap: var(--s-4); }
.page-head--bank .lead { grid-column: 1 / -1; }
.page-head--icon { grid-template-columns: auto minmax(0, 1fr); align-items: center; column-gap: var(--s-4); }
.page-head--icon .lead { grid-column: 1 / -1; }
@media (max-width: 599px) { .page-head--bank .mg-ico, .page-head--icon .mg-ico { width: 44px; height: 44px; } }

/* 深色主卡：开始模拟、成绩 */
.start, .grade { position: relative; overflow: hidden; border-radius: var(--md-sys-shape-corner-extra-large); background: var(--md-ext-hero); color: var(--md-ext-on-hero); }
.start::after, .grade::after { content: ""; position: absolute; right: -90px; top: -130px; width: 340px; height: 340px; border-radius: 50%; background: radial-gradient(closest-side, rgb(76 141 255 / .38), transparent); pointer-events: none; }
.start > *, .grade > * { position: relative; z-index: 1; }
.start { padding: var(--s-6); }
.start h2 { font: var(--md-sys-typescale-headline-medium); letter-spacing: -.025em; }
.start p { color: var(--md-ext-on-hero-variant); }
.start .btn:not(.btn--primary) { background: rgb(255 255 255 / .14); color: #fff; }

/* 首页：最近七天、专项卡片、继续上次 */
.day--today { background: var(--md-ext-hero); color: var(--md-ext-on-hero); }
.day--today small { color: var(--md-ext-on-hero-variant); }
.avatar-tile { border-radius: 12px; --av-bg: var(--md-sys-color-surface-container); --av-fg: var(--md-sys-color-on-surface); font-weight: 600; }
.mod { transition: transform .3s var(--md-sys-motion-easing-standard), box-shadow .3s; }
.mod:hover { transform: translateY(-2px); box-shadow: var(--md-sys-elevation-2); }
.resume { padding: var(--s-4) var(--s-4) var(--s-4) var(--s-5); }

/* 开关：iOS 式 */
.toggle input { width: 51px; height: 31px; border: 0; background: var(--md-sys-color-surface-container-highest); }
.toggle input::before { left: 2px; width: 27px; height: 27px; background: #fff; box-shadow: 0 2px 4px rgb(0 0 0 / .2); }
.toggle input:checked { background: var(--md-sys-color-primary); }
.toggle input:checked::before { left: 22px; width: 27px; height: 27px; background: #fff; }

/* 答题 */
.timer { border: 0; border-radius: var(--md-sys-shape-corner-full); background: var(--md-sys-color-surface-container-high); color: var(--md-sys-color-on-surface); }
.progress { height: 3px; background: var(--md-sys-color-surface-container-high); }
.q-no { border-radius: 8px; background: var(--md-sys-color-on-surface); color: var(--md-sys-color-surface-container-lowest); }
.flag-btn { border: 0; border-radius: var(--md-sys-shape-corner-full); background: var(--md-sys-color-surface-container-lowest); box-shadow: inset 0 0 0 1px var(--md-sys-color-outline-variant); }
.opt { border-color: var(--md-sys-color-outline-variant); box-shadow: var(--md-ext-card-shadow); transition: transform .15s var(--md-sys-motion-easing-standard), background .2s, border-color .2s; }
.opt:active:not(:disabled) { transform: scale(.985); }
.opt-letter { border-color: var(--md-sys-color-outline-variant); font-weight: 600; }
.opt[data-state="selected"] { background: var(--md-sys-color-primary-container); color: var(--md-sys-color-on-primary-container); }
.opt[data-state] { box-shadow: none; }
/* 刚揭晓：答对的选项弹一下，答错的选项抖一下（只在作答那一刻播放，重绘不再重放） */
.opt.is-new[data-state="right"] .opt-letter, .opt.is-new[data-state="right"] .opt-mark { animation: pop .45s var(--md-sys-motion-easing-emphasized-decelerate); }
.opt.is-new[data-state="wrong"] { animation: shake .45s var(--md-sys-motion-easing-standard); }
@keyframes pop { 0% { transform: scale(.55); } 60% { transform: scale(1.18); } 100% { transform: scale(1); } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-7px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(2px); } }
/* 换题：从翻页方向滑进来 */
.exam-main.slide-next { animation: slide-next .34s var(--md-sys-motion-easing-emphasized-decelerate); }
.exam-main.slide-prev { animation: slide-prev .34s var(--md-sys-motion-easing-emphasized-decelerate); }
@keyframes slide-next { from { opacity: 0; transform: translateX(32px); } to { opacity: 1; transform: none; } }
@keyframes slide-prev { from { opacity: 0; transform: translateX(-32px); } to { opacity: 1; transform: none; } }
.feedback { border-radius: var(--md-sys-shape-corner-large); }
.num { border: 0; border-radius: 10px; background: var(--md-sys-color-surface-container); }
.num[data-state="done"] { background: var(--md-sys-color-primary-container); color: var(--md-sys-color-on-primary-container); }
.legend i { border-radius: 4px; }
.legend .l-done { background: var(--md-sys-color-primary-container); }

/* 对话框、菜单、提示条 */
dialog { border-radius: var(--md-sys-shape-corner-extra-large); background: var(--md-sys-color-surface-container-lowest); }
.dialog-sheet .dialog-actions { background: var(--md-sys-color-surface-container-lowest); }
.jumpers button { border: 0; border-radius: var(--md-sys-shape-corner-full); background: var(--md-sys-color-secondary-container); }
.menu { border-radius: var(--md-sys-shape-corner-medium); background: var(--md-sys-color-surface-container-lowest); box-shadow: var(--md-sys-elevation-3); }
:root[data-theme="dark"] .menu, :root[data-theme="dark"] dialog { box-shadow: 0 0 0 1px var(--md-sys-color-outline-variant), var(--md-sys-elevation-3); }
.avatar { background: var(--md-sys-color-on-surface); color: var(--md-sys-color-surface-container-lowest); }
.toast { border-radius: var(--md-sys-shape-corner-full); padding: var(--s-3) var(--s-5); }

/* 成绩：深色主卡 + 圆环，分数从 0 滚到实际分 */
.grade { padding: var(--s-6); grid-template-columns: auto minmax(0, 1fr); }
.score-ring { position: relative; width: 148px; height: 148px; flex: none; }
.score-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.score-ring .trk { stroke: rgb(255 255 255 / .14); }
.score-ring .val { stroke: #ffffff; stroke-dasharray: 326.73; stroke-dashoffset: calc(326.73 * (1 - var(--p, 0))); }
.grade.is-new .score-ring .val { animation: ring-in 1.2s var(--md-sys-motion-easing-emphasized-decelerate) .15s both; }
@keyframes ring-in { from { stroke-dashoffset: 326.73; } }
.score-ring .score-num { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.score-ring .score-num b { font: 600 2.75rem/1 var(--md-ref-typeface-brand); letter-spacing: -.04em; }
.score-ring .score-num small { margin-top: 4px; font: var(--md-sys-typescale-label-medium); color: var(--md-ext-on-hero-variant); }
.score--pending b { font: var(--md-sys-typescale-headline-small); color: var(--md-ext-on-hero); }
.grade-text h1 { font: var(--md-sys-typescale-headline-small); }
.grade-stats span { border-radius: var(--md-sys-shape-corner-full); background: rgb(255 255 255 / .1); color: var(--md-ext-on-hero); }
.grade-text p { color: var(--md-ext-on-hero-variant); opacity: 1; }
@media (max-width: 599px) { .grade { grid-template-columns: minmax(0, 1fr); padding: var(--s-5); justify-items: center; text-align: center; } .grade-stats { justify-content: center; } .score-ring { width: 132px; height: 132px; } }
.bar { height: 6px; background: var(--md-sys-color-surface-container-high); }
.bar > i { background: var(--md-sys-color-on-surface); transform-origin: left; }
.bar--low > i { background: var(--md-sys-color-error); }
.bars.is-new .bar > i { animation: grow .9s var(--md-sys-motion-easing-emphasized-decelerate) both; animation-delay: calc(var(--i, 0) * 60ms + 200ms); }
@keyframes grow { from { transform: scaleX(0); } }
.rv-no { border-radius: 8px; }

/* 错题集 */
.compose .meter, .meter { background: var(--md-sys-color-surface-container-high); }

/* 门户：题库卡片，图标在上 */
.sys { padding: var(--s-6) var(--s-5) var(--s-5); border-radius: var(--md-sys-shape-corner-extra-large); transition: transform .35s var(--md-sys-motion-easing-standard), box-shadow .35s; }
.sys:hover { transform: translateY(-2px); box-shadow: var(--md-sys-elevation-2); }
.sys::before { display: none; }
.sys-top { flex-direction: column; align-items: flex-start; gap: var(--s-4); }
.sys-top h2 { font: var(--md-sys-typescale-headline-small); letter-spacing: -.02em; }
.sys-meta span { border-radius: var(--md-sys-shape-corner-full); background: var(--md-sys-color-surface-container); }
.sys--soon { background: transparent; box-shadow: inset 0 0 0 1px var(--md-sys-color-outline-variant); }
.sys--soon:hover { transform: none; box-shadow: inset 0 0 0 1px var(--md-sys-color-outline-variant); }
.soon-tag { margin-left: 0; }

/* 登录：输入框白底圆角；宽屏时右侧是深色主卡 */
.field input { border-radius: 12px; border-color: var(--md-sys-color-outline-variant); background: var(--md-sys-color-surface-container-lowest); }
.field label { background: var(--md-sys-color-surface-container-lowest); }
.auth-list > div { display: flex; align-items: center; gap: var(--s-3); }
@media (min-width: 900px) {
  .auth-side { position: relative; overflow: hidden; background: var(--md-ext-hero); color: var(--md-ext-on-hero); }
  .auth-side::after { content: ""; position: absolute; right: -140px; top: -160px; width: 460px; height: 460px; border-radius: 50%; background: radial-gradient(closest-side, rgb(76 141 255 / .35), transparent); pointer-events: none; }
  .auth-side > * { position: relative; z-index: 1; }
  .auth-side .brand-svg { color: #fff; }
  .auth-side .lead { color: var(--md-ext-on-hero-variant); opacity: 1; }
  .auth-list > div { background: rgb(255 255 255 / .07); color: var(--md-ext-on-hero); }
  .auth-list small { color: var(--md-ext-on-hero-variant); }
}

/* 手机上提示可以左右滑动切题（只在触屏、单栏布局时显示） */
.swipe-hint { display: none; }
@media (pointer: coarse) and (max-width: 899px) { .swipe-hint { display: block; text-align: center; font: var(--md-sys-typescale-label-small); color: var(--md-sys-color-on-surface-variant); } }

/* ───────── 极简几何图标（2026-10-14 用户选定，只要图标、不要插画）─────────
   灰色圆角方块底，墨色几何图形加一个蓝色重点；错题用红。颜色全走令牌，深色模式自动换。 */
.mg-ico {
  --mg-bg: var(--md-sys-color-surface-container-high); --mg-ink: var(--md-sys-color-on-surface); --mg-mid: var(--md-sys-color-outline);
  --mg-acc: var(--md-sys-color-primary); --mg-bad: var(--md-sys-color-error);
  display: inline-block; flex: none; width: 56px; height: 56px;
}
.mg-ico svg { display: block; width: 100%; height: 100%; }
.mg-bg { fill: var(--mg-bg); }
.mg-ink { fill: var(--mg-ink); }
.mg-mid { fill: var(--mg-mid); }
.mg-acc { fill: var(--mg-acc); }
.mg-bad { fill: var(--mg-bad); }
.mg-ink-s { fill: none; stroke: var(--mg-ink); }
.mg-mid-s { fill: none; stroke: var(--mg-mid); }
.mg-ico--sm { width: 44px; height: 44px; }
/* 白卡片里的图标底色要比卡片深一档；深色主卡上换成半透明白底、浅色图形 */
.start .mg-ico, .grade .mg-ico { --mg-bg: rgb(255 255 255 / .12); --mg-ink: #f5f5f7; --mg-mid: #8e8e93; --mg-acc: #8ab4ff; }
@media (min-width: 900px) { .auth-side .mg-ico { --mg-bg: rgb(255 255 255 / .12); --mg-ink: #f5f5f7; --mg-mid: #8e8e93; --mg-acc: #8ab4ff; } }
.resume { gap: var(--s-4); }
.resume > div { flex: 1; min-width: 0; }
.choice .mg-ico { margin-bottom: var(--s-1); }
.empty .mg-ico { margin-bottom: var(--s-1); }

/* ───────── VIP：账号菜单里的身份标记 ───────── */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.vip-badge, .vip-dot {
  display: inline-flex; align-items: center; height: 18px; padding: 0 6px; border-radius: var(--md-sys-shape-corner-full);
  background: var(--md-sys-color-primary); color: var(--md-sys-color-on-primary);
  font: 600 11px/1 var(--md-ref-typeface-plain); letter-spacing: .06em;
}
.menu .menu-note b .vip-badge { margin-left: var(--s-2); vertical-align: 2px; }
.menu .menu-note { white-space: nowrap; }
