/* ==========================================================================
   Detail Yakuza · v1
   Language: manga panels. Ink outlines, hard offset shadows, halftone dots,
   slanted bands. Palette comes from the character: white suit, burgundy
   shirt, gold chain, green tea. The accent colour follows his MOOD.
   Taken from the Hati & Sköll site: tokens only, section-head pattern,
   one accent word per headline, honest copy, reduced-motion respected.
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  color-scheme: light;

  /* palette */
  --c-ink: #15100f;
  --c-paper: #f4efe4;
  --c-paper-deep: #e8e0cf;
  --c-white: #fffdf8;
  --c-burgundy: #6d1f33;
  --c-burgundy-deep: #4a1424;
  --c-red: #e0252e;
  --c-red-deep: #a8141c;
  --c-gold: #d9a53a;
  --c-jade: #4f8b6c;
  --c-jade-ink: #2e6a4d;
  --c-jade-soft: #cfe3d3;
  --c-amber: #c98a1b;
  --c-amber-ink: #8a5a06;
  --c-amber-soft: #f2dca2;
  --c-indigo: #2c3163;
  --c-indigo-ink: #2c3163;
  --c-indigo-soft: #cfd2ec;
  --c-teal: #2f6f73;
  --c-teal-ink: #1f5a5e;
  --c-teal-soft: #cfe5e2;
  --c-red-soft: #f6c8c8;

  /* semantic */
  --bg: var(--c-paper);
  --bg-sunk: var(--c-paper-deep);
  --surface: var(--c-white);
  --text: var(--c-ink);
  --text-muted: #5b4f49;
  --line: var(--c-ink);

  /* mood (overridden by [data-mood]) */
  --accent: var(--c-jade);
  --accent-ink: var(--c-jade-ink);
  --accent-soft: var(--c-jade-soft);

  /* type */
  --font-display: "Dela Gothic One", "Zen Kaku Gothic New", Impact, "Arial Black", sans-serif;
  --font-body: "Zen Kaku Gothic New", "Segoe UI", system-ui, -apple-system, sans-serif;
  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: clamp(1.15rem, 1.05rem + 0.5vw, 1.4rem);
  --step-2: clamp(1.5rem, 1.2rem + 1.5vw, 2.1rem);
  --step-3: clamp(2.1rem, 1.5rem + 3vw, 3.9rem);
  --step-4: clamp(2.9rem, 1.7rem + 6vw, 6rem);

  /* space */
  --s-1: 0.25rem; --s-2: 0.5rem; --s-3: 0.75rem; --s-4: 1rem; --s-5: 1.5rem;
  --s-6: 2rem; --s-7: 3rem; --s-8: 4rem; --s-9: 6rem; --s-10: 8rem;
  --section-pad: clamp(4rem, 3rem + 5vw, 8rem);
  --gutter: clamp(1rem, 4vw, 2rem);
  --container: 72.5rem;

  /* shape */
  --border: 3px solid var(--line);
  --r-s: 0.5rem; --r-m: 1rem; --r-l: 1.5rem; --r-pill: 999px;
  --shadow: 5px 5px 0 var(--c-ink);
  --shadow-lg: 8px 8px 0 var(--c-ink);

  /* motion */
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --dur-fast: 160ms; --dur-med: 320ms; --dur-slow: 640ms;

  --header-h: 4.25rem;
  --slant: clamp(1.5rem, 4vw, 4rem);
}

[data-mood="calm"]      { --accent: var(--c-jade);   --accent-ink: var(--c-jade-ink);   --accent-soft: var(--c-jade-soft); }
[data-mood="sensei"]    { --accent: var(--c-amber);  --accent-ink: var(--c-amber-ink);  --accent-soft: var(--c-amber-soft); }
[data-mood="ninja"]     { --accent: var(--c-indigo); --accent-ink: var(--c-indigo-ink); --accent-soft: var(--c-indigo-soft); }
[data-mood="detective"] { --accent: var(--c-teal);   --accent-ink: var(--c-teal-ink);   --accent-soft: var(--c-teal-soft); }
[data-mood="rage"]      { --accent: var(--c-red);    --accent-ink: var(--c-red-deep);   --accent-soft: var(--c-red-soft); }
[data-mood="wired"]     { --accent: #8a5a2b;         --accent-ink: #6a4015;             --accent-soft: #ecd9c0; }
[data-mood="masked"]    { --accent: #55626e;         --accent-ink: #37424d;             --accent-soft: #d6dde3; }

/* the whole page leans red while he is furious */
html.is-rage {
  --accent: var(--c-red);
  --accent-ink: var(--c-red-deep);
  --accent-soft: var(--c-red-soft);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 1rem); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
main { overflow-x: clip; }
/* paper texture, once the tile exists; multiplied so section colours still apply */
html.has-washi body { background-color: #fff; background-image: var(--img-washi); background-size: 520px; background-blend-mode: multiply; }
html.has-washi .section--booth, html.has-washi .section--faq { background-image: var(--img-washi); background-size: 520px; background-blend-mode: multiply; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 400; line-height: 1.08; margin: 0; letter-spacing: -0.01em; text-wrap: balance; }
p { margin: 0; }
a { color: inherit; }
button { font: inherit; color: inherit; }
ul { padding: 0; margin: 0; }
:focus-visible { outline: 3px solid var(--c-red); outline-offset: 3px; }
::selection { background: var(--c-gold); color: var(--c-ink); }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--c-ink); color: var(--c-paper); padding: var(--s-3) var(--s-4); z-index: 100; }
.skip:focus { left: var(--s-3); top: var(--s-3); }

.container { width: min(100% - 2 * var(--gutter), var(--container)); margin-inline: auto; }
.container--narrow { --container: 48rem; }

/* ---------- Reveal ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(1.25rem); transition: opacity var(--dur-slow) var(--ease), transform var(--dur-slow) var(--ease); }
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* ---------- Section head ---------- */
.section { padding-block: var(--section-pad); position: relative; }
.section-head { max-width: 46rem; margin-bottom: var(--s-7); }
.eyebrow {
  display: inline-flex; align-items: center; gap: var(--s-3);
  font-size: var(--step--1); font-weight: 900; text-transform: uppercase; letter-spacing: 0.14em;
  margin-bottom: var(--s-4);
}
.eyebrow__no {
  font-family: var(--font-display); letter-spacing: 0;
  background: var(--c-ink); color: var(--c-paper);
  padding: 0.1em 0.55em; border-radius: var(--r-s);
  transform: rotate(-3deg);
}
.section-title { font-size: var(--step-3); }
.section-title em, h1 em, h3 em {
  font-style: normal; position: relative; white-space: nowrap; z-index: 0;
}
.section-title em::after, h1 em::after {
  content: ""; position: absolute; inset: 58% -0.12em 0.02em -0.12em; z-index: -1;
  background: var(--accent-soft); border-radius: 2px; transform: skew(-8deg) rotate(-0.8deg);
  transition: background var(--dur-med) var(--ease);
}
.lede { font-size: var(--step-1); color: var(--text-muted); margin-top: var(--s-4); max-width: 38rem; line-height: 1.55; }
.subhead { font-size: var(--step-2); margin: var(--s-9) 0 var(--s-5); }
.tag {
  display: inline-block; font-size: 0.78rem; font-weight: 900; text-transform: uppercase; letter-spacing: 0.1em;
  padding: 0.2em 0.7em; border: 2px solid var(--line); border-radius: var(--r-pill);
  background: var(--accent-soft); margin-bottom: var(--s-3);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: 3rem; padding: 0.6em 1.4em;
  font-family: var(--font-display); font-size: 1rem; text-decoration: none; cursor: pointer;
  background: var(--surface); color: var(--text);
  border: var(--border); border-radius: var(--r-m); box-shadow: 4px 4px 0 var(--c-ink);
  transition: transform var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease), background var(--dur-fast);
}
.btn:active { transform: translate(4px, 4px); box-shadow: 0 0 0 var(--c-ink); }
.btn--primary { background: var(--c-gold); }
.btn--small { min-height: 2.75rem; font-size: 0.9rem; padding: 0.4em 1.1em; box-shadow: 3px 3px 0 var(--c-ink); }
.btn--hot { background: var(--c-red); color: var(--c-white); }
.btn--ghost { background: transparent; color: inherit; box-shadow: none; border-color: currentColor; }
@media (hover: hover) {
  .btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--c-ink); }
  .btn:active { transform: translate(4px, 4px); box-shadow: 0 0 0 var(--c-ink); }
  .btn--ghost:hover { box-shadow: none; background: rgba(255, 255, 255, 0.12); }
}

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  background: var(--bg); border-bottom: var(--border);
  transition: background var(--dur-med) var(--ease);
}
html.is-rage .header { background: var(--c-red); }
.header__row { display: flex; align-items: center; gap: var(--s-5); height: 100%; }
.brand { display: inline-flex; align-items: center; gap: var(--s-3); text-decoration: none; margin-right: auto; }
.brand__crest { display: grid; place-items: center; width: 2.5rem; height: 2.5rem; }
.brand__crest img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.brand__name { font-family: var(--font-display); font-size: 1.15rem; letter-spacing: 0.01em; }
.nav { display: none; gap: var(--s-5); }
.nav a { text-decoration: none; font-weight: 700; padding: var(--s-2) 0; border-bottom: 3px solid transparent; }
@media (hover: hover) { .nav a:hover { border-bottom-color: var(--c-ink); } }
.mood-chip { display: none; align-items: center; gap: var(--s-2); font-size: var(--step--1); border: 2px solid var(--line); border-radius: var(--r-pill); padding: 0.2em 0.8em 0.2em 0.6em; background: var(--surface); white-space: nowrap; }
.mood-chip__dot { width: 0.7rem; height: 0.7rem; border-radius: 50%; background: var(--accent); border: 2px solid var(--c-ink); transition: background var(--dur-med); }

