/* Low Tide Diner · Pocketglyph */
/* Jersey 10 has one weight; map 400-700 to it so the browser never synthesises a bold */
@font-face { font-family: "Jersey 10"; src: url("../fonts/jersey-10-latin-400-normal.woff2") format("woff2"); font-weight: 400 700; font-display: swap; size-adjust: 128%; }
@font-face { font-family: "Kalam"; src: url("../fonts/kalam-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible"; src: url("../fonts/atkinson-hyperlegible-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible"; src: url("../fonts/atkinson-hyperlegible-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --night: #2b2d42;
  --night-deep: #1f2033;
  --night-floor: #17182a;
  --panel: #383b55;
  --panel-line: #4b4f6e;
  --cream: #f7e8c8;
  --cream-dim: #c9bfae;
  --coral: #ef8354;
  --coral-light: #f59a72;
  --coral-dark: #b85a33;
  --rust: #a04a26; /* coral, darkened to read on cream */
  --sea: #6bb7c9;
  --px: 4px;
  --pixel: "Jersey 10", "Courier New", monospace;
  --sans: "Atkinson Hyperlegible", system-ui, sans-serif;
  color-scheme: dark;
  font-synthesis: none;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
body {
  margin: 0;
  background: var(--night);
  color: var(--cream);
  font: 400 17px/1.6 var(--sans);
  overflow-x: clip;
}
/* no f-ligatures in the pixel face; the font shorthand used below would reset this, hence !important */
*, *::before, *::after { font-variant-ligatures: none !important; }
img { display: block; max-width: 100%; height: auto; image-rendering: pixelated; }
a { color: var(--coral); text-underline-offset: 3px; }
a:hover { color: var(--cream); }
:focus-visible { outline: 3px solid var(--sea); outline-offset: 4px; }
h1, h2, h3 { font-family: var(--pixel); font-weight: 700; line-height: 1.1; margin: 0; text-wrap: balance; overflow-wrap: break-word; min-width: 0; }
p, li, dd, figcaption, blockquote { text-wrap: pretty; }
h2 { font-size: clamp(32px, 4.4vw, 48px); }
h3 { font-size: 22px; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
[hidden] { display: none !important; }
/* in-page targets land below the sticky header (68px bar + 4px border) */
:root { --head: 72px; }
main, section[id], #game, #launchForm { scroll-margin-top: var(--head); }
main:focus { outline: none; }

/* one container, three widths; at 1600+ it is exactly the hero game window (1536 art + frame) */
:root { --wrapw: min(1200px, 100vw - 40px); --s1: 56px; --s2: 96px; --s3: 128px; }
@media (min-width: 1101px) { :root { --wrapw: min(1280px, 100vw - 64px); } }
@media (min-width: 1600px) { :root { --wrapw: min(1564px, 100vw - 96px); } }
.wrap { width: var(--wrapw); margin-inline: auto; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--cream); color: var(--night); padding: 10px 14px; font-family: var(--pixel); }
.skip:focus { top: 12px; }

/* pixel frame: a 4px edge with the corners knocked out */
.pxf { box-shadow: 0 calc(var(--px) * -1) 0 0 var(--edge), 0 var(--px) 0 0 var(--edge), calc(var(--px) * -1) 0 0 0 var(--edge), var(--px) 0 0 0 var(--edge); }

/* stepped tide line on top of the darker bands */
.tide { position: relative; }
.tide::before {
  content: ""; position: absolute; left: 0; right: 0; top: -12px; height: 12px; pointer-events: none;
  background:
    linear-gradient(var(--night-deep) 0 0) 0 8px / 100% 4px no-repeat,
    repeating-linear-gradient(90deg, var(--night-deep) 0 40px, transparent 40px 64px) 0 4px / 100% 4px no-repeat,
    repeating-linear-gradient(90deg, transparent 0 8px, var(--night-deep) 8px 28px, transparent 28px 64px) 0 0 / 100% 4px no-repeat;
}

.tide-b { position: relative; }
.tide-b::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -12px; height: 12px; pointer-events: none;
  background:
    linear-gradient(var(--night-deep) 0 0) 0 0 / 100% 4px no-repeat,
    repeating-linear-gradient(90deg, transparent 0 24px, var(--night-deep) 24px 64px) 0 4px / 100% 4px no-repeat,
    repeating-linear-gradient(90deg, transparent 0 36px, var(--night-deep) 36px 56px, transparent 56px 64px) 0 8px / 100% 4px no-repeat;
}

/* ---------- buttons ---------- */
.btn {
  --bg: var(--coral); --fg: var(--night); --edge: var(--coral);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 10px 22px; margin: var(--px);
  font: 700 18px/1 var(--pixel); letter-spacing: 0.02em; white-space: nowrap;
  color: var(--fg); background: var(--bg); border: 0; text-decoration: none; cursor: pointer;
  box-shadow: 0 calc(var(--px) * -1) 0 0 var(--edge), 0 var(--px) 0 0 var(--edge),
              calc(var(--px) * -1) 0 0 0 var(--edge), var(--px) 0 0 0 var(--edge),
              0 calc(var(--px) * 2) 0 0 var(--coral-dark);
  transition: transform 120ms steps(2), background-color 120ms steps(2);
}
.btn:hover { --bg: var(--coral-light); --edge: var(--coral-light); color: var(--night); }
.btn:active { transform: translateY(var(--px)); box-shadow: 0 calc(var(--px) * -1) 0 0 var(--edge), 0 var(--px) 0 0 var(--edge), calc(var(--px) * -1) 0 0 0 var(--edge), var(--px) 0 0 0 var(--edge); }
.btn:focus-visible { outline-offset: 8px; }
.btn-sm { min-height: 40px; padding: 8px 14px; font-size: 16px; }
.btn-lg { min-height: 56px; padding: 12px 28px; font-size: 20px; }

/* ---------- header ---------- */
.top { position: sticky; top: 0; z-index: 20; background: var(--night-deep); border-bottom: var(--px) solid var(--night-floor); }
.top-row { display: flex; align-items: center; gap: 24px; min-height: 68px; }
.brand { display: flex; align-items: center; min-height: 44px; gap: 10px; color: var(--cream); text-decoration: none; font: 700 22px/1 var(--pixel); white-space: nowrap; }
.brand img { width: 36px; height: auto; }
.brand:hover span { color: var(--coral); }
.top nav { margin-left: auto; }
.top nav ul { display: flex; gap: 28px; }
.top nav a { color: var(--cream); text-decoration: none; font: 400 17px/1 var(--pixel); padding: 8px 0; }
.top nav a:hover { color: var(--coral); }

/* ---------- hero: the game is the first screen ---------- */
.hero { padding: 20px 0 44px; background: var(--night-deep); }
.hero-shell { position: relative; container-type: inline-size; }
.hero-copy { margin-bottom: 24px; }
h1 { font-size: clamp(46px, 7vw, 76px); line-height: 1.05; color: var(--cream); text-shadow: 0 var(--px) 0 var(--coral-dark); }
.lede { font-size: 18px; line-height: 1.5; color: var(--cream); max-width: 40ch; margin: 18px 0 24px; }

.game { --edge: var(--panel-line); position: relative; background: var(--night-floor); padding: 10px; margin: 4px; }
.game.pxf, .game { box-shadow: 0 -4px 0 0 var(--panel-line), 0 4px 0 0 var(--panel-line), -4px 0 0 0 var(--panel-line), 4px 0 0 0 var(--panel-line); }

.stage {
  /* cook placement on the square crop (phones, tablets) */
  --cl: 38.8%; --cb: 15.69%; --cl-cheer: 37.5%;
  --h-idle: 31.9%; --h-cast: 30.9%; --h-cheer: 33%; --h-plate: 32.7%;
  position: relative; aspect-ratio: 1056 / 924; overflow: hidden; cursor: pointer;
  user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.stage picture, .stage-bg { position: absolute; inset: 0; width: 100%; height: 100%; }
.cook { position: absolute; left: var(--cl); bottom: var(--cb); width: auto; max-width: none; visibility: hidden; pointer-events: none; }
.pose-idle { height: var(--h-idle); }
.pose-cast { height: var(--h-cast); }
.pose-cheer { height: var(--h-cheer); left: var(--cl-cheer); }
.pose-plate { height: var(--h-plate); }
.stage[data-pose="idle"] .pose-idle,
.stage[data-pose="cast"] .pose-cast,
.stage[data-pose="cheer"] .pose-cheer,
.stage[data-pose="plate"] .pose-plate { visibility: visible; }
.stage[data-pose="cheer"] .pose-cheer { animation: hop 520ms steps(4) 2; }
@keyframes hop { 50% { transform: translateY(-6%); } }

.line { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.line path { fill: none; stroke: var(--cream); stroke-width: 2.5; vector-effect: non-scaling-stroke; }
.bobber { position: absolute; left: 0; top: 0; width: 14px; height: 18px; transform: translate(-50%, -60%); background: linear-gradient(180deg, var(--coral) 0 50%, var(--cream) 50% 100%); box-shadow: 0 0 0 2px var(--night-deep); display: none; pointer-events: none; }
.stage.has-line .bobber { display: block; }
.bite { position: absolute; left: 0; top: 0; transform: translate(-50%, -150%); padding: 2px 9px 4px; font: 700 clamp(18px, 2.8vw, 30px)/1 var(--pixel); color: var(--rust); background: var(--cream); box-shadow: 0 0 0 3px var(--night-deep); display: none; pointer-events: none; }
.stage[data-state="bite"] .bite { display: block; animation: blink 240ms steps(1) infinite; }
@keyframes blink { 50% { opacity: 0.4; } }
/* a stepped ellipse, drawn as five rows of 2px bars like a sprite ring */
.ripple { --c: var(--cream); position: absolute; left: 0; top: 0; width: 48px; height: 12px; transform: translate(-50%, 10%); opacity: 0; pointer-events: none;
  background:
    linear-gradient(var(--c) 0 0) 12px 0 / 24px 2px,
    linear-gradient(var(--c) 0 0) 4px 2px / 8px 2px, linear-gradient(var(--c) 0 0) 36px 2px / 8px 2px,
    linear-gradient(var(--c) 0 0) 0 4px / 4px 4px, linear-gradient(var(--c) 0 0) 44px 4px / 4px 4px,
    linear-gradient(var(--c) 0 0) 4px 8px / 8px 2px, linear-gradient(var(--c) 0 0) 36px 8px / 8px 2px,
    linear-gradient(var(--c) 0 0) 12px 10px / 24px 2px;
  background-repeat: no-repeat; }
.ripple.go { animation: ripple 600ms steps(5) forwards; }
@keyframes ripple { from { opacity: 0.9; transform: translate(-50%, 10%) scale(0.4); } to { opacity: 0; transform: translate(-50%, 10%) scale(2.2); } }

.hud { position: absolute; top: 3%; right: 3%; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; max-width: 70%; }
.hud-chip { font: 400 15px/1 var(--pixel); color: var(--cream); background: var(--night-deep); padding: 7px 10px; box-shadow: 0 -3px 0 0 var(--night-deep), 0 3px 0 0 var(--night-deep), -3px 0 0 0 var(--night-deep), 3px 0 0 0 var(--night-deep); white-space: nowrap; }
.hud-k { color: var(--sea); margin-right: 4px; }
.hud-chip.pop { animation: pop 300ms steps(3); }
@keyframes pop { 50% { background: var(--coral); color: var(--night); } }
.float-gain { position: absolute; left: 66%; top: 34%; font: 700 clamp(18px, 3vw, 30px)/1 var(--pixel); color: var(--cream); text-shadow: 0 3px 0 var(--coral-dark); opacity: 0; pointer-events: none; }
.float-gain.go { animation: gain 1100ms steps(8) forwards; }
@keyframes gain { 0% { opacity: 0; transform: translateY(20px); } 20% { opacity: 1; } 80% { opacity: 1; } 100% { opacity: 0; transform: translateY(-40px); } }

/* menu board: three plates in a row */
.board { margin: 10px 0 0; background: var(--night-deep); padding: 10px 10px 12px; box-shadow: inset 0 0 0 3px var(--coral); }
.board-title { font: 700 17px/1 var(--pixel); color: var(--coral); margin: 2px 2px 10px; }
.board-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.dish-row { display: grid; justify-items: center; align-content: center; text-align: center; gap: 4px; min-height: 92px; padding: 6px 4px; background: var(--night); font: 400 14px/1.15 var(--pixel); }
.dish-row img { width: 40px; height: 40px; object-fit: contain; }
.dish-row.is-empty { color: var(--cream-dim); }
.dish-row.is-empty .dish-name::before { content: ""; display: block; width: 28px; height: 4px; margin: 0 auto 10px; background: var(--panel-line); }
.dish-price { color: var(--coral); }
.dish-row.is-new { animation: flop 500ms steps(4); }
.dish-row.is-fish img { animation: wiggle 300ms steps(2) infinite; }
@keyframes flop { 0% { transform: translateY(-8px); } 50% { transform: translateY(4px); } 100% { transform: none; } }
@keyframes wiggle { 50% { transform: rotate(-12deg) translateY(-3px); } }

.console { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center; background: var(--panel); padding: 12px 12px 12px 16px; margin-top: 10px; }
.say { font: 400 16px/1.4 var(--sans); color: var(--cream); min-height: 2.8em; display: flex; align-items: center; flex-wrap: wrap; column-gap: 10px; }
.who { font: 700 15px/1 var(--pixel); color: var(--night); background: var(--sea); padding: 4px 6px; }
.btn-game { min-width: 140px; margin: 4px 4px 8px; }
.btn-game[aria-disabled="true"] { --bg: var(--panel-line); --edge: var(--panel-line); color: var(--cream); cursor: default; box-shadow: 0 -4px 0 0 var(--edge), 0 4px 0 0 var(--edge), -4px 0 0 0 var(--edge), 4px 0 0 0 var(--edge); transform: translateY(4px); }
.btn-game.is-hot { --bg: var(--cream); --edge: var(--cream); color: var(--night); animation: nudge 300ms steps(2) infinite; }
@keyframes nudge { 50% { transform: translateY(-3px); } }

.flyer { position: fixed; left: 0; top: 0; width: 56px; height: auto; z-index: 30; pointer-events: none; image-rendering: pixelated; }

/* wide screens: title card and menu board sit inside the scene */
@media (min-width: 1101px) {
  .hero { padding: 20px 0 32px; }
  /* 216px = header, hero top padding, game frame and the Cast bar; keeps the whole game on the first screen */
  .hero-shell { max-width: max(900px, calc((100svh - 216px) * 2.021 + 28px)); }
  .stage {
    aspect-ratio: 1536 / 760;
    --cl: 59.9%; --cb: 9.87%; --cl-cheer: 58.6%;
    --h-idle: 38.74%; --h-cast: 37.58%; --h-cheer: 40.1%; --h-plate: 39.68%;
  }
  .hero-copy {
    position: absolute; z-index: 3; margin: 0;
    left: calc(14px + 2.4cqw); top: calc(14px + 2.4cqw); width: 37cqw;
    padding: 2.4cqw 2.6cqw 2.8cqw; background: var(--night-deep);
    box-shadow: 0 -4px 0 0 var(--cream-dim), 0 4px 0 0 var(--cream-dim), -4px 0 0 0 var(--cream-dim), 4px 0 0 0 var(--cream-dim), 8px 12px 0 0 rgba(23, 24, 42, 0.55);
  }
  h1 { font-size: clamp(50px, 5.6cqw, 72px); }
  .lede { font-size: clamp(17px, 1.6cqw, 19px); margin: 1.6cqw 0 2.2cqw; }
  .board { position: absolute; z-index: 2; margin: 0; top: calc(10px + 2.4cqw); right: calc(10px + 2.4cqw); width: 31cqw; background: rgba(31, 32, 51, 0.94); }
  .dish-row { min-height: 84px; }
  .hud { top: auto; bottom: 3%; right: 2.4%; }
}
/* 1440+: Wren's dialog box moves into the scene under the title card, so the
   whole window is just the art. At 1920 the art then shows at its own 1536px, one image pixel per screen pixel. */
@media (min-width: 1440px) {
  .hero-shell { max-width: max(1100px, calc((100svh - 128px) * 2.021 + 28px)); }
  .console {
    position: absolute; z-index: 3; margin: 0;
    left: calc(14px + 2.4cqw); bottom: calc(14px + 2.4cqw); width: 37cqw;
    grid-template-columns: 1fr auto; gap: 12px; padding: 12px 10px 12px 18px;
    background: var(--night-deep);
    box-shadow: 0 -4px 0 0 var(--cream-dim), 0 4px 0 0 var(--cream-dim), -4px 0 0 0 var(--cream-dim), 4px 0 0 0 var(--cream-dim), 8px 12px 0 0 rgba(23, 24, 42, 0.55);
  }
  .say { font-size: 15px; }
  .btn-game { min-width: 128px; }
}
@media (min-width: 1440px) and (max-width: 1599px) {
  h1 { font-size: clamp(50px, 4.9cqw, 72px); }
  .lede { margin: 1.2cqw 0 1.8cqw; }
  .menu-name { font-size: 18px; }
}

/* ---------- facts: a load-screen save slot ---------- */
.hero-save { margin-top: 40px; }
.save { display: grid; grid-template-columns: auto auto minmax(0, 1fr); align-items: center; gap: 20px 28px; margin: 4px; padding: 16px 24px 16px 18px; background: var(--night); box-shadow: 0 -4px 0 0 var(--panel-line), 0 4px 0 0 var(--panel-line), -4px 0 0 0 var(--panel-line), 4px 0 0 0 var(--panel-line); }
.save-face { height: 76px; width: auto; }
.save-slot { font: 400 15px/1 var(--pixel); color: var(--night); background: var(--sea); display: inline-block; padding: 3px 6px; }
.save-name { margin-top: 8px; font: 700 24px/1 var(--pixel); color: var(--cream); white-space: nowrap; }
.save-day { margin-top: 4px; font-size: 15px; color: var(--cream-dim); }
.save-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.save-stats li, .save-stats a { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; }
.save-stats li { padding: 10px 12px; background: var(--night-deep); }
.save-stats a { grid-column: 1 / -1; color: inherit; text-decoration: none; }
.save-stats img { grid-row: 1 / 3; width: 40px; height: 40px; object-fit: contain; }
.save-stats strong { font: 700 28px/1 var(--pixel); color: var(--coral); }
.save-stats span { grid-column: 2; font-size: 14px; line-height: 1.3; color: var(--cream-dim); }
.save-stats li:nth-child(n+3) strong, .save-stats li:nth-child(n+3) span { grid-column: 1 / -1; }
.save-stats a:hover strong { color: var(--cream); }

/* ---------- demo: the copy beside the chalk menu of the twelve demo fish ---------- */
.demo { padding: var(--s2) 0; }
.demo-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 48px 64px; align-items: start; }
.demo-copy { position: sticky; top: calc(var(--head) + 32px); display: grid; justify-items: start; gap: 20px; }
.demo-copy p { max-width: 46ch; }
.demo-copy .small { font-size: 15px; color: var(--cream-dim); }

.menu { --edge: var(--coral-dark); position: relative; margin: 4px; padding: 28px 32px 32px; background: var(--night-floor);
  box-shadow: 0 -4px 0 0 var(--edge), 0 4px 0 0 var(--edge), -4px 0 0 0 var(--edge), 4px 0 0 0 var(--edge), 0 12px 0 0 var(--night-deep); }
.menu-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 18px; padding-bottom: 18px; margin-bottom: 8px; border-bottom: 4px dashed var(--panel-line); }
.menu-head h3 { font-size: 30px; color: var(--cream); }
.menu-note { font-size: 15px; color: var(--cream-dim); }
.menu-count { flex-basis: 100%; font: 400 16px/1.2 var(--pixel); color: var(--sea); }
.menu-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 40px; }
.menu-row { display: grid; grid-template-columns: 48px minmax(0, auto) minmax(12px, 1fr) auto; align-items: center; column-gap: 12px; min-height: 64px; padding: 6px 0; }
.menu-row img { width: 48px; height: 48px; object-fit: contain; }
.menu-name { display: block; font: 400 20px/1.05 var(--pixel); color: var(--cream); }
.menu-text small { display: block; margin-top: 3px; font: 400 13px/1.2 var(--sans); color: var(--cream-dim); }
/* dotted leader between name and price, drawn in 4px squares */
.menu-row::after { content: ""; grid-column: 3; grid-row: 1; align-self: end; margin-bottom: 14px; height: 4px; background: repeating-linear-gradient(90deg, var(--panel-line) 0 4px, transparent 4px 10px); }
.menu-price { grid-column: 4; font: 400 20px/1 var(--pixel); color: var(--coral); }
.menu-row.is-served .menu-name { color: var(--coral); }
.menu-row.is-served .menu-text small::after { content: ", caught on the pier"; color: var(--sea); }
.menu-row.is-served img { animation: flop 500ms steps(4); }

/* ---------- screenshots: a zigzag, the text holding one corner ---------- */
.screens { padding: var(--s2) 0; background-color: var(--night-deep); }
.shots { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 28px 20px; }
.shots-head { grid-column: 1 / 3; display: flex; flex-direction: column; justify-content: space-between; gap: 32px; }
.shot-big { grid-column: 3 / 7; }
.shot-wide { grid-column: 1 / 5; display: flex; flex-direction: column; }
.shot-wide .frame { aspect-ratio: 2 / 1; }
.shots-stack { grid-column: 5 / 7; display: flex; flex-direction: column; }
.shots-stack .shot { flex: 1; display: flex; flex-direction: column; }
.shots-stack .frame { flex: 1; aspect-ratio: auto; min-height: 220px; }
.shot { margin: 0; }
.shot figcaption { margin-top: 10px; font-size: 15px; color: var(--cream-dim); }
.frame { position: relative; aspect-ratio: 16 / 9; overflow: hidden; container-type: inline-size; background: var(--night); outline: var(--px) solid var(--night-floor); }
.frame-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.s-cook { position: absolute; width: auto; max-width: none; }
.s-cook-cast { left: 36%; bottom: 22%; height: 40%; }
.s-cook-plate { left: 55%; bottom: 2%; height: 50%; }

.ui-hud { position: absolute; top: 4%; right: 3%; display: flex; gap: 1.6cqw; }
.ui-hud span { font: 400 clamp(11px, 2.2cqw, 18px)/1 var(--pixel); padding: 0.9cqw 1.3cqw; background: var(--night-deep); color: var(--cream); }
.ui-hud .ui-tide { color: var(--night); background: var(--sea); }
.ui-hud-left { right: auto; left: 3%; }
.ui-dialog { position: absolute; left: 3%; right: 3%; bottom: 4%; padding: 1.8cqw 2.4cqw; background: rgba(31, 32, 51, 0.95); color: var(--cream); font: 400 clamp(11px, 2.4cqw, 20px)/1.3 var(--pixel); box-shadow: 0 0 0 3px var(--cream-dim); }
.ui-who { font: 700 clamp(11px, 2.1cqw, 18px)/1.2 var(--pixel); color: var(--coral); margin-bottom: 0.5cqw; }
.ui-tickets { position: absolute; top: 4%; right: 3%; display: grid; gap: 1.4cqw; padding: 1.6cqw; background: rgba(31, 32, 51, 0.92); font-family: var(--pixel); }
.ui-tickets-h { font: 700 clamp(11px, 3cqw, 18px)/1 var(--pixel); color: var(--coral); }
.ticket { display: flex; align-items: center; gap: 1.6cqw; padding: 0.8cqw 1.2cqw; background: var(--cream); }
.ticket img { width: 9cqw; height: 7cqw; object-fit: contain; }
.ticket span { color: var(--night); font: 400 clamp(11px, 3cqw, 18px)/1 var(--pixel); }
.ticket.is-late { background: var(--coral); }

.frame-menu { background: var(--night); box-shadow: inset 0 0 0 1.4cqw var(--night-deep), inset 0 0 0 calc(1.4cqw + 3px) var(--panel-line); }
.cook-ui { position: absolute; inset: 9% 7%; display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 5cqw; align-items: center; }
.cook-plate { aspect-ratio: 1; display: grid; place-items: center; background: var(--panel); box-shadow: 0 0 0 4px var(--coral); }
.cook-plate img { width: 72%; height: auto; }
.cook-side { display: grid; gap: 3cqw; }
.cook-ings { display: flex; align-items: center; gap: 1.6cqw; }
.ing { display: grid; place-items: center; min-width: 10cqw; height: 10cqw; background: var(--panel); font: 400 clamp(11px, 2.6cqw, 16px)/1 var(--pixel); color: var(--cream); padding: 0 1.2cqw; white-space: nowrap; }
.ing img { width: 8cqw; height: 8cqw; object-fit: contain; }
.meter { position: relative; height: 4cqw; background: var(--night-deep); box-shadow: 0 0 0 3px var(--cream-dim); }
.meter-sweet { position: absolute; left: 58%; width: 16%; top: 0; bottom: 0; background: var(--sea); }
.meter-tick { position: absolute; left: 63%; width: 1.2cqw; top: -1.4cqw; bottom: -1.4cqw; background: var(--cream); }
.meter-label { font: 400 clamp(11px, 2.4cqw, 16px)/1.2 var(--pixel); color: var(--cream-dim); }

.feat li { position: relative; padding-left: 26px; margin-top: 12px; }
.feat li::before { content: ""; position: absolute; left: 0; top: 0.5em; width: 10px; height: 10px; background: var(--coral); }

.journal { position: absolute; inset: 7% 6%; display: grid; grid-template-columns: 1.4fr 1fr; gap: 4cqw; align-items: center; }
.journal-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.6cqw; }
.slot { aspect-ratio: 1; display: grid; place-items: center; background: var(--panel); }
.slot img { width: 78%; height: 78%; object-fit: contain; }
.slot.is-on { box-shadow: 0 0 0 4px var(--coral); background: var(--panel-line); }
.slot.is-unknown img { filter: brightness(0); opacity: 0.55; }
.journal-page { background: var(--cream); color: var(--night); padding: 3cqw; font: 400 clamp(11px, 2.2cqw, 17px)/1.4 var(--sans); display: grid; gap: 1.6cqw; }
.journal-page .ui-who { color: var(--rust); font-size: clamp(12px, 3cqw, 22px); }
.journal-best { font-size: clamp(11px, 1.9cqw, 15px); }

/* ---------- town: the map runs off the left edge, the guide sits beside it ---------- */
.town { padding: var(--s2) 0; overflow-x: clip; }
.town-grid { display: grid; grid-template-columns: minmax(0, 2.1fr) minmax(0, 1fr); grid-template-areas: "map text" "map places"; grid-template-rows: auto 1fr; gap: 28px 40px; align-items: start; }
.town-text { grid-area: text; }
.town-intro { max-width: 54ch; margin-top: 16px; }
.town-map { grid-area: map; position: relative; align-self: center; outline: var(--px) solid var(--night-deep); }
.town-map img { width: 100%; }
.places { grid-area: places; display: flex; flex-direction: column; }
.pin { position: absolute; transform: translate(-50%, -50%); width: 44px; height: 44px; display: grid; place-items: center; font: 700 18px/1 var(--pixel); color: var(--night); background: var(--cream); border: 0; cursor: pointer; box-shadow: 0 0 0 4px var(--night-deep); transition: transform 120ms steps(2), background-color 120ms steps(2); }
.pin::after { content: ""; position: absolute; inset: -6px; }
.pin:hover { background: var(--coral); }
.pin.is-on:hover { background: var(--coral-light); }
.pin.is-on { background: var(--coral); transform: translate(-50%, -60%); box-shadow: 0 0 0 4px var(--night-deep), 0 8px 0 0 var(--night-deep); }
.place-tabs { display: grid; gap: 8px; }
.place-tabs button { display: flex; align-items: center; gap: 12px; min-height: 50px; padding: 10px 14px; text-align: left; font: 400 19px/1.1 var(--pixel); color: var(--cream); background: var(--night-deep); border: 0; cursor: pointer; }
.place-tabs button span, .place-name span { display: inline-grid; place-items: center; width: 28px; height: 28px; font-size: 15px; background: var(--panel); color: var(--cream); }
.place-tabs button:hover { background: var(--panel); color: var(--coral-light); }
.place-tabs button[aria-selected="true"] { background: var(--panel); }
.place-tabs button[aria-selected="true"] span { background: var(--coral); color: var(--night); }
.place { position: relative; margin-top: 16px; padding: 18px 18px 20px; background: var(--cream); color: var(--night); }
.place p { font-size: 16px; }
.place .place-meta { margin-top: 10px; font: 700 15px/1.2 var(--pixel); color: var(--rust); }
.place-name { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font: 400 19px/1.1 var(--pixel); }
.js .place-name { display: none; }
.no-js .place-tabs, .no-js .pin { display: none; }
.no-js .btn-game { display: none; }
@media (min-width: 1101px) {
  /* bleed: the map's left edge meets the window edge */
  .town-map { margin-left: calc((var(--wrapw) - 100vw) / 2); outline: 0; }
}

/* ---------- wishlist ---------- */
.wish { padding: var(--s2) 0; background-color: var(--night-deep); }
.wish-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); background: var(--panel); box-shadow: 0 -4px 0 0 var(--coral), 0 4px 0 0 var(--coral), -4px 0 0 0 var(--coral), 4px 0 0 0 var(--coral); margin: 4px; }
.capsule { position: relative; min-height: 100%; overflow: hidden; }
.capsule picture, .capsule img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; }
.capsule-logo { position: absolute; right: 6%; top: 7%; text-align: right; font: 700 clamp(30px, 4.2vw, 54px)/0.95 var(--pixel); color: var(--cream); text-shadow: 0 4px 0 var(--night-deep), 4px 0 0 var(--night-deep), -4px 0 0 var(--night-deep), 0 -4px 0 var(--night-deep), 4px 4px 0 var(--night-deep); max-width: 8ch; }
.wish-body { padding: 44px 44px 48px; display: grid; gap: 22px; align-content: center; justify-items: start; }
.wish-body h2 { font-size: clamp(30px, 3.4vw, 42px); }
.wish-body > p { max-width: 46ch; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags li { font: 400 14px/1 var(--pixel); padding: 7px 10px; background: var(--night); color: var(--sea); }
.buy { margin: 0; display: grid; grid-template-columns: repeat(3, auto); gap: 8px 32px; }
.buy dt { font: 400 14px/1.2 var(--pixel); color: var(--cream-dim); }
.buy dd { margin: 2px 0 0; font-weight: 700; }
/* devlog excerpt: what the playtest said, what changed */
.devlog { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 32px 72px; margin-top: var(--s1); padding-top: var(--s1); }
.devlog-head h3 { font-size: 30px; }
.devlog-head p { margin-top: 14px; color: var(--cream-dim); max-width: 36ch; }
.devlog-head .devlog-sign { font: 400 18px/1 var(--pixel); color: var(--cream); }
.devlog-list { display: grid; gap: 4px; }
.devlog-list li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); }
.devlog-list p { padding: 18px 22px 20px; font-size: 16px; }
.devlog-list .was { background: var(--night); color: var(--cream-dim); }
.devlog-list .now { background: var(--cream); color: var(--night); }
.devlog-list .tag { display: block; margin-bottom: 6px; font: 400 15px/1 var(--pixel); color: var(--sea); }
.devlog-list .now .tag { color: var(--rust); }

