@charset "UTF-8";
/* Visual rules and their intent: docs/project/UIUX.md. Use these tokens instead of new literals. */
:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --surface: #f4f4f2;
  --surface-hover: #eaeae7;
  --popover: #ffffff;
  --line: #e9e9e6;
  --line-strong: #d3d3cf;
  --text: #111113;
  --muted: #5d5d5a;
  --subtle: #767673;
  --accent: #111113;
  --accent-hover: #303033;
  --on-accent: #ffffff;
  --shadow-pop: 0 12px 32px -10px #0000002e;
  /* The player is a dark stage in both themes. --player-bg matches the dark
     --bg, the dark theme-color meta and the color= parameter of the itch embeds. */
  --player-bg: #111113;
  --stage: #08080a;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --pill: 999px;
  --gutter: 40px;
  --ease: cubic-bezier(.2,.8,.2,1);
  --fast: .14s;
  --base: .22s;
  --slow: .42s;
  font-family: "Segoe UI", "Malgun Gothic", "Apple SD Gothic Neo", system-ui, sans-serif;
  font-synthesis: none;
}
/* Dark values: keep this block and the .player-view block below identical. */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111113;
    --surface: #1c1c1f;
    --surface-hover: #27272b;
    --popover: #1c1c1f;
    --line: #26262a;
    --line-strong: #3a3a3f;
    --text: #f3f3f1;
    --muted: #a5a5a2;
    --subtle: #82827f;
    --accent: #f3f3f1;
    --accent-hover: #ffffff;
    --on-accent: #111113;
    --shadow-pop: 0 16px 40px -12px #000000b3;
  }
}
.player-view {
  color-scheme: dark;
  --bg: #111113;
  --surface: #1c1c1f;
  --surface-hover: #27272b;
  --popover: #1c1c1f;
  --line: #26262a;
  --line-strong: #3a3a3f;
  --text: #f3f3f1;
  --muted: #a5a5a2;
  --subtle: #82827f;
  --accent: #f3f3f1;
  --accent-hover: #ffffff;
  --on-accent: #111113;
  --shadow-pop: 0 16px 40px -12px #000000b3;
}
* { box-sizing: border-box; }
/* scroll-padding keeps focused or scrolled-to targets clear of the sticky header. */
html { min-width: 320px; background: var(--bg); -webkit-text-size-adjust: 100%; scroll-padding-top: 72px; }
body { margin: 0; color: var(--text); line-height: 1.5; background: var(--bg); -webkit-font-smoothing: antialiased; }
body.is-playing { background: var(--player-bg); overflow-x: hidden; overflow-y: auto; overscroll-behavior-y: auto; }
::selection { background: var(--text); color: var(--bg); }
button, input, select { font: inherit; }
button, a, input, select, summary { -webkit-tap-highlight-color: transparent; }
button, summary, select { cursor: pointer; }
a { color: inherit; text-decoration: none; }
button { color: inherit; }
button:disabled { cursor: default; opacity: .45; }
button, a { touch-action: manipulation; }
:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
button, a, input, select, summary { transition: background var(--fast) ease, color var(--fast) ease, border-color var(--fast) ease, opacity var(--fast) ease, transform var(--fast) ease; }
button svg, a svg, summary svg { width: 20px; height: 20px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
button, input { border-radius: 0; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; clip-path: inset(50%); overflow: hidden; white-space: nowrap; }
.skip-link { position: fixed; z-index: 20; top: -100px; left: 20px; padding: 12px 20px; background: var(--accent); color: var(--on-accent); border-radius: var(--pill); }
.skip-link:focus { top: 12px; }
h1, h2, p { margin-top: 0; }
h1, h2, h3 { text-wrap: balance; }

/* Header: stays reachable while browsing; the hairline appears once content scrolls under it. */
.site-header { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 86%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-bottom: 1px solid transparent; }
@supports (animation-timeline: scroll()) {
  .site-header { animation: header-line linear both; animation-timeline: scroll(root); animation-range: 0 40px; }
}
@keyframes header-line { to { border-bottom-color: var(--line); } }
.header-inner, .catalog-main { max-width: 1200px; padding-left: var(--gutter); padding-right: var(--gutter); margin: auto; }
.header-inner { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; min-height: 44px; font-size: 18px; font-weight: 700; letter-spacing: -.02em; white-space: nowrap; }
.header-tools { display: flex; align-items: center; gap: 4px; margin-right: -10px; }

/* Header disclosures share one quiet trigger and one popover surface. */
.language-menu, .recent-menu { position: relative; }
.language-menu { z-index: 4; font-size: 14px; }
.recent-menu { z-index: 3; }
.language-menu summary, .recent-menu summary { display: flex; align-items: center; justify-content: center; gap: 6px; min-width: 44px; height: 44px; border-radius: var(--pill); color: var(--muted); list-style: none; white-space: nowrap; }
.language-menu summary { padding: 0 12px; }
.header-inner > .language-menu { margin-right: -12px; }
.language-menu summary::-webkit-details-marker, .recent-menu summary::-webkit-details-marker { display: none; }
.language-menu summary svg, .recent-menu summary svg { width: 18px; height: 18px; }
.language-menu summary::after { content: ""; width: 5px; height: 5px; margin: -3px 2px 0 2px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); transition: transform var(--base) var(--ease); }
.language-menu[open] summary::after { transform: translateY(3px) rotate(-135deg); }
.language-menu summary:hover, .recent-menu summary:hover, .language-menu[open] summary, .recent-menu[open] summary { color: var(--text); background: var(--surface); }
.language-menu nav, .recent-popover { position: absolute; right: 0; top: calc(100% + 6px); padding: 6px; background: var(--popover); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-pop); transform-origin: top right; }
.language-menu[open] nav, .recent-menu[open] .recent-popover { animation: pop-in var(--fast) var(--ease); }
.language-menu nav { min-width: 168px; }
.language-menu a { display: flex; align-items: center; justify-content: space-between; min-height: 44px; padding: 8px 12px; border-radius: var(--radius-sm); color: var(--muted); }
.language-menu a:hover, .recent-item:hover { background: var(--surface-hover); color: var(--text); }
.language-menu a[aria-current] { color: var(--text); font-weight: 600; }
.language-menu a[aria-current]::after { content: ""; width: 5px; height: 10px; margin-right: 4px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: translateY(-2px) rotate(45deg); }
.recent-popover { width: min(280px,calc(100vw - 32px)); }
.recent-item { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 6px 8px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 600; }
.recent-item img { width: 56px; height: 40px; object-fit: cover; border-radius: 6px; background: var(--surface-hover); }
.recent-item span { min-width: 0; overflow-wrap: anywhere; }
.recent-item svg { width: 16px; height: 16px; margin-left: auto; color: var(--subtle); }
#clear-recent { display: block; width: 100%; min-height: 44px; margin-top: 4px; padding: 8px; border: 0; border-top: 1px solid var(--line); background: transparent; color: var(--muted); text-align: left; font-size: 13px; }
#clear-recent:hover { color: var(--text); }

