/* ══ JIBBICK ════════════════════════════════════════════════════════════
   One stylesheet for every page. Tokens first; everything below reads them.
   Paper and ink by day, night blue where the art is dark, rust for the one
   thing on a screen that wants pressing.
   ══════════════════════════════════════════════════════════════════════ */

:root {
  /* paper */
  --paper: #f3ebdd;
  --paper-2: #e9dcc6;
  --paper-edge: #d8c7aa;
  /* ink */
  --ink: #1b1916;
  --ink-2: #3f3832;
  --ink-3: #6b6156;
  /* night */
  --night: #11151f;
  --night-2: #1b2230;
  --night-3: #2a3446;
  --night-text: #ece4d4;
  --night-dim: #a59c8c;
  /* the one warm thing */
  --rust: #b0451f;
  --rust-deep: #8f3616;
  --on-rust: #fff7ec;
  /* the eyes */
  --eye: #fbf3e4;

  /* type */
  --display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --sans: "Instrument Sans", "Segoe UI", system-ui, sans-serif;
  --hand: "Caveat", "Bradley Hand", "Segoe Print", cursive;

  --t-xs: .72rem;
  --t-s: .875rem;
  --t-m: 1rem;
  --t-l: 1.15rem;
  --t-xl: clamp(2rem, 7vw, 3rem);
  --t-xxl: clamp(2.7rem, 11vw, 5.4rem);

  /* space and shape */
  --pad: clamp(1.25rem, 5vw, 2.5rem);
  --gap: 1rem;
  --radius: 14px;
  --pill: 999px;
  --tap: 44px;
  --max: 72rem;
  --header-h: 64px;

  /* art slot dusk (until the paintings land) */
  --dusk-1: #1b2233;
  --dusk-2: #4a3b52;
  --dusk-3: #b0643a;
  --dusk-4: #e7b16a;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }  /* the attribute always wins over a layout rule */
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 1rem); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 var(--t-m)/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
}
body.night { background: var(--night); color: var(--night-text); }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--rust); outline-offset: 3px; border-radius: 4px; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.vh:focus { position: fixed !important; top: .5rem; left: .5rem; z-index: 50; width: auto; height: auto; clip: auto; padding: .75rem 1rem; background: var(--ink); color: var(--paper); border-radius: 8px; }

