:root {
  --ink: #163d4b;
  --muted: #486674;
  --sky: #eaf5fa;
  --paper: #fffefb;
  --line: #b8d2dd;
  --coral: #aa382b;
  --peach: #ffe4da;
  --blue: #165c78;
  font-family: 'Trebuchet MS', 'Segoe UI', Arial, sans-serif;
  color: var(--ink);
  background: var(--sky);
  font-size: 16px;
  line-height: 1.45;
  font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; text-underline-offset: 4px; }
button, input { font: inherit; }
button, .button { min-height: 44px; cursor: pointer; border: 1px solid var(--ink); background: var(--paper); color: var(--ink); border-radius: 6px; padding: 9px 16px; font-weight: 700; }
button:hover, .button:hover { background: var(--peach); }
button:disabled { opacity: .55; cursor: default; }
.primary { background: var(--coral); border-color: var(--coral); color: white; }
.primary:hover { background: #872c23; color: white; }
.button { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
:focus-visible { outline: 3px solid var(--coral); outline-offset: 4px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -100px; z-index: 20; background: white; padding: 12px; }
.skip:focus { top: 12px; }
.site-header { border-bottom: 1px solid var(--line); background: var(--paper); }
.header-inner, main, .footer-inner { max-width: 1140px; margin: auto; padding-inline: 28px; }
.header-inner { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding-block: 14px; }
.brand { font-size: 23px; font-weight: 800; text-decoration: none; letter-spacing: -1px; white-space: nowrap; }
.brand-mark { background: var(--coral); color: white; padding: 2px 7px 4px; border-radius: 4px; margin-right: 8px; letter-spacing: 0; }
.top-nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.top-nav a { min-height: 44px; display: inline-flex; align-items: center; text-decoration: none; }
.top-nav a[aria-current=page] { text-decoration: underline; text-decoration-thickness: 2px; }
main { padding-block: 24px 42px; min-height: 60vh; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(28px, 3vw, 40px); letter-spacing: -1.3px; line-height: 1.1; margin-bottom: 9px; }
h2 { font-size: 23px; line-height: 1.2; letter-spacing: -.5px; }
h3 { font-size: 18px; line-height: 1.3; }
p { margin-bottom: 14px; }
.page-intro { margin-bottom: 22px; }
.page-intro p { margin: 0; color: var(--muted); }
.category-tabs { display: flex; gap: 8px; overflow-x: auto; padding: 4px 4px 12px; margin: 0 -4px 8px; }
.category-tabs button { flex: 0 0 auto; border: 1px solid var(--line); border-radius: 24px; padding-inline: 18px; }
.category-tabs button[aria-pressed=true] { background: var(--ink); color: white; border-color: var(--ink); }
.tab-count { margin-left: 6px; font-weight: 400; }
.content-block { margin-block: 0 24px; }
.menu-batch { border: 1px solid var(--line); background: var(--paper); border-radius: 10px; padding: 19px 22px 18px; }
.batch-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; border-bottom: 2px solid var(--ink); margin-bottom: 4px; padding-bottom: 12px; }
.batch-heading h2 { margin: 0; }
.batch-heading > span { color: var(--muted); white-space: nowrap; flex-shrink: 0; }
.menu-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 28px; }
.game-card { display: grid; grid-template-columns: 124px minmax(0,1fr); gap: 16px; padding: 17px 0; border-bottom: 1px dashed var(--line); text-decoration: none; min-width: 0; align-items: center; }
.game-card:hover .game-title { text-decoration: underline; color: var(--coral); }
.game-picture { display: block; position: relative; background: #d7e9ee; border-radius: 6px; }
.game-picture img { width: 100%; height: auto; aspect-ratio: 4 / 3; display: block; border-radius: 6px; }
.picture-failure { display: block; padding: 7px; min-height: 65px; }
.card-copy { display: block; min-width: 0; }
.game-title { display: block; font-size: 18px; line-height: 1.2; margin-bottom: 5px; overflow-wrap: anywhere; }
.game-cue { display: block; color: var(--muted); margin-bottom: 5px; }
.game-entry { color: var(--coral); font-weight: 700; }
.batch-end { display: flex; justify-content: flex-end; padding-top: 14px; }
.batch-end p { margin: 8px 0 0; color: var(--muted); }
.menu-bottom { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-block: 4px; }
.menu-bottom p { margin: 0; }
.note-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.short-note { border-top: 3px solid var(--coral); padding: 20px 0 0; }
.short-note h2 { margin-bottom: 10px; }
.short-note { display: flex; flex-direction: column; }
.short-note .example-link { margin-top: auto; align-self: flex-start; }
.search-region { margin-bottom: 12px; padding: 0; }
.search-line { display: flex; gap: 8px; }
.search-line form { display: flex; flex: 1; min-width: 0; gap: 8px; }
.search-line input { min-width: 0; width: 100%; height: 44px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 6px; background: white; color: var(--ink); }
.search-line label { flex: 1; min-width: 0; }
.search-line button { padding-inline: 14px; }
.search-status { min-height: 44px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.search-status p { margin: 0; }
.link-button { padding: 0 4px; border: 0; background: none; text-decoration: underline; font-weight: 400; }
.search-status .link-button { min-height: 44px; margin: 0; }
.empty-state { padding: 26px; border: 1px solid var(--line); background: white; border-radius: 8px; }
dialog { width: min(520px, calc(100% - 24px)); max-height: calc(100dvh - 24px); padding: 0; border: 1px solid var(--ink); border-radius: 12px; background: var(--paper); color: var(--ink); }
dialog::backdrop { background: rgb(15 42 54 / .55); }
.dialog-shell { display: flex; flex-direction: column; max-height: calc(100dvh - 26px); }
.dialog-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.dialog-head h2 { margin: 0; }
.dialog-body { overflow-y: auto; min-height: 0; padding: 16px 20px; }
.dialog-body > p { color: var(--muted); }
.dialog-actions { padding: 12px 20px max(12px,env(safe-area-inset-bottom)); border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; }
fieldset { border: 0; padding: 0; margin: 12px 0; min-width: 0; }
legend { font-weight: 700; margin-bottom: 8px; }
.radio-choice { min-height: 46px; display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-bottom: 1px solid var(--line); cursor: pointer; font-size: 16px; }
.radio-choice input { width: 20px; height: 20px; accent-color: var(--coral); flex: 0 0 auto; }
.radio-choice span + span { margin-left: auto; }
summary { min-height: 46px; cursor: pointer; padding: 10px 0; font-weight: 700; }
.breadcrumb { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 22px; color: var(--muted); }
.breadcrumb a { min-height: 44px; display: inline-flex; align-items: center; }
.breadcrumb-separator { font-size: 24px; line-height: 1; color: var(--muted); }
.play-layout { display: grid; grid-template-columns: minmax(220px, .62fr) minmax(0,1.55fr); grid-template-rows: auto 1fr; align-items: start; gap: 20px 32px; }
.game-heading { grid-column: 1; grid-row: 1; min-width: 0; }
.game-heading h1 { margin-block: 12px 0; overflow-wrap: anywhere; }
.game-brief { grid-column: 1; grid-row: 2; min-width: 0; }
.play-layout > .stage { grid-column: 2; grid-row: 1 / span 2; margin-bottom: 0; }
.category-stamp { display: inline-block; border-bottom: 3px solid var(--coral); font-weight: 700; padding-bottom: 5px; }
.play-note { padding: 15px 0; border-top: 1px solid var(--line); }
.play-note h2 { font-size: 18px; margin-bottom: 8px; }
.play-note p { overflow-wrap: anywhere; }
.stage { border: 1px solid var(--ink); border-radius: 10px; background: var(--paper); }
.player-toolbar { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px; border-bottom: 1px solid var(--line); }
.player-toolbar button { padding-inline: 13px; }
.stage-screen { aspect-ratio: 4 / 3; position: relative; background: #d9eaf0; min-width: 0; }
.stage-screen iframe { display: block; width: 100%; height: 100%; border: 0; position: absolute; inset: 0; }
.preview { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; padding: 18px; }
.preview img { width: min(65%,360px); height: auto; border-radius: 8px; }
.player-status { padding: 12px 15px; margin: 0; min-height: 48px; }
.stage:fullscreen, .stage.is-fullscreen { display: flex; flex-direction: column; width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; border: 0; border-radius: 0; padding: 0; background: #0f2430; }
.stage:fullscreen .stage-screen, .stage.is-fullscreen .stage-screen { flex: 1 1 0; min-height: 0; width: 100%; height: auto; max-height: none; aspect-ratio: auto; }
.stage:fullscreen .player-status, .stage.is-fullscreen .player-status { color: white; padding: 5px 10px; min-height: 0; font-size: 16px; }
.stage:fullscreen .player-toolbar, .stage.is-fullscreen .player-toolbar { background: var(--paper); padding: 5px 8px; gap: 6px; flex: 0 0 auto; }
.stage.is-fullscreen { position: fixed; inset: 0; z-index: 30; }
.related { margin-top: 32px; }
.related .batch-heading { flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.related .batch-heading a { display: inline-flex; align-items: center; min-height: 44px; }
.reading { max-width: 760px; }
.prose-block { padding: 22px 26px; background: var(--paper); border: 1px solid var(--line); border-radius: 8px; }
.prose-block h2 { margin-bottom: 12px; }
.prose-block p:last-child { margin-bottom: 0; }
.faq-row { border-top: 1px solid var(--line); padding: 18px 0 4px; }
.faq-row h2 { font-size: 21px; }
.example-link { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; }
.site-footer { border-top: 1px solid var(--line); background: var(--paper); }
.footer-inner { display: flex; justify-content: space-between; align-items: start; gap: 24px; padding-block: 24px; }
.footer-inner p { margin: 0; max-width: 290px; color: var(--muted); }
.footer-links { display: flex; flex-wrap: wrap; gap: 4px 20px; justify-content: flex-end; }
.footer-links a { display: inline-flex; min-height: 44px; align-items: center; }
@media (max-width: 850px) {
  .header-inner, main, .footer-inner { padding-inline: 20px; }
  .game-card { grid-template-columns: 92px minmax(0,1fr); gap: 12px; }
  .menu-grid { gap: 0 20px; }
  .play-layout { grid-template-columns: 1fr; grid-template-rows: auto; gap: 20px; }
  .game-heading, .game-brief, .play-layout > .stage { grid-column: 1; grid-row: auto; }
  .game-brief { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
  .game-brief .play-note { margin-bottom: 0; }
  .game-brief .play-note:last-child { grid-column: 1 / -1; }
  .game-title { font-size: 16px; }
  .game-entry { display: none; }
}
@media (max-width: 620px) {
  .header-inner, main, .footer-inner { padding-inline: 16px; }
  .header-inner { gap: 5px; padding-block: 9px; flex-wrap: wrap; }
  .brand { font-size: 21px; }
  .top-nav { gap: 14px; margin-left: auto; }
  .top-nav a { font-size: 16px; }
  main { padding-top: 20px; }
  .page-intro { margin-bottom: 16px; }
  .menu-batch { padding: 14px 16px; }
  .batch-heading { padding-bottom: 10px; gap: 8px; }
  .batch-heading h2 { font-size: 21px; }
  .menu-grid { grid-template-columns: 1fr; }
  .game-card { grid-template-columns: 76px minmax(0,1fr); gap: 12px; padding-block: 12px; }
  .game-cue { margin: 0; line-height: 1.3; }
  .game-title { line-height: 1.25; margin-bottom: 4px; }
  .batch-end { padding-top: 12px; }
  .note-pair { display: block; }
  .menu-bottom { align-items: start; flex-direction: column; gap: 12px; }
  .search-line { gap: 6px; }
  .search-line form { gap: 6px; }
  .search-line button { padding-inline: 10px; }
  .search-status { font-size: 16px; }
  .game-brief { display: block; }
  .game-brief .play-note { margin-bottom: 16px; }
  .preview { gap: 14px; padding: 12px; }
  .preview img { max-width: 52%; }
  .player-toolbar { gap: 5px; padding: 7px; }
  .player-toolbar button { padding-inline: 9px; }
  .prose-block { padding: 20px; }
  .footer-inner { display: block; }
  .footer-inner p { margin-bottom: 12px; }
  .footer-links { justify-content: start; }
  .dialog-head, .dialog-body, .dialog-actions { padding-inline: 16px; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }

/* Filled preview cells and native links for complete game cards. */
.game-picture img, .preview img { object-fit: cover; }
