/* Page-specific styles: catalogue, game, wishlist, about, contact, legal, 404.
   Base tokens, buttons and layout helpers live in site.css. Motion: transform/opacity only, plays once,
   and prefers-reduced-motion (handled globally in site.css + JS) shows the settled state. */

:root {
  --mono: ui-monospace, "SFMono-Regular", "Cascadia Mono", "Consolas", "Courier New", monospace;
  --paper-print: #FFFDF8;
  --shadow-print: 0 22px 44px -28px rgba(20, 22, 36, .6), 0 2px 6px rgba(20, 22, 36, .08);
}

/* ================================================================ shared bits */

/* Status chips: the text carries the meaning; shape and fill differ too, so colour is never the only cue. */
.chip {
  display: inline-flex; align-items: center; gap: 7px; margin: 0 0 10px;
  padding: 3px 11px 3px 9px; border-radius: 999px; border: 1.5px solid currentColor;
  font: 700 .78rem/1.4 var(--sans); letter-spacing: .06em; text-transform: uppercase; white-space: nowrap;
}
.chip::before { content: ""; flex: none; width: 9px; height: 9px; border-radius: 50%; background: currentColor; }
.chip-wishlist { color: var(--c-accent); border-style: dashed; }
.chip-wishlist::before { background: transparent; border: 2px solid currentColor; width: 10px; height: 10px; }
.chip-sale { background: var(--c-button); color: var(--c-button-ink); border-color: var(--c-button); }
.chip-unavailable, .chip-archived { color: var(--c-muted); border-color: var(--c-line); background: var(--c-surface); }
.chip-unavailable::before, .chip-archived::before { width: 10px; height: 2px; border-radius: 1px; }

.link-btn {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; margin: -10px 0;
  border: 0; background: none; color: inherit; font: inherit; font-weight: 700;
  text-decoration: underline; text-underline-offset: .18em; cursor: pointer;
}
.btn-arrow-link .arrow { transition: transform 200ms var(--ease); }
@media (hover: hover) { .btn-arrow-link:hover .arrow { transform: translateX(4px); } }
.btn-arrow-link:focus-visible .arrow { transform: translateX(4px); }

/* Wishlist control additions */
.wish-form { position: relative; }
.wish-hint { flex-basis: 100%; margin: 0; font-size: .95rem; color: var(--c-muted); }
.wish-error { display: block; }
.stamp-num { display: inline-block; min-width: 1.3em; text-align: right; }
.wish-impress {
  position: absolute; right: -12px; top: -16px; z-index: 2; pointer-events: none; opacity: 0;
  padding: 3px 7px 2px; border: 2px solid currentColor; border-radius: 5px; color: var(--c-accent);
  background: color-mix(in srgb, var(--c-bg) 88%, transparent);
  font: 700 .72rem/1.2 var(--mono); letter-spacing: .14em; text-transform: uppercase;
  transform: rotate(-9deg) scale(1.5);
}
.wish-impress.is-on { animation: impress 1100ms cubic-bezier(.2, .8, .2, 1) forwards; }
@keyframes impress {
  0% { opacity: 0; transform: rotate(-9deg) scale(1.5); }
  22% { opacity: 1; transform: rotate(-7deg) scale(.94); }
  32% { transform: rotate(-7deg) scale(1); }
  75% { opacity: 1; transform: rotate(-7deg) scale(1); }
  100% { opacity: 0; transform: rotate(-7deg) scale(1); }
}

/* One-shot entrance helper (site.js): settled unless primed */
[data-enter] { transform-origin: 50% 50%; }

.concept-tag { z-index: 2; }

/* ================================================================ catalogue */
.page-catalogue .catalogue-head { padding-bottom: clamp(16px, 2.4vw, 28px); }
.gcard-grid { list-style: none; padding: 0; margin: 0; display: grid; gap: clamp(20px, 2.6vw, 32px); grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr)); }
.gcard-grid > li { display: flex; min-width: 0; }

.gcard {
  --c-bg: var(--t-bg); --c-surface: var(--t-surface); --c-ink: var(--t-ink); --c-muted: var(--t-muted);
  --c-accent: var(--t-accent); --c-line: var(--t-line); --c-button: var(--t-button); --c-button-ink: var(--t-button-ink);
  position: relative; display: flex; flex-direction: column; width: 100%; min-width: 0;
  background: var(--c-bg); color: var(--c-ink); border: 1px solid var(--c-line); border-radius: 18px;
  padding: 14px 14px 0;
  box-shadow: 0 18px 40px -34px rgba(20, 22, 36, .7);
}
.gcard :focus-visible { outline-color: var(--c-accent); }
.gcard-cover { position: relative; display: block; padding: 6px 4px 4px; }
.gcard-paper {
  display: block; aspect-ratio: 3 / 2; overflow: hidden; padding: 6px; border-radius: 5px;
  background: var(--paper-print); box-shadow: var(--shadow-print);
  transform: rotate(-.7deg); transition: transform 240ms var(--ease), box-shadow 240ms var(--ease);
}
.gcard-paper img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 2px; }
.gcard-label {
  position: absolute; left: 18px; top: 0; padding: 4px 8px 3px; border-radius: 3px;
  background: var(--c-surface); color: var(--c-accent); border: 1.5px solid currentColor;
  font: 700 .74rem/1.2 var(--mono); letter-spacing: .14em; text-transform: uppercase; transform: rotate(-3deg);
}
@media (hover: hover) {
  .gcard-cover:hover .gcard-paper, .gcard:has(.gcard-title a:hover) .gcard-paper {
    transform: translateY(-5px) rotate(-1.6deg);
    box-shadow: 0 30px 50px -28px rgba(20, 22, 36, .65), 0 2px 6px rgba(20, 22, 36, .1);
  }
}
.gcard:focus-within .gcard-paper { transform: translateY(-3px) rotate(-1.2deg); }
.gcard-body { display: flex; flex-direction: column; flex: 1; padding: 18px 8px 20px; }
.gcard-body .chip { align-self: flex-start; }
.gcard-title { font-size: clamp(1.6rem, 2.4vw, 2.1rem); margin: 0 0 .15em; overflow-wrap: anywhere; }
.gcard-title a { text-decoration: none; }
.gcard-title a:hover { text-decoration: underline; }
.gcard-tagline { font-family: var(--serif); font-style: italic; color: var(--c-accent); margin: 0 0 .5em; }
.gcard-hook { margin: 0 0 14px; max-width: 46ch; }
.gcard-facts { display: flex; flex-wrap: wrap; gap: 6px 28px; margin: 0 0 4px; }
.gcard-facts dt { font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; color: var(--c-muted); }
.gcard-facts dd { margin: 0; font-family: var(--serif); font-weight: 600; font-size: 1.12rem; }
.gcard-actions { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 12px 14px; margin-top: auto; padding-top: 16px; }
.gcard .wish { margin: 0; flex: 1 1 auto; gap: 10px 14px; }
.gcard .stamp { background: transparent; }

