/* ================= 基础 ================= */
:root {
  --bg: #f4f6fb;
  --card: #ffffff;
  --text: #1e293b;
  --muted: #64748b;
  --border: #e2e8f0;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --green: #16a34a;
  --green-soft: #f0fdf4;
  --red: #dc2626;
  --red-soft: #fef2f2;
  --amber: #d97706;
  --radius: 18px;
  --shadow: 0 12px 32px rgba(15, 23, 42, .06);
  --accent: #2563eb;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei",
    "PingFang SC", "Hiragino Sans GB", sans-serif;
  font-size: 15px;
  line-height: 1.7;
  background:
    radial-gradient(900px 420px at 8% -8%, #dbeafe 0%, rgba(219, 234, 254, 0) 55%),
    radial-gradient(760px 380px at 92% 0%, #ede9fe 0%, rgba(237, 233, 254, 0) 55%),
    var(--bg);
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }

/* ================= 顶栏 / 页脚 ================= */
.topbar {
  max-width: 1120px;
  margin: 0 auto;
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: .02em;
  font-size: 16px;
}
.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  box-shadow: 0 6px 16px rgba(37, 99, 235, .3);
  font-size: 16px;
}
.topnav { display: flex; gap: 18px; color: var(--muted); font-size: 14px; }
.topnav a:hover { color: var(--text); }
.app { max-width: 1120px; margin: 0 auto; padding: 10px 22px 70px; }
.footer {
  max-width: 1120px;
  margin: 0 auto;
  padding: 26px 22px 40px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}
.footer p { margin: 4px 0; }
.footer-sub { opacity: .8; }

/* ================= 首页 ================= */
.home-hero {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  padding: 54px 46px;
  color: #fff;
  background: linear-gradient(130deg, #0f172a 0%, #1e3a8a 55%, #0e7490 100%);
  box-shadow: 0 24px 60px rgba(15, 23, 42, .22);
}
.home-hero::before,
.home-hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(8px);
  pointer-events: none;
}
.home-hero::before {
  width: 340px; height: 340px; right: -80px; top: -140px;
  background: rgba(56, 189, 248, .22);
}
.home-hero::after {
  width: 280px; height: 280px; right: 170px; bottom: -200px;
  background: rgba(168, 85, 247, .2);
}
.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border: 1px solid rgba(255, 255, 255, .22);
  background: rgba(255, 255, 255, .08);
  border-radius: 999px;
  font-size: 12.5px;
  color: #dbeafe;
  margin-bottom: 18px;
}
.hero-title {
  position: relative;
  z-index: 1;
  margin: 0 0 12px;
  font-size: clamp(30px, 4.4vw, 44px);
  line-height: 1.2;
  letter-spacing: -.02em;
}
.hero-title em { font-style: normal; color: #7dd3fc; }
.hero-sub {
  position: relative;
  z-index: 1;
  margin: 0;
  max-width: 620px;
  color: #cbd5e1;
  font-size: 15px;
}
.hero-stats {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}
.stat-pill {
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .14);
  font-size: 13px;
  color: #e2e8f0;
}
.stat-pill b { color: #fff; font-size: 16px; margin-right: 3px; }
.section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 38px 4px 16px;
}
.section-title h2 { margin: 0; font-size: 20px; letter-spacing: -.01em; }
.section-title span { color: var(--muted); font-size: 13px; }
.subject-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}
.subject-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.subject-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 5px;
  background: var(--accent);
}
.subject-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 20px 44px rgba(15, 23, 42, .1);
}
.subject-icon {
  width: 52px; height: 52px;
  display: grid; place-items: center;
  font-size: 26px;
  border-radius: 15px;
  background: #f1f5f9;
}
.subject-card h3 { margin: 2px 0 0; font-size: 19px; }
.subject-desc { margin: 0; color: var(--muted); font-size: 13.5px; min-height: 44px; }
.subject-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 2px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 9px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 12px;
  white-space: nowrap;
}
.chip.accent {
  background: #eff6ff;
  color: var(--accent);
  border: 1px solid #dbeafe;
}
.subject-go {
  margin-top: auto;
  padding-top: 8px;
  color: var(--accent);
  font-weight: 700;
  font-size: 13.5px;
}

