@font-face {
  font-family: "Pixer";
  src: url("assets/fonts/Pixer-Regular.woff2") format("woff2"), url("assets/fonts/Pixer-Regular.woff") format("woff");
  font-weight: 400; font-style: normal; font-display: swap;
}
:root {
  --coral: #FB6160;
  --coral-d: #E94B4B;
  --ink: #161214;
  --cream: #FFF6E6;
  --blue: #4A86BE;
  --steel: #B9C6D2;
  --yellow: #F7CE3E;
  --red: #E0302B;
  --ratio: 1.7917;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--coral); color: #fff; }
body {
  font-family: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* paper grain over the letterbox areas so they match the illustration */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: .22;
  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='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .55 0 0 0 0 .15 0 0 0 0 .15 0 0 0 .5 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
button { font: inherit; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- STAGE (desktop / landscape) ---------- */
.stage {
  position: relative; z-index: 1;
  height: 100vh; height: 100svh; overflow: hidden;
  --sw: min(100vw, calc(100svh * var(--ratio)));
  --sh: calc(var(--sw) / var(--ratio));
  --u: calc(var(--sw) / 100);           /* 1% of scene width */
}

.scene {
  position: absolute; bottom: 0; left: 50%;
  width: var(--sw); height: var(--sh);
  transform: translateX(-50%);
  container-type: inline-size;
  user-select: none; -webkit-user-select: none;
}
.scene {
  overflow: hidden;
  perspective: calc(var(--sw) * 1.4); perspective-origin: 50% 45%;
  --zk: calc(var(--sw) * -0.03); --za: calc(var(--sw) * 0.015); --zh: calc(var(--sw) * 0.026);
}
/* backdrop */
.plate { position: absolute; inset: 0; z-index: 0;
  transform: translate3d(calc(var(--nx, 0) * -1.1%), calc(var(--ny, 0) * -.7%), 0) scale(1.03); }
.plate .bg { display: block; width: 100%; height: 100%; }
.plate .shadow { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .55;
  transform: translate(calc(1.2% + var(--nx, 0) * -2.4%), calc(.9% + var(--ny, 0) * -1.2%)); }

/* 3D rig: layers at different depths; scale() cancels the perspective growth so the
   artwork lines up perfectly when Santa faces straight ahead */
.rig { position: absolute; inset: 0; z-index: 1; transform-style: preserve-3d; transform-origin: 50% 75%;
  transform: rotateY(calc(var(--nx, 0) * 8deg)) rotateX(calc(var(--ny, 0) * -5deg)); }
.layer { position: absolute; inset: 0; transform-origin: 50% 45%; pointer-events: none; }
.d-head > .turn { pointer-events: none; }
.layer .arm { pointer-events: auto; }
.d-key  { transform-style: preserve-3d; transform: translateZ(var(--zk)) scale(calc(1 + 0.03 / 1.4)); }
.d-body { transform: translateZ(0); }
.d-arm  { transform: translateZ(var(--za)) scale(calc(1 - 0.015 / 1.4)); }
.d-head { transform-style: preserve-3d; transform: translateZ(var(--zh)) scale(calc(1 - 0.026 / 1.4)); transform-origin: 50% 45%; }
.d-head > .turn { position: absolute; inset: 0; transform-origin: 50% 66%;
  transform: rotateY(calc(var(--nx, 0) * 7deg)) rotateX(calc(var(--ny, 0) * -6deg)) rotateZ(calc(var(--nx, 0) * 1.6deg)); }
.part { position: absolute; display: block; pointer-events: none; user-select: none; }
.p-body { left: 24.9273%; top: 64.0625%; width: 49.0916%; height: 41.9271%; }
.p-head { left: 29.0698%; top: 13.9323%; width: 33.9753%; height: 83.5938%; }
.key { position: absolute; display: block; pointer-events: none;
  left: 29.2878%; top: 50.0651%; width: 14.0625%; height: 24.0885%;
  transform-origin: 50% 49.73%; backface-visibility: visible; }

/* moving light: a soft highlight that follows the pointer, clipped to each part */
.sheen { position: absolute; pointer-events: none;
  -webkit-mask: var(--m) center / 100% 100% no-repeat; mask: var(--m) center / 100% 100% no-repeat;
  background:
    radial-gradient(circle at var(--lx, 50%) var(--ly, 30%), rgba(255, 252, 235, .30), rgba(255, 252, 235, 0) 38%),
    linear-gradient(calc(90deg + var(--nx, 0) * 1deg), rgba(40, 10, 30, calc(.10 + var(--nx, 0) * .10)), rgba(40, 10, 30, 0) 45%, rgba(40, 10, 30, 0) 55%, rgba(40, 10, 30, calc(.10 - var(--nx, 0) * .10))); }
.s-body { --m: url(assets/l-body.webp); left: 24.9273%; top: 64.0625%; width: 49.0916%; height: 41.9271%; }
.s-head { --m: url(assets/l-head.webp); left: 29.0698%; top: 13.9323%; width: 33.9753%; height: 83.5938%; }

/* pupils that follow you round the room */
.pupil { position: absolute; z-index: 1; pointer-events: none; width: 1.5%; aspect-ratio: 1; border-radius: 50%;
  transform: translate(-50%, -50%) translate(calc(var(--px, 0) * 65%), calc(var(--py, 0) * 55%));
  background: radial-gradient(circle at 34% 30%, #fff 0 17%, transparent 19%), radial-gradient(circle, #3d0507 0 52%, #7d0c10 72%);
  border: max(1px, .14cqw) solid #161214; }
.pupil.l { left: 46.0%; top: 48.75%; }
.pupil.r { left: 54.2%; top: 48.4%; }
.scene.shake { animation: shake .45s cubic-bezier(.36,.07,.19,.97); }
@keyframes shake {
  10%, 90% { transform: translateX(calc(-50% - 1px)); }
  20%, 80% { transform: translateX(calc(-50% + 3px)); }
  30%, 50%, 70% { transform: translateX(calc(-50% - 5px)) rotate(-.2deg); }
  40%, 60% { transform: translateX(calc(-50% + 5px)) rotate(.2deg); }
}

/* ---------- ARM / LEVER ---------- */
.arm {
  position: absolute; left: 68.2776%; top: 48.0469%; width: 13.0451%; height: 57.9427%;
  cursor: grab; touch-action: none; outline: none;
  transform: translateY(var(--pull, 0px));
  transition: transform .55s cubic-bezier(.3, 1.8, .45, 1);
  z-index: 3;
}
.arm.dragging { transition: none; cursor: grabbing; }
.arm img { display: block; width: 100%; height: 100%; pointer-events: none; }
.arm:focus-visible img { filter: drop-shadow(0 0 .35cqw #fff) drop-shadow(0 0 .35cqw #fff); }
.arm.idle img { animation: beckon 3.2s ease-in-out infinite; transform-origin: 50% 100%; }
@keyframes beckon {
  0%, 70%, 100% { transform: translateY(0); }
  76% { transform: translateY(1.6%); }
  82% { transform: translateY(-.6%); }
  88% { transform: translateY(1%); }
  94% { transform: translateY(0); }
}
.arm.auto { animation: lever 1s cubic-bezier(.5, 0, .3, 1); }
@keyframes lever {
  0% { transform: translateY(0); }
  38% { transform: translateY(22%); }
  52% { transform: translateY(22%); }
  70% { transform: translateY(-3.5%); }
  84% { transform: translateY(1.2%); }
  100% { transform: translateY(0); }
}

/* ---------- EYES + MOUTH ---------- */
.eye, .mouth { position: absolute; pointer-events: none; transform: translate(-50%, -50%); opacity: 0; z-index: 2; }
.eye {
  width: 5.2%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, #fff 0 16%, #fff59a 26%, #ff4a35 48%, rgba(255, 50, 40, .55) 58%, rgba(255, 40, 40, 0) 70%);
  mix-blend-mode: screen;
}
.eye::after {
  content: ""; position: absolute; inset: -60%; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 235, 120, .55), rgba(255, 70, 50, .25) 40%, transparent 68%);
}
.eye.l { left: 46.0%; top: 48.75%; }
.eye.r { left: 54.2%; top: 48.4%; }
.mouth {
  left: 50.25%; top: 63.9%; width: 9.5%; height: 6.5%; border-radius: 40%;
  background: radial-gradient(ellipse, rgba(255, 250, 200, .95), rgba(255, 214, 80, .7) 38%, rgba(255, 150, 40, 0) 72%);
  mix-blend-mode: screen;
}

/* flashing ≈ 2.5 per second to stay under the 3-flashes-a-second safety limit */
.scene.gen .eye { animation: eyeflash .4s steps(1) infinite; }
.scene.gen .eye.r { animation-delay: .2s; }
@keyframes eyeflash { 0% { opacity: 1; } 50% { opacity: .15; } }
.scene.gen .mouth { animation: mouthglow 1.1s ease-in-out infinite; }
@keyframes mouthglow { 0%, 100% { opacity: .2; } 50% { opacity: .55; } }
.scene.cool .eye { animation: eyecool 2s ease-in-out infinite; }
@keyframes eyecool { 0%, 100% { opacity: 0; } 50% { opacity: .55; } }
.scene.drop .eye { opacity: 1; transition: opacity .6s; }
.scene.drop .mouth { animation: mouthburst .7s ease-out forwards; }
@keyframes mouthburst { 0% { opacity: 1; transform: translate(-50%, -50%) scale(1); } 100% { opacity: 0; transform: translate(-50%, -50%) scale(3.2); } }

/* ---------- OVERHEATING: smoke, bubble, jam ---------- */
.fx {
  position: absolute; inset: 0; width: 100%; height: 100%; z-index: 4; pointer-events: none;
  image-rendering: pixelated; image-rendering: crisp-edges;
}

/* ---------- MOUTH: dark furnace behind a jaw plate that drops open ---------- */
.maw {
  position: absolute; z-index: 1; pointer-events: none;
  left: 45.85%; top: 63.75%; width: 8.9%; height: 4.35%;
  background: #120606; border-radius: 0 0 22% 22% / 0 0 40% 40%;
  box-shadow: inset 0 .35cqw 0 #000;
  overflow: hidden;
}
.maw::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 85% at 50% 30%, #fff4b0 0, #ffcc3d 22%, #ff6a22 45%, rgba(170, 20, 10, .6) 70%, transparent 90%);
  opacity: calc(var(--glow, .4) * .95);
  animation: furnace .3s steps(2) infinite;
}
@keyframes furnace { 50% { filter: brightness(1.25); } }
.jaw {
  position: absolute; z-index: 2; pointer-events: none; display: block;
  left: 45.6395%; top: 63.6068%; width: 9.266%; height: 4.4922%;
  transform: translateY(calc(var(--jaw, 0) * 100%));
  will-change: transform;
}

/* gift tile that pops out of the mouth */
.gift-pop {
  position: absolute; z-index: 5; pointer-events: none;
  left: 50.2%; top: 65.6%; width: 15%; aspect-ratio: 1;
  transform: translate(-50%, -50%) scale(.04); opacity: 0;
  border: .3cqw solid var(--ink); border-radius: .5cqw; background: var(--cream);
  box-shadow: .45cqw .45cqw 0 var(--ink); padding: .5cqw;
}
.gift-pop img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: .2cqw; }
.gift-pop.out { animation: popout 1s cubic-bezier(.2, .9, .3, 1.15) forwards; }
@keyframes popout {
  0% { transform: translate(-50%, -50%) scale(.04) rotate(0); opacity: 0; }
  8% { opacity: 1; }
  45% { transform: translate(-50%, -128%) scale(1.08) rotate(-8deg); }
  65% { transform: translate(-50%, -112%) scale(.96) rotate(4deg); }
  82% { transform: translate(-50%, -120%) scale(1.02) rotate(-3deg); }
  100% { transform: translate(-50%, -118%) scale(1) rotate(-2deg); opacity: 1; }
}
.gift-pop.gone { opacity: 0 !important; transition: opacity .15s; }

.scene.cool .eye { animation: eyecool 1.6s ease-in-out infinite; }
.scene.cool .part, .scene.cool .key { animation: hot 1.6s ease-in-out infinite; }
@keyframes hot { 50% { filter: saturate(1.15) brightness(1.03); } }
.scene.zap .eye { animation: zap .5s steps(1) 1; }
@keyframes zap { 0%, 40% { opacity: 1; } 20%, 60%, 100% { opacity: 0; } }
.arm.jam { animation: jam .7s cubic-bezier(.3, .7, .4, 1); }
@keyframes jam {
  0% { transform: translateY(0); }
  12% { transform: translateY(5%) rotate(1.5deg); }
  20% { transform: translateY(4%) rotate(-1.5deg); }
  28% { transform: translateY(5%) rotate(1deg); }
  36% { transform: translateY(4.5%) rotate(-1deg); }
  60% { transform: translateY(-1%) rotate(0); }
  100% { transform: translateY(0); }
}
.bubble {
  /* 8-bit speech bubble: stepped corners, chunky pixel border, hard pixel drop shadow */
  --p: .26cqw;
  position: absolute; z-index: 4; left: auto; right: 55.5%; top: 3.5%; margin: 0; max-width: 23%;
  background: #fff; color: var(--ink); border: 0; border-radius: 0;
  padding: calc(var(--p) * 4) calc(var(--p) * 5) calc(var(--p) * 3.5);
  box-shadow:
    0 calc(var(--p) * -1) 0 var(--ink), 0 var(--p) 0 var(--ink),
    calc(var(--p) * -1) 0 0 var(--ink), var(--p) 0 0 var(--ink);
  filter: drop-shadow(var(--p) var(--p) 0 rgba(22, 18, 20, .38)) drop-shadow(var(--p) 0 0 rgba(22, 18, 20, .38));
  font-family: "Press Start 2P", "Courier New", monospace; font-weight: 400;
  font-size: .95cqw; line-height: 1.6; text-transform: uppercase; letter-spacing: 0;
  image-rendering: pixelated; transform-origin: 86% 130%;
  -webkit-font-smoothing: none; font-smooth: never;
}
/* tail: a pixel staircase off the bottom right, pointing down to Santa */
.bubble::after {
  content: ""; position: absolute; right: 12%; top: 100%; width: var(--p); height: var(--p);
  background: var(--ink);
  box-shadow:
    calc(var(--p) * 1) calc(var(--p) * 0) 0 #fff,
    calc(var(--p) * 2) calc(var(--p) * 0) 0 #fff,
    calc(var(--p) * 3) calc(var(--p) * 0) 0 #fff,
    calc(var(--p) * 4) calc(var(--p) * 0) 0 var(--ink),
    calc(var(--p) * 0) calc(var(--p) * 1) 0 var(--ink),
    calc(var(--p) * 1) calc(var(--p) * 1) 0 #fff,
    calc(var(--p) * 2) calc(var(--p) * 1) 0 #fff,
    calc(var(--p) * 3) calc(var(--p) * 1) 0 #fff,
    calc(var(--p) * 4) calc(var(--p) * 1) 0 var(--ink),
    calc(var(--p) * 1) calc(var(--p) * 2) 0 var(--ink),
    calc(var(--p) * 2) calc(var(--p) * 2) 0 #fff,
    calc(var(--p) * 3) calc(var(--p) * 2) 0 #fff,
    calc(var(--p) * 4) calc(var(--p) * 2) 0 #fff,
    calc(var(--p) * 5) calc(var(--p) * 2) 0 var(--ink),
    calc(var(--p) * 2) calc(var(--p) * 3) 0 var(--ink),
    calc(var(--p) * 3) calc(var(--p) * 3) 0 #fff,
    calc(var(--p) * 4) calc(var(--p) * 3) 0 #fff,
    calc(var(--p) * 5) calc(var(--p) * 3) 0 var(--ink),
    calc(var(--p) * 3) calc(var(--p) * 4) 0 var(--ink),
    calc(var(--p) * 4) calc(var(--p) * 4) 0 #fff,
    calc(var(--p) * 5) calc(var(--p) * 4) 0 var(--ink),
    calc(var(--p) * 4) calc(var(--p) * 5) 0 var(--ink),
    calc(var(--p) * 5) calc(var(--p) * 5) 0 var(--ink);
}
.bubble[hidden] { display: none; }
@keyframes pop { 0% { transform: scale(.3); opacity: 0; } 60% { transform: scale(1.08); opacity: 1; } 100% { transform: scale(1); } }
.bubble.pop { animation: pop .3s steps(4, end); }

/* ---------- HINT + ARROW ---------- */
.hint {
  position: absolute; left: 80.4%; top: 38.6%; width: 17.5%; margin: 0;
  font-weight: 900; font-size: 1.25cqw; line-height: 1.25; letter-spacing: .02em; text-transform: uppercase;
  transform: rotate(6deg); transform-origin: left top;
  animation: xmas-flash 1s steps(1, end) infinite;
}
.arrow { position: absolute; left: 82%; top: 46%; width: 7.5%; overflow: visible; animation: nudge 1.6s ease-in-out infinite; }
.arrow path { fill: none; stroke: #fff; animation: xmas-flash-stroke 1s steps(1, end) infinite; stroke-width: 4.5; stroke-linecap: round; stroke-linejoin: round; }
/* CTA flashes white / Christmas green */
@keyframes xmas-flash { 0% { color: #fff; } 50% { color: var(--xmas-green, #9b0000); } }
@keyframes xmas-flash-stroke { 0% { stroke: #fff; } 50% { stroke: var(--xmas-green, #9b0000); } }
@keyframes xmas-flash-bg { 0% { background-color: var(--ink); } 50% { background-color: var(--xmas-green, #0b6b34); } }
@keyframes nudge { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(-4%, 4%); } }
.hint-m { display: none; }

/* ---------- LEFT COPY ---------- */
.copy {
  position: absolute; z-index: 4;
  left: calc((100vw - var(--sw)) / 2 + var(--u) * 2);
  top: calc(100svh - var(--sh) * .935);
  width: calc(var(--u) * 28.5);
  transform: translate(calc(var(--nx, 0) * -.5%), calc(var(--ny, 0) * -.4%));
  font-size: max(10px, calc(var(--u) * 1.2));
}
.copy h1 { margin: 0; line-height: 0; }
.site-title {
  font-family: "Pixer", "Press Start 2P", monospace; font-weight: 400; color: #fff;
  font-size: calc(var(--u) * 5.3); line-height: .98 !important; letter-spacing: .02em; white-space: nowrap;
}
.intro { margin: 1.3em 0 0; line-height: 1.38; font-weight: 400; }
.question { margin: 1em 0 0; font-weight: 800; line-height: 1.35; }

.machine { margin-top: 1.2em; width: 80%; }
.reels { display: flex; align-items: center; gap: .5em; }
.reels-2 { margin-top: .55em; }
.op { font-weight: 900; font-size: 1.4em; width: .9em; text-align: center; flex: none; }
.reels-2 .op { margin-left: 0; }
.reel {
  --h: 2.9em;
  position: relative; flex: 1 1 0; min-width: 0; height: var(--h); overflow: hidden;
  background: var(--cream); color: var(--ink);
  border: .16em solid var(--ink); border-radius: .45em;
  box-shadow: .22em .22em 0 var(--ink), inset 0 .5em .6em -.3em rgba(0,0,0,.25), inset 0 -.5em .6em -.3em rgba(0,0,0,.25);
}
.reel::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(0,0,0,.18), transparent 28%, transparent 72%, rgba(0,0,0,.18));
}
.reel-word { --h: 3.4em; background: var(--yellow); }
.strip { will-change: transform; }
.reel { box-sizing: content-box; }
.strip span {
  display: flex; align-items: center; justify-content: center; text-align: center;
  height: var(--h); padding: 0 .45em; overflow: hidden;
}
.strip i {
  font-style: normal; font-weight: 800; font-size: .8em; line-height: 1.08;
  text-transform: uppercase; letter-spacing: .01em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.reel-word .strip i { font-size: 1.2em; font-weight: 900; text-transform: none; letter-spacing: -.01em; -webkit-line-clamp: 1; }
.status { margin: 1.2em 0 0; font-size: .82em; font-weight: 600; min-height: 2.6em; opacity: .95; }
.status b { font-weight: 900; }

.pull-btn {
  display: none; margin-top: 1em;
  background: var(--ink); color: #fff; border: 0; border-radius: 999px;
  padding: .85em 1.6em; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; cursor: pointer;
  box-shadow: .2em .2em 0 rgba(0,0,0,.25);
}

.human-note {
  position: absolute; z-index: 4; margin: 0; bottom: calc(var(--u) * 1.6);
  left: calc((100vw - var(--sw)) / 2 + var(--u) * 2);
  width: calc(var(--u) * 20);
  font-size: max(10px, calc(var(--u) * .85));
}
.hn-line { margin: 0; font-weight: 800; font-size: 1.25em; line-height: 1.25; }
.logo-link { display: inline-block; }
.logo-link:hover img, .logo-link:focus-visible img { opacity: .85; }
.logo-link:focus-visible { outline: 3px solid #fff; outline-offset: 4px; }
.hn-small { margin: 1.1em 0 0; font-weight: 600; line-height: 1.4; opacity: .92; }
.hn-logo { display: block; width: 17em; max-width: 100%; height: auto; margin-top: 1.1em; }

.leap-note {
  position: absolute; z-index: 4; margin: 0; bottom: calc(var(--u) * 1.6);
  right: calc((100vw - var(--sw)) / 2 + var(--u) * 2);
  width: calc(var(--u) * 15); text-align: right;
  font-size: max(10px, calc(var(--u) * .85));
}
.ln-line { margin: 0; font-weight: 800; font-size: 1.25em; line-height: 1.25; }
.ln-logo { display: block; width: 100%; height: auto; margin-top: .9em; }

.sound {
  position: absolute; z-index: 6; top: max(14px, calc(var(--u) * 1.6)); right: max(14px, calc(var(--u) * 1.6));
  width: 44px; height: 44px; border-radius: 50%; border: 2px solid #fff; background: transparent; color: #fff;
  display: grid; place-items: center; cursor: pointer;
}
.sound.music { right: calc(max(14px, calc(var(--u) * 1.6)) + 54px); }
.sound.music .spk { fill: none; stroke-width: 2; }
.sound.music .off { display: none; }
.sound.music[aria-pressed="false"] .off { display: inline; }
.sound svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sound .spk { fill: currentColor; }
.sound .off { display: none; }
.sound[aria-pressed="false"] .on { display: none; }
.sound[aria-pressed="false"] .off { display: inline; }

/* ---------- RESULT CARD ---------- */
.result {
  position: fixed; inset: 0; z-index: 20;
  display: grid; place-items: center; padding: 16px;
  background: rgba(40, 10, 12, .55);
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  animation: fade .3s ease;
}
.result[hidden] { display: none; }
@keyframes fade { from { opacity: 0; } }
.card {
  --from-x: 0px; --from-y: 0px; --from-s: .04;
  position: relative; width: min(980px, 100%); max-height: calc(100svh - 32px); overflow: auto;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0;
  background: var(--cream); color: var(--ink);
  border: 4px solid var(--ink); border-radius: 18px;
  box-shadow: 10px 10px 0 var(--ink);
  animation: spit .85s cubic-bezier(.18, 1.25, .4, 1) both;
}
@keyframes spit {
  0% { transform: translate(var(--from-x), var(--from-y)) scale(var(--from-s)) rotate(-4deg); opacity: .9; }
  12% { opacity: 1; }
  100% { transform: none; }
}
.close {
  position: absolute; top: 10px; right: 12px; z-index: 2;
  width: 40px; height: 40px; border-radius: 50%; border: 3px solid var(--ink); background: #fff; color: var(--ink);
  font-size: 26px; line-height: 1; font-weight: 800; cursor: pointer;
}
.card-img { position: relative; background: var(--coral); border-right: 4px solid var(--ink); display: grid; place-items: center; padding: 22px; }
.card-img img {
  width: 100%; aspect-ratio: 1; object-fit: cover; display: block;
  border: 4px solid var(--ink); border-radius: 6px; background: var(--coral-d);
  box-shadow: 7px 7px 0 var(--ink); transform: rotate(-1.5deg);
}
.tag {
  position: absolute; top: 12px; left: 12px; transform: rotate(-8deg);
  background: var(--yellow); color: var(--ink); border: 3px solid var(--ink);
  font-weight: 900; font-size: 14px; padding: 4px 10px; border-radius: 999px; letter-spacing: .04em;
}
.card-info { padding: 28px 30px 26px; }
.kicker { margin: 0 46px 4px 0; font-weight: 800; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--red); }
.gift-name { margin: 0; font-weight: 900; font-size: clamp(34px, 4.4vw, 54px); line-height: 1; letter-spacing: -.02em; overflow-wrap: anywhere; }
.combo { margin: 10px 0 0; font-weight: 800; font-size: 15px; color: var(--blue); }
.desc { margin: 12px 0 0; font-size: 17px; line-height: 1.45; }
.defects { margin: 10px 0 0; font-size: 14px; line-height: 1.4; font-weight: 600; }
.defects b { font-weight: 900; text-transform: uppercase; letter-spacing: .04em; margin-right: 4px; }
.stats { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.stats li { border: 2px solid var(--ink); border-radius: 999px; padding: 4px 11px; font-size: 12.5px; font-weight: 600; background: #fff; }
.stats b { font-weight: 900; }

.share { margin-top: 20px; padding: 16px; border: 3px dashed var(--ink); border-radius: 14px; background: #fff; }
.share-title { margin: 0 0 10px; font-weight: 900; font-size: 20px; text-transform: uppercase; letter-spacing: .02em; }
.share-row { display: flex; flex-wrap: wrap; gap: 8px; }
.sbtn {
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer; text-decoration: none;
  background: var(--ink); color: #fff; border: 2px solid var(--ink); border-radius: 999px;
  padding: 8px 13px; font-weight: 800; font-size: 13.5px;
  transition: transform .12s, background .12s;
}
.sbtn:hover, .sbtn:focus-visible { background: var(--red); transform: translateY(-2px); }
.sbtn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.sbtn svg.fill { fill: currentColor; stroke: none; }
.sbtn.native { background: var(--red); border-color: var(--red); }
.sbtn.native[hidden] { display: none; }
.share-tip { margin: 10px 0 0; font-size: 12px; opacity: .75; }

.actions { margin-top: 16px; }
.again {
  width: 100%; cursor: pointer; border: 3px solid var(--ink); border-radius: 12px;
  background: var(--yellow); color: var(--ink); padding: 13px; font-weight: 900; font-size: 17px;
  text-transform: uppercase; letter-spacing: .04em; box-shadow: 4px 4px 0 var(--ink);
}
.again:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.fine { margin: 14px 0 0; font-size: 12.5px; line-height: 1.45; opacity: .8; }

/* ---------- OUT OF CREATIVE JUICE (daily cap reached) ---------- */
.scene.overload { animation: overload .14s linear infinite; }
@keyframes overload {
  0%, 100% { transform: translateX(calc(-50% - 4px)) rotate(-.35deg); }
  25% { transform: translateX(calc(-50% + 3px)) translateY(-2px) rotate(.25deg); }
  50% { transform: translateX(calc(-50% + 5px)) rotate(.35deg); }
  75% { transform: translateX(calc(-50% - 3px)) translateY(2px) rotate(-.2deg); }
}
.scene.overload .eye { animation: eyeflash .4s steps(1) infinite; }
.scene.overload .eye.r { animation-delay: .2s; }
.scene.overload .part, .scene.overload .key { animation: hot .5s ease-in-out infinite; }
.scene .part, .scene .key, .scene .arm img, .scene .jaw { transition: filter 2.5s ease; }
.scene.burning .part, .scene.burning .key, .scene.burning .arm img, .scene.burning .jaw {
  filter: brightness(.62) sepia(.55) saturate(1.7) hue-rotate(-18deg) contrast(1.15);
}
.scene.charred .part, .scene.charred .key, .scene.charred .arm img, .scene.charred .jaw {
  filter: brightness(.42) sepia(.35) saturate(.55) contrast(1.25); transition-duration: 4s;
}
.scene.burning .eye { animation: eyecool 1.8s ease-in-out infinite; }
.scene.burning .maw::after { opacity: 1; }
/* red alarm light round the edges (1 pulse a second, well under the flash limit) */
.stage::before {
  content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none; opacity: 0;
  background: radial-gradient(ellipse at 50% 55%, transparent 45%, rgba(190, 0, 0, .55) 100%);
}
.stage.alarm::before { animation: alarmglow 1s ease-in-out infinite; }
@keyframes alarmglow { 50% { opacity: 1; } }
/* one white-hot flash as he ignites */
.stage::after {
  content: ""; position: absolute; inset: 0; z-index: 7; pointer-events: none; opacity: 0;
  background: radial-gradient(circle at 60% 45%, #fffbe0, rgba(255, 170, 60, .7) 40%, rgba(255, 80, 30, 0) 75%);
}
.stage.flash::after { animation: ignite .7s ease-out 1; }
@keyframes ignite { 0% { opacity: 0; } 12% { opacity: .95; } 100% { opacity: 0; } }
.jm { display: inline-block; vertical-align: -.15em; width: 8em; height: .95em; margin: 0 .3em;
  border: 3px solid var(--ink); background: rgba(255, 255, 255, .35); }
.jm i { display: block; height: 100%; background: repeating-linear-gradient(90deg, var(--yellow, #F7CE3E) 0 .45em, transparent .45em .6em); }

.juice {
  position: absolute; z-index: 8;
  left: calc((100vw - var(--sw)) / 2 + var(--u) * 2);
  top: calc(100svh - var(--sh) * .875);
  width: calc(var(--u) * 27.5);
  font-size: max(10px, calc(var(--u) * 1));
  background: var(--ink); color: #fff; border: 4px solid #fff; padding: 1.6em 1.6em 1.5em;
  box-shadow: .55em .55em 0 rgba(22, 18, 20, .55);
}
.juice[hidden] { display: none; }
.juice.in { animation: juicein .45s steps(5, end); }
@keyframes juicein { 0% { transform: scale(.6); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
.juice-x { position: absolute; top: .4em; right: .55em; background: none; border: 0; color: #fff; font-size: 1.9em; line-height: 1; cursor: pointer; }
.juice-kicker { margin: 0 0 .6em; font-weight: 800; font-size: .85em; letter-spacing: .14em; text-transform: uppercase; color: var(--coral, #FB6160); }
.juice-title { margin: 0; font-family: "Pixer", "Press Start 2P", monospace; font-weight: 400; font-size: 2.35em; line-height: 1.08; letter-spacing: .02em; color: #F7CE3E; }
.juice-meter { position: relative; margin: 1em 0 .2em; height: 1.4em; border: 3px solid #fff; }
.juice-meter i { position: absolute; left: 0; top: 0; bottom: 0; width: 2%; background: var(--coral, #FB6160); animation: empty 1s steps(2) infinite; }
.juice-meter span { position: absolute; right: .5em; top: 50%; transform: translateY(-50%); font-family: "Pixer", monospace; font-size: .95em; }
@keyframes empty { 50% { opacity: .2; } }
.juice-text { margin: .9em 0 0; line-height: 1.42; }
.juice-cta {
  display: inline-block; margin-top: 1.2em; padding: .85em 1.25em;
  background: #F7CE3E; color: var(--ink); border: 3px solid #fff; border-radius: 999px;
  font-weight: 900; text-transform: uppercase; letter-spacing: .03em; text-decoration: none; line-height: 1.2;
  box-shadow: .25em .25em 0 #fff;
}
.juice-cta:hover, .juice-cta:focus-visible { background: #fff; outline: none; }
.juice-logo { display: block; width: 11em; height: auto; margin-top: 1.4em; }
.testbar {
  position: fixed; z-index: 100; left: 0; right: 0; top: 0; padding: 8px 14px;
  background: #F7CE3E; color: var(--ink); font: 600 13px/1.3 Montserrat, Arial, sans-serif; text-align: center;
}
.testbar b { margin-right: .5em; letter-spacing: .08em; }
.testbar button { margin-left: .8em; padding: 4px 12px; border: 2px solid var(--ink); border-radius: 999px; background: #fff; font-weight: 800; cursor: pointer; }

/* ---------- PORTRAIT / MOBILE ---------- */
@media (max-aspect-ratio: 1/1) {
  .stage { height: auto; overflow: hidden; display: flex; flex-direction: column; --sw: 178vw; --u: 1vw; }
  .copy { transform: none; position: relative; left: auto; top: auto; width: auto; padding: 72px 22px 0; font-size: clamp(15px, 3.9vw, 20px); }
  .site-title { font-size: min(14vw, 96px); }
  .intro { margin-top: 1.3em; }
  .machine { width: 100%; }
  .pull-btn { display: inline-block; }
  .scene { position: relative; left: auto; bottom: auto; transform: none; margin-left: -48vw; margin-top: 8px; }
  .scene.shake { animation-name: shake-m; }
  .hint, .arrow { display: none; }
  .hint-m {
    display: block; position: absolute; left: 63%; top: 36.5%; margin: 0;
    font-weight: 900; font-size: 2.05cqw; text-transform: uppercase; transform: rotate(-6deg);
    background: var(--ink); color: #fff; padding: .3em .6em; border-radius: 999px;
    animation: bob 1.4s ease-in-out infinite, xmas-flash-bg 1s steps(1, end) infinite;
  }
  .human-note { position: relative; left: auto; bottom: auto; width: auto; padding: 20px 22px 18px; font-size: 13px; margin-top: -2px; background: var(--coral); }
  .leap-note { position: relative; right: auto; bottom: auto; width: auto; text-align: left; padding: 0 22px 30px; font-size: 13px; background: var(--coral); }
  .ln-logo { width: 13em; max-width: 70%; }
  .card { grid-template-columns: 1fr; box-shadow: 6px 6px 0 var(--ink); }
  .card-img { border-right: 0; border-bottom: 4px solid var(--ink); padding: 18px; }
  .card-info { padding: 20px 18px 20px; }
}
@keyframes shake-m {
  20%, 60% { transform: translateX(-4px); }
  40%, 80% { transform: translateX(4px); }
}
@keyframes bob { 0%, 100% { transform: rotate(-6deg) translateY(0); } 50% { transform: rotate(-6deg) translateY(-8%); } }

@media (max-aspect-ratio: 1/1) {
  .bubble { --p: .45cqw; font-size: 1.7cqw; max-width: 40%; left: 28.5%; right: auto; top: 2%; }
}
@media (prefers-reduced-motion: reduce) {
  .gift-pop.out { animation-duration: .3s; }
  .arm.jam { animation: none; }
  .scene.cool .part, .scene.cool .key { animation: none; }
  .scene.gen .eye { animation: none; opacity: .9; }
  .scene.gen .mouth { animation: none; opacity: .6; }
  .arrow, .hint-m, .arm.idle img { animation: none; }
  .hint, .arrow path { animation: none; }
  .card { animation: fade .3s ease; }
  .scene.shake { animation: none; }
}

@media (max-aspect-ratio: 1/1) {
  .scene.overload { animation-name: overload-m; }
  .juice { position: fixed; left: 10px; right: 10px; top: auto; bottom: 10px; width: auto; font-size: 14px; max-height: 86vh; overflow: auto; padding: 1.3em 1.2em 1.2em; }
  .juice-title { font-size: 1.75em; }
  .juice-logo { width: 9em; margin-top: 1em; }
  .juice-text { margin-top: .7em; }
}
@keyframes overload-m {
  0%, 100% { transform: translateX(-4px) rotate(-.35deg); }
  50% { transform: translateX(4px) rotate(.35deg); }
}
@media (prefers-reduced-motion: reduce) {
  .scene.overload { animation: none; }
  .stage.alarm::before { animation: none; opacity: .6; }
  .stage.flash::after { animation: none; }
  .juice.in { animation: none; }
}