/* One published game: a wide two-page spread */
.gcard-spread {
  display: grid; gap: 8px clamp(24px, 4vw, 60px); align-items: center;
  padding: clamp(14px, 2.2vw, 28px); border-radius: 22px;
}
.gcard-spread .gcard-cover { padding: 10px 6px 8px; }
.gcard-spread .gcard-paper { padding: 8px; transform: rotate(-1.2deg); }
.gcard-spread .gcard-body { padding: 8px 6px 10px; }
.gcard-spread .gcard-title { font-size: clamp(2.4rem, 5vw, 4.2rem); line-height: 1; }
.gcard-spread .gcard-tagline { font-size: 1.25rem; }
.gcard-spread .gcard-hook { font-size: clamp(1.1rem, 1.5vw, 1.3rem); line-height: 1.45; margin-bottom: 18px; }
@media (min-width: 820px) {
  .gcard-spread { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
  .gcard-spread::after {
    /* the fold between the two pages */
    content: ""; position: absolute; top: 8%; bottom: 8%; left: calc(53.5% - 1px); width: 2px; pointer-events: none;
    background: linear-gradient(to bottom, transparent, color-mix(in srgb, var(--c-line) 80%, transparent) 20%, color-mix(in srgb, var(--c-line) 80%, transparent) 80%, transparent);
  }
}
@media (min-width: 820px) and (hover: hover) {
  .gcard-spread .gcard-cover:hover .gcard-paper, .gcard-spread:has(.gcard-title a:hover) .gcard-paper { transform: translateY(-6px) rotate(-2deg); }
}
.catalogue-empty { padding-top: 8px; }

/* ================================================================ game page */
.page-game .breadcrumbs { position: relative; z-index: 3; }
.game-hero { overflow: hidden; }
.game-hero-copy .chip { margin: 6px 0 0; }
.game-hero .wish { margin: 14px 0 6px; }
.game-hero .wish-hint, .game-hero .wish-note, .game-hero .status-note { color: color-mix(in srgb, var(--t-hero-ink) 82%, var(--t-hero-bg)); }
.game-hero .stamp { background: transparent; }
.game-hook { color: inherit; }

.game-hero-art { container-type: size; aspect-ratio: 4 / 3; overflow: hidden; }
.game-hero-art img { width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 600px) and (max-width: 899px) { .game-hero-art { aspect-ratio: 16 / 9; } }
@media (min-width: 900px) {
  .game-hero.has-art { min-height: min(clamp(540px, 50vw, 740px), calc(100svh - 96px)); min-height: clamp(520px, min(50vw, calc(100svh - 96px)), 740px); align-items: center; }
  .game-hero.has-art .game-hero-art { aspect-ratio: auto; }
  .game-hero.has-art .game-hero-copy { padding-block: 48px; }
}

/* Warm light in the station windows: fixed to the image even when it is cropped (container query units
   reproduce object-fit: cover), pulses once after the image has loaded, then rests faintly. */
.hero-lights {
  --bw: max(100cqw, calc(100cqh * var(--ar, 1.5)));
  --bh: max(100cqh, calc(100cqw / var(--ar, 1.5)));
  position: absolute; z-index: 1; pointer-events: none;
  width: var(--bw); height: var(--bh);
  left: calc((100cqw - var(--bw)) * var(--fx, .5));
  top: calc((100cqh - var(--bh)) * var(--fy, .5));
}
.hero-light {
  position: absolute; left: calc(var(--x) * 100%); top: calc(var(--y) * 100%);
  width: calc(var(--r) * 100%); aspect-ratio: 1; border-radius: 50%; transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(255, 214, 140, .95), rgba(255, 176, 86, .5) 45%, rgba(255, 150, 60, 0));
  mix-blend-mode: screen; opacity: .3;
}
.hero-lights.is-primed .hero-light { opacity: 0; }
.hero-lights.is-pulsing .hero-light { animation: window-glow 1800ms ease-in-out 400ms both; }
@keyframes window-glow { 0% { opacity: 0; } 45% { opacity: 1; } 100% { opacity: .3; } }
@supports not (width: 1cqw) { .hero-lights { display: none; } }