.menu { position: relative; }
.menu summary { list-style: none; cursor: pointer; width: 3rem; height: 3rem; display: grid; place-items: center; border: var(--border); border-radius: var(--r-m); background: var(--surface); box-shadow: 3px 3px 0 var(--c-ink); }
.menu summary::-webkit-details-marker { display: none; }
.menu summary i { width: 1.25rem; height: 3px; background: var(--c-ink); box-shadow: 0 -7px 0 var(--c-ink), 0 7px 0 var(--c-ink); }
.menu nav { position: absolute; right: 0; top: calc(100% + 0.75rem); min-width: 13rem; display: grid; background: var(--surface); border: var(--border); border-radius: var(--r-m); box-shadow: var(--shadow); overflow: hidden; }
.menu nav a { padding: var(--s-3) var(--s-4); text-decoration: none; font-weight: 700; min-height: 2.75rem; display: flex; align-items: center; }
.menu nav a + a { border-top: 2px solid var(--c-ink); }
@media (min-width: 62rem) {
  .nav { display: flex; }
  .menu { display: none; }
  .mood-chip { display: inline-flex; }
}

/* ---------- Hero ---------- */
.hero { position: relative; padding-block: var(--s-7) var(--s-9); overflow: clip; }
.hero__bg {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(circle at 78% 42%, var(--accent-soft) 0 22rem, transparent 22.1rem),
    radial-gradient(var(--c-ink) 1.2px, transparent 1.6px) 0 0 / 11px 11px;
  -webkit-mask: linear-gradient(100deg, transparent 20%, #000 80%);
          mask: linear-gradient(100deg, transparent 20%, #000 80%);
  opacity: 0.22;
}
.hero__bg span { display: none; }
.hero__grid { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-8); align-items: center; }
.hero__grid > * { min-width: 0; }
@media (min-width: 62rem) { .hero__grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); } }
.hero h1 { font-size: var(--step-4); line-height: 1; }
.hero .lede { margin-top: var(--s-5); }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--s-4); margin-top: var(--s-6); }

.forecast { margin-top: var(--s-7); max-width: 24rem; padding: var(--s-4) var(--s-5); border: var(--border); border-radius: var(--r-m); background: var(--surface); box-shadow: 4px 4px 0 var(--accent); }
.forecast__label { font-size: 0.78rem; font-weight: 900; text-transform: uppercase; letter-spacing: 0.12em; }
.forecast__row { display: flex; align-items: center; gap: var(--s-4); margin-block: var(--s-2); }
.forecast__row b { font-family: var(--font-display); font-size: 1.6rem; min-width: 3.2ch; }
.meter { flex: 1; height: 1rem; border: 2px solid var(--line); border-radius: var(--r-pill); background: var(--c-paper-deep); overflow: hidden; }
.meter span { display: block; height: 100%; width: 0; background: var(--accent); border-right: 2px solid var(--c-ink); transition: width 1.1s var(--ease); }
.forecast__note { font-size: var(--step--1); color: var(--text-muted); min-height: 1.5em; }

