:root {
  --blue: #1647e8;
  --ink: #16203b;
  --muted: #4d5a74;
  --line: #c3ccdf;
  --wash: #f2f5fc;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: white;
  font-size: 16px;
  line-height: 1.5;
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: var(--blue); text-underline-offset: 3px; }
button, input { font: inherit; }
button, .button { min-height: 44px; padding: 9px 14px; border: 1px solid var(--blue); background: white; color: var(--blue); cursor: pointer; border-radius: 0; font-weight: 700; }
button:hover, .button:hover { background: #edf2ff; }
button:disabled { cursor: default; color: var(--muted); border-color: var(--line); background: var(--wash); }
.primary { color: white; background: var(--blue); }
.primary:hover { color: white; background: #1035b5; }
.button { display: inline-flex; align-items: center; text-decoration: none; }
:focus-visible { outline: 3px solid #ffbd46; outline-offset: 3px; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(25px, 3.4vw, 40px); line-height: 1.12; letter-spacing: -.035em; margin-bottom: 8px; }
h2 { font-size: 21px; line-height: 1.25; letter-spacing: -.02em; margin-bottom: 12px; }
h3 { font-size: 18px; line-height: 1.25; margin-bottom: 8px; letter-spacing: -.015em; }
p { margin-bottom: 16px; }
img { display: block; max-width: 100%; }
a, h1, h2, h3, p, span, button { overflow-wrap: anywhere; }
.sr-only, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; clip-path: inset(50%); overflow: hidden; white-space: nowrap; }
.skip-link:focus { position: fixed; top: 8px; left: 8px; padding: 12px; background: white; z-index: 20; }
.site-header { border-bottom: 2px solid var(--ink); background: white; }
.header-inner { max-width: 1168px; padding: 16px 24px; margin: auto; display: flex; align-items: center; gap: 32px; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-size: 21px; font-weight: 800; color: var(--ink); text-decoration: none; white-space: nowrap; }
.brand-symbol { display: grid; place-items: center; width: 30px; height: 30px; background: var(--blue); color: white; font-size: 26px; line-height: 1; }
.site-header nav { display: flex; gap: 4px; flex-wrap: wrap; }
.site-header nav a { display: flex; min-height: 44px; align-items: center; padding: 8px 12px; color: var(--ink); text-decoration: none; font-weight: 700; }
.site-header nav a[aria-current], .site-header nav a:hover { background: var(--blue); color: white; }
main { max-width: 1168px; margin: auto; padding: 28px 24px 40px; min-height: 60vh; }
.page-intro { margin-bottom: 22px; }
.page-intro p { color: var(--muted); margin-bottom: 0; }
.page-intro.compact { margin-bottom: 12px; }
.title-count { color: var(--blue); font-size: 20px; letter-spacing: 0; vertical-align: middle; }
.content-block { border-top: 2px solid var(--ink); padding: 18px 0 22px; margin: 0 0 20px; }
.block-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.block-heading h2 { margin-bottom: 0; }
.window-group { display: grid; grid-template-columns: 1.2fr 1fr; gap: 12px; }
.game-card { border: 1px solid var(--line); color: var(--ink); text-decoration: none; display: grid; min-width: 0; background: white; }
.game-card:hover { border-color: var(--blue); }
.game-card h3 { color: var(--ink); }
.game-card:hover h3 { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
.card-image { display: flex; align-items: center; justify-content: center; min-width: 0; background: var(--wash); border-bottom: 1px solid var(--line); }
.card-image img { width: 100%; height: 100%; object-fit: cover; }
.card-copy { padding: 12px; min-width: 0; display: flex; flex-direction: column; }
.card-copy p { color: var(--muted); margin-bottom: 10px; }
.category-label { color: var(--blue); font-size: 16px; display: block; margin-bottom: 4px; }
.open-label { color: var(--blue); font-weight: 700; display: inline-flex; gap: 12px; margin-top: auto; }
.window-main { grid-row: span 2; grid-template-columns: 44% 1fr; }
.window-main .card-image { border-right: 1px solid var(--line); border-bottom: 0; }
.window-main .card-copy { padding: 20px 16px; align-self: center; }
.window-main h3 { font-size: 25px; }
.window-small { grid-template-columns: 100px 1fr; }
.window-small .card-image { border-right: 1px solid var(--line); border-bottom: 0; }
.window-small .card-copy { padding: 10px 12px; }
.window-small .category-label { margin-bottom: 2px; }
.window-small .card-copy p { margin-bottom: 6px; }
.window-small h3 { margin-bottom: 4px; }
.category-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 16px; }
.category-links a { display: flex; min-height: 48px; padding: 10px 12px; align-items: center; justify-content: space-between; border: 1px solid var(--line); text-decoration: none; font-weight: 700; }
.category-links a:hover { border-color: var(--blue); background: var(--wash); }
.category-links span { color: var(--muted); margin-left: 8px; }
.text-link { display: inline-flex; min-height: 44px; align-items: center; font-weight: 700; }
.prose { max-width: 760px; }
.prose p:last-child { margin-bottom: 0; }
.search-region { padding: 0 0 10px; margin-bottom: 12px; }
#search-form { display: flex; gap: 6px; }
#search { flex: 1; width: 0; min-width: 0; padding: 8px 12px; min-height: 44px; border: 1px solid var(--ink); border-radius: 0; background: white; }
.search-summary { display: flex; align-items: center; gap: 8px; min-height: 26px; padding-top: 4px; color: var(--muted); }
#results-status { white-space: nowrap; font-size: 16px; }
.clear-inline { min-height: 26px; padding: 0 6px; border: 0; text-decoration: underline; font-size: 16px; }
.catalogue-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.catalogue-grid .game-card { grid-template-columns: 120px 1fr; }
.catalogue-grid .card-image { border-right: 1px solid var(--line); border-bottom: 0; }
.catalogue-grid h3 { font-size: 20px; }
.batch-heading { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 12px; align-items: baseline; }
.batch-heading h2 { font-size: 18px; margin: 0; }
.batch-heading span { color: var(--muted); }
.batch-footer { margin-top: 12px; display: flex; justify-content: flex-end; }
.batch-footer button { min-width: 154px; }
.batch-end { color: var(--muted); min-height: 44px; display: flex; align-items: center; margin: 0; }
dialog { width: min(520px, calc(100vw - 24px)); max-width: calc(100vw - 24px); max-height: calc(100dvh - 24px); padding: 0; border: 2px solid var(--ink); color: var(--ink); background: white; }
dialog::backdrop { background: rgb(15 27 55 / 55%); }
.dialog-shell { display: flex; flex-direction: column; max-height: calc(100dvh - 28px); }
.dialog-header, .dialog-footer { display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; gap: 12px; padding: 12px 16px; }
.dialog-header { border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.dialog-header h2 { margin: 0; flex: 1 1 170px; min-width: 0; }
.dialog-header button, .dialog-footer button { flex-shrink: 0; white-space: nowrap; }
.dialog-body { overflow-y: auto; padding: 16px; overscroll-behavior: contain; }
.dialog-body details { border-top: 1px solid var(--line); }
.dialog-body summary { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; min-height: 48px; padding: 10px 0; cursor: pointer; font-weight: 700; list-style: none; }
.dialog-body summary::-webkit-details-marker { display: none; }
.dialog-body summary::before { content: "▸"; flex: 0 0 auto; }
.dialog-body details[open] > summary::before { content: "▾"; }
.dialog-body summary span { color: var(--muted); font-weight: 400; margin-left: auto; max-width: 100%; }
.dialog-body fieldset { border: 0; margin: 0; padding: 0 0 12px; min-width: 0; }
.radio-row { display: flex; align-items: center; gap: 10px; padding: 10px 8px; min-height: 46px; border: 1px solid transparent; cursor: pointer; font-size: 16px; }
.radio-row:hover, .radio-row:has(input:checked) { background: var(--wash); border-color: var(--line); }
.radio-row input { width: 20px; height: 20px; margin: 0; flex-shrink: 0; accent-color: var(--blue); }
.radio-row span:last-child:not(:nth-child(2)) { margin-left: auto; }
.small-note { color: var(--muted); margin: 10px 0 0; }
.dialog-footer { flex-wrap: wrap; border-top: 1px solid var(--line); padding-bottom: max(12px, env(safe-area-inset-bottom)); }
.breadcrumb { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }
.game-title { margin-bottom: 8px; }
.game-meta { color: var(--muted); margin-bottom: 16px; }
.player-block { padding-top: 0; border-top: 0; }
.player-shell { border: 2px solid var(--ink); background: var(--wash); }
.player-toolbar { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px; border-bottom: 1px solid var(--ink); background: white; }
.player-toolbar button { padding-inline: 12px; }
.player-toolbar #fullscreen { margin-left: auto; }
.stage { width: 100%; aspect-ratio: 16/9; min-height: 220px; display: grid; place-items: center; position: relative; background: #e9edf6; }
.preview-image { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.preview-image img { width: 100%; height: 100%; object-fit: cover; opacity: .7; }
.preview-label { position: relative; background: white; border: 1px solid var(--ink); padding: 12px 18px; font-weight: 700; pointer-events: none; }
.stage iframe { width: 100%; height: 100%; position: absolute; inset: 0; border: 0; background: white; }
.player-status { padding: 10px 12px; margin: 0; background: white; border-top: 1px solid var(--line); }
.source-line { color: var(--muted); margin: 12px 0 0; }
.game-facts { margin: 0 0 16px; }
.game-facts dt { font-weight: 700; margin-top: 12px; }
.game-facts dd { margin: 0; }
.related-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.related-grid .game-card { grid-template-columns: 110px 1fr; }
.related-grid .card-image { border-right: 1px solid var(--line); border-bottom: 0; }
.jump-links { display: flex; flex-wrap: wrap; gap: 4px 20px; margin-bottom: 24px; }
.jump-links a { min-height: 44px; display: flex; align-items: center; }
.site-footer { max-width: 1120px; margin: auto; border-top: 2px solid var(--ink); display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; padding: 20px 0 32px; color: var(--muted); }
.site-footer a { min-height: 44px; display: flex; align-items: center; }
.site-footer span { flex: 1 1 240px; }
.player-shell:fullscreen { width: 100%; height: 100%; max-width: none; max-height: none; min-height: 0; display: flex; flex-direction: column; border: 0; padding: 0; }
.player-shell:fullscreen .player-toolbar { flex: 0 0 auto; padding: 4px max(6px, env(safe-area-inset-right)) 4px max(6px, env(safe-area-inset-left)); }
.player-shell:fullscreen .stage { flex: 1 1 0; width: 100%; height: auto; min-height: 0; max-height: none; aspect-ratio: auto; border: 0; }
.player-shell:fullscreen .stage iframe { width: 100%; height: 100%; min-height: 0; max-height: none; aspect-ratio: auto; }
.player-shell:fullscreen .player-status { flex: 0 0 auto; padding: 4px 8px max(4px, env(safe-area-inset-bottom)); font-size: 16px; }
@media (max-width: 900px) {
  .header-inner { gap: 10px; flex-direction: column; align-items: flex-start; padding-block: 12px; }
  .site-header nav { width: 100%; justify-content: space-between; }
  .window-main { grid-template-columns: 40% 1fr; }
  .window-main h3 { font-size: 23px; }
  .window-small { grid-template-columns: 76px 1fr; }
  .catalogue-grid .game-card { grid-template-columns: 1fr; grid-template-rows: 100px 1fr; }
  .catalogue-grid .card-image { height: 100px; border-right: 0; border-bottom: 1px solid var(--line); }
  .catalogue-grid .card-copy p { margin-bottom: 6px; }
  .catalogue-grid h3 { font-size: 18px; }
  .site-footer { margin-inline: 24px; }
}
@media (max-width: 600px) {
  .header-inner { padding: 10px 14px; gap: 6px; }
  .brand { font-size: 20px; }
  .site-header nav { gap: 0; }
  .site-header nav a { font-size: 16px; padding: 8px 6px; }
  main { padding: 22px 14px 28px; }
  .page-intro { margin-bottom: 18px; }
  .page-intro p { font-size: 16px; }
  .content-block { padding: 14px 0 18px; margin-bottom: 14px; }
  .window-group { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .window-main { grid-row: auto; grid-column: 1 / -1; grid-template-columns: 34% 1fr; }
  .window-main .card-copy { padding: 12px; }
  .window-main h3 { font-size: 22px; }
  .window-main .card-copy p { margin-bottom: 6px; }
  .window-small { grid-template-columns: 1fr; grid-template-rows: 58px 1fr; }
  .window-small .card-image { height: 58px; border-right: 0; border-bottom: 1px solid var(--line); }
  .window-small .card-copy { padding: 8px; }
  .window-small h3 { font-size: 17px; }
  .window-small .category-label { display: none; }
  .window-small .card-copy p { margin-bottom: 6px; }
  .window-small .open-label { font-size: 16px; }
  .category-links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .catalogue-grid { gap: 10px; }
  .catalogue-grid .game-card { grid-template-rows: 70px 1fr; }
  .catalogue-grid .card-image { height: 70px; }
  .catalogue-grid .card-copy { padding: 9px; }
  .catalogue-grid h3 { font-size: 17px; }
  .catalogue-grid .category-label { margin-bottom: 3px; }
  .catalogue-grid .open-label { display: none; }
  .catalogue-grid .card-copy p { margin-bottom: 0; margin-top: auto; }
  .batch-heading h2, .batch-heading span { font-size: 16px; }
  #search-form button { padding-inline: 10px; }
  .search-summary { gap: 4px; }
  .related-grid .game-card { grid-template-columns: 1fr; grid-template-rows: 70px 1fr; }
  .related-grid .card-image { height: 70px; border-bottom: 1px solid var(--line); border-right: 0; }
  .related-grid h3 { font-size: 17px; }
  .related-grid .open-label { display: none; }
  .related-grid .card-copy p { margin-bottom: 0; margin-top: auto; }
  .player-toolbar button { padding: 8px; }
  .player-toolbar #fullscreen { margin-left: 0; }
  .stage { aspect-ratio: 4/3; min-height: 220px; }
  .site-footer { margin-inline: 14px; gap: 8px 18px; }
  .site-footer span { flex-basis: 100%; order: 4; }
}
@media (max-width: 360px) {
  .site-header nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; }
  .site-header nav a { padding-inline: 10px; justify-content: center; }
  .window-main h3 { font-size: 20px; }
  .catalogue-grid .card-copy { padding: 8px; }
  .catalogue-grid h3 { font-size: 16px; }
  .dialog-header, .dialog-footer { padding-inline: 12px; }
  .dialog-body { padding: 12px; }
}
@media (prefers-reduced-motion: no-preference) { a, button { transition: background-color .12s, border-color .12s; } }