/* Game night sheet + story */
.game-intro { padding-block: clamp(44px, 6vw, 80px) 8px; }
.game-intro-grid { display: grid; gap: 40px clamp(32px, 5vw, 80px); align-items: start; }
@media (min-width: 900px) { .game-intro-grid { grid-template-columns: minmax(300px, 410px) minmax(0, 1fr); } }
.night-sheet {
  position: relative; padding: 30px 26px 14px; margin-top: 10px;
  background: var(--c-surface); border: 1px solid var(--c-line); border-radius: 4px 4px 16px 4px;
  box-shadow: 0 22px 44px -32px rgba(0, 0, 0, .65); transform: rotate(-.5deg);
}
.night-sheet h2 { font-size: clamp(1.6rem, 2.6vw, 2rem); margin-bottom: .4em; }
.night-list { margin: 0; }
.night-list div { display: grid; grid-template-columns: minmax(6.5em, 34%) minmax(0, 1fr); gap: 4px 14px; padding: 11px 0; border-top: 1px dashed var(--c-line); }
.night-list dt { font-size: .76rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; color: var(--c-muted); padding-top: .3em; }
.night-list dd { margin: 0; font-family: var(--serif); font-weight: 560; font-size: 1.1rem; line-height: 1.35; overflow-wrap: anywhere; }
@media (max-width: 380px) { .night-list div { grid-template-columns: 1fr; } }
.case-label {
  position: absolute; top: -15px; right: 16px; margin: 0; padding: 7px 10px 6px; border-radius: 4px;
  border: 2px solid currentColor; background: var(--c-surface); color: var(--c-accent);
  font: 700 .86rem/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; white-space: nowrap;
  max-width: calc(100% - 32px); overflow: hidden; text-overflow: ellipsis;
  transform: rotate(3deg);
}
.case-label[data-enter="ready"] { opacity: 0; transform: translateY(-10px) rotate(10deg) scale(1.4); }
.case-label[data-enter="in"] { animation: label-settle 650ms cubic-bezier(.2, .8, .25, 1.1) both; }
@keyframes label-settle {
  0% { opacity: 0; transform: translateY(-10px) rotate(10deg) scale(1.4); }
  60% { opacity: 1; transform: translateY(0) rotate(2deg) scale(.97); }
  100% { opacity: 1; transform: rotate(3deg) scale(1); }
}
.game-story { font-size: 1.08rem; }
.game-story p:first-child { font-family: var(--serif); font-size: clamp(1.25rem, 1.8vw, 1.45rem); line-height: 1.45; }

.game-more { display: grid; gap: 4px; padding-top: 24px; }
.game-more .game-section { margin-top: 12px; }
.game-more .box-list {
  display: grid; gap: 12px 40px; align-items: center; margin-top: 28px; max-width: 980px;
  padding: clamp(20px, 3vw, 32px); background: var(--c-surface); border: 1px solid var(--c-line); border-radius: 16px;
}
.game-more .box-list ul { columns: 1; padding-left: 1.2em; }
.box-art { margin: 0; justify-self: center; width: min(260px, 70vw); text-align: right; }
.box-art img { display: block; width: 100%; height: auto; transform: rotate(2deg); }
.box-art figcaption { margin-top: 6px; }
@media (min-width: 760px) { .game-more .box-list { grid-template-columns: minmax(0, 1fr) 240px; } }