/* ── type ─────────────────────────────────────────────────────────────── */
.display, h1, h2, h3 {
  font-family: var(--display);
  font-weight: 560;
  font-variation-settings: "SOFT" 60, "WONK" 1, "opsz" 96;
  letter-spacing: -.015em;
  line-height: .98;
  margin: 0;
}
h1 { font-size: var(--t-xxl); }
h2 { font-size: var(--t-xl); line-height: 1.02; }
h3 { font-size: 1.45rem; line-height: 1.1; font-variation-settings: "SOFT" 60, "WONK" 1, "opsz" 36; }
p { margin: 0; }
.lede { font-size: var(--t-l); line-height: 1.5; color: var(--ink-2); max-width: 34ch; }
.night .lede, .on-night .lede { color: var(--night-dim); }
.eyebrow {
  font: 600 var(--t-xs)/1 var(--sans);
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.night .eyebrow, .on-night .eyebrow { color: var(--night-dim); }
.caps {
  font-family: var(--display);
  font-variation-settings: "SOFT" 30, "WONK" 0, "opsz" 72;
  font-weight: 520;
  text-transform: uppercase;
  letter-spacing: .14em;
  line-height: 1.05;
}
.hand { font-family: var(--hand); font-size: 1.35rem; line-height: 1.1; color: var(--ink-2); }

/* ── buttons ──────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: .6em;
  min-height: var(--tap);
  padding: 0 1.35rem;
  border-radius: var(--pill);
  border: 1.5px solid transparent;
  font: 700 var(--t-xs)/1 var(--sans);
  letter-spacing: .16em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s, transform .15s;
}
.btn .arr { transition: transform .15s; }
.btn:hover .arr { transform: translateX(3px); }
.btn-rust { background: var(--rust); color: var(--on-rust); }
.btn-rust:hover { background: var(--rust-deep); }
.btn-line { border-color: var(--rust); color: var(--rust); background: transparent; }
.btn-line:hover { background: var(--rust); color: var(--on-rust); }
.on-night .btn-line, .night .btn-line { border-color: var(--night-text); color: var(--night-text); }
.on-night .btn-line:hover, .night .btn-line:hover { background: var(--night-text); color: var(--night); }
.circle-arrow {
  display: inline-grid; place-items: center;
  width: var(--tap); height: var(--tap); flex: none;
  border-radius: 50%; border: 1.5px solid currentColor;
}
@media (prefers-reduced-motion: reduce) { .btn, .btn .arr { transition: none; } .btn:hover .arr { transform: none; } }

/* ── header ───────────────────────────────────────────────────────────── */
.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: .75rem;
  height: var(--header-h);
  padding: 0 var(--pad);
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid color-mix(in srgb, var(--paper-edge) 60%, transparent);
}
.night .top { background: color-mix(in srgb, var(--night) 88%, transparent); border-bottom-color: var(--night-3); }
.back {
  display: grid; place-items: center;
  width: var(--tap); height: var(--tap); margin-left: -.75rem;
  color: inherit; text-decoration: none; font-size: 1.4rem;
}
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: inherit; min-height: var(--tap); }
.brand img { width: auto; height: 40px; }
.wordmark { font: 700 .95rem/1 var(--sans); letter-spacing: .42em; text-transform: uppercase; margin-right: -.42em; }
.top .spacer { flex: 1; }
.nav-inline { display: none; gap: 1.6rem; }
.nav-inline a {
  font: 600 var(--t-xs)/1 var(--sans); letter-spacing: .18em; text-transform: uppercase;
  text-decoration: none; border-bottom: 1.5px solid transparent;
  display: inline-flex; align-items: center; min-height: var(--tap);
}
.nav-inline a:hover, .nav-inline a[aria-current="page"] { border-bottom-color: var(--rust); }
.menu-btn {
  display: grid; place-items: center;
  width: var(--tap); height: var(--tap); margin-right: -.6rem;
  background: none; border: 0; color: inherit; cursor: pointer;
}
.menu-btn svg { width: 22px; height: 22px; }
.menu {
  position: fixed; inset: var(--header-h) 0 auto 0; z-index: 19;
  padding: 1rem var(--pad) 2rem;
  background: var(--paper);
  border-bottom: 1px solid var(--paper-edge);
  box-shadow: 0 24px 40px -24px rgba(27, 25, 22, .35);
}
.night .menu { background: var(--night-2); border-bottom-color: var(--night-3); }
.menu[hidden] { display: none; }
.menu a {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 56px;
  font: 560 1.6rem/1 var(--display);
  font-variation-settings: "SOFT" 60, "WONK" 1, "opsz" 48;
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--paper-edge) 70%, transparent);
}
.night .menu a { border-bottom-color: var(--night-3); }
.menu a::after { content: "→"; font: 400 1.1rem var(--sans); color: var(--rust); }
.menu .menu-door { margin-top: 1.25rem; border: 0; }
.menu .menu-door::after { content: none; }
@media (min-width: 960px) {
  .nav-inline { display: flex; }
  .menu-btn, .menu { display: none !important; }
}

/* ── art slots ────────────────────────────────────────────────────────────
   Where a painting will go. A dusk wash in the palette's own colours and a
   small label naming the slot and its size, so nobody mistakes it for art.  */
