:root {
  color-scheme: light;
  --forest: #173e32;
  --forest-light: #285b48;
  --cream: #f7f7f0;
  --sage: #e8eee3;
  --white: #fff;
  --ink: #24382d;
  --muted: #5a665b;
  --line: #d7dfd2;
  --sand: #e8e4bb;
  --color-bg: var(--cream);
  --color-text: var(--ink);
  --color-accent: var(--forest);
  --color-surface: var(--white);
  --font-body: 'Segoe UI', Arial, sans-serif;
  --font-heading: 'Palatino Linotype', 'Book Antiqua', Palatino, Georgia, serif;
  --space-1: .5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-6: 3rem;
  --space-8: 4rem;
  --rail-width: 240px;
  --gutter: clamp(20px, 4vw, 64px);
  --content-width: 1040px;
  --reading-width: 720px;
  --button-bg: var(--forest);
  --button-text: var(--white);
  --radius: 6px;
  --duration: 160ms;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--color-text); background: var(--color-bg); font: 1rem/1.6 var(--font-body); }
a { color: inherit; text-underline-offset: 4px; }
button { font: inherit; color: inherit; cursor: pointer; }
button, a { touch-action: manipulation; }
button { min-height: 44px; }
a:focus-visible, button:focus-visible { outline: 3px solid #b15326; outline-offset: 4px; }
h1, h2, h3, p { margin: 0; }
img { max-width: 100%; height: auto; display: block; }
[hidden] { display: none !important; }
.skip { position: fixed; top: 12px; left: 12px; z-index: 5; background: var(--white); padding: 12px 20px; transform: translateY(-200%); }
.skip:focus { transform: none; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--rail-width); background: var(--forest); color: var(--cream); padding: 36px 28px 24px; display: flex; flex-direction: column; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; font: bold 28px/1.12 var(--font-heading); letter-spacing: -.8px; }
.brand img { flex-shrink: 0; }
.brand>span { padding-bottom: .12em; }
.brand-period { color: var(--sand); }
.brand-caption { font-size: 13px; color: #d0ddcd; margin-top: 18px; }
.main-nav { margin-top: 44px; }
.main-nav a { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 8px 14px; text-decoration: none; background: var(--forest-light); border-radius: var(--radius); font-size: 15px; }
.square-mark { width: 12px; height: 12px; box-shadow: 7px 0 0 -3px var(--sand); border: 2px solid var(--sand); }
.game-count { margin-left: auto; color: var(--sand); font-size: 13px; }
.rail-note { margin: auto 0; padding: 40px 8px; }
.rail-note p { font: 27px/1.25 var(--font-heading); margin: 20px 0 12px; }
.rail-note>span:last-child { color: #d0ddcd; font-size: 12px; }
.rail-motif { display: grid; width: 54px; height: 54px; grid-template-columns: 1fr 1fr; gap: 5px; transform: rotate(-8deg); }
.rail-motif i { background: var(--sand); }
.rail-motif i:nth-child(2) { background: #9dc5a1; }
.rail-motif i:nth-child(3) { background: transparent; border: 1px solid #9dc5a1; }
.information-nav { display: flex; flex-direction: column; align-items: flex-start; font-size: 13px; }
.information-nav a, .information-nav button { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
.information-nav button { background: none; padding: 0; border: 0; gap: 14px; }
.information-nav a:hover, .information-nav button:hover, .information-nav [aria-current] { text-decoration: underline; }
.sidebar :focus-visible { outline-color: var(--sand); }
.page { margin-left: var(--rail-width); padding: 0 var(--gutter); }
.catalog, .footer, .feedback { max-width: var(--content-width); margin: 0 auto; }
.opening { text-align: center; padding: 52px 0 36px; }
.eyebrow { font-size: 13px; color: var(--muted); }
h1 { font: 52px/1.2 var(--font-heading); letter-spacing: -1.5px; text-wrap: balance; padding-bottom: .12em; }
.opening h1 { margin: 16px 0 20px; }
.opening em { font-weight: normal; color: var(--forest-light); }
.opening>p:last-child { color: var(--muted); font-size: 15px; line-height: 1.7; }
.storage-notice { background: var(--sage); padding: 20px var(--space-3); display: flex; align-items: center; gap: var(--space-3); border-radius: var(--radius); margin-bottom: 36px; }
.storage-notice h2 { font-size: 15px; margin-bottom: 5px; }
.storage-notice p { font-size: 13px; max-width: 580px; }
.storage-actions { display: flex; flex-wrap: wrap; gap: var(--space-1); flex-shrink: 0; max-width: 280px; }
.storage-actions button { padding: 9px 12px; font-size: 12px; font-weight: 600; border: 1px solid var(--forest); background: transparent; border-radius: 4px; }
.storage-actions [data-choice=on] { background: var(--button-bg); color: var(--button-text); }
.storage-actions button:hover { background: var(--forest-light); color: var(--white); }
.storage-actions .text-button { border: 0; }
.storage-status:empty, .feedback:empty { display: none; }
.storage-status { padding-top: 8px; }
.collection { scroll-margin-top: 24px; }
.collection-heading { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-2); padding-bottom: 18px; }
.collection-heading h2 { font: 28px/1.25 var(--font-heading); }
.collection-heading>span { font-size: 12px; color: var(--muted); }
.game-row { display: grid; grid-template-columns: 180px minmax(0,1fr) 90px; gap: 26px; align-items: center; background: var(--color-surface); margin-bottom: 12px; padding: 12px 24px 12px 12px; border-radius: var(--radius); }
.game-cover { width: 180px; aspect-ratio: 4/3; object-fit: cover; border-radius: 3px; }
.category { font-size: 12px; color: var(--muted); }
.game-copy h3 { font-size: 21px; line-height: 1.3; font-weight: 600; margin: 5px 0 9px; letter-spacing: -.3px; }
.game-copy p { color: var(--muted); font-size: 14px; line-height: 1.5; max-width: 390px; }
.play { border: 0; background: var(--button-bg); color: var(--button-text); border-radius: 4px; display: flex; align-items: center; justify-content: center; gap: 14px; padding: 12px var(--space-2); font-size: 14px; font-weight: 600; transition: background var(--duration); }
.play:hover { background: var(--forest-light); }
.game-row:focus-within { box-shadow: 0 0 0 2px var(--forest-light); }
.recent { margin-bottom: var(--space-4); }
.recent-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.recent h2 { font: 22px/1.4 var(--font-heading); }
.text-button { background: transparent; border: 0; padding: 8px 0; font-size: 13px; text-decoration: underline; text-underline-offset: 4px; }
.recent-list { display: flex; flex-wrap: wrap; gap: var(--space-1); margin-top: 10px; }
.recent-list button { background: var(--sage); border: 0; border-radius: 4px; padding: 10px 14px; font-size: 13px; text-align: left; }
.recent-list button:hover { background: var(--line); }
.play-guide { margin: 40px auto; max-width: 680px; padding: 0 20px; border-left: 3px solid var(--line); }
.play-guide h2 { font: 23px/1.3 var(--font-heading); margin-bottom: 12px; }
.play-guide p { color: var(--muted); font-size: 14px; margin-top: 10px; }
.footer { padding: 28px 0; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.footer a { min-height: 44px; display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.footer a:hover { text-decoration: underline; }
.feedback { font-size: 14px; padding: 16px 0; }
.legal { max-width: var(--reading-width); margin: 0 auto; padding: 44px 0; }
.back { display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; margin-bottom: 32px; }
.legal h1 { margin: 16px 0; }
.legal-lead { font: 24px/1.45 var(--font-heading); }
.date { font-size: 12px; color: var(--muted); margin: 20px 0 44px; }
.legal section { margin-top: var(--space-4); }
.legal section h2 { font-size: 19px; line-height: 1.4; margin-bottom: 12px; }
.legal section p { line-height: 1.85; }
code { font-size: .85em; overflow-wrap: anywhere; }
.legal .storage-notice { margin: 40px 0 0; flex-direction: column; align-items: flex-start; }
.player { width: calc(100% - 48px); max-width: 1280px; height: calc(100dvh - 48px); max-height: 960px; padding: 0; border: 0; border-radius: var(--radius); background: var(--cream); color: var(--ink); }
.player[open] { display: flex; flex-direction: column; overflow: hidden; }
.player::backdrop { background: #10271fe8; }
.player-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 12px 20px; flex-shrink: 0; }
.player-toolbar h2 { font-size: 19px; line-height: 1.3; }
.player-toolbar button { background: var(--forest); color: var(--white); border: 0; border-radius: 4px; padding: 10px 16px; font-size: 14px; flex-shrink: 0; }
.player-toolbar button span { margin-left: 12px; font-size: 20px; }
.frame-slot { flex: 1; min-height: 0; display: flex; background: #101712; }
.frame-slot iframe { width: 100%; height: 100%; border: 0; }
.player-bottom { display: flex; justify-content: space-between; gap: 10px; padding: 8px 20px; font-size: 12px; align-items: center; flex-shrink: 0; }
.player-bottom a { display: inline-flex; align-items: center; min-height: 36px; flex-shrink: 0; }
body:has(.player[open]) { overflow: hidden; }
.no-script { padding: 24px; margin-left: var(--rail-width); }
@media (min-width: 1700px) { .opening { padding-top: calc(var(--space-8) + 4px); } }
@media (max-width: 1150px) {
  :root { --rail-width: 210px; --gutter: 28px; }
  .sidebar { padding: 30px 20px 20px; }
  .brand { font-size: 26px; gap: 8px; }
  .storage-notice { flex-direction: column; align-items: flex-start; gap: 12px; }
  .storage-actions { max-width: none; }
  .game-row { grid-template-columns: 140px minmax(0,1fr) 78px; gap: 20px; padding-right: 16px; }
  .game-copy h3 { font-size: 19px; }
  .game-copy p { font-size: 13px; }
}
@media (max-width: 800px) {
  :root { --rail-width: 0px; --gutter: 24px; }
  .sidebar { position: static; width: auto; overflow: visible; padding: 18px var(--gutter); display: grid; grid-template-columns: 1fr auto; gap: 14px 20px; }
  .brand { font-size: 24px; }
  .brand img { width: 36px; height: 36px; }
  .brand-caption, .rail-note { display: none; }
  .main-nav { margin: 0; align-self: center; }
  .main-nav a { font-size: 13px; gap: 10px; padding: 8px 12px; }
  .information-nav { grid-column: 1/-1; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 0 24px; font-size: 12px; }
  .information-nav button { margin-left: auto; }
  .opening { padding: 36px 0 30px; }
  .opening h1 { font-size: 48px; }
  .legal { padding-top: 24px; }
}
@media (max-width: 540px) {
  :root { --gutter: 16px; }
  .sidebar { padding-top: 16px; padding-bottom: 8px; gap: 12px; }
  .information-nav { gap: 0 16px; justify-content: space-between; }
  .information-nav a, .information-nav button { min-height: 44px; font-size: 12px; }
  .information-nav button { margin-left: 0; }
  .opening { padding: 30px 0; }
  .eyebrow { font-size: 12px; }
  .opening h1 { font-size: 43px; }
  .opening>p:last-child { font-size: 14px; max-width: 300px; margin: auto; }
  .opening br:last-child { display: none; }
  .storage-notice { padding: 16px; margin-bottom: 28px; }
  .storage-notice h2 { font-size: 14px; }
  .storage-actions { width: 100%; gap: 8px; }
  .storage-actions button { flex: 1; white-space: nowrap; }
  .collection-heading { padding-bottom: 14px; gap: 8px; }
  .collection-heading h2 { font-size: 24px; }
  .collection-heading>span { font-size: 11px; }
  .game-row { grid-template-columns: 100px minmax(0,1fr); align-items: start; gap: 12px 16px; padding: 12px; margin-bottom: 12px; }
  .game-cover { width: 100px; grid-row: span 2; align-self: start; }
  .game-copy h3 { font-size: 17px; margin: 3px 0 0; }
  .category { font-size: 11px; }
  .game-copy p { display: none; }
  .play { grid-column: 2; justify-self: start; padding: 10px 16px; min-width: 96px; font-size: 13px; }
  .play-guide { margin: 32px 0; padding: 0 16px; }
  .play-guide h2 { font-size: 21px; }
  .footer { flex-direction: column; gap: 0; align-items: flex-start; padding: 20px 0; }
  .legal h1 { font-size: 38px; overflow-wrap: break-word; }
  .legal-lead { font-size: 22px; }
  .legal section h2 { font-size: 18px; }
  .back { margin-bottom: 24px; }
  .player { width: 100%; height: 100dvh; max-width: none; max-height: none; margin: 0; border-radius: 0; }
  .player-toolbar { gap: 12px; padding: 10px 12px; }
  .player-toolbar h2 { font-size: 15px; }
  .player-toolbar button { font-size: 12px; padding: 8px 10px; }
  .player-toolbar button span { margin-left: 4px; }
  .player-bottom { flex-wrap: wrap; gap: 0; padding: 4px 12px; font-size: 11px; }
}
@media (max-width: 350px) {
  .information-nav { gap: 0 12px; }
  .information-nav button { flex-basis: 100%; }
  .game-row { grid-template-columns: 86px minmax(0,1fr); gap: 10px 12px; }
  .game-cover { width: 86px; }
  .brand { font-size: 23px; }
  .main-nav a { padding: 8px 10px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; } }