.launch { display: grid; gap: 8px; width: 100%; max-width: 520px; }
.launch label { font: 700 17px/1.2 var(--pixel); color: var(--cream); }
.launch-row { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: center; }
.launch input { flex: 1 1 220px; min-width: 0; min-height: 48px; margin: 4px; padding: 10px 12px; font: 400 17px/1.2 var(--sans); color: var(--night); background: var(--cream); border: 0; border-radius: 0; box-shadow: 0 0 0 4px var(--night-deep); }
.launch input:focus-visible { outline: 3px solid var(--sea); outline-offset: 4px; }
.launch input[aria-invalid="true"] { box-shadow: 0 0 0 4px var(--coral); }
.launch-help { font-size: 14px; color: var(--cream-dim); }
.launch-help.is-error { color: var(--cream); font-weight: 700; }
.launch-done { display: grid; gap: 8px; padding: 16px 18px; background: var(--cream); color: var(--night); max-width: 520px; }
.launch-ok { font: 700 20px/1.25 var(--pixel); color: var(--night); }
.launch-ok:focus { outline: none; }
.launch-addr { font-size: 15px; }
.linkish { padding: 0; border: 0; background: none; font: inherit; color: var(--rust); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.linkish:hover { color: var(--night); }

@media (min-width: 1600px) {
  .wish-body { padding: 64px 80px 72px; gap: 26px; }
  .wish-body h2 { font-size: 52px; }
  .wish-body > p { font-size: 19px; }
  .launch, .launch-done { max-width: 600px; }
}

/* ---------- press ---------- */
.press { padding: var(--s2) 0 var(--s3); }
.press-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 64px; align-items: start; }
.press-main > p { margin-top: 20px; max-width: 62ch; }
.press-main h3 { margin: 40px 0 16px; }
.dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.dl a { display: grid; gap: 10px; color: var(--cream); text-decoration: none; }
.dl img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; outline: var(--px) solid var(--night-deep); transition: outline-color 120ms steps(2); }
.dl a:hover img, .dl a:focus-visible img { outline-color: var(--coral); }
.dl a:hover .dl-name { color: var(--coral-light); }
.dl-name { font: 700 16px/1.2 var(--pixel); }
.dl small { display: block; margin-top: -6px; font: 400 14px/1.2 var(--sans); color: var(--cream-dim); }
.factsheet { background: var(--night-deep); padding: 28px 28px 24px; box-shadow: 0 -4px 0 0 var(--panel-line), 0 4px 0 0 var(--panel-line), -4px 0 0 0 var(--panel-line), 4px 0 0 0 var(--panel-line); margin: 4px; position: sticky; top: 96px; }
.factsheet h3 { margin-bottom: 14px; color: var(--coral); }
.factsheet dl { margin: 0; }
.factsheet dl div { display: grid; grid-template-columns: 104px 1fr; gap: 12px; padding: 10px 0; }
.factsheet dl div + div { border-top: 2px dashed var(--panel-line); }
.factsheet dt { font: 400 15px/1.4 var(--pixel); color: var(--sea); }
.factsheet dd { margin: 0; font-size: 16px; line-height: 1.45; }
.contact { margin-top: 18px; font-size: 16px; }
/* a note from Tom, written on a scrap of the menu pad and taped next to the downloads */
.press-main > .note { position: relative; max-width: 32ch; margin: 40px 0 0 6px; padding: 16px 20px 14px; background: var(--cream); color: var(--night); font: 400 18px/1.4 "Kalam", var(--sans); transform: rotate(-1.5deg); box-shadow: 4px 4px 0 var(--night-deep); }
.note::before { content: ""; position: absolute; top: -10px; left: 42%; width: 64px; height: 20px; background: rgba(107, 183, 201, 0.7); transform: rotate(3deg); }
.note span { display: block; margin-top: 4px; text-align: right; color: var(--rust); }
.note span::before { content: "– "; }