/* stage: the character breaks out of the top of his own panel */
.hero__stagewrap { width: min(100%, 30rem); margin-inline: auto; }
.stage { position: relative; aspect-ratio: 1122 / 1402; width: 100%; }
.stage__frame {
  position: absolute; inset: 13% 0 0 0; overflow: hidden;
  border: var(--border); border-radius: var(--r-l); box-shadow: var(--shadow-lg);
  background: linear-gradient(160deg, #e3efe5, #b9d6c1);
  transition: background var(--dur-slow) var(--ease);
}
.stage[data-mood="sensei"] .stage__frame    { background: linear-gradient(160deg, #f8e8bb, #e7c36d); }
.stage[data-mood="ninja"] .stage__frame     { background: linear-gradient(160deg, #3d4287, #1b1e45); }
.stage[data-mood="detective"] .stage__frame { background: linear-gradient(160deg, #d6ebe8, #98c4c0); }
.stage[data-mood="rage"] .stage__frame      { background: linear-gradient(160deg, #ff5a4d, #a8141c); }
.stage__bg { position: absolute; inset: 0; background: var(--img-bg-calm, none) 62% 50% / cover; opacity: 0.72; transition: opacity var(--dur-med); }
html.is-rage .stage__bg, .stage[data-mood="rage"] .stage__bg { background-image: var(--img-bg-rage, var(--img-bg-calm, none)); }
.stage__dots {
  position: absolute; inset: 0; opacity: 0.2;
  background: radial-gradient(var(--c-ink) 1.3px, transparent 1.7px) 0 0 / 10px 10px;
  -webkit-mask: linear-gradient(0deg, #000, transparent 70%); mask: linear-gradient(0deg, #000, transparent 70%);
}
.stage__rays {
  position: absolute; inset: -40%; opacity: 0; transition: opacity var(--dur-fast);
  background: repeating-conic-gradient(from 0deg at 50% 50%, rgba(21, 16, 15, 0.6) 0 1.6deg, transparent 1.6deg 9deg);
  -webkit-mask: radial-gradient(circle at 50% 50%, transparent 14%, #000 38%); mask: radial-gradient(circle at 50% 50%, transparent 14%, #000 38%);
}
.stage[data-state="hold"] .stage__rays { opacity: 1; animation: spin 7s linear infinite; }
.stage[data-state="impact"] .stage__rays { opacity: 1; }

/* flames (CSS fallback), replaced by the sprite sheet when it exists */
.flames { position: absolute; left: 0; right: 0; bottom: 0; height: 70%; display: flex; justify-content: space-around; align-items: flex-end; opacity: 0; transition: opacity var(--dur-fast); }
.flames i { width: 18%; aspect-ratio: 1; background: radial-gradient(circle at 40% 60%, #ffe27a 0 28%, #ff8a2a 29% 58%, #e0252e 59%); border: 3px solid var(--c-ink); border-radius: 0 50% 50% 50%; transform: rotate(45deg) scale(1); transform-origin: 50% 80%; }
.flames i:nth-child(2n) { width: 24%; margin-bottom: 14%; }
.flames i:nth-child(3) { width: 30%; margin-bottom: 26%; }
.stage[data-state="hold"] .flames { opacity: 0.95; }
.stage[data-state="hold"] .flames i { animation: flicker 0.38s ease-in-out infinite alternate; }
.stage[data-state="hold"] .flames i:nth-child(2n) { animation-duration: 0.31s; }
.stage[data-state="hold"] .flames i:nth-child(3) { animation-duration: 0.45s; }
.stage__fire { position: absolute; left: -15%; bottom: -4%; width: 130%; aspect-ratio: 1; opacity: 0; mix-blend-mode: screen; background: var(--img-sheet-fire, none) 0 0 / 200% 200% no-repeat; }
.has-fire .flames { display: none; }
.has-fire .stage[data-state="hold"] .stage__fire { opacity: 1; animation: sheet 0.64s steps(1) infinite; }

.sfx {
  position: absolute; top: 4%; right: 5%; writing-mode: vertical-rl;
  font-family: var(--font-display); font-size: clamp(2.4rem, 8vw, 3.6rem); letter-spacing: 0.08em; line-height: 1;
  color: var(--c-white); -webkit-text-stroke: 3px var(--c-ink); paint-order: stroke fill; transform: rotate(5deg);
}
.stage[data-mood="rage"] .sfx { color: var(--c-gold); }

/* the figure may pop out of the top and sides of the frame, but is cut flat at the frame's bottom edge */
.stage__charwrap { position: absolute; inset: 0; clip-path: inset(-40% -15% 0 -15%); pointer-events: none; }
.stage__char { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: bottom; translate: 0 var(--shift, 0%); transition: transform var(--dur-med) var(--ease); }
.stage.hide-char .stage__char { opacity: 0; }
.stage__char.alt { transform: rotate(1.4deg) translateX(-1.5%) scale(1.02); }
.stage__impact { position: absolute; left: 0; top: 13%; width: 100%; height: 87%; object-fit: cover; border-radius: var(--r-l); border: var(--border); opacity: 0; pointer-events: none; transform: scale(1.08); }
.stage__impact:not([src]) { display: none; }
.stage[data-state="impact"] .stage__impact { opacity: 1; transform: scale(1); transition: transform 0.18s var(--ease); }
.stage[data-state="build"] .stage__char { animation: tremble 0.09s linear infinite; }
.stage[data-state="hold"] { animation: shake 0.16s linear infinite; }

.puffs { position: absolute; inset: 0; pointer-events: none; }
.puff { position: absolute; width: 18%; aspect-ratio: 1; opacity: 0; border-radius: 50%; background: #d9d6d2; border: 3px solid var(--c-ink); }
.puff--r { left: 66%; top: 18%; } .puff--l { left: 18%; top: 22%; }
.stage[data-state="cool"] .puff.on { animation: puff 1.6s var(--ease) forwards; }
.has-smoke .puff { border: 0; border-radius: 0; background: var(--img-sheet-smoke, none) 0 0 / 200% 200% no-repeat; mix-blend-mode: multiply; }
.has-smoke .stage[data-state="cool"] .puff.on { animation: puff 1.6s var(--ease) forwards, sheet 1.6s steps(1) forwards; }

.poof { position: absolute; left: 50%; top: 52%; height: 124%; aspect-ratio: 2 / 3; opacity: 0; pointer-events: none; z-index: 3; transform: translate(-50%, -50%) scale(0.4);
  background: radial-gradient(circle at 30% 40%, #fff 0 18%, transparent 19%), radial-gradient(circle at 65% 35%, #fff 0 20%, transparent 21%), radial-gradient(circle at 50% 70%, #fff 0 24%, transparent 25%), radial-gradient(circle, #e7e3de 0 55%, transparent 56%);
  border-radius: 50%; }
/* the real smoke-bomb art has its own transparent background: draw it normally, never multiplied into his skin */
.has-vanish .poof { background: var(--img-sheet-vanish, none) center / contain no-repeat; border-radius: 0; }
/* the cloud covers him, the face swaps while he is hidden (see applyMood), then it clears */
.stage.poofing .poof { animation: poof 0.7s var(--ease) both; }

.caption { margin-top: var(--s-6); min-height: 3.2em; font-size: var(--step-1); }
.caption b { font-family: var(--font-display); font-weight: 400; color: var(--accent-ink); }

.moods { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--s-2); margin-top: var(--s-3); }
.mood { display: grid; justify-items: center; gap: var(--s-2); padding: var(--s-2) 0.15rem var(--s-2); cursor: pointer; font-size: 0.78rem; font-weight: 900; text-transform: uppercase; letter-spacing: 0.04em; background: transparent; border: 3px solid transparent; border-radius: var(--r-m); min-height: 5.25rem; }
.mood__thumb { width: 3.25rem; height: 3.25rem; border-radius: 50%; overflow: hidden; border: 3px solid var(--line); background: var(--surface); }
.mood__thumb img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 12%; transform: scale(1.5); transform-origin: 50% 30%; }
.mood[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--line); box-shadow: 3px 3px 0 var(--c-ink); }
.mood[aria-disabled="true"] { opacity: 0.55; cursor: wait; }
@media (hover: hover) { .mood:hover:not([aria-pressed="true"]) { border-color: var(--line); } }
@media (min-width: 30rem) { .mood { font-size: 0.82rem; } .mood__thumb { width: 3.75rem; height: 3.75rem; } }
@media (max-width: 29.99rem) { .mood { font-size: 0.64rem; letter-spacing: 0; padding-inline: 0; } }

/* ---------- Tape ---------- */
.tape { background: var(--c-ink); color: var(--c-paper); border-block: var(--border); transform: rotate(-1.2deg); margin: var(--s-4) -3% 0; overflow: hidden; position: relative; z-index: 2; }
.tape__track { display: flex; width: max-content; animation: tape 36s linear infinite; }
.tape__group { display: flex; flex: none; }
.tape__group span { font-family: var(--font-display); font-size: 1.15rem; text-transform: uppercase; padding: 0.7rem 1.6rem; white-space: nowrap; }
.tape__group span::after { content: "✦"; margin-left: 3.2rem; color: var(--c-gold); }
.tape__group span.hot { color: var(--c-red); background: var(--c-paper); }

/* ---------- Faces ---------- */
.faces { display: grid; gap: var(--s-7) var(--s-6); }
@media (min-width: 40rem) { .faces { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 62rem) { .faces { grid-template-columns: repeat(3, 1fr); } }
.face { display: flex; flex-direction: column; background: var(--surface); border: var(--border); border-radius: var(--r-l); box-shadow: var(--shadow); overflow: hidden; transition: transform var(--dur-med) var(--ease), box-shadow var(--dur-med) var(--ease); }
.js .face.is-in:nth-child(odd) { transform: rotate(-0.6deg); }
.js .face.is-in:nth-child(even) { transform: rotate(0.5deg); }
@media (hover: hover) { .js .face.is-in:hover { transform: rotate(0) translateY(-5px); box-shadow: 8px 8px 0 var(--c-ink); } }
.face__art { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--accent-soft); border-bottom: var(--border); }
.face__art::before { content: ""; position: absolute; inset: 0; opacity: 0.18; background: radial-gradient(var(--c-ink) 1.2px, transparent 1.6px) 0 0 / 9px 9px; }
.face__art img { position: relative; width: 74%; margin: 7% auto 0; }
.face__body { padding: var(--s-5); display: flex; flex-direction: column; gap: var(--s-3); flex: 1; align-items: flex-start; }
.face h3 { font-size: var(--step-2); }
.face dl, .order__facts { margin: 0; display: grid; gap: var(--s-2); font-size: var(--step--1); }
.face dl div, .order__facts div { display: grid; grid-template-columns: 6.2rem 1fr; gap: var(--s-3); }
dt { font-weight: 900; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.75rem; padding-top: 0.2em; color: var(--accent-ink); }
dd { margin: 0; }
.face .btn { margin-top: auto; }
.face--six { background: var(--c-paper-deep); border-style: dashed; }
.face--six .face__art { background: var(--c-ink); }
.face--six .silhouette { filter: brightness(0) contrast(2); opacity: 0.55; }
.face__q { position: absolute; right: 12%; top: 8%; font-family: var(--font-display); font-size: 5rem; line-height: 1; color: var(--c-gold); -webkit-text-stroke: 3px var(--c-ink); paint-order: stroke fill; transform: rotate(8deg); }


/* ---------- Services ---------- */
.section--services { background: var(--bg); }
.section--services::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.08;
  background: radial-gradient(var(--c-ink) 1.3px, transparent 1.7px) 0 0 / 12px 12px;
  -webkit-mask: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent); mask: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent);
}
.section--services > .container { position: relative; }
.orders { display: grid; gap: var(--s-7); }
@media (min-width: 62rem) { .orders { grid-template-columns: repeat(3, 1fr); gap: var(--s-6); align-items: stretch; } }
.order { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: var(--s-3); padding: var(--s-5) var(--s-5) var(--s-6); background: var(--surface); border: var(--border); border-radius: var(--r-l); box-shadow: 6px 6px 0 var(--accent); transition: transform var(--dur-med) var(--ease); }
.order::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 0.9rem; background: var(--accent); border-bottom: var(--border); border-radius: calc(var(--r-l) - 3px) calc(var(--r-l) - 3px) 0 0; }
.order > * { position: relative; }
.order .avatar { margin-top: var(--s-3); }
.order__mic { position: absolute !important; left: 4.6rem; top: 5.4rem; z-index: 2; filter: drop-shadow(2px 2px 0 var(--c-ink)); }
.order h3 { font-size: var(--step-2); margin-bottom: var(--s-1); }
.order h3 em::after { content: ""; position: absolute; inset: 62% -0.1em 0 -0.1em; z-index: -1; background: var(--accent-soft); transform: skew(-8deg); }
.order p:not(.tag) { color: var(--text-muted); }
.order__facts { margin-block: var(--s-3) var(--s-4); padding-top: var(--s-3); border-top: 2px dashed var(--line); width: 100%; }
.order .btn { margin-top: auto; }
.order__no { position: absolute !important; right: var(--s-5); top: 1.6rem; font-family: var(--font-display); font-size: 2.6rem; line-height: 1; color: var(--accent-ink); opacity: 0.85; }
@media (min-width: 62rem) {
  .js .order.is-in:nth-child(1) { transform: rotate(-0.8deg); }
  .js .order.is-in:nth-child(3) { transform: rotate(0.7deg); }
}

.avatar { width: 5.5rem; height: 5.5rem; border-radius: 50%; border: var(--border); overflow: hidden; background: var(--accent-soft); flex: none; position: relative; }
.avatar img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 10%; transform: scale(1.55); transform-origin: 50% 28%; }
.avatar--big { width: min(100%, 18rem); height: auto; aspect-ratio: 1; box-shadow: 8px 8px 0 var(--c-gold); }

.dishes { list-style: none; border-top: var(--border); }
.dishes li { display: grid; grid-template-columns: auto 1fr; gap: var(--s-3) var(--s-4); padding: var(--s-4) 0; border-bottom: 2px dashed var(--line); align-items: start; }
.dishes .dot { width: 1.1rem; height: 1.1rem; margin-top: 0.4rem; border-radius: 50%; background: var(--accent); border: 2px solid var(--c-ink); }
.dishes b { display: block; font-size: var(--step-1); }
.dishes span:not(.dot) { color: var(--text-muted); }
.dishes em { grid-column: 2; font-style: normal; font-weight: 900; font-size: var(--step--1); color: var(--accent-ink); text-transform: uppercase; letter-spacing: 0.06em; }
@media (min-width: 48rem) {
  .dishes li { grid-template-columns: auto 1fr 15rem; }
  .dishes em { grid-column: 3; text-align: right; padding-top: 0.35em; }
}

/* ---------- Booth ---------- */
.section--booth { background: var(--bg-sunk); border-block: var(--border); }
.booth { display: grid; gap: var(--s-7); align-items: start; }
@media (min-width: 56rem) { .booth { grid-template-columns: 17rem 1fr; } }
.booth__him { display: grid; gap: var(--s-4); justify-items: center; }
.booth__frame { width: min(100%, 15rem); aspect-ratio: 1; border: var(--border); border-radius: var(--r-l); background: var(--accent-soft); box-shadow: var(--shadow); overflow: hidden; transition: background var(--dur-med); }
.booth__frame img { width: 88%; margin: 10% auto 0; transition: transform var(--dur-med) var(--ease); }
.booth__him.is-talking .booth__frame img { animation: nod 0.5s var(--ease); }
.booth__him.is-furious .booth__frame { animation: shake 0.16s linear 8; }
.booth__him.is-wired .booth__frame { animation: shake 0.2s linear 10; }
.msg[data-mood="wired"] .bubble--img { animation: shake 0.2s linear 5; }
.booth__who { text-align: center; font-family: var(--font-display); }
.booth__who span { display: block; font-family: var(--font-body); font-weight: 900; font-size: var(--step--1); color: var(--accent-ink); text-transform: uppercase; letter-spacing: 0.1em; }

.booth__chat { display: grid; gap: var(--s-5); min-width: 0; }
.log { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-4); align-content: start; min-height: 14rem; max-height: 32rem; overflow-y: auto; overflow-x: hidden; padding: var(--s-5); background: var(--surface); border: var(--border); border-radius: var(--r-l); box-shadow: var(--shadow); }
.msg { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-1); max-width: 88%; }
.msg--him { width: min(88%, 31rem); }
.msg__who { font-size: 0.75rem; font-weight: 900; text-transform: uppercase; letter-spacing: 0.1em; color: var(--accent-ink); padding-left: var(--s-2); }
.msg--me { justify-self: end; }
.msg--me .msg__who { color: var(--text-muted); text-align: right; padding-right: var(--s-2); }
.bubble { position: relative; padding: 0.75rem 1.1rem; border: var(--border); border-radius: 1.25rem; background: var(--c-white); overflow-wrap: anywhere; }
.msg--me .bubble { background: var(--c-ink); color: var(--c-paper); border-radius: 1.25rem 1.25rem 0.3rem 1.25rem; }
.bubble--talk { border-radius: 1.25rem 1.25rem 1.25rem 0.3rem; }
.bubble--scroll { border-radius: 0.3rem; border-inline: 0.75rem solid #6b4a2b; background: #f6ead0; padding-inline: 1.1rem; }
.bubble--whisper { border-style: dashed; background: var(--c-paper-deep); font-style: italic; font-size: 0.95rem; border-radius: 2rem; }
.bubble--shout { border-radius: 0.2rem; border-color: var(--c-red); background: var(--c-white); box-shadow: 0 0 0 3px var(--c-ink); font-family: var(--font-display); text-transform: uppercase; font-size: 0.98rem; transform: rotate(-1deg); animation: shake 0.16s linear 6; }
.bubble--typing { display: inline-flex; gap: 0.35rem; padding: 0.9rem 1.1rem; }
.bubble--typing i { width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--c-ink); animation: dots 0.9s infinite ease-in-out; }
.bubble--typing i:nth-child(2) { animation-delay: 0.15s; } .bubble--typing i:nth-child(3) { animation-delay: 0.3s; }

/* painted balloons (3:1 art, stretched to fit the text) */
.bubble--img { width: 100%; border: 0; border-radius: 0; box-shadow: none; background: center / 100% 100% no-repeat; aspect-ratio: 3 / 1; display: grid; place-items: center; text-align: center; padding: 5% 13% 14%; line-height: 1.4; transform: none; animation: none; }
@media (max-width: 40rem) { .bubble--img { font-size: 0.9rem; } }
.bubble--img { overflow: hidden; }
.bubble--talk.bubble--img { background-image: var(--img-balloon-talk); }
.bubble--scroll.bubble--img { background-image: var(--img-balloon-scroll); padding: 5% 12% 8%; }
.bubble--whisper.bubble--img { background-image: var(--img-balloon-whisper); padding: 6% 13% 13%; }
.bubble--shout.bubble--img { background-image: var(--img-balloon-shout); padding: 8% 16% 11%; font-size: 0.88rem; }
.msg--him .bubble--shout.bubble--img { animation: shake 0.16s linear 6; }
.tell { display: grid; gap: var(--s-3); }
.tell label[for] { font-weight: 900; font-size: var(--step-1); }
.tell textarea { width: 100%; resize: vertical; min-height: 4.5rem; padding: var(--s-3) var(--s-4); font: inherit; background: var(--c-white); border: var(--border); border-radius: var(--r-m); box-shadow: inset 3px 3px 0 var(--c-paper-deep); }
.tell textarea::placeholder { color: #7a6d66; }
.tell__err { min-height: 1.4em; font-size: var(--step--1); color: var(--c-red-deep); font-weight: 700; }
.moodpick { border: 0; padding: 0; margin: 0 0 var(--s-2); display: flex; flex-wrap: wrap; gap: var(--s-2); }
.moodpick legend { font-weight: 900; font-size: var(--step--1); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: var(--s-2); padding: 0; }
.moodpick label { position: relative; }
.moodpick input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.moodpick span { display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0 1.1rem; font-weight: 900; border: var(--border); border-radius: var(--r-pill); background: var(--c-white); }
.moodpick input:checked + span { background: var(--c-ink); color: var(--c-paper); }
.moodpick input:focus-visible + span { outline: 3px solid var(--c-red); outline-offset: 3px; }
.tell .btn { justify-self: start; }

/* ---------- Band (slanted, night) ---------- */
.band { position: relative; z-index: 1; }
.facts {
  background: var(--c-ink); color: var(--c-paper);
  padding-block: calc(var(--section-pad) + var(--slant));
  clip-path: polygon(0 var(--slant), 100% 0, 100% calc(100% - var(--slant)), 0 100%);
  margin-block: calc(var(--slant) * -1);       /* overlap neighbours so the corner wedges show THEIR background */
}
.section--booth { border-bottom: 0; padding-bottom: calc(var(--section-pad) + var(--slant)); }
.section--hide { padding-top: calc(var(--section-pad) + var(--slant)); }
.has-scene .facts { background: linear-gradient(90deg, rgba(21, 16, 15, 0.97) 0 34%, rgba(21, 16, 15, 0.72) 62%, rgba(21, 16, 15, 0.1)), var(--img-scene, none) center / cover var(--c-ink); }
.has-scene .facts__figure { display: none; }
/* phones: the scene sits on top as a picture, text below (a landscape painting cropped behind text hides both) */
@media (max-width: 55rem) {
  .has-scene .facts { background: var(--c-ink); padding-top: calc(var(--slant) + 58vw + var(--s-5)); }
  .has-scene .facts::before { content: ""; position: absolute; left: 0; right: 0; top: var(--slant); height: 58vw; background: var(--img-scene) 74% 50% / cover; -webkit-mask: linear-gradient(180deg, #000 62%, transparent); mask: linear-gradient(180deg, #000 62%, transparent); }
  .fact { box-shadow: 5px 5px 0 var(--c-gold); padding: var(--s-5); }
  .fact__text { min-height: 4.2em; }
}
.facts__grid { display: grid; gap: var(--s-8); align-items: center; }
@media (min-width: 56rem) { .facts__grid { grid-template-columns: 1.4fr 0.6fr; } }
.facts .eyebrow__no { background: var(--c-gold); color: var(--c-ink); }
.facts .lede { color: #d9cfc2; }
.facts .section-title em::after { background: var(--c-burgundy); }
.fact { max-width: 40rem; padding: var(--s-5) var(--s-6) var(--s-6); border: 3px solid var(--c-paper); border-radius: var(--r-l); background: #231a18; box-shadow: 8px 8px 0 var(--c-gold); }
.fact__tag { display: flex; justify-content: space-between; gap: var(--s-4); font-size: 0.78rem; font-weight: 900; text-transform: uppercase; letter-spacing: 0.12em; color: var(--c-gold); margin-bottom: var(--s-4); }
.fact__tag span:last-child { color: #d9cfc2; font-variant-numeric: tabular-nums; }
.fact__text { font-size: var(--step-2); line-height: 1.3; font-weight: 700; min-height: 5.6em; margin-bottom: var(--s-5); text-wrap: pretty; }
.fact__text.swap { animation: swap var(--dur-med) var(--ease); }
.facts__figure { display: grid; place-items: center; }

/* ---------- Hide & seek ---------- */
.section--hide { overflow-x: clip; }
.scene { position: relative; border: var(--border); border-radius: var(--r-l); box-shadow: var(--shadow-lg); background: var(--img-washi, none) var(--c-paper-deep); background-image: linear-gradient(180deg, transparent 72%, rgba(21, 16, 15, 0.1) 72.2%), var(--img-bg-calm-soft, none); padding: 6rem 1rem 0; overflow: hidden; min-height: 27rem; display: flex; flex-direction: column; justify-content: flex-end; }
.scene::before { content: ""; position: absolute; inset: 0; opacity: 0.12; background: radial-gradient(var(--c-ink) 1.2px, transparent 1.6px) 0 0 / 10px 10px; pointer-events: none; }
.scene::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1.1rem; background: var(--c-ink); }
.scene__row { --w: clamp(5.5rem, 17vw, 10.5rem); position: relative; display: grid; grid-template-columns: repeat(2, var(--w)); justify-content: space-between; row-gap: 3.5rem; align-items: end; padding: 0 calc(var(--w) * 0.65) 3rem 0.25rem; }
@media (min-width: 48rem) { .scene__row { grid-template-columns: repeat(4, var(--w)); row-gap: 0; justify-content: space-around; padding: 0 0 3rem; } .scene { padding-top: 7rem; } }
/* Each prop image has transparent padding, so every spot declares the VISIBLE box of its
   art (fractions of the image, measured from the alpha channel) and a scale --pw.
   From that we derive the button, the floor line and where the peeker sits.
   Measured: lantern x .27-.73 y .01-.99 | noren x .05-.95 y .09-.88
             books x .01-.99 y .32-.81   | crate x .05-.95 y .17-.83 */
.spot {
  --hs: calc(var(--w) * 1.3);                                  /* spot height, floor at the bottom */
  --iw: calc(var(--w) * var(--pw));                            /* prop image width */
  --vw: calc(var(--iw) * (var(--x1) - var(--x0)));            /* visible width */
  --vh: calc(var(--iw) * (var(--y1) - var(--y0)));            /* visible height */
  --lb: calc((var(--w) - var(--vw)) / 2);                      /* visible left */
  position: relative; width: var(--w); height: var(--hs);
}
.spot--lantern { --pw: 1.25; --x0: 0.269; --x1: 0.73;  --y0: 0.01;  --y1: 0.987; --ex: 0.57; }
.spot--noren   { --pw: 1.2;  --x0: 0.051; --x1: 0.948; --y0: 0.093; --y1: 0.882; --ex: 0.84; }
.spot--books   { --pw: 1.2;  --x0: 0.013; --x1: 0.987; --y0: 0.335; --y1: 0.77;  --ty: 0.335; }
.spot--crate   { --pw: 1.1;  --x0: 0.045; --x1: 0.955; --y0: 0.167; --y1: 0.834; --ty: 0.176; }
.spot__prop { position: absolute; z-index: 2; left: var(--lb); bottom: 0; width: var(--vw); height: var(--vh); padding: 0; border: 0; background: none; cursor: pointer; border-radius: var(--r-s); transition: transform var(--dur-fast) var(--ease); }
.spot__prop > img { position: absolute; width: calc(100% / (var(--x1) - var(--x0))); height: auto; max-width: none; left: calc(-100% * var(--x0) / (var(--x1) - var(--x0))); top: calc(-100% * var(--y0) / (var(--y1) - var(--y0))); pointer-events: none; }
.prop-fallback { display: none; width: 100%; height: 100%; align-items: center; justify-content: center; font-family: var(--font-display); font-size: calc(var(--w) * 0.32); background: var(--c-white); border: var(--border); border-radius: var(--r-m); box-shadow: 4px 4px 0 var(--c-ink); }
.spot.no-prop .spot__prop > img { display: none; }
.spot.no-prop .prop-fallback { display: flex; }
@media (hover: hover) { .spot__prop:hover { transform: translateY(-4px); } }
.spot__prop:focus-visible { outline-offset: 6px; }
.spot.is-nope .spot__prop { animation: nope 0.45s linear; }

/* Peeker art (1024x1536), measured:
   side peek (final art): wall edge at x = 35.8%, figure spans y 9.4% to 56.4% (hem fades out at the floor line)
   top peek:  table edge at y = 64.5% (0.9675 P), figure spans x 6% to 94%
   Side: his cut edge tucks behind the prop at --ex (the x where the prop's silhouette edge is, e.g. the lantern pole), hem on the floor.
   Top:  the table edge lands on the prop's real top line --ty (the main top edge, not the tallest tip), tucked slightly behind it, centred.
   Both peekers are clipped exactly at their cut lines, because the delivered art has a faint haze past the cut.
   If the art is regenerated, adjust these numbers only. */
.spot__peek { position: absolute; z-index: 1; height: auto; max-width: none; opacity: 0; pointer-events: none; transition: opacity 0.3s var(--ease), transform 0.45s var(--ease); }
.spot[data-type="side"] { --p: calc(var(--w) * 1.45); }
.spot[data-type="top"]  { --p: calc(var(--vw) * 1.15); }
.spot[data-type="side"] .spot__peek { width: var(--p); left: calc(var(--lb) + (var(--ex) - var(--x0)) * var(--iw) - var(--p) * 0.373); top: calc(var(--hs) - var(--p) * 0.846); transform: translateX(-16%); clip-path: inset(0 0 42.5% 34.5%); -webkit-mask-image: linear-gradient(180deg, #000 0 47%, transparent 56%); mask-image: linear-gradient(180deg, #000 0 47%, transparent 56%); }
.spot[data-type="top"] .spot__peek  { width: var(--p); left: calc(var(--lb) + var(--vw) / 2 - var(--p) / 2); top: calc(var(--hs) - (var(--y1) - var(--ty)) * var(--iw) - var(--p) * 0.9475 + var(--iw) * 0.012); transform: translateY(12%); clip-path: inset(0 0 34.6% 0); }
.spot.is-peeking .spot__peek { opacity: 1; transform: none; }
.spot.no-peek .spot__peek { display: none; }
.spot.no-peek.is-peeking::after {
  content: ""; position: absolute; z-index: 1; width: calc(var(--w) * 0.38); aspect-ratio: 1; border-radius: 50%; background: var(--c-white); border: var(--border); box-shadow: 3px 3px 0 var(--c-ink);
}
.spot.no-peek.is-peeking[data-type="side"]::after { left: calc(var(--lb) + var(--vw) - var(--w) * 0.1); top: calc(var(--hs) - var(--vh) / 2); }
.spot.no-peek.is-peeking[data-type="top"]::after { left: calc(var(--w) / 2 - var(--w) * 0.19); top: calc(var(--hs) - var(--vh) - var(--w) * 0.3); }

.found { position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; align-content: center; gap: var(--s-4); background: rgba(21, 16, 15, 0.82); padding: var(--s-5); text-align: center; }
.found[hidden] { display: none; }
.found__stage { width: min(45vw, 11rem); aspect-ratio: 2 / 3; position: relative; }
.found__stage img { width: 100%; height: 100%; object-fit: contain; object-position: bottom; transform-origin: 50% 100%; }
.found__stage img.fx-crouch { transform: scale(1, 0.84); }
.found__stage img.fx-air { transform: translateY(-14%) rotate(-5deg) scale(1.08); }
.found__stage img.fx-land { transform: scale(1.1, 0.9); }
.found__stage img.fx-caught { transform: scale(1.04); }
.found__text { font-family: var(--font-display); font-size: var(--step-2); color: var(--c-paper); -webkit-text-stroke: 0; min-height: 1.3em; text-shadow: 3px 3px 0 var(--c-red); }
.found__text.shout { color: var(--c-gold); font-size: var(--step-3); animation: shake 0.16s linear 6; }

.status { margin-top: var(--s-5); font-size: var(--step-1); min-height: 1.7em; }
.score { display: flex; gap: var(--s-6); margin-top: var(--s-2); color: var(--text-muted); font-weight: 700; }
.score b { color: var(--text); font-family: var(--font-display); font-weight: 400; font-size: 1.2em; margin-left: 0.2em; }

/* ---------- FAQ ---------- */
.section--faq { background: var(--bg-sunk); border-top: var(--border); }
.faq details { border-bottom: 2px dashed var(--line); }
.faq details:first-child { border-top: var(--border); }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: var(--s-4); align-items: center; padding: var(--s-4) 0; min-height: 3.5rem; font-family: var(--font-display); font-size: var(--step-1); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; width: 2rem; height: 2rem; display: grid; place-items: center; background: var(--c-ink); color: var(--c-paper); border-radius: 50%; font-family: var(--font-body); font-weight: 900; transition: transform var(--dur-med) var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); background: var(--accent); color: var(--c-white); }
.faq details p { padding: 0 var(--s-8) var(--s-5) 0; color: var(--text-muted); max-width: 40rem; }

/* ---------- Closing ---------- */
.closing { background: var(--c-burgundy); color: var(--c-paper); border-block: var(--border); padding-block: var(--section-pad); overflow: clip; }
.closing::before { content: ""; position: absolute; inset: 0; opacity: 0.14; background: radial-gradient(#000 1.3px, transparent 1.7px) 0 0 / 12px 12px; pointer-events: none; }
.closing__grid { position: relative; display: grid; gap: var(--s-7); align-items: center; }
@media (min-width: 48rem) { .closing__grid { grid-template-columns: 15rem 1fr; gap: var(--s-9); } }
.closing__fig { position: relative; width: min(60%, 15rem); justify-self: center; }
.closing__fig img { filter: drop-shadow(6px 6px 0 rgba(0, 0, 0, 0.35)); }
.closing .lede { color: #f0dfd8; }
.closing .eyebrow__no { background: var(--c-gold); color: var(--c-ink); }
.closing .section-title em::after { background: var(--c-burgundy-deep); }
.hanko { position: absolute; right: 0; bottom: -0.5rem; width: 5.5rem; height: 5.5rem; display: grid; place-items: center; color: var(--c-red); border: 4px solid var(--c-red); border-radius: 50%; background: var(--c-paper); transform: rotate(-9deg); opacity: 0.92; }
.hanko.has-img { border: 0; background: var(--img-hanko, none) center / contain no-repeat; mix-blend-mode: multiply; }
.hanko.has-img svg { display: none; }
@media (min-width: 48rem) { .hanko { width: 7rem; height: 7rem; right: 2rem; bottom: 0; } .hanko svg { width: 4.5rem; height: 4.5rem; } }

/* ---------- Footer ---------- */
.footer { background: var(--c-ink); color: var(--c-paper); padding-block: var(--s-7); }
.footer__row { display: grid; gap: var(--s-5); }
.footer__brand { display: inline-flex; align-items: center; gap: var(--s-3); font-family: var(--font-display); font-size: 1.2rem; }
.footer nav { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); }
.footer nav a { text-decoration: none; display: inline-flex; align-items: center; min-height: 2.75rem; font-weight: 700; }
@media (hover: hover) { .footer nav a:hover { text-decoration: underline; text-underline-offset: 0.3em; text-decoration-color: var(--c-gold); } }
.footer__fine { color: #b9ada2; font-size: var(--step--1); }

/* ---------- Page-wide rage extras ---------- */
body::after { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 60; opacity: 0; transition: opacity var(--dur-med); background: radial-gradient(ellipse 80% 75% at 50% 50%, rgba(224, 37, 46, 0) 62%, rgba(224, 37, 46, 0.28) 100%); }
html.is-rage body::after { opacity: 1; }
html.is-rage main { animation: shake 0.16s linear infinite; }
.flash { position: fixed; inset: 0; z-index: 70; pointer-events: none; background: var(--c-red); opacity: 0; }
.flash.go { animation: flash 0.42s ease-out; }

/* ---------- Keyframes ---------- */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes flicker { from { transform: rotate(45deg) scale(0.9, 0.82); } to { transform: rotate(45deg) scale(1.08, 1.12); } }
@keyframes sheet { 0% { background-position: 0 0; } 25% { background-position: 100% 0; } 50% { background-position: 0 100%; } 75% { background-position: 100% 100%; } }
@keyframes tremble { 0% { transform: translate(-0.6%, 0.2%); } 50% { transform: translate(0.6%, -0.2%); } 100% { transform: translate(-0.4%, -0.3%); } }
@keyframes shake { 0% { transform: translate(2px, -1px); } 25% { transform: translate(-3px, 1px); } 50% { transform: translate(1px, 2px); } 75% { transform: translate(-2px, -2px); } 100% { transform: translate(2px, 1px); } }
@keyframes puff { 0% { opacity: 0; transform: translateY(0) scale(0.4); } 25% { opacity: 1; } 100% { opacity: 0; transform: translateY(-120%) scale(1.5); } }
@keyframes poof { 0% { opacity: 0; transform: translate(-50%, -50%) scale(0.4); } 26% { opacity: 1; transform: translate(-50%, -50%) scale(1); } 55% { opacity: 1; transform: translate(-50%, -50%) scale(1.08); } 100% { opacity: 0; transform: translate(-50%, -50%) scale(1.25); } }
@keyframes tape { to { transform: translateX(-50%); } }
@keyframes dots { 0%, 80%, 100% { transform: translateY(0); opacity: 0.4; } 40% { transform: translateY(-0.4rem); opacity: 1; } }
@keyframes nod { 0% { transform: translateY(0); } 40% { transform: translateY(4%); } 100% { transform: translateY(0); } }
@keyframes swap { from { opacity: 0; transform: translateY(0.6rem); } to { opacity: 1; transform: none; } }
@keyframes nope { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-4deg); } 75% { transform: rotate(4deg); } }
@keyframes flash { 0% { opacity: 0.55; } 100% { opacity: 0; } }

/* ---------- Reduced motion: a complete, static page ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
  .tape { transform: none; }
  .tape__track { width: auto; flex-wrap: wrap; }
  .tape__group:nth-child(2) { display: none; }
  .tape__group { flex-wrap: wrap; }
  .stage[data-state="hold"] .stage__rays { transform: none; }
}

/* ---------- Language switch ---------- */
.lang-switch { display: inline-flex; border: 2px solid var(--line); border-radius: var(--r-pill); overflow: hidden; background: var(--surface); flex: none; }
.lang-switch button { min-height: 2.75rem; min-width: 2.75rem; padding: 0 0.7rem; border: 0; background: transparent; font-weight: 900; font-size: 0.82rem; cursor: pointer; color: var(--c-ink); }
.lang-switch button + button { border-left: 2px solid var(--line); }
.lang-switch button[aria-pressed="true"] { background: var(--c-ink); color: var(--c-paper); }
@media (max-width: 26rem) { .lang-switch button { padding: 0 0.5rem; font-size: 0.75rem; } .brand__name { font-size: 1rem; } }

/* ---------- Japanese typesetting ---------- */
html.lang-ja body { line-height: 1.75; line-break: strict; }
html.lang-ja h1, html.lang-ja h2, html.lang-ja h3 { letter-spacing: 0; line-height: 1.22; word-break: keep-all; overflow-wrap: break-word; }
html.lang-ja .hero h1 { line-height: 1.12; }
html.lang-ja .lede, html.lang-ja .stop__text, html.lang-ja .order p { letter-spacing: 0.02em; }
html.lang-ja .eyebrow, html.lang-ja .tag, html.lang-ja dt, html.lang-ja .mood, html.lang-ja .msg__who, html.lang-ja .forecast__label { letter-spacing: 0.04em; }
/* the accent-word marker: Latin letters leave room below the baseline, Japanese glyphs fill the square,
   so in Japanese the marker sits lower and thinner, like an underline stroke */
html.lang-ja .section-title em::after, html.lang-ja h1 em::after, html.lang-ja .order h3 em::after {
  inset: 56% 0 0.04em 0; transform: rotate(-0.8deg);
}
html.lang-ja .closing .section-title em::after, html.lang-ja .facts .section-title em::after { background: rgba(217, 165, 58, 0.38); }
/* small screens: brand, language switch and menu share one line */
@media (max-width: 30rem) {
  .header__row { gap: 0.6rem; }
  .brand { gap: 0.5rem; }
  .brand__name { white-space: nowrap; }
}
@media (max-width: 24rem) {
  .brand__crest { width: 2.1rem; height: 2.1rem; }
  .brand__name { font-size: 0.88rem; }
  .lang-switch button { min-width: 2.4rem; padding: 0 0.4rem; font-size: 0.72rem; }
  .menu summary { width: 2.75rem; height: 2.75rem; }
}