/* Catalog */
.catalog-main { padding-top: 8px; padding-bottom: 40px; }
.catalog-tools { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 28px; }
.catalog-tools input, .catalog-tools select { min-height: 44px; min-width: 0; border: 0; border-radius: var(--pill); background-repeat: no-repeat; color: var(--text); font-size: 14px; -webkit-appearance: none; appearance: none; }
.catalog-tools input { flex: 1; width: 0; max-width: 320px; padding: 10px 16px 10px 42px; background-color: var(--surface); background-position: 15px 50%; background-size: 17px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237c7c79' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E"); }
.catalog-tools select { flex-shrink: 0; margin-right: -12px; padding: 10px 32px 10px 14px; color: var(--muted); background-color: transparent; background-position: right 10px top 50%; background-size: 15px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237c7c79' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); }
.catalog-tools input::placeholder { color: var(--subtle); opacity: 1; }
.catalog-tools input:hover { background-color: var(--surface-hover); }
.catalog-tools select:hover { color: var(--text); background-color: var(--surface); }
.catalog-tools input:focus-visible { outline-offset: 0; }
.search-empty { color: var(--muted); padding: 64px 0; text-align: center; }
.game-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(min(100%,300px),1fr)); gap: 44px 28px; animation: rise var(--slow) var(--ease) both; }

