:root {
  --mud: #120c08;
  --mud-2: #1c130d;
  --mud-3: #2e2016;
  --cream: #f3e6cc;
  --cream-2: #c9b493;
  --cream-3: #9c8665;
  --mustard: #e4a52b;
  --mustard-edge: #8c5c10;
  --ink: #23170e;
  --pencil: #3a2817;
  --red: #e06a4a;
  --display: "Bricolage Grotesque", "Arial Black", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  --hand: "Caveat", "Comic Sans MS", cursive;
  --edge: clamp(16px, 4vw, 40px);
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--mud); color: var(--cream); }
body { font: 500 16px/1.45 var(--mono); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overscroll-behavior-y: none; }
button, input { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ================= the set: one full-screen miniature, everything happens on it ================= */
.pit { position: relative; min-height: 100svh; }
.set {
  position: relative; height: 100svh; min-height: 520px; overflow: hidden; isolation: isolate;
  background: #0d0805 center / cover no-repeat;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation; user-select: none;
}
[data-set="desk"] .set { background-image: url(../img/gate/start.webp); }
[data-set="phone"] .set { background-image: url(../img/gate/phone-start.webp); }

.film, .rest, .crumbs, .grain, .reveal, .reveal-bg, .reveal-frame, .reveal-art, .flash {
  position: absolute; inset: 0; width: 100%; height: 100%;
}
.film, .rest { object-fit: cover; object-position: 50% var(--fy, 50%); display: block; filter: saturate(1.14) contrast(1.05); }
[data-set="desk"] { --fy: 40%; }
.film { opacity: 0; }
.film.is-on { opacity: 1; }
.rest { opacity: 0; pointer-events: none; }
.rest.is-on { opacity: 1; }
.film, .rest { will-change: transform; }
.crumbs { pointer-events: none; z-index: 3; }

/* mud closes in at the bottom, where the controls sit */
.set::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 36%; z-index: 4; pointer-events: none;
  background: linear-gradient(to bottom, rgba(18,12,8,0), rgba(18,12,8,.72) 55%, var(--mud));
}
[data-set="desk"] .set::after { height: 30%; }
/* lamp breathing: an uneven, stepped flicker */
.set::before {
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; mix-blend-mode: soft-light;
  background: radial-gradient(38% 30% at var(--lx, 14%) var(--ly, 9%), rgba(255,200,120,.75), rgba(255,160,60,0) 70%);
  opacity: var(--flick, 0);
}

/* film grain: a fixed noise tile hopping position on twos */
.grain {
  z-index: 5; pointer-events: none; opacity: .11; mix-blend-mode: overlay; inset: -50%; width: 200%; height: 200%;
  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='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 1.6 -.3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1s steps(12) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); } 10% { transform: translate(-5%, -8%); } 20% { transform: translate(-12%, 4%); }
  30% { transform: translate(6%, -14%); } 40% { transform: translate(-4%, 18%); } 50% { transform: translate(-14%, 8%); }
  60% { transform: translate(12%, 0); } 70% { transform: translate(0, 12%); } 80% { transform: translate(3%, 28%); }
  90% { transform: translate(-8%, 9%); } 100% { transform: translate(0, 0); }
}

/* the egg itself is the button */
.egg {
  position: absolute; z-index: 6; border: 0; padding: 0; background: none; cursor: pointer; border-radius: 50% 50% 46% 46% / 58% 58% 42% 42%;
  left: var(--ex, 40%); top: var(--ey, 35%); width: var(--ew, 20%); height: var(--eh, 40%);
  -webkit-tap-highlight-color: transparent;
}
.egg:focus-visible { outline: 3px dashed var(--mustard); outline-offset: 6px; }
[data-state="gate"] .set { cursor: pointer; }
.pit:not([data-state="gate"]) .egg { display: none; }

/* ================= the slip: the hatchling's paper ================= */
.slip {
  position: absolute; z-index: 6; container-type: size;
  left: var(--px, 40%); top: var(--py, 48%); width: var(--pw, 18%); height: var(--ph, 17%);
  transform: rotate(var(--pr, -0.6deg)); transform-origin: 50% 50%;
  display: grid; place-items: center; text-align: center; color: var(--pencil);
  opacity: 0; pointer-events: none; cursor: text;
}
.slip.is-on { opacity: 1; pointer-events: auto; }
.slip p { grid-area: 1 / 1; margin: 0; font-family: var(--hand); mix-blend-mode: multiply; }
.slip-ask { font-weight: 700; font-size: 15.5cqw; line-height: .9; letter-spacing: -.01em; }
.slip-addr { display: grid; justify-items: center; opacity: 0; }
.slip-big { font-weight: 700; font-size: 19cqw; line-height: .95; }
.slip-small { font-weight: 600; font-size: 8.5cqw; line-height: 1; opacity: .8; margin-top: 2cqh; }
.slip.has-addr .slip-ask { opacity: 0; }
.slip.has-addr .slip-addr { opacity: 1; }
/* written in, stroke by stroke */
.slip.writing p { animation: write .8s steps(20, end) both; }
@keyframes write { from { clip-path: inset(-10% 100% -10% 0); } to { clip-path: inset(-10% -2% -10% 0); } }

/* ================= the dock: whatever you need right now, at the bottom ================= */
.dock {
  position: absolute; z-index: 8; left: 0; right: 0; bottom: 0;
  padding: 0 var(--edge) calc(18px + env(safe-area-inset-bottom));
}

/* gate */
.gate { display: grid; justify-items: center; gap: 4px; padding-bottom: 6px; }
.gate-hint { margin: 0; display: grid; justify-items: center; gap: 8px; }
.gate-say {
  font: 700 clamp(30px, 8vw, 40px)/1 var(--hand); color: var(--cream); letter-spacing: .01em;
  text-shadow: 0 2px 14px rgba(0,0,0,.7);
}
.gate-say.bump { animation: bump .25s steps(3) both; }
@keyframes bump { 0% { transform: scale(1.18) rotate(-3deg); } 60% { transform: scale(.96) rotate(1.5deg); } 100% { transform: none; } }
.pips { display: flex; gap: 10px; }
.pips i {
  width: 13px; height: 16px; border-radius: 50% 50% 46% 46% / 58% 58% 42% 42%;
  border: 2px solid rgba(243,230,204,.55); background: transparent; transition: background-color .08s steps(1);
}
.pips i.on { background: var(--mustard); border-color: var(--mustard); box-shadow: 0 0 12px rgba(228,165,43,.55); }
.skip {
  position: absolute; right: var(--edge); bottom: calc(22px + env(safe-area-inset-bottom));
  background: none; border: 0; padding: 8px 2px; cursor: pointer;
  font: 700 11px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--cream-3);
}
.skip:hover { color: var(--cream); }