.art {
  position: relative; overflow: hidden;
  background:
    radial-gradient(120% 70% at 70% 30%, var(--dusk-4) 0%, transparent 45%),
    linear-gradient(180deg, var(--dusk-1) 0%, var(--dusk-2) 45%, var(--dusk-3) 82%, var(--dusk-4) 100%);
  color: var(--night-text);
}
.art.dark {
  background:
    radial-gradient(90% 60% at 60% 25%, var(--dusk-3) 0%, transparent 40%),
    linear-gradient(180deg, var(--night) 0%, var(--night-3) 55%, var(--dusk-2) 100%);
}
.art .slot {
  position: absolute; top: .75rem; right: .75rem;
  padding: .3rem .55rem; border-radius: 6px;
  background: rgba(17, 21, 31, .55);
  font: 600 .62rem/1.2 var(--sans); letter-spacing: .14em; text-transform: uppercase;
  color: var(--night-text);
}
.art picture, .art > img.painting { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* the torn bottom edge where art meets paper */
.torn { position: relative; }
.torn::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 34px;
  background: var(--paper);
  -webkit-mask: url("/assets/brand/torn-edge.svg") bottom / 100% 100% no-repeat;
          mask: url("/assets/brand/torn-edge.svg") bottom / 100% 100% no-repeat;
}
.torn.to-night::after { background: var(--night); }

/* ── layout ───────────────────────────────────────────────────────────── */
main { display: block; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }
.stack > * + * { margin-top: var(--gap); }
.section { padding-top: clamp(2.5rem, 8vw, 5rem); padding-bottom: clamp(2.5rem, 8vw, 5rem); }

/* ── art boxes: fixed aspects per breakpoint, so every painting has known crops ──
   home hero   phone 4:5 · tablet 16:10 · desktop (split) 4:5
   band        phone 1:1 · tablet 2:1   · desktop 3:1      (game heroes, studio)
   door        phone 5:4 · tablet 2:1   · desktop 3:1
   card        16:9 everywhere                                                     */
.hero-art { aspect-ratio: 4 / 5; max-height: 78svh; width: 100%; }
.band { aspect-ratio: 1 / 1; max-height: 70svh; width: 100%; }
.band.door { aspect-ratio: 5 / 4; }
.card-art { aspect-ratio: 16 / 9; width: 100%; border-radius: var(--radius); }
@media (min-width: 600px) {
  .hero-art { aspect-ratio: 16 / 10; }
  .band, .band.door { aspect-ratio: 2 / 1; }
}
@media (min-width: 960px) {
  .band, .band.door { aspect-ratio: 3 / 1; max-height: 64svh; }
}

/* ── home hero ────────────────────────────────────────────────────────── */
.hero-art .creature {
  position: absolute; left: 8%; bottom: 30px; width: clamp(150px, 42%, 260px); height: auto;
  filter: drop-shadow(0 10px 14px rgba(17, 21, 31, .35));
}
.hero-copy { padding-top: 1.25rem; padding-bottom: 2.5rem; position: relative; }
.hero-copy h1 { max-width: 9ch; }
.hero-copy .lede { margin-top: 1.25rem; }
.hero-copy .btn { margin-top: 1.75rem; }
.hero-copy .aside {
  display: block; margin-top: 1.75rem; margin-left: auto; width: max-content;
  transform: rotate(-6deg);
}
.hero-copy .aside::after { content: " ↗"; color: var(--rust); font-family: var(--sans); }
@media (min-width: 960px) {
  .hero { display: grid; grid-template-columns: 1.1fr 1fr; align-items: stretch; }
  .hero-art { aspect-ratio: 4 / 5; max-height: none; order: 2; }
  .hero-art.torn::after { display: none; }
  .hero-copy { order: 1; align-self: center; padding: 3rem var(--pad) 3rem max(var(--pad), calc((100vw - var(--max)) / 2 + var(--pad))); }
}

/* ── page head (inner pages) ──────────────────────────────────────────── */
.page-head { padding-top: clamp(1.75rem, 6vw, 3.5rem); padding-bottom: 1.5rem; }
.page-head h1 { font-size: clamp(2.4rem, 10vw, 4.6rem); max-width: 12ch; }
.page-head .lede { margin-top: 1rem; }
.page-head .eyebrow { display: block; margin-bottom: .9rem; }