/* Game tile: no box. The whole tile launches; the guide button is the only other target. */
.game-card { position: relative; display: flex; flex-direction: column; transition: transform var(--base) var(--ease); }
.game-card:has(.card-launch:active) { transform: scale(.985); }
.card-media { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--radius-lg); background: var(--surface); }
/* A hairline keeps light artwork from dissolving into a light page. */
.card-media::after { content: ""; position: absolute; inset: 0; border: 1px solid color-mix(in srgb, var(--text) 9%, transparent); border-radius: inherit; }
.card-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform var(--slow) var(--ease); }
.game-card[data-game="iron-garden"] .card-media { background: #99a5ac; }
.game-card[data-game="iron-garden"] .card-media img { object-fit: contain; }
.card-body { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 0 12px; padding-top: 12px; }
.card-body h2 { margin: 0; font-size: 18px; line-height: 1.3; font-weight: 650; letter-spacing: -.02em; overflow-wrap: anywhere; }
.card-actions { display: flex; align-items: center; gap: 4px; }
.card-meta, .card-description { grid-column: 1 / -1; margin: 0; }
.card-meta { color: var(--muted); font-size: 13px; }
.card-description { margin-top: 6px; color: var(--muted); font-size: 14px; line-height: 1.55; word-break: keep-all; overflow-wrap: break-word; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.card-launch { order: 1; min-height: 40px; padding: 8px 18px 8px 14px; }
.card-launch::after { content: ""; position: absolute; inset: 0; }
.card-launch svg { fill: currentColor; stroke: none; width: 12px; height: 12px; }
/* 40px visual circle; ::before extends the touch target to 44px. */
.card-guide { position: relative; z-index: 2; width: 40px; min-height: 40px; padding: 0; background: transparent; color: var(--muted); }
.card-guide::before { content: ""; position: absolute; inset: -2px; }
@media (hover: hover) and (pointer: fine) {
  .game-card:hover .card-media img { transform: scale(1.03); }
  .game-card:hover:not(:has(.card-guide:hover)) .card-launch { background: var(--accent-hover); }
}

/* Buttons: the solid accent is reserved for the one primary action on a surface. */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 0; border-radius: var(--pill); min-height: 44px; padding: 10px 18px; font-size: 14px; font-weight: 600; white-space: nowrap; }
.button:active { transform: scale(.97); }
.button-primary { background: var(--accent); color: var(--on-accent); }
.button-primary:hover { background: var(--accent-hover); }
.button-quiet { background: var(--surface); color: var(--text); }
.button-quiet:hover { background: var(--surface-hover); }
.button svg { width: 18px; height: 18px; }

/* Player */
.player-view { position: fixed; inset: 0; height: 100dvh; min-height: 0; background: var(--bg); color: var(--text); overflow: hidden; animation: fade-in var(--base) ease; }
.player-screen { position: relative; display: flex; flex-direction: column; width: 100%; height: 100%; min-height: 0; overflow: hidden; }
@media (orientation: portrait) {
  .player-screen.is-landscape { position: absolute; left: 50%; top: 50%; width: 100dvh; height: 100dvw; transform: translate(-50%,-50%) rotate(90deg); }
}
.player-header { display: flex; align-items: center; gap: 4px; flex-shrink: 0; min-height: 56px; padding: max(6px,env(safe-area-inset-top)) max(8px,env(safe-area-inset-right)) 6px max(8px,env(safe-area-inset-left)); }
.back-link { display: inline-flex; align-items: center; gap: 2px; font-size: 14px; color: var(--muted); min-width: 44px; min-height: 44px; padding: 0 14px 0 8px; border-radius: var(--pill); white-space: nowrap; }
.back-link:hover { color: var(--text); background: var(--surface); }
.back-link svg { width: 20px; height: 20px; }
.player-header h1 { flex: 1; min-width: 0; font-size: 15px; font-weight: 600; margin: 0; padding-left: 8px; letter-spacing: -.01em; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player-header .button { height: 44px; background: transparent; color: var(--muted); }
.player-header .button:hover { background: var(--surface); color: var(--text); }
#game-info-button { flex-shrink: 0; padding: 0 14px; }
.fullscreen-button { flex-shrink: 0; width: 44px; padding: 0; }
.fullscreen-button svg { width: 20px; height: 20px; }
.player-view:fullscreen { height: 100%; }
.player-view:-webkit-full-screen { height: 100%; }
.player-view:is(:fullscreen, .is-expanded) .player-header { display: none; }
.player-view:-webkit-full-screen .player-header { display: none; }
.display-notice { margin: 0; }
.play-stage { position: relative; flex: 1; min-height: 0; width: 100%; background: var(--stage); overflow: hidden; }
#frame-slot { position: absolute; inset: 0; }
#frame-slot iframe { display: block; width: 100%; height: 100%; border: 0; }
/* Official upload_embed.css reserves 20px for .itchio_footer. Keep its game
   area viewport-sized while clipping that footer only in portal display mode. */
.player-view.is-expanded #frame-slot iframe { height: calc(100% + 20px); }
.player-view.is-expanded .play-stage { overflow: clip; }
.frame-loading { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; background: var(--stage); z-index: 1; pointer-events: none; animation: fade-in var(--base) ease; }
.frame-loading p { font-size: 14px; color: var(--muted); margin: 0; }
.loading-ring { width: 28px; height: 28px; border: 2px solid var(--line-strong); border-top-color: var(--text); border-radius: 50%; animation: spin .8s linear infinite; }
.game-info { width: min(440px,calc(100% - 32px)); max-height: calc(100dvh - 32px); margin: auto; padding: 24px; border: 0; border-radius: var(--radius-lg); background: var(--popover); color: var(--text); overflow: auto; box-shadow: 0 24px 80px #000a; }
.game-info[open] { animation: dialog-in var(--base) var(--ease); }
.game-info::backdrop { background: #000000a6; }
.game-info[open]::backdrop { animation: fade-in var(--base) ease; }
.info-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.info-heading h2 { margin: 0; font-size: 13px; font-weight: 500; color: var(--muted); }
.info-heading .button { background: var(--surface-hover); }
.info-heading .button:hover { background: var(--line-strong); }
.game-info h3 { margin: 0 0 8px; font-size: 24px; line-height: 1.3; letter-spacing: -.025em; }
.game-info p { color: var(--muted); line-height: 1.7; font-size: 15px; word-break: keep-all; overflow-wrap: break-word; }
.game-info .info-language { font-size: 13px; color: var(--subtle); }
.info-guide { margin-top: 16px; }
.info-guide a, .info-troubleshooting a { display: inline-flex; align-items: center; min-height: 44px; }
.info-guide p { margin: 0; font-size: 13px; color: var(--subtle); }
.info-troubleshooting { margin-top: 16px; padding-top: 4px; border-top: 1px solid var(--line-strong); color: var(--muted); font-size: 14px; }
.info-troubleshooting summary { padding: 12px 0; min-height: 44px; }
.info-troubleshooting p { margin: 4px 0 8px; font-size: 14px; }
.device-notice { flex-shrink: 0; padding: 4px 16px 10px; color: var(--muted); font-size: 13px; line-height: 1.6; word-break: keep-all; }
.player-preparation { flex: 1; display: grid; align-content: safe center; min-height: 0; width: 100%; max-width: 456px; margin: auto; padding: 24px; overflow: auto; text-align: center; animation: rise var(--slow) var(--ease) both; }
.preparation-icon { width: 60px; height: 48px; margin: 0 auto 16px; color: var(--muted); }
#rotation-icon path { stroke-dasharray: 60; animation: draw 2.2s var(--ease) infinite; }
.preparation-copy h2 { font-size: 24px; letter-spacing: -.03em; line-height: 1.35; margin-bottom: 6px; word-break: keep-all; }
.preparation-copy h2:focus { outline: none; }
.preparation-copy p { margin-bottom: 0; color: var(--muted); font-size: 15px; word-break: keep-all; }
.preparation-preview { margin: 24px 0; }
.preparation-preview img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: contain; background: var(--stage); border-radius: var(--radius); }
.preparation-preview figcaption { margin-top: 8px; color: var(--subtle); font-size: 12px; }
.preparation-actions { display: flex; flex-direction: column; gap: 8px; }
.preparation-actions .button { min-height: 48px; white-space: normal; word-break: keep-all; }
.preparation-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 0 24px; color: var(--muted); font-size: 14px; }
.preparation-links a { display: inline-flex; align-items: center; min-height: 44px; }
.preparation-links a:hover { color: var(--text); }
.preparation-actions .share-fallback { text-align: left; margin-top: 0; }
.noscript { margin: 0; padding: 24px var(--gutter); background: var(--surface); color: var(--muted); }

/* Information pages */
.site-footer { display: flex; flex-wrap: wrap; gap: 0 24px; color: var(--subtle); font-size: 13px; margin-top: 72px; }
.site-footer a { display: inline-flex; align-items: center; min-height: 44px; }
.site-footer a:hover { color: var(--text); }
.text-link { text-decoration: underline; text-decoration-color: var(--line-strong); text-decoration-thickness: 1px; text-underline-offset: 4px; }
.text-link:hover { text-decoration-color: currentColor; }
.document-main { max-width: 720px; margin: auto; padding: 32px 24px 40px; line-height: 1.75; overflow-wrap: break-word; word-break: keep-all; animation: rise var(--slow) var(--ease) both; }
.document-main h1 { font-size: clamp(28px,5vw,36px); line-height: 1.25; letter-spacing: -.03em; margin-bottom: 16px; }
.document-main h2 { margin: 36px 0 8px; font-size: 17px; font-weight: 650; letter-spacing: -.015em; }
.document-main p, .document-main li { color: var(--muted); }
.document-main li { margin: 4px 0; }
.document-main .text-link { color: var(--text); }
.document-main > .button { margin-top: 8px; }
.document-lead { font-size: 17px; }
.game-document { max-width: 1200px; padding: 8px var(--gutter) 40px; }
.document-back { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; margin-bottom: 20px; color: var(--muted); font-size: 14px; }
.document-back:hover { color: var(--text); }
.game-intro { display: grid; grid-template-columns: minmax(0,5fr) minmax(0,6fr); align-items: center; gap: 56px; }
.game-intro h1 { font-size: clamp(36px,4vw,48px); line-height: 1.15; letter-spacing: -.035em; margin-bottom: 16px; }
.game-document .game-meta { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.game-intro .document-lead { max-width: 52ch; margin-bottom: 28px; font-size: 16px; }
.document-image { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: contain; background: #99a5ac; border-radius: var(--radius-lg); outline: 1px solid color-mix(in srgb, var(--text) 9%, transparent); outline-offset: -1px; }
.game-page-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.game-page-actions .button { min-height: 48px; padding: 12px 24px; font-size: 15px; }
.share-message { color: var(--muted); font-size: 14px; margin: 10px 0 0; }
.share-message:empty { display: none; }
.share-fallback { margin-top: 12px; }
.share-fallback label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.share-fallback input { width: 100%; min-width: 0; min-height: 44px; padding: 10px 14px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: transparent; color: var(--text); font: inherit; font-size: 14px; }
.game-guide { display: grid; grid-template-columns: minmax(0,5fr) minmax(0,6fr); gap: 56px; margin-top: 64px; align-items: start; }
.game-controls { grid-column: 2; grid-row: 1; }
.game-description { grid-column: 1; grid-row: 1; }
.game-guide h2:first-child { margin-top: 0; }
.controls-note { margin: 16px 0 0; font-size: 14px; }
.controls-table { border-collapse: collapse; width: 100%; line-height: 1.5; }
.controls-table th, .controls-table td { border-bottom: 1px solid var(--line); padding: 12px 0; text-align: left; vertical-align: top; }
.controls-table tr:first-child > * { border-top: 1px solid var(--line); }
.controls-table th { width: 44%; padding-right: 12px; font-weight: 600; color: var(--text); }
.controls-table td { color: var(--muted); }
.game-screenshot { margin: 28px 0 0; }
.game-screenshot img { display: block; width: 100%; height: auto; border-radius: var(--radius); outline: 1px solid color-mix(in srgb, var(--text) 9%, transparent); outline-offset: -1px; }
.game-screenshot figcaption { margin-top: 10px; font-size: 13px; color: var(--muted); line-height: 1.7; }
:lang(ja) .document-main, :lang(zh-Hans) .document-main, :lang(ja) .card-description, :lang(zh-Hans) .card-description { word-break: normal; }

/* Motion: short, eased, opacity/transform only. Never transform .player-view (native fullscreen root). */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
@keyframes pop-in { from { opacity: 0; transform: translateY(-4px) scale(.98); } }
@keyframes dialog-in { from { opacity: 0; transform: translateY(8px) scale(.98); } }
@keyframes draw { 0% { stroke-dashoffset: 60; } 45%, 100% { stroke-dashoffset: 0; } }

@media (max-width: 760px) {
  :root { --gutter: 20px; }
  .header-inner { min-height: 56px; }
  .catalog-main { padding-top: 4px; padding-bottom: 24px; }
  .catalog-tools { margin-bottom: 20px; }
  .catalog-tools input { max-width: none; }
  /* 16px keeps iOS from zooming the page when a field takes focus. */
  .catalog-tools input, .catalog-tools select, .share-fallback input { font-size: 16px; }
  .game-grid { gap: 36px 20px; }
  .site-footer { margin-top: 56px; }
  .game-document { padding-top: 0; padding-bottom: 24px; }
  .document-back { margin-bottom: 8px; }
  .game-intro, .game-guide { grid-template-columns: 1fr; gap: 28px; }
  .game-intro .document-lead { margin-bottom: 24px; }
  .game-page-actions .button { flex: 1; }
  .game-guide { margin-top: 40px; gap: 36px; }
  .game-controls, .game-description { grid-column: auto; grid-row: auto; }
  .game-info { padding: 20px; }
}
@media (max-width: 520px) {
  /* Icon-only player controls; their accessible names stay in the markup. */
  .back-link { padding: 0; justify-content: center; }
  .back-link span, #game-info-button span { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; white-space: nowrap; }
  .player-header h1 { padding-left: 2px; }
  .catalog-tools input { flex: 1 1 130px; }
  .catalog-tools select { flex: 0 1 auto; max-width: 52%; text-overflow: ellipsis; }
  #game-info-button { width: 44px; padding: 0; }
}
@media (max-width: 380px) {
  :root { --gutter: 16px; }
}
@media (max-height: 580px) and (orientation: landscape) {
  .player-preparation { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 32px; max-width: 760px; padding: 16px; align-items: center; }
  .preparation-copy { grid-column: 1; }
  .preparation-icon { width: 52px; height: 40px; margin: 0 auto 8px; }
  .preparation-preview { grid-column: 2; grid-row: 1 / 3; margin: 0; }
  .preparation-actions { grid-column: 1; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
