/* ============ 设计变量 ============ */
:root {
  --bg: #f4f6fb;
  --card: #ffffff;
  --ink: #1e2433;
  --ink-2: #3c4457;
  --muted: #6b7280;
  --line: #e6e9f2;
  --brand: #4f46e5;
  --brand-2: #6366f1;
  --brand-soft: #eef0ff;
  --ok: #10b981;
  --ok-soft: #e7f8f2;
  --bad: #ef4444;
  --bad-soft: #fdecec;
  --warn: #f59e0b;
  --warn-soft: #fef4e4;
  --sky: #0ea5e9;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(23, 31, 56, .04), 0 8px 24px -18px rgba(23, 31, 56, .35);
  --sidebar: 234px;
  --font: "HarmonyOS Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
/* 关键：下面多处用 display 覆盖了 UA 的 [hidden]{display:none}，这里显式兜底 */
[hidden] { display: none !important; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-decoration: none; }
button { font-family: inherit; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #cfd5e6; border-radius: 8px; }

/* ============ 加载 / 骨架 ============ */
.boot {
  position: fixed; inset: 0; display: grid; place-content: center; justify-items: center;
  gap: 12px; background: var(--bg); color: var(--muted); z-index: 50;
}
.boot-logo {
  width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center;
  background: var(--brand); color: #fff; font-size: 26px; font-weight: 700;
  box-shadow: 0 12px 30px -12px rgba(79, 70, 229, .8);
}
.skeleton { background: linear-gradient(90deg, #eef0f6 25%, #f7f8fc 37%, #eef0f6 63%);
  background-size: 400% 100%; animation: sk 1.2s ease infinite; border-radius: 10px; }
@keyframes sk { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* ============ 布局 ============ */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar); flex: 0 0 var(--sidebar); background: var(--card);
  border-right: 1px solid var(--line); padding: 20px 14px 28px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  display: flex; flex-direction: column; gap: 4px;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; }
.brand-logo {
  width: 38px; height: 38px; border-radius: 12px; background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 18px;
  box-shadow: 0 8px 18px -10px #4f46e5;
}
.brand-name { font-weight: 700; font-size: 15px; letter-spacing: .3px; }
.brand-sub { font-size: 11px; color: var(--muted); }
.nav-label { font-size: 11px; color: #9aa1b3; letter-spacing: 1px; margin: 16px 10px 6px; }
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px;
  color: var(--ink-2); cursor: pointer; font-size: 13.5px; user-select: none; border: 0;
  background: transparent; width: 100%; text-align: left; transition: background .15s, color .15s;
}
.nav-item:hover { background: #f3f4fb; }
.nav-item.active { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.nav-item .ico { width: 20px; text-align: center; font-size: 15px; opacity: .9; }
.nav-item .badge { margin-left: auto; }
.sidebar-foot { margin-top: auto; padding-top: 16px; font-size: 11px; color: #9aa1b3; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 60px; display: flex; align-items: center; gap: 12px; padding: 0 26px;
  background: rgba(255, 255, 255, .82); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20;
}
.topbar-title { font-weight: 650; font-size: 15px; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.view { padding: 24px 26px 60px; width: 100%; max-width: 1180px; margin: 0 auto; }
.tabbar { display: none; }

/* ============ 通用组件 ============ */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow);
}
.card + .card { margin-top: 16px; }
.card-title { font-size: 15px; font-weight: 650; margin: 0 0 4px; display: flex; align-items: center; gap: 8px; }
.card-sub { color: var(--muted); font-size: 12.5px; margin: 0 0 16px; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.spacer { flex: 1; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.mt8 { margin-top: 8px; } .mt16 { margin-top: 16px; } .mt24 { margin-top: 24px; }
.mb8 { margin-bottom: 8px; } .mb16 { margin-bottom: 16px; }
.center { text-align: center; }
.hidden { display: none !important; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 16px; border-radius: 10px; border: 1px solid var(--line); background: #fff;
  color: var(--ink-2); font-size: 13.5px; font-weight: 550; cursor: pointer;
  transition: transform .06s, background .15s, border-color .15s, box-shadow .15s;
  white-space: nowrap;
}
.btn:hover { background: #f7f8fc; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff;
  box-shadow: 0 8px 18px -12px rgba(79, 70, 229, .9); }
.btn-primary:hover { background: #4338ca; }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: #f1f2f9; }
.btn-danger { color: var(--bad); border-color: #f6d5d5; background: #fff; }
.btn-danger:hover { background: var(--bad-soft); }
.btn-sm { padding: 5px 10px; font-size: 12.5px; border-radius: 8px; }
.btn-lg { padding: 12px 22px; font-size: 15px; border-radius: 12px; }
.btn-block { width: 100%; }
.icon-btn { border: 0; background: transparent; font-size: 18px; cursor: pointer; color: var(--ink-2);
  width: 34px; height: 34px; border-radius: 9px; }
.icon-btn:hover { background: #f1f2f9; }

.input, .select, .textarea {
  width: 100%; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px;
  background: #fff; font-size: 13.5px; color: var(--ink); outline: none; font-family: inherit;
  transition: border-color .15s, box-shadow .15s;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--brand-2);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, .14); }
.textarea { min-height: 90px; resize: vertical; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label { font-size: 12.5px; color: var(--ink-2); font-weight: 550; }
.field .hint { font-size: 11.5px; color: var(--muted); }
.form-grid { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid .full { grid-column: 1 / -1; }

.pill {
  display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px;
  font-size: 11.5px; font-weight: 550; background: #f1f2f9; color: var(--ink-2);
}
.pill-brand { background: var(--brand-soft); color: var(--brand); }
.pill-ok { background: var(--ok-soft); color: #067a5b; }
.pill-bad { background: var(--bad-soft); color: #b91c1c; }
.pill-warn { background: var(--warn-soft); color: #a16207; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }

.progress { height: 8px; border-radius: 999px; background: #eceefa; overflow: hidden; }
.progress > i { display: block; height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, #6366f1, #8b5cf6); transition: width .4s ease; }
.progress.ok > i { background: linear-gradient(90deg, #10b981, #34d399); }
.progress.warn > i { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.progress.bad > i { background: linear-gradient(90deg, #ef4444, #f87171); }

.stat { padding: 16px 18px; border-radius: var(--radius); background: var(--card);
  border: 1px solid var(--line); box-shadow: var(--shadow); }
.stat .k { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.stat .v { font-size: 26px; font-weight: 720; letter-spacing: -.5px; margin-top: 4px; }
.stat .v small { font-size: 12px; font-weight: 500; color: var(--muted); margin-left: 3px; }
.stat .foot { font-size: 11.5px; color: var(--muted); margin-top: 2px; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; background: #fff; }
.tbl th, .tbl td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl th { background: #fafbff; color: var(--muted); font-weight: 550; font-size: 12px; white-space: nowrap; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr:hover td { background: #fafbff; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tab { padding: 9px 14px; border: 0; background: transparent; cursor: pointer; font-size: 13.5px;
  color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tab.active { color: var(--brand); border-bottom-color: var(--brand); font-weight: 600; }

.empty { padding: 42px 20px; text-align: center; color: var(--muted); }
.empty .big { font-size: 34px; margin-bottom: 8px; opacity: .7; }
.divider { height: 1px; background: var(--line); margin: 16px 0; }

/* ============ 登录 ============ */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.05fr .95fr; background: var(--bg); }
.auth-hero {
  background: radial-gradient(1100px 500px at 12% 8%, #4f46e5 0%, #4338ca 45%, #312e81 100%);
  color: #fff; padding: 64px 60px; display: flex; flex-direction: column; justify-content: center;
  position: relative; overflow: hidden;
}
.auth-hero::after {
  content: ""; position: absolute; width: 460px; height: 460px; right: -140px; bottom: -160px;
  border-radius: 50%; background: rgba(255, 255, 255, .07);
}
.auth-hero h1 { font-size: 34px; line-height: 1.3; margin: 18px 0 12px; letter-spacing: -.5px; }
.auth-hero p { color: #dcd9ff; max-width: 420px; }
.auth-hero ul { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 12px; }
.auth-hero li { display: flex; gap: 10px; align-items: flex-start; color: #ecebff; font-size: 13.5px; }
.auth-hero li b { color: #fff; }
.auth-side { display: grid; place-items: center; padding: 40px 24px; }
.auth-card { width: 100%; max-width: 380px; }
.auth-card h2 { font-size: 22px; margin: 0 0 4px; }
.auth-card .sub { color: var(--muted); margin-bottom: 24px; font-size: 13px; }
.auth-tip { margin-top: 18px; padding: 12px 14px; border-radius: 10px; background: var(--brand-soft);
  color: #4338ca; font-size: 12.5px; }

/* ============ 首页 ============ */
.hero {
  border-radius: 18px; padding: 26px 28px; color: #fff; position: relative; overflow: hidden;
  background: radial-gradient(900px 320px at 0% 0%, #6366f1, #4f46e5 55%, #3730a3);
  box-shadow: 0 20px 40px -28px rgba(67, 56, 202, .9);
}
.hero::after { content: ""; position: absolute; right: -60px; top: -70px; width: 280px; height: 280px;
  border-radius: 50%; background: rgba(255, 255, 255, .08); }
.hero h2 { margin: 0 0 6px; font-size: 22px; }
.hero p { margin: 0; color: #e0defe; font-size: 13.5px; }
.hero .goal { display: flex; align-items: center; gap: 16px; margin-top: 20px; position: relative; z-index: 1; }
.hero .ring { --p: 0; width: 74px; height: 74px; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(#fff calc(var(--p) * 1%), rgba(255,255,255,.22) 0);
  flex: 0 0 auto; }
.hero .ring > span { width: 58px; height: 58px; border-radius: 50%; background: #4338ca; display: grid;
  place-items: center; font-size: 14px; font-weight: 650; }
.hero .goal-txt { font-size: 12.5px; color: #dcd9ff; }
.hero-actions { position: relative; z-index: 1; margin-top: 18px; display: flex; gap: 10px; flex-wrap: wrap; }
.hero-actions .btn { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .22); color: #fff; backdrop-filter: blur(4px); }
.hero-actions .btn:hover { background: rgba(255, 255, 255, .24); }
.hero-actions .btn.white { background: #fff; color: #3730a3; border-color: #fff; }

.subject-card { display: flex; flex-direction: column; gap: 10px; cursor: pointer; transition: transform .12s, box-shadow .12s; }
.subject-card:hover { transform: translateY(-2px); box-shadow: 0 16px 30px -22px rgba(23,31,56,.6); }
.subject-head { display: flex; align-items: center; gap: 11px; }
.subject-ico { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  color: #fff; font-size: 19px; flex: 0 0 auto; }
.subject-name { font-weight: 650; font-size: 14.5px; }
.mini-bars { display: flex; gap: 5px; align-items: flex-end; height: 30px; margin-top: 2px; }
.mini-bars i { flex: 1; border-radius: 3px 3px 0 0; background: #e9ebf6; min-height: 3px; }
.mini-bars i.on { background: #c7c9f8; }

.quick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.quick-item { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px;
  background: #fafbff; border: 1px solid var(--line); cursor: pointer; transition: background .15s; }
.quick-item:hover { background: #f2f3fc; }
.quick-item .qi { font-size: 18px; }
.quick-item .qt { font-size: 13px; font-weight: 550; }
.quick-item .qs { font-size: 11px; color: var(--muted); }

.chapter-list { display: grid; gap: 8px; }
.chapter {
  border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: #fff;
}
.chapter-head { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.chapter-name { font-weight: 600; font-size: 13.5px; }
.chapter-meta { margin-left: auto; display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); }
.chapter-children { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line);
  display: grid; gap: 6px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.chapter-child { display: flex; align-items: center; gap: 8px; padding: 7px 9px; border-radius: 8px;
  font-size: 12.8px; cursor: pointer; color: var(--ink-2); }
.chapter-child:hover { background: var(--brand-soft); color: var(--brand); }
.chapter-child .cnt { margin-left: auto; font-size: 11px; color: var(--muted); }

/* ============ 刷题 ============ */
.practice-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.practice-head .title { font-weight: 650; }
.q-card { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 26px 28px;
  box-shadow: var(--shadow); }
.q-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.q-stem { font-size: 16.5px; line-height: 1.75; font-weight: 560; white-space: pre-wrap; }
.q-options { display: grid; gap: 10px; margin-top: 20px; }
.opt {
  display: flex; gap: 12px; align-items: flex-start; padding: 13px 15px; border: 1.5px solid var(--line);
  border-radius: 12px; cursor: pointer; background: #fff; transition: border-color .12s, background .12s;
  user-select: none;
}
.opt:hover { border-color: #c7c9f8; background: #fbfbff; }
.opt .key {
  width: 26px; height: 26px; flex: 0 0 auto; border-radius: 8px; display: grid; place-items: center;
  background: #f1f2f9; font-weight: 650; font-size: 12.5px; color: var(--ink-2);
}
.opt .txt { flex: 1; padding-top: 1px; }
.opt.sel { border-color: var(--brand); background: var(--brand-soft); }
.opt.sel .key { background: var(--brand); color: #fff; }
.opt.right { border-color: var(--ok); background: var(--ok-soft); }
.opt.right .key { background: var(--ok); color: #fff; }
.opt.wrong { border-color: var(--bad); background: var(--bad-soft); }
.opt.wrong .key { background: var(--bad); color: #fff; }
.opt.disabled { pointer-events: none; }

.answer-box { margin-top: 18px; padding: 14px 16px; border-radius: 12px; background: #fafbff;
  border: 1px solid var(--line); }
.answer-box.ok { background: var(--ok-soft); border-color: #bfe9da; }
.answer-box.bad { background: var(--bad-soft); border-color: #f6cfcf; }
.answer-box .verdict { font-weight: 650; display: flex; align-items: center; gap: 8px; }
.answer-box .analysis { margin-top: 8px; color: var(--ink-2); font-size: 13.5px; white-space: pre-wrap; }

.qnav { display: flex; align-items: center; gap: 10px; margin-top: 18px; }
.qnav .progress { flex: 1; }
.qdots { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.qdot { width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--line); background: #fff;
  font-size: 11.5px; cursor: pointer; color: var(--muted); }
.qdot.done { background: var(--ok-soft); border-color: #bfe9da; color: #067a5b; }
.qdot.cur { border-color: var(--brand); color: var(--brand); font-weight: 650; box-shadow: 0 0 0 2px rgba(99,102,241,.18); }
.qdot.bad { background: var(--bad-soft); border-color: #f6cfcf; color: #b91c1c; }

.mode-grid { display: grid; gap: 10px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mode-item { padding: 14px; border: 1.5px solid var(--line); border-radius: 12px; cursor: pointer; background: #fff; }
.mode-item:hover { border-color: #c7c9f8; }
.mode-item.on { border-color: var(--brand); background: var(--brand-soft); }
.mode-item .mi { font-size: 20px; }
.mode-item .mt { font-weight: 600; font-size: 13.5px; margin-top: 6px; }
.mode-item .md { font-size: 11.5px; color: var(--muted); }

.timer { font-variant-numeric: tabular-nums; font-weight: 650; color: var(--brand); }

/* ============ 结果 / 统计 ============ */
.result-hero { text-align: center; padding: 10px 0 6px; }
.result-score { font-size: 46px; font-weight: 760; letter-spacing: -2px; line-height: 1.1; }
.result-score small { font-size: 16px; color: var(--muted); font-weight: 500; }
.chart { width: 100%; height: 200px; }
.chart svg { display: block; width: 100%; height: 100%; overflow: visible; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.legend i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; margin-right: 5px; }

.bar-row { display: grid; grid-template-columns: 132px 1fr 58px; gap: 12px; align-items: center;
  padding: 7px 0; font-size: 13px; }
.bar-row .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-row .val { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); font-size: 12px; }

.heatmap { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.hm-cell { aspect-ratio: 1; border-radius: 5px; background: #eef0f8; }
.hm-cell.l1 { background: #dcdcfb; } .hm-cell.l2 { background: #b9b8f7; }
.hm-cell.l3 { background: #8b86f0; } .hm-cell.l4 { background: #5b52e8; }

.review-list { display: grid; gap: 10px; }
.review-item { border: 1px solid var(--line); border-radius: 12px; padding: 13px 15px; background: #fff; }
.review-item .stem { font-size: 13.5px; font-weight: 550; margin-bottom: 8px; }
.review-item .opts { display: grid; gap: 4px; font-size: 12.5px; color: var(--ink-2); }
.review-item .ops-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; font-size: 12px; }

/* ============ 后台 ============ */
.admin-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.admin-tabs .btn.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.import-zone { border: 1.5px dashed #cdd2e6; border-radius: 14px; padding: 30px; text-align: center;
  background: #fafbff; cursor: pointer; }
.import-zone:hover { border-color: var(--brand-2); background: var(--brand-soft); }

/* ============ Toast / Modal ============ */
.toast {
  position: fixed; left: 50%; bottom: 34px; transform: translateX(-50%); z-index: 90;
  background: #1f2433; color: #fff; padding: 10px 18px; border-radius: 10px; font-size: 13px;
  box-shadow: 0 12px 30px -12px rgba(0,0,0,.5); max-width: min(90vw, 480px);
}
.toast.err { background: #b91c1c; }
.backdrop { position: fixed; inset: 0; background: rgba(18, 22, 35, .46); z-index: 80;
  display: grid; place-items: center; padding: 20px; }
.modal { width: min(560px, 96vw); max-height: 86vh; overflow: auto; background: #fff;
  border-radius: 16px; padding: 22px; box-shadow: 0 30px 60px -30px rgba(0,0,0,.5); }
.modal h3 { margin: 0 0 14px; font-size: 16px; }
.modal .modal-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }

/* ============ 响应式 ============ */
@media (max-width: 1080px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quick { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .auth-hero { padding: 44px 36px; }
  .auth-hero h1 { font-size: 27px; }
}
@media (max-width: 860px) {
  .sidebar { position: fixed; left: 0; top: 0; z-index: 60; transform: translateX(-100%);
    transition: transform .22s ease; box-shadow: 0 0 40px rgba(0,0,0,.2); }
  .sidebar.open { transform: none; }
  .view { padding: 16px 14px 90px; }
  .topbar { padding: 0 14px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); }
  .quick { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .auth-wrap { grid-template-columns: minmax(0, 1fr); }
  .auth-hero { display: none; }
  .mode-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chapter-children { grid-template-columns: minmax(0, 1fr); }
  .mobile-only { display: inline-flex !important; }
  .tabbar {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 40; background: #fff;
    border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .tabbar a { flex: 1; text-align: center; font-size: 10.5px; color: var(--muted); padding: 4px 0; }
  .tabbar a .ti { display: block; font-size: 19px; line-height: 1.3; }
  .tabbar a.active { color: var(--brand); }
  .bar-row { grid-template-columns: 96px 1fr 48px; }
  .q-card { padding: 18px 16px; border-radius: 14px; }
  .q-stem { font-size: 15.5px; }
  .result-score { font-size: 38px; }
  .modal { padding: 18px; }
}
.desktop-only { display: inline-flex; }
@media (max-width: 860px) { .desktop-only { display: none !important; } }
