@font-face {
  font-family: "KuaiLe";
  src: url("../fonts/kuaile.woff2") format("woff2");
  font-display: swap;
}
@font-face {                               /* Fusion Pixel 12 px (OFL): terminal type of the 别慌 game */
  font-family: "Pixel";
  src: url("../fonts/pixel.woff2") format("woff2");
  font-display: swap;
}
@font-face {
  font-family: "Fredoka";
  src: url("../fonts/fredoka.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}

:root {
  --yolk: #FD8502;
  --yolk-deep: #E86F00;
  --yolk-light: #FFA53A;
  --white: #FBF5E6;
  --ink: #2B1A14;
  --pan: #413D3C;
  --tg: #2AABEE;
  --ease-bounce: cubic-bezier(.34, 1.56, .64, 1);
  --ease-soft: cubic-bezier(.22, 1, .36, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; overflow-x: clip; }   /* the pan rolling in from off-screen must not widen the page */

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(120% 90% at 50% 35%, var(--yolk-light) 0%, var(--yolk) 45%, var(--yolk-deep) 100%) fixed;
  background-color: var(--yolk);
  color: var(--ink);
  font-family: "Fredoka", "KuaiLe", system-ui, sans-serif;
  overflow-x: clip;
  -webkit-tap-highlight-color: transparent;
}

.zh { font-family: "KuaiLe", "Fredoka", sans-serif; }

/* KuaiLe ships one weight only: faux bold fills the inner gaps of Chinese glyphs */
* { font-synthesis: none; }

img { display: block; user-select: none; -webkit-user-drag: none; }

/* ---------- the hot oil colour (cook.js), under the bubbles: invisible at the top of the page ---------- */
.oil {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: var(--cook-bg, var(--yolk));
  opacity: var(--oil-on, 0);
}

/* ---------- oil bubbles rising in the background ---------- */
.bubbles { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.bubble {
  position: absolute;
  bottom: -40px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 30%, rgba(255,255,255,.75) 0 14%, rgba(255,240,200,.35) 15% 60%, rgba(255,255,255,.08) 61%);
  box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.35);
  animation: rise linear forwards;
}
@keyframes rise {
  0%   { transform: translate(0, 0) scale(.6); opacity: 0; }
  10%  { opacity: 1; }
  100% { transform: translate(var(--drift), -110vh) scale(1); opacity: 0; }
}

main { position: relative; z-index: 1; }

/* ---------- hero ---------- */
.hero {
  min-height: 100svh;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  grid-template-areas:
    "logo egg"
    "tag  egg"
    "links links"
    "ca ca"
    "hint hint";
  align-items: center;
  column-gap: clamp(16px, 4vw, 64px);
  padding: clamp(24px, 5vh, 56px) clamp(16px, 6vw, 96px) 24px;
  max-width: 1400px;
  margin: 0 auto;
}

/* logo: pieces placed as in the Krita canvas (see img/logo/logo.json), union box 969×652 */
.logo {
  grid-area: logo;
  position: relative;
  width: 100%;
  aspect-ratio: 969 / 652;
  margin: 0;
  cursor: pointer;
}
.logo img { position: absolute; height: auto; will-change: transform; }
.logo-albume { left: 0;      top: 0;      width: 74.82%; }
.logo-wandan { left: 15.17%; top: 30.52%; width: 49.23%; }
.logo-were   { left: 39.63%; top: 71.93%; width: 24.15%; }
.logo-cooked { left: 66.46%; top: 79.45%; width: 33.54%; }

/* entrance */
.logo-albume { animation: splat .9s var(--ease-bounce) both, jelly 5s ease-in-out 1s infinite; transform-origin: 50% 55%; }
.logo-wandan { animation: drop .8s var(--ease-bounce) .45s both, bob 4s ease-in-out 1.6s infinite; }
.logo-were   { animation: pop .6s var(--ease-bounce) .95s both, bob 4s ease-in-out 2s infinite; }
.logo-cooked { animation: slide .7s var(--ease-bounce) 1.2s both, wobble 3.2s ease-in-out 2.2s infinite; transform-origin: 0 100%; }

@keyframes splat {
  0%   { transform: scale(0) rotate(-25deg); opacity: 0; }
  60%  { transform: scale(1.12, .9) rotate(3deg); opacity: 1; }
  80%  { transform: scale(.96, 1.05) rotate(-1deg); }
  100% { transform: scale(1) rotate(0); }
}
@keyframes jelly {
  0%, 100% { transform: scale(1, 1); }
  25% { transform: scale(1.015, .985); }
  50% { transform: scale(.99, 1.012); }
  75% { transform: scale(1.008, .994); }
}
@keyframes drop {
  0%   { transform: translateY(-160%) rotate(-8deg); opacity: 0; }
  70%  { transform: translateY(4%) scale(1.04, .94); opacity: 1; }
  100% { transform: translateY(0) scale(1); }
}
@keyframes pop {
  0%   { transform: scale(0) rotate(12deg); opacity: 0; }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}
@keyframes slide {
  0%   { transform: translateX(80%) rotate(10deg); opacity: 0; }
  100% { transform: translateX(0) rotate(0); opacity: 1; }
}
@keyframes bob {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -2.5%; }
}
@keyframes wobble {
  0%, 100% { rotate: 0deg; }
  50% { rotate: -2.5deg; }
}

/* ---------- the egg ---------- */
.egg-wrap {
  grid-area: egg;
  position: relative;
  justify-self: center;
  align-self: start;
  margin-top: clamp(80px, 13vw, 200px);             /* well below the logo, lower than "Cooked." */
  width: min(100%, 520px);
}
.egg {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  filter: drop-shadow(0 18px 24px rgba(90, 30, 0, .35));
  transition: transform .25s var(--ease-bounce);
}
.egg:hover { transform: rotate(-2deg) scale(1.02); }
.egg:active { transform: scale(.97); }
.egg:focus-visible { outline: 4px dashed var(--ink); outline-offset: 6px; border-radius: 50%; }
.egg img, .egg .face, .egg .calm, .egg .eyes, .egg .mood { position: absolute; inset: 0; width: 100%; height: 100%; }

/* entrance: the pan rolls in from the right, then the egg pops out in it */
.l-padella { transform-origin: 46% 43%; animation: roll-in 1.6s .2s both; }
@keyframes roll-in {
  0%   { transform: translateX(var(--roll-from, 80vw)) rotate(540deg); animation-timing-function: cubic-bezier(.3, .25, .55, 1); }
  72%  { transform: translateX(-6%) rotate(-16deg); animation-timing-function: ease-in-out; }
  87%  { transform: translateX(2%) rotate(5deg); animation-timing-function: ease-in-out; }
  100% { transform: translateX(0) rotate(0); }
}
.face { transform-origin: 46% 45%; animation: egg-pop .75s var(--ease-bounce) 1.65s both; }

/* entrance waits until the pictures are decoded (body.ready set by main.js) */
body:not(.ready) *, body:not(.ready) *::before { animation-play-state: paused !important; }
@keyframes egg-pop {
  0%   { transform: scale(0) rotate(-20deg); opacity: 0; }
  45%  { transform: scale(1.18, .88) rotate(6deg); opacity: 1; }
  70%  { transform: scale(.94, 1.06) rotate(-2deg); }
  100% { transform: scale(1) rotate(0); }
}

.l-albume { animation: sizzle 2.6s ease-in-out infinite; transform-origin: 46% 50%; }
@keyframes sizzle {
  0%, 100% { transform: scale(1, 1); }
  33% { transform: scale(1.012, .992); }
  66% { transform: scale(.993, 1.01); }
}
.l-pupille, .l-riflessi { transition: transform .12s linear; }
.l-pupille  { transform: translate(var(--px, 0), var(--py, 0)); }
/* the long stare (main.js adds .stare after a few seconds with the cursor on the pan): wide
   yolks with their own big pupils (art/WANDANsito.kra, "OCCHIO SPALANCATO" + "sguardo"),
   which keep following the cursor; the shine of the wide yolks stays put */
.l-spalancati, .l-iride-sguardo, .l-pupille-sguardo, .l-riflessi-sguardo { opacity: 0; }
.egg.stare .l-tuorli, .egg.stare .l-pupille, .egg.stare .l-riflessi { opacity: 0; }
.egg.stare .l-spalancati, .egg.stare .l-iride-sguardo, .egg.stare .l-pupille-sguardo, .egg.stare .l-riflessi-sguardo { opacity: 1; }
/* the iris follows the cursor; the pupil also slides inside it toward where it looks
   (iris radius 48, pupil 40 on the 768 px picture: main.js sets --qx/--qy within that play) */
/* no CSS transitions here: main.js already smooths --px/--qx every frame, and two different
   transitions made the pupil lag behind its iris */
.l-iride-sguardo   { transform: translate(calc(var(--px, 0px) * 1.1), calc(var(--py, 0px) * 1.1)); }
.l-pupille-sguardo { transform: translate(calc(var(--px, 0px) * 1.1 + var(--qx, 0px)), calc(var(--py, 0px) * 1.1 + var(--qy, 0px))); }
.egg.stare .eyes { animation: eyes-pop .35s var(--ease-bounce); transform-origin: 49% 45%; }
@keyframes eyes-pop {
  0% { scale: .8; }
  60% { scale: 1.08; }
  100% { scale: 1; }
}
.l-riflessi { transform: translate(calc(var(--px, 0) * .35), calc(var(--py, 0) * .35)); }

