* { box-sizing: border-box; }
html { color-scheme: light; }
body, button, input, summary { font-family: "Comic Sans MS", "Comic Sans", cursive; }
body { margin: 0; background: white; color: black; font-size: 18px; line-height: 1.45; }
button, input { font: inherit; color: inherit; border-radius: 0; }
button { cursor: pointer; background: white; border: 2px solid black; padding: 10px 16px; touch-action: manipulation; }
button:disabled { cursor: default; opacity: .45; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px dashed black; outline-offset: 4px; }
[hidden] { display: none !important; }
a { color: black; text-underline-offset: 3px; }
main { max-width: 1100px; margin: 0 auto; padding: 26px 24px 40px; }
.intro { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 25px; }
h1 { font-size: 36px; margin: 0; }
.modes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 28px; }
.mode { min-height: 64px; font-size: 20px; font-weight: bold; border-width: 3px; }
.mode.active, .mode:hover { background: black; color: white; }
.round-heading h2 { font-size: 24px; margin: 0 0 15px; }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 22px; }
.cards.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.country-card { position: relative; border: 3px solid black; padding: 15px; min-width: 0; }
.country-card:focus-within { outline: 2px solid black; outline-offset: 3px; z-index: 6; }
.card-top { margin-bottom: 8px; }
.letter { font-size: 32px; font-weight: bold; }
.card-caption { display: none; }
.input-wrap { position: relative; }
.country-input { width: 100%; min-width: 0; padding: 9px 30px 9px 0; border: 0; border-bottom: 2px solid black; background: white; outline: 0; font-size: 22px; text-overflow: ellipsis; }
.country-input::placeholder { color: #555; font-size: 18px; }
.country-input:disabled { opacity: 1; -webkit-text-fill-color: black; }
.clear-slot { position: absolute; top: 5px; right: -6px; width: 34px; height: 40px; padding: 0; border: 0; font-size: 28px; }
.slot-note { font-size: 16px; margin: 8px 0 0; }
.slot-note:empty { display: none; }
.suggestions { position: absolute; top: calc(100% - 4px); left: -3px; right: -3px; z-index: 20; background: white; border: 3px solid black; max-height: 280px; overflow-y: auto; }
.suggestion { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px; cursor: pointer; border-bottom: 1px solid black; }
.suggestion:last-child { border-bottom: 0; }
.suggestion[aria-selected=true], .suggestion:hover { background: black; color: white; }
.suggestion small { font-size: 16px; }
.suggestion small:empty { display: none; }
.no-matches { font-size: 17px; padding: 12px; }
.result { border: 3px solid black; padding: 23px; display: grid; grid-template-columns: minmax(0,1.1fr) minmax(230px,1fr); align-items: center; gap: 25px; min-height: 170px; }
.result.waiting { display: block; min-height: 125px; }
.result.waiting h2 { font-size: 24px; margin: 10px 0; }
.result.waiting p { margin: 8px 0; }
.eyebrow { font-size: 18px; margin: 0 0 10px; }
.answer { display: inline-block; background: #b3f2a7; padding: 5px 13px; font-size: 42px; line-height: 1.2; margin: 0 0 12px; border: 2px solid black; }
.answer.words { font-size: 27px; }
.warning .answer, .negative .answer { background: white; }
.answer-names, .answer-note { margin: 7px 0 0; font-size: 18px; }
.evidence { border-left: 2px solid black; padding-left: 23px; }
.evidence-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 18px; padding: 7px; }
.evidence-row.winner { background: #b3f2a7; font-weight: bold; }
.evidence-row small { display: block; font-size: 16px; font-weight: normal; }
.evidence-row strong { font-weight: inherit; white-space: nowrap; }
.add-chain { width: 100%; font-weight: bold; }
.add-chain:hover { background: black; color: white; }
.source-note { font-size: 16px; margin: 12px 0 0; }
.source-note a { margin-right: 12px; }
.chain-panel { border: 3px solid black; padding: 17px; margin-top: 20px; }
.chain-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.chain-heading h2 { font-size: 23px; margin: 0; }
.chain-heading h2 span { display: block; font-size: 17px; font-weight: normal; }
.chain-list { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; margin: 15px 0 0; counter-reset: chain; }
.chain-list li { border: 2px solid black; padding: 7px 10px; counter-increment: chain; }
.chain-list li:before { content: counter(chain) ". "; }
.help { font-size: 16px; margin: 14px 0 0; }
.reference { margin-top: 32px; }
details { border-top: 2px solid black; }
details:last-child { border-bottom: 2px solid black; }
summary { padding: 16px 0; cursor: pointer; font-size: 18px; font-weight: bold; }
details p { font-size: 17px; }
.deck-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px 20px; padding: 15px 0 22px; font-size: 18px; }
.download { display: inline-block; padding: 8px 0; }
.rules-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px 30px; padding-bottom: 16px; }
.rules-grid h3 { font-size: 20px; margin-bottom: 8px; }
.rules-grid p { margin-top: 8px; }
.no-script { padding: 20px; border: 3px solid black; }
@media (max-width: 760px) {
  .modes { grid-template-columns: 1fr 1fr; }
  .mode { min-height: 60px; font-size: 19px; }
  .result { grid-template-columns: 1fr; gap: 18px; }
  .evidence { border-left: 0; border-top: 2px solid black; padding: 12px 0 0; }
  .deck-list, .rules-grid { grid-template-columns: 1fr 1fr; }
  .country-input { font-size: 18px; }
}
@media (max-width: 520px) {
  main { padding: 20px 14px 30px; }
  h1 { font-size: 27px; }
  .intro { gap: 10px; margin-bottom: 20px; }
  .intro button { font-size: 17px; padding: 8px 10px; }
  .modes { gap: 8px; margin-bottom: 23px; }
  .mode { padding: 9px; font-size: 18px; min-height: 55px; }
  .round-heading h2 { font-size: 21px; }
  .cards, .cards.two { grid-template-columns: 1fr; gap: 10px; }
  .country-card { padding: 10px 12px; display: grid; grid-template-columns: 34px minmax(0,1fr); gap: 0 10px; align-items: center; }
  .card-top { margin: 0; grid-row: 1 / 3; }
  .letter { font-size: 30px; }
  .country-input { font-size: 21px; padding-top: 6px; padding-bottom: 6px; }
  .slot-note { grid-column: 2; font-size: 16px; }
  .suggestions { left: 44px; max-height: 235px; }
  .suggestion { padding: 11px 9px; font-size: 17px; }
  .suggestion small { font-size: 15px; }
  .result { padding: 16px; }
  .answer { font-size: 36px; }
  .answer.words { font-size: 24px; }
  .answer-note, .answer-names, .evidence-row { font-size: 17px; }
  .evidence-row small { font-size: 16px; }
  .chain-panel { padding: 13px; }
  .chain-heading h2 { font-size: 21px; }
  .chain-heading button { font-size: 16px; padding: 8px; }
  .rules-grid { grid-template-columns: 1fr; gap: 0; }
  .deck-list { font-size: 16px; gap: 10px; }
}