/* game glyph (a typographic stand-in until the games' own marks land) */
.glyph {
  display: inline-grid; place-items: center;
  width: 52px; height: 52px; border-radius: 50%;
  border: 1.5px solid currentColor;
  font: 600 1.5rem/1 var(--display);
  font-variation-settings: "SOFT" 100, "WONK" 1, "opsz" 48;
}

/* section-to-come marker (Phase 1 shells only) */
.todo {
  margin-top: 1.5rem; padding: 1rem 1.1rem; border-radius: var(--radius);
  border: 1.5px dashed var(--paper-edge); color: var(--ink-3); font-size: var(--t-s);
}
.night .todo { border-color: var(--night-3); color: var(--night-dim); }

/* ── footer ───────────────────────────────────────────────────────────── */
.foot { padding: 3rem 0 2.5rem; border-top: 1px solid var(--paper-edge); margin-top: 2rem; }
.night .foot { border-top-color: var(--night-3); }
.foot .wrap { display: grid; gap: 1.25rem; }
.foot .brand img { height: 32px; }
.foot nav { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; }
.foot nav a { font-size: var(--t-s); text-decoration: none; min-height: var(--tap); display: inline-flex; align-items: center; }
.foot nav a:hover { text-decoration: underline; text-underline-offset: .2em; }
.foot small { color: var(--ink-3); font-size: var(--t-xs); letter-spacing: .06em; }
.night .foot small { color: var(--night-dim); }

/* ══ PHASE 2 ═════════════════════════════════════════════════════════════ */

/* section heads */
.sec-head { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.sec-head .eyebrow { display: block; margin-bottom: .6rem; }
.more {
  font: 700 var(--t-xs)/1 var(--sans); letter-spacing: .16em; text-transform: uppercase;
  color: var(--rust); text-decoration: none; white-space: nowrap;
  display: inline-flex; align-items: center; gap: .5em; min-height: var(--tap);
}
.more:hover .arr { transform: translateX(3px); }
.more .arr { transition: transform .15s; }

/* game cards: art with the name and one line set over its dark lower half */
.cards { display: grid; gap: 1rem; }
@media (min-width: 720px) { .cards { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1100px) { .cards { grid-template-columns: 1fr 1fr 1fr; } }
.game-card {
  position: relative; display: block; overflow: hidden;
  border-radius: var(--radius); color: var(--night-text); text-decoration: none;
  box-shadow: 0 18px 36px -24px rgba(17, 21, 31, .55);
  transition: transform .2s, box-shadow .2s;
}
a.game-card:hover { transform: translateY(-3px); box-shadow: 0 26px 44px -24px rgba(17, 21, 31, .6); }
.game-card .card-art { border-radius: 0; }
.game-card .card-text {
  position: absolute; inset: auto 0 0 0;
  display: flex; align-items: end; gap: 1rem;
  padding: 3.5rem 1.1rem 1.1rem;
  background: linear-gradient(180deg, transparent, rgba(17, 21, 31, .82) 55%);
}
.game-card .card-text > div { flex: 1; min-width: 0; }
.game-card .caps { font-size: clamp(1.15rem, 4.6vw, 1.45rem); display: block; }
.game-card p { margin-top: .35rem; font-size: var(--t-s); line-height: 1.4; color: var(--night-dim); max-width: 30ch; }
.game-card .circle-arrow { color: var(--night-text); }
.game-card .tag {
  display: inline-block; margin-left: .5rem; padding: .2rem .5rem; border-radius: var(--pill);
  border: 1px solid var(--night-dim); vertical-align: middle;
  font: 600 .6rem/1 var(--sans); letter-spacing: .14em; color: var(--night-dim);
}
.game-card .slot { top: .6rem; right: .6rem; }
@media (prefers-reduced-motion: reduce) { .game-card, .more .arr { transition: none; } a.game-card:hover { transform: none; } }

/* notes */
.notes { display: grid; gap: 2.5rem; }
.note { display: grid; gap: 1rem; }
.note figure { margin: 0; }
.note img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); background: var(--night); }
.note .meta { font: 600 var(--t-xs)/1.3 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); }
.note .meta b { color: var(--rust); font-weight: 700; }
.note h3 { margin-top: .5rem; }
.note p { margin-top: .6rem; color: var(--ink-2); max-width: 60ch; }
@media (min-width: 840px) {
  .note { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: center; gap: 2.25rem; }
  .notes.compact .note { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); }
}
.notes.compact { gap: 1.75rem; }
@media (min-width: 840px) { .notes.compact { grid-template-columns: 1fr 1fr; } .notes.compact .note { grid-template-columns: 1fr; } }

