:root {
  --paper: #f3f5f7;
  --card: #ffffff;
  --ink: #14213d;
  --ink-2: #5a6475;
  --line: #d9dee6;
  --red: #c8102e;
  --green: #1f7a4d;
  --gold: #f2a900;
  --blue: #0b5cad;
}
* { 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: 760px; 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: 800; min-height: 48px; padding: 10px 18px; width: 100%; }
.btn.primary { background: var(--ink); color: #fff; }
.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; }
.pennants { display: flex; gap: 8px; height: clamp(56px, 12vh, 84px); }
.pennants span { border-radius: 6px; box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .08); display: block; width: clamp(64px, 14vh, 96px); }
.pennants span:nth-child(1) { background: linear-gradient(90deg, #002b7f 33.3%, #fcd116 33.3% 66.6%, #ce1126 66.6%); }
.pennants span:nth-child(2) { background: linear-gradient(90deg, #002664 33.3%, #fecb00 33.3% 66.6%, #c60c30 66.6%); }
.pennants span:nth-child(3) { background: linear-gradient(90deg, #10069f 33.3%, #fedd00 33.3% 66.6%, #d22630 66.6%); }
.home h1 { font: 900 clamp(38px, 8.5vh, 54px)/.95 system-ui, -apple-system, "Segoe UI", sans-serif; letter-spacing: -.02em; margin: 4px 0 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(--line); border-radius: 999px; cursor: pointer; font-size: 14px; font-weight: 700; min-height: 40px; padding: 6px 14px; }

.play { display: grid; gap: 10px; grid-template-rows: auto auto minmax(0, 1fr) auto auto; height: 100dvh; min-height: 520px; }
.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-size: 22px; font-variant-numeric: tabular-nums; font-weight: 800; min-width: 44px; text-align: right; }
.ask { font-size: clamp(18px, 4.8vw, 22px); font-weight: 800; margin: 0; text-align: center; }
.flag-card { align-items: center; display: flex; justify-content: center; margin: 0; min-height: 120px; }
.flag-card img { background: #fff; border-radius: 8px; box-shadow: 0 6px 18px rgba(20, 33, 61, .18), 0 0 0 1px rgba(0, 0, 0, .08); max-height: 100%; max-width: min(100%, 420px); object-fit: contain; }
.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(15px, 4.2vw, 18px); font-weight: 800; line-height: 1.15; min-height: 58px; overflow-wrap: anywhere; padding: 8px; transition: transform .08s; }
.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: .5; }
.after { min-height: 110px; }
.compare { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; margin-bottom: 6px; }
.compare figure { margin: 0; text-align: center; }
.compare img { border-radius: 4px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .12); height: 52px; object-fit: contain; width: auto; max-width: 100%; }
.compare figcaption { color: var(--ink-2); font-size: 13px; font-weight: 700; }
.fact { font-size: 15px; margin: 0 0 8px; min-height: 22px; 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-weight: 900; margin: 0; }
.final b { font-size: 68px; line-height: 1; }
.final span { color: var(--ink-2); font-size: 28px; }
.rank { font-size: 24px; font-weight: 800; margin: 0; }
.marks-row { font-size: 20px; letter-spacing: 2px; margin: 0; }
.end-actions { display: grid; gap: 8px; }
.recap-title { font-size: 18px; margin: 10px 0 0; text-align: left; }
.recap { display: grid; gap: 6px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); list-style: none; margin: 4px 0; padding: 0; text-align: left; }
.recap li { align-items: center; background: var(--card); border-left: 5px solid var(--green); border-radius: 6px; display: flex; font-size: 14px; gap: 8px; padding: 6px 8px; }
.recap li.no { border-left-color: var(--red); }
.recap img { border-radius: 2px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .12); flex: none; height: 22px; width: 30px; }

@media (min-aspect-ratio: 5/4) and (min-width: 700px) {
  .play { max-width: 980px; column-gap: 20px; grid-template-columns: minmax(0, 1.3fr) minmax(280px, 1fr); grid-template-rows: auto auto auto 1fr; }
  .bar { grid-column: 1 / -1; }
  .flag-card { grid-column: 1; grid-row: 2 / 5; }
  .play > .ask { grid-column: 2; grid-row: 2; text-align: left; }
  .play > .options { grid-column: 2; grid-row: 3; }
  .play > .after { grid-column: 2; grid-row: 4; }
  .flag-card img { max-width: 100%; }
}
@media (max-height: 600px) and (max-aspect-ratio: 5/4) {
  .option { min-height: 46px; }
  .compare img { height: 40px; }
}
/* 矮的横向画框（2026-11-12）：Chromebook 1366x650 的屏上，站内画框只有 716x403。
   开始画面原来比框高出 119px，最后几个按钮要在框里再滚一下才看得到 —— 学生用的多是这种机器。
   这里改成左右两栏：左边是名字和一句介绍，右边是按钮。不动站内画框的大小（那是站长定过的高度）。 */
@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 > .pennants, .home > h1, .home > .pitch { grid-column: 1; justify-self: start; }
  .home > .btn, .home > .label, .home > .regions, .home > .note { grid-column: 2; }
  .home > .pennants { height: 56px; width: auto; }
  .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; }
  .pennants span { width: 64px; }
  .option { min-height: 44px; }
  .flag-card { min-height: 90px; }
}
@media (prefers-reduced-motion: reduce) { .option { transition: none; } }