/* calm face: blink frames (data-lid set by main.js) and "o" mouth */
/* 1-3: the eyelids drawn in Krita; c1-c3: closing frames made by estrai.py (as the "bored" sticker) */
.l-palpebre, .l-bocca-o, .mood { opacity: 0; }
.egg[data-lid="1"]  .l-palpebre[data-lid="1"],
.egg[data-lid="2"]  .l-palpebre[data-lid="2"],
.egg[data-lid="3"]  .l-palpebre[data-lid="3"],
.egg[data-lid="c1"] .l-palpebre[data-lid="c1"],
.egg[data-lid="c2"] .l-palpebre[data-lid="c2"],
.egg[data-lid="c3"] .l-palpebre[data-lid="c3"] { opacity: 1; }
.egg.ooh .l-bocca { opacity: 0; }
.egg.ooh .l-bocca-o { opacity: 1; }

/* poke reactions: a whole face replaces the calm one (data-mood set by main.js) */
.egg[data-mood] .calm { opacity: 0; }
.egg[data-mood="panico"]   .mood[data-mood="panico"],
.egg[data-mood="rabbia"]   .mood[data-mood="rabbia"],
.egg[data-mood="denti"]    .mood[data-mood="denti"],
.egg[data-mood="bruciato"] .mood[data-mood="bruciato"],
.egg[data-mood="risata"]   .mood[data-mood="risata"],
.egg[data-mood="sveglia"]  .mood[data-mood="sveglia"] { opacity: 1; }
.egg[data-mood="panico"] .mood[data-mood="panico"],
.egg[data-mood="rabbia"] .mood[data-mood="rabbia"],
.egg[data-mood="denti"]  .mood[data-mood="denti"],
.egg[data-mood="sveglia"] .mood[data-mood="sveglia"],
.egg.shaking .mood[data-mood="bruciato"] { animation: shake .08s linear infinite; }

/* asleep (after 20 s with nobody around): small mouth, slow breathing, Z's floating up one after another */
.zeta { opacity: 0; }
.egg.sleeping .l-bocca { opacity: 0; }
.egg.sleeping .l-bocca-o { opacity: 1; }
/* heavy sleep breathing: slow inhale, short hold, slow exhale; the white swells and the mouth
   opens with it (pivots: centres of the layers, from img/uovo/*.webp). Z's on the same 3.6 s beat */
.egg.sleeping .calm { animation: breathe 3.6s infinite; transform-origin: 49% 50%; }
.egg.sleeping .l-albume { animation: breathe-white 3.6s infinite; transform-origin: 49% 52%; }
.egg.sleeping .l-bocca-o { animation: breathe-mouth 3.6s .3s infinite; transform-origin: 49.74% 57.75%; }
.egg.sleeping.snoring .zeta { animation: zfloat 3.6s ease-in-out infinite; }
.egg.sleeping.snoring .zeta[src$="z-2.webp"] { animation-delay: .5s; }
.egg.sleeping.snoring .zeta[src$="z-3.webp"] { animation-delay: 1s; }
@keyframes breathe {                   /* whole face: just enough for the eyes to ride along */
  0%, 100% { scale: 1; animation-timing-function: cubic-bezier(.45, 0, .55, 1); }
  45%, 55% { scale: 1.012 1.002; animation-timing-function: cubic-bezier(.45, 0, .55, 1); }
}
@keyframes breathe-white {
  0%, 100% { scale: 1; animation-timing-function: cubic-bezier(.45, 0, .55, 1); }
  45%, 55% { scale: 1.0325 1.006; animation-timing-function: cubic-bezier(.45, 0, .55, 1); }
}
@keyframes breathe-mouth {
  0%, 100% { scale: 1; animation-timing-function: cubic-bezier(.45, 0, .55, 1); }
  45%, 55% { scale: 1.4 1.5; animation-timing-function: cubic-bezier(.45, 0, .55, 1); }
}
@keyframes zfloat {
  0%   { opacity: 0; transform: translate(-2%, 3%) scale(.5) rotate(-12deg); }
  20%  { opacity: 1; transform: translate(0, 0) scale(1) rotate(0); }
  70%  { opacity: 1; transform: translate(2%, -3%) scale(1.06) rotate(6deg); }
  100% { opacity: 0; transform: translate(4%, -7%) scale(1.15) rotate(10deg); }
}

/* burnt: dizzy sway, smoke puffs rising in a wave (as the Telegram sticker) */
.burnt { transform-origin: 50% 52%; }
.egg[data-mood="bruciato"] .burnt { animation: dizzy 2s ease-in-out infinite; }
.fumo { opacity: 0; }
.egg[data-mood="bruciato"] .fumo { animation: puff 2.2s linear infinite; }
.egg[data-mood="bruciato"] .fumo:nth-of-type(3) { animation-delay: -.5s; }
.egg[data-mood="bruciato"] .fumo:nth-of-type(4) { animation-delay: -1s; }
.egg[data-mood="bruciato"] .fumo:nth-of-type(5) { animation-delay: -1.5s; }
@keyframes dizzy {
  0%, 100% { rotate: -2deg; }
  50% { rotate: 2deg; }
}
@keyframes puff {
  0%   { opacity: 0; transform: translate(-1.5%, 4%) scale(.7); }
  25%  { opacity: .95; }
  60%  { opacity: .8; transform: translate(1.5%, -3%) scale(1.02); }
  100% { opacity: 0; transform: translate(3.5%, -9%) scale(1.3); }
}

/* laughing: the head tips over from 😂 (upright) to 🤣 (about 25° to the left) while it rocks
   with laughter, and straightens up slowly at the end (main.js keeps the laugh for 4.5 s) */
.mood[data-mood="risata"] { transform-origin: 49% 50%; }
/* the bumps of a laugh: one per swing (the swings are 0.32 s apart from 1.2 s on),
   timed so that each bump peaks when the head reaches the end of a swing */
.egg[data-mood="risata"] .mood[data-mood="risata"] { animation: roll-laugh 4.5s ease-in-out forwards, guffaw .32s .16s infinite; }
@keyframes roll-laugh {               /* 4.5 s: same timing as the 4 s version up to 3.44 s, then a slower return upright */
  0%    { rotate: 0deg; }
  8.9%  { rotate: 4deg; }
  26.7% { rotate: -25deg; }
  33.8% { rotate: -19deg; }
  40.9% { rotate: -28deg; }
  48%   { rotate: -20deg; }
  55.1% { rotate: -28deg; }
  62.2% { rotate: -20deg; }
  69.3% { rotate: -27deg; }
  76.4% { rotate: -22deg; }
  100%  { rotate: 0deg; }
}
@keyframes guffaw {                   /* soft bump up, slightly stretched; settles back with a hint of squash */
  0%   { translate: 0 0;     scale: 1 1;         animation-timing-function: cubic-bezier(.3, .6, .5, 1); }
  25%  { translate: 0 -1.6%; scale: .992 1.01;   animation-timing-function: cubic-bezier(.5, 0, .6, 1); }
  60%  { translate: 0 .15%;  scale: 1.008 .992;  animation-timing-function: ease-in-out; }
  100% { translate: 0 0;     scale: 1 1; }
}
@keyframes shake {
  0%   { translate: 0 0; }
  25%  { translate: -1.2% .6%; }
  50%  { translate: 1% -.8%; }
  75%  { translate: -.6% -.4%; }
  100% { translate: .8% .8%; }
}

.shout {
  position: absolute;
  left: 50%;
  top: -2%;
  margin: 0;
  font: 400 clamp(28px, 4.2vw, 56px)/1 "KuaiLe", sans-serif;
  color: var(--white);
  -webkit-text-stroke: 2px var(--ink);
  paint-order: stroke fill;
  text-shadow: 0 5px 0 var(--ink);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, 20%) scale(.6) rotate(-6deg);
}
.shout.on { animation: shout 1.3s var(--ease-bounce) forwards; }
@keyframes shout {
  0%   { opacity: 0; transform: translate(-50%, 20%) scale(.5) rotate(-6deg); }
  20%  { opacity: 1; transform: translate(-50%, -30%) scale(1.1) rotate(-4deg); }
  75%  { opacity: 1; transform: translate(-50%, -40%) scale(1) rotate(-3deg); }
  100% { opacity: 0; transform: translate(-50%, -90%) scale(.9) rotate(-3deg); }
}

/* ---------- tagline, links ---------- */
.tagline { grid-area: tag; text-align: center; animation: pop .7s var(--ease-bounce) 1.5s both; }
.tagline p { margin: 0; }
.tagline .zh {
  font-weight: 400;                                  /* KuaiLe has no bold: never let the browser fake it */
  white-space: nowrap;
  font-size: clamp(26px, 3.6vw, 54px);
  color: var(--white);
  -webkit-text-stroke: 2px var(--ink);
  paint-order: stroke fill;
  text-shadow: 0 5px 0 var(--ink);
  letter-spacing: .02em;
}
.tagline .zh .latin { font-family: "Fredoka", sans-serif; font-weight: 700; }
.tagline .en { margin-top: .5em; font-size: clamp(17px, 1.7vw, 24px); font-weight: 600; }