/* ---------- footer ---------- */
.foot { background: var(--night-floor); padding: 40px 0 44px; font-size: 15px; color: var(--cream-dim); }
.foot-row { display: grid; grid-template-columns: auto 1fr; gap: 14px 40px; align-items: center; }
.foot-brand { font-size: 20px; }
.foot ul { display: flex; flex-wrap: wrap; gap: 8px 28px; }
.foot p { grid-column: 1 / -1; }
.foot a { color: var(--cream); }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .top nav ul { gap: 20px; }
  .game { max-width: 620px; display: flex; flex-direction: column; }
  .console { order: 2; }
  .board { order: 3; }
  .demo-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 40px; }
  .menu-list { grid-template-columns: 1fr; }
}
@media (max-width: 960px) {
  :root { --s2: 80px; --s3: 104px; }
  .save { grid-template-columns: auto minmax(0, 1fr); }
  .save-stats { grid-column: 1 / -1; }
  .demo-grid { grid-template-columns: 1fr; }
  .demo-copy { position: static; }
  .menu-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shots { grid-template-columns: 1fr; gap: 28px; }
  .shots-head, .shot-big, .shot-wide, .shots-stack { grid-column: auto; }
  .shot-wide .frame { aspect-ratio: 16 / 9; }
  .shots-stack .frame { aspect-ratio: 16 / 9; flex: none; min-height: 0; }
  .town-grid { grid-template-columns: 1fr; grid-template-areas: "text" "map" "places"; }
  .wish-card { grid-template-columns: 1fr; }
  .capsule { aspect-ratio: 16 / 9; min-height: 0; }
  .devlog { grid-template-columns: 1fr; }
  .press-grid { grid-template-columns: 1fr; gap: 48px; }
  .factsheet { position: static; }
}
@media (max-width: 860px) {
  .top nav { display: none; }
  .top-row { justify-content: space-between; }
}
@media (max-width: 767px) {
  :root { --head: 64px; --s1: 40px; --s2: 64px; --s3: 80px; }
  body { font-size: 16px; }
  .top-row { min-height: 60px; gap: 12px; }
  .brand { font-size: 18px; }
  .brand img { width: 30px; }
  .btn-sm { font-size: 14px; padding: 8px 10px; min-height: 40px; }
  .hero { padding: 22px 0 32px; }
  .hero-copy { margin-bottom: 20px; }
  h1 { font-size: 44px; }
  .lede { font-size: 16px; margin: 12px 0 18px; }
  .hero-copy .btn { min-height: 48px; font-size: 17px; width: calc(100% - 8px); }
  .game { padding: 6px; }
  .board { padding: 8px 8px 10px; }
  .dish-row { font-size: 13px; }
  .dish-row img { width: 36px; height: 36px; }
  .hud { gap: 5px; top: 2.5%; right: 2.5%; }
  .hud-chip { font-size: 12px; padding: 4px 6px; }
  .hud-fish { display: none; }
  .console { grid-template-columns: 1fr; gap: 10px; padding: 12px; }
  .say { font-size: 15px; }
  .btn-game { width: calc(100% - 8px); }
  .top-row > .btn { display: none; }
  .hero-save { margin-top: 32px; }
  .save { grid-template-columns: auto minmax(0, 1fr); padding: 14px; gap: 14px 16px; }
  .save-face { height: 64px; }
  .save-name { font-size: 21px; white-space: normal; }
  .save-stats { grid-column: 1 / -1; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .save-stats strong { font-size: 24px; }
  .demo-copy .btn { width: calc(100% - 8px); }
  .menu { padding: 20px 16px 22px; }
  .menu-head h3 { font-size: 26px; }
  .menu-list { grid-template-columns: 1fr; }
  .menu-row { grid-template-columns: 40px minmax(0, auto) minmax(12px, 1fr) auto; column-gap: 10px; min-height: 56px; }
  .menu-row img { width: 40px; height: 40px; }
  .menu-name { font-size: 19px; }
  .launch .btn { width: calc(100% - 8px); }
  .pin { width: 32px; height: 32px; font-size: 15px; box-shadow: 0 0 0 3px var(--night-deep); }
  .wish-body { padding: 28px 20px 32px; }
  .buy { grid-template-columns: 1fr 1fr; }
  .buy div:nth-child(3) { grid-column: 1 / -1; }
  .devlog-head h3 { font-size: 26px; }
  .devlog-list { gap: 16px; }
  .devlog-list li { grid-template-columns: 1fr; }
  .devlog-list p { padding: 14px 16px 16px; }
  .dl { grid-template-columns: 1fr 1fr; }
  .dl li:first-child { grid-column: 1 / -1; }
  .factsheet { padding: 22px 18px 18px; }
  .factsheet dl div { grid-template-columns: 1fr; gap: 2px; }
  .foot-row { grid-template-columns: 1fr; }
}
@media (max-width: 380px) {
  .brand span { font-size: 16px; }
  .btn-sm { font-size: 13px; padding: 8px 8px; }
}

/* ---------- texture: a 2px ordered dither on the dark bands, the way a 16-colour game shades a flat sky ---------- */
.screens, .wish, .foot {
  background-image: repeating-conic-gradient(rgba(107, 183, 201, 0.035) 0 25%, transparent 0 50%);
  background-size: 4px 4px;
}

/* ---------- scroll-driven arrival: things step up into place as they enter, in 4 frames like a sprite.
   Only transforms move; nothing starts hidden, so with no support (or in print) everything just sits there. ---------- */
@media screen and (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .shot, .menu-row, .devlog-list li, .dl li {
      animation: step-up linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 70%;
      animation-timing-function: steps(4, end);
    }
    .menu-row:nth-child(even) { animation-range: entry 10% entry 80%; }
    .menu-row::after { animation: leader linear both; animation-timeline: view(); animation-range: entry 30% cover 35%; }
  }
}
@keyframes step-up { from { transform: translateY(28px); } to { transform: none; } }
@keyframes leader { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
  .stage[data-state="bite"] .bite, .btn-game.is-hot { animation: none; }
}