/* studio */
.studio-art .creature {
  position: absolute; left: 7%; bottom: 13%; width: 40%; max-width: 280px; height: auto;
  filter: drop-shadow(0 10px 14px rgba(17, 21, 31, .35));
}
@media (min-width: 960px) { .studio-art .creature { left: 26%; width: 15%; bottom: 12%; } }
.prose { display: grid; gap: 2.25rem; }
.prose section h2 { font-size: clamp(1.7rem, 6vw, 2.4rem); max-width: 16ch; }
.prose section p { margin-top: .8rem; color: var(--ink-2); max-width: 58ch; font-size: var(--t-l); line-height: 1.55; }
@media (min-width: 960px) { .prose { grid-template-columns: 1fr 1fr 1fr; gap: 2.5rem; } }

/* home: who's behind the eyes */
.behind {
  display: grid; gap: 1.25rem; align-items: center;
  padding: 1.75rem; border-radius: var(--radius); background: var(--night); color: var(--night-text);
}
.behind img { width: 120px; height: auto; }
.behind h2 { font-size: clamp(1.6rem, 6vw, 2.2rem); }
.behind p { margin-top: .6rem; color: var(--night-dim); max-width: 46ch; }
.behind .more { color: var(--night-text); }
@media (min-width: 720px) { .behind { grid-template-columns: auto 1fr auto; padding: 2rem 2.5rem; } }

/* ══ PHASE 3: game pages ═════════════════════════════════════════════════ */
.game-head .glyph { margin-bottom: 1rem; }
.game-head h1 { font-size: clamp(2rem, 9vw, 3.6rem); max-width: 14ch; }
.actions { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 1.5rem; }

/* the section index: a line, a dot on the section you're reading */
.index { margin: 2rem 0 0; padding: 0; list-style: none; border-left: 1.5px solid var(--paper-edge); }
.night .index { border-left-color: var(--night-3); }
.index a {
  position: relative; display: flex; align-items: center; min-height: var(--tap);
  padding-left: 1.25rem; text-decoration: none; color: var(--ink-3); font-size: var(--t-m);
}
.night .index a { color: var(--night-dim); }
.index a::before {
  content: ""; position: absolute; left: -5.75px; top: 50%; width: 10px; height: 10px; margin-top: -5px;
  border-radius: 50%; background: var(--rust); transform: scale(0); transition: transform .2s;
}
.index a[aria-current="true"] { color: var(--ink); font-weight: 600; }
.night .index a[aria-current="true"] { color: var(--night-text); }
.index a[aria-current="true"]::before { transform: scale(1); }
.index a:hover { color: var(--ink); }
.night .index a:hover { color: var(--night-text); }
@media (prefers-reduced-motion: reduce) { .index a::before { transition: none; } }