/* ask */
.ask { max-width: 640px; margin: 0 auto; }
.hatch-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.field { position: relative; }
.field input {
  width: 100%; height: 58px; padding: 0 70px 0 16px;
  background: rgba(22,15,10,.88); border: 2px solid #4a3523; border-radius: 8px;
  font: 500 15px/1 var(--mono); color: var(--cream); letter-spacing: -.01em;
  outline: none; transition: border-color .15s; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.field input::placeholder { color: #a08a6a; }
.field input:focus { border-color: var(--mustard); }
.field input[aria-invalid="true"] { border-color: var(--red); }
.paste {
  position: absolute; right: 8px; top: 9px; height: 40px; padding: 0 10px;
  background: var(--mud-3); border: 0; border-radius: 5px; cursor: pointer;
  font: 700 11px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--cream-2);
}
.paste:active { transform: translateY(1px); }
.note { margin: 10px 0 0; font-size: 11.5px; line-height: 1.35; color: var(--cream-3); text-align: center; }
.msg { min-height: 1.35em; margin: 4px 0 0; font-size: 13px; color: var(--cream-2); text-align: center; }
.msg:empty { min-height: 0; margin: 0; }
.msg.is-error { color: #f2a48c; }

/* the mustard button is a painted wooden block: it physically goes down */
.hatch {
  --lift: 6px;
  position: relative; height: 58px; border: 0; padding: 0 24px; cursor: pointer;
  background: var(--mustard); color: var(--ink); border-radius: 8px;
  font: 800 21px/1 var(--display); letter-spacing: -.01em; text-transform: uppercase;
  box-shadow: 0 var(--lift) 0 var(--mustard-edge), 0 calc(var(--lift) + 10px) 22px rgba(0,0,0,.5);
  transform: translateY(0); transition: transform .06s linear, box-shadow .06s linear;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.hatch-form .hatch { margin-bottom: var(--lift); }
.hatch:hover { filter: brightness(1.06); }
.hatch:active, .hatch.is-pressed { transform: translateY(5px); box-shadow: 0 1px 0 var(--mustard-edge), 0 4px 10px rgba(0,0,0,.4); }
.hatch:focus-visible { outline: 3px solid var(--cream); outline-offset: 4px; }
.hatch[disabled] { cursor: progress; }

/* the dock's pieces arrive like cut-outs pushed into frame: stepped, not eased */
.rise { animation: rise .6s cubic-bezier(.2,.8,.2,1) both; }
@keyframes rise { from { transform: translateY(36px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ================= reveal ================= */
.reveal { margin: 0; opacity: 0; visibility: hidden; z-index: 7; background: var(--mud); }
.reveal-art { object-fit: cover; object-position: 50% 40%; transform-origin: 50% 60%; }
.reveal-bg { object-fit: cover; filter: blur(30px) brightness(.45) saturate(.85); transform: scale(1.15); }
.lamp {
  position: absolute; inset: 0; pointer-events: none; mix-blend-mode: soft-light; opacity: 0;
  background: radial-gradient(60% 55% at 22% 8%, rgba(255,196,110,.9), rgba(255,160,60,0) 70%);
}
.flash { z-index: 9; pointer-events: none; opacity: 0; background: radial-gradient(40% 45% at 50% 55%, rgba(255,214,150,.95), rgba(255,170,70,.25) 60%, rgba(255,150,60,0) 80%); mix-blend-mode: screen; }

.tag { position: absolute; left: var(--tag-x, 62%); top: 0; height: var(--tag-y, 34%); width: 0; z-index: 3; pointer-events: none; }
.tag-string { position: absolute; left: -1px; top: 0; bottom: 0; width: 2px; background: linear-gradient(#3b2a1a, #6b5236); box-shadow: 1px 0 0 rgba(255,220,170,.15); }
.tag-card {
  position: absolute; top: 100%; left: 0; display: grid; justify-items: center;
  width: clamp(118px, 30vw, 168px); padding: 16px 10px 10px; translate: -50% -4px;
  background: url(../img/paper.webp) center / cover, #e9d6b7; color: #2a1a0d;
  clip-path: polygon(14% 0, 86% 0, 100% 18%, 100% 100%, 0 100%, 0 18%);
  transform-origin: 50% -4px;
  filter: drop-shadow(0 10px 10px rgba(0,0,0,.35));
}
.tag-card::before { content: ""; position: absolute; top: 6px; left: 50%; width: 9px; height: 9px; margin-left: -4.5px; border-radius: 50%; background: #3a2818; box-shadow: inset 0 0 0 2px #b08b5c; }
.tag-big { font: 700 clamp(34px, 9vw, 48px)/.9 var(--hand); letter-spacing: -.01em; margin-top: 4px; }
.tag-small { font: 700 10px/1.2 var(--mono); letter-spacing: .08em; text-transform: uppercase; opacity: .78; margin-top: 2px; }

/* ================= answer ================= */
.kicker { margin: 0 0 6px; font: 700 12px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--mustard); }
.name {
  font: 800 clamp(40px, 11vw, 76px)/.98 var(--display); font-variation-settings: "opsz" 96;
  letter-spacing: -.035em; margin: 0; text-wrap: balance;
}
.stat { margin: 10px 0 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.stat-big { font: 800 clamp(26px, 6.6vw, 38px)/1 var(--display); letter-spacing: -.02em; color: var(--mustard); }
.stat-small { font-size: 13px; color: var(--cream-2); }
.why { margin: 10px 0 0; font-size: 13px; color: var(--cream-2); max-width: 62ch; }
.why ul { margin: 6px 0 0; padding-left: 18px; }
.figures { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 18px; margin: 18px 0 0; }
.figures div { border-top: 1px solid var(--mud-3); padding-top: 8px; }
.figures dt { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--cream-3); }
.figures dd { margin: 2px 0 0; font-weight: 700; font-size: 17px; font-variant-numeric: tabular-nums; }
.scan { margin: 14px 0 0; font-size: 12px; color: var(--cream-3); max-width: 62ch; }
.again { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: 22px; }
.link { background: none; border: 0; padding: 6px 0; cursor: pointer; color: var(--cream-2); font-size: 13px; text-decoration: underline; text-underline-offset: 4px; }

/* ================= states ================= */
[data-state="revealed"] .reveal { visibility: visible; }
[data-state="revealed"] .set::after { display: none; }
[data-state="revealed"] .dock { position: static; padding-top: 22px; padding-bottom: calc(36px + env(safe-area-inset-bottom)); }
[data-state="revealed"] .set { height: min(122vw, 68svh); min-height: 380px; }

@media (min-width: 900px) and (min-aspect-ratio: 19/20) {
  .hatch-form { grid-template-columns: minmax(0, 1fr) auto; }
  .hatch { padding: 0 34px; }
  .dock { padding-bottom: 26px; }
  .reveal-frame { left: 50%; right: auto; width: auto; aspect-ratio: 4 / 5; translate: -50% 0; box-shadow: 0 0 80px 30px rgba(0,0,0,.55); }
  /* desktop answer: the creature stays on the set, the card takes the right-hand column */
  [data-state="revealed"].pit { display: grid; grid-template-columns: minmax(0, 1fr) minmax(380px, 34vw); }
  [data-state="revealed"] .set { height: 100svh; position: sticky; top: 0; }
  [data-state="revealed"] .reveal-frame { box-shadow: none; }
  [data-state="revealed"] .dock { display: grid; align-content: center; padding: 48px clamp(28px, 3.2vw, 56px); min-height: 100svh; }
}

@media (prefers-reduced-motion: reduce) {
  .grain { animation: none; }
  .hatch, .field input { transition: none; }
  .rise, .slip.writing p, .gate-say.bump { animation: none; }
}

/* ================= the two at the edges: cut-out puppets in front of the set ================= */
.peek {
  position: absolute; z-index: 3; pointer-events: none; user-select: none;
  height: var(--peek-h); width: auto; bottom: var(--peek-b);
  transform-origin: 50% 96%; will-change: transform;
  filter: saturate(1.18) contrast(1.05) drop-shadow(0 22px 26px rgba(0,0,0,.6));
  -webkit-mask-image: linear-gradient(to bottom, #000 70%, transparent 97%); mask-image: linear-gradient(to bottom, #000 70%, transparent 97%);
}
.pit { --peek-h: 23svh; --peek-b: 33%; }
.peek-l { left: calc(var(--peek-h) * -0.36); }
.peek-r { right: calc(var(--peek-h) * -0.3); }
[data-set="desk"] .pit { --peek-h: 62svh; --peek-b: 5%; }
[data-set="desk"] .peek-l { left: calc(var(--peek-h) * -0.24); }
[data-set="desk"] .peek-r { right: calc(var(--peek-h) * -0.27); }
[data-state="revealed"] .peek { visibility: hidden; }

.more {
  display: table; margin: 14px auto 0; padding: 6px 4px;
  font: 700 22px/1 var(--hand); color: var(--cream-2); text-decoration: none;
}
.more span { display: inline-block; animation: nudge 1.8s ease-in-out infinite; }
.more:hover { color: var(--cream); }
@keyframes nudge { 0%, 60%, 100% { transform: none; } 30% { transform: translateY(5px); } }
[data-state="revealed"] .more { display: none; }

/* ================= below the set: you scroll down into the dirt ================= */
/* calm on purpose: one deep mud colour, a soft lamp glow per section, fine grain. The pictures do the talking. */
.below { position: relative; overflow: clip; background: #140d09; isolation: isolate; } /* clip, not hidden: hidden would stop the backdrop sticking */
.below::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.below > section::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none; left: 50%; top: 0; width: min(1400px, 160vw); height: 900px; translate: -50% -10%;
  background: radial-gradient(50% 45% at 50% 40%, rgba(228,165,43,.09), rgba(228,165,43,0) 70%);
}
/* a soft, far-away trench behind everything below the set: it stays put while the sections scroll over it */
.backdrop {
  position: sticky; top: 0; height: 100vh; height: 100lvh; margin-bottom: -100vh; margin-bottom: -100lvh; z-index: -1; pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% 40%, rgba(20,13,9,.25), rgba(20,13,9,.85) 75%),
    linear-gradient(rgba(20,13,9,.45), rgba(20,13,9,.6)),
    url(../img/backdrop.webp) 50% 40% / cover no-repeat;
}
.below > section:nth-child(even)::before { background: radial-gradient(45% 40% at 30% 40%, rgba(196,120,60,.08), rgba(196,120,60,0) 70%); }
.below > section + section { border-top: 1px solid rgba(243,230,204,.06); margin-top: clamp(72px, 10vw, 140px); }
.below > section, .foot { position: relative; max-width: 1180px; margin: 0 auto; padding: clamp(72px, 11vw, 150px) var(--edge) 0; }
.sec-h {
  margin: 0; font: 800 clamp(40px, 9.6vw, 92px)/.95 var(--display); font-variation-settings: "opsz" 96;
  letter-spacing: -.04em; color: var(--cream); text-wrap: balance; text-shadow: 0 4px 30px rgba(0,0,0,.6);
}
.sec-sub { margin: 14px 0 0; max-width: 48ch; font-size: 15px; color: var(--cream-2); }

/* cast: one big portrait, the names are the picker */
.lineup { display: grid; gap: 24px; margin-top: clamp(28px, 5vw, 56px); }
.stage-box { position: relative; margin: 0; aspect-ratio: 4 / 5; overflow: hidden; border-radius: 6px; background: #0d0805; box-shadow: 0 30px 60px rgba(0,0,0,.55), 0 0 0 1px rgba(243,230,204,.06); }
.cast-art { width: 100%; height: 100%; object-fit: cover; display: block; filter: saturate(1.1) contrast(1.04); }
.cast-flash { position: absolute; inset: 0; opacity: 0; pointer-events: none; background: radial-gradient(50% 50% at 50% 55%, rgba(255,214,150,.9), rgba(255,170,70,0) 75%); mix-blend-mode: screen; }
.cast-hang { position: absolute; top: 0; right: 9%; width: clamp(96px, 24vw, 138px); height: 0; }
.cast-hang::before { content: ""; position: absolute; left: 50%; top: 0; width: 2px; height: 48px; margin-left: -1px; background: linear-gradient(#3b2a1a, #6b5236); }
.cast-tag {
  position: absolute; top: 44px; left: 0; right: 0; display: grid; justify-items: center;
  padding: 14px 8px 9px; color: #2a1a0d; transform-origin: 50% -44px;
  background: url(../img/paper.webp) center / cover, #e9d6b7;
  clip-path: polygon(14% 0, 86% 0, 100% 18%, 100% 100%, 0 100%, 0 18%);
}
.cast-tag::after { content: ""; position: absolute; top: 5px; left: 50%; width: 8px; height: 8px; margin-left: -4px; border-radius: 50%; background: #3a2818; }
.cast-tag-big { font: 700 clamp(30px, 8vw, 42px)/.9 var(--hand); margin-top: 4px; }
.cast-tag small { font: 700 9.5px/1.2 var(--mono); letter-spacing: .08em; text-transform: uppercase; opacity: .8; margin-top: 2px; text-align: center; }
.picker { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 calc(var(--edge) * -1); padding: 2px var(--edge) 6px; scroll-snap-type: x mandatory; }
.picker::-webkit-scrollbar { display: none; }
.picker button {
  flex: none; scroll-snap-align: start; cursor: pointer; border: 2px solid #4a3523; background: rgba(22,15,10,.7); border-radius: 999px;
  padding: 10px 16px; font: 800 17px/1 var(--display); letter-spacing: -.01em; color: var(--cream-2);
}
.picker button[aria-selected="true"] { background: var(--mustard); border-color: var(--mustard); color: var(--ink); }
.picker button:focus-visible { outline: 3px solid var(--cream); outline-offset: 3px; }
.cast-info { margin-top: 18px; min-height: 150px; }
.cast-name { margin: 0; font: 800 clamp(40px, 10vw, 64px)/.95 var(--display); letter-spacing: -.035em; }
.cast-line { margin: 6px 0 0; font: 700 clamp(26px, 6.5vw, 34px)/1.05 var(--hand); color: var(--mustard); }
.cast-rule { margin: 12px 0 0; font-size: 14px; color: var(--cream); max-width: 44ch; }
.cast-rule b { color: var(--cream-3); font-weight: 700; text-transform: uppercase; font-size: 11px; letter-spacing: .1em; display: block; margin-bottom: 4px; }
.cast-order { margin: 22px 0 0; padding-top: 16px; border-top: 1px solid rgba(243,230,204,.12); font-size: 12.5px; color: var(--cream-3); max-width: 52ch; }

/* weigh-in: drag a return along a painted board */
.scale { position: relative; margin-top: clamp(36px, 6vw, 64px); padding-bottom: 150px; }
.ruler { display: flex; height: 64px; border-radius: 6px; overflow: hidden; box-shadow: inset 0 -6px 0 rgba(0,0,0,.25), 0 14px 30px rgba(0,0,0,.45); }
.z { display: grid; place-items: center; font: 700 clamp(20px, 5vw, 30px)/1 var(--hand); color: rgba(243,230,204,.9); }
.z-skinny { flex: 80; background: linear-gradient(#7d3b28, #5e2b1d); }
.z-normal { flex: 70; background: linear-gradient(#5a4129, #432f1d); }
.z-fat { flex: 150; background: linear-gradient(#c88a1c, #a06a12); color: #2a1a0d; }
.ret { position: absolute; left: 0; right: 0; top: 0; width: 100%; height: 64px; margin: 0; background: transparent; cursor: grab; -webkit-appearance: none; appearance: none; touch-action: pan-y; }
.ret:active { cursor: grabbing; }
.ret::-webkit-slider-runnable-track { height: 64px; background: transparent; }
.ret::-moz-range-track { height: 64px; background: transparent; }
.ret::-webkit-slider-thumb { -webkit-appearance: none; width: 30px; height: 82px; margin-top: -9px; border-radius: 8px; background: linear-gradient(90deg, #f0d9a8, #d8b678); box-shadow: 0 6px 14px rgba(0,0,0,.55), inset 0 0 0 2px rgba(60,40,20,.35); }
.ret::-moz-range-thumb { width: 30px; height: 82px; border: 0; border-radius: 8px; background: linear-gradient(90deg, #f0d9a8, #d8b678); box-shadow: 0 6px 14px rgba(0,0,0,.55); }
.ret:focus-visible { outline: 3px solid var(--cream); outline-offset: 6px; border-radius: 6px; }
.peg { position: absolute; top: 72px; left: var(--at, 37%); width: 0; pointer-events: none; }
.peg-string { position: absolute; left: -1px; top: 0; width: 2px; height: 26px; background: linear-gradient(#6b5236, #3b2a1a); }
.peg-tag {
  position: absolute; top: 24px; left: 0; translate: -50% 0; display: grid; justify-items: center; width: 132px; padding: 14px 8px 10px; color: #2a1a0d;
  background: url(../img/paper.webp) center / cover, #e9d6b7; transform-origin: 50% -24px;
  clip-path: polygon(14% 0, 86% 0, 100% 18%, 100% 100%, 0 100%, 0 18%);
}
.peg-big { font: 700 40px/.9 var(--hand); }
.peg-small { font: 700 10px/1.2 var(--mono); letter-spacing: .1em; text-transform: uppercase; opacity: .85; margin-top: 3px; }
.weigh-key { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; margin: 0; font-size: 13px; color: var(--cream-2); }
.weigh-key b { color: var(--cream); }

/* questions */
.qs { margin-top: clamp(28px, 5vw, 52px); display: grid; gap: 0 56px; align-items: start; }
.qs details { border-top: 1px solid rgba(243,230,204,.14); }
.qs summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 20px 0; font: 800 clamp(19px, 4.6vw, 24px)/1.15 var(--display); letter-spacing: -.015em; }
.qs summary::-webkit-details-marker { display: none; }
.qs summary::after { content: "+"; flex: none; font: 700 30px/1 var(--hand); color: var(--mustard); transition: transform .25s; }
.qs details[open] summary::after { transform: rotate(45deg); }
.qs details p { margin: -6px 0 22px; font-size: 14.5px; color: var(--cream-2); max-width: 58ch; }

/* foot */
.foot { display: grid; justify-items: center; text-align: center; padding-bottom: calc(48px + env(safe-area-inset-bottom)); }
.foot-mark { margin: 0; font: 700 clamp(64px, 17vw, 200px)/.85 var(--hand); color: rgba(243,230,204,.9); text-shadow: 0 6px 40px rgba(0,0,0,.6); }
.foot-cta { margin-top: 26px; }
.foot-note { margin: 22px 0 0; font-size: 12px; color: var(--cream-3); }

/* sections rise once as they come into view */
.in-view-wait { opacity: 0; transform: translateY(28px); }
.in-view { opacity: 1; transform: none; transition: opacity .7s ease-out, transform .8s cubic-bezier(.2,.8,.2,1); }

@media (min-width: 760px) {
  .qs { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 900px) {
  .lineup { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
  .picker { flex-direction: column; overflow: visible; margin: 0; padding: 0 0 0 30px; gap: 2px; }
  .picker button {
    border: 0; background: none; border-radius: 0; padding: 4px 0; text-align: left; position: relative;
    font-size: clamp(34px, 3.6vw, 52px); letter-spacing: -.035em; color: rgba(243,230,204,.28); transition: color .15s;
  }
  .picker button:hover { color: rgba(243,230,204,.6); }
  .picker button[aria-selected="true"] { background: none; color: var(--cream); }
  .picker button[aria-selected="true"]::before { content: ""; position: absolute; left: -28px; top: 50%; width: 13px; height: 16px; margin-top: -8px; border-radius: 50% 50% 46% 46% / 58% 58% 42% 42%; background: var(--mustard); }
  .cast-name { display: none; }
  .cast-info { margin-top: 24px; padding-left: 30px; min-height: 130px; }
  .cast-order { margin-left: 30px; }
}
@media (prefers-reduced-motion: reduce) {
  .more span { animation: none; }
  .in-view-wait { opacity: 1; transform: none; }
}

/* ================= round 3: the sign, the CA tag, the pet room, sizes and the whole pit ================= */
/* the sign: a crisp cut-out hung in front of the set, pivoting on its ropes */
.sign {
  position: absolute; z-index: 6; left: var(--sx, 28%); top: var(--sy, -6%); width: var(--sw, 44%); height: var(--sh, 30%);
  container-type: inline-size; transform-origin: 50% 0; pointer-events: none;
  animation: sway 7s ease-in-out infinite;
}
@keyframes sway { 0%, 100% { rotate: -.45deg; } 50% { rotate: .45deg; } }
.sign-swing { position: absolute; inset: 0; transform-origin: 50% 0; }
.sign-img { display: block; width: 100%; height: auto; user-select: none; filter: drop-shadow(0 2.2cqw 2.6cqw rgba(0,0,0,.6)) saturate(1.05); }
[data-state="revealed"] .sign { display: none; }

.ca {
  position: absolute; left: 71%; top: 84%; width: 0; height: 0; padding: 0; border: 0; background: none;
  cursor: pointer; pointer-events: auto; -webkit-tap-highlight-color: transparent;
}
.ca-string { position: absolute; left: -1px; top: 0; width: 2px; height: 5cqw; background: linear-gradient(#3b2a1a, #6b5236); }
.ca-tag {
  position: absolute; top: 4.6cqw; left: 0; translate: -50% 0; width: 15cqw; display: grid; justify-items: center;
  padding: 2.2cqw 1cqw 1.4cqw; color: #2a1a0d; transform-origin: 50% -4.6cqw;
  background: url(../img/paper.webp) center / cover, #e9d6b7;
  clip-path: polygon(14% 0, 86% 0, 100% 18%, 100% 100%, 0 100%, 0 18%);
  filter: drop-shadow(0 1.2cqw 1.2cqw rgba(0,0,0,.4));
  transition: scale .15s;
}
.ca-tag::before { content: ""; position: absolute; top: .9cqw; left: 50%; width: 1.2cqw; height: 1.2cqw; margin-left: -.6cqw; border-radius: 50%; background: #3a2818; }
.ca-big { font: 700 6.4cqw/.85 var(--hand); margin-top: .5cqw; }
.ca-small { font: 700 max(9px, 1.25cqw)/1.15 var(--mono); letter-spacing: .08em; text-transform: uppercase; opacity: .85; margin-top: .4cqw; text-align: center; white-space: nowrap; }
.ca:hover .ca-tag { scale: 1.05; }
.ca:focus-visible { outline: none; }
.ca:focus-visible .ca-tag { outline: 3px dashed var(--mustard); outline-offset: 3px; }
[data-set="phone"] .ca { left: 74%; top: 83%; }
[data-set="phone"] .ca-tag { width: 25cqw; padding: 3.4cqw 1.6cqw 2.2cqw; }
[data-set="phone"] .ca-big { font-size: 10.5cqw; }
[data-set="phone"] .ca-small { font-size: max(8.5px, 2.4cqw); }

/* the hat and the name plate, on the portrait */
.worn {
  position: absolute; z-index: 4; left: 50%; top: 20%; width: 20%; height: auto; max-width: none;
  cursor: grab; touch-action: none; user-select: none; -webkit-user-drag: none;
  filter: sepia(.12) brightness(.96) drop-shadow(0 8px 10px rgba(0,0,0,.5));
}
.worn.held { cursor: grabbing; filter: sepia(.12) brightness(1) drop-shadow(0 16px 18px rgba(0,0,0,.55)); }
.plate {
  position: absolute; z-index: 4; left: 50%; bottom: 5%; translate: -50% 0; rotate: -1.5deg; pointer-events: none;
  max-width: 80%; padding: 12px 22px 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font: 700 clamp(28px, 7vw, 44px)/1 var(--hand); color: #2a1a0d;
  background: url(../img/paper.webp) center / cover, #e9d6b7;
  clip-path: polygon(3% 0, 97% 4%, 100% 100%, 0 96%);
  filter: drop-shadow(0 8px 10px rgba(0,0,0,.45));
}

/* the pet room */
.room { margin-top: 20px; padding: 18px; border: 1px solid rgba(243,230,204,.1); border-radius: 8px; background: rgba(28,19,13,.65); }
.room-h { margin: 0 0 14px; font: 800 24px/1 var(--display); letter-spacing: -.02em; }
.room-name, .room-size { display: grid; gap: 6px; }
.room-name span, .room-size span { font: 700 11px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--cream-3); }
.pet-name {
  height: 48px; padding: 0 14px; border-radius: 8px; border: 2px solid #4a3523; background: rgba(18,12,8,.8);
  font: 700 26px/1 var(--hand); color: var(--cream); outline: none;
}
.pet-name::placeholder { color: #7d6a52; }
.pet-name:focus { border-color: var(--mustard); }
.hats { display: grid; grid-template-columns: repeat(auto-fill, minmax(54px, 1fr)); gap: 6px; margin-top: 14px; }
.hats button {
  position: relative; aspect-ratio: 1; padding: 7px; cursor: pointer; border-radius: 8px;
  border: 2px solid #3a2a1c; background: #1c130d; display: grid; place-items: center;
  transition: border-color .12s, background-color .12s, transform .12s;
}
.hats button img { width: 100%; height: 100%; object-fit: contain; }
.hats button:hover { border-color: #6b5236; }
.hats button[aria-checked="true"] { border-color: var(--mustard); background: #2e2016; }
.hats button:active { transform: translateY(1px); }
.hats button:focus-visible { outline: 3px solid var(--cream); outline-offset: 2px; }
.hat-none { font: 700 10px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--cream-3); }
.room-size { margin-top: 14px; }
.hat-size { width: 100%; accent-color: var(--mustard); margin: 0; }
.hat-size:disabled { opacity: .35; }
.room-tip { margin: 8px 0 0; font-size: 11.5px; color: var(--cream-3); }
.holders { margin-top: 16px; padding-top: 14px; border-top: 1px dashed rgba(243,230,204,.14); }
.holders-h { margin: 0; font-size: 12.5px; color: var(--cream-2); }
.holders-h b { display: block; margin-bottom: 3px; font: 700 11px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--mustard); }
.hats-locked { margin-top: 10px; }
.hats .locked { cursor: not-allowed; }
.hats .locked img { opacity: .32; filter: grayscale(.7); }
.lock { position: absolute; right: 5px; bottom: 5px; width: 11px; height: 8px; border-radius: 2px; background: var(--cream-2); }
.lock::before { content: ""; position: absolute; left: 2px; top: -6px; width: 7px; height: 7px; box-sizing: border-box; border: 2px solid var(--cream-2); border-bottom: 0; border-radius: 4px 4px 0 0; }
.room-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 18px; }
.save {
  height: 46px; padding: 0 20px; border-radius: 8px; cursor: pointer; border: 2px solid var(--mustard); background: none; color: var(--mustard);
  font: 800 16px/1 var(--display); letter-spacing: -.01em; text-transform: uppercase;
}
.save:hover { background: rgba(228,165,43,.1); }
.save:disabled { opacity: .5; cursor: progress; }
.save:focus-visible { outline: 3px solid var(--cream); outline-offset: 3px; }
.room-msg { font-size: 12.5px; color: var(--cream-2); }

/* cast: three sizes per species */
.sizes { display: inline-flex; margin-top: 16px; padding: 3px; border-radius: 999px; border: 2px solid #4a3523; background: rgba(22,15,10,.7); }
.sizes button {
  border: 0; background: none; cursor: pointer; border-radius: 999px; padding: 8px 16px;
  font: 700 12px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--cream-2);
}
.sizes button[aria-checked="true"] { background: var(--mustard); color: var(--ink); }
.sizes button:disabled { opacity: .35; cursor: default; }
.sizes button:focus-visible { outline: 3px solid var(--cream); outline-offset: 2px; }
.cast-size { margin: 8px 0 0; font-size: 13px; color: var(--cream-2); }
.cast-size:empty { display: none; }

/* the whole pit: all 16 at a glance */
.pit-wall { margin-top: clamp(56px, 8vw, 104px); }
.wall-h { margin: 0; font: 800 clamp(28px, 4.4vw, 44px)/1 var(--display); letter-spacing: -.03em; }
.wall-h span { display: block; margin-top: 8px; font: 500 13px/1.3 var(--mono); letter-spacing: 0; color: var(--cream-3); }
/* one species per row of three on phones, two per row on tablets, three per row on desktop */
.wall { list-style: none; margin: 22px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 10px; }
.wall button { display: grid; gap: 7px; width: 100%; padding: 0; border: 0; background: none; cursor: pointer; text-align: left; }
.wall img {
  width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 4px; display: block; background: #0d0805;
  box-shadow: 0 12px 24px rgba(0,0,0,.45), 0 0 0 1px rgba(243,230,204,.06); transition: transform .2s cubic-bezier(.2,.8,.2,1), box-shadow .2s;
}
.wall span { font: 700 10.5px/1.2 var(--mono); letter-spacing: .04em; color: var(--cream-2); }
.wall button:hover img { transform: translateY(-4px); box-shadow: 0 18px 30px rgba(0,0,0,.55), 0 0 0 1px rgba(243,230,204,.12); }
.wall button[aria-current="true"] img { box-shadow: 0 0 0 2px var(--mustard), 0 12px 24px rgba(0,0,0,.45); }
.wall button[aria-current="true"] span { color: var(--mustard); }
.wall button:focus-visible { outline: 3px solid var(--cream); outline-offset: 4px; border-radius: 4px; }

.foot-ca { margin: 22px 0 0; font: 700 12px/1.4 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--cream-2); word-break: break-all; }
.foot-ca-v { color: var(--mustard); }

@media (min-width: 640px) { .wall { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
@media (min-width: 900px) {
  .sizes { margin-left: 30px; }
  .wall { grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 22px 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .sign { animation: none; }
  .wall img, .hats button { transition: none; }
}

/* ================= how it hatches: a strip of film, three frames, the creatures talk ================= */
.strip {
  list-style: none; margin: clamp(32px, 5vw, 60px) 0 0; padding: 0;
  display: grid; gap: 44px;
}
.shot { position: relative; }
/* each frame is a cell of 35mm-ish film: black stock, sprocket holes top and bottom */
.frame {
  position: relative; aspect-ratio: 4 / 3; padding: 26px 0; background: #0a0705; border-radius: 4px;
  box-shadow: 0 24px 50px rgba(0,0,0,.55), 0 0 0 1px rgba(243,230,204,.05);
}
.frame::before, .frame::after {
  content: ""; position: absolute; left: 10px; right: 10px; height: 12px; pointer-events: none;
  background: radial-gradient(circle at 50% 50%, #2a1e15 0 4.5px, transparent 5px) 0 0 / 22px 12px repeat-x;
  -webkit-mask-image: none;
}
.frame::before { top: 7px; }
.frame::after { bottom: 7px; }
.frame > img, .flip { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 2px; filter: saturate(1.1) contrast(1.04); }
.shuffle { object-position: 50% 40%; }
.flip { background: url(../img/how-2.webp) 0 0 / 2000% 100% no-repeat; }
.shot:nth-child(1) .frame { rotate: -1deg; }
.shot:nth-child(2) .frame { rotate: .8deg; }
.shot:nth-child(3) .frame { rotate: -.6deg; }

/* the address pencilled onto the hatchling's paper */
.frame-addr {
  position: absolute; left: 28.9%; width: 38.4%; top: calc(26px + (100% - 52px) * .45); text-align: center; rotate: -.6deg;
  font: 700 clamp(17px, 2.4vw, 26px)/1 var(--hand); color: var(--pencil); mix-blend-mode: multiply; opacity: .92;
}

/* chat bubbles: paper speech bubbles that pop in one after another */
.chat { position: absolute; left: -6px; top: 6px; display: grid; justify-items: start; gap: 6px; max-width: 74%; pointer-events: none; }
.chat-r { left: auto; right: -6px; justify-items: end; }
.bub {
  position: relative; margin: 0; padding: 8px 13px 7px; border-radius: 14px 14px 14px 4px;
  background: #f1e3c6; color: #2a1a0d; font: 700 clamp(19px, 2.2vw, 23px)/1.02 var(--hand);
  box-shadow: 0 8px 16px rgba(0,0,0,.45);
}
.chat-r .bub { border-radius: 14px 14px 4px 14px; }
.bub-loud { background: var(--mustard); }
.how.talking .bub { animation: pop .42s steps(4, end) both; }
.how.talking .bub:nth-child(2) { animation-delay: .9s; }
.how.talking .bub:nth-child(3) { animation-delay: 1.9s; }
.how:not(.talking) .bub { opacity: 0; }
.how.still .bub { animation: none; opacity: 1; }
@keyframes pop { 0% { opacity: 0; transform: translateY(8px) scale(.6); } 60% { opacity: 1; transform: translateY(-2px) scale(1.06); } 100% { opacity: 1; transform: none; } }

.shot-n { display: block; margin-top: 20px; font: 700 13px/1 var(--mono); letter-spacing: .14em; color: var(--mustard); }
.shot h3 { margin: 8px 0 0; font: 800 clamp(26px, 3vw, 32px)/1 var(--display); letter-spacing: -.025em; }
.shot > p { margin: 10px 0 0; font-size: 14.5px; line-height: 1.5; color: var(--cream-2); max-width: 40ch; }

@media (min-width: 900px) {
  .strip { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px; }
  .shot:nth-child(2) { margin-top: 46px; }
}
@media (prefers-reduced-motion: reduce) {
  .how .bub { animation: none !important; opacity: 1 !important; }
}

/* the bar: ticker + CA + X, pinned top right on every screen */
.bar { position: fixed; z-index: 20; top: calc(10px + env(safe-area-inset-top)); right: calc(var(--edge) - 4px); display: flex; gap: 6px; }
.bar-ca, .bar-x {
  display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 13px; border-radius: 999px; cursor: pointer; text-decoration: none;
  background: rgba(18,12,8,.74); border: 1px solid rgba(228,165,43,.42); color: var(--cream);
  font: 700 11px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); box-shadow: 0 6px 18px rgba(0,0,0,.4);
}
.bar-ca b { color: var(--mustard); letter-spacing: .02em; font-size: 12px; }
.bar-ca:hover, .bar-x:hover { border-color: var(--mustard); }
.bar-ca:focus-visible, .bar-x:focus-visible, .foot-x:focus-visible { outline: 3px solid var(--cream); outline-offset: 3px; }
.foot-x { margin-top: 10px; font: 700 12px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--mustard); text-underline-offset: 4px; }

/* ================= the hill ================= */
.mores { display: flex; justify-content: center; gap: 4px 26px; flex-wrap: wrap; margin: 14px 0 0; }
.mores .more { display: inline-block; margin: 0; }
.hill-meta { margin: 14px 0 0; font: 700 11px/1.4 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--mustard); }
.hill-reset:not(:empty)::before { content: "· "; color: var(--cream-3); }
.hill-stage {
  position: relative; margin-top: clamp(22px, 4vw, 40px); aspect-ratio: 16 / 9; overflow: hidden; border-radius: 6px;
  background: radial-gradient(70% 70% at 40% 30%, #2b1b10, #0d0805 78%);
  box-shadow: 0 30px 60px rgba(0,0,0,.55), 0 0 0 1px rgba(243,230,204,.06);
}
@media (max-width: 699px) { .hill-stage { aspect-ratio: 1 / 1; margin-inline: calc(var(--edge) * -1); border-radius: 0; } }
.hill-empty {
  position: absolute; left: 0; right: 0; bottom: clamp(14px, 3vw, 26px); margin: 0; padding: 0 var(--edge); text-align: center; pointer-events: none;
  font: 700 clamp(22px, 5vw, 32px)/1.1 var(--hand); color: var(--cream); text-shadow: 0 2px 14px #000, 0 0 2px #000;
}
.hill:not(.is-empty) .hill-empty { display: none; }
.hill-list { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 8px; }
.hill-list:empty { display: none; }
@media (min-width: 900px) { .hill-list { grid-template-columns: 1fr 1fr; column-gap: 24px; } }
.hill-list li {
  display: grid; grid-template-columns: 30px 44px minmax(0, 1fr) auto; align-items: center; gap: 12px;
  padding: 7px 14px 7px 8px; border-radius: 6px; background: rgba(28,19,13,.78); border: 1px solid rgba(243,230,204,.08);
}
.hill-list li:first-child { border-color: rgba(228,165,43,.55); background: linear-gradient(90deg, rgba(228,165,43,.14), rgba(28,19,13,.78) 60%); }
.hl-rank { font: 700 26px/1 var(--hand); color: var(--mustard); text-align: center; }
.hill-list img { width: 44px; height: 55px; object-fit: cover; border-radius: 3px; display: block; background: #0d0805; }
.hl-who { min-width: 0; }
.hl-who b { display: block; font: 700 13.5px/1.2 var(--mono); color: var(--cream); }
.hl-who small { display: block; margin-top: 3px; font-size: 12px; color: var(--cream-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hl-ret { font: 800 22px/1 var(--display); letter-spacing: -.02em; color: var(--cream); font-variant-numeric: tabular-nums; }
.hl-ret.neg { color: var(--red); }
.hill-rule { margin: 18px 0 0; max-width: 62ch; font-size: 12.5px; color: var(--cream-3); }
.hill-cta { margin: 18px 0 0; }

/* plant it: the one loud button in the answer after the reveal */
.plant-box { margin-top: 16px; }
.plant {
  height: 50px; padding: 0 22px; border: 0; border-radius: 8px; cursor: pointer;
  background: var(--mustard); color: var(--ink); box-shadow: 0 5px 0 var(--mustard-edge), 0 10px 22px rgba(0,0,0,.4);
  font: 800 17px/1 var(--display); letter-spacing: -.01em; text-transform: uppercase;
}
.plant:hover { filter: brightness(1.06); }
.plant:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--mustard-edge), 0 4px 10px rgba(0,0,0,.4); }
.plant:disabled { cursor: default; filter: saturate(.4) brightness(.8); transform: none; }
.plant:focus-visible { outline: 3px solid var(--cream); outline-offset: 4px; }
.plant-msg { margin: 10px 0 0; font-size: 13px; color: var(--cream-2); }
.plant-msg:empty { display: none; }
.plant-msg a { color: var(--mustard); font-weight: 700; text-underline-offset: 3px; }

/* powered by Helius: small, honest credit for the chain data */
.powered {
  display: table; margin: 10px auto 0; padding: 5px 11px 5px 9px; border-radius: 999px; text-decoration: none;
  border: 1px solid rgba(243,230,204,.14); background: rgba(18,12,8,.55); color: var(--cream-3);
  font: 700 10px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; white-space: nowrap;
}
.powered b { color: var(--cream); letter-spacing: .04em; }
.powered:hover { border-color: rgba(228,165,43,.5); color: var(--cream-2); }
.powered:focus-visible { outline: 3px solid var(--cream); outline-offset: 3px; }
.powered-dot { display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; vertical-align: 0; background: #ff6a2b; box-shadow: 0 0 8px rgba(255,106,43,.7); }
.foot .powered { margin-top: 18px; }
[data-state="revealed"] .ask .powered { display: none; }

/* ===== the hill, dressed for the ad ===== */
.hill-stage {
  background: #8fb2d6;
  box-shadow: 0 40px 90px rgba(0,0,0,.65), 0 0 0 1px rgba(228,165,43,.18);
}
.hill-stage::after { content: ""; position: absolute; inset: 0; z-index: 300; pointer-events: none; box-shadow: inset 0 0 0 1px rgba(243,230,204,.06), inset 0 0 90px rgba(20,12,6,.35); }
.hill-king {
  position: absolute; z-index: 2; left: 14px; top: 14px; display: grid; grid-template-columns: auto auto auto; align-items: center; gap: 12px;
  padding: 8px 16px 8px 8px; border-radius: 10px; pointer-events: none;
  background: linear-gradient(100deg, rgba(228,165,43,.24), rgba(18,12,8,.82) 55%); border: 1px solid rgba(228,165,43,.6);
  box-shadow: 0 12px 30px rgba(0,0,0,.5); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.hill-king[hidden] { display: none; }
.hk-img { width: 46px; height: 58px; object-fit: cover; border-radius: 4px; display: block; box-shadow: 0 0 0 2px var(--mustard); }
.hill-king p { margin: 0; }
.hk-k { font: 700 9.5px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--mustard); }
.hk-name { margin-top: 4px !important; font: 800 19px/1 var(--display); letter-spacing: -.02em; color: var(--cream); }
.hk-what { margin-top: 4px !important; font-size: 11px; color: var(--cream-3); }
.hk-ret { font: 800 30px/1 var(--display); letter-spacing: -.03em; color: var(--mustard); padding-left: 6px; }
.hill-king.is-sample .hk-ret { color: var(--cream-2); }
@media (max-width: 699px) {
  .hill-king { left: 10px; right: 10px; top: 10px; grid-template-columns: auto 1fr auto; }
  .hk-name { font-size: 17px; } .hk-ret { font-size: 26px; }
}
.hill-empty { font-size: clamp(19px, 4.2vw, 26px); }
.hill-list li.is-sample { opacity: .78; }
.hl-sample {
  display: inline-block; margin-left: 8px; padding: 2px 6px; border-radius: 4px; vertical-align: 1px;
  font: 700 9px/1.2 var(--mono); font-style: normal; letter-spacing: .1em; text-transform: uppercase;
  color: #e9b39f; border: 1px solid rgba(224,106,74,.55);
}
.hl-who b { display: inline; }
.hl-who small { display: block; }
.hill-list li:nth-child(2) { border-color: rgba(207,200,187,.35); }
.hill-list li:nth-child(3) { border-color: rgba(192,125,76,.4); }


/* ===== the hill, flat: one picture of the set, cut-out players standing up the path ===== */
.hill-fees {
  margin: 12px 0 0; max-width: 60ch; padding: 10px 14px; border-radius: 8px;
  border: 1px solid rgba(228,165,43,.45); background: rgba(228,165,43,.1); font-size: 14px; color: var(--cream-2);
}
.hill-fees b { color: var(--mustard); }
.hill-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 60% 100%; display: block; }
.hill-players { position: absolute; inset: 0; }
.pl { position: absolute; left: var(--x); top: var(--y); width: 0; height: 0; }
.pl[hidden] { display: none; }
.pl-fig {
  position: absolute; left: calc(var(--w) / -2); bottom: 0; width: var(--w); height: var(--h); z-index: var(--z);
  transform-origin: 50% 100%;
}
.pl-img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: 50% 100%; display: block;
  transform-origin: 50% 100%; filter: drop-shadow(0 3px 3px rgba(30,20,8,.35));
}
.pl-shadow {
  position: absolute; left: 12%; right: 12%; bottom: -5%; height: 13%; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(25,30,8,.55), rgba(25,30,8,0));
}
.pl-crown {
  position: absolute; left: 50%; bottom: calc(100% - 4px); width: clamp(26px, 30%, 46px); transform: translateX(-50%) rotate(-6deg);
  filter: drop-shadow(0 2px 2px rgba(0,0,0,.35));
}
/* the paper tag under the feet: name, then realized return and realized dollars */
.pl-tag {
  position: absolute; left: 0; top: var(--ty, 4px); z-index: calc(200 + var(--z)); transform: translateX(calc(-50% + var(--tx, 0px))) rotate(var(--tilt, 0deg));
  display: grid; gap: 2px; padding: 4px 8px 5px; min-width: 78px; white-space: nowrap; text-align: center;
  background: #f1e4c6; color: #2a1a0d; border-radius: 3px;
  box-shadow: 0 1px 0 #c9b48c, 0 5px 10px rgba(30,20,8,.35);
  font: 700 11px/1.15 var(--mono);
}
.pl-l1 { display: flex; align-items: center; justify-content: center; gap: 5px; }
.pl-l1 b { max-width: 13ch; overflow: hidden; text-overflow: ellipsis; }
.pl-rank {
  display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; font: 800 9.5px/1 var(--mono); font-style: normal;
  background: #2a1a0d; color: #f1e4c6;
}
.pl-l2 { display: flex; justify-content: center; gap: 7px; font-variant-numeric: tabular-nums; }
.pl-ret { font: 800 13px/1.1 var(--display); letter-spacing: -.01em; }
.pl-usd { font-size: 11px; color: #3d6b1f; }
.pl.is-neg .pl-ret, .pl.is-neg .pl-usd { color: #9b3a22; }
.pl.is-r1 .pl-rank { background: #e4a52b; color: #2a1a0d; box-shadow: 0 0 0 1.5px #5e3c0a; }
.pl.is-r2 .pl-rank { background: #cfc8bb; color: #2a1a0d; box-shadow: 0 0 0 1.5px #6b6458; }
.pl.is-r3 .pl-rank { background: #c07d4c; color: #2a1a0d; box-shadow: 0 0 0 1.5px #5b3417; }
.pl.is-r1 .pl-tag { background: #f7d77f; box-shadow: 0 1px 0 #b98a24, 0 0 0 2px #5e3c0a, 0 8px 16px rgba(30,20,8,.4); font-size: 12px; padding: 5px 10px 6px; }
.pl.is-r1 .pl-ret { font-size: 15px; }
.pl-stamp {
  position: absolute; right: -8px; top: -9px; padding: 1px 4px; transform: rotate(8deg);
  font: 800 8px/1.2 var(--mono); font-style: normal; letter-spacing: .1em; text-transform: uppercase;
  color: #9b3a22; background: #f1e4c6; border: 1.5px solid #9b3a22; border-radius: 2px;
}
.pl.is-r1 .pl-tag { z-index: 299; }
@media (max-width: 699px) {
  .pl-tag { font-size: 9px; min-width: 0; padding: 2px 5px 3px; gap: 1px; }
  .pl-l1 { gap: 3px; }
  .pl-l1 b { max-width: 10ch; }
  .pl-rank { width: 12px; height: 12px; font-size: 7.5px; }
  .pl-ret { font-size: 10.5px; }
  .pl-usd { font-size: 9px; }
  .pl-l2 { gap: 5px; }
  .pl.is-r1 .pl-tag { font-size: 10px; padding: 3px 7px 4px; }
  .pl.is-r1 .pl-ret { font-size: 12px; }
  .pl-stamp { font-size: 6.5px; right: -6px; top: -7px; padding: 0 3px; border-width: 1px; }
}
/* stop-motion: each creature boils on twos, and they pop up out of the hill when it scrolls into view */
@keyframes pl-boil {
  0% { transform: rotate(-.7deg) scaleY(1); }
  33% { transform: rotate(.5deg) scaleY(1.012); }
  66% { transform: rotate(0deg) scaleY(.994) translateY(1px); }
}
@keyframes pl-rise {
  0% { transform: translateY(35%) scaleY(.55); opacity: 0; }
  60% { transform: translateY(-6%) scaleY(1.06); opacity: 1; }
  100% { transform: none; opacity: 1; }
}
@keyframes pl-crown { 0%, 100% { translate: 0 0; } 50% { translate: 0 -3px; } }
@media (prefers-reduced-motion: no-preference) {
  .pl-img { animation: pl-boil .66s steps(1) infinite; animation-delay: var(--b, 0s); }
  .pl-crown { animation: pl-crown 1.3s steps(2) infinite; }
  .hill.can-animate:not(.is-live) .pl-fig, .hill.can-animate:not(.is-live) .pl-tag { opacity: 0; }
  .hill.is-live .pl-fig { animation: pl-rise .5s steps(6) both; animation-delay: var(--d, 0s); }
  .hill.is-live .pl-tag { animation: pl-tag .3s steps(3) both; animation-delay: calc(var(--d, 0s) + .3s); }
}
@keyframes pl-tag { from { opacity: 0; } to { opacity: 1; } }
/* list rows: return on top, dollars under it; the top 3 wear a "fees" chip */
.hl-num { display: grid; justify-items: end; gap: 3px; }
.hl-usd { font: 700 12px/1 var(--mono); color: #9fcf74; font-variant-numeric: tabular-nums; }
.hl-usd.neg { color: var(--red); }
.hl-fee {
  display: inline-block; margin-left: 8px; padding: 2px 6px; border-radius: 4px; vertical-align: 1px;
  font: 700 9px/1.2 var(--mono); font-style: normal; letter-spacing: .1em; text-transform: uppercase;
  color: #2a1a0d; background: var(--mustard);
}
.hill-empty { z-index: 290; top: 18px; bottom: auto; left: auto; right: 0; max-width: 36%; text-align: right; font-size: clamp(18px, 2vw, 24px); }
@media (max-width: 699px) { .hill-empty { display: none; } }
.hk-what { color: var(--cream-2); }
.hill-king { z-index: 295; }


/* ===== loading: "your egg is hatching" while Helius reads the wallet ===== */
.ask.is-loading .hatch-form, .ask.is-loading .note, .ask.is-loading .mores, .ask.is-loading .msg { display: none; }
.hatching { text-align: center; padding: 4px 0 2px; }
.hatching[hidden] { display: none; }
.hatching-h { margin: 0; font: 700 clamp(30px, 6.4vw, 44px)/1.05 var(--hand); color: var(--cream); text-shadow: 0 2px 14px rgba(0,0,0,.6); }
.hatching .dots i { font-style: normal; }
.hatching-step { margin: 10px 0 0; min-height: 1.4em; font: 700 11.5px/1.4 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--mustard); }
.hatching-bar {
  max-width: 340px; height: 12px; margin: 12px auto 0; padding: 2px; border-radius: 999px;
  background: rgba(13,8,5,.7); border: 1px solid rgba(228,165,43,.45); box-shadow: inset 0 1px 3px rgba(0,0,0,.6);
}
.hatching-bar span {
  display: block; height: 100%; width: calc(var(--p, 0) * 1%); border-radius: inherit;
  background: repeating-linear-gradient(-45deg, #e4a52b 0 7px, #c4861a 7px 14px);
}
.hatching-addr { margin: 9px 0 0; font: 700 11px/1 var(--mono); letter-spacing: .06em; color: var(--cream-3); }
@media (prefers-reduced-motion: no-preference) {
  .hatching .dots i { animation: hatch-dot 1.2s steps(1) infinite; }
  .hatching .dots i:nth-child(2) { animation-delay: .3s; }
  .hatching .dots i:nth-child(3) { animation-delay: .6s; }
  .hatching-bar span { animation: hatch-bar .5s steps(4) infinite; }
}
@keyframes hatch-dot { 0% { opacity: .15; } 50% { opacity: 1; } }
@keyframes hatch-bar { to { background-position: 19.8px 0; } }

/* ===== the result picture: sharp, framed, on lamp-lit mud (no blurred copy at the sides) ===== */
.reveal-bg { display: none; }
.reveal {
  background:
    radial-gradient(42% 50% at 50% 42%, rgba(255,170,80,.16), rgba(255,170,80,0) 70%),
    radial-gradient(80% 90% at 50% 40%, #2a1a0f, #0d0805 80%);
}
@media (min-width: 900px) and (min-aspect-ratio: 19/20) {
  .reveal-frame { top: 5%; height: 90%; border-radius: 4px; overflow: hidden; }
  [data-state="revealed"] .reveal-frame, .reveal-frame {
    box-shadow: 0 0 0 9px #2a1a0d, 0 0 0 11px rgba(228,165,43,.4), 0 34px 90px rgba(0,0,0,.75);
  }
}

/* the fee split: 60 / 30 / 10, in podium colours */
.fee-split { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.fs { padding: 3px 8px; border-radius: 4px; font: 800 12px/1.2 var(--mono); color: #2a1a0d; }
.fs-1 { background: #e4a52b; } .fs-2 { background: #cfc8bb; } .fs-3 { background: #c07d4c; }
.pl-fee {
  justify-self: center; margin-top: 1px; padding: 1px 5px; border-radius: 2px;
  font: 800 9px/1.2 var(--mono); letter-spacing: .04em; text-transform: uppercase; background: #2a1a0d; color: #f1e4c6;
}
.pl.is-r1 .pl-fee { background: #5e3c0a; color: #ffe08a; }
@media (max-width: 699px) { .pl-fee { font-size: 7.5px; padding: 0 4px; } }
.hill-last { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 10px 0 0; font: 700 12px/1.4 var(--mono); color: var(--cream-2); }
.hill-last[hidden] { display: none; }
.hill-last b { color: var(--mustard); }

/* ===== trench camo instead of flat brown: on the page base, behind the result picture, and under the sections ===== */
html, body { background: #140d09 url(../img/camo.webp) 0 0 / 560px repeat; }
.reveal {
  background:
    radial-gradient(42% 50% at 50% 42%, rgba(255,170,80,.16), rgba(255,170,80,0) 70%),
    radial-gradient(80% 90% at 50% 40%, rgba(42,26,15,.35), rgba(13,8,5,.85) 85%),
    #140d09 url(../img/camo.webp) 0 0 / 560px repeat;
}
/* the answer column on desktop: camo with a warm lamp from the top so the text sits on a calm patch */
@media (min-width: 900px) and (min-aspect-ratio: 19/20) {
  [data-state="revealed"] .dock {
    background: radial-gradient(90% 60% at 50% 0%, rgba(228,165,43,.08), rgba(228,165,43,0) 70%),
      linear-gradient(90deg, rgba(10,6,4,.55), rgba(10,6,4,.2));
    border-left: 1px solid rgba(228,165,43,.14);
  }
}
.below { background: #140d09 url(../img/camo.webp) 0 0 / 560px repeat; }
.backdrop {
  background:
    radial-gradient(120% 90% at 50% 40%, rgba(20,13,9,.15), rgba(20,13,9,.75) 75%),
    linear-gradient(rgba(20,13,9,.35), rgba(20,13,9,.5)),
    url(../img/backdrop.webp) 50% 40% / cover no-repeat;
  opacity: .5;
}
