:root {
  --paper: #f7f6f2;
  --charcoal: #252525;
  --grey: #595954;
  --orange: #ff7956;
  --lilac: #e6e0f3;
  --line: #d4d2c9;
  --ink: var(--charcoal);
  --muted: var(--grey);
  --background: var(--paper);
  --accent: var(--orange);
  --surface-return: var(--lilac);
  --font-body: Arial, Helvetica, sans-serif;
  --font-display: 'Arial Black', Arial, Helvetica, sans-serif;
  --space-4: 2rem;
  --space-6: 3rem;
  --page-gutter: clamp(1.25rem, 4.5vw, 6rem);
  --width-reading: 720px;
  --control-radius: 3px;
  --button-background: var(--ink);
  --button-text: var(--paper);
  --motion: 160ms ease;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 1.5rem; }
body { margin: 0; color: var(--ink); background: var(--background); font: 400 1rem/1.6 var(--font-body); }
body:has(dialog[open]) { overflow: hidden; }
a { color: inherit; text-underline-offset: .2em; }
button, input { font: inherit; }
button { cursor: pointer; color: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button:disabled { cursor: default; opacity: .55; }
img { display: block; max-width: 100%; height: auto; }
svg { flex-shrink: 0; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { line-height: 1.08; }
h1, h2 { text-wrap: balance; }
h2 { font-size: clamp(2rem, 3.5vw, 3.25rem); letter-spacing: -.055em; }
h3 { font-size: 1.5rem; letter-spacing: -.035em; }
p { margin-bottom: 1.1rem; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 5px; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: fixed; z-index: 20; top: .5rem; left: 1rem; background: var(--ink); color: var(--paper); padding: .8rem 1rem; transform: translateY(-200%); }
.skip-link:focus { transform: none; }
.masthead { padding: 1.65rem var(--page-gutter); display: flex; align-items: center; gap: var(--space-4); background: var(--accent); }
.brand { display: inline-flex; align-items: center; gap: .65rem; font-size: 1.75rem; line-height: 1; font-weight: 800; letter-spacing: -.065em; text-decoration: none; flex-shrink: 0; }
.header-note { margin-left: auto; font-size: .85rem; }
.masthead nav { display: flex; align-items: center; gap: 1.7rem; margin-left: auto; }
.masthead nav a { min-height: 44px; display: inline-flex; align-items: center; gap: .8rem; font-weight: 600; font-size: .9rem; text-decoration: none; }
.masthead nav a:hover { text-decoration: underline; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 1rem; border: 1px solid var(--button-background); border-radius: var(--control-radius); background: var(--button-background); color: var(--button-text); padding: .8rem 1.2rem; min-height: 48px; font-weight: 700; line-height: 1.35; text-decoration: none; transition: background var(--motion); }
.button:hover { background: var(--muted); }
.text-button { padding: .55rem 0; min-height: 44px; border: 0; background: none; text-align: left; text-decoration: underline; text-underline-offset: .2em; }
.text-button:hover { text-decoration-thickness: 2px; }
.small-copy { font-size: .9rem; color: var(--muted); }
.site-footer { margin: auto; max-width: 1720px; padding: var(--space-6) var(--page-gutter) var(--space-4); }
.footer-line { display: flex; gap: var(--space-6); align-items: center; padding-bottom: 2rem; }
.footer-line p { font-size: .9rem; color: var(--muted); margin: 0; line-height: 1.45; }
.back-top { margin-left: auto; min-height: 44px; display: inline-flex; align-items: center; font-size: .9rem; }
.footer-fine { padding-top: 1.5rem; border-top: 1px solid var(--line); display: flex; gap: var(--space-4); justify-content: space-between; align-items: center; }
.footer-fine small { font-size: .75rem; max-width: 30rem; color: var(--muted); }
.footer-fine nav { display: flex; flex-wrap: wrap; column-gap: 1.3rem; align-items: center; font-size: .8rem; }
.footer-fine nav a { min-height: 44px; display: inline-flex; align-items: center; }
dialog { color: var(--ink); border: 0; padding: 0; }
dialog::backdrop { background: rgb(20 20 20 / .78); }
.preferences { width: min(610px, calc(100% - 2rem)); max-height: calc(100dvh - 2rem); padding: clamp(1.25rem, 4vw, 2.5rem); background: var(--paper); border-radius: 4px; }
.dialog-heading { display: flex; gap: 1rem; align-items: flex-start; margin-bottom: 1.5rem; }
.dialog-heading h2 { font-size: 2rem; margin: .2rem 0 0; }
.close-button { width: 44px; height: 44px; background: none; border: 1px solid var(--line); flex-shrink: 0; font-size: 1.75rem; line-height: 1; }
.preferences fieldset { padding: 0; border: 0; margin: 1.75rem 0 1rem; }
.preferences legend { font-size: .85rem; font-weight: bold; padding: 0 0 .75rem; }
.choice { display: flex; gap: 1rem; padding: 1rem .75rem; border: 1px solid var(--line); cursor: pointer; margin-bottom: .65rem; }
.choice:has(:checked) { border-color: var(--ink); background: var(--surface-return); }
.choice input { width: 22px; height: 22px; flex-shrink: 0; accent-color: var(--ink); margin: 2px 0 0; }
.choice span span { display: block; color: var(--muted); font-size: .9rem; margin-top: .25rem; }
.form-actions { display: flex; flex-wrap: wrap; gap: 1rem; }
.storage-feedback { margin: 1rem 0; }
.game-player { width: min(1320px, calc(100% - 2rem)); height: min(940px, calc(100dvh - 2rem)); max-height: none; max-width: none; background: var(--paper); }
.game-player[open] { display: grid; grid-template-rows: auto minmax(0,1fr) auto; }
.player-top { display: flex; justify-content: space-between; align-items: center; padding: .6rem 1rem; gap: 1rem; }
.player-top h2 { font-size: 1.25rem; margin: 0; letter-spacing: -.03em; }
.player-top .button { flex-shrink: 0; }
.game-player iframe { display: block; width: 100%; height: 100%; border: 0; background: var(--ink); }
.player-bottom { display: flex; justify-content: space-between; gap: 1rem; padding: .6rem 1rem; align-items: center; }
.player-bottom p { font-size: .75rem; color: var(--muted); margin: 0; }
.player-bottom a { flex-shrink: 0; font-size: .85rem; min-height: 44px; display: inline-flex; align-items: center; }
.noscript { padding: 1rem var(--page-gutter); background: var(--surface-return); }
@media (min-width: 1720px) { .masthead { padding-inline: max(var(--page-gutter), calc((100vw - 1520px)/2)); } }
@media (max-width: 1100px) { .header-note { display: none; } .masthead { justify-content: space-between; } .masthead nav { gap: 1.1rem; } .footer-fine { align-items: flex-start; } }
@media (max-width: 700px) {
  .masthead { padding-block: 1.25rem .5rem; flex-wrap: wrap; gap: .8rem; }
  .brand { font-size: 1.65rem; }
  .brand svg { width: 30px; height: 30px; }
  .masthead nav { width: 100%; justify-content: space-between; margin: 0; gap: .5rem; }
  .masthead nav a { font-size: .8rem; }
  .masthead nav a span { display: none; }
  .footer-line { flex-wrap: wrap; gap: 1.5rem; }
  .footer-line p { flex-basis: 100%; order: 3; }
  .back-top { font-size: .8rem; }
  .footer-fine { flex-direction: column-reverse; gap: 1rem; }
  .footer-fine nav { gap: .1rem 1.25rem; }
  .player-top { padding: .6rem; gap: .6rem; }
  .player-top h2 { font-size: 1rem; }
  .player-top .button { font-size: .8rem; padding: .6rem; }
  .player-bottom { flex-wrap: wrap; padding: .5rem .7rem; gap: .25rem; }
  .player-bottom p { font-size: .7rem; }
  .game-player { width: calc(100% - 1rem); height: calc(100dvh - 1rem); }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; } }
