/* ============================================================
   刷题喵 · 移动优先样式
   设计原则：单手持握可点、深色模式不刺眼、信息层级靠留白而非线条
   ============================================================ */

:root {
  --brand: #4a6cf7;
  --brand-soft: #eef1ff;
  --brand-deep: #3451d1;
  --ok: #12b76a;
  --ok-soft: #e7f8f0;
  --bad: #f04438;
  --bad-soft: #fdecea;
  --warn: #f79009;

  --bg: #f4f5f9;
  --card: #ffffff;
  --text: #101828;
  --text-2: #667085;
  --text-3: #98a2b3;
  --line: #eaecf0;

  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 2px 12px rgba(16, 24, 40, 0.06);
  --shadow-lg: 0 12px 40px rgba(16, 24, 40, 0.14);

  --safe-b: env(safe-area-inset-bottom, 0px);
  --tabbar-h: 58px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --brand-soft: #1e2540;
    --ok-soft: #0d2b21;
    --bad-soft: #331a19;
    --bg: #0e1015;
    --card: #181b22;
    --text: #e9eaee;
    --text-2: #98a0ae;
    --text-3: #6b7280;
    --line: #262a33;
    --shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.6);
  }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.6;
  overscroll-behavior-y: none;
  /* 任何元素都不允许把页面撑出横向滚动——竖屏手机上横向滚动=bug */
  overflow-x: clip;
}

body { -webkit-font-smoothing: antialiased; }

h1, h2, h3, p { margin: 0; }
button { font-family: inherit; font-size: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
input, textarea { font-family: inherit; font-size: inherit; }
em { font-style: normal; }
[hidden] { display: none !important; }

#app { min-height: 100dvh; }

#main {
  padding: 0 16px calc(var(--tabbar-h) + var(--safe-b) + 24px);
  max-width: 720px;
  margin: 0 auto;
}

/* ------------------------------------------------------------ 题库首页 -- */
.hero {
  padding: 24px 0 16px;
}
.hero-greet h1 { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; }
.hero-greet p { color: var(--text-2); font-size: 13px; margin-top: 4px; }

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 18px;
}
.hero-stat {
  background: var(--card);
  border-radius: var(--radius-sm);
  padding: 12px 8px;
  text-align: center;
  box-shadow: var(--shadow);
}
.hero-stat b { display: block; font-size: 19px; font-weight: 700; letter-spacing: -0.02em; }
.hero-stat span { font-size: 11px; color: var(--text-3); }

.quick-actions {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 10px;
  margin-top: 16px;
}
.action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 52px;
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
  font-weight: 600;
  font-size: 14px;
  transition: transform 0.12s, box-shadow 0.12s;
}
.action-btn:active { transform: scale(0.97); }
.action-btn.primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
  color: #fff;
  box-shadow: 0 6px 20px rgba(74, 108, 247, 0.35);
}
.action-btn .ic { font-size: 17px; }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 26px 0 12px;
}
.section-head h2 { font-size: 16px; font-weight: 700; }
.text-btn { color: var(--brand); font-size: 13px; font-weight: 600; }

.bank-list { display: flex; flex-direction: column; gap: 12px; }

.bank-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  display: flex;
  gap: 14px;
  align-items: center;
  animation: pop 0.25s ease both;
}
.bank-card:active { transform: scale(0.99); }

