:root {
  --ink: #202240;
  --indigo: #393ab4;
  --lime: #deef71;
  --muted: #5c5e71;
  --line: #d5d7e3;
  --paper: #fff;
  --wash: #f4f5fa;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; font-size: 16px; line-height: 1.5; }
body.modal-open { position: fixed; width: 100%; }
a { color: inherit; text-underline-offset: .22em; }
a:hover { color: var(--indigo); }
button, input { font: inherit; }
button, .button { min-height: 44px; padding: 9px 15px; border: 1px solid var(--line); background: white; color: var(--ink); cursor: pointer; border-radius: 3px; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
button:hover, .button:hover { border-color: var(--indigo); color: var(--indigo); }
button:disabled { opacity: .5; cursor: default; }
.primary { background: var(--indigo); color: #fff; border-color: var(--indigo); }
.primary:hover { background: #292a94; color: #fff; }
:focus-visible { outline: 3px solid var(--indigo); outline-offset: 3px; }
[hidden] { display: none !important; }
.skip { position: absolute; top: -90px; left: 12px; z-index: 10; background: var(--lime); padding: 12px; }
.skip:focus { top: 8px; }
.wrap { width: min(1160px, calc(100% - 48px)); margin-inline: auto; }
.site-header { border-bottom: 1px solid var(--line); }
.header-inner { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 22px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.brand svg { width: 30px; height: 30px; }
.site-nav { display: flex; gap: 8px; flex-wrap: wrap; }
.site-nav a { min-height: 44px; display: inline-flex; align-items: center; padding: 8px 12px; text-decoration: none; }
.site-nav a[aria-current] { box-shadow: inset 0 -3px var(--indigo); color: var(--indigo); }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(28px, 3.5vw, 44px); line-height: 1.12; letter-spacing: -.045em; }
h2 { font-size: 23px; line-height: 1.25; letter-spacing: -.025em; }
h3 { font-size: 18px; line-height: 1.3; }
main { padding-block: 28px 36px; }
.page-heading { margin-bottom: 22px; display: flex; gap: 20px; justify-content: space-between; align-items: end; }
.page-heading p { margin-top: 8px; color: var(--muted); max-width: 62ch; }
.page-number { font-family: monospace; color: var(--indigo); padding-bottom: 3px; white-space: nowrap; }
.input-switch { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 0; }
.input-switch button { border-bottom: 0; border-radius: 3px 3px 0 0; padding-inline: 18px; font-weight: 700; }
.input-switch button[aria-pressed="true"] { background: var(--lime); border-color: var(--ink); }
.input-switch span { font-size: 16px; font-weight: 400; }
.content-block { border-top: 1px solid var(--line); padding-block: 22px; margin-bottom: 18px; }
.panel-block { border: 1px solid var(--ink); padding: 20px; margin-bottom: 24px; }
.block-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.block-heading p, .subtle { color: var(--muted); }
.panel-code { font-family: monospace; color: var(--indigo); font-size: 16px; }
.feature-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.game-card { min-width: 0; border: 1px solid var(--line); background: #fff; }
.game-card a { text-decoration: none; }
.game-card h3 a:hover { text-decoration: underline; }
.preview-link { display: block; background: var(--wash); }
.preview-link img { display: block; width: 100%; height: 106px; object-fit: cover; }
.image-fallback { padding: 14px; display: block; font-size: 16px; }
.card-copy { padding: 10px 12px 12px; }
.category-label { color: var(--indigo); font-size: 16px; display: block; }
.game-card h3 { margin-block: 3px 7px; font-size: 17px; overflow-wrap: anywhere; }
.control-label { font-family: monospace; color: var(--muted); font-size: 16px; }
.feature-card { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1fr); column-gap: 16px; row-gap: 12px; border: 0; }
.feature-card .preview-link { align-self: start; border: 1px solid var(--line); }
.feature-card .preview-link img { height: auto; aspect-ratio: 4/3; }
.feature-card .card-copy { padding: 0; min-width: 0; }
.feature-card:not(:only-child) .card-copy { display: flex; flex-direction: column; align-items: flex-start; }
.feature-card:not(:only-child) .game-cue { flex: 1; }
.feature-card:only-child { grid-column: 1 / -1; grid-template-columns: minmax(0, .65fr) minmax(0, 1fr); }
.feature-card h3 { font-size: 21px; }
.game-cue { margin: 9px 0; }
.text-action { display: inline-flex; align-items: center; gap: 12px; color: var(--indigo); min-height: 44px; font-weight: 700; }
.panel-bottom { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 18px; }
.panel-bottom p { max-width: 62ch; color: var(--muted); }
.guide-prompt { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 20px; }
.guide-prompt p { margin-top: 8px; color: var(--muted); max-width: 65ch; }
.search-region { padding-block: 8px; margin-bottom: 8px; border-block: 1px solid var(--line); }
.search-form { display: flex; gap: 8px; flex-wrap: wrap; }
.search-field { display: flex; min-width: 0; flex: 1 1 120px; }
.search-field input { min-height: 44px; width: 100%; min-width: 0; padding: 9px 12px; border: 1px solid var(--line); border-radius: 3px; color: var(--ink); background: white; }
.search-status { margin-top: 5px; line-height: 22px; display: flex; justify-content: space-between; gap: 10px; }
.search-status p { color: var(--muted); white-space: nowrap; }
.clear-inline { min-height: 22px; padding: 0 2px; border: 0; text-decoration: underline; font-size: 16px; }
.catalogue-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.catalogue-grid .game-card, .related-grid .game-card { display: flex; flex-direction: column; }
.catalogue-grid .card-copy, .related-grid .card-copy { display: flex; flex-direction: column; flex: 1; }
.catalogue-grid .control-label, .related-grid .control-label { margin-top: auto; }
.catalogue-batch { border: 1px solid var(--line); padding: 18px; margin-bottom: 24px; }
.batch-top { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.batch-top h2 { font-family: monospace; color: var(--indigo); font-size: 17px; letter-spacing: 0; }
.batch-footer { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding-top: 14px; }
.batch-footer p { color: var(--muted); }
.retired-more { display: inline-flex; align-items: center; justify-content: center; padding: 9px 15px; border: 1px solid transparent; border-radius: 3px; flex-shrink: 0; }
.empty-state { background: var(--wash); padding: 24px; }
.empty-state p { margin-block: 10px 16px; }
.filter-dialog { padding: 0; border: 1px solid var(--ink); border-radius: 4px; width: 540px; max-width: calc(100vw - 24px); max-height: calc(100dvh - 24px); color: var(--ink); }
.filter-dialog::backdrop { background: rgb(24 26 54 / 45%); }
.dialog-layout { display: flex; flex-direction: column; max-height: calc(100dvh - 26px); }
.dialog-heading, .dialog-actions { padding: 16px 20px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; background: white; flex: 0 0 auto; }
.dialog-heading { border-bottom: 1px solid var(--line); }
.dialog-heading h2 { font-size: 23px; flex: 1 1 12ch; min-width: 0; }
.filter-dialog button { max-width: 100%; white-space: normal; overflow-wrap: normal; word-break: normal; flex: 0 1 auto; }
.dialog-scroll { overflow-y: auto; overscroll-behavior: contain; padding: 12px 20px; min-height: 0; }
.dialog-scroll > p { color: var(--muted); margin-bottom: 12px; }
.filter-group { border-block-start: 1px solid var(--line); padding-block: 8px; }
summary { cursor: pointer; min-height: 44px; padding: 10px 0; font-weight: 700; }
summary span { font-weight: 400; color: var(--muted); }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { padding-block: 4px; color: var(--muted); font-size: 16px; }
.radio-label { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 9px 10px; min-height: 44px; font-size: 16px; cursor: pointer; border: 1px solid transparent; border-radius: 3px; }
.radio-label:has(input:checked) { background: var(--wash); border-color: var(--indigo); }
.radio-label input { margin: 0; width: 18px; height: 18px; accent-color: var(--indigo); flex-shrink: 0; }
.radio-label span { flex: 1; }
.radio-label small { font-size: 16px; }
.dialog-actions { border-top: 1px solid var(--line); padding-bottom: max(16px, env(safe-area-inset-bottom)); }
.prose { max-width: 810px; }
.prose h2 { margin-bottom: 12px; }
.prose p + p { margin-top: 12px; }
.prose ul { padding-left: 22px; margin: 12px 0 0; }
.prose li + li { margin-top: 8px; }
.guide-example { border-left: 3px solid var(--lime); padding-left: 16px; margin-top: 12px; }
.guide-example p { margin-top: 6px; }
.guide-example + p { margin-top: 12px; }
.section-index { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-bottom: 18px; }
.section-index a { min-height: 44px; display: inline-flex; align-items: center; }
.breadcrumb { margin-bottom: 16px; }
.breadcrumb a { display: inline-flex; align-items: center; min-height: 44px; }
.game-heading { margin-bottom: 20px; }
.game-heading h1 { max-width: 30ch; }
.game-heading p { margin-top: 8px; color: var(--muted); }
.player { border: 1px solid var(--ink); background: #f4f5fa; margin-bottom: 24px; }
.player-toolbar { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px; border-bottom: 1px solid var(--line); background: white; }
.player-stage { position: relative; display: grid; place-items: center; width: 100%; min-width: 0; aspect-ratio: 16/9; min-height: 240px; }
.player-stage iframe { width: 100%; height: 100%; border: 0; position: absolute; inset: 0; background: #fff; }
.player-preview { width: 100%; height: 100%; position: absolute; inset: 0; object-fit: cover; }
.player-start { z-index: 1; box-shadow: 0 0 0 8px rgb(255 255 255 / 85%); }
.player-status { padding: 9px 12px; background: white; border-top: 1px solid var(--line); }
.player:fullscreen, .player.is-expanded { display: flex; flex-direction: column; width: 100%; height: 100%; max-height: none; margin: 0; border: 0; background: #fff; }
.player.is-expanded { position: fixed; inset: 0; z-index: 20; height: 100dvh; }
.player:fullscreen .player-stage, .player.is-expanded .player-stage { aspect-ratio: auto; min-height: 0; max-height: none; flex: 1 1 0; width: 100%; }
.player:fullscreen .player-toolbar, .player.is-expanded .player-toolbar { flex: 0 0 auto; padding: max(6px, env(safe-area-inset-top)) 8px 6px; }
.player:fullscreen .player-status, .player.is-expanded .player-status { flex: 0 0 auto; padding: 4px 10px max(4px, env(safe-area-inset-bottom)); }
.player:fullscreen .player-stage iframe, .player.is-expanded .player-stage iframe { max-height: none; min-height: 0; aspect-ratio: auto; width: 100%; height: 100%; }
.related-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.related-grid .preview-link img { height: 100px; }
.site-footer { border-top: 1px solid var(--line); background: var(--wash); }
.footer-inner { padding-block: 24px; display: flex; align-items: start; justify-content: space-between; gap: 22px; }
.footer-inner p { max-width: 48ch; margin-top: 8px; color: var(--muted); }
.footer-links { display: flex; flex-wrap: wrap; gap: 4px 18px; max-width: 450px; }
.footer-links a { display: inline-flex; min-height: 44px; align-items: center; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 999px) {
  .catalogue-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feature-card { grid-template-columns: 1fr; }
  .feature-card:not(:only-child) { grid-template-rows: auto minmax(0, 1fr); }
  .feature-card .preview-link img { height: 140px; aspect-ratio: auto; }
}
@media (max-width: 599px) {
  .wrap { width: calc(100% - 28px); }
  .header-inner { min-height: 0; display: block; padding-top: 13px; }
  .brand { font-size: 21px; }
  .site-nav { gap: 6px; justify-content: space-between; margin-top: 5px; }
  .site-nav a { padding: 8px 3px; font-size: 16px; }
  main { padding-top: 20px; }
  h1 { font-size: 31px; }
  .page-heading { margin-bottom: 18px; }
  .page-heading p { margin-top: 7px; }
  .page-number { display: none; }
  .panel-block { padding: 14px; }
  .feature-grid { gap: 14px; }
  .feature-card .preview-link img { height: 100px; }
  .feature-card h3 { font-size: 18px; }
  .feature-card .text-action { font-size: 16px; }
  .panel-bottom { align-items: start; flex-direction: column; gap: 8px; margin-top: 12px; }
  .panel-bottom p { font-size: 16px; }
  .block-heading { margin-bottom: 12px; }
  .block-heading h2 { font-size: 20px; }
  .input-switch button { flex: 1; padding-inline: 10px; font-size: 16px; }
  .guide-prompt { grid-template-columns: 1fr; gap: 12px; }
  .guide-prompt > .button { justify-self: start; }
  .catalogue-batch { padding: 12px; }
  .catalogue-grid { gap: 12px; }
  .preview-link img { height: 88px; }
  .card-copy { padding: 8px; }
  .game-card h3 { font-size: 16px; line-height: 1.3; }
  .category-label { font-size: 16px; }
  .control-label { font-size: 16px; letter-spacing: -.035em; }
  .search-region { padding-block: 8px; }
  .search-form { gap: 6px; }
  .search-form button { padding-inline: 10px; }
  .search-field input { padding-inline: 10px; }
  .batch-footer { align-items: start; }
  .batch-footer button { white-space: nowrap; }
  .dialog-heading, .dialog-actions { padding: 12px 14px; }
  .dialog-scroll { padding-inline: 14px; }
  .player-toolbar { gap: 6px; padding: 8px; }
  .player-toolbar button { padding-inline: 9px; flex: 1 1 auto; }
  .player-stage { aspect-ratio: 4/3; min-height: 230px; }
  .footer-inner { display: block; }
  .footer-links { margin-top: 12px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; } }

/* Filled preview cells and native links for complete game cards. */
.game-card { color: inherit; text-decoration: none; }
.game-card:hover h3 { color: var(--indigo); text-decoration: underline; }