/* Case material */
.case-material { padding-block: clamp(48px, 7vw, 88px) 8px; }
.case-material h2 { margin-bottom: .25em; }
.case-material-note { max-width: 60ch; }
.cm-grid { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: clamp(18px, 2.6vw, 32px); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cm-grid > li:first-child { grid-column: 1 / -1; }
.cm-grid { max-width: 1120px; }
@media (max-width: 699px) { .cm-grid { grid-template-columns: minmax(0, 1fr); } }
.cm-item figure { margin: 0; }
.cm-open {
  position: relative; display: block; padding: 8px; border-radius: 6px; background: var(--paper-print);
  box-shadow: var(--shadow-print); cursor: zoom-in;
}
.cm-open img { display: block; width: 100%; height: auto; border-radius: 2px; background: var(--c-surface); }
.cm-zoom {
  position: absolute; right: 18px; bottom: 18px; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%;
  background: rgba(14, 22, 32, .78); color: #F4F7FA; transition: transform 200ms var(--ease);
}
@media (hover: hover) { .cm-open:hover .cm-zoom { transform: scale(1.1); } }
.cm-item figcaption { margin-top: 12px; color: var(--c-muted); font-size: .96rem; max-width: 70ch; }
.cm-item:nth-child(2) .cm-open { transform: rotate(-.6deg); }
.cm-item:nth-child(3) .cm-open { transform: rotate(.5deg); }

/* Lightbox (native modal <dialog>: focus stays inside, Esc closes) */
html.lb-locked { overflow: hidden; }
.lightbox { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: transparent; color: #F4F7FA; overflow: hidden; }
.lightbox::backdrop { background: rgba(8, 12, 18, .93); }
.lightbox[open] { display: block; animation: lb-in 200ms var(--ease); }
@keyframes lb-in { from { opacity: 0; } to { opacity: 1; } }
.lb-frame { position: relative; width: 100%; height: 100%; display: grid; place-items: center; padding: 68px 84px 24px; }
.lb-figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 12px; max-width: min(1200px, 100%); max-height: 100%; }
.lb-figure img { display: block; max-width: 100%; max-height: calc(100vh - 170px); max-height: calc(100dvh - 170px); width: auto; height: auto; object-fit: contain; border-radius: 4px; background: #1B2736; }
.lb-figure figcaption { text-align: center; max-width: 70ch; font-size: .98rem; line-height: 1.45; }
.lb-count { display: inline-block; margin-left: 8px; font: 600 .82rem var(--mono); letter-spacing: .08em; opacity: .8; white-space: nowrap; }
.lightbox .concept-tag { background: rgba(244, 247, 250, .14); }
.lb-btn {
  position: absolute; display: grid; place-items: center; width: 52px; height: 52px; padding: 0; border-radius: 50%;
  border: 1.5px solid rgba(244, 247, 250, .4); background: rgba(20, 28, 40, .78); color: #F4F7FA; cursor: pointer;
  transition: background-color 160ms var(--ease), transform 160ms var(--ease);
}
.lb-btn:hover { background: rgba(48, 60, 80, .9); }
.lb-btn:focus-visible { outline: 3px solid #F4C27A; outline-offset: 3px; }
.lb-close { top: max(12px, env(safe-area-inset-top)); right: max(12px, env(safe-area-inset-right)); }
.lb-prev { left: max(14px, env(safe-area-inset-left)); top: 50%; transform: translateY(-50%); }
.lb-next { right: max(14px, env(safe-area-inset-right)); top: 50%; transform: translateY(-50%); }
@media (max-width: 699px) {
  .lb-frame { padding: 68px 10px 100px; }
  .lb-figure img { max-height: calc(100vh - 230px); max-height: calc(100dvh - 230px); }
  .lb-prev, .lb-next { top: auto; bottom: max(24px, env(safe-area-inset-bottom)); transform: none; }
  .lb-prev { left: calc(50% - 68px); }
  .lb-next { right: calc(50% - 68px); }
}

/* Repeat of the main action after the long content */
.get-it-band { padding-block: clamp(48px, 7vw, 88px) clamp(24px, 4vw, 40px); }
.get-card {
  display: grid; gap: 8px clamp(24px, 4vw, 56px); align-items: center; max-width: 1080px;
  padding: clamp(22px, 3.4vw, 40px); background: var(--c-surface); border: 1px solid var(--c-line); border-radius: 18px;
}
.get-card-copy p { max-width: 58ch; margin-bottom: 0; }
.get-card .wish { margin: 8px 0 0; }
@media (min-width: 900px) { .get-card { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); } .get-card .wish { margin: 0; } }

/* ================================================================ wishlist page */
.wish-head .notice { margin-top: 4px; }
.wishlist-page .wish-list { gap: 14px; max-width: 920px; }
.wishlist-page .wish-item { grid-template-columns: 120px minmax(0, 1fr) auto; gap: 18px; padding: 14px 16px 14px 14px; }
.wishlist-page .wish-thumb { width: 120px; aspect-ratio: 3 / 2; border-radius: 6px; box-shadow: 0 8px 18px -12px rgba(20, 22, 36, .5); }
.wish-thumb-empty { display: grid; place-items: center; background: var(--line); }
.wish-thumb .wish-thumb-mark { width: 52px; height: auto; object-fit: contain; opacity: .45; transform: rotate(-18deg); }
.wish-title { font-size: 1.35rem; margin: 0 0 6px; overflow-wrap: anywhere; }
.wish-title a { text-decoration: none; }
.wish-title a:hover { text-decoration: underline; }
.wish-item .chip { margin: 0 0 4px; }
.wish-remove { display: grid; justify-items: end; gap: 4px; }
.wish-remove .wish-error { max-width: 30ch; text-align: right; font-size: .92rem; margin: 0; }
@media (max-width: 560px) {
  .wishlist-page .wish-item { grid-template-columns: 80px minmax(0, 1fr); gap: 12px 14px; padding: 12px; }
  .wishlist-page .wish-thumb { width: 80px; }
  .wish-title { font-size: 1.2rem; }
  .wish-remove { grid-column: 1 / -1; justify-items: stretch; }
  .wish-remove .btn { width: 100%; }
  .wish-remove .wish-error { max-width: none; text-align: left; }
}
.wish-empty { padding: 8px 0 20px; gap: 12px 40px; }
.wish-empty .empty-art { width: min(240px, 56vw); }
.wish-empty-copy { flex: 1 1 260px; min-width: 0; }
.wish-empty-copy p { max-width: 44ch; }
.wish-empty h2:focus { outline: none; }
.wish-empty h2:focus-visible { outline: 3px solid var(--terra); outline-offset: 4px; }

/* ================================================================ about */
.about-hero { background: linear-gradient(var(--paper), var(--page)); padding-block: clamp(20px, 4vw, 56px) clamp(32px, 5vw, 64px); overflow: hidden; }
.page-about .breadcrumbs { background: var(--paper); margin: 0; max-width: none; }
.page-about .breadcrumbs ol { max-width: calc(1280px - 2 * var(--gutter)); margin-inline: auto; padding-top: 8px; }
.about-hero-grid { display: grid; gap: 24px 64px; align-items: center; }
.about-hero-copy h1 { font-size: clamp(2.6rem, 5.6vw, 4.8rem); max-width: 12ch; }
.about-hero-copy .lede { max-width: 36ch; margin-bottom: .9em; }
.about-hero-copy p:last-child { max-width: 52ch; }
.about-hero-art { position: relative; width: min(400px, 76vw); justify-self: center; }
.about-arch { display: block; width: 100%; height: auto; }
.about-hero-art .about-mascot { position: absolute; left: auto; right: -2%; bottom: -1%; width: 27%; }
.about-mascot img { display: block; width: 100%; height: auto; }
@media (min-width: 900px) { .about-hero-grid { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); } }

.about-table { padding-block: clamp(48px, 7vw, 96px); }
.about-table-grid { display: grid; gap: 32px 64px; align-items: center; }
.about-table-copy h2 { max-width: 20ch; }
.about-table-copy p { max-width: 54ch; }
@media (min-width: 900px) { .about-table-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); } }
.about-print { position: relative; margin: 0; padding-top: 44px; }
.about-print-paper { display: block; padding: 10px 10px 12px; border-radius: 4px; background: var(--paper-print); box-shadow: var(--shadow-print); transform: rotate(-1.6deg); }
.about-print-paper img { display: block; width: 100%; height: auto; border-radius: 2px; }
.about-print figcaption { margin-top: 14px; color: var(--muted); font-size: .92rem; }
.about-lamp { position: absolute; z-index: 2; top: -20px; left: 9%; width: clamp(64px, 9vw, 112px); transform-origin: 50% 0; }
.about-lamp img { display: block; width: 100%; height: auto; }
.about-print[data-enter="ready"] .about-print-paper { opacity: 0; transform: translateY(22px) rotate(-5deg); }
.about-print[data-enter="ready"] .about-lamp { transform: rotate(10deg); }
.about-print[data-enter="in"] .about-print-paper { animation: print-settle 900ms var(--ease) both; }
.about-print[data-enter="in"] .about-lamp { animation: lamp-swing 1700ms cubic-bezier(.3, .6, .3, 1) 150ms both; }
@keyframes print-settle { from { opacity: 0; transform: translateY(22px) rotate(-5deg); } to { opacity: 1; transform: rotate(-1.6deg); } }
@keyframes lamp-swing { 0% { transform: rotate(10deg); } 32% { transform: rotate(-5deg); } 60% { transform: rotate(2.5deg); } 82% { transform: rotate(-.8deg); } 100% { transform: rotate(0); } }

