:root {
  --paper: #f1f3f6;
  --white: #fff;
  --ink: #192433;
  --muted: #536174;
  --blue: #2455d6;
  --line: #ced5df;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.45;
  font-size: 16px;
  color-scheme: light;
}
* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
button, input { font: inherit; }
button, .button { min-height: 44px; padding: 9px 15px; border: 1px solid var(--line); background: var(--white); color: var(--ink); border-radius: 7px; cursor: pointer; font-weight: 600; }
button:hover, .button:hover { border-color: var(--blue); background: #edf2ff; }
button:disabled { cursor: default; opacity: .55; }
.button { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.primary { background: var(--blue); color: white; border-color: var(--blue); }
.primary:hover { background: #1945ba; color: white; }
a { color: var(--blue); text-underline-offset: 4px; }
a, button, input, summary { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #143eaa; outline-offset: 4px; }
h1, h2, h3, p { margin: 0; overflow-wrap: anywhere; }
h1 { font-size: clamp(1.8rem, 3.2vw, 2.65rem); line-height: 1.12; letter-spacing: -.045em; }
h2 { font-size: 1.35rem; line-height: 1.25; letter-spacing: -.025em; }
h3 { font-size: 1.06rem; line-height: 1.2; }
img { display: block; max-width: 100%; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; clip-path: inset(50%); overflow: hidden; white-space: nowrap; border: 0; }
.skip { position: absolute; top: -90px; left: 16px; padding: 12px; z-index: 10; background: white; }
.skip:focus { top: 10px; }
.site-header { border-bottom: 1px solid var(--line); background: white; }
.header-inner { max-width: 1220px; padding: 10px 30px; margin: auto; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: inline-flex; gap: 10px; align-items: center; min-height: 44px; color: var(--ink); font-size: 1.3rem; font-weight: 750; text-decoration: none; letter-spacing: -.04em; white-space: nowrap; }
.brand-mark { display: block; width: 27px; height: 25px; border: 3px solid var(--blue); border-radius: 5px; box-shadow: -4px 4px 0 #b6c8fa; transform: rotate(-5deg); }
.header-inner nav, .site-footer nav { display: flex; flex-wrap: wrap; gap: 2px 8px; }
nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 10px; color: var(--muted); text-decoration: none; }
nav a[aria-current="page"] { color: var(--blue); background: #ecf1ff; border-radius: 6px; }
main { max-width: 1220px; padding: 0 30px 30px; margin: auto; }
.page-heading { padding: 26px 0 22px; }
.page-heading p { margin-top: 8px; color: var(--muted); }
.content-block { margin-bottom: 26px; padding: 20px; background: white; border: 1px solid var(--line); border-radius: 9px; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 16px; }
.section-heading > span, .batch-heading { font-size: .9rem; color: var(--muted); }
.photo-row { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 16px; align-items: start; }
.photo { display: block; color: var(--ink); text-decoration: none; min-width: 0; }
.photo-pair { grid-column: 2 / -1; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); grid-template-rows: repeat(5,auto); column-gap: 16px; align-self: start; }
.photo-pair > .photo { display: grid; grid-row: span 5; grid-template-rows: subgrid; }
.photo-pair .photo-caption { display: grid; grid-row: span 4; grid-template-rows: subgrid; }
.image-wrap { display: block; background: #e5e9ef; position: relative; border-radius: 5px; }
.image-wrap img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 5px; }
.image-error { display: grid; place-items: center; min-height: 100px; padding: 10px; color: var(--muted); }
.photo-caption { display: block; padding: 10px 2px 0; }
.category-label { color: var(--blue); font-size: .82rem; display: block; margin-bottom: 4px; }
.photo h3 { font-size: 1.18rem; }
.photo-row > .photo h3 { font-size: 1.55rem; }
.photo p { color: var(--muted); margin-top: 7px; }
.photo-action { display: inline-flex; align-items: center; min-height: 44px; color: var(--blue); font-weight: 600; }
.photo:hover h3, .game-card:hover h3 { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
.prose { max-width: 850px; }
.prose > * + * { margin-top: 14px; }
.prose p { line-height: 1.55; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.actions > a, .text-link { display: inline-flex; align-items: center; min-height: 44px; }
.search-region { margin-bottom: 14px; padding: 8px 0; }
#search-form { display: flex; gap: 8px; }
#search { width: 100%; min-width: 0; min-height: 44px; border: 1px solid #8b98aa; background: white; border-radius: 7px; padding: 9px 12px; font-size: 16px; }
#search-form button { flex-shrink: 0; }
.search-summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; }
#result-status { color: var(--muted); font-size: .9rem; }
#search-clear { min-height: 44px; padding: 2px 6px; border: 0; background: transparent; color: var(--blue); font-size: 1rem; }
.batch-heading { display: block; margin-bottom: 12px; }
.game-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px 20px; }
.game-card { display: grid; grid-template-columns: 104px minmax(0,1fr); gap: 12px; align-items: start; color: var(--ink); text-decoration: none; min-width: 0; padding: 4px 0; }
.game-card .image-wrap { align-self: start; }
.card-copy { min-width: 0; }
.control-label { display: block; margin-top: 6px; font-size: .88rem; color: var(--muted); overflow-wrap: anywhere; }
.more, .more-retired { display: block; margin-top: 16px; width: 100%; background: #f4f6fa; color: var(--blue); }
.more-retired { opacity: 1; color: var(--muted); }
.related h2 { margin-bottom: 16px; }
.related .game-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
.album { border-top: 1px solid var(--line); }
.album:last-child { border-bottom: 1px solid var(--line); }
.album > summary { list-style: none; display: flex; align-items: center; gap: 18px; min-height: 88px; padding: 12px 0; cursor: pointer; }
.album > summary::-webkit-details-marker { display: none; }
.album-thumb { width: 72px; flex-shrink: 0; }
.album-title { display: block; font-size: 1.3rem; font-weight: bold; }
.album-meta { color: var(--muted); }
.album-arrow { margin-left: auto; color: var(--blue); font-size: 1.6rem; }
.album[open] .album-arrow { transform: rotate(45deg); }
.album-intro { color: var(--muted); margin: 0 0 14px; }
.album .game-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
.album .content-block { margin-top: 8px; }
.album-link { display: inline-flex; align-items: center; min-height: 44px; }
.site-footer { border-top: 1px solid var(--line); max-width: 1160px; padding: 20px 0 30px; margin: auto; }
.site-footer > span { font-weight: bold; }
.site-footer nav { margin: 8px -10px; }
.site-footer p { font-size: .9rem; color: var(--muted); }
dialog { border: 1px solid var(--line); border-radius: 12px; padding: 0; width: min(540px, calc(100% - 24px)); max-height: calc(100dvh - 24px); color: var(--ink); background: white; }
dialog::backdrop { background: rgb(13 27 49 / .55); }
.dialog-shell { display: flex; flex-direction: column; max-height: calc(100dvh - 26px); }
.dialog-header, .dialog-footer { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 14px 18px; flex-shrink: 0; }
.dialog-header { border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.dialog-header h2 { font-size: 1.25rem; flex: 1 1 14rem; }
.dialog-header button { flex-shrink: 0; margin-left: auto; }
.dialog-body { padding: 16px 18px; overflow-y: auto; overscroll-behavior: contain; min-height: 0; }
.dialog-body > p { color: var(--muted); margin-bottom: 16px; }
.dialog-footer { border-top: 1px solid var(--line); padding-bottom: max(14px, env(safe-area-inset-bottom)); }
.filter-group { border-top: 1px solid var(--line); }
.filter-group summary { min-height: 48px; padding: 11px 0; cursor: pointer; font-weight: bold; }
fieldset { border: 0; padding: 0 0 10px; margin: 0; }
fieldset label { display: flex; align-items: center; gap: 12px; padding: 10px; min-height: 48px; font-size: 16px; border-radius: 6px; cursor: pointer; }
fieldset label:has(input:checked) { background: #edf2ff; color: #163f9c; }
input[type="radio"] { width: 19px; height: 19px; accent-color: var(--blue); flex-shrink: 0; }
.game-heading { display: grid; grid-template-columns: 110px minmax(0,1fr); gap: 18px; align-items: center; padding: 24px 0; }
.game-heading h1 { font-size: clamp(1.6rem,3vw,2.5rem); }
.game-heading p { margin-top: 8px; color: var(--muted); }
.breadcrumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.breadcrumbs a { min-height: 44px; display: inline-flex; align-items: center; }
.stage { background: #121923; color: white; border-radius: 9px; margin: 0 0 26px; }
.stage-toolbar { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px; align-items: center; }
.stage-toolbar button { border-color: #6f7c90; background: #202c3e; color: white; }
.stage-toolbar .primary { background: var(--blue); border-color: var(--blue); }
.stage-screen { display: grid; width: 100%; aspect-ratio: 16 / 9; position: relative; min-height: 220px; }
.stage-preview { display: grid; place-items: center; padding: 18px; gap: 12px; align-content: center; text-align: center; }
.stage-preview .image-wrap { width: min(270px,65%); background: #202c3e; }
.stage-preview p { color: #d0d9e6; }
.stage-screen iframe { border: 0; width: 100%; height: 100%; position: absolute; inset: 0; background: white; }
.stage-status { min-height: 38px; padding: 6px 12px 10px; color: #d0d9e6; font-size: .9rem; }
.stage:fullscreen, .stage:-webkit-full-screen { width: 100%; height: 100%; border: 0; border-radius: 0; padding: 0; margin: 0; display: flex; flex-direction: column; min-height: 0; max-height: none; }
.stage:fullscreen .stage-toolbar, .stage:-webkit-full-screen .stage-toolbar { flex-shrink: 0; padding: 4px max(4px, env(safe-area-inset-right)) 4px max(4px, env(safe-area-inset-left)); gap: 4px; }
.stage:fullscreen .stage-screen, .stage:-webkit-full-screen .stage-screen { flex: 1; aspect-ratio: auto; min-height: 0; max-height: none; }
.stage:fullscreen .stage-status, .stage:-webkit-full-screen .stage-status { flex-shrink: 0; min-height: 0; padding: 3px 8px max(3px, env(safe-area-inset-bottom)); }
@media (min-width: 901px) {
  .search-region { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 16px; }
}
@media (max-width: 900px) {
  .header-inner, main { padding-left: 22px; padding-right: 22px; }
  .site-footer { margin-left: 22px; margin-right: 22px; }
  .game-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .game-card { grid-template-columns: 88px minmax(0,1fr); }
  .photo-row { grid-template-columns: 1.4fr 1fr 1fr; gap: 12px; }
  .photo-pair { column-gap: 12px; }
}
@media (max-width: 600px) {
  .header-inner { padding: 10px 16px 6px; flex-direction: column; align-items: stretch; gap: 6px; }
  .brand { font-size: 1.2rem; }
  .header-inner nav { justify-content: space-between; gap: 2px; }
  .header-inner nav a { padding: 8px 5px; font-size: .92rem; }
  main { padding: 0 16px 24px; }
  .page-heading { padding: 20px 0; }
  .page-heading p { font-size: 1rem; }
  .content-block { padding: 14px; margin-bottom: 20px; }
  .section-heading { display: block; margin-bottom: 12px; }
  .section-heading > span { display: block; margin-top: 3px; }
  .photo-row { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px 12px; }
  .photo-row > .photo { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: start; }
  .photo-row > .photo .photo-caption { padding: 0; }
  .photo-pair { grid-column: 1 / -1; }
  .photo h3, .photo-row > .photo h3 { font-size: 1.06rem; }
  .photo p { font-size: 1rem; margin-top: 6px; }
  .photo-action { font-size: .9rem; }
  .category-label { font-size: .8rem; }
  .game-grid, .album .game-grid { gap: 16px 12px; }
  .game-card { display: block; padding: 0; }
  .game-card .image-wrap img { max-height: 105px; }
  .card-copy { display: block; padding-top: 8px; }
  .game-card h3 { font-size: 1rem; }
  .control-label { font-size: .85rem; margin-top: 5px; }
  .batch-heading { margin-bottom: 10px; }
  .album > summary { gap: 12px; }
  .album-thumb { width: 60px; }
  .album-title { font-size: 1.15rem; }
  .site-footer { margin-left: 16px; margin-right: 16px; }
  .site-footer nav { gap: 2px; }
  .site-footer nav a { padding-left: 8px; padding-right: 8px; }
  .search-region { margin-bottom: 14px; }
  #search-form { gap: 6px; }
  #search-form button { padding: 9px 10px; }
  .game-heading { grid-template-columns: 70px minmax(0,1fr); gap: 12px; padding: 18px 0; }
  .game-heading h1 { font-size: 1.55rem; }
  .stage-toolbar { gap: 6px; padding: 8px; }
  .stage-toolbar button { padding: 8px 11px; }
  .stage-screen { min-height: 250px; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