/* ================= 通用按钮 ================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  transition: background .15s ease, border-color .15s ease, transform .1s ease;
}
.btn:hover { background: #f8fafc; border-color: #cbd5e1; }
.btn:active { transform: translateY(1px); }
.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 6px 16px rgba(37, 99, 235, .18);
}
.btn.primary:hover { filter: brightness(.96); background: var(--accent); }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--red); border-color: #fecaca; }
.btn.danger:hover { background: var(--red-soft); }
.btn.small { padding: 6px 11px; font-size: 12.5px; border-radius: 9px; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }

/* ================= 科目 / 题库 ================= */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  margin: 8px 2px 16px;
}
.breadcrumb a:hover { color: var(--text); }
.breadcrumb .sep { opacity: .5; }
.page-head {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
}
.page-head-icon {
  width: 58px; height: 58px;
  flex: 0 0 58px;
  display: grid; place-items: center;
  border-radius: 17px;
  background: #fff;
  border: 1px solid var(--border);
  font-size: 28px;
  box-shadow: var(--shadow);
}
.page-title { margin: 2px 0 4px; font-size: 27px; letter-spacing: -.02em; }
.page-sub { margin: 0; color: var(--muted); font-size: 13.5px; }
.panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
}
.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px dashed var(--border);
  margin-bottom: 16px;
}
.toolbar-group { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.sel-info { color: var(--muted); font-size: 13px; }
.sel-info b { color: var(--accent); }
.check-all {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13.5px;
  color: #334155;
  cursor: pointer;
  user-select: none;
}
.check-all input { accent-color: var(--accent); width: 16px; height: 16px; }

.random-panel {
  margin: -4px 0 16px;
  padding: 14px 16px;
  border: 1px dashed #bfdbfe;
  background: #f8fbff;
  border-radius: 14px;
}
.random-panel .row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.random-panel .hint { margin: 8px 0 0; color: var(--muted); font-size: 12.5px; }
.field { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; color: var(--muted); }
.field input {
  width: 100%;
  min-width: 90px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #fff;
  color: var(--text);
  outline: none;
}
.field input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px #dbeafe; }
.field.grow { flex: 1 1 220px; }

.bank-list { display: flex; flex-direction: column; gap: 12px; }
.bank-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.bank-card.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px #eff6ff;
}
.bank-check {
  flex: 0 0 auto;
  padding-top: 3px;
}
.bank-check input { width: 18px; height: 18px; accent-color: var(--accent); }
.bank-body { flex: 1 1 auto; min-width: 0; }
.bank-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 15.5px;
}
.bank-source { color: #94a3b8; font-size: 12px; margin-top: 2px; word-break: break-all; }
.bank-desc { color: var(--muted); font-size: 13px; margin-top: 6px; }
.bank-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.badge {
  display: inline-flex;
  align-items: center;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}
.bank-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
  justify-content: flex-end;
}
.empty {
  padding: 34px 18px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--border);
  border-radius: 14px;
  background: #fbfdff;
}