.about-notes { background: var(--paper); padding-block: clamp(48px, 7vw, 88px); }
.note-cards { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.note-card {
  position: relative; padding: 26px 22px 12px; background: var(--page); border: 1px solid var(--line);
  border-radius: 4px 4px 14px 4px; box-shadow: 0 16px 32px -28px rgba(37, 40, 61, .55);
}
.note-card::before { content: ""; position: absolute; top: 10px; left: 50%; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: var(--terra); box-shadow: 0 2px 3px rgba(37, 40, 61, .3); }
.note-card:nth-child(1) { transform: rotate(-.7deg); }
.note-card:nth-child(2) { transform: rotate(.5deg); }
.note-card:nth-child(3) { transform: rotate(-.3deg); }
.note-card h3 { font-size: 1.3rem; margin: 6px 0 .35em; }
.note-card p { color: var(--muted); }

.about-next { padding-block: clamp(48px, 7vw, 96px); }
.about-next-grid { display: grid; gap: 32px 64px; align-items: center; }
@media (min-width: 900px) { .about-next-grid { grid-template-columns: minmax(0, 420px) minmax(0, 1fr); } }
.about-next-copy h2 { max-width: 18ch; }
.about-next-copy p { max-width: 54ch; }
.about-next-copy .btn { margin-right: 12px; }
.about-contact-title { margin-top: 1.4em; }
.about-case {
  display: block; padding: 12px 12px 18px; border-radius: 16px; text-decoration: none;
  background: var(--t-bg); color: var(--t-ink); border: 1px solid var(--t-line);
  box-shadow: 0 22px 44px -34px rgba(20, 22, 36, .7); transition: transform 220ms var(--ease);
}
.about-case:focus-visible { outline-offset: 4px; }
.about-case-art { display: block; aspect-ratio: 3 / 2; overflow: hidden; border-radius: 8px; }
.about-case-art img { display: block; width: 100%; height: 100%; object-fit: cover; }
.about-case-copy { display: grid; gap: 2px; padding: 14px 8px 0; }
.about-case-tag { font-family: var(--serif); font-style: italic; color: var(--t-accent); }
.about-case-title { font: 650 clamp(1.7rem, 3vw, 2.2rem)/1.1 var(--serif); letter-spacing: -.012em; }
.about-case-cta { display: inline-flex; align-items: center; gap: 8px; margin-top: 8px; font-weight: 700; }
.about-case-cta .arrow { transition: transform 200ms var(--ease); }
@media (hover: hover) {
  .about-case:hover { transform: translateY(-3px) rotate(-.4deg); }
  .about-case:hover .arrow { transform: translateX(4px); }
}

/* ================================================================ legal pages + contact */
.page-legal main .legal { max-width: 1280px; padding-top: 12px; }
.legal-head { margin-bottom: 20px; padding-bottom: 14px; border-bottom: 1px solid var(--line); max-width: 68ch; }
.legal-head h1 { margin-bottom: .25em; }
.legal-kicker { margin: 0 0 .3em; color: var(--terra-text); font-family: var(--serif); font-style: italic; }
.legal-meta { margin: 0; color: var(--muted); font: .88rem/1.5 var(--mono); }
.legal-meta-label { margin-right: 6px; font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; }
.legal-body { max-width: 68ch; }
.legal-body h2, .legal h2[id], .legal section[id] { scroll-margin-top: 16px; }
.legal-body h2 { font-size: clamp(1.45rem, 2.4vw, 1.85rem); margin-top: 1.5em; }
.legal-body > :first-child { margin-top: 0; }
.legal-body .table-scroll { max-width: none; width: max(100%, min(100vw - 2 * var(--gutter) - 24px, 1040px - 2 * var(--gutter))); }
.legal .table-scroll table { min-width: 680px; }

.toc { max-width: 68ch; margin: 0 0 26px; padding: 14px 20px 8px; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; }
.toc-title { margin: 0 0 4px; font: 700 .76rem/1.4 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.toc ol { margin: 0; padding-left: 1.4em; columns: 2 230px; column-gap: 32px; }
.toc li { break-inside: avoid; }
.toc a { display: inline-block; padding: 5px 0; }

.review-note { max-width: 68ch; margin: 0 0 24px; padding: 0 14px; border: 1px dashed #B98A00; border-radius: 10px; background: #FFFBEA; font-size: .92rem; }
.review-note summary { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-height: 44px; padding: 8px 0; cursor: pointer; }
.review-note-tag { padding: 2px 6px; border-radius: 4px; background: #6B5000; color: #FFF8DF; font: 700 .68rem/1.4 var(--mono); letter-spacing: .12em; text-transform: uppercase; }
.review-note-hint { color: var(--muted); }
.review-note[open] { padding-bottom: 10px; }
.review-note ul { margin: 4px 0 0; }

/* Cookies: live state for this browser */
.cookie-panel { max-width: 68ch; margin: 22px 0 32px; padding: 20px 22px 10px; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; }
.cookie-panel h2 { font-size: clamp(1.35rem, 2.2vw, 1.65rem); }
.cookie-state { margin: 0 0 16px; }
.cookie-state > div { padding: 12px 0; border-top: 1px solid var(--line); }
.cookie-state dt { font-weight: 700; }
.cookie-state dt code { margin-left: 4px; font-size: .84em; font-weight: 500; overflow-wrap: anywhere; }
.cookie-state dd { margin: 4px 0 0; }
.state-dot { display: inline-block; width: 11px; height: 11px; margin-right: 8px; border-radius: 50%; vertical-align: -1px; }
.state-on { background: #2F7A52; }
.state-off { border: 2px solid var(--muted); }
.state-stale { background: #B98A00; }
.cookie-panel .notice { display: block; margin-bottom: 12px; }
.legal section#list h2 { font-size: clamp(1.45rem, 2.4vw, 1.85rem); }

/* Contact */
.contact-pick { max-width: 940px; margin-bottom: 36px; }
.contact-pick > p { max-width: 62ch; }
.mailboxes { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.mailbox { min-width: 0; padding: 20px 20px 6px; background: var(--paper); border: 1px solid var(--line); border-top: 4px solid var(--terra); border-radius: 10px 10px 14px 14px; }
.mailbox-support { border-top-color: #7FB596; }
.mailbox h3 { margin-bottom: .25em; font-size: 1.3rem; }
.mailbox-hint { color: var(--muted); font-size: .96rem; }
.mailbox-address { margin-bottom: 12px; font-weight: 700; font-size: 1.08rem; overflow-wrap: anywhere; }
.mailbox-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 4px; }
.copy-status { min-height: 1.6em; margin: 0 0 8px; color: #2F6B4F; font-size: .9rem; }
.copy-status.is-error { color: #9B2C1A; }
.contact-pending { max-width: 62ch; padding: 14px 18px; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; }
.contact-follow-title { margin-top: 1.4em; font-size: 1.2rem; }

/* ================================================================ 404 and messages */
.lost { display: grid; justify-items: center; text-align: center; padding-block: clamp(32px, 7vw, 88px) 0; }
.lost h1 { max-width: 18ch; font-size: clamp(2.2rem, 5vw, 3.6rem); }
.lost .lede { max-width: 42ch; margin-inline: auto; }
.lost-code { margin: 0 0 6px; color: var(--muted); font: 700 .8rem/1.4 var(--mono); letter-spacing: .16em; text-transform: uppercase; }
.lost-trail { position: relative; width: min(340px, 80vw); height: 96px; margin-bottom: 12px; border-bottom: 2px dashed var(--line); }
.lost-print { position: absolute; left: 50%; bottom: 20px; width: 76px; transform: translateX(-50%) rotate(-16deg); }
.lost-print img { display: block; width: 100%; height: auto; opacity: .85; }
.lost-print[data-enter="ready"] { opacity: 0; transform: translateX(-50%) rotate(-16deg) scale(.6); }
.lost-print[data-enter="in"] { animation: print-in 650ms cubic-bezier(.2, .8, .25, 1.15) both; }
@keyframes print-in { from { opacity: 0; transform: translateX(-50%) rotate(-16deg) scale(.6); } to { opacity: 1; transform: translateX(-50%) rotate(-16deg) scale(1); } }
.lost-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }

/* ---------- CRATE 17 as a case file (lead pass) ---------- */
.case-brief { position: relative; background: #F4EBD8; color: #2A2A35; border-radius: 3px; padding: 34px clamp(20px, 3vw, 40px) 30px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, .25), 0 26px 40px -28px rgba(0, 0, 0, .8); transform: rotate(.6deg);
  background-image: repeating-linear-gradient(to bottom, transparent 0 31px, rgba(42, 42, 53, .07) 31px 32px), var(--tape-grain); }
.case-brief .brief-head { display: flex; justify-content: space-between; gap: 12px; margin: 0 0 16px; padding-bottom: 10px; border-bottom: 1.5px dashed rgba(42, 42, 53, .4);
  font: 800 .78rem/1 var(--mono); letter-spacing: .22em; text-transform: uppercase; color: #6B3A2C; }
.case-brief .brief-body p { color: #2A2A35; }
.case-brief .brief-body p:first-child { font-family: var(--serif); font-size: clamp(1.25rem, 1.9vw, 1.55rem); line-height: 1.35; }
.brief-clip { position: absolute; top: -14px; left: 34px; width: 22px; height: 52px; border: 3px solid #9AA4AE; border-radius: 11px; border-bottom-color: transparent; transform: rotate(-6deg); }
.brief-stamp { position: absolute; right: -10px; bottom: -26px; width: 96px; transform: rotate(8deg); opacity: .95; }
.brief-stamp img { display: block; width: 100%; height: auto; }
@media (prefers-reduced-motion: no-preference) {
  .case-brief[data-reveal]:not(.is-in) { transform: rotate(-2.5deg) translateY(18px); opacity: 0; }
  .case-brief.is-in { transition: transform 600ms cubic-bezier(.3, .7, .3, 1), opacity 400ms ease; }
  .case-brief[data-reveal]:not(.is-in) .brief-stamp { transform: rotate(8deg) scale(1.4); opacity: 0; }
  .case-brief.is-in .brief-stamp { transition: transform 260ms cubic-bezier(.4, 1.6, .5, 1) 650ms, opacity 200ms 650ms; }
}
.case-steps { padding-block: clamp(40px, 6vw, 80px); }
.case-steps h2 { margin-bottom: 24px; }
.case-steps-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 22px; }
.case-step { display: grid; grid-template-columns: 34% 1fr; gap: 4px 16px; align-items: center; }
.case-step-art { grid-row: span 3; }
.case-step-art img { display: block; width: 100%; height: auto; filter: drop-shadow(0 14px 14px rgba(0, 0, 0, .4)); transition: transform 260ms cubic-bezier(.3, 1.3, .5, 1); }
.case-step-num { margin: 0; font: 800 .78rem/1 var(--mono); letter-spacing: .2em; color: var(--t-accent, #A9D0EA); }
.case-step h3 { margin: 0; font-size: clamp(1.3rem, 2vw, 1.6rem); }
.case-step p:last-child { margin: 0; color: var(--c-muted); }
@media (min-width: 760px) {
  .case-steps-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 34px; }
  .case-step { grid-template-columns: 1fr; }
  .case-step-art { grid-row: auto; max-width: 220px; margin-bottom: 10px; }
  .case-step-1 .case-step-art { transform: rotate(-3deg); } .case-step-2 .case-step-art { transform: rotate(2.5deg); } .case-step-3 .case-step-art { transform: rotate(-1.5deg); }
  .case-step:hover .case-step-art img { transform: translateY(-8px) rotate(-3deg); }
}
@media (prefers-reduced-motion: no-preference) {
  .case-steps[data-reveal]:not(.is-in) .case-step-art img { opacity: 0; transform: translateY(-20px) rotate(-6deg); }
  .case-steps.is-in .case-step-art img { animation: settle 560ms cubic-bezier(.3, .7, .3, 1) both; }
  .case-steps.is-in .case-step-2 .case-step-art img { animation-delay: 150ms; }
  .case-steps.is-in .case-step-3 .case-step-art img { animation-delay: 300ms; }
}
.note-cards { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); margin-bottom: 28px; }
.note-card { background: var(--c-surface); border: 1px solid var(--c-line); border-radius: 12px; padding: 22px 24px; position: relative; transition: transform 240ms var(--ease), box-shadow 240ms var(--ease); }
.note-card::before { content: ""; position: absolute; top: -9px; left: 22px; width: 64px; height: 18px; background: color-mix(in srgb, #E9BE79 80%, transparent); transform: rotate(-4deg); border-radius: 2px; }
.note-card-2::before { left: auto; right: 28px; transform: rotate(3deg); }
.note-card h2 { font-size: clamp(1.4rem, 2.2vw, 1.8rem); margin-top: 6px; }
.note-card p:last-child { margin-bottom: 0; }
@media (hover: hover) { .note-card:hover { transform: translateY(-3px) rotate(-.3deg); box-shadow: 0 22px 34px -26px rgba(0, 0, 0, .7); } }

.note-card p { color: var(--c-ink); opacity: .88; }

/* ---------- Player area (case portal, hints, archives) ---------- */
.page-play { --term: #0f1a17; --term-ink: #d8efe4; --term-dim: #8fb3a3; --term-glow: #6ee0b0; }
.play-bar { background: var(--term); color: var(--term-ink); border-bottom: 1px solid rgba(110,224,176,.25); }
.play-bar-inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; padding-block: 10px; }
.play-id { margin: 0; font-family: ui-monospace, "Cascadia Mono", Menlo, monospace; font-size: .82rem; letter-spacing: .04em; color: var(--term-dim); }
.play-id-mark { color: var(--term-glow); font-weight: 700; margin-right: 4px; }
.play-nav { display: flex; flex-wrap: wrap; gap: 4px; }
.play-nav a { color: var(--term-ink); text-decoration: none; font-size: .9rem; padding: 6px 12px; border-radius: 999px; border: 1px solid transparent; transition: background .2s, border-color .2s; }
.play-nav a:hover { border-color: rgba(110,224,176,.45); }
.play-nav a[aria-current="page"] { background: rgba(110,224,176,.14); border-color: rgba(110,224,176,.55); color: #fff; }
.play-page { padding-block: clamp(32px, 6vw, 72px); max-width: 860px; }
.play-kicker { font-family: ui-monospace, "Cascadia Mono", Menlo, monospace; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted, #6b6b6b); margin: 0 0 8px; }
.play-kicker a { color: inherit; }
.play-intro { margin-bottom: 8px; }
.play-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin: 28px 0; }
.play-tile { display: grid; gap: 6px; padding: 22px 20px; border-radius: 14px; background: var(--term); color: var(--term-ink); text-decoration: none; border: 1px solid rgba(110,224,176,.2); box-shadow: 0 10px 30px -18px rgba(0,0,0,.5); transition: transform .25s cubic-bezier(.2,.8,.2,1), box-shadow .25s, border-color .25s; }
.play-tile:hover, .play-tile:focus-visible { transform: translateY(-3px); border-color: rgba(110,224,176,.6); box-shadow: 0 18px 40px -18px rgba(0,0,0,.6), 0 0 0 1px rgba(110,224,176,.25); }
.play-tile-k { font-family: ui-monospace, Menlo, monospace; color: var(--term-glow); font-size: .85rem; }
.play-tile-t { font-family: var(--serif, Georgia, serif); font-size: 1.45rem; color: #fff; }
.play-tile-d { color: var(--term-dim); font-size: .92rem; }
.play-foot { color: var(--muted, #6b6b6b); }
.play-empty { padding: 22px; border: 1.5px dashed currentColor; border-radius: 12px; opacity: .75; }
.hint-topics { list-style: none; padding: 0; margin: 24px 0; display: grid; gap: 10px; }
.hint-topics a { display: grid; grid-template-columns: auto 1fr auto; column-gap: 16px; align-items: center; padding: 16px 18px; border-radius: 12px; border: 1px solid rgba(0,0,0,.12); background: rgba(255,255,255,.6); color: inherit; text-decoration: none; transition: border-color .2s, transform .2s; }
.hint-topics a:hover, .hint-topics a:focus-visible { border-color: currentColor; transform: translateX(3px); }
.ht-num { grid-row: span 2; font-family: ui-monospace, Menlo, monospace; opacity: .6; }
.ht-title { font-weight: 650; font-size: 1.08rem; }
.ht-q { grid-column: 2; opacity: .75; font-size: .95rem; }
.ht-arrow { grid-row: 1 / span 2; grid-column: 3; transition: transform .2s; }
.hint-topics a:hover .ht-arrow { transform: translateX(4px); }
.hint-steps { display: grid; gap: 10px; margin-top: 22px; }
.hint-step { border-radius: 12px; border: 1px solid rgba(0,0,0,.14); background: rgba(255,255,255,.65); overflow: hidden; transition: opacity .2s; }
.hint-step summary { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; cursor: pointer; list-style: none; font-weight: 600; }
.hint-step summary::-webkit-details-marker { display: none; }
.hs-cta { font-size: .85rem; padding: 4px 12px; border-radius: 999px; border: 1px solid currentColor; }
.hint-step[open] .hs-cta { visibility: hidden; }
.hint-step.is-locked { opacity: .45; }
.hint-step.is-locked summary { cursor: not-allowed; }
.hint-body { padding: 0 18px 16px; animation: hint-in .35s ease-out both; }
.hint-answer { border-color: #b0453a; }
.hint-answer summary { color: #8a2f26; }
@keyframes hint-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.rec-list { list-style: none; padding: 0; margin: 24px 0; display: grid; gap: 22px; }
.rec { padding: 18px; border-radius: 14px; background: var(--term); color: var(--term-ink); }
.rec h2 { color: #fff; margin: 2px 0 4px; font-size: 1.25rem; }
.rec-id { margin: 0; font-family: ui-monospace, Menlo, monospace; color: var(--term-glow); font-size: .8rem; letter-spacing: .1em; }
.rec-cap { margin: 0 0 12px; color: var(--term-dim); }
.rec video { width: 100%; border-radius: 8px; background: #000; display: block; }
.rec audio { width: 100%; display: block; }
@media (prefers-reduced-motion: reduce) { .play-tile, .hint-topics a, .hint-body { transition: none; animation: none; } }
.play-entry { margin: 18px 0 0; padding-top: 14px; border-top: 1px dashed rgba(0,0,0,.18); font-size: .95rem; }
.play-entry span:first-child { font-weight: 650; margin-right: 4px; }
.play-entry-note { opacity: .65; }
.play-terminal { position: relative; display: grid; gap: 6px; margin: 28px 0 0; padding: 26px 24px; border-radius: 16px; text-decoration: none; color: var(--term-ink); background: radial-gradient(120% 140% at 0% 0%, #1b3a2e 0%, var(--term) 60%); border: 1px solid rgba(110,224,176,.45); box-shadow: 0 18px 44px -20px rgba(0,0,0,.6), inset 0 0 40px rgba(110,224,176,.08); transition: transform .25s cubic-bezier(.2,.8,.2,1), box-shadow .25s; }
.play-terminal:hover, .play-terminal:focus-visible { transform: translateY(-3px); box-shadow: 0 24px 50px -20px rgba(0,0,0,.7), 0 0 0 1px rgba(110,224,176,.5), inset 0 0 50px rgba(110,224,176,.14); }
.play-terminal .play-tile-t { font-size: clamp(1.5rem, 3vw, 2rem); }
.play-terminal-go { position: absolute; right: 22px; bottom: 20px; font-family: ui-monospace, Menlo, monospace; color: var(--term-glow); }
@media (max-width: 560px) { .play-terminal-go { position: static; } }
