:root {
  color-scheme: light;
  --ink: #162229;
  --muted: #65727a;
  --line: #d9e0e2;
  --surface: #ffffff;
  --canvas: #f3f6f5;
  --brand: #12645a;
  --brand-dark: #0b4b44;
  --brand-soft: #e4f2ef;
  --amber: #9a6400;
  --amber-soft: #fff1cf;
  --danger: #b43b32;
  --danger-soft: #fff0ee;
  --blue: #245f9f;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--canvas); scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--canvas); }
button, input { font: inherit; letter-spacing: 0; }
button { cursor: pointer; }
.hidden { display: none !important; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.96);
}
.topbar-inner {
  width: min(1120px, calc(100% - 32px));
  min-height: 70px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand { display: grid; gap: 3px; }
.brand strong { font-size: 18px; }
.brand span { color: var(--muted); font-size: 12px; }
.top-actions { display: flex; align-items: center; gap: 8px; }
.plan-badge {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid #b7d3ce;
  border-radius: 5px;
  color: var(--brand-dark);
  background: var(--brand-soft);
  font-weight: 700;
}
.icon-button {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
  color: var(--ink);
  font-weight: 800;
}

.shell { width: min(1120px, calc(100% - 32px)); margin: 28px auto 56px; }
.gate { min-height: 62vh; display: grid; align-content: center; gap: 28px; }
.gate-copy { max-width: 720px; }
.eyebrow { margin: 0 0 8px; color: var(--brand); font-size: 13px; font-weight: 800; }
.gate h1, .mock-head h1 { margin: 0; font-size: 32px; line-height: 1.25; }
.gate-sub, .mock-head p:last-child { color: var(--muted); line-height: 1.7; }
.gate-actions { display: flex; gap: 12px; }
.gate-contrast { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 18px; color: var(--muted); font-size: 13px; font-weight: 700; }
.gate-contrast span { padding: 7px 10px; border: 1px solid var(--line); border-radius: 999px; background: #fff; }
.gate-contrast i { color: var(--muted); font-style: normal; }
.gate-contrast .hl { color: var(--brand-dark); border-color: #9dc8c1; background: var(--brand-soft); }

.primary, .secondary, .danger {
  min-height: 44px;
  padding: 0 18px;
  border-radius: 5px;
  border: 1px solid transparent;
  font-weight: 750;
}
.primary { color: #fff; background: var(--brand); border-color: var(--brand); }
.primary:hover { background: var(--brand-dark); }
.secondary { color: var(--ink); background: #fff; border-color: var(--line); }
.primary:disabled, .secondary:disabled { cursor: not-allowed; opacity: .5; }
.danger { color: var(--danger); background: var(--danger-soft); border-color: #efc4bf; }

.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}
.stats-strip > div { min-height: 82px; padding: 13px 18px; display: grid; align-content: center; gap: 3px; border-right: 1px solid var(--line); }
.stats-strip > div:last-child { border-right: 0; }
.stats-strip span { color: var(--muted); font-size: 12px; }
.stats-strip strong { font-size: 22px; }
.stats-strip small { color: var(--muted); font-size: 11px; line-height: 1.2; }

.progress-overview {
  margin-top: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}
.progress-overview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 9px;
}
.progress-overview-head > div { min-width: 0; display: grid; gap: 2px; }
.progress-kicker { color: var(--muted); font-size: 11px; }
.progress-overview-head strong { overflow: hidden; color: var(--brand-dark); font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.progress-overview-head > span { flex: 0 0 auto; color: var(--muted); font-size: 12px; }

.plan-promo {
  margin-top: 10px;
  padding: 14px 16px;
  border: 1px solid var(--brand);
  border-radius: 8px;
  background: var(--brand-soft);
  box-shadow: 0 1px 2px rgba(18,100,90,.08);
}
.plan-promo-body { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.plan-promo-text { min-width: 0; display: grid; gap: 3px; }
.plan-promo-kicker { color: var(--brand-dark); font-size: 11px; font-weight: 700; letter-spacing: .04em; }
.plan-promo-text strong { color: var(--brand-dark); font-size: 15px; }
.plan-promo-text span { color: var(--muted); font-size: 12px; line-height: 1.4; }
.plan-promo .primary { flex: 0 0 auto; }
.plan-promo-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.plan-promo-actions .secondary { white-space: nowrap; }
@media (max-width: 540px) {
  .plan-promo-body { flex-direction: column; align-items: stretch; gap: 10px; }
  .plan-promo .primary { width: 100%; }
  .plan-promo-actions { width: 100%; }
  .plan-promo-actions .primary, .plan-promo-actions .secondary { flex: 1 1 0; }
}
.plan-extra {
  width: 100%;
  margin-top: 8px;
  min-height: 34px;
  padding: 0 11px;
  border: 1px dashed var(--brand);
  border-radius: 5px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-size: 13px;
  font-weight: 700;
  text-align: left;
}
.plan-extra:hover { background: var(--brand); color: #fff; }
.progress-expand {
  width: 100%;
  min-height: 28px;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  background: transparent;
  color: var(--brand-dark);
  text-align: left;
}
.progress-track { height: 8px; flex: 1 1 auto; overflow: hidden; border-radius: 4px; background: #e8efed; }
.progress-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--brand); transition: width .2s ease; }
.progress-expand > span:last-child { flex: 0 0 auto; font-size: 12px; font-weight: 750; white-space: nowrap; }
.progress-expand:hover .progress-track { background: #dce8e5; }
.progress-breakdown { margin-top: 10px; border-top: 1px solid #edf1f0; }
.progress-breakdown-row { min-height: 42px; padding: 8px 0; display: flex; align-items: center; justify-content: space-between; gap: 14px; border-bottom: 1px solid #edf1f0; }
.progress-breakdown-row:last-child { border-bottom: 0; }
.progress-breakdown-row > div { min-width: 0; display: grid; gap: 2px; }
.progress-breakdown-row strong { color: var(--ink); font-size: 13px; }
.progress-breakdown-row span { overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.progress-breakdown-row b { flex: 0 0 auto; color: var(--brand); font-size: 12px; }

.mode-tabs {
  display: grid;
  grid-template-columns: repeat(6, minmax(0,1fr));
  gap: 8px;
  margin: 16px 0;
}
.mode-tabs button {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
  color: #34434b;
  font-weight: 700;
}
.mode-tabs button.active { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-dark); }
.mode-tabs button.locked::after { content: "升级"; margin-left: 5px; color: var(--amber); font-size: 11px; }

.question-panel {
  min-height: 520px;
  max-width: 720px;
  margin-inline: auto;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}
.question-toolbar { min-height: 45px; display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.question-toolbar > div { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1 1 auto; }
.type-label { color: var(--brand); font-size: 12px; font-weight: 800; }
#progressLabel { min-width: 0; overflow: hidden; color: var(--muted); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.switch { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 13px; }
.switch input { position: absolute; opacity: 0; }
.switch span { width: 36px; height: 20px; padding: 2px; border-radius: 10px; background: #c6cfd2; }
.switch span::before { content: ""; display: block; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .16s; }
.switch input:checked + span { background: var(--brand); }
.switch input:checked + span::before { transform: translateX(16px); }
.question-text { margin: 26px 0 20px; font-size: 21px; line-height: 1.75; }
.case-material { margin: 24px 0 18px; padding: 14px 16px; border: 1px solid #b8d8d2; border-radius: 8px; background: #f3faf8; }
.case-material summary { cursor: pointer; color: var(--brand-dark); font-weight: 800; }
.case-material p { margin: 12px 0 0; white-space: pre-wrap; line-height: 1.8; }
.question-media {
  margin: -4px 0 20px;
  display: grid;
  gap: 10px;
}
.question-media img {
  width: min(100%, 620px);
  max-height: 520px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8faf9;
}
.options { display: grid; gap: 10px; }
.option {
  width: 100%;
  min-height: 52px;
  padding: 10px 14px;
  display: grid;
  grid-template-columns: 32px 1fr;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  line-height: 1.55;
}
.option-key { width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid #bdc8cc; border-radius: 4px; font-weight: 800; }
.option.selected { border-color: var(--blue); background: #eef5fb; }
.option.selected .option-key { color: #fff; border-color: var(--blue); background: var(--blue); }
.option.correct { border-color: var(--brand); background: var(--brand-soft); }
.option.correct .option-key { color: #fff; border-color: var(--brand); background: var(--brand); }
.option.wrong { border-color: var(--danger); background: var(--danger-soft); }
.option.wrong .option-key { color: #fff; border-color: var(--danger); background: var(--danger); }

/* 禁用态必须看得出「不能点」，但不要盖掉判题后的正确/错误配色。
   2026-11-01 事故：回看未答题时选项被禁用却毫无视觉差异，用户只能描述成「点不了」。 */
.option:disabled:not(.correct):not(.wrong) { cursor: not-allowed; opacity: .62; background: #f5f7f7; }
.feedback { margin-top: 16px; padding: 14px 16px; border-left: 4px solid var(--brand); background: var(--brand-soft); line-height: 1.65; }
.feedback.error { border-left-color: var(--danger); background: var(--danger-soft); }
.answer-explanation {
  margin-top: 14px;
  padding: 16px;
  border: 1px solid #cfe0dc;
  border-radius: 6px;
  background: #fbfdfc;
}
.basic-explanation {
  padding: 12px;
  border-left: 4px solid var(--brand);
  border-radius: 4px;
  background: #f1f7f5;
}
.basic-explanation .explanation-head { margin-bottom: 7px; }
.deep-explanation {
  margin-top: 12px;
  border: 1px solid #cfe0dc;
  border-radius: 6px;
  background: #fff;
  overflow: hidden;
}
.deep-explanation summary {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  color: var(--brand-dark);
  font-weight: 850;
  list-style-position: inside;
}
.deep-explanation summary small {
  padding: 3px 7px;
  border-radius: 4px;
  color: var(--brand-dark);
  background: var(--brand-soft);
  font-size: 12px;
  font-weight: 750;
}
.deep-explanation-body { padding: 0 14px 14px; }
.deep-explanation-body .option-comparison { margin-top: 4px; }
.deep-explanation-locked { padding: 12px 14px; background: #fbfaf6; border-color: #eadfbd; }
.deep-locked-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid #d8c99f;
  border-radius: 5px;
  background: #fffdf6;
  color: #665a38;
  text-align: left;
  font-weight: 850;
}
.deep-locked-toggle:hover { border-color: #bca86f; background: #fff9e8; }
.deep-locked-toggle small { color: #927d45; font-size: 12px; font-weight: 700; }
.deep-explanation-locked p { margin: 8px 0 0; color: #655e4f; line-height: 1.6; }
.explanation-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.explanation-head span {
  color: var(--brand-dark);
  font-weight: 850;
}
.explanation-head strong {
  padding: 3px 7px;
  border-radius: 4px;
  color: var(--brand-dark);
  background: var(--brand-soft);
  font-size: 12px;
}
.explanation-summary {
  margin: 0 0 12px;
  color: #27363c;
  line-height: 1.7;
}
.option-comparison {
  margin: 14px 0;
}
.option-comparison-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.option-comparison-head h3 {
  margin: 0;
  color: var(--brand-dark);
  font-size: 15px;
}
.option-comparison-head span {
  color: #6a7b80;
  font-size: 12px;
}
.option-table-wrap {
  overflow-x: auto;
  border: 1px solid #d4e3df;
  border-radius: 6px;
  background: #fff;
}
.option-table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  color: #33464c;
  font-size: 13px;
  line-height: 1.55;
}
.option-table th,
.option-table td {
  padding: 10px 11px;
  vertical-align: top;
  border-bottom: 1px solid #e7efed;
  text-align: left;
}
.option-table thead th {
  color: var(--brand-dark);
  background: #f1f7f5;
  font-weight: 800;
  white-space: nowrap;
}
.option-table tbody tr:last-child th,
.option-table tbody tr:last-child td { border-bottom: 0; }
.option-table-key { width: 46px; color: #203b42; font-size: 15px; }
.option-table-text { width: 35%; }
.option-table-status { width: 64px; text-align: center !important; }
.option-table-status span {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 800;
}
.option-table tr.is-correct { background: #f5fbf8; }
.option-table tr.is-wrong { background: #fffafa; }
.option-table tr.is-correct .option-table-status span { color: #176b5f; background: #dff3ec; }
.option-table tr.is-wrong .option-table-status span { color: #a83c3c; background: #fde6e3; }
.option-table-reason { color: #52666b; }
.explanation-sections {
  display: grid;
  gap: 10px;
}
.explanation-sections > div {
  padding: 12px;
  border-left: 3px solid #a9cac4;
  background: #fff;
}
.explanation-sections h3 {
  margin: 0 0 5px;
  font-size: 14px;
  color: var(--brand-dark);
}
.explanation-sections p,
.memory-cue,
.related-cue {
  margin: 0;
  color: #405058;
  line-height: 1.65;
}
.explanation-insight {
  margin: 10px 0;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand);
  border-radius: 6px;
}
.explanation-insight h3 {
  margin: 0 0 3px;
  font-size: 14px;
}
.explanation-insight p {
  margin: 0;
  line-height: 1.65;
}
.memory-insight {
  border-color: #e8d7a5;
  border-left-color: #c58a22;
  background: #fff9e8;
}
.memory-insight h3 { color: #855c12; }
.memory-insight p { color: #5f4d2d; }
.field-insight {
  border-color: #b9dadd;
  border-left-color: #258995;
  background: #eef9fa;
}
.field-insight h3 { color: #176b75; }
.field-insight p { color: #315961; }
.pitfall-insight {
  border-color: #edc5bd;
  border-left-color: #c14d42;
  background: #fff3f0;
}
.pitfall-insight h3 { color: #a53d35; }
.pitfall-insight p { color: #5e4441; }
.memory-cue,
.related-cue {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 5px;
  background: #fff8e7;
}
.related-cue { background: #eef5fb; }
.related-practice {
  margin-top: 14px;
  padding: 13px;
  border: 1px solid #d6e3e0;
  border-radius: 6px;
  background: #f4f8f7;
}
.related-practice-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.related-practice h3 { margin: 0; color: var(--brand-dark); font-size: 14px; }
.related-practice-head span { padding: 3px 7px; border-radius: 4px; background: #dfeeea; color: var(--brand-dark); font-size: 12px; font-weight: 700; }
.related-practice > p { margin: 8px 0 0; color: #405058; font-size: 13px; line-height: 1.6; }
.related-question-list { display: grid; gap: 8px; margin-top: 10px; }
.related-question { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 10px; border: 1px solid #c9dbd6; border-radius: 5px; background: #fff; color: var(--ink); text-align: left; }
.related-question span { color: var(--brand-dark); font-size: 13px; font-weight: 800; }
.related-question strong { color: #587078; font-size: 12px; font-weight: 650; text-align: right; }
.related-question:hover { border-color: var(--brand); background: var(--brand-soft); }
.related-practice-locked { background: #fbfaf6; border-color: #eadfbd; }
.related-upgrade { width: 100%; margin-top: 10px; }
.confidence-check {
  margin-top: 14px;
  padding: 13px;
  border: 1px solid #d8d4ef;
  border-radius: 6px;
  background: #f7f5ff;
}
.confidence-check strong { color: #4f4692; font-size: 14px; }
.confidence-check p { margin: 7px 0 0; color: #56516f; font-size: 13px; line-height: 1.6; }
.confidence-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.confidence-options button { min-height: 36px; border: 1px solid #c8c1ef; border-radius: 5px; background: #fff; color: #4f4692; font-weight: 750; }
.confidence-options button.selected { border-color: #7064c9; background: #e9e5ff; }
.explanation-visual {
  position: relative;
  width: min(100%, 660px);
  margin: 0 0 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8faf9;
}
.explanation-visual img {
  display: block;
  width: 100%;
}
.visual-marker {
  position: absolute;
  max-width: min(210px, 45%);
  transform: translate(-50%, -50%);
  padding: 6px 8px;
  border: 2px solid #fff;
  border-radius: 4px;
  color: #fff;
  background: rgba(11, 75, 68, .92);
  box-shadow: 0 2px 8px rgba(0,0,0,.28);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
}
.visual-marker.warning { background: rgba(180, 59, 50, .95); }
.visual-marker.notice { background: rgba(36, 95, 159, .94); }
.question-actions { min-height: 68px; margin-top: 20px; padding-top: 18px; display: flex; justify-content: flex-end; gap: 10px; border-top: 1px solid var(--line); }
.empty { min-height: 390px; display: grid; place-content: center; gap: 8px; text-align: center; color: var(--muted); }
.empty strong { color: var(--ink); font-size: 20px; }

.mock-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 18px; }
.mock-controls { display: flex; align-items: center; gap: 8px; }
.timer { min-width: 92px; font-size: 24px; color: var(--danger); font-variant-numeric: tabular-nums; }
.mock-layout { display: grid; grid-template-columns: minmax(0,1fr) 250px; gap: 16px; align-items: start; }
.paper { display: grid; gap: 12px; }
.exam-question { padding: 20px; border: 1px solid var(--line); border-radius: 6px; background: #fff; scroll-margin-top: 90px; }
.exam-question.current { border-color: var(--blue); box-shadow: 0 0 0 2px #dbeafa; }
.exam-question h2 { margin: 0 0 14px; font-size: 17px; line-height: 1.65; }
.exam-question .question-media { margin: 0 0 14px; }
.exam-question .question-media img { width: min(100%, 520px); max-height: 420px; }
.exam-options { display: grid; gap: 7px; }
.exam-option { min-height: 42px; padding: 8px 10px; display: flex; gap: 9px; align-items: center; border: 1px solid #e1e6e8; border-radius: 4px; }
.exam-option input { width: 18px; height: 18px; accent-color: var(--brand); }
.exam-option.correct { border-color: var(--brand); background: var(--brand-soft); }
.exam-option.wrong { border-color: var(--danger); background: var(--danger-soft); }
.answer-sheet { position: sticky; top: 88px; padding: 16px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.answer-sheet-title { display: flex; justify-content: space-between; margin-bottom: 12px; }
.answer-sheet-title span { color: var(--muted); font-size: 13px; }
.answer-sheet-title button { display: none; min-height: 28px; padding: 0 8px; border: 1px solid var(--line); border-radius: 4px; background: #fff; }
.answer-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.answer-grid button { aspect-ratio: 1; min-width: 0; padding: 0; border: 1px solid var(--line); border-radius: 3px; background: #fff; font-size: 12px; }
.answer-grid button.answered { color: #fff; border-color: var(--brand); background: var(--brand); }
.answer-grid button.missing { color: var(--danger); border-color: var(--danger); background: var(--danger-soft); }
.answer-grid button.current { outline: 2px solid var(--blue); outline-offset: 1px; }
.exam-question.review-wrong { border-color: var(--danger); }
.exam-question.review-correct { border-color: var(--brand); }

dialog { width: min(480px, calc(100% - 28px)); max-height: calc(100dvh - 24px); padding: 0; overflow: auto; border: 0; border-radius: 7px; background: transparent; }
#plansDialog { width: min(620px, calc(100% - 28px)); }
#mockCenterDialog, #resultDialog, #planDialog { width: min(620px, calc(100% - 28px)); }
dialog::backdrop { background: rgba(12,24,28,.54); }
.dialog-card { padding: 22px; border: 1px solid var(--line); border-radius: 7px; background: #fff; }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.dialog-head h2 { margin: 0; font-size: 21px; }
.dialog-head button { width: 34px; height: 34px; border: 0; background: transparent; font-size: 24px; }
.dialog-card label { display: grid; gap: 7px; margin-bottom: 14px; color: var(--muted); font-size: 13px; }
.dialog-card input { width: 100%; min-height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 5px; color: var(--ink); }
.dialog-card > .primary { width: 100%; }
.fine-print { margin: 12px 0 0; color: var(--muted); font-size: 12px; text-align: center; }
.paywall-card { display: grid; gap: 12px; }
.paywall-card .dialog-head { margin-bottom: 0; }
.paywall-sub { margin: 0; color: var(--brand-dark); font-size: 16px; font-weight: 800; }
.paywall-points { padding: 12px 14px; border-left: 3px solid var(--brand); background: var(--brand-soft); color: #38514e; font-size: 14px; line-height: 1.65; }
.paywall-points p { margin: 0; }
.paywall-points p + p { margin-top: 8px; }
.paywall-card .secondary { width: 100%; }
.purchase-card { display: grid; gap: 12px; }
.purchase-card .dialog-head { margin-bottom: 0; }
.purchase-price { margin: 0; font-size: 28px; font-weight: 800; color: var(--brand-dark); }
.purchase-benefits { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.65; }
.purchase-paid { display: grid; gap: 9px; padding: 14px; border: 1.5px solid var(--brand); border-radius: 7px; background: var(--brand-soft); }
.purchase-paid b { color: var(--brand-dark); font-size: 16px; }
.purchase-paid p { margin: 0; color: #38514e; font-size: 13px; line-height: 1.6; }
.purchase-alt { padding: 10px 8px; border: 1px solid var(--line); border-radius: 7px; }
.purchase-alt summary { cursor: pointer; color: var(--muted); font-size: 14px; font-weight: 600; }
.purchase-alt[open] summary { margin-bottom: 12px; }
.purchase-qr { width: 100%; display: grid; justify-items: center; gap: 8px; margin: 0 0 14px; }
.purchase-qr img { width: min(100%, 360px); min-width: min(280px, 100%); aspect-ratio: 1; height: auto; object-fit: contain; cursor: zoom-in; }
.purchase-qr figcaption { color: var(--muted); font-size: 13px; }
.purchase-flow { padding: 10px 12px; border-left: 3px solid var(--brand); background: var(--brand-soft); color: #38514e; font-size: 13px; line-height: 1.6; }
.purchase-flow p { margin: 4px 0 0; }
.purchase-lead { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.service-card { display: grid; gap: 12px; }
.service-lead { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.65; }
.service-qr { width: 100%; display: grid; justify-items: center; gap: 8px; margin: 0; }
.service-qr img { width: min(100%, 360px); min-width: min(280px, 100%); aspect-ratio: 1; height: auto; object-fit: contain; cursor: zoom-in; }
.service-qr figcaption { color: var(--muted); font-size: 13px; }
.qr-viewer-dialog { width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(13, 24, 27, .94); }
.qr-viewer-dialog::backdrop { background: rgba(13, 24, 27, .94); }
.qr-viewer-card { position: relative; min-height: 100%; display: grid; place-content: center; justify-items: center; gap: 14px; padding: 56px 20px 28px; color: #fff; text-align: center; }
.qr-viewer-card img { width: min(92vw, 620px); max-height: 78dvh; object-fit: contain; background: #fff; }
.qr-viewer-card p { margin: 0; font-size: 14px; }
.qr-viewer-close { position: fixed; top: max(16px, env(safe-area-inset-top)); right: 16px; width: 44px; height: 44px; padding: 0; border: 1px solid rgba(255,255,255,.5); border-radius: 50%; background: rgba(0,0,0,.35); color: #fff; font-size: 30px; line-height: 1; }
.text-only { min-height: 40px; border: 0; background: transparent; color: var(--muted); font-size: 13px; }
.app-toast { position: fixed; z-index: 100; left: 50%; bottom: 28px; width: min(420px, calc(100% - 32px)); padding: 12px 16px; transform: translate(-50%, 18px); opacity: 0; pointer-events: none; border-radius: 6px; background: #162229; color: #fff; font-size: 14px; line-height: 1.45; transition: opacity .18s ease, transform .18s ease; }
.app-toast.visible { transform: translate(-50%, 0); opacity: 1; }
.form-error { padding: 10px 12px; color: var(--danger); background: var(--danger-soft); }
.menu-card { display: grid; gap: 1px; }
.menu-row { min-height: 48px; padding: 0 4px; display: flex !important; align-items: center; margin: 0 !important; border: 0; border-bottom: 1px solid var(--line); background: #fff; color: var(--ink) !important; font-size: 15px !important; text-align: left; }
.menu-row:last-child { border-bottom: 0; }
.special-card { width: 100%; }
.special-list { display: grid; gap: 10px; }
.featured-special-group { display: grid; gap: 8px; padding: 12px; border: 1px solid #b8cfd4; border-radius: 6px; background: #f7fbfb; }
.featured-special-head { display: flex; align-items: center; justify-content: space-between; color: var(--brand-dark); font-size: 13px; }
.featured-special-head span { padding: 3px 8px; border-radius: 999px; background: #e7f0f5; color: var(--blue); font-size: 11px; font-weight: 800; }
.special-row {
  min-height: 92px;
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfdfc;
}
.featured-special-row { border-color: #b8cfd4; background: #fff; }
.special-copy { min-width: 0; }
.special-copy h3 { margin: 0; font-size: 17px; }
.special-copy p { margin: 7px 0 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.special-heading { display: flex; align-items: center; gap: 8px; }
.info-button { width: 22px; height: 22px; padding: 0; border: 1px solid #a6bbc4; border-radius: 50%; background: #fff; color: var(--blue); font-size: 13px; font-weight: 800; line-height: 1; }
.short-path-info-card p:not(.fine-print) { margin: 0; color: #435159; line-height: 1.7; }
.plans-card { width: 100%; }
.plan-message { margin: -4px 0 12px; padding: 10px 12px; color: var(--amber); background: var(--amber-soft); line-height: 1.55; }
.plan-list { border-top: 1px solid var(--line); }
.plan-row { padding: 16px 0; display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 14px; border-bottom: 1px solid var(--line); }
.plan-row.current { box-shadow: inset 3px 0 var(--brand); padding-left: 12px; }
.plan-copy { min-width: 0; }
.plan-name { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.plan-name h3 { margin: 0; font-size: 16px; }
.plan-name span { color: var(--brand-dark); font-size: 13px; font-weight: 800; white-space: nowrap; }
.plan-copy p { margin: 6px 0 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.plan-action { min-width: 94px; min-height: 38px; padding: 0 10px; font-size: 13px; }
.plan-action:disabled { cursor: default; color: var(--muted); background: #f5f7f7; }
.about-copy { color: #435159; line-height: 1.75; }
.mock-center-card, .result-card { width: 100%; }
.mock-summary { display: grid; grid-template-columns: repeat(4,1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.mock-summary div { padding: 12px 8px; text-align: center; }
.mock-summary span { display: block; color: var(--muted); font-size: 12px; }
.mock-summary strong { display: block; margin-top: 5px; font-size: 20px; }
.resume-panel { margin: 16px 0 0; padding: 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--amber-soft); }
.resume-panel > div { display: grid; gap: 4px; }
.resume-panel span { color: #6d5730; font-size: 13px; }
.mock-center-actions { margin-top: 16px; display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; }
.history-head { margin-top: 22px; padding-bottom: 9px; display: flex; justify-content: space-between; border-bottom: 1px solid var(--line); }
.history-head span { color: var(--muted); font-size: 12px; }
.history-list { display: grid; }
.history-row { min-height: 54px; display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 16px; border-bottom: 1px solid var(--line); }
.history-row span { color: var(--muted); font-size: 12px; }
.history-row strong { font-size: 18px; }
.history-empty { padding: 24px 0; color: var(--muted); text-align: center; }
.score { display: block; margin: 0; color: var(--brand); font-size: 60px; text-align: center; }
.result-status { margin: -4px 0 20px; color: var(--muted); font-weight: 700; text-align: center; }
.result-status.pass { color: var(--brand); }
.result-status.fail { color: var(--danger); }
.result-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; }
.result-grid div { padding: 12px; border: 1px solid var(--line); border-radius: 5px; text-align: center; }
.result-grid span { display: block; color: var(--muted); font-size: 12px; }
.result-grid strong { display: block; margin-top: 4px; }
.result-meta { margin: 14px 0 0; color: var(--muted); font-size: 13px; line-height: 1.6; text-align: center; }
.dialog-actions { display: grid; grid-template-columns: repeat(2,1fr); gap: 8px; margin-top: 18px; }
.dialog-actions button { flex: 1; }
.plan-card { width: 100%; }
.plan-intro { margin: -4px 0 14px; color: var(--muted); line-height: 1.6; }
.plan-choice-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.plan-choice {
  min-height: 58px;
  padding: 10px 12px;
  display: grid;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
  color: var(--ink);
  text-align: left;
}
.plan-choice strong { color: var(--brand-dark); font-size: 14px; }
.plan-choice span { color: var(--muted); font-size: 12px; }
.plan-choice.selected { border-color: var(--brand); background: var(--brand-soft); box-shadow: inset 3px 0 var(--brand); }
.plan-start-row { margin-top: 14px; display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: end; gap: 10px; }
.plan-start-row label { display: grid; gap: 6px; color: var(--muted); font-size: 13px; }
.plan-start-row input { min-height: 44px; padding: 0 10px; border: 1px solid var(--line); border-radius: 5px; color: var(--ink); background: #fff; }
.plan-current { margin-top: 16px; padding: 12px; display: flex; justify-content: space-between; gap: 10px; background: var(--brand-soft); }
.plan-current strong { color: var(--brand-dark); }
.plan-current span { color: var(--muted); font-size: 13px; }
.plan-days { margin-top: 12px; display: grid; gap: 8px; max-height: 46vh; overflow: auto; }
.plan-day { padding: 11px; border: 1px solid var(--line); border-radius: 5px; background: #fff; }
.plan-day.today { border-color: var(--brand); box-shadow: inset 3px 0 var(--brand); }
.plan-day.done { background: #f8fbfa; }
.plan-day-head { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.plan-day-head span { color: var(--muted); font-size: 12px; }
.plan-task { min-height: 46px; padding: 8px 0; display: flex; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px solid #edf1f0; }
.plan-task > div { min-width: 0; display: grid; gap: 3px; }
.plan-task strong { font-size: 13px; }
.plan-task span { color: var(--muted); font-size: 12px; }
.plan-task em { color: var(--brand); font-size: 12px; font-style: normal; font-weight: 800; }
.plan-task button, .plan-checkin { min-height: 32px; padding: 0 9px; border: 1px solid var(--line); border-radius: 4px; background: #fff; color: var(--brand-dark); font-size: 12px; font-weight: 750; white-space: nowrap; }
.plan-task button:hover, .plan-checkin:not(:disabled):hover { border-color: var(--brand); background: var(--brand-soft); }
.plan-checkin { width: 100%; margin-top: 8px; }
.plan-checkin:disabled { cursor: default; color: #9aa5a7; background: #f5f7f7; }
.plan-empty { padding: 24px 0; color: var(--muted); text-align: center; }
.case-placeholder { padding: 16px; display: grid; gap: 6px; border: 1px dashed #d8c58f; border-radius: 5px; color: #66552f; background: #fff9e8; }
.case-placeholder span { font-size: 13px; line-height: 1.6; }
.result-disclaimer { margin: 12px 0 0; padding: 10px 12px; color: #6a5731; background: var(--amber-soft); font-size: 13px; line-height: 1.6; }

@media (max-width: 760px) {
  .topbar-inner, .shell { width: min(100% - 20px, 1120px); }
  .shell { margin-top: 16px; }
  .brand span { display: none; }
  .gate { min-height: 70vh; }
  .gate h1, .mock-head h1 { font-size: 26px; }
  .stats-strip { grid-template-columns: repeat(2,1fr); }
  .stats-strip > div:nth-child(2) { border-right: 0; }
  .stats-strip > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .progress-overview { margin-top: 8px; padding: 11px 12px; }
  .progress-overview-head { gap: 8px; }
  .progress-overview-head strong { max-width: 58vw; }
  .mode-tabs { grid-template-columns: repeat(2,1fr); }
  .question-panel { padding: 18px 14px 96px; scroll-margin-top: 86px; }
  .question-text { font-size: 18px; }
  .question-media img { max-height: 390px; }
  .option-comparison-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }
  .option-table-wrap { overflow: visible; border: 0; background: transparent; }
  .option-table { min-width: 0; border-collapse: separate; }
  .option-table thead { display: none; }
  .option-table tbody,
  .option-table tr,
  .option-table th,
  .option-table td { display: block; }
  .option-table tr {
    margin: 9px 0;
    padding: 9px 10px;
    border: 1px solid #dbe8e4;
    border-left: 4px solid #9bbdb5;
    border-radius: 6px;
  }
  .option-table tr.is-correct { border-left-color: var(--brand); }
  .option-table tr.is-wrong { border-left-color: var(--danger); }
  .option-table th,
  .option-table td {
    width: auto;
    padding: 2px 0;
    border: 0;
    text-align: left !important;
  }
  .option-table-key { display: inline-block !important; margin-right: 6px; }
  .option-table-status { display: inline-block !important; }
  .option-table-text::before,
  .option-table-reason::before {
    display: block;
    margin-top: 5px;
    color: var(--brand-dark);
    font-size: 12px;
    font-weight: 800;
  }
  .option-table-text::before { content: "选项内容"; }
  .option-table-reason::before { content: "为什么"; }
  .explanation-visual {
    overflow: visible;
  }
  .visual-marker {
    position: relative;
    left: auto !important;
    top: auto !important;
    display: block;
    max-width: none;
    margin: 7px 8px;
    transform: none;
    box-shadow: none;
  }
  .question-actions {
    position: fixed;
    z-index: 40;
    right: 0;
    bottom: 0;
    left: 0;
    min-height: 0;
    margin: 0;
    padding: 10px max(10px, env(safe-area-inset-right)) calc(10px + env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
    border-top: 1px solid var(--line);
    background: rgba(255,255,255,.98);
    box-shadow: 0 -5px 18px rgba(22,34,41,.1);
  }
  .question-actions button { min-width: 0; min-height: 48px; flex: 1; }
  .feedback { scroll-margin-bottom: 88px; }
  .mock-summary { grid-template-columns: repeat(2,1fr); }
  .mock-summary div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .resume-panel { align-items: stretch; flex-direction: column; }
  .mock-center-actions { grid-template-columns: 1fr; }
  .history-row { gap: 8px; }
  .mock-head { align-items: flex-start; flex-direction: column; }
  .mock-controls { width: 100%; position: sticky; top: 71px; z-index: 20; padding: 8px; border: 1px solid var(--line); background: #fff; }
  .timer { margin-right: auto; }
  .mock-layout { display: flex; flex-direction: column; }
  .answer-sheet { order: -1; position: sticky; top: 128px; z-index: 18; width: 100%; padding: 10px; }
  .answer-sheet-title { align-items: center; margin: 0; }
  .answer-sheet-title button { display: inline-block; }
  .answer-sheet:not(.collapsed) .answer-sheet-title { margin-bottom: 9px; }
  .answer-sheet.collapsed .answer-grid { display: none; }
  .answer-grid { grid-template-columns: repeat(10,1fr); gap: 4px; }
  .answer-grid button { font-size: 10px; }
  .paper { width: 100%; }
  .exam-question { padding: 15px 12px; scroll-margin-top: 250px; }
}

@media (max-width: 430px) {
  .gate-actions { flex-direction: column; }
  .gate-actions button, .question-actions button { width: 100%; }
  .plan-badge { max-width: 108px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .plan-row { grid-template-columns: 1fr; gap: 10px; }
  .plan-action { width: 100%; }
  .plan-choice-list { grid-template-columns: 1fr; }
  .plan-start-row { grid-template-columns: 1fr; }
  .plan-start-row button { width: 100%; }
  .plan-current { align-items: flex-start; flex-direction: column; }
  .special-row { grid-template-columns: 1fr; gap: 12px; }
  .special-row button { width: 100%; }
  .mock-controls .secondary, .mock-controls .primary { padding: 0 10px; }
  .answer-grid { grid-template-columns: repeat(9,1fr); }
}

.favorite-button { min-height: 34px; flex: 0 0 auto; padding: 0 12px; border: 1px solid var(--line); border-radius: 5px; background: #fff; color: var(--brand-dark); font: inherit; font-weight: 700; white-space: nowrap; }
.favorite-button.is-favorite { border-color: var(--brand); background: var(--brand-soft); }
.menu-row.danger { color: #b34b42; }
@media (max-width: 760px) { .favorite-button { min-height: 36px; padding: 0 10px; font-size: 14px; } }