/* ================= 设置题量 ================= */
.setup-grid {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 18px;
  align-items: start;
}
.summary-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
}
.summary-card h3 { margin: 0 0 12px; font-size: 16px; }
.summary-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.summary-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  padding-bottom: 9px;
  border-bottom: 1px dashed var(--border);
}
.summary-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.summary-list .muted { color: var(--muted); }
.type-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 15px 0;
  border-bottom: 1px dashed var(--border);
}
.type-row:last-child { border-bottom: 0; }
.type-name { display: flex; flex-direction: column; gap: 2px; }
.type-name b { font-size: 14.5px; }
.type-name span { color: var(--muted); font-size: 12px; }
.stepper { display: flex; align-items: center; gap: 6px; }
.stepper button {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 8px;
  color: #475569;
  font-weight: 700;
}
.stepper button:hover { background: #f1f5f9; }
.stepper input {
  width: 58px;
  padding: 5px 4px;
  text-align: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  outline: none;
  color: var(--text);
}
.stepper input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px #dbeafe; }
.total-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 18px;
  padding: 14px 16px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 13px;
}
.total-bar b { font-size: 20px; color: var(--accent); }
.total-bar small { color: var(--muted); }
.setup-note { margin: 12px 2px 0; color: var(--muted); font-size: 12.5px; }