.bank-avatar {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 22px;
  flex: 0 0 auto;
  background: var(--brand-soft);
}
.bank-main { flex: 1; min-width: 0; }
.bank-name {
  font-weight: 650;
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bank-meta {
  font-size: 12px;
  color: var(--text-2);
  margin-top: 4px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.bank-meta .dot { color: var(--line); }

.bank-progress {
  margin-top: 9px;
  height: 5px;
  border-radius: 9px;
  background: var(--line);
  overflow: hidden;
}
.bank-progress i {
  display: block;
  height: 100%;
  border-radius: 9px;
  background: linear-gradient(90deg, var(--brand), #7c9cff);
  transition: width 0.4s ease;
}
.bank-status { font-size: 12px; color: var(--brand); margin-top: 6px; }
.bank-status.failed { color: var(--bad); }
.bank-status.ready { color: var(--ok); }

.skeleton-card {
  height: 92px;
  border-radius: var(--radius);
  background: linear-gradient(90deg, var(--card) 25%, var(--line) 37%, var(--card) 63%);
  background-size: 400% 100%;
  animation: shimmer 1.3s infinite;
}

.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-3);
}
.empty-state .big { font-size: 40px; display: block; margin-bottom: 12px; opacity: 0.6; }
.empty-state p { font-size: 14px; }
.empty-state .sm { font-size: 12px; margin-top: 6px; color: var(--text-3); }

/* ------------------------------------------------------------ 错题本 -- */
.page-head { padding: 24px 0 14px; }
.page-head h1 { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; }
.page-head .sub { color: var(--text-2); font-size: 13px; margin-top: 4px; }

.segmented {
  display: flex;
  gap: 4px;
  background: var(--line);
  padding: 4px;
  border-radius: 12px;
  margin-bottom: 14px;
}
.seg {
  flex: 1;
  padding: 9px 6px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  transition: all 0.18s;
}
.seg em { font-size: 11px; opacity: 0.7; margin-left: 2px; }
.seg.active { background: var(--card); color: var(--text); box-shadow: var(--shadow); }

.filter-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 10px;
  margin-bottom: 6px;
  scrollbar-width: none;
}
.filter-bar::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12.5px;
  background: var(--card);
  color: var(--text-2);
  box-shadow: var(--shadow);
  font-weight: 500;
}
.chip.active { background: var(--brand); color: #fff; }

.wrong-list { display: flex; flex-direction: column; gap: 10px; }

.q-preview {
  background: var(--card);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--shadow);
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.q-preview .idx {
  width: 26px; height: 26px;
  border-radius: 8px;
  display: grid; place-items: center;
  font-size: 12px; font-weight: 700;
  background: var(--brand-soft);
  color: var(--brand);
  flex: 0 0 auto;
}
.q-preview .idx.bad { background: var(--bad-soft); color: var(--bad); }
.q-preview .txt {
  flex: 1; font-size: 14px; line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.q-preview .tag {
  font-size: 11px; color: var(--text-3);
  padding: 2px 7px; border-radius: 6px; background: var(--bg);
  flex: 0 0 auto;
}

.fab {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(var(--tabbar-h) + var(--safe-b) + 16px);
  padding: 13px 30px;
  border-radius: 30px;
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
  color: #fff;
  font-weight: 650;
  font-size: 14px;
  box-shadow: 0 8px 24px rgba(74, 108, 247, 0.4);
  z-index: 30;
}

/* ------------------------------------------------------------ 我的 -- */
.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  margin-bottom: 14px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.stat-box { text-align: center; }
.stat-box b { display: block; font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.stat-box span { font-size: 11.5px; color: var(--text-3); }
.stat-box b.ok { color: var(--ok); }
.stat-box b.bad { color: var(--bad); }

.chart-wrap { margin-top: 12px; }
.chart-wrap canvas { width: 100%; display: block; }

.mini-list { display: flex; flex-direction: column; gap: 8px; }
.mini-item {
  background: var(--card);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow);
  font-size: 13.5px;
}
.mini-item .score { font-weight: 700; font-size: 15px; }
.mini-item .score.good { color: var(--ok); }
.mini-item .score.mid { color: var(--warn); }
.mini-item .score.bad { color: var(--bad); }
.mini-item small { color: var(--text-3); font-size: 11.5px; }

.settings-card .field { display: block; margin-bottom: 12px; }
.field span { display: block; font-size: 12.5px; color: var(--text-2); margin-bottom: 6px; font-weight: 500; }
.field input {
  width: 100%;
  padding: 11px 13px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--line);
  background: var(--bg);
  color: var(--text);
  outline: none;
  transition: border-color 0.15s;
}
.field input:focus { border-color: var(--brand); }

.btn-row { display: flex; gap: 10px; margin-top: 6px; }
.btn {
  flex: 1;
  padding: 12px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 14px;
  transition: transform 0.12s, opacity 0.15s;
}
.btn:active { transform: scale(0.98); }
.btn.primary { background: var(--brand); color: #fff; }
.btn.ghost { background: var(--bg); color: var(--text-2); border: 1.5px solid var(--line); }
.btn.danger { background: var(--bad-soft); color: var(--bad); }
.btn:disabled { opacity: 0.5; }

.hint { font-size: 12px; color: var(--text-3); line-height: 1.6; }
.danger-card { padding: 14px; }
.footer-note { text-align: center; font-size: 11.5px; color: var(--text-3); padding: 20px 0; }

/* ------------------------------------------------------------ 底部导航 -- */
.tabbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: calc(var(--tabbar-h) + var(--safe-b));
  padding-bottom: var(--safe-b);
  display: flex;
  background: color-mix(in srgb, var(--card) 88%, transparent);
  backdrop-filter: saturate(160%) blur(16px);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  border-top: 1px solid var(--line);
  z-index: 40;
}
.tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 10.5px;
  color: var(--text-3);
  font-weight: 500;
  transition: color 0.15s;
}
.tab .ti { font-size: 19px; line-height: 1; filter: grayscale(1); opacity: 0.55; transition: all 0.15s; }
.tab.active { color: var(--brand); }
.tab.active .ti { filter: none; opacity: 1; transform: translateY(-1px); }