.game-body { padding-bottom: 3rem; }
.game-body > section { padding-top: clamp(2.5rem, 8vw, 4rem); scroll-margin-top: calc(var(--header-h) + 1rem); }
.game-body h2 { font-size: clamp(1.8rem, 7vw, 2.6rem); max-width: 18ch; }
.game-body .body-l { margin-top: 1rem; font-size: var(--t-l); line-height: 1.55; color: var(--ink-2); max-width: 58ch; }
.night .game-body .body-l { color: var(--night-dim); }
@media (min-width: 960px) {
  .game-layout { display: grid; grid-template-columns: 15rem minmax(0, 1fr); gap: 3rem; align-items: start; }
  .game-layout .index { position: sticky; top: calc(var(--header-h) + 2rem); margin-top: clamp(2.5rem, 8vw, 4rem); }
}

/* facts */
.facts { display: grid; grid-template-columns: max-content 1fr; gap: .7rem 1.5rem; margin: 1.75rem 0 0; max-width: 40rem; }
.facts dt { font: 600 var(--t-xs)/1.9 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--ink-3); }
.facts dd { margin: 0; }
.night .facts dt { color: var(--night-dim); }

/* steps */
.steps { list-style: none; margin: 1.75rem 0 0; padding: 0; display: grid; gap: 1.25rem; counter-reset: step; }
@media (min-width: 720px) { .steps { grid-template-columns: 1fr 1fr; gap: 1.5rem 2rem; } }
.steps li { counter-increment: step; display: grid; grid-template-columns: auto 1fr; gap: .25rem 1rem; }
.steps li::before {
  content: counter(step); grid-row: span 2;
  display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 50%;
  background: var(--rust); color: var(--on-rust); font: 600 1.05rem/1 var(--display);
}
.steps h3 { font-size: 1.25rem; align-self: center; }
.steps p { color: var(--ink-2); }
.night .steps p { color: var(--night-dim); }

/* names (tribes) */
.names { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.5rem 0 0; padding: 0; list-style: none; }
.names li { padding: .55rem 1rem; border-radius: var(--pill); border: 1.5px solid var(--paper-edge); font: 560 1.05rem/1.2 var(--display); }

/* people (residents) */
.people { display: grid; gap: 1rem; margin-top: 1.75rem; }
@media (min-width: 720px) { .people { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1200px) { .people { grid-template-columns: 1fr 1fr 1fr; } }
.person { padding: 1.25rem 1.25rem 1.4rem; border-radius: var(--radius); background: var(--night-2); border: 1px solid var(--night-3); }
.person h3 { font-size: 1.2rem; color: var(--night-text); }
.person .trade { display: block; margin-top: .35rem; font: 600 var(--t-xs)/1.2 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--rust); }
.night .person .trade { color: #e0814f; }
.person p { margin-top: .7rem; color: var(--night-dim); font-style: italic; }

/* gallery */
.gallery { display: grid; gap: 1.25rem; margin-top: 1.75rem; }
@media (min-width: 720px) { .gallery { grid-template-columns: 1fr 1fr; } }
.gallery.phones { grid-template-columns: 1fr 1fr; }
@media (min-width: 720px) { .gallery.phones { grid-template-columns: repeat(4, 1fr); } }
.gallery figure { margin: 0; }
.gallery img { width: 100%; border-radius: var(--radius); background: var(--night); }
.gallery figcaption { margin-top: .6rem; font-size: var(--t-s); color: var(--ink-2); }
.night .gallery figcaption { color: var(--night-dim); }
.gallery figcaption b { display: block; font: 600 var(--t-xs)/1.4 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); margin-bottom: .2rem; }
.night .gallery figcaption b { color: var(--night-text); }
.wide-shot { margin: 1.75rem 0 0; }
.wide-shot img { width: 100%; border-radius: var(--radius); }

/* notes on a night page */
.night .note .meta { color: var(--night-dim); }
.night .note p { color: var(--night-dim); }