/* ================= 复习 ================= */
.review-toolbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px;
  margin-bottom: 16px;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, .05);
}
.filter-group { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.filter-chip {
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  color: #475569;
  font-size: 12.5px;
}
.filter-chip.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.review-list { display: flex; flex-direction: column; gap: 14px; }
.q-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 6px 18px rgba(15, 23, 42, .04);
}
.q-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 12px;
  color: var(--muted);
}
.q-no {
  display: inline-grid;
  place-items: center;
  min-width: 26px;
  height: 24px;
  padding: 0 7px;
  border-radius: 7px;
  background: #f1f5f9;
  color: #475569;
  font-weight: 700;
  font-size: 12px;
}
.q-type {
  padding: 1px 8px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 700;
  font-size: 11.5px;
}
.q-type.fill { background: #ecfdf5; color: #047857; }
.q-type.judge { background: #fff7ed; color: #c2410c; }
.q-type.short { background: #f5f3ff; color: #6d28d9; }
.q-bank { margin-left: auto; color: #94a3b8; font-size: 11.5px; }
.q-stem {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.8;
  margin: 2px 0 14px;
  word-break: break-word;
  white-space: pre-wrap;
}
.q-stem .blank-inline {
  display: inline-block;
  min-width: 54px;
  margin: 0 3px;
  padding: 1px 9px;
  border-radius: 7px;
  background: #dcfce7;
  color: #166534;
  text-align: center;
  font-weight: 700;
  border: 1px solid #bbf7d0;
}
.q-options { display: flex; flex-direction: column; gap: 8px; margin: 0 0 14px; }
.q-option {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: #fbfdff;
  font-size: 14px;
}
.q-option .letter {
  flex: 0 0 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: #eef2ff;
  color: #4338ca;
  font-weight: 800;
  font-size: 12px;
}
.q-option.correct {
  border-color: #86efac;
  background: var(--green-soft);
}
.q-option.correct .letter { background: #bbf7d0; color: #166534; }
.q-option.correct::after {
  content: "✓ 正确答案";
  margin-left: auto;
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.answer-box {
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--green-soft);
  border: 1px solid #bbf7d0;
  color: #166534;
  font-size: 14px;
  margin-top: 4px;
}
.answer-box b { color: #14532d; }
.explain-box {
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid var(--border);
  color: #475569;
  font-size: 13.5px;
}
.explain-box b { color: #334155; }
.judge-answer { display: inline-flex; gap: 8px; }
.pill-yes, .pill-no {
  padding: 2px 12px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 13px;
}
.pill-yes { background: #dcfce7; color: #166534; }
.pill-no { background: #fee2e2; color: #991b1b; }

/* ================= 答题 ================= */
.quiz-wrap { max-width: 820px; margin: 0 auto; }
.quiz-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 6px 2px 12px;
  color: var(--muted);
  font-size: 13px;
}
.quiz-top b { color: var(--text); }
.progress {
  height: 8px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 18px;
}
.progress > i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--accent);
  transition: width .25s ease;
}
.quiz-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
  font-size: 12px;
  color: var(--muted);
}
.quiz-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, .07);
  padding: 26px;
}
.quiz-stem {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.85;
  margin: 0 0 20px;
  word-break: break-word;
  white-space: pre-wrap;
}
.quiz-stem .blank-input {
  width: 150px;
  min-width: 96px;
  max-width: 100%;
  flex: 0 0 auto;
  margin: 3px 5px;
  padding: 5px 8px;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
  text-align: center;
  vertical-align: middle;
}
.fill-stem { line-height: 2.35; }
.quiz-options { display: flex; flex-direction: column; gap: 10px; }
.option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  text-align: left;
  padding: 13px 15px;
  border: 1.5px solid var(--border);
  border-radius: 13px;
  background: #fff;
  color: var(--text);
  transition: border-color .15s ease, background .15s ease, transform .1s ease;
}
.option:hover { border-color: #c7d2fe; background: #f8faff; }
.option:active { transform: translateY(1px); }
.option .letter {
  flex: 0 0 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #eef2ff;
  color: #3730a3;
  font-weight: 800;
  font-size: 13px;
}
.option .txt { flex: 1 1 auto; font-size: 15px; line-height: 1.6; }
.option.selected { border-color: var(--accent); background: #eff6ff; }
.option.selected .letter { background: var(--accent); color: #fff; }
.option.correct { border-color: #22c55e; background: var(--green-soft); }
.option.correct .letter { background: #16a34a; color: #fff; }
.option.wrong { border-color: #ef4444; background: var(--red-soft); }
.option.wrong .letter { background: #dc2626; color: #fff; }
.option:disabled { cursor: default; }
.option:disabled:hover { transform: none; }

.fill-row {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 6px 0;
}
.fill-item { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.fill-item .idx {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 13px;
  min-width: 48px;
}
.blank-input {
  flex: 1 1 220px;
  min-width: 120px;
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  outline: none;
  background: #fbfdff;
  color: var(--text);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.blank-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px #dbeafe; background: #fff; }
.blank-input.ok { border-color: #22c55e; background: #f0fdf4; }
.blank-input.bad { border-color: #ef4444; background: #fef2f2; }
.blank-input:disabled { color: #334155; }
.blank-key {
  flex: 1 1 100%;
  color: #166534;
  font-size: 13px;
  padding-left: 58px;
}
.short-input {
  width: 100%;
  min-height: 130px;
  resize: vertical;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  outline: none;
  background: #fbfdff;
  color: var(--text);
  line-height: 1.7;
}
.short-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px #dbeafe; background: #fff; }
.short-input:disabled { color: #334155; background: #f8fafc; }

.feedback {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 13px;
  font-size: 14px;
  border: 1px solid var(--border);
  background: #f8fafc;
}
.feedback.ok { border-color: #bbf7d0; background: var(--green-soft); color: #166534; }
.feedback.bad { border-color: #fecaca; background: var(--red-soft); color: #991b1b; }
.feedback .fb-title { font-weight: 800; margin-bottom: 5px; }
.feedback .fb-answer { margin-top: 6px; }
.feedback .fb-answer b { color: #14532d; }
.feedback.bad .fb-answer b { color: #7f1d1d; }
.self-grade { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.quiz-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 18px;
}
.quiz-actions .right { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; }
.kbd-hint { color: #94a3b8; font-size: 12px; }

/* ================= 结果 ================= */
.result-wrap { max-width: 820px; margin: 0 auto; }
.result-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 26px;
  padding: 28px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: var(--shadow);
}
.result-ring {
  position: relative;
  width: 138px;
  height: 138px;
  flex: 0 0 138px;
  border-radius: 50%;
  background: conic-gradient(var(--accent) calc(var(--p, 0) * 1%), #e2e8f0 0);
  display: grid;
  place-items: center;
}
.result-ring::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  background: #fff;
}
.result-ring .ring-text {
  position: relative;
  text-align: center;
  line-height: 1.2;
}
.result-ring .ring-text b { display: block; font-size: 30px; letter-spacing: -.03em; }
.result-ring .ring-text span { color: var(--muted); font-size: 12px; }
.result-info { flex: 1 1 260px; min-width: 220px; }
.result-info h1 { margin: 0 0 6px; font-size: 25px; }
.result-info p { margin: 0; color: var(--muted); font-size: 13.5px; }
.result-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}
.stat-box {
  min-width: 92px;
  padding: 10px 14px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid var(--border);
}
.stat-box b { display: block; font-size: 20px; line-height: 1.3; }
.stat-box span { color: var(--muted); font-size: 12px; }
.stat-box.good b { color: var(--green); }
.stat-box.bad b { color: var(--red); }
.result-actions { display: flex; flex-wrap: wrap; gap: 9px; margin: 20px 2px 26px; }
.wrong-title { margin: 0 2px 12px; font-size: 18px; }
.wrong-list { display: flex; flex-direction: column; gap: 12px; }
.wrong-card {
  background: #fff;
  border: 1px solid var(--border);
  border-left: 4px solid var(--red);
  border-radius: 13px;
  padding: 16px 18px;
}
.wrong-card .stem { font-weight: 700; margin-bottom: 8px; line-height: 1.7; }
.wrong-card .line { font-size: 13px; color: var(--muted); margin-top: 4px; }
.wrong-card .line b { color: var(--text); }
.wrong-card .line.good b { color: var(--green); }
.wrong-card .line.bad b { color: var(--red); }

/* ================= 说明页 ================= */
.about-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px;
}
.about-card h1 { margin: 0 0 6px; font-size: 26px; }
.about-card h2 { margin: 24px 0 8px; font-size: 17px; }
.about-card p, .about-card li { color: #475569; font-size: 14px; }
.about-card ul { padding-left: 22px; }
.about-card code {
  padding: 1px 6px;
  background: #f1f5f9;
  border-radius: 5px;
  font-size: 12.5px;
  color: #334155;
}
.about-card .tip {
  padding: 12px 14px;
  background: #eff6ff;
  border: 1px solid #dbeafe;
  border-radius: 12px;
  color: #1e40af;
  font-size: 13.5px;
}

/* ================= Toast ================= */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 16px);
  max-width: min(90vw, 520px);
  padding: 11px 18px;
  border-radius: 12px;
  background: #0f172a;
  color: #fff;
  font-size: 13.5px;
  box-shadow: 0 16px 36px rgba(15, 23, 42, .3);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  z-index: 50;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ================= 响应式 ================= */
@media (max-width: 860px) {
  .setup-grid { grid-template-columns: 1fr; }
  .home-hero { padding: 40px 28px; }
}
@media (max-width: 640px) {
  body { font-size: 14px; }
  .topbar { padding: 14px 16px; }
  .topnav { gap: 12px; font-size: 13px; }
  .app { padding: 6px 14px 54px; }
  .footer { padding: 22px 16px 34px; }
  .home-hero { padding: 32px 22px; border-radius: 22px; }
  .hero-sub { font-size: 14px; }
  .subject-grid { grid-template-columns: 1fr; }
  .page-title { font-size: 23px; }
  .page-head-icon { width: 50px; height: 50px; flex-basis: 50px; font-size: 24px; }
  .panel { padding: 14px; }
  .toolbar { align-items: flex-start; }
  .toolbar-group { width: 100%; }
  .bank-card { flex-wrap: wrap; gap: 10px; }
  .bank-check { padding-top: 2px; }
  .bank-actions { width: 100%; justify-content: flex-start; padding-left: 32px; }
  .q-bank { margin-left: 0; width: 100%; }
  .quiz-card { padding: 18px; border-radius: 16px; }
  .quiz-stem { font-size: 16.5px; }
  .result-hero { padding: 20px; gap: 18px; }
  .result-ring { width: 112px; height: 112px; flex-basis: 112px; }
  .result-ring .ring-text b { font-size: 25px; }
  .review-toolbar { position: static; }
  .blank-key { padding-left: 0; }
}
