/* =========================================================
   Lemon Squeezer by Mooskha
   Palette: trench mud, field grey, System paper, ribbon green,
   flare light, rust. Type: Big Shoulders Stencil (stamped crates),
   Big Shoulders (Michael's voice), Pixelify Sans (the System).
   ========================================================= */

@font-face {
  font-family: "Big Shoulders Stencil";
  src: url("../fonts/big-shoulders-stencil.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Big Shoulders";
  src: url("../fonts/big-shoulders.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Pixelify Sans";
  src: url("../fonts/pixelify-sans.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --mud: #2B2118;
  --mud-deep: #1B1510;
  --clay: #5B4632;
  --feldgrau: #7B7E6A;
  --paper: #DDD4AF;
  --paper-hi: #EFE8CC;
  --ribbon: #1F5E3A;
  --ribbon-deep: #154229;
  --flare: #F3A73C;
  --rust: #A63C24;
  --brass: #CFA548;
  --ink: #22190F;

  --f-stencil: "Big Shoulders Stencil", "Big Shoulders", Impact, "Arial Narrow", sans-serif;
  --f-narr: "Big Shoulders", "Arial Narrow", sans-serif;
  --f-sys: "Pixelify Sans", "Courier New", monospace;

  /* type scale, perfect fourth */
  --t-xs: .8125rem;
  --t-s: 1rem;
  --t-m: 1.3125rem;
  --t-l: 1.75rem;
  --t-xl: 2.375rem;
  --t-2xl: 3.125rem;

  --pad: clamp(1.25rem, 4vw, 3.5rem);
  --topbar-h: 64px;
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--mud-deep);
  color: var(--paper);
  font-family: var(--f-narr);
  font-size: var(--t-m);
  line-height: 1.4;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg, canvas { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
a { color: inherit; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-weight: 800; }

:focus-visible { outline: 3px solid var(--flare); outline-offset: 4px; }

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 200;
  background: var(--paper); color: var(--ink); padding: .6rem 1rem;
  font-family: var(--f-sys); text-decoration: none;
}
.skip:focus { top: 1rem; }

.js body.is-loading { overflow: hidden; }

/* ---------- The System's voice ---------- */
.sys {
  --sys-bg: 221 212 175;
  position: relative;
  font-family: var(--f-sys);
  font-size: 1rem;
  line-height: 1.45;
  color: var(--ribbon);
  background:
    radial-gradient(120% 80% at 50% 110%, rgba(255, 248, 214, .55), rgba(255, 248, 214, 0) 60%),
    rgb(var(--sys-bg) / .93);
  border: 2px solid #A39A74;
  box-shadow: inset 0 0 0 1px rgba(255, 252, 235, .5), 0 0 0 1px rgba(34, 25, 15, .35), 0 18px 40px -18px rgba(0, 0, 0, .7);
  padding: 1rem 1.15rem;
}
.sys::before {
  /* paper grain */
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .22; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .3 0 0 0 0 .2 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}
.sys__line + .sys__line { margin-top: .35em; }
.sys__line--loud { font-weight: 700; }
.sys__quip { margin-top: .75rem; min-height: 2.9em; }
.sys .typed-caret {
  display: inline-block; width: .55em; height: 1em; margin-left: 2px; vertical-align: -.12em;
  background: currentColor; animation: caret 1s steps(1) infinite;
}
@keyframes caret { 50% { opacity: 0; } }
.sr-only {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
/* panels fade in when the System starts typing */
.sys[data-type] { transition: opacity .35s ease, translate .35s var(--ease-out); }
.js .sys[data-type]:not([data-typed]) { opacity: 0; translate: 0 8px; }
/* lines waiting to be typed */
.js .sys[data-type] .sys__line.is-pending { visibility: hidden; }
.js .sys--hero .sys__line.is-pending,
.js .sys--sheet .sys__line.is-pending,
.js .sys--auction .sys__line.is-pending,
.js .sys--card .sys__line.is-pending { display: none; }

/* ---------- Shared ---------- */
.sec-title {
  font-family: var(--f-stencil);
  font-weight: 800;
  font-size: clamp(2.75rem, 7vw, 6rem);
  line-height: .88;
  letter-spacing: .005em;
}
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: .7rem 1.4rem;
  font-family: var(--f-narr); font-weight: 700; font-size: 1.25rem; letter-spacing: .01em;
  text-decoration: none; border: 3px solid var(--ink);
  transition: transform .18s var(--ease-out), box-shadow .18s var(--ease-out), background-color .18s;
}
.btn--flare { background: var(--flare); color: var(--ink); box-shadow: 5px 5px 0 var(--ink); }
.btn--flare:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--ink); }
.btn--flare:active { transform: translate(3px, 3px); box-shadow: 2px 2px 0 var(--ink); }
.btn--ghost { color: var(--paper); border-color: var(--paper); background: rgba(27, 21, 16, .35); }
.btn--ghost:hover { background: var(--paper); color: var(--ink); }

/* ---------- Loader: the door ---------- */
.loader {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center; align-content: center; gap: 2.2rem;
  background: radial-gradient(60% 50% at 50% 46%, #2A2018 0%, #140F0B 70%);
  transition: opacity .7s ease, visibility .7s;
}
html:not(.js) .loader { display: none; }
.loader.is-gone { opacity: 0; visibility: hidden; pointer-events: none; }
.loader__stage { position: relative; perspective: 900px; }
.loader__door {
  position: relative; width: min(42vw, 200px); aspect-ratio: 260 / 440;
  border: 12px solid #3A2A1E; border-bottom: 0;
  box-shadow: 0 0 0 3px #120D09, 0 0 60px rgba(243, 167, 60, .12);
}
.loader__light {
  position: absolute; inset: 0;
  background: linear-gradient(#FFE6B5, #F3A73C);
  box-shadow: 0 0 40px 6px rgba(243, 167, 60, .55);
  opacity: .9;
}
.loader__leaf {
  position: absolute; inset: 2px 3px 0 3px;
  transform-origin: left center;
  transform: rotateY(0deg);
  transition: transform 1.3s cubic-bezier(.55, 0, .3, 1);
  box-shadow: 0 0 0 2px #120D09;
}
.loader__leaf svg { width: 100%; height: 100%; }
.loader__floor {
  position: absolute; left: 50%; bottom: -8px; width: 160%; height: 16px; transform: translateX(-50%);
  background: radial-gradient(50% 50% at 50% 0%, rgba(243, 167, 60, .65), transparent 70%);
}
.loader.is-open .loader__leaf { transform: rotateY(-108deg); }
.loader.is-open .loader__stage { animation: door-push 1.4s .5s cubic-bezier(.6, 0, .4, 1) forwards; }
@keyframes door-push { to { transform: scale(9); } }
.loader.is-open .loader__readout { opacity: 0; transition: opacity .3s; }
.door__keyhole { animation: keyhole 1.6s ease-in-out infinite; }
@keyframes keyhole { 50% { fill: #FFE9B8; } }
.loader__readout { width: min(86vw, 420px); font-family: var(--f-sys); color: var(--paper); text-align: center; }
.loader__line { font-size: 1.125rem; }
.loader__quip { margin-top: .35rem; color: #A89F7E; min-height: 1.5em; }
.loader__bar { margin-top: 1rem; height: 12px; border: 2px solid var(--paper); padding: 2px; }
.loader__bar span { display: block; height: 100%; width: 0; background: var(--flare); }

/* ---------- Topbar + XP ---------- */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  height: var(--topbar-h);
  display: flex; align-items: center; gap: clamp(.75rem, 2.5vw, 2rem);
  padding: 0 var(--pad);
  transition: background-color .35s, box-shadow .35s;
}
.topbar.is-solid { background: rgba(27, 21, 16, .88); box-shadow: 0 1px 0 rgba(221, 212, 175, .12); backdrop-filter: blur(6px); }
.topbar__brand { font-family: var(--f-stencil); font-weight: 800; font-size: 1.75rem; text-decoration: none; letter-spacing: .02em; }
.xp { display: flex; align-items: center; gap: .6rem; font-family: var(--f-sys); font-size: .9375rem; flex: 0 1 220px; }
.xp__lvl { white-space: nowrap; }
.xp__track { flex: 1; height: 10px; border: 2px solid var(--paper); padding: 1px; min-width: 70px; }
.xp__fill { display: block; height: 100%; width: 0; background: var(--flare); transition: width .25s linear; }
.topbar__nav { margin-left: auto; display: flex; gap: 1.5rem; }
.topbar__nav a { font-weight: 700; font-size: 1.125rem; text-decoration: none; padding: .35rem 0; border-bottom: 2px solid transparent; }
.topbar__nav a:hover { border-bottom-color: var(--flare); }
.sound {
  display: inline-flex; align-items: center; gap: .4rem; background: none; border: 2px solid rgba(221, 212, 175, .45);
  padding: .35rem .6rem; cursor: pointer; font-family: var(--f-sys); font-size: .875rem;
}
.sound:hover { border-color: var(--paper); }
.sound svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sound__cone { fill: currentColor; }
.sound[aria-pressed="false"] .sound__waves { display: none; }
.sound[aria-pressed="true"] .sound__off { display: none; }

/* ---------- Toasts ---------- */
.toasts {
  position: fixed; z-index: 60; right: var(--pad); top: calc(var(--topbar-h) + .5rem);
  display: grid; gap: .5rem; justify-items: end; pointer-events: none;
}
.toast {
  font-family: var(--f-sys); font-size: .9375rem; color: var(--ribbon);
  background: rgba(221, 212, 175, .96); border: 2px solid #A39A74; padding: .5rem .8rem;
  box-shadow: 0 10px 24px -12px rgba(0, 0, 0, .8);
  animation: toast-in .35s var(--ease-spring) both, toast-out .4s ease 3.2s forwards;
}
.toast b { color: var(--rust); font-weight: 700; }
@keyframes toast-in { from { transform: translateY(-12px) scale(.96); opacity: 0; } }
@keyframes toast-out { to { transform: translateY(-8px); opacity: 0; } }

/* =========================================================
   1. HERO
   ========================================================= */
.hero {
  --parapet-h: clamp(130px, 22vh, 220px);
  --lx: 72%; --ly: 70%;
  --flare-k: 0;
  position: relative; min-height: 100vh; min-height: 100svh; overflow: hidden; isolation: isolate;
  background: #151A26; color: var(--paper);
}
.hero__scene { position: absolute; inset: 0; z-index: 0; }
.hero__sky { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__sky .layer { transition: transform .6s var(--ease-out); }
.hero__sky .flash { opacity: 0; }
.hero__sky .flash.is-on { animation: flash 1.1s ease-out; }
@keyframes flash { 0% { opacity: 0; } 8% { opacity: 1; } 30% { opacity: .35; } 100% { opacity: 0; } }
.sky__stars circle { animation: twinkle 4s ease-in-out infinite; }
.sky__stars circle:nth-child(3n) { animation-duration: 5.5s; }
.sky__stars circle:nth-child(4n) { animation-duration: 3.2s; animation-delay: -1s; }
@keyframes twinkle { 50% { opacity: .1; } }

.hero__smoke { position: absolute; inset: 0; pointer-events: none; }
.hero__smoke span {
  position: absolute; width: 70vw; height: 26vh; left: -20vw;
  background: radial-gradient(closest-side, rgba(150, 128, 108, .26), rgba(150, 128, 108, 0));
  animation: drift 70s linear infinite;
}
.hero__smoke span:nth-child(1) { top: 46%; }
.hero__smoke span:nth-child(2) { top: 58%; animation-duration: 95s; animation-delay: -40s; width: 90vw; }
.hero__smoke span:nth-child(3) { top: 34%; animation-duration: 120s; animation-delay: -70s; opacity: .7; }
@keyframes drift { from { transform: translateX(-30vw); } to { transform: translateX(130vw); } }

.hero__flare {
  position: absolute; left: 0; top: 0; z-index: 1; width: 0; height: 0;
  opacity: 0; will-change: transform;
}
.flare__spark {
  position: absolute; left: -5px; top: -5px; width: 10px; height: 10px; border-radius: 50%;
  background: #FFF4D6; box-shadow: 0 0 10px 4px #FFD58A, 0 0 40px 16px rgba(243, 167, 60, .7);
}
.flare__chute {
  position: absolute; left: -14px; top: -34px; width: 28px; height: 14px;
  border-radius: 14px 14px 2px 2px; background: rgba(221, 212, 175, .55);
}
.flare__chute::after {
  content: ""; position: absolute; left: 2px; right: 2px; top: 12px; height: 16px;
  border-left: 1px solid rgba(221, 212, 175, .45); border-right: 1px solid rgba(221, 212, 175, .45);
  clip-path: polygon(0 0, 100% 0, 60% 100%, 40% 100%);
}
.hero__flareglow {
  position: absolute; z-index: 1; left: 0; top: 0; width: 120vmax; height: 120vmax; margin: -60vmax 0 0 -60vmax;
  background: radial-gradient(closest-side, rgba(255, 214, 140, .2), rgba(243, 167, 60, .06) 45%, rgba(243, 167, 60, 0) 70%);
  opacity: 0; pointer-events: none; will-change: transform, opacity;
}

.hero__parapet {
  position: absolute; z-index: 2; left: -40px; right: -40px; bottom: -6px; height: var(--parapet-h);
  background: url("../img/sandbags-night.svg") repeat-x left bottom / auto 100%;
  filter: drop-shadow(0 -8px 18px rgba(0, 0, 0, .45));
}

.hero__michael {
  position: absolute; z-index: 3;
  right: clamp(4%, 9vw, 14%);
  bottom: calc(var(--parapet-h) - clamp(26px, 4vw, 52px));
  width: clamp(200px, 25vw, 380px);
  padding: 0; border: 0; background: none; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.hero__michael svg { width: 100%; height: auto; overflow: visible; }
.michael__head { transition: transform .45s var(--ease-spring); }
.michael__hands { transition: transform .45s var(--ease-spring); }
.hero__michael:hover .michael__head, .hero__michael.is-curious .michael__head { transform: translateY(-26px); }
.hero__michael.is-ducking .michael__head { transform: translateY(170px); transition: transform .22s cubic-bezier(.6, 0, .9, .4); }
.hero__michael.is-ducking .michael__hands { transform: translateY(26px); transition: transform .22s ease-in; }
.mouth--grin { opacity: 0; }
.hero__michael:hover .mouth--grin, .hero__michael.is-curious .mouth--grin { opacity: 1; }
.hero__michael:hover .mouth--idle, .hero__michael.is-curious .mouth--idle { opacity: 0; }
.hero__michael:hover .brows, .hero__michael.is-curious .brows { transform: translateY(-6px); }
.brows { transition: transform .3s var(--ease-out); }

/* blinking */
.eye { transform-box: fill-box; transform-origin: center; animation: blink 5.2s infinite; }
.mate--gunther .eye { animation-duration: 6.4s; }
.mate--belinda .eye { animation-duration: 4.6s; animation-delay: -1.3s; }
.mate--frantz .eye { animation-duration: 3.9s; animation-delay: -2s; }
.mate--karl .eye { animation-duration: 5.7s; animation-delay: -.7s; }
.pig .eye { animation-duration: 4.2s; }
@keyframes blink { 0%, 95.5%, 100% { transform: scaleY(1); } 97.5% { transform: scaleY(.08); } }
.pupil { transition: translate .12s linear; }
[data-head] { transform-box: fill-box; transform-origin: 50% 85%; transition: rotate .3s var(--ease-out); }
.hero__michael .michael__head { transition: transform .45s var(--ease-spring), rotate .3s var(--ease-out); }
.hero__michael.is-ducking .michael__head { transition: transform .22s cubic-bezier(.6, 0, .9, .4), rotate .3s; }

.hero__lamp {
  position: absolute; inset: 0; z-index: 4; pointer-events: none;
  background: radial-gradient(circle at var(--lx) var(--ly),
    rgba(255, 196, 120, .16) 0, rgba(255, 196, 120, .05) 9vmax, rgba(12, 9, 6, 0) 14vmax, rgba(12, 9, 6, .55) 46vmax);
  opacity: calc(1 - var(--flare-k) * .75);
  will-change: opacity;
}

.hero__content {
  position: relative; z-index: 5;
  padding: calc(var(--topbar-h) + clamp(2rem, 8vh, 6rem)) var(--pad) 0;
  max-width: min(100%, 980px);
}
.hero__title {
  font-family: var(--f-stencil); font-weight: 900;
  font-size: clamp(4.25rem, 12vw, 10.75rem); line-height: .8;
  letter-spacing: -.005em; color: var(--paper);
  text-shadow: 0 4px 0 rgba(0, 0, 0, .35);
  max-width: 7ch; margin-bottom: .2em;
}
.hero__genre { margin-top: .6rem; font-family: var(--f-narr); font-weight: 600; font-size: 1.25rem; letter-spacing: .01em; color: var(--flare); }
.hero__hook { margin-top: 1rem; font-size: clamp(1.375rem, 2.2vw, 1.875rem); line-height: 1.2; font-weight: 500; max-width: 31ch; }
.hero__ctas { margin-top: 1.75rem; display: flex; flex-wrap: wrap; gap: 1rem; }

.sys--hero {
  position: absolute; z-index: 5;
  right: var(--pad); top: calc(var(--topbar-h) + clamp(1.5rem, 6vh, 4rem));
  width: min(380px, 32vw);
}
.hero__next {
  position: absolute; z-index: 5; left: 50%; bottom: 1.1rem; transform: translateX(-50%);
  font-family: var(--f-sys); font-size: .875rem; color: var(--paper); text-decoration: none; white-space: nowrap;
  background: rgba(18, 13, 9, .72); padding: .3rem .7rem; opacity: .9; animation: nudge 2.6s ease-in-out infinite;
}
.hero__next:hover { opacity: 1; color: var(--flare); }
@keyframes nudge { 50% { transform: translate(-50%, 5px); } }

/* =========================================================
   2. DOSSIER
   ========================================================= */
.dossier {
  position: relative; overflow: hidden;
  padding: clamp(5rem, 12vh, 8rem) var(--pad) clamp(3rem, 8vh, 5rem);
  background:
    radial-gradient(70% 55% at 38% 42%, rgba(243, 181, 98, .26), rgba(243, 181, 98, 0) 70%),
    repeating-linear-gradient(92deg, rgba(0, 0, 0, .06) 0 2px, transparent 2px 13px),
    linear-gradient(180deg, #3E2A1D, #4A3324 30%, #3B281B);
}
.desk::before {
  /* the green desk blotter */
  content: ""; position: absolute; left: -3%; right: -2%; top: -4%; bottom: -5%;
  background: #33402F; box-shadow: inset 0 0 0 6px #2B3528, inset 0 0 80px rgba(0, 0, 0, .35);
  opacity: .55; transform: rotate(-.6deg);
}
.dossier__inner {
  position: relative; max-width: 1360px; margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(300px, .9fr); column-gap: clamp(1.5rem, 4vw, 4rem); row-gap: 2.5rem;
  align-items: start;
}
.dossier__intro { grid-column: 1 / -1; }
.dossier__title {
  font-family: var(--f-narr); font-weight: 800; font-size: clamp(2.25rem, 5.2vw, 4.75rem); line-height: .95;
  max-width: 19ch; color: var(--paper-hi);
}
.dossier__sub { margin-top: 1rem; font-size: clamp(1.25rem, 2vw, 1.625rem); color: var(--flare); font-weight: 600; }
.dossier__foot { position: relative; max-width: 1360px; margin: 3rem auto 0; font-family: var(--f-sys); font-size: 1rem; color: #C9BC94; }

.desk-wrap { position: relative; min-width: 0; }
.desk { position: relative; width: 760px; height: 680px; transform-origin: 0 0; }
.desk__item {
  position: absolute; margin: 0;
  transform: translate(var(--dx, 0px), var(--dy, 0px)) rotate(var(--r, 0deg));
  filter: drop-shadow(6px 10px 0 rgba(0, 0, 0, .28));
  transition: filter .2s;
}
.desk__item[data-drag] { cursor: grab; touch-action: auto; }
.desk__item.is-dragging { cursor: grabbing; filter: drop-shadow(14px 22px 6px rgba(0, 0, 0, .35)); z-index: 20; }
.desk__photo { --r: -7deg; left: 1%; top: 2%; width: 200px; }
.desk__photo svg { width: 100%; height: auto; }
.desk__clip {
  --r: 3deg; left: 31%; top: 0; width: 300px; padding: 14px 16px 16px;
  background: #E6DEC8; color: #2A241C;
  clip-path: polygon(0 2%, 6% 0, 18% 2%, 30% 0, 45% 1.5%, 60% 0, 74% 2%, 88% 0, 100% 1%, 99% 30%, 100% 62%, 98.5% 100%, 80% 98.5%, 60% 100%, 40% 98%, 20% 100%, 0 98.5%, 1% 60%, 0 30%);
}
.clip__mast { font-family: var(--f-stencil); font-weight: 700; font-size: .9375rem; letter-spacing: .04em; border-bottom: 2px solid #2A241C; padding-bottom: 4px; }
.clip__head { margin-top: 8px; font-family: var(--f-narr); font-weight: 900; font-size: 1.75rem; line-height: .95; }
.clip__img { margin-top: 10px; }
.clip__img svg { width: 100%; height: auto; }
.clip__deck { margin-top: 8px; font-size: 1rem; line-height: 1.3; font-weight: 500; }
.desk__file {
  --r: -2deg; left: 5%; top: 57%; width: 430px; padding: 44px 26px 24px;
  background: #D7B979; color: #3A2C1A;
  box-shadow: inset 0 0 0 2px rgba(58, 44, 26, .25);
}
.file__tab {
  position: absolute; left: 22px; top: -26px; padding: 4px 16px 6px; background: #D7B979;
  font-family: var(--f-stencil); font-weight: 800; font-size: 1.125rem; border-radius: 6px 6px 0 0;
}
.file__form { margin: 0; display: grid; gap: 8px; }
.file__form > div { display: grid; grid-template-columns: 6.5rem 1fr; align-items: baseline; border-bottom: 1px solid rgba(58, 44, 26, .35); padding-bottom: 4px; }
.file__form dt { font-weight: 700; font-size: 1rem; }
.file__form dd { margin: 0; font-family: var(--f-sys); font-size: 1.0625rem; color: var(--ribbon-deep); }
.file__sign { width: 170px; margin-top: 12px; }
.stamp-mark {
  position: absolute; right: 22px; bottom: 26px;
  font-family: var(--f-stencil); font-weight: 900; font-size: 2.6rem; line-height: 1; color: var(--rust);
  border: 4px solid var(--rust); padding: 4px 12px 6px; transform: rotate(-11deg);
  mix-blend-mode: multiply; opacity: .88;
}
.js .stamp-mark { opacity: 0; transform: rotate(-11deg) scale(1.6); }
.js .stamp-mark.is-stamped { opacity: .88; transform: rotate(-11deg) scale(1); transition: transform .12s ease-in, opacity .05s; }
.stamp {
  position: absolute; left: 5%; top: 57%; width: 430px; height: 300px; pointer-events: none; z-index: 15;
  display: none;
}
.js .stamp { display: block; }
.stamp__handle, .stamp__base { position: absolute; right: 50px; }
.stamp__base { bottom: 30px; width: 150px; height: 44px; background: #4A3324; border: 3px solid var(--ink); border-bottom: 10px solid var(--rust); }
.stamp__handle { bottom: 74px; right: 98px; width: 54px; height: 90px; background: #6B4A30; border: 3px solid var(--ink); border-radius: 26px 26px 6px 6px; }
.stamp { opacity: 0; transform: translate(80px, -220px) rotate(14deg); }
.stamp.is-hit { animation: stamp-hit 1.1s cubic-bezier(.5, 0, .2, 1) forwards; }
@keyframes stamp-hit {
  0% { opacity: 0; transform: translate(80px, -220px) rotate(14deg); }
  35% { opacity: 1; transform: translate(6px, -60px) rotate(-6deg); }
  50% { opacity: 1; transform: translate(0, 0) rotate(-11deg); }
  62% { opacity: 1; transform: translate(0, 0) rotate(-11deg); }
  100% { opacity: 0; transform: translate(120px, -260px) rotate(10deg); }
}
.desk.is-thump { animation: thump .25s ease-out; }
@keyframes thump { 30% { translate: 0 4px; } }

.desk__pills { --r: 4deg; left: 66%; top: 52%; width: 150px; }
.desk__pills svg { width: 100%; height: auto; }
.desk__glass { --r: -3deg; left: 70%; top: 26%; width: 76px; }
.desk__glass svg { width: 100%; height: auto; }
.desk__label {
  position: absolute; left: 70%; top: 66%; white-space: nowrap; transform: rotate(6deg);
  font-family: var(--f-narr); font-weight: 600; font-size: .9375rem; background: #EFE8CC; color: #3A2C1A; padding: 2px 8px;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, .25);
}
.desk__ash { --r: 0deg; left: 68%; top: 78%; width: 170px; }
.desk__ash svg { width: 100%; height: auto; }
.smoke { position: absolute; left: 88%; top: 8%; width: 30px; height: 120px; pointer-events: none; }
.smoke i {
  position: absolute; bottom: 0; left: 8px; width: 14px; height: 14px; border-radius: 50%;
  background: rgba(230, 224, 208, .55); filter: blur(3px);
  animation: smoke 4.5s linear infinite;
}
.smoke i:nth-child(2) { animation-delay: -1.5s; }
.smoke i:nth-child(3) { animation-delay: -3s; }
@keyframes smoke {
  0% { transform: translate(0, 0) scale(.6); opacity: 0; }
  15% { opacity: .9; }
  100% { transform: translate(-14px, -120px) scale(2.6); opacity: 0; }
}

.sys--sheet { margin-top: .5rem; position: sticky; top: calc(var(--topbar-h) + 1.5rem); }
.stats { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: 4px; }
.stat {
  width: 100%; display: grid; grid-template-columns: 7.2rem 1fr 5.9rem; align-items: center; gap: .6rem;
  background: none; border: 0; padding: 5px 6px; margin: 0 -6px; cursor: help; text-align: left;
  font-family: var(--f-sys); font-size: 1rem; color: var(--ribbon);
}
.stat:hover, .stat:focus-visible, .stat.is-active { background: rgba(31, 94, 58, .1); }
.stat__bar { height: 14px; border: 2px solid var(--ribbon); padding: 1px; }
.stat__bar i { display: block; height: 100%; width: calc(var(--v) * 100%); background: var(--ribbon); transition: width 1.1s var(--ease-out); }
.js .sys--sheet:not(.is-filled) .stat__bar i { width: calc(var(--from, 0) * 100%); }
.stat__bar--hp i { background: var(--rust); }
.stat__bar--low i { background: #7E8A55; }
.stat__val { text-align: right; font-weight: 700; }
.stat__coins { display: flex; gap: 3px; }
.stat__coins i { width: 14px; height: 14px; border-radius: 50%; background: #C9CCC4; border: 2px solid var(--ribbon-deep); }

/* =========================================================
   3. THE GANG
   ========================================================= */
.gang {
  position: relative; overflow: hidden; isolation: isolate;
  min-height: 100vh; min-height: 100svh;
  padding: clamp(5rem, 11vh, 7rem) var(--pad) 0;
  color: var(--ink);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 420px); grid-template-rows: auto 1fr auto;
  column-gap: 2rem;
}
.gang__bg { position: absolute; inset: 0; z-index: -1; }
.gang__sky { position: absolute; inset: 0 0 auto; height: 34%; background: linear-gradient(#9FA8A6, #CFC6A9 80%, #DCCFA8); }
.gang__parapet {
  position: absolute; left: -30px; right: -30px; top: calc(34% - 62px); height: 104px;
  background: url("../img/sandbags-dawn.svg") repeat-x left top / auto 100%;
}
.gang__wall {
  position: absolute; left: 0; right: 0; top: calc(34% + 36px); bottom: 64px;
  background: url("../img/revetment.svg") repeat left top / 240px 240px;
  box-shadow: inset 0 26px 30px -16px rgba(0, 0, 0, .45);
}
.gang__wall::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(40, 30, 20, .0), rgba(40, 30, 20, .35)); }
.gang__dugout {
  position: absolute; left: 3%; bottom: 64px; width: clamp(90px, 9vw, 150px); height: clamp(150px, 26vh, 230px);
  background: linear-gradient(#0F0B08, #1A130E); border: 14px solid #4E3A28; border-bottom: 0;
}
.gang__dugout::after {
  content: ""; position: absolute; left: -4px; right: 30%; top: 0; height: 80%;
  background: #6B5A3C; clip-path: polygon(0 0, 100% 0, 80% 100%, 0 96%); opacity: .9;
}
.gang__lamp { position: absolute; right: 30%; top: calc(34% + 70px); width: 22px; height: 34px; background: #8D928A; border: 3px solid var(--ink); border-radius: 4px 4px 8px 8px; }
.gang__lamp i { position: absolute; left: 50%; top: 60%; width: 260px; height: 260px; margin: -130px 0 0 -130px; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 214, 150, .5), rgba(255, 214, 150, 0)); animation: lampflick 3s infinite; }
@keyframes lampflick { 40% { opacity: 1; } 42% { opacity: .75; } 44% { opacity: 1; } 70% { opacity: .9; } }
.gang__floor { position: absolute; left: 0; right: 0; bottom: 0; height: 66px; background: url("../img/duckboards.svg") repeat-x left top / auto 100%; box-shadow: 0 -6px 0 rgba(0, 0, 0, .25); }

.gang__head { grid-column: 1; grid-row: 1; display: grid; gap: 1.25rem; justify-items: start; }
.gang__title { color: var(--ink); font-size: clamp(2.6rem, 5.4vw, 4.9rem); }
.sys--auction { max-width: 440px; }
.sys--card { grid-column: 2; grid-row: 1 / span 2; align-self: start; min-height: 260px; }
.sheet[hidden] { display: none; }
.card__hint { margin-top: .9rem; padding-top: .6rem; border-top: 1px dashed rgba(31, 94, 58, .45); font-size: .875rem; color: #4E6B4F; }

.gang__line {
  grid-column: 1 / -1; grid-row: 2;
  align-self: end; position: relative; z-index: 2;
  display: flex; align-items: flex-end; justify-content: center; gap: clamp(0rem, 1.5vw, 1.5rem);
  margin-bottom: -6px;
  --mate-h: clamp(250px, 48vh, 520px);
}
.mate {
  position: relative; flex: 0 0 auto; height: var(--mate-h); width: calc(var(--mate-h) * .52);
  padding: 0; border: 0; background: none; cursor: pointer; color: var(--ink);
  -webkit-tap-highlight-color: transparent;
}
.mate--gunther { width: calc(var(--mate-h) * .565); }
.mate svg { width: 100%; height: 100%; overflow: visible; }
.mate::after {
  /* the spotlight under the selected member */
  content: ""; position: absolute; left: 6%; right: 6%; bottom: 2px; height: 18px; border-radius: 50%;
  background: rgba(0, 0, 0, .35); z-index: -1;
}
.mate.is-selected::after { background: radial-gradient(closest-side, rgba(243, 167, 60, .85), rgba(243, 167, 60, 0)); height: 26px; bottom: -4px; }
.mate__name {
  position: absolute; left: 50%; bottom: -1.9rem; transform: translateX(-50%); white-space: nowrap;
  font-family: var(--f-narr); font-weight: 700; font-size: 1rem; color: var(--paper);
  opacity: 0; transition: opacity .2s;
}
.mate:hover .mate__name, .mate:focus-visible .mate__name, .mate.is-selected .mate__name { opacity: 1; }
.mate:focus-visible { outline-offset: 0; }

.char-body { transform-box: fill-box; transform-origin: 50% 100%; animation: breathe 3.6s ease-in-out infinite; }
.mate--gunther .char-body { animation-duration: 4.4s; }
.mate--frantz .char-body { animation-duration: 3.1s; }
@keyframes breathe { 50% { transform: scaleY(1.018) scaleX(.995); } }
.arm { transform-box: fill-box; transition: transform .35s var(--ease-spring); }

.mate .steam path { animation: steam 2.4s ease-in-out infinite; }
.mate .steam path:nth-child(2) { animation-delay: -1.2s; }
@keyframes steam { 0% { transform: translateY(6px); opacity: 0; } 40% { opacity: .8; } 100% { transform: translateY(-14px); opacity: 0; } }

/* reactions */
.mate--professor .arm--lecture { transform-origin: 20% 4%; }
.mate--professor.is-react .arm--lecture { transform: rotate(-150deg); }
.mate--professor.is-react .glint { opacity: 1; transition: opacity .1s .1s; }
.mate--professor.is-react .brows { transform: translateY(-4px); }
.mate--gunther .arm--l { transform-origin: 80% 6%; }
.mate--gunther .arm--r { transform-origin: 20% 6%; }
.mate--gunther.is-react .arm--l { transform: rotate(48deg); }
.mate--gunther.is-react .arm--r { transform: rotate(-48deg); }
.mate--gunther .mouth--shout { opacity: 0; }
.mate--gunther.is-react .mouth--shout { opacity: 1; }
.mate--gunther.is-react .mouth--idle { opacity: 0; }
.mate--belinda .mouth--grin, .mate--belinda .spark { opacity: 0; }
.mate--belinda.is-react .mouth--grin, .mate--belinda.is-react .spark { opacity: 1; }
.mate--belinda.is-react .mouth--idle { opacity: 0; }
.mate--belinda.is-react .spark { animation: spark .18s steps(2) infinite; transform-box: fill-box; transform-origin: center; }
@keyframes spark { 50% { transform: scale(1.35) rotate(20deg); } }
.mate--belinda.is-react .brows { transform: translateY(-4px); }
.mate--frantz .arm--grab { transform-origin: 20% 10%; }
.mate--frantz.is-react .arm--grab { transform: rotate(-58deg) translateX(10px); }
.mate--frantz .monocle { transform-box: fill-box; transform-origin: center; transition: transform .3s var(--ease-spring); }
.mate--frantz.is-react .monocle { transform: scale(1.45); }
.mate--karl .arm--finger { transform-origin: 0% 100%; }
.mate--karl.is-react .arm--finger { animation: wag .32s ease-in-out 3; }
@keyframes wag { 50% { transform: rotate(-16deg); } }
.mate--karl .char-jump { transform-box: fill-box; transform-origin: 50% 100%; }
.mate--karl.is-react .char-jump { animation: hop .5s ease-out 2; }
@keyframes hop { 40% { transform: translateY(-14px); } }

.bubble {
  position: absolute; left: 50%; bottom: calc(100% - 4%); z-index: 4;
  width: max-content; max-width: 220px; padding: .55rem .8rem .6rem;
  font-family: var(--f-narr); font-weight: 700; font-size: 1.125rem; line-height: 1.15; color: var(--ink); text-align: center;
  background: #F6F0DC; border: 3px solid var(--ink); border-radius: 18px;
  transform: translate(-50%, 8px) scale(.6); opacity: 0; pointer-events: none;
  transition: transform .25s var(--ease-spring), opacity .15s;
}
.bubble::after {
  content: ""; position: absolute; left: 50%; bottom: -14px; width: 18px; height: 14px; margin-left: -9px;
  background: #F6F0DC; border: 3px solid var(--ink); border-top: 0; border-left: 0;
  clip-path: polygon(0 0, 100% 0, 30% 100%); transform: translateX(-2px);
}
.bubble.is-on { transform: translate(-50%, 0) scale(1); opacity: 1; }
.mate--frantz .bubble { bottom: calc(100% - 24%); }
.mate--karl .bubble { bottom: calc(100% - 6%); }

/* =========================================================
   4. INVENTORY + ARENA
   ========================================================= */
.inv {
  position: relative; padding: clamp(5rem, 11vh, 7rem) var(--pad) clamp(4rem, 9vh, 6rem);
  background:
    radial-gradient(60% 40% at 30% 0%, rgba(243, 167, 60, .12), transparent 70%),
    linear-gradient(#241A12, #1E1610);
}
.inv__head {
  max-width: 1360px; margin: 0 auto 2.5rem;
  display: grid; grid-template-columns: auto minmax(0, 520px); gap: 1rem 3rem; align-items: end; justify-content: space-between;
}
.inv__grid { max-width: 1360px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr); gap: clamp(1.5rem, 3vw, 3rem); align-items: start; }

.room {
  position: relative; aspect-ratio: 900 / 600; overflow: hidden;
  border: 3px solid #120D09; box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .8);
}
.inv__shelves { position: absolute; inset: 0; width: 100%; height: 100%; }
.room__coins { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 3; pointer-events: none; }
.room__pig {
  position: absolute; z-index: 2; left: 30%; bottom: 3%; width: 36%;
  transform-origin: 50% 100%; transition: transform .5s var(--ease-spring);
  transform: scale(var(--pig-scale, 1));
}
.room__pig svg { width: 100%; height: auto; overflow: visible; }
.pig__wobble { transform-box: fill-box; transform-origin: 50% 100%; }
.pig__happy-eyes, .pig__mouth--laugh { opacity: 0; }
.room__pig.is-laughing .pig__happy-eyes, .room__pig.is-laughing .pig__mouth--laugh { opacity: 1; }
.room__pig.is-laughing .pig__eyes, .room__pig.is-laughing .pig__mouth--idle { opacity: 0; }
.room__pig.is-laughing .pig__wobble { animation: pig-laugh .16s ease-in-out infinite alternate; }
@keyframes pig-laugh { from { transform: rotate(-2deg) translateY(0); } to { transform: rotate(2deg) translateY(-4px); } }
.room__pig.is-hic .pig__wobble { animation: pig-hic .5s var(--ease-spring); }
@keyframes pig-hic { 30% { transform: scale(1.08, .86) translateY(6px); } 60% { transform: scale(.94, 1.1) translateY(-10px); } }
.pig__hic {
  position: absolute; right: 2%; top: 4%; font-family: var(--f-sys); font-weight: 700; font-size: 1.25rem; color: var(--paper);
  opacity: 0; transform: translateY(6px); pointer-events: none;
}
.room__pig.is-hic .pig__hic { animation: hic 1s ease-out; }
@keyframes hic { 10% { opacity: 1; transform: translateY(0); } 70% { opacity: 1; } 100% { opacity: 0; transform: translateY(-16px); } }

.lemon {
  position: absolute; z-index: 4; left: 66%; bottom: 8%; width: 17%; min-width: 96px;
  padding: 0; border: 0; background: none; cursor: pointer; transform-origin: 50% 80%;
  transition: transform .15s var(--ease-out);
  animation: lemon-bob 2.8s ease-in-out infinite;
}
.lemon svg { width: 100%; height: auto; filter: drop-shadow(0 8px 0 rgba(0, 0, 0, .35)); }
.lemon:hover { transform: rotate(-6deg) scale(1.05); }
.lemon.is-squeezed { animation: squeeze .38s var(--ease-spring); }
@keyframes squeeze { 30% { transform: scale(1.28, .62); } 60% { transform: scale(.9, 1.12); } }
@keyframes lemon-bob { 50% { translate: 0 -6px; } }
.lemon__label {
  position: absolute; left: 50%; top: 100%; transform: translate(-50%, 6px);
  font-family: var(--f-sys); font-size: .9375rem; color: var(--paper); background: var(--ink); padding: 2px 8px; white-space: nowrap;
}

.ledger { position: absolute; z-index: 5; right: 14px; top: 14px; width: min(270px, 44%); padding: .8rem .9rem; font-size: .9375rem; }
.ledger__row { display: flex; justify-content: space-between; gap: 1rem; }
.ledger__row strong { font-weight: 700; font-size: 1.25rem; line-height: 1.2; font-variant-numeric: tabular-nums; }
.ledger__row--gang { color: #57502F; }
.ledger__buy {
  margin-top: .6rem; width: 100%; text-align: left; cursor: pointer;
  font-family: var(--f-sys); font-size: .875rem; color: var(--paper); background: var(--ribbon); border: 2px solid var(--ribbon-deep); padding: .45rem .6rem;
}
.ledger__buy:hover { background: var(--ribbon-deep); }
.ledger__buy:disabled { opacity: .55; cursor: not-allowed; }
.ledger .sys__quip { font-size: .875rem; min-height: 4.3em; }

.arena { display: grid; gap: 1rem; }
.arena__box { position: relative; }
.arena__canvas {
  width: 100%; height: auto; aspect-ratio: 128 / 80; image-rendering: pixelated; image-rendering: crisp-edges;
  border: 3px solid #120D09; background: #D6C46A; cursor: none; touch-action: manipulation;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .8);
}
.arena__pop {
  position: absolute; z-index: 2; transform: translate(-50%, -100%); pointer-events: none; white-space: nowrap;
  font-family: var(--f-sys); font-weight: 700; font-size: clamp(1rem, 1.8vw, 1.375rem); color: #FFF;
  text-shadow: 2px 2px 0 var(--ink), -2px 2px 0 var(--ink), 2px -2px 0 var(--ink), -2px -2px 0 var(--ink);
  animation: pop-up .9s steps(5) forwards;
}
.arena__pop--big { color: var(--flare); font-size: clamp(1.75rem, 3.6vw, 2.75rem); animation-duration: 2s; }
@keyframes pop-up { 0% { translate: 0 6px; opacity: 1; } 70% { opacity: 1; } 100% { translate: 0 -26px; opacity: 0; } }
.arena__key { position: absolute; left: 8px; bottom: 8px; font-family: var(--f-sys); font-size: .8125rem; background: var(--ink); color: var(--paper); border: 2px solid var(--paper); padding: 4px 8px; cursor: pointer; opacity: 0; }
.arena__key:focus-visible { opacity: 1; }
.arena__status { font-family: var(--f-sys); font-size: 1rem; color: var(--paper); }

/* =========================================================
   5. RANKINGS + THE DOOR OPENER
   ========================================================= */
.finale { position: relative; background: #120E0B; }
.ranks {
  position: relative; color: var(--ribbon);
  padding: clamp(5rem, 11vh, 7rem) var(--pad) clamp(4rem, 9vh, 6rem);
  background:
    radial-gradient(100% 70% at 50% 100%, rgba(255, 250, 222, .7), rgba(255, 250, 222, 0) 60%),
    var(--paper);
}
.ranks::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .28; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .3 0 0 0 0 .2 0 0 0 .5 0'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)'/%3E%3C/svg%3E");
}
.ranks > * { position: relative; max-width: 1100px; margin-left: auto; margin-right: auto; }
.ranks__title { color: var(--ribbon-deep); }
.ranks__drum { margin-top: .75rem; font-family: var(--f-sys); font-size: 1rem; }
.ranks.is-drumming .ranks__drum { animation: drum .09s linear 14; }
@keyframes drum { 50% { transform: translateX(3px); } }
.ranks__list { list-style: none; padding: 0; margin-top: 2rem; display: grid; gap: .75rem; }
.rank {
  display: grid; grid-template-columns: 72px 4.5rem minmax(0, 1fr); align-items: center; gap: 1.25rem;
  padding: .8rem 1rem; border: 2px solid rgba(31, 94, 58, .35); background: rgba(255, 252, 235, .35);
}
.js .ranks:not(.is-revealed) .rank { opacity: 0; transform: translateY(14px); }
.rank { transition: opacity .4s, transform .5s var(--ease-spring); }
.rank__av { width: 72px; height: 72px; border: 2px solid var(--ribbon-deep); }
.rank__av--px { image-rendering: pixelated; }
.rank__av--glitch { animation: glitch 3.2s steps(1) infinite; }
@keyframes glitch {
  0%, 86%, 100% { clip-path: inset(0); transform: none; }
  88% { clip-path: inset(10% 0 55% 0); transform: translateX(-4px); }
  90% { clip-path: inset(50% 0 20% 0); transform: translateX(5px); }
  92% { clip-path: inset(0 0 70% 0); transform: translateX(-2px); }
}
.rank__pos { font-family: var(--f-stencil); font-weight: 900; font-size: 3.25rem; line-height: 1; color: var(--ribbon-deep); text-align: center; }
.rank__who { display: grid; gap: .2rem; }
.rank__name { font-family: var(--f-narr); font-weight: 800; font-size: 1.75rem; line-height: 1; color: var(--ink); }
.rank__note { font-family: var(--f-sys); font-size: .9375rem; }
.rank--1 { border-color: var(--ribbon); background: rgba(255, 252, 235, .55); }
.rank--1 .rank__pos { color: var(--rust); }
.rank--you { border-style: dashed; }
.redact { background: var(--ink); color: transparent; padding: 0 .2em; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.js .redact { background-size: 0% 100%; background-image: linear-gradient(var(--ink), var(--ink)); background-repeat: no-repeat; background-color: transparent; color: var(--ribbon); transition: background-size .8s steps(8) .9s, color 0s 1.7s; }
.js .ranks.is-revealed .redact { background-size: 100% 100%; color: transparent; }
.ranks__warn { margin: 3rem auto 0; padding: 0 0 0 1.25rem; border-left: 6px solid var(--rust); color: var(--ink); }
.ranks__warn p { font-family: var(--f-narr); font-weight: 700; font-size: clamp(1.5rem, 3vw, 2.375rem); line-height: 1.1; max-width: 30ch; }
.ranks__warn footer { margin-top: .5rem; font-family: var(--f-sys); font-size: 1rem; color: var(--ribbon); }

.choice {
  position: relative; overflow: hidden;
  padding: clamp(4.5rem, 10vh, 6rem) var(--pad) clamp(2rem, 5vh, 3rem);
  background: radial-gradient(60% 60% at 50% 60%, #2A1F17, #120E0B 70%);
  text-align: center;
}
.choice__title { font-family: var(--f-stencil); font-weight: 900; font-size: clamp(3rem, 8vw, 6.5rem); line-height: .85; color: var(--paper-hi); }
.choice__sub { margin-top: .75rem; font-size: clamp(1.25rem, 2vw, 1.625rem); color: #BFB38F; font-weight: 600; }
.choice__stage { position: relative; width: min(100%, 860px, (100vh - 330px) * 1.11); margin: 1.25rem auto 0; padding-bottom: clamp(2rem, 4vw, 3rem); }
.choice__figure { position: relative; }
.opener { width: 100%; height: auto; }
.opener__hand { transform-box: fill-box; transform-origin: 50% 100%; transition: transform .35s var(--ease-spring); }
.choice.is-brown .opener__hand--brown, .choice.is-red .opener__hand--red { transform: translateY(-14px) rotate(-3deg); }
.opener__glow { animation: eyeglow 2.4s ease-in-out infinite; }
@keyframes eyeglow { 50% { opacity: .55; } }

.pill {
  --cap: clamp(42px, 5.4vw, 62px);
  position: absolute; top: 80%; transform: translateX(-50%);
  display: grid; justify-items: center; gap: clamp(1.4rem, 3.4vw, 2.4rem); text-decoration: none; color: var(--paper-hi);
  width: min(37%, 300px); margin-top: calc(var(--cap) / -2);
}
.pill--brown { left: 31.25%; }
.pill--red { left: 68.75%; }
.pill__capsule {
  width: var(--cap); aspect-ratio: 1; border-radius: 50%; border: 4px solid var(--ink);
  transition: transform .3s var(--ease-spring), box-shadow .3s;
}
.pill--brown .pill__capsule {
  background: radial-gradient(circle at 35% 30%, #A07A52, #7A5634 55%, #5A3E24);
  box-shadow: 0 0 30px rgba(231, 178, 122, .35);
}
.pill--red .pill__capsule {
  background: radial-gradient(circle at 35% 30%, #F08A74, #B8352A 55%, #7E2018);
  box-shadow: 0 0 34px rgba(255, 110, 80, .55);
  animation: heartbeat 1.3s ease-in-out infinite;
}
@keyframes heartbeat { 0%, 40%, 100% { transform: scale(1); } 10% { transform: scale(1.12); } 22% { transform: scale(1.04); } 30% { transform: scale(1.14); } }
.pill:hover .pill__capsule, .pill:focus-visible .pill__capsule { transform: translateY(-10px) scale(1.12); }
.pill--brown:hover .pill__capsule { box-shadow: 0 0 50px rgba(231, 178, 122, .7); }
.pill--red:hover .pill__capsule { box-shadow: 0 0 60px rgba(255, 110, 80, .85); }
.pill__text { display: grid; gap: .1rem; }
.pill__kind { font-family: var(--f-sys); font-size: .9375rem; color: #BFB38F; }
.pill__cta {
  font-family: var(--f-narr); font-weight: 800; font-size: clamp(1.125rem, 1.9vw, 1.5rem); line-height: 1.05;
  text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 5px; text-decoration-color: rgba(243, 167, 60, .0);
  transition: text-decoration-color .2s;
}
.pill:hover .pill__cta, .pill:focus-visible .pill__cta { text-decoration-color: var(--flare); }
.choice__both { min-height: 1.6em; margin-top: 1rem; font-family: var(--f-sys); font-size: 1rem; color: var(--paper); }

/* ---------- Footer ---------- */
.footer {
  background: #0E0B08; color: #A89F7E; text-align: center;
  padding: 2.5rem var(--pad) 3rem; display: grid; gap: .75rem; justify-items: center;
}
.footer__brand { font-family: var(--f-stencil); font-weight: 800; font-size: 2.25rem; color: var(--paper); line-height: 1; }
.footer__nav { display: flex; gap: 1.5rem; }
.footer__nav a { font-weight: 700; font-size: 1.125rem; color: var(--paper); }
.footer__line { font-family: var(--f-sys); font-size: 1rem; }
.footer__small { font-size: .9375rem; }

/* ---------- Offscreen sections pause their loops ---------- */
.is-off *, .is-off *::before, .is-off *::after { animation-play-state: paused !important; }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1100px) {
  .sys--hero { width: min(340px, 40vw); }
  .gang { grid-template-columns: 1fr; }
  .sys--card { grid-column: 1; margin-top: 1.25rem; max-width: 620px; }
  .gang__head { grid-row: 1; }
  .gang__line {
    grid-row: 2; margin-top: 2rem; margin-bottom: 0;
    margin-left: calc(var(--pad) * -1); margin-right: calc(var(--pad) * -1); padding-bottom: 44px;
    background: url("../img/duckboards.svg") repeat-x left bottom / auto 58px;
  }
  .gang__floor { display: none; }
  .mate__name { background: rgba(18, 13, 9, .8); padding: 0 .45rem; bottom: -2.1rem; }
  .sys--card { grid-row: 3; margin-bottom: 2rem; }
  .gang__sky { height: 46%; }
  .gang__parapet { top: calc(46% - 62px); }
  .gang__wall { top: calc(46% + 36px); }
  .gang__lamp { top: calc(46% + 70px); }
}

@media (max-width: 900px) {
  .dossier__inner { grid-template-columns: 1fr; }
  .desk::before { left: -4%; right: -4%; }
  .sys--sheet { position: relative; top: 0; }
  .inv__head { grid-template-columns: 1fr; }
  .inv__grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  :root { --topbar-h: 58px; }
  .topbar__nav { display: none; }
  .xp { flex: 1 1 auto; max-width: 180px; margin-left: auto; }
  .sound__label { display: none; }
  .hero { display: flex; flex-direction: column; }
  .hero__content { padding-top: calc(var(--topbar-h) + 1.5rem); }
  .hero__hook { max-width: 22ch; }
  .sys--hero {
    position: relative; right: auto; top: auto; width: auto;
    margin: 1.5rem var(--pad) 0; font-size: .9375rem;
  }
  .sys--hero .sys__line:nth-child(3), .sys--hero .sys__line:nth-child(4) { display: none; }
  .hero__michael { right: 50%; transform: translateX(50%); width: min(62vw, 260px); }
  .hero__spacer { flex: 1; }
  .hero { padding-bottom: calc(var(--parapet-h) + 140px); }
  .hero__next { display: none; }

  .desk-wrap { height: auto !important; }
  .desk { width: auto; height: auto; transform: none !important; display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem 1rem; align-items: start; }
  .desk__item { position: relative; left: auto !important; top: auto !important; width: auto; }
  .desk__photo { grid-column: 1; }
  .desk__clip { grid-column: 1 / -1; width: auto; }
  .desk__file { grid-column: 1 / -1; width: auto; }
  .desk__pills { grid-column: 2; grid-row: 1; align-self: center; }
  .desk__glass { display: none; }
  .desk__ash { display: none; }
  .stamp { left: 0; right: 0; top: auto; bottom: 0; width: auto; }
  .stat { grid-template-columns: 6rem 1fr 5.4rem; font-size: .9375rem; }

  .gang__line {
    justify-content: flex-start; overflow-x: auto; overflow-y: visible; scroll-snap-type: x mandatory;
    margin-left: calc(var(--pad) * -1); margin-right: calc(var(--pad) * -1); padding: 90px var(--pad) 44px;
    --mate-h: clamp(210px, 34vh, 290px);
    scrollbar-width: none;
  }
  .gang__line::-webkit-scrollbar { display: none; }
  .mate { scroll-snap-align: center; }
  .mate__name { opacity: 1; }
  .gang__floor { height: 52px; }

  .ledger { position: relative; right: auto; top: auto; width: auto; margin: 0; }
  .room { aspect-ratio: auto; height: 380px; min-height: 0; }
  .room__pig { left: 8%; width: 58%; }
  .lemon { left: 64%; width: 30%; }
  .inv__room-wrap { display: grid; gap: 1rem; }

  .rank { grid-template-columns: 52px 2.4rem minmax(0, 1fr); gap: .75rem; padding: .7rem; }
  .rank__av { width: 52px; height: 52px; }
  .rank__pos { font-size: 2.25rem; }
  .rank__name { font-size: 1.375rem; }

  .choice__stage { margin-top: 1rem; width: 100%; }
  .choice__stage { padding-bottom: 4rem; }
  .pill { gap: .9rem; width: 34%; }
  .pill__cta { font-size: 1.0625rem; }
  .pill__kind { font-size: .8125rem; }
  .toasts { top: auto; bottom: 1rem; left: var(--pad); right: var(--pad); justify-items: center; }
}

@media (max-width: 420px) {
  .hero__title { font-size: clamp(3.5rem, 18vw, 4.5rem); }
  .btn { width: 100%; }
}

/* =========================================================
   Reduced motion
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .hero__smoke, .hero__flare, .hero__flareglow { display: none; }
  .loader__stage { animation: none !important; }
}

/* =========================================================
   Print: everything visible, no scenery
   ========================================================= */
@media print {
  .loader, .topbar, .toasts, .hero__scene, .hero__lamp, .hero__next, .gang__bg, .room__coins, .stamp { display: none !important; }
  .sys[data-type] { opacity: 1 !important; translate: none !important; }
  .sys__line.is-pending { visibility: visible !important; display: block !important; }
  .rank { opacity: 1 !important; transform: none !important; }
  body, .hero, .dossier, .inv, .choice { background: #fff !important; color: #000 !important; }
}
html:not(.js) .sound, html:not(.js) .arena__key { display: none; }
