:root {
  color-scheme: dark;
  font-family: "Segoe UI", system-ui, sans-serif;
  background: #101a15;
  color: #eff4ec;
  --muted: #abbdaf;
  --line: #3b5144;
  --green: #d6f67b;
  --panel: #192820;
}
* { box-sizing: border-box; }
body { margin: 0; }
button { font: inherit; cursor: pointer; }
button:disabled { cursor: default; }
button:focus-visible, a:focus-visible, summary:focus-visible, select:focus-visible { outline: 2px solid var(--green); outline-offset: 4px; }
.site-header { padding-top: env(safe-area-inset-top); border-bottom: 1px solid #2d4235; background: #15231b; }
.header-inner, main, footer { width: min(920px, calc(100% - max(16px, env(safe-area-inset-left)) - max(16px, env(safe-area-inset-right)))); margin-inline: auto; transform: translateX(calc((max(16px, env(safe-area-inset-left)) - max(16px, env(safe-area-inset-right))) / 2)); }
.header-inner { display: flex; justify-content: space-between; align-items: center; min-height: 67px; gap: 12px; }
.wordmark { display: inline-flex; gap: 9px; align-items: center; color: #f6faee; text-decoration: none; font-weight: 850; letter-spacing: .12em; }
.mark { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 7px; background: var(--green); color: #142218; font-weight: 900; font-style: italic; }
.header-label { color: var(--muted); font-size: .88rem; text-align: right; }
main { padding-block: 30px 0; }
.hero { position: relative; isolation: isolate; overflow: hidden; padding: clamp(22px, 5vw, 54px); border: 1px solid #48674d; border-radius: 19px; background: #183725; }
.hero-copy { position: relative; max-width: 510px; }
.hero-copy > p:last-child { color: #c4d9c6; line-height: 1.55; max-width: 340px; margin: 19px 0 0; }
.eyebrow { margin: 0 0 12px; color: var(--green); text-transform: uppercase; font-size: .8rem; font-weight: 800; letter-spacing: .16em; }
h1 { font-size: clamp(2.6rem, 7vw, 5.4rem); letter-spacing: -.075em; line-height: .93; margin: 0; font-weight: 900; }
h1 em { color: var(--green); }
.pitch { position: absolute; z-index: -1; width: 460px; height: 278px; right: -56px; top: calc(50% - 140px); transform: rotate(-25deg); border: 2px solid #7aa489; opacity: .3; background: repeating-linear-gradient(90deg, #396b47 0 45px, #2d5a3b 45px 90px); }
.pitch::before, .pitch::after { content: ""; position: absolute; top: 25%; height: 50%; width: 16%; border: 2px solid #a2c5a7; }
.pitch::before { left: -2px; }
.pitch::after { right: -2px; }
.pitch i { position: absolute; left: 50%; top: 0; bottom: 0; border-left: 2px solid #a2c5a7; }
.pitch i::after { content: ""; position: absolute; width: 78px; height: 78px; border: 2px solid #a2c5a7; border-radius: 50%; top: 50%; left: -1px; transform: translate(-50%, -50%); }
.modes { display: flex; gap: 8px; margin-block: 20px 10px; }
.modes button, .topics button { border: 1px solid var(--line); background: #1d2c23; color: #c4d3c7; border-radius: 9px; padding: 10px 16px; font-weight: 700; }
.modes button[aria-pressed="true"], .topics button[aria-pressed="true"] { color: #192517; background: var(--green); border-color: var(--green); }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: clamp(16px, 4vw, 34px); }
.game-meta { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; color: var(--muted); font-size: .9rem; font-weight: 700; }
progress { width: 100%; height: 6px; display: block; margin: 12px 0 0; border: 0; border-radius: 999px; overflow: hidden; accent-color: var(--green); background: #354a3c; }
progress::-webkit-progress-bar { background: #354a3c; }
progress::-webkit-progress-value { background: var(--green); }
h2 { margin: 17px 0; font-size: clamp(1.35rem, 4vw, 2.1rem); line-height: 1.18; letter-spacing: -.035em; }
.choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.choice, .match-cell { border: 1px solid var(--line); background: #23362a; color: #eef4ed; border-radius: 9px; display: flex; text-align: left; align-items: center; gap: 10px; padding: 10px 13px; min-height: 56px; font-weight: 650; overflow-wrap: anywhere; }
.choice small { margin-left: auto; text-align: right; font-size: .75rem; }
.choice-letter, .pair-tag { display: grid; flex: 0 0 auto; place-items: center; border-radius: 6px; background: #33483a; width: 26px; height: 26px; font-size: .82rem; }
.choice:hover:not(:disabled), .match-cell:hover:not(:disabled), .match-cell[aria-pressed="true"] { border-color: var(--green); background: #304533; }
.choice.correct, .match-cell.correct { background: #214438; border-color: #76caaa; }
.choice.incorrect, .match-cell.incorrect { background: #492e2d; border-color: #ffaaa7; }
.feedback { line-height: 1.5; margin: 16px 0 0; color: #d8e7d7; }
.primary, .secondary { margin-top: 15px; border: 1px solid transparent; border-radius: 8px; padding: 11px 16px; font-weight: 800; min-height: 46px; }
.primary { background: var(--green); color: #152419; }
.primary:hover:not(:disabled) { background: #ebffb1; }
.primary:disabled, .secondary:disabled { opacity: .53; }
.secondary { color: #deebdc; border-color: var(--line); background: #23362a; }
.topics { display: flex; gap: 8px; flex-wrap: wrap; }
.topics button { text-transform: capitalize; min-height: 44px; padding: 7px 12px; }
.match-controls { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 16px; }
.game-select { display: flex; align-items: center; gap: 10px; margin: 14px 0; }
.match-controls .game-select { margin: 0; }
.game-select label { color: var(--muted); font-weight: 700; }
.game-select select { min-height: 44px; min-width: 70px; padding: 6px 10px; font: inherit; color: inherit; border: 1px solid var(--line); border-radius: 8px; background: #23362a; }
.instructions { color: var(--muted); margin: 14px 0 16px; line-height: 1.45; }
.match-grid { position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(24px, 10vw, 100px); }
.match-grid canvas { position: absolute; width: 100%; height: 100%; inset: 0; pointer-events: none; }
.match-column { position: relative; display: grid; grid-template-rows: auto; grid-auto-rows: 1fr; gap: 8px; }
.match-column h3 { margin: 0; color: var(--muted); font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; }
.match-cell { justify-content: space-between; min-height: 56px; }
.match-cell.linked { background: #1b2b22; border-color: #304238; color: var(--muted); }
.match-date { display: block; margin-top: 4px; color: var(--muted); font-size: .8rem; font-weight: 500; }
.match-cell[data-side="right"] .pair-tag { order: -1; }
.pair-tag { color: #142218; background: var(--pair-color); }
.match-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.corrections, .review ol { line-height: 1.5; padding-left: 20px; }
.review li { margin-block: 8px; }
.review summary { cursor: pointer; width: fit-content; }
footer { color: var(--muted); font-size: .875rem; padding-block: 22px max(22px, env(safe-area-inset-bottom)); text-align: center; }
footer span { padding-inline: 5px; }
.app-version { display: block; margin-top: 6px; font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
@media (max-width: 540px) {
  .pitch { right: -275px; opacity: .22; }
  .choices { grid-template-columns: 1fr; }
  .match-cell { padding: 8px; gap: 4px; font-size: .875rem; }
  .pair-tag { width: 19px; height: 22px; }
}
.modes { flex-wrap: wrap; }
.map-club { color: var(--green); margin: -8px 0 0; font-weight: 700; }
.map-frame { position: relative; border: 1px solid var(--line); border-radius: 12px; background: #c7e0e6; }
#stadium-map { display: block; height: clamp(350px, 56dvh, 540px); width: 100%; border-radius: 11px; touch-action: none; cursor: crosshair; }
#stadium-map:active { cursor: grabbing; }
#stadium-map:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }
.map-controls { position: absolute; inset: 12px auto auto 12px; display: grid; gap: 4px; }
.map-controls button, .map-key { border: 1px solid #35534a; color: #182d26; background: #f0f5e6; font-weight: 800; border-radius: 7px; }
.map-controls button { min-width: 43px; min-height: 39px; font-size: 1.2rem; }
.map-controls button:disabled { opacity: .65; }
.map-controls button:last-child { font-size: .76rem; }
.map-key { position: absolute; inset: 12px 12px auto auto; padding: 4px 8px; pointer-events: none; }
.map-review { margin-top: 16px; }
.map-credit { margin: 6px 0 0; color: var(--muted); font-size: .8rem; }
.map-credit a { color: inherit; }
.score-list { list-style: none; padding: 0; margin: 14px 0 0; }
.score-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.score-list strong { flex: 0 0 auto; color: var(--green); }
.score-list :is(time, small) { display: block; margin-top: 3px; color: var(--muted); font-size: .82rem; }
