:root {
  --paper: #f6f3ea;
  --card: #fffdf7;
  --ink: #1d2a44;
  --ink-2: #56627a;
  --state: #dfe4ec;
  --state-line: #ffffff;
  --now: #f2c14e;
  --red: #b8322a;
  --green: #2c7a55;
  --gold: #d79b16;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { background: var(--paper); color: var(--ink); font: 16px/1.4 system-ui, -apple-system, "Segoe UI", sans-serif; overflow-x: clip; }
[hidden] { display: none !important; }
button { color: inherit; font: inherit; touch-action: manipulation; }
.screen { margin: 0 auto; max-width: 980px; min-height: 100%; padding: max(12px, env(safe-area-inset-top)) 14px 14px; }
.btn { background: transparent; border: 2px solid var(--ink); border-radius: 10px; cursor: pointer; font-weight: 700; min-height: 48px; padding: 10px 18px; width: 100%; }
.btn.primary { background: var(--ink); color: var(--paper); }
.btn:focus-visible, .option:focus-visible, .chip:focus-visible, .link:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.link { background: none; border: 0; color: var(--ink-2); cursor: pointer; font-weight: 600; min-height: 44px; padding: 8px 4px; }
.note { color: var(--ink-2); font-size: 13px; margin: 10px 0 0; text-align: center; }

.home { align-items: center; display: flex; flex-direction: column; gap: 10px; justify-content: center; max-width: 420px; text-align: center; }
.seal { height: clamp(78px, 17vh, 120px); width: clamp(78px, 17vh, 120px); }
.s-ring { fill: var(--ink); }
.s-inner { fill: none; stroke: var(--now); stroke-dasharray: 3 5; stroke-width: 2; }
.s-star { fill: var(--now); }
.home h1 { font: 800 clamp(38px, 8.5vh, 54px)/.95 Georgia, "Times New Roman", serif; letter-spacing: -.01em; margin: 0; text-transform: uppercase; }
.pitch { font-size: 17px; margin: 2px 0 8px; }
.label { color: var(--ink-2); font-size: 13px; font-weight: 700; letter-spacing: .06em; margin: 8px 0 0; text-transform: uppercase; }
.regions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.chip { background: var(--card); border: 1.5px solid var(--ink-2); border-radius: 999px; cursor: pointer; font-size: 14px; font-weight: 700; min-height: 40px; padding: 6px 14px; }

.play { display: grid; gap: 8px; grid-template-rows: auto auto auto minmax(0, 1fr) auto; height: 100dvh; min-height: 480px; }
.bar { align-items: center; display: grid; gap: 8px; grid-template-columns: auto 1fr auto; }
.progress { color: var(--ink-2); font-weight: 700; margin: 0; text-align: center; }
.score { font: 800 22px system-ui, -apple-system, "Segoe UI", sans-serif; font-variant-numeric: tabular-nums; min-width: 44px; text-align: right; }
.ask { font: 700 clamp(22px, 5.8vw, 30px)/1.15 Georgia, serif; margin: 0; text-align: center; }
.options { display: grid; gap: 8px; grid-template-columns: 1fr 1fr; }
.option { background: var(--card); border: 2px solid var(--ink); border-radius: 12px; box-shadow: 0 3px 0 var(--ink); cursor: pointer; font-size: clamp(16px, 4.4vw, 19px); font-weight: 800; line-height: 1.15; min-height: 58px; overflow-wrap: anywhere; padding: 8px; transition: transform .08s; }
.options.two .option { min-height: 72px; font-size: clamp(19px, 5vw, 22px); }
.option:active:not(:disabled) { box-shadow: 0 1px 0 var(--ink); transform: translateY(2px); }
.option:disabled { box-shadow: none; cursor: default; }
.option.right { background: var(--green); border-color: var(--green); color: #fff; }
.option.wrong { background: var(--red); border-color: var(--red); color: #fff; }
.option.other { opacity: .55; }
.chart { background: #eaf1f6; border: 2px solid var(--ink); border-radius: 12px; margin: 0; min-height: 150px; overflow: hidden; position: relative; }
#map { display: block; height: 100%; inset: 0; position: absolute; width: 100%; }
.state { fill: var(--state); stroke: none; }
.state.is-now { fill: var(--now); }
.borders { fill: none; stroke: var(--state-line); stroke-linejoin: round; stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.star { fill: var(--ink); stroke: var(--now); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.dot-city { fill: var(--red); stroke: #fff; stroke-width: 2; vector-effect: non-scaling-stroke; }
.pin-label { font-weight: 800; paint-order: stroke; stroke: #fff; stroke-linejoin: round; }
.pin-label.capital { fill: var(--ink); }
.pin-label.trap { fill: var(--red); }
.after { min-height: 112px; }
.fact { font-size: 15px; margin: 0 0 8px; min-height: 44px; text-align: center; }

.end { display: flex; flex-direction: column; gap: 8px; max-width: 520px; padding-bottom: 18px; text-align: center; }
.kicker { color: var(--ink-2); font-size: 13px; font-weight: 700; letter-spacing: .08em; margin: 0; }
.final { font-family: system-ui, -apple-system, "Segoe UI", sans-serif; font-weight: 800; margin: 0; }
.final b { font-size: 68px; line-height: 1; }
.final span { color: var(--ink-2); font-size: 28px; }
.rank { font: 700 25px Georgia, serif; margin: 0; }
.marks-row { font-size: 20px; letter-spacing: 2px; margin: 0; }
.end-actions { display: grid; gap: 8px; }
.recap-title { font: 700 18px Georgia, serif; margin: 10px 0 0; text-align: left; }
.recap { display: grid; gap: 6px; list-style: none; margin: 4px 0; padding: 0; text-align: left; }
.recap li { background: var(--card); border-left: 5px solid var(--green); border-radius: 6px; font-size: 14px; padding: 7px 10px; }
.recap li.no { border-left-color: var(--red); }

@media (min-aspect-ratio: 5/4) and (min-width: 700px) {
  .play { column-gap: 16px; grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr); grid-template-rows: auto auto auto 1fr; }
  .bar { grid-column: 1 / -1; }
  .chart { grid-column: 1; grid-row: 2 / 5; }
  .play > .ask { grid-column: 2; grid-row: 2; }
  .play > .options { grid-column: 2; grid-row: 3; }
  .play > .after { grid-column: 2; grid-row: 4; }
}
@media (max-height: 600px) and (max-aspect-ratio: 5/4) {
  .option { min-height: 48px; }
  .options.two .option { min-height: 56px; }
  .chart { min-height: 120px; }
}
/* 站内的横向画框只有五百多像素高（1440x900 的屏上是 992x558）。首页原来比它高 17px，
   最后一行说明被切掉 —— 测验改成打开就显示之后，这是进页面第一眼看到的东西。
   横向的矮画框里收紧一档，并放宽到五个地区能排成一行。 */
@media (max-height: 620px) and (min-aspect-ratio: 5/4) {
  .home { gap: 8px; max-width: 520px; }
  .seal { height: 68px; width: 68px; }
  .home h1 { font-size: 40px; }
  .pitch { margin: 0 0 4px; }
  .label { margin-top: 4px; }
}
/* 矮的横向画框（2026-11-12）：Chromebook 1366x650 的屏上，站内画框只有 716x403。
   开始画面原来比框高出 61px，最后几个按钮要在框里再滚一下才看得到 —— 学生用的多是这种机器。
   这里改成左右两栏：左边是名字和一句介绍，右边是按钮。不动站内画框的大小（那是站长定过的高度）。 */
@media (max-height: 460px) and (min-aspect-ratio: 5/4) and (min-width: 600px) {
  .home { align-content: center; column-gap: 28px; display: grid; grid-auto-flow: row dense; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); max-width: 720px; row-gap: 8px; text-align: left; }
  .home > .seal, .home > h1, .home > .pitch { grid-column: 1; justify-self: start; }
  .home > .btn, .home > .label, .home > .regions, .home > .note { grid-column: 2; }
  .home > .seal { height: 56px; width: 56px; }
  .home h1 { font-size: 40px; }
  .pitch { font-size: 16px; margin: 0; }
  .label { margin: 2px 0 0; text-align: center; }
  .note { margin: 0; }
  .play { min-height: 0; }
  .option { min-height: 46px; }
  .options.two .option { min-height: 52px; }
  .chart { min-height: 96px; }
  .play > .ask { font-size: 26px; }
}
@media (prefers-reduced-motion: reduce) { .option { transition: none; } }