.links {
  grid-area: links;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: clamp(20px, 4vh, 40px);
}
.pill {
  --bg: var(--white);
  position: relative;
  isolation: isolate;                         /* the egg white sits behind the label */
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 999px;
  border: 3px solid var(--ink);
  background: var(--bg);
  color: var(--ink);
  font: 600 clamp(16px, 1.5vw, 20px)/1 "Fredoka", "KuaiLe", sans-serif;
  text-decoration: none;
  box-shadow: 0 6px 0 var(--ink);
  transition: transform .3s var(--ease-bounce), background-color .12s, border-color .12s, box-shadow .12s;
  animation: pop .6s var(--ease-bounce) backwards;   /* backwards: once in, hover may move it */
}
.pill:nth-child(1) { animation-delay: 1.7s; }
.pill:nth-child(2) { animation-delay: 1.8s; }
.pill:nth-child(3) { animation-delay: 1.9s; }
.pill svg:not(.blob) { width: 22px; height: 22px; fill: currentColor; }
.pill img { width: 28px; height: 28px; border-radius: 50%; }
/* hover: the oval pops into our egg white (the albume path from WANDANsito.kra, added by main.js) */
.pill .blob {
  position: absolute;
  left: -14px; top: -15px;
  width: calc(100% + 28px); height: calc(100% + 28px);
  z-index: -1;
  overflow: visible;
  pointer-events: none;
  opacity: 0;
  transform: scale(.86, .62);
  filter: drop-shadow(0 7px 0 var(--ink));
  transition: transform .45s var(--ease-bounce), opacity .1s;
}
.blob path { fill: var(--bg); stroke: var(--ink); stroke-width: 3px; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.blob .lip { fill: color-mix(in srgb, var(--bg), #6b4a2a 12%); stroke: none; }
.pill:hover, .pill:focus-visible {
  background-color: transparent;
  border-color: transparent;
  box-shadow: 0 6px 0 transparent;
  transform: translateY(-3px);
  outline: none;
}
.pill:hover .blob, .pill:focus-visible .blob { opacity: 1; transform: none; }
.pill:active { transform: translateY(3px); }
.pill:active .blob { transform: scale(.97, .9); filter: drop-shadow(0 2px 0 var(--ink)); transition-duration: .1s; }
.pill-x { --bg: var(--ink); color: var(--white); }
.pill-tg { --bg: var(--tg); color: #fff; }

.ca {
  grid-area: ca;
  text-align: center;
  margin: 24px 0 0;
  font: 700 17px/1.2 "Fredoka", "KuaiLe", sans-serif;
}
.ca span {                                   /* a little sticker, like the hints on the wall */
  display: inline-block;
  margin-left: 6px;
  padding: 6px 14px 7px;
  border: 2.5px solid var(--ink);
  border-radius: 999px;
  background: var(--white);
  box-shadow: 0 3px 0 var(--ink);
  font-weight: 600;
  transform: rotate(-2.5deg);
}

.scroll-hint {
  grid-area: hint;
  justify-self: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  margin-top: 24px;
  color: var(--ink);
  text-decoration: none;
  font: 600 16px/1.2 "Fredoka", "KuaiLe", sans-serif;
  animation: pop .6s var(--ease-bounce) 2.3s both;
}
.scroll-hint .zh { font-size: 24px; letter-spacing: .04em; }
.scroll-hint .arrow {                        /* a round button, like the pills */
  display: grid;
  place-items: center;
  width: 46px; height: 46px;
  margin-top: 10px;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: var(--white);
  box-shadow: 0 5px 0 var(--ink);
  animation: nudge 1.4s ease-in-out infinite;
  transition: background-color .15s;
}
.scroll-hint .arrow svg { width: 26px; height: 26px; fill: none; stroke: var(--ink); stroke-width: 3.6; stroke-linecap: round; stroke-linejoin: round; }
.scroll-hint:hover .arrow, .scroll-hint:focus-visible .arrow { background: var(--yolk); }
@keyframes nudge { 50% { transform: translateY(4px); box-shadow: 0 1px 0 var(--ink); } }   /* pressed, like a pill under a finger */

/* ---------- the egg cooks as you scroll (js/cook.js sets --heat 0..1, --knob and data-stage 0..4) ---------- */
.cook { position: relative; height: 520vh; }
.cook-stage {
  position: sticky;
  top: 0;
  height: 100svh;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  grid-template-areas: "steps pan";
  align-items: center;
  gap: clamp(16px, 4vw, 64px);
  padding: 0 clamp(16px, 6vw, 96px);
  /* thermometer height: follows the page width like the pan, within the screen height */
  --th: min(72svh, 46vw, 600px);
  /* keep the right side free for the thermometer and its labels */
  padding-right: calc(clamp(16px, 4vw, 64px) + var(--th) * 183 / 900 + 80px);
  max-width: 1400px;
  margin: 0 auto;
  /* light and vignette only: the oil colour is the fixed .oil layer, under the background bubbles */
  background:
    radial-gradient(70% 60% at 66% 60%, rgba(255, 255, 255, .18), transparent 70%),
    radial-gradient(120% 100% at 50% 50%, transparent 55%, rgba(0, 0, 0, calc(.06 + var(--heat) * .18)));
}

.cook-pan { grid-area: pan; position: relative; justify-self: center; width: min(100%, 560px); }
.cook-egg { position: relative; aspect-ratio: 1; filter: drop-shadow(0 18px 24px rgba(90, 30, 0, .35)); }
.cook-egg img, .c-face { position: absolute; inset: 0; width: 100%; height: 100%; }
.c-face { opacity: 0; transition: opacity .25s; }
/* a crescendo: calm -> worried (wide eyes, sweat, a light tremble) -> panic (hard shake) -> burnt */
/* calm -> bored ("first red candle? everyone's calm") -> worried -> panic -> burnt */
.cook[data-stage="0"] .c-calmo,
.cook[data-stage="1"] .c-annoiato,
.cook[data-stage="2"] .c-ansia,
.cook[data-stage="3"] .c-panico,
.cook[data-stage="4"] .c-bruciato { opacity: 1; }
.cook[data-stage="0"] .c-calmo { animation: sizzle 2.6s ease-in-out infinite; transform-origin: 49% 50%; }
.cook[data-stage="1"] .c-annoiato { animation: breathe 3.6s infinite; transform-origin: 49% 50%; }
.cook[data-stage="2"] .cook-egg { animation: tremble .16s linear infinite; }
.cook[data-stage="3"] .cook-egg { animation: shake .07s linear infinite; }
@keyframes tremble {
  0%, 100% { translate: 0 0; }
  50% { translate: .5% -.3%; }
}

/* the moment it burns: a flash and a ring of heat from the pan (cook.js adds .boom-go) */
.boom {
  position: absolute;
  left: 10%; top: 8%; width: 76%; height: 76%;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(circle, rgba(255, 245, 200, .95) 0 25%, rgba(255, 150, 20, .7) 45%, rgba(255, 80, 0, 0) 70%);
}
.boom.boom-go { animation: boom .7s ease-out; }
@keyframes boom {
  0%   { opacity: 0; transform: scale(.3); }
  15%  { opacity: 1; }
  100% { opacity: 0; transform: scale(1.9); }
}
.cook[data-stage="4"] .c-bruciato > img:first-child { animation: dizzy 2s ease-in-out infinite; transform-origin: 50% 52%; }
.c-bruciato .fumo { opacity: 0; }
.cook[data-stage="4"] .c-bruciato .fumo { animation: puff 2.2s linear infinite; }
.cook[data-stage="4"] .c-bruciato .fumo[src$="fumo-2.webp"] { animation-delay: -.5s; }
.cook[data-stage="4"] .c-bruciato .fumo[src$="fumo-3.webp"] { animation-delay: -1s; }
.cook[data-stage="4"] .c-bruciato .fumo[src$="fumo-4.webp"] { animation-delay: -1.5s; }

/* the burner under the pan: invisible when off, a flickering ring of fire as the heat goes up */
.burner {
  position: absolute;
  left: 8%; right: 14%; bottom: 4%;
  height: 22%;
  border-radius: 50%;
  background: radial-gradient(50% 50% at 50% 50%, transparent 52%, rgba(255, 190, 40, .95) 60%, rgba(255, 70, 0, .8) 70%, transparent 78%);
  filter: blur(calc(4px + var(--heat) * 6px));
  opacity: calc(var(--heat) * 1.1);
  transform: scale(calc(.85 + var(--heat) * .3));
  animation: flicker .18s steps(2) infinite alternate;
}
@keyframes flicker { to { translate: 0 -2%; scale: 1.02 .96; } }

/* stove knob (art/manopola.kra, numbers from img/manopola/manopola.json): 9 ticks from -104deg to
   +102.2deg, the red dot is drawn at +50.9deg, the knob turns around 49.95% 58.99%.
   Five stages: in the middle of each one the dot points at tick 1, 3, 5, 7, 9 (cook.js sets --knob) */
.knob {
  --kw: clamp(130px, 14vw, 200px);
  position: absolute;
  left: calc(clamp(16px, 6vw, 96px) + var(--kw) * .1);
  bottom: clamp(16px, 4vh, 40px);
  width: var(--kw);
  aspect-ratio: 600 / 519;
}
.knob img, .knob-shadow { position: absolute; inset: 0; width: 100%; height: 100%; }
.knob-ticks { filter: drop-shadow(0 calc(var(--kw) * .012) 0 var(--ink)); }
/* a bit of 3D: a hard dark edge under the knob and a soft shadow; on the wrapper, so it does not turn */
.knob-shadow { filter: drop-shadow(0 calc(var(--kw) * .035) 0 var(--ink)) drop-shadow(0 calc(var(--kw) * .06) calc(var(--kw) * .05) rgba(0, 0, 0, .35)); }
.knob-turn {
  transform-origin: 49.95% 58.99%;
  transform: rotate(var(--knob, -154.9deg));          /* set by cook.js: the dot on ticks 1, 3, 5, 7, 9 */
}
.knob-light {                          /* light from the top left on the round cap (ring radius 20.09% of the width) */
  position: absolute;
  left: calc(49.95% - 20.09%);
  top: calc(58.99% - 20.09% * 600 / 519);
  width: calc(20.09% * 2);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, rgba(255, 255, 255, .32), rgba(255, 255, 255, .08) 40%, transparent 62%);
  pointer-events: none;
}
.knob-labels { position: absolute; inset: 0; margin: 0; padding: 0; list-style: none; }
.knob-labels li {
  position: absolute;
  translate: -50% -50%;
  font: 400 calc(var(--kw) * .12) "KuaiLe", sans-serif;
  white-space: nowrap;
  color: var(--white);
  -webkit-text-stroke: 1.5px var(--ink);
  paint-order: stroke fill;
  text-shadow: 0 2px 0 var(--ink);
  opacity: .5;
  transition: opacity .2s, scale .25s var(--ease-bounce);
}
/* outside ticks 1, 3, 5, 7, 9 (angles -104, -51.9, 0.1, 50.3, 102.2deg). The two at the bottom are
   anchored by the side facing their tick, so they grow away from it; the others are centred, 61% out */
.knob-labels li:nth-child(1) { left: -1.4%;  top: 73.8%;  translate: -100% -50%; transform-origin: 100% 50%; }
.knob-labels li:nth-child(2) { left: -3.6%;  top: 10.5%; }   /* 68% out: the slanted ticks are longer */
.knob-labels li:nth-child(3) { left: 50.05%; top: -11.4%; }
.knob-labels li:nth-child(4) { left: 102.2%; top: 8.8%; }
.knob-labels li:nth-child(5) { left: 101.6%; top: 71.9%;  translate: 0 -50%;     transform-origin: 0 50%; }
.cook[data-stage="0"] .knob-labels li:nth-child(1),
.cook[data-stage="1"] .knob-labels li:nth-child(2),
.cook[data-stage="2"] .knob-labels li:nth-child(3),
.cook[data-stage="3"] .knob-labels li:nth-child(4),
.cook[data-stage="4"] .knob-labels li:nth-child(5) { opacity: 1; scale: 1.25; }

/* the four steps of the story, one at a time */
.cook-steps { grid-area: steps; position: relative; min-height: 15em; z-index: 2; }
.step {
  position: absolute;
  inset: 0 0 auto 0;
  opacity: 0;
  transform: translateY(30px) scale(.96);
  transition: opacity .35s, transform .5s var(--ease-bounce);
  pointer-events: none;
}
.step.on { opacity: 1; transform: none; pointer-events: auto; }
.step.out { opacity: 0; transform: scale(.85); filter: blur(3px); transition: opacity .2s, transform .25s, filter .25s; }

/* each character pops in after the bubble bursts */
.step .ch { display: inline-block; }
.step .clause { display: inline-block; white-space: nowrap; }   /* Chinese lines break only after punctuation */
.step.on .ch { animation: char-pop .5s var(--ease-bounce) calc(var(--i) * 40ms) both; }
.step.on .step-n, .step.on .en { animation: pop .5s var(--ease-bounce) both; }
.step.on .en { animation-delay: .25s; }
@keyframes char-pop {
  0%   { opacity: 0; transform: translateY(.5em) scale(.3); }
  60%  { opacity: 1; transform: translateY(-.1em) scale(1.15); }
  100% { transform: none; }
}

/* the big oil bubble that carries each new line up from the pan and bursts */
.text-bubble {
  position: absolute;
  left: 0; top: 0;
  width: 90px; height: 90px;
  margin: -45px 0 0 -45px;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(circle at 32% 30%, rgba(255,255,255,.9) 0 12%, rgba(255,240,200,.45) 13% 58%, rgba(255,255,255,.12) 60%);
  box-shadow: inset 0 0 0 3px rgba(255,255,255,.55), 0 0 0 2px rgba(43,26,20,.25);
}
.drop {
  position: absolute;
  width: 12px; height: 12px;
  margin: -6px 0 0 -6px;
  border-radius: 50%;
  background: rgba(255, 248, 220, .95);
  box-shadow: 0 0 0 2px rgba(43,26,20,.3);
  pointer-events: none;
}
.step-n {
  display: inline-block;
  margin: 0 0 .6em;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--white);
  font: 400 18px "KuaiLe", "Fredoka", sans-serif;
}
.step h2 {
  margin: 0;
  font-weight: 400;
  font-size: clamp(32px, 4.4vw, 64px);
  line-height: 1.15;
  color: var(--white);
  -webkit-text-stroke: 2px var(--ink);
  paint-order: stroke fill;
  text-shadow: 0 5px 0 var(--ink);
}
.step h2 .latin { font-family: "Fredoka", sans-serif; font-weight: 700; }
.step .en { margin: .7em 0 0; font-size: clamp(17px, 1.6vw, 22px); font-weight: 600; }
.step[data-step="4"] .en { color: #FF3B2F; text-shadow: 0 2px 0 rgba(43, 26, 20, .6); }   /* readable on burnt oil */

/* thermometer on the right edge (art/termometro sito.kra): the liquid shows from the top of the
   bulb (81.32% of the height, empty) up to the top of the column (0.61%, full) -- see termometro.json */
.thermo {
  position: absolute;
  right: clamp(16px, 4vw, 64px);
  top: 50%;
  height: var(--th);
  margin-top: calc(var(--th) / -2);                   /* centred without translate: the tremble animates it */
  aspect-ratio: 183 / 900;
}
.thermo img { position: absolute; inset: 0; width: 100%; height: 100%; }
.t-liquido { clip-path: inset(calc(81.32% - 80.71% * var(--heat)) 0 0 0); }
.cook[data-stage="4"] .thermo { animation: tremble .16s linear infinite; }
.thermo-labels {
  position: absolute;
  right: 100%;
  top: 0; bottom: 0;
  margin: 0 10px 0 0;
  padding: 0;
  list-style: none;
  font: 400 calc(var(--th) * .033) "KuaiLe", sans-serif;   /* scales with the thermometer */
  white-space: nowrap;
  color: var(--white);                                /* readable on orange and on burnt oil */
  -webkit-text-stroke: 1.5px var(--ink);
  paint-order: stroke fill;
  text-shadow: 0 3px 0 var(--ink);
}
.thermo-labels li {
  position: absolute;
  right: 0;
  translate: 0 -50%;
  opacity: .45;
  transition: opacity .2s, scale .25s var(--ease-bounce);
}
.thermo-labels li:nth-child(1) { top: 77.11%; }      /* on the long ticks drawn on the left, one per stage */
.thermo-labels li:nth-child(2) { top: 60.67%; }
.thermo-labels li:nth-child(3) { top: 44.28%; }
.thermo-labels li:nth-child(4) { top: 27.89%; }
.thermo-labels li:nth-child(5) { top: 11.5%; }
.cook[data-stage="0"] .thermo-labels li:nth-child(1),
.cook[data-stage="1"] .thermo-labels li:nth-child(2),
.cook[data-stage="2"] .thermo-labels li:nth-child(3),
.cook[data-stage="3"] .thermo-labels li:nth-child(4),
.cook[data-stage="4"] .thermo-labels li:nth-child(5) { opacity: 1; scale: 1.3; }


/* ---------- the sticker wall (js/wall.js moves the stickers) ---------- */
.wall {
  position: relative;
  max-width: 1400px;
  margin: 0 auto;
  padding: clamp(56px, 10vh, 110px) clamp(16px, 6vw, 96px) 24px;
  text-align: center;
}
.wall-head h2 {
  margin: 0;
  font-weight: 400;
  font-size: clamp(34px, 5vw, 68px);
  color: var(--white);
  -webkit-text-stroke: 2px var(--ink);
  paint-order: stroke fill;
  text-shadow: 0 5px 0 var(--ink);
}
.wall-head .en { margin: .5em 0 0; font-size: clamp(17px, 1.7vw, 24px); font-weight: 600; }
.wall-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 22px; }
.wall-actions .pill, .foot .pill { animation: none; }
.wall-box {
  --s: clamp(78px, 10.5vw, 140px);          /* sticker size */
  position: relative;
  height: min(68svh, 620px);
  margin-top: 32px;
  border: 4px solid var(--ink);
  border-radius: 40px;
  background: rgba(255, 248, 230, .22);
  box-shadow: inset 0 -12px 0 rgba(43, 26, 20, .12), 0 8px 0 var(--ink);
  overflow: hidden;
  overflow: clip;                              /* hidden can still be scrolled sideways (focus, flying stickers) */
  touch-action: pan-y;                        /* the page still scrolls over empty space */
  -webkit-user-select: none;                  /* dragging must not select the hint text */
  user-select: none;
}
/* how to play: little sticker-like badges behind the stickers, tilted and bobbing */
.wall-hint {
  position: absolute;
  inset: 14% 16px auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 14px 18px;
  pointer-events: none;
  transition: opacity .6s;
  z-index: 0;                                  /* always behind the stickers, like a background */
}
.wall-box.played .wall-hint { opacity: .45; }            /* after the first drag (wall.js) */
.hint {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px 8px 10px;
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: rgba(255, 250, 238, .92);
  box-shadow: 0 5px 0 var(--ink);
  rotate: var(--r, -3deg);
  animation: hint-bob 3.2s ease-in-out var(--d, 0s) infinite;
}
.hint b { font-size: 1.5em; line-height: 1; font-weight: 400; }
.hint .zh { font-size: clamp(18px, 2vw, 26px); }
.hint small { font-size: 13px; font-weight: 600; opacity: .7; }
.hint:nth-child(1) { --r: -4deg; --d: 0s; }
.hint:nth-child(2) { --r: 3deg;  --d: -.8s; }
.hint:nth-child(3) { --r: -2deg; --d: -1.6s; }
.hint-bomb {                               /* a riddle, not an explanation: the bomb only suggests */
  --r: 4deg; --d: -2.4s;
  background: var(--yolk);
  animation: hint-bob 3.2s ease-in-out var(--d) infinite, hint-tick 4s ease-in-out 1s infinite;
}
.hint-bomb .zh { color: var(--white); -webkit-text-stroke: 1.5px var(--ink); paint-order: stroke fill; text-shadow: 0 3px 0 var(--ink); }
.hint-bomb small { opacity: .85; }
@keyframes hint-bob {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -6px; }
}
@keyframes hint-tick {                     /* the bomb badge fidgets now and then */
  0%, 82%, 100% { scale: 1; }
  86% { scale: 1.08 .94; }
  90% { scale: .96 1.05; }
  94% { scale: 1.04 .97; }
}
.sticker {
  position: absolute;
  left: 0; top: 0;
  width: var(--s); height: var(--s);
  padding: 0; border: 0; background: none;
  cursor: grab;
  touch-action: none;
  will-change: transform;
  opacity: 0;
  -webkit-touch-callout: none;
  user-select: none;
  z-index: 1;                                  /* above the how-to-play badges */
}
.sticker img { width: 100%; height: 100%; pointer-events: none; filter: drop-shadow(0 5px 3px rgba(43, 26, 20, .35)); }
.sticker.live { opacity: 1; }
.sticker.dragging { cursor: grabbing; z-index: 5; }
.sticker.dragging img { filter: drop-shadow(0 14px 10px rgba(43, 26, 20, .4)); }
.sticker:focus-visible { outline: 3px dashed var(--ink); outline-offset: 2px; border-radius: 50%; }

/* the landing blast after a high throw (wall.js): a shock ring, oil droplets, the box jolts */
.splash { position: absolute; width: 0; height: 0; pointer-events: none; z-index: 6; }
.splash::before {
  content: "";
  position: absolute;
  left: calc(var(--p) * -60px); top: calc(var(--p) * -60px);
  width: calc(var(--p) * 120px); height: calc(var(--p) * 120px);
  border-radius: 50%;
  border: 6px solid rgba(255, 248, 220, .9);
  box-shadow: 0 0 0 3px rgba(43, 26, 20, .25), 0 0 30px rgba(255, 200, 80, .7);
  animation: shock .55s ease-out forwards;
}
.splash i {
  position: absolute;
  left: -7px; top: -7px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: rgba(255, 246, 215, .95);
  box-shadow: 0 0 0 2px rgba(43, 26, 20, .3);
  animation: droplet .7s cubic-bezier(.2, .7, .4, 1) forwards;
}
@keyframes shock {
  0%   { transform: scale(.2); opacity: 1; }
  100% { transform: scale(1.6); opacity: 0; }
}
@keyframes droplet {
  0%   { transform: translate(0, 0) scale(1); opacity: 1; }
  100% { transform: translate(var(--x), var(--y)) scale(.3); opacity: 0; }
}
.wall-box.jolt { animation: jolt .4s ease-out; }
@keyframes jolt {
  0%   { translate: 0 0; }
  20%  { translate: 0 10px; }
  45%  { translate: -4px -5px; }
  70%  { translate: 3px 2px; }
  100% { translate: 0 0; }
}

/* ---------- easter egg: the PLAY tag and the memory table on the back of the wall (js/memory.js) ---------- */
.play-tab {
  position: absolute;
  top: -4px;
  right: 34px;
  z-index: 7;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 14px 14px 12px;
  border: 3px solid var(--ink);
  border-top: 0;
  border-radius: 0 0 18px 18px;
  background: var(--yolk);
  color: var(--white);
  box-shadow: 0 5px 0 var(--ink);
  font: 700 20px/1 "Fredoka", sans-serif;
  letter-spacing: .06em;
  cursor: pointer;
  transform: translateY(-110%);                  /* tucked above the edge */
  transform-origin: 50% 0;
  transition: transform .45s var(--ease-bounce);
}
.play-tab b { -webkit-text-stroke: 1.5px var(--ink); paint-order: stroke fill; text-shadow: 0 2px 0 var(--ink); font-weight: 700; }
.play-tab .zh { font: 400 15px/1 "KuaiLe", sans-serif; color: var(--ink); letter-spacing: 0; }
.play-tab.out { transform: none; animation: tab-swing 1.6s ease-in-out .45s infinite; }
.play-tab:hover, .play-tab:focus-visible { outline: none; background: #ff9a1f; }
@keyframes tab-swing { 0%, 100% { rotate: 0deg; } 30% { rotate: 4deg; } 70% { rotate: -4deg; } }
@media (hover: none) {                           /* phones: no hover, so a little bit always peeks out */
  .play-tab:not(.out) { transform: translateY(-62%); animation: tab-peek 5s ease-in-out 3s infinite; }
}
@keyframes tab-peek { 0%, 88%, 100% { translate: 0 0; } 93% { translate: 0 8px; } }
.wall-box.game-on .play-tab, .wall-box.game-on .hold-tab, .wall-box.game-on .spot-tab, .wall-box.game-on .whack-tab { display: none; }
.wall-box.game-on > .sticker, .wall-box.game-on > .wall-hint, .wall-box.game-on > .splash { visibility: hidden; }

.memory, .fud, .spot, .whack {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: flex;
  flex-direction: column;
  padding: 14px clamp(12px, 2.4vw, 28px) 18px;
  background: radial-gradient(circle at 50% 45%, #57514e 0%, var(--pan) 55%, #2c2827 100%);   /* the bottom of the pan */
  color: var(--white);
  touch-action: manipulation;
}
.memory[hidden], .fud[hidden], .spot[hidden], .whack[hidden] { display: none; }
.memory-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  min-height: 44px;
  font: 600 15px/1 "Fredoka", "KuaiLe", sans-serif;
}
.memory-stat b { margin-left: 4px; font-size: 20px; color: var(--yolk); font-variant-numeric: tabular-nums; }
.memory-stat .zh { font-family: "KuaiLe", sans-serif; font-weight: 400; font-size: 17px; }
.memory-tools { margin-left: auto; display: flex; gap: 8px; }
.m-tool {
  width: 40px; height: 40px;
  border: 2.5px solid var(--ink);
  border-radius: 50%;
  background: var(--white);
  color: var(--ink);
  box-shadow: 0 4px 0 var(--ink);
  font: 700 18px/1 "Fredoka", sans-serif;
  cursor: pointer;
  transition: transform .25s var(--ease-bounce);
}
.m-tool:hover, .m-tool:focus-visible { transform: translateY(-2px) rotate(-10deg) scale(1.08); outline: none; }
.m-tool:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--ink); }
.memory-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(var(--cols), var(--card));
  grid-auto-rows: var(--card);
  gap: var(--gap);
  place-content: center;
}
.card {
  position: relative;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  perspective: 700px;
  animation: deal .45s var(--ease-bounce) backwards;
}
@keyframes deal { from { transform: translateY(-40px) rotate(-12deg) scale(.4); opacity: 0; } }
.card-in {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transition: transform .42s var(--ease-bounce);
}
.card.up .card-in, .card.done .card-in { transform: rotateY(180deg); }
.card-face {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 3px solid var(--ink);
  border-radius: 16%;
  box-shadow: 0 5px 0 var(--ink);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.card-back {                                       /* yolk with oil dots and our egg in the middle */
  background:
    radial-gradient(circle, rgba(255, 246, 215, .35) 2.5px, transparent 3px) 0 0 / 22% 22%,
    var(--yolk);
}
.card-back img { width: 72%; height: 72%; border-radius: 50%; border: 2px solid var(--ink); }
.card-front { background: var(--white); transform: rotateY(180deg); }
.card-front img { width: 92%; height: 92%; object-fit: contain; }
.card:hover:not(.up):not(.done) .card-in { transform: translateY(-4px) rotate(-3deg); }
.card:focus-visible { outline: 3px dashed var(--yolk); outline-offset: 3px; border-radius: 16%; }
.card.done .card-front { background: #fff4cf; animation: matched .5s var(--ease-bounce); }
.card.miss .card-in { animation: miss .4s ease-in-out; }
@keyframes matched { 0% { scale: 1; } 40% { scale: 1.14; } 100% { scale: 1; } }
@keyframes miss { 0%, 100% { translate: 0; } 25% { translate: -6px; } 75% { translate: 6px; } }
.memory-win {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: rgba(43, 26, 20, .55);
  backdrop-filter: blur(3px);
  animation: pop .5s var(--ease-bounce);
}
.memory-win[hidden] { display: none; }
.win-title {
  margin: 0;
  font-size: clamp(64px, 11vw, 130px);
  line-height: 1.1;
  color: var(--yolk);
  -webkit-text-stroke: 3px var(--ink);
  paint-order: stroke fill;
  text-shadow: 0 7px 0 var(--ink);
}
.win-sub { margin: 0 0 14px; font: 600 20px/1.2 "Fredoka", "KuaiLe", sans-serif; }
.win-sub b { font-size: 30px; color: var(--yolk); }
.win-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.win-actions .pill { animation: none; cursor: pointer; }

/* ---------- second easter egg: 别慌 / Don't panic (js/fud.js), tag on the left side ---------- */
.hold-tab {
  position: absolute;
  left: -4px;
  top: 50%;
  z-index: 7;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 12px 14px 14px;
  border: 3px solid var(--ink);
  border-left: 0;
  border-radius: 0 18px 18px 0;
  background: var(--yolk);
  color: var(--white);
  box-shadow: 5px 5px 0 var(--ink);
  writing-mode: vertical-rl;
  font: 700 20px/1 "Fredoka", sans-serif;
  letter-spacing: .06em;
  cursor: pointer;
  transform: translate(-110%, -50%);
  transition: transform .45s var(--ease-bounce);
}
.hold-tab b { -webkit-text-stroke: 1.5px var(--ink); paint-order: stroke fill; text-shadow: 2px 2px 0 var(--ink); font-weight: 700; }
.hold-tab .zh { font: 400 16px/1 "KuaiLe", sans-serif; color: var(--ink); letter-spacing: .1em; }
.hold-tab.out { transform: translate(0, -50%); }
.hold-tab:hover, .hold-tab:focus-visible { outline: none; background: #ff9a1f; }
@media (hover: none) {
  .hold-tab:not(.out) { transform: translate(-64%, -50%); animation: hold-peek 5s ease-in-out 5.5s infinite; }
}
@keyframes hold-peek { 0%, 88%, 100% { translate: 0 0; } 93% { translate: 8px 0; } }

.fud {                                       /* an old amber trading monitor */
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 45%, #2a1a0e 0%, #160d07 70%, #0b0603 100%);
}
.fud-chart { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; animation: crt-flicker 4s steps(1) infinite; }
.fud-crt {                                     /* scanlines, a dark vignette and a slow rolling band, like a CRT */
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, transparent 0%, rgba(255, 176, 60, .06) 50%, transparent 100%) 0 0 / 100% 30% no-repeat,
    repeating-linear-gradient(180deg, rgba(0, 0, 0, .32) 0 1px, transparent 1px 3px),
    radial-gradient(ellipse at 50% 50%, transparent 55%, rgba(0, 0, 0, .65) 100%);
  animation: crt-roll 6s linear infinite;
}
@keyframes crt-roll { from { background-position: 0 -30%, 0 0, 0 0; } to { background-position: 0 130%, 0 0, 0 0; } }
@keyframes crt-flicker { 0%, 100% { opacity: .9; } 7% { opacity: .78; } 8% { opacity: .92; } 52% { opacity: .84; } 53% { opacity: .9; } }
@media (prefers-reduced-motion: reduce) { .fud-chart, .fud-crt { animation: none; } }
.fud .memory-bar { position: relative; z-index: 2; }
.fud-field { position: relative; flex: 1; z-index: 1; }
.fud-egg {
  position: absolute;
  left: 50%; top: 50%;
  width: var(--egg, 160px); height: var(--egg, 160px);
  translate: -50% -50%;
}
.fud-egg img { width: 100%; height: 100%; }
/* the egg drawn by the monitor: amber monochrome, a glow, and scanlines clipped to its shape */
.fud-egg { --mono: grayscale(1) sepia(1) saturate(2.6) hue-rotate(-10deg) brightness(1.08) contrast(1.15); }
.fud-egg img { filter: var(--mono) drop-shadow(0 0 7px rgba(255, 178, 62, .55)); }
.fud-egg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(180deg, rgba(10, 6, 3, .38) 0 1px, transparent 1px 3px);
  -webkit-mask: var(--face) center / contain no-repeat;
  mask: var(--face) center / contain no-repeat;
  pointer-events: none;
}
.fud-egg.hit { animation: fud-hit .35s ease-out; }
.fud-egg.gulp { animation: fud-gulp .35s var(--ease-bounce); }
@keyframes fud-hit { 0%, 100% { rotate: 0deg; } 25% { rotate: -9deg; scale: 1.06; } 60% { rotate: 7deg; } }
@keyframes fud-gulp { 0%, 100% { scale: 1; } 40% { scale: 1.12 .92; } }

/* terminal type: amber phosphor, monospace for the Latin, KuaiLe for the Chinese */
.fud { --amber: #ffb23e; --hot: #ffd98a; --glow: 0 0 6px rgba(255, 178, 62, .75), 0 0 16px rgba(255, 140, 30, .35);
       --mono-font: "Pixel", ui-monospace, Consolas, Menlo, monospace; }
/* pixel type stays crisp at multiples of 12 px */
.fud .zh { font-family: var(--mono-font) !important; font-weight: 400 !important; }
.fud, .fud * { -webkit-font-smoothing: none; font-synthesis: none; }
.fud .memory-bar { color: var(--amber); text-shadow: var(--glow); font: 400 12px/1 var(--mono-font); text-transform: uppercase; }
.fud .memory-stat .zh { font-size: 12px; }
.fud .memory-stat b { font-size: 24px; font-weight: 400; }
.fud .memory-stat b { color: var(--hot); font-family: var(--mono-font); }
.fud .memory-stat .zh { text-transform: none; }
.fud .m-tool {
  border: 2px solid var(--amber);
  border-radius: 0;
  background: transparent;
  color: var(--amber);
  box-shadow: 0 0 10px rgba(255, 178, 62, .35), inset 0 0 8px rgba(255, 178, 62, .2);
  text-shadow: var(--glow);
  font-family: var(--mono-font);
}
.fud .m-tool:hover, .fud .m-tool:focus-visible { background: var(--amber); color: #160d07; text-shadow: none; transform: none; }
.fud-panic {                                   /* PANIC [■■■■■□□□□□] 42% */
  position: absolute;
  left: 50%; top: calc(50% + var(--egg, 160px) * .6);
  display: flex;
  align-items: center;
  gap: 8px;
  translate: -50% 0;
  color: var(--amber);
  text-shadow: var(--glow);
  font: 400 12px/1 var(--mono-font);
  white-space: nowrap;
}
.fud-track {
  width: calc(var(--egg, 160px) * .9); height: 14px;
  padding: 2px;
  border: 2px solid var(--amber);
  box-shadow: 0 0 8px rgba(255, 178, 62, .45);
}
.fud-track i {
  display: block;
  height: 100%;
  width: calc(var(--panic, 0) * 1%);
  background: repeating-linear-gradient(90deg, var(--amber) 0 7px, transparent 7px 10px);
  filter: drop-shadow(0 0 4px var(--amber));
  transition: width .2s;
}
.fud-panic.alarm { animation: blink .5s steps(1) infinite; }
@keyframes blink { 50% { opacity: .35; } }

/* malus: an empty box in hot white phosphor, terminal type, with a little glitch */
.fud-b {
  position: absolute;
  left: 0; top: 0;
  padding: 7px 10px 6px 8px;
  border: 2px solid #fff3dc;
  border-radius: 0;
  background: rgba(10, 6, 3, .55);
  color: #fff3dc;
  box-shadow: 0 0 10px rgba(255, 243, 220, .55), inset 0 0 8px rgba(255, 243, 220, .2);
  text-shadow: 0 0 6px rgba(255, 243, 220, .9), 0 0 14px rgba(255, 243, 220, .4);
  font: 400 24px/1 var(--mono-font);
  white-space: nowrap;
  cursor: crosshair;
  touch-action: none;
  will-change: transform;
}
.fud-b:not(.arrow)::before { content: "▼"; margin-right: 6px; font: 400 12px/1 var(--mono-font); vertical-align: 5px; }
.fud-b:not(.arrow) { animation: glitch 2.6s steps(1) infinite; animation-delay: calc(var(--ph, 0) * -1s); }
@keyframes glitch {
  0%, 100% { text-shadow: none; }
  92% { text-shadow: -2px 0 rgba(255, 120, 40, .8), 2px 0 rgba(120, 200, 255, .6); translate: 1px 0; }
  95% { text-shadow: none; translate: 0; }
}
.fud-b.arrow { padding: 0; border: 0; background: none; box-shadow: none; text-shadow: none; }
.fud-b.arrow svg { display: block; width: 100%; height: 100%; overflow: visible; }
.fud-b.down { filter: drop-shadow(0 0 6px rgba(255, 243, 220, .8)); }
.fud-b.down svg { shape-rendering: crispEdges; }
/* bonus: BNB gold, brighter than anything else on the screen */
.fud-b.coin {                                 /* a dark rim sets it off the amber chart, then a gold glow that breathes */
  cursor: pointer;
  filter: drop-shadow(0 0 1.5px #0b0603) drop-shadow(0 0 1.5px #0b0603) drop-shadow(0 0 4px #fff1b8) drop-shadow(0 0 16px rgba(255, 210, 63, .85));
}
.fud-b.coin svg { animation: coin-pulse 1.1s ease-in-out infinite; }
@keyframes coin-pulse { 50% { scale: 1.1; } }
.fud-fx {                                      /* what is left of a popped bubble */
  position: absolute;
  left: 0; top: 0;
  pointer-events: none;
  font: 400 24px/1 var(--mono-font);
  color: var(--hot);
  text-shadow: var(--glow);
  animation: fud-fx .6s ease-out forwards;
}
.fud-fx.bad { color: #fff3dc; text-shadow: 0 0 8px #fff3dc; }
@keyframes fud-fx { 0% { opacity: 1; scale: .6; } 30% { scale: 1.25; } 100% { opacity: 0; scale: 1; translate: 0 -30px; } }
.fud .memory-win { z-index: 3; background: rgba(10, 6, 3, .72); backdrop-filter: blur(2px); }
.fud .win-title {
  font: 400 96px/1.1 var(--mono-font);
  color: var(--amber);
  -webkit-text-stroke: 0;
  text-shadow: 0 0 10px rgba(255, 178, 62, .9), 0 0 34px rgba(255, 120, 20, .5);
}
.fud .win-title::after { content: "_"; animation: blink 1s steps(1) infinite; }
@media (max-width: 820px) { .fud .win-title { font-size: 60px; } .fud-b:not(.arrow) { font-size: 12px; } .fud-b:not(.arrow)::before { vertical-align: 0; } }
.fud .win-sub { color: var(--amber); text-shadow: var(--glow); font: 400 12px/2 var(--mono-font); text-align: center; text-transform: uppercase; }
.fud .win-sub b { color: var(--hot); font-size: 24px; font-weight: 400; }
.fud .win-sub .zh { font-size: 24px; text-transform: none; }
.term-btn {
  padding: 10px 18px;
  border: 2px solid var(--amber);
  background: transparent;
  color: var(--amber);
  text-shadow: var(--glow);
  box-shadow: 0 0 12px rgba(255, 178, 62, .35), inset 0 0 10px rgba(255, 178, 62, .15);
  font: 400 24px/1 var(--mono-font);
  cursor: pointer;
}
.term-btn::before { content: "[ "; }
.term-btn::after { content: " ]"; }
.term-btn .zh { font-size: 24px; }
.term-btn:hover, .term-btn:focus-visible { background: var(--amber); color: #160d07; text-shadow: none; outline: none; }

/* ---------- third easter egg: 找不同 / spot the odd egg (js/spot.js), tag in the top-left corner,
   played in an egg carton ---------- */
.spot-tab {                                    /* same tag as PLAY, on the other side */
  position: absolute;
  top: -4px;
  left: 34px;
  z-index: 7;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 14px 14px 12px;
  border: 3px solid var(--ink);
  border-top: 0;
  border-radius: 0 0 18px 18px;
  background: var(--yolk);
  color: var(--white);
  box-shadow: 0 5px 0 var(--ink);
  font: 700 20px/1 "Fredoka", sans-serif;
  letter-spacing: .06em;
  cursor: pointer;
  transform: translateY(-110%);
  transform-origin: 50% 0;
  transition: transform .45s var(--ease-bounce);
}
.spot-tab b { -webkit-text-stroke: 1.5px var(--ink); paint-order: stroke fill; text-shadow: 0 2px 0 var(--ink); font-weight: 700; }
.spot-tab .zh { font: 400 15px/1 "KuaiLe", sans-serif; color: var(--ink); letter-spacing: 0; }
.spot-tab.out { transform: none; animation: tab-swing 1.6s ease-in-out .45s infinite; }
.spot-tab:hover, .spot-tab:focus-visible { outline: none; background: #ff9a1f; }
@media (hover: none) {
  .spot-tab:not(.out) { transform: translateY(-62%); animation: tab-peek 5s ease-in-out 4.2s infinite; }
}

.spot {                                        /* an egg carton seen from above: kraft board, cups in rows */
  --kraft: #c9a274;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, .12), transparent 60%),
    repeating-linear-gradient(35deg, rgba(90, 60, 30, .05) 0 2px, transparent 2px 6px),
    var(--kraft);
  color: var(--ink);
}
.spot .memory-stat b { color: var(--ink); }
.spot .m-tool { background: var(--white); }
.spot-time {
  flex: 1 1 120px;
  max-width: 320px;
  height: 16px;
  border: 2.5px solid var(--ink);
  border-radius: 99px;
  background: rgba(255, 255, 255, .35);
  overflow: hidden;
}
.spot-time i {
  display: block;
  height: 100%;
  width: calc(var(--left, 1) * 100%);
  background: var(--yolk);
  transition: width .25s linear;
}
.spot-time.low i { background: #e2462f; animation: blink .5s steps(1) infinite; }
.spot-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(var(--n, 3), var(--cell));
  grid-auto-rows: var(--cell);
  gap: var(--gap);
  place-content: center;
}
.cup {                                         /* one carton cup with an egg in it */
  position: relative;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 42%, #a98257 0%, #b8916a 45%, #d8b88e 72%, transparent 73%);
  box-shadow: inset 0 6px 10px rgba(70, 45, 20, .35);
  cursor: pointer;
  animation: deal .35s var(--ease-bounce) backwards;
}
.cup img { position: absolute; inset: 8%; width: 84%; height: 84%; pointer-events: none; filter: drop-shadow(0 4px 3px rgba(60, 35, 15, .4)); }
.cup:hover, .cup:focus-visible { translate: 0 -3px; }       /* the cup moves, not the egg: no hint on the odd one */
.cup:focus-visible { outline: 3px dashed var(--ink); outline-offset: 2px; }
.cup.wrong { animation: miss .35s ease-in-out; }
.cup.right img { animation: matched .45s var(--ease-bounce); }
.cup.reveal::after {                            /* time's up: the odd one gets a ring */
  content: "";
  position: absolute;
  inset: -4%;
  border: 4px solid #e2462f;
  border-radius: 50%;
  animation: blink .5s steps(1) 4;
}

/* ---------- fourth easter egg: 打蛋 / whack the egg (js/whack.js), tag on the right side,
   played on a stove top ---------- */
.whack-tab {                                   /* the HOLD tag, mirrored */
  position: absolute;
  right: -4px;
  top: 50%;
  z-index: 7;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 14px 14px 12px;
  border: 3px solid var(--ink);
  border-right: 0;
  border-radius: 18px 0 0 18px;
  background: var(--yolk);
  color: var(--white);
  box-shadow: -5px 5px 0 var(--ink);
  writing-mode: vertical-rl;
  font: 700 20px/1 "Fredoka", sans-serif;
  letter-spacing: .06em;
  cursor: pointer;
  transform: translate(110%, -50%);
  transition: transform .45s var(--ease-bounce);
}
.whack-tab b { -webkit-text-stroke: 1.5px var(--ink); paint-order: stroke fill; text-shadow: 2px 2px 0 var(--ink); font-weight: 700; }
.whack-tab .zh { font: 400 16px/1 "KuaiLe", sans-serif; color: var(--ink); letter-spacing: .1em; }
.whack-tab.out { transform: translate(0, -50%); }
.whack-tab:hover, .whack-tab:focus-visible { outline: none; background: #ff9a1f; }
@media (hover: none) {
  .whack-tab:not(.out) { transform: translate(64%, -50%); animation: whack-peek 5s ease-in-out 6.5s infinite; }
}
@keyframes whack-peek { 0%, 88%, 100% { translate: 0 0; } 93% { translate: -8px 0; } }

.whack {                                       /* a stove top: brushed dark steel */
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .025) 0 1px, transparent 1px 4px),
    linear-gradient(160deg, #4a4543 0%, #2e2a29 55%, #242120 100%);
}
.whack-lives { display: flex; gap: 4px; }
.whack-lives img { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--ink); transition: filter .3s, opacity .3s; }
.whack-lives img.lost { filter: grayscale(1) brightness(.5); opacity: .5; }
.whack-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(var(--cols, 3), var(--cell));
  grid-auto-rows: var(--cell);
  gap: var(--gap);
  place-content: center;
}
.hob {                                      /* a gas burner with its grate */
  position: relative;
  border-radius: 50%;
  background:
    radial-gradient(circle, #1a1716 0 16%, #5b5553 17% 21%, #151312 22% 34%, transparent 35%),
    conic-gradient(from 45deg, transparent 0 11%, #111 11% 14%, transparent 14% 36%, #111 36% 39%, transparent 39% 61%, #111 61% 64%, transparent 64% 86%, #111 86% 89%, transparent 89%),
    radial-gradient(circle, #2a2625 0 60%, #3a3534 61% 66%, #1b1918 67% 70%, transparent 71%);
}
.hob.on::before {                           /* the flame ring under a pan */
  content: "";
  position: absolute;
  inset: 22%;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(90, 160, 255, .55), 0 0 18px 6px rgba(80, 140, 255, .35);
}
.whack-egg {
  position: absolute;
  inset: 4%;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: conic-gradient(var(--yolk) calc(var(--heat, 0) * 1turn), transparent 0);   /* heat creeping round */
  cursor: pointer;
  touch-action: manipulation;
  animation: egg-pop .25s var(--ease-bounce);
}
.whack-egg::after { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: #2e2a29; }
.whack-egg img { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; filter: drop-shadow(0 4px 3px rgba(0, 0, 0, .5)); }
.whack-egg.burnt { background: none; }
.whack-egg.burnt::after { display: none; }
.whack-egg.saved { animation: egg-saved .35s ease-in forwards; pointer-events: none; }
.whack-egg.gone { animation: egg-gone .4s ease-in forwards; pointer-events: none; }
@keyframes egg-pop { from { scale: .2; opacity: 0; } }
@keyframes egg-saved { to { translate: 0 -60%; scale: 1.2; opacity: 0; } }
@keyframes egg-gone { 30% { scale: 1.08; } to { scale: .6; opacity: 0; filter: grayscale(1); } }
.whack-fx {
  position: absolute;
  left: 50%; top: 20%;
  z-index: 3;
  translate: -50% 0;
  pointer-events: none;
  font: 700 24px/1 "Fredoka", "KuaiLe", sans-serif;
  color: var(--white);
  -webkit-text-stroke: 1.5px var(--ink);
  paint-order: stroke fill;
  animation: fud-fx .6s ease-out forwards;
}
.whack-fx.bad { color: #ff6b5b; }

/* ---------- scam warning: an egg white that pops up once a day (main.js) ---------- */
.notice {
  width: min(92vw, 560px);
  max-height: none;
  padding: 0;
  border: 0;
  background: none;
  overflow: visible;
  color: var(--ink);
}
.notice[open] { animation: pop .5s var(--ease-bounce); }
.notice::backdrop { background: rgba(43, 26, 20, .55); backdrop-filter: blur(4px); }
.notice-white {                                 /* the albume path, stretched behind the text */
  position: absolute;
  left: -10%; top: -2%;
  width: 120%; height: 106%;
  overflow: visible;
  filter: drop-shadow(0 8px 0 var(--ink));
}
.notice-white path { fill: var(--white); stroke: var(--ink); stroke-width: 4px; vector-effect: non-scaling-stroke; }
.notice-in {
  position: relative;
  padding: clamp(58px, 9vw, 78px) clamp(22px, 5vw, 44px) clamp(44px, 7vw, 60px);
  text-align: center;
  font: 500 15px/1.45 "Fredoka", "KuaiLe", sans-serif;
}
.notice-in p { margin: 0 0 10px; }
.notice-in .zh { font-family: "KuaiLe", sans-serif; font-weight: 400; font-size: 17px; }
.notice-in b.zh { font-size: 19px; }
.notice-title {
  font: 700 22px/1.2 "Fredoka", sans-serif;
  color: #c0392b;
}
.notice-title .zh { font-size: 26px !important; color: #c0392b; }
.notice-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 4px 0 16px;
  padding: 0;
  list-style: none;
}
.notice-links li {
  padding: 5px 12px;
  border: 2.5px solid var(--ink);
  border-radius: 999px;
  background: #fff;
  font: 700 14px/1.2 ui-monospace, Consolas, Menlo, "Roboto Mono", monospace;   /* every character exact, to compare */
  user-select: all;                             /* easy to copy and compare */
}
.notice-links small { font-size: 12px; opacity: .7; }
.notice-links small .zh { font-size: 12px; }
.notice-ok { animation: none; cursor: pointer; --bg: var(--yolk); }
@media (max-width: 520px) {                    /* narrow: the egg white wider than the text, smaller type */
  .notice { width: 88vw; }
  .notice-white {                              /* keep the egg white nearly in proportion: taller than the
                                                  text, so the side lobes spill past the screen edges */
    left: 50%; top: -9%;
    width: auto; height: 118%;
    aspect-ratio: 1;
    translate: -50% 0;
  }
  .notice-in { padding: 64px 2px 46px; font-size: 15px; line-height: 1.4; }
  .notice-in .zh { font-size: 17px; }
  .notice-in b.zh { font-size: 18px; }
  .notice-title { font-size: 21px; }
  .notice-title .zh { display: block; font-size: 25px !important; }
  .notice-links li { font-size: 14px; padding: 5px 10px; }
}

/* one sticker, big, to download or share */
.sticker-view {
  width: min(88vw, 420px);
  padding: 22px;
  border: 4px solid var(--ink);
  border-radius: 32px;
  background: var(--white);
  box-shadow: 0 8px 0 var(--ink);
  text-align: center;
}
.sticker-view[open] { animation: pop .35s var(--ease-bounce); }
.sticker-view::backdrop { background: rgba(43, 26, 20, .55); backdrop-filter: blur(4px); }
.sticker-view img { width: 100%; height: auto; }
.view-actions { display: flex; justify-content: center; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.view-actions .pill { animation: none; padding: 12px 20px; cursor: pointer; }
.view-dl { --bg: var(--yolk); }

/* ---------- the dock: a small sticker in the corner with the links, once the hero is gone ---------- */
.dock {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px 6px 6px;
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: var(--white);
  box-shadow: 0 5px 0 var(--ink);
  transform: translateY(140%) rotate(6deg);      /* hidden below the screen */
  opacity: 0;
  pointer-events: none;
  transition: transform .5s var(--ease-bounce), opacity .2s;
}
.dock.on { transform: none; opacity: 1; pointer-events: auto; }
.dock a { display: grid; place-items: center; border-radius: 50%; transition: transform .3s var(--ease-bounce); }
.dock-top img { width: 40px; height: 40px; display: block; border: 2.5px solid var(--ink); border-radius: 50%; object-fit: cover; }
.dock-btn { width: 40px; height: 40px; border: 2.5px solid var(--ink); }
.dock-btn svg { width: 19px; height: 19px; fill: currentColor; }
.dock-x { background: var(--ink); color: var(--white); }
.dock-tg { background: var(--tg); color: #fff; }
.dock a:hover, .dock a:focus-visible { transform: translateY(-3px) scale(1.12) rotate(-8deg); outline: none; }
.dock a:active { transform: scale(.92); }

/* ---------- footer ---------- */
.foot { position: relative; padding: 40px 16px 56px; text-align: center; }
.foot .links { margin-top: 0; }
.foot-note { margin: 18px 0 0; font: 600 16px/1.3 "Fredoka", "KuaiLe", sans-serif; opacity: .75; }

/* ---------- phones ---------- */
@media (max-width: 820px) {
  .hero {
    grid-template-columns: 1fr;
    grid-template-areas: "logo" "egg" "tag" "links" "ca" "hint";
    row-gap: 12px;
    padding-top: 20px;
  }
  .logo { width: 100%; }
  .egg-wrap { width: min(78vw, 380px); align-self: center; margin-top: 0; }
  .links { margin-top: 18px; }
  .pill { padding: 12px 20px; }
}

@media (max-width: 820px) {
  .cook-stage {
    grid-template-columns: 1fr;
    grid-template-areas: "pan" "steps";
    align-content: center;
    gap: 8px;
    padding-top: 56px;
  }
  .cook-stage { padding-right: 16px; }
  .cook-pan { width: min(64vw, 42svh); }
  .cook-steps { min-height: 11em; text-align: center; }
  .step-n { font-size: 15px; }
  .knob { --kw: 92px; top: 14px; bottom: auto; left: 14px; }
  .knob-labels { display: none; }
  .hint small { display: none; }                       /* phones: Chinese only, the badges fit */
  .hint { padding: 6px 12px 6px 8px; }
  .cook-stage { --th: min(30svh, 64vw, 260px); }
  .thermo { right: 8px; top: 56px; margin-top: 0; }
  .thermo-labels { display: none; }                 /* no room next to the pan on a phone */
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition: none !important; }
  .bubbles { display: none; }
}