/* ------------------------------------------------------------ 答题器 -- */
.player {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 60;
  display: flex;
  flex-direction: column;
  animation: slideUp 0.26s cubic-bezier(0.22, 1, 0.36, 1);
}
.player-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px 8px;
  padding-top: calc(12px + env(safe-area-inset-top, 0px));
}
.icon-btn {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: grid; place-items: center;
  font-size: 16px;
  color: var(--text-2);
  background: var(--card);
  flex: 0 0 auto;
}
.player-title { flex: 1; text-align: center; min-width: 0; }
.player-title strong {
  display: block; font-size: 14px; font-weight: 650;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.player-title span { font-size: 11.5px; color: var(--text-3); }

.progress-line { height: 3px; background: var(--line); margin: 0 14px; border-radius: 3px; overflow: hidden; }
.progress-line i {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--brand), #7c9cff);
  border-radius: 3px;
  transition: width 0.3s ease;
}

.player-body {
  flex: 1;
  overflow-y: auto;
  padding: 18px 16px 130px;
  max-width: 720px;
  width: 100%;
  margin: 0 auto;
  -webkit-overflow-scrolling: touch;
}

.q-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.q-type {
  font-size: 11px; font-weight: 700;
  padding: 3px 9px; border-radius: 6px;
  background: var(--brand-soft); color: var(--brand);
}
.q-type.multi { background: #fff4e5; color: #b54708; }
.q-type.judge { background: var(--ok-soft); color: #027a48; }
.q-type.fill { background: #f4f3ff; color: #5925dc; }
.q-seq { font-size: 12px; color: var(--text-3); }
.q-star { margin-left: auto; font-size: 19px; opacity: 0.35; transition: all 0.15s; }
.q-star.on { opacity: 1; filter: drop-shadow(0 2px 6px rgba(247, 144, 9, 0.4)); }

.q-stem {
  font-size: 17px;
  line-height: 1.72;
  font-weight: 500;
  letter-spacing: 0.01em;
  white-space: pre-wrap;
  word-break: break-word;
}

.options { margin-top: 20px; display: flex; flex-direction: column; gap: 10px; }

.opt {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 15px;
  border-radius: 14px;
  background: var(--card);
  border: 1.5px solid transparent;
  box-shadow: var(--shadow);
  transition: all 0.16s;
  text-align: left;
  width: 100%;
}
.opt:active { transform: scale(0.99); }
.opt .k {
  width: 26px; height: 26px;
  border-radius: 8px;
  display: grid; place-items: center;
  font-size: 12.5px; font-weight: 700;
  background: var(--bg); color: var(--text-2);
  flex: 0 0 auto;
  transition: all 0.16s;
}
.opt .t { flex: 1; font-size: 15px; line-height: 1.6; word-break: break-word; }

.opt.picked { border-color: var(--brand); background: var(--brand-soft); }
.opt.picked .k { background: var(--brand); color: #fff; }

.opt.correct { border-color: var(--ok); background: var(--ok-soft); }
.opt.correct .k { background: var(--ok); color: #fff; }
.opt.wrong { border-color: var(--bad); background: var(--bad-soft); }
.opt.wrong .k { background: var(--bad); color: #fff; }

.judge-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 20px; }
.judge-btn {
  padding: 26px 10px;
  border-radius: 16px;
  background: var(--card);
  box-shadow: var(--shadow);
  font-size: 17px; font-weight: 650;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  border: 1.5px solid transparent;
  transition: all 0.16s;
}
.judge-btn span { font-size: 26px; }
.judge-btn.picked { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }
.judge-btn.correct { border-color: var(--ok); background: var(--ok-soft); color: var(--ok); }
.judge-btn.wrong { border-color: var(--bad); background: var(--bad-soft); color: var(--bad); }

.fill-input {
  width: 100%;
  margin-top: 20px;
  padding: 15px;
  border-radius: 14px;
  border: 1.5px solid var(--line);
  background: var(--card);
  color: var(--text);
  font-size: 16px;
  outline: none;
  min-height: 88px;
  resize: vertical;
  line-height: 1.6;
}
.fill-input:focus { border-color: var(--brand); }

/* 判分结果区 */
.result-banner {
  margin-top: 18px;
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  animation: pop 0.22s ease both;
}
.result-banner.ok { background: var(--ok-soft); }
.result-banner.bad { background: var(--bad-soft); }
.result-banner .ric { font-size: 22px; line-height: 1.2; }
.result-banner .rtxt strong { display: block; font-size: 15px; font-weight: 700; margin-bottom: 2px; }
.result-banner.ok .rtxt strong { color: #027a48; }
.result-banner.bad .rtxt strong { color: #b42318; }
.result-banner .rtxt div { font-size: 13.5px; color: var(--text-2); line-height: 1.6; }

.analysis-box {
  margin-top: 14px;
  background: var(--card);
  border-radius: 14px;
  padding: 16px;
  box-shadow: var(--shadow);
}
.analysis-box h3 {
  font-size: 13px; font-weight: 700; color: var(--text-2);
  margin-bottom: 8px; display: flex; align-items: center; gap: 6px;
}
.analysis-box .body { font-size: 14px; line-height: 1.75; color: var(--text); white-space: pre-wrap; }

.ai-actions { display: flex; gap: 9px; margin-top: 14px; }
.ai-btn {
  flex: 1;
  padding: 12px;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 650;
  background: var(--card);
  box-shadow: var(--shadow);
  color: var(--brand);
  display: flex; align-items: center; justify-content: center; gap: 6px;
  transition: all 0.15s;
}
.ai-btn:active { transform: scale(0.97); }
.ai-btn.alt { color: #7c3aed; }
.ai-btn.loading { opacity: 0.6; pointer-events: none; }

.ai-panel {
  margin-top: 14px;
  background: var(--card);
  border-radius: 14px;
  box-shadow: var(--shadow);
  overflow: hidden;
  border: 1.5px solid var(--brand-soft);
}
.ai-panel-head {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px;
  background: linear-gradient(135deg, var(--brand-soft), transparent);
  font-size: 13px; font-weight: 700; color: var(--brand);
}
.ai-panel-head .spacer { flex: 1; }
.ai-panel-head button { font-size: 12px; color: var(--text-3); font-weight: 500; }
.ai-content {
  padding: 4px 16px 16px;
  font-size: 14px;
  line-height: 1.78;
  word-break: break-word;
}
.ai-content h2 {
  font-size: 14.5px; font-weight: 700; margin: 14px 0 6px;
  padding-left: 9px; border-left: 3px solid var(--brand);
}
.ai-content h3 { font-size: 14px; font-weight: 650; margin: 12px 0 4px; }
.ai-content p { margin: 7px 0; }
.ai-content ul, .ai-content ol { margin: 7px 0; padding-left: 20px; }
.ai-content li { margin: 4px 0; }
.ai-content strong { font-weight: 700; color: var(--text); }
.ai-content code {
  background: var(--bg); padding: 1px 5px; border-radius: 4px;
  font-size: 13px; font-family: ui-monospace, Menlo, monospace;
}
.ai-content table { width: 100%; border-collapse: collapse; margin: 10px 0; font-size: 13px; }
.ai-content th, .ai-content td { border: 1px solid var(--line); padding: 7px 9px; text-align: left; }
.ai-content th { background: var(--bg); font-weight: 600; }
.cursor-blink::after {
  content: "▊";
  animation: blink 1s steps(2) infinite;
  color: var(--brand);
  margin-left: 1px;
}

/* 底部操作栏 */
.player-foot {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  padding: 12px 16px calc(12px + var(--safe-b));
  display: flex;
  gap: 10px;
  align-items: center;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  z-index: 5;
}
.foot-btn {
  padding: 13px 18px;
  border-radius: 13px;
  font-weight: 650;
  font-size: 14.5px;
  background: var(--card);
  color: var(--text-2);
  box-shadow: var(--shadow);
  transition: all 0.15s;
  white-space: nowrap;
}
.foot-btn:active { transform: scale(0.97); }
.foot-btn.main {
  flex: 1;
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
  color: #fff;
  box-shadow: 0 6px 18px rgba(74, 108, 247, 0.35);
}
.foot-btn:disabled { opacity: 0.4; }
.foot-btn.ghost { box-shadow: none; background: transparent; }

/* 答题卡 */
.answer-card-panel {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: var(--bg);
  overflow-y: auto;
  padding: 20px 20px calc(24px + var(--safe-b));
  animation: slideUp 0.24s ease;
}
.ac-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.ac-head h3 { font-size: 17px; font-weight: 700; }
.ac-legend { display: flex; gap: 14px; font-size: 11.5px; color: var(--text-3); margin-bottom: 14px; }
.ac-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 4px; }
.ac-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); gap: 9px; }
.ac-cell {
  aspect-ratio: 1;
  border-radius: 11px;
  display: grid; place-items: center;
  font-size: 13.5px; font-weight: 600;
  background: var(--card);
  box-shadow: var(--shadow);
  color: var(--text-2);
}
.ac-cell.done { background: var(--brand-soft); color: var(--brand); }
.ac-cell.right { background: var(--ok-soft); color: var(--ok); }
.ac-cell.bad { background: var(--bad-soft); color: var(--bad); }
.ac-cell.current { outline: 2px solid var(--brand); outline-offset: 1px; }

/* ------------------------------------------------------------ 抽屉/弹层 -- */
.sheet-mask {
  position: fixed; inset: 0;
  background: rgba(16, 24, 40, 0.45);
  backdrop-filter: blur(2px);
  z-index: 80;
  animation: fade 0.2s;
}
.sheet {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  max-height: 86dvh;
  overflow-y: auto;
  background: var(--card);
  border-radius: 22px 22px 0 0;
  padding: 8px 20px calc(24px + var(--safe-b));
  z-index: 81;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.26s cubic-bezier(0.22, 1, 0.36, 1);
  max-width: 720px;
  margin: 0 auto;
}
.sheet::before {
  content: "";
  display: block;
  width: 38px; height: 4px;
  border-radius: 3px;
  background: var(--line);
  margin: 6px auto 16px;
}
.sheet h2 { font-size: 19px; font-weight: 700; letter-spacing: -0.02em; }
.sheet .sheet-sub { font-size: 12.5px; color: var(--text-2); margin-top: 4px; }

.sheet-menu { display: flex; flex-direction: column; gap: 9px; margin-top: 18px; }
.menu-item {
  display: flex; align-items: center; gap: 13px;
  padding: 14px 15px;
  border-radius: 14px;
  background: var(--bg);
  text-align: left;
  transition: all 0.15s;
}
.menu-item:active { transform: scale(0.99); }
.menu-item .mi { font-size: 19px; width: 24px; text-align: center; }
.menu-item .mt { flex: 1; }
.menu-item .mt strong { display: block; font-size: 14.5px; font-weight: 620; }
.menu-item .mt small { font-size: 11.5px; color: var(--text-3); }
.menu-item.danger .mt strong { color: var(--bad); }

.exam-setup { margin-top: 16px; }
.exam-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--line); }
.exam-row label { font-size: 14px; color: var(--text-2); }
.exam-row .val { font-weight: 650; font-size: 14px; color: var(--brand); }
.stepper { display: flex; align-items: center; gap: 12px; }
.stepper button {
  width: 30px; height: 30px; border-radius: 9px;
  background: var(--bg); font-size: 16px; color: var(--text-2);
  display: grid; place-items: center;
}

.modal {
  position: fixed; inset: 0;
  background: rgba(16, 24, 40, 0.5);
  display: grid; place-items: center;
  z-index: 90;
  padding: 24px;
  animation: fade 0.18s;
}
.modal-box {
  background: var(--card);
  border-radius: 18px;
  padding: 22px;
  max-width: 400px;
  width: 100%;
  animation: pop 0.2s ease;
}
.modal-box h3 { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.modal-box p { font-size: 13.5px; color: var(--text-2); line-height: 1.65; }
.modal-box .btn-row { margin-top: 18px; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 90px;
  transform: translateX(-50%) translateY(14px);
  background: rgba(16, 24, 40, 0.92);
  color: #fff;
  font-size: 13.5px;
  padding: 11px 20px;
  border-radius: 22px;
  opacity: 0;
  pointer-events: none;
  transition: all 0.24s;
  z-index: 100;
  max-width: 80vw;
  text-align: center;
  line-height: 1.5;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ------------------------------------------------------------ 动画 -- */
@keyframes pop { from { opacity: 0; transform: scale(0.97); } to { opacity: 1; transform: scale(1); } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(16px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
@keyframes blink { 50% { opacity: 0; } }

.slide-in-right { animation: inRight 0.22s ease both; }
.slide-in-left { animation: inLeft 0.22s ease both; }
@keyframes inRight { from { opacity: 0; transform: translateX(26px); } to { opacity: 1; transform: translateX(0); } }
@keyframes inLeft { from { opacity: 0; transform: translateX(-26px); } to { opacity: 1; transform: translateX(0); } }

/* 桌面端微调 */
@media (min-width: 600px) {
  .hero-greet h1, .page-head h1 { font-size: 27px; }
  .player-body { padding-bottom: 140px; }
  #main { padding-left: 24px; padding-right: 24px; }
}