.play-again { margin-top: clamp(2.5rem, 8vw, 4rem); padding: 2rem 1.5rem; border-radius: var(--radius); text-align: center; background: var(--paper-2); }
.night .play-again { background: var(--night-2); }
.play-again h2 { margin: 0 auto 1.25rem; }
/* one shape per gallery, whatever the source crop */
.gallery:not(.phones) img { aspect-ratio: 5 / 3; object-fit: contain; }
.gallery.phones img { aspect-ratio: 4 / 5; object-fit: cover; }

/* ══ PHASE 4: signed in ══════════════════════════════════════════════════ */
[data-signed-in="yes"] .nav-signin { display: none !important; }
.who {
  display: grid; place-items: center; flex: none;
  width: var(--tap); height: var(--tap); border-radius: 50%;
  background: var(--ink); color: var(--paper); text-decoration: none;
  font: 600 1.15rem/1 var(--display); border: 2px solid var(--paper-edge);
}
.who[hidden] { display: none; }
.night .who { background: var(--night-text); color: var(--night); border-color: var(--night-3); }
.who:hover { border-color: var(--rust); }
@media (max-width: 959px) { .who { margin-right: .25rem; } }

/* the signed-in hero */
#hero-in { background: var(--night); color: var(--night-text); }
#hero-in .hero-copy h1 { color: var(--night-text); max-width: 11ch; }
#hero-in .lede { color: var(--night-dim); }
@media (min-width: 960px) { #hero-in .hero-copy { padding-left: max(var(--pad), calc((100vw - var(--max)) / 2 + var(--pad))); } }

/* your games */
.your-list { display: grid; gap: .75rem; }
@media (min-width: 720px) { .your-list { grid-template-columns: 1fr 1fr; } }
.your-game {
  display: grid; grid-template-columns: 72px 1fr auto; align-items: center; gap: 1rem;
  padding: .75rem; border-radius: var(--radius); text-decoration: none;
  background: var(--paper-2); color: var(--ink); border: 1.5px solid transparent;
  transition: border-color .15s;
}
.your-game:hover { border-color: var(--rust); }
.your-thumb { width: 72px; height: 72px; border-radius: 10px; display: grid; place-items: center; }
.your-glyph { font: 600 1.6rem/1 var(--display); color: var(--night-text); position: relative; }
.your-text { display: grid; gap: .3rem; min-width: 0; }
.your-text .caps { font-size: 1.05rem; }
.your-status { font-size: var(--t-s); color: var(--ink-3); }
.your-game.is-turn .your-status { color: var(--rust); font-weight: 600; }
.your-game.is-gone .your-status { font-style: italic; }
.your-empty { color: var(--ink-3); }
.coming { margin-top: 2.5rem; }
.coming .game-card { max-width: 40rem; }

/* the door */
.door-form { display: grid; gap: 1rem; max-width: 26rem; margin-top: 1.75rem; }
.door-form label { display: grid; gap: .4rem; font: 600 var(--t-xs)/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); }
.door-form input {
  min-height: 48px; padding: 0 1rem; border-radius: 10px;
  border: 1.5px solid var(--paper-edge); background: #fffaf2; color: var(--ink);
  font: 400 1rem/1 var(--sans); letter-spacing: 0; text-transform: none;
}
.door-form input:focus { outline: 2px solid var(--rust); outline-offset: 1px; border-color: transparent; }
.door-form .btn { justify-content: center; margin-top: .25rem; }
.door-form .btn[disabled] { opacity: .6; cursor: progress; }
.door-msg { min-height: 1.4em; color: var(--rust-deep); font-size: var(--t-s); }
.door-links { display: flex; flex-wrap: wrap; gap: .25rem 1.5rem; }
.door-links a { display: inline-flex; align-items: center; min-height: var(--tap); font-size: var(--t-s); color: var(--ink-2); }
.door-note { font-size: var(--t-s); color: var(--ink-3); }
.door-already { margin-top: 1.75rem; display: grid; gap: 1rem; max-width: 30rem; }
.door-already[hidden], #door-form[hidden] { display: none; }
