:root {
  --yellow: #ffe14d;
  --ink: #111;
  --pink: #ff3ea5;
  --blue: #3d5afe;
  --paper: #fffdf6;
  --display: "Anton", Impact, "Arial Narrow Bold", sans-serif;
  --ui: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --hand: "Permanent Marker", "Comic Sans MS", cursive;
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  /* photo width: as big as the screen allows, 3:4 portrait */
  --w: min(86vw, max(280px, calc((100svh - 250px) * 0.75)), 620px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background-color: var(--yellow);
  background-image: radial-gradient(rgba(17, 17, 17, 0.13) 1.2px, transparent 1.4px);
  background-size: 16px 16px;
  color: var(--ink);
  font-family: var(--ui);
  font-size: 16px;
  line-height: 1.45;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, p { margin: 0; }
main { overflow-x: clip; }
::selection { background: var(--pink); color: #fff; }

/* ---------------- header ---------------- */
.top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 18px;
  pointer-events: none;
}
.top > * { pointer-events: auto; }

.logo {
  font-family: var(--display); font-size: 30px; line-height: 1; letter-spacing: 0.01em;
  background: var(--ink); color: var(--yellow); padding: 8px 14px 7px; border-radius: 12px;
  transform: rotate(-3deg); display: inline-block; transition: transform 0.4s var(--spring);
}
.logo span { color: var(--pink); }
.logo sup { font-family: var(--ui); font-size: 11px; vertical-align: super; margin-left: 2px; }
.logo:hover { transform: rotate(3deg) scale(1.06); }

.top-r { display: flex; align-items: center; gap: 10px; }
.counter {
  display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 16px;
  background: var(--paper); border: 3px solid var(--ink); border-radius: 999px; box-shadow: 4px 4px 0 var(--ink);
  font-size: 14px; font-weight: 500; white-space: nowrap;
}
.counter b { font-family: var(--display); font-size: 20px; font-weight: 400; letter-spacing: 0.02em; font-variant-numeric: tabular-nums; }
.live { width: 9px; height: 9px; border-radius: 50%; background: #ff2d2d; position: relative; flex-shrink: 0; }
.live::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: inherit; animation: ping 1.6s ease-out infinite; }
@keyframes ping { to { transform: scale(3); opacity: 0; } }

.icon-btn {
  width: 42px; height: 42px; display: grid; place-items: center; font-size: 18px;
  background: var(--paper); border: 3px solid var(--ink); border-radius: 50%; box-shadow: 4px 4px 0 var(--ink);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.icon-btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }

/* ---------------- stage ---------------- */
.stage {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 84px 16px 120px; overflow: hidden;
}

.giant {
  position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-56%);
  z-index: 0; margin: 0; text-align: center; white-space: nowrap; pointer-events: none;
  font-family: var(--display); font-weight: 400; line-height: 0.82; letter-spacing: -0.005em;
  font-size: min(33vw, 68svh);
  user-select: none;
}
.gl { display: inline-block; pointer-events: auto; transition: transform 0.35s var(--spring), color 0.3s ease; }
.gl:hover { transform: translateY(-4%) rotate(-3deg); }
.gl.c { font: inherit; line-height: inherit; color: var(--pink); -webkit-text-stroke: 0.012em var(--ink); cursor: help; }
.gl.c:hover { transform: rotate(8deg) scale(1.04); }
.gl.c.boing { animation: cSpin 0.8s var(--spring); }
@keyframes cSpin { from { transform: rotate(-360deg) scale(0.6); } }

/* photo + effect layers (each wrapper owns one transform so effects stack) */
.photo-wrap { position: relative; z-index: 2; width: var(--w); transform: rotate(-2deg); transition: transform 0.5s var(--spring); }
.fx-quake, .fx-spin { width: 100%; }
.fx-shape {
  width: 100%;
  transform: scale(var(--sx, 1), var(--sy, 1)) rotate(var(--flip, 0deg));
  transition: transform 0.7s var(--spring);
}

.photo {
  position: relative; width: 100%; aspect-ratio: 3 / 4; overflow: hidden;
  border: 6px solid var(--ink); border-radius: 22px; background: #c9c2b0;
  box-shadow: 14px 14px 0 var(--ink);
  cursor: pointer; user-select: none; -webkit-user-select: none; touch-action: manipulation;
  -webkit-tap-highlight-color: transparent; outline: none;
}
.photo:focus-visible { box-shadow: 14px 14px 0 var(--ink), 0 0 0 6px var(--pink); }
.photo.squish { animation: squish 0.5s var(--spring); }
@keyframes squish {
  0% { transform: scale(1, 1); }
  25% { transform: scale(1.05, 0.93); }
  50% { transform: scale(0.96, 1.05); }
  75% { transform: scale(1.02, 0.98); }
  100% { transform: scale(1, 1); }
}

.photo-img, .bighead-img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block;
  -webkit-user-drag: none; user-select: none; filter: var(--ff, none);
}

/* face layer: bobblehead + eyes ride on the same transform */
.face { position: absolute; inset: 0; transform-origin: 24.5% 54%; pointer-events: none; }
.bighead-img {
  display: none; pointer-events: auto;
  clip-path: ellipse(13.5% 11.2% at 24.5% 43.5%);
  -webkit-mask-image: radial-gradient(13.5% 11.2% at 24.5% 43.5%, #000 80%, transparent 100%);
  mask-image: radial-gradient(13.5% 11.2% at 24.5% 43.5%, #000 80%, transparent 100%);
}
.face.big .bighead-img { display: block; }

.googly { display: none; }
body.fx-googly .googly { display: block; }
.eye {
  position: absolute; width: calc(var(--w) * 0.078); aspect-ratio: 1; transform: translate(-50%, -50%);
  border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff 55%, #e9e9e9);
  border: max(2px, calc(var(--w) * 0.005)) solid var(--ink);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.35);
  animation: eyeIn 0.5s var(--spring);
}
.eye i {
  position: absolute; left: 50%; top: 50%; width: 46%; aspect-ratio: 1; margin: -23% 0 0 -23%;
  border-radius: 50%; background: var(--ink);
  transform: translate(var(--px, 0px), var(--py, 0px));
}
.eye i::after { content: ""; position: absolute; width: 30%; aspect-ratio: 1; left: 20%; top: 18%; border-radius: 50%; background: #fff; }
@keyframes eyeIn { from { transform: translate(-50%, -50%) scale(0); } }

.glow { display: none; }
body.fx-fried .glow { display: block; }
.glow i {
  position: absolute; width: calc(var(--w) * 0.16); aspect-ratio: 1; transform: translate(-50%, -50%);
  border-radius: 50%; mix-blend-mode: screen;
  background: radial-gradient(circle, #fff 0 9%, #ff4040 22%, rgba(255, 0, 0, 0.55) 42%, transparent 68%);
  animation: glowPulse 0.6s ease-in-out infinite alternate;
}
.glow i::after {
  content: ""; position: absolute; left: -90%; right: -90%; top: 50%; height: 4%; margin-top: -2%;
  background: linear-gradient(90deg, transparent, rgba(255, 90, 90, 0.9), #fff, rgba(255, 90, 90, 0.9), transparent);
}
@keyframes glowPulse { to { transform: translate(-50%, -50%) scale(1.25); } }

.fry { display: none; position: absolute; inset: 0; pointer-events: none; }
body.fx-fried .fry { display: block; }
.fry::before {
  content: ""; position: absolute; inset: 0; opacity: 0.45; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
.fry span {
  position: absolute; font-size: calc(var(--w) * 0.11); transform: translate(-50%, -50%) rotate(-12deg);
  filter: saturate(3) drop-shadow(0 0 6px rgba(255, 0, 0, 0.6));
  animation: fryPop 0.35s var(--spring) both;
}
.fry span:nth-child(2n) { transform: translate(-50%, -50%) rotate(14deg); }
@keyframes fryPop { from { transform: translate(-50%, -50%) scale(0); } }

body.fx-fried { --ff: saturate(3.2) contrast(1.9) brightness(1.08) hue-rotate(-8deg); }
body.fx-disco .photo-img, body.fx-disco .bighead-img { animation: hue 1.1s linear infinite; }
@keyframes hue { from { filter: var(--ff,) hue-rotate(0deg); } to { filter: var(--ff,) hue-rotate(360deg); } }

body.fx-wide .fx-shape { --sx: 2.1; }
body.fx-pocket .fx-shape { --sx: 0.3; --sy: 0.3; }
body.fx-flip .fx-shape { --flip: 180deg; }
body.fx-spin .fx-spin { animation: spin 1.3s linear infinite; }
body.fx-quake .fx-quake { animation: quake 0.24s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes quake {
  0% { transform: translate(0, 0) rotate(0deg); }
  20% { transform: translate(-9px, 5px) rotate(-1.5deg); }
  40% { transform: translate(8px, -6px) rotate(1.2deg); }
  60% { transform: translate(-6px, -4px) rotate(-0.8deg); }
  80% { transform: translate(7px, 6px) rotate(1deg); }
  100% { transform: translate(0, 0) rotate(0deg); }
}

body.fx-disco { animation: discoBg 1.6s steps(1) infinite; }
@keyframes discoBg {
  0% { background-color: var(--yellow); }
  25% { background-color: #ff7ac2; }
  50% { background-color: #7af0ff; }
  75% { background-color: #b6ff6b; }
}
body.fx-disco .giant { animation: hue 1.4s linear infinite; }

/* doodles */
.doodle { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; touch-action: none; }
body.tool-draw .doodle { pointer-events: auto; cursor: crosshair; }
body.tool-draw .photo { cursor: crosshair; }

/* stickers */
.stickers { position: absolute; inset: 0; pointer-events: none; }
.sticker {
  position: absolute; pointer-events: auto; line-height: 1; cursor: grab;
  font-size: calc(var(--s, 0.16) * var(--w));
  transform: translate(-50%, -50%) rotate(var(--r, 0deg));
  filter: drop-shadow(0 4px 4px rgba(0, 0, 0, 0.35));
  touch-action: none; user-select: none; -webkit-user-select: none;
  animation: stickIn 0.45s var(--spring);
}
.sticker.grab { cursor: grabbing; filter: drop-shadow(0 10px 10px rgba(0, 0, 0, 0.4)); }
.sticker.bye { animation: stickOut 0.25s ease forwards; }
@keyframes stickIn { from { transform: translate(-50%, -50%) rotate(var(--r, 0deg)) scale(0); } }
@keyframes stickOut { to { transform: translate(-50%, -50%) rotate(var(--r, 0deg)) scale(0); opacity: 0; } }

/* speech bubble (sits on the brick wall, pointing at his mouth) */
.bubble {
  position: absolute; left: 40%; top: 17%; max-width: 54%; z-index: 5; pointer-events: none;
  padding: 0.7em 0.9em; border-radius: 20px; background: var(--paper); border: 4px solid var(--ink);
  font-weight: 700; line-height: 1.2; font-size: clamp(14px, calc(var(--w) * 0.045), 26px);
  box-shadow: 5px 5px 0 var(--ink);
  opacity: 0; transform: scale(0.4) rotate(-8deg); transform-origin: 0% 100%;
  transition: opacity 0.18s ease, transform 0.4s var(--spring);
}
.bubble::before {
  content: ""; position: absolute; left: -18px; bottom: 14px; width: 0; height: 0;
  border-top: 12px solid transparent; border-bottom: 12px solid transparent; border-right: 20px solid var(--ink);
}
.bubble::after {
  content: ""; position: absolute; left: -10px; bottom: 18px; width: 0; height: 0;
  border-top: 8px solid transparent; border-bottom: 8px solid transparent; border-right: 13px solid var(--paper);
}
.bubble.on { opacity: 1; transform: none; }

/* decorations around the photo */
.stamp {
  position: absolute; right: -34px; top: -30px; z-index: 6;
  width: calc(var(--w) * 0.28); max-width: 150px; min-width: 96px; aspect-ratio: 1;
  display: grid; place-items: center; text-align: center;
  background: var(--pink); color: var(--paper); border: 4px solid var(--ink); border-radius: 50%;
  box-shadow: 5px 5px 0 var(--ink); transform: rotate(14deg);
  font-family: var(--display); line-height: 0.95; text-transform: uppercase; font-size: clamp(18px, calc(var(--w) * 0.06), 32px);
  animation: stampWiggle 3s ease-in-out infinite;
}
@keyframes stampWiggle { 0%, 100% { transform: rotate(14deg); } 50% { transform: rotate(4deg) scale(1.06); } }

.note {
  position: absolute; right: calc(100% + 18px); top: 34%; z-index: 6; width: 190px;
  padding: 16px 16px 14px; background: #fff38a; border-radius: 4px; box-shadow: 4px 6px 0 rgba(0, 0, 0, 0.25);
  font-family: var(--hand); font-size: 23px; line-height: 1.15; transform: rotate(-6deg);
}
.note::before {
  content: ""; position: absolute; left: 50%; top: -12px; width: 70px; height: 22px; margin-left: -35px;
  background: rgba(255, 255, 255, 0.6); transform: rotate(3deg);
}
body.fx-wide .note, body.fx-spin .note { opacity: 0; transform: rotate(-6deg) scale(0.8); }
.note { transition: opacity 0.3s ease, transform 0.4s var(--spring); }
.note b { color: var(--pink); display: inline-block; animation: nudge 1.2s ease-in-out infinite; }
@keyframes nudge { 50% { transform: translateX(6px); } }

.meta {
  position: relative; z-index: 2; width: min(100%, 980px); margin-top: 34px;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-weight: 500; font-size: 14px;
}
.meta p { background: var(--paper); border: 3px solid var(--ink); border-radius: 999px; padding: 6px 14px; box-shadow: 3px 3px 0 var(--ink); }
.meta em { font-style: normal; color: var(--pink); font-weight: 700; }
.meta b { font-family: var(--display); font-weight: 400; font-size: 18px; }

/* ---------------- ticker ---------------- */
.ticker { background: var(--ink); color: var(--yellow); overflow: hidden; white-space: nowrap; border-top: 4px solid var(--ink); border-bottom: 4px solid var(--ink); transform: rotate(-1deg); margin: 10px -10px; }
.ticker-track { display: inline-flex; padding: 14px 0; animation: tick 40s linear infinite; }
.ticker-track span { font-family: var(--display); font-size: 26px; letter-spacing: 0.03em; text-transform: uppercase; padding-right: 12px; }
@keyframes tick { to { transform: translateX(-50%); } }

/* ---------------- extras ---------------- */
.extras { max-width: 1040px; margin: 70px auto 0; padding: 0 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.extras > * { min-width: 0; }
.card {
  background: var(--paper); border: 4px solid var(--ink); border-radius: 26px; box-shadow: 10px 10px 0 var(--ink);
  padding: 28px 26px 26px;
}
.card:nth-child(1) { transform: rotate(-1deg); }
.card:nth-child(2) { transform: rotate(1.2deg); }
.kicker { font-family: var(--hand); color: var(--pink); font-size: 20px; margin-bottom: 6px; }
.card h2 { font-family: var(--display); font-weight: 400; font-size: clamp(34px, 4.4vw, 50px); line-height: 1; letter-spacing: 0.005em; text-transform: uppercase; margin-bottom: 20px; }

.spell { display: flex; gap: 10px; }
.spell input {
  flex: 1 1 auto; width: 0; min-width: 0; height: 54px; padding: 0 16px; border: 3px solid var(--ink); border-radius: 14px;
  background: #fff; font: inherit; font-size: 18px; font-weight: 500; outline: none;
}
.spell input:focus { box-shadow: 0 0 0 4px var(--pink); }
.spell button, .star { transition: transform 0.25s var(--spring); }
.spell button {
  height: 54px; padding: 0 20px; border-radius: 14px; background: var(--ink); color: var(--yellow);
  font-weight: 700; font-size: 16px; box-shadow: 4px 4px 0 var(--pink);
}
.spell button:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--pink); }
.result { margin-top: 16px; min-height: 26px; font-weight: 700; font-size: 17px; }

.stars { display: flex; gap: 6px; }
.star { font-size: 54px; line-height: 1; color: #d8d3c4; -webkit-text-stroke: 2px var(--ink); transition: transform 0.35s var(--spring), color 0.2s ease; }
.star.on { color: var(--yellow); }
.star:hover { transform: scale(1.15) rotate(-8deg); }

.foot { text-align: center; padding: 70px 18px 140px; font-weight: 500; font-size: 14px; }
.foot p + p { opacity: 0.6; margin-top: 4px; }

/* ---------------- dock ---------------- */
.dock { position: fixed; left: 50%; bottom: 16px; z-index: 70; transform: translateX(-50%); width: min(620px, calc(100% - 20px)); display: flex; flex-direction: column; align-items: center; gap: 10px; pointer-events: none; }
.dock > * { pointer-events: auto; }
.dock-bar {
  display: flex; gap: 4px; padding: 6px; background: var(--ink); border-radius: 22px;
  box-shadow: 0 14px 30px -8px rgba(0, 0, 0, 0.45);
}
.dock-bar button {
  display: flex; flex-direction: column; align-items: center; gap: 1px; min-width: 72px; padding: 8px 10px 7px;
  border-radius: 16px; color: var(--paper); font-size: 12px; font-weight: 700; letter-spacing: 0.02em;
  transition: background 0.2s ease, color 0.2s ease, transform 0.25s var(--spring);
}
.dock-bar .ico { font-size: 22px; line-height: 1.1; }
.dock-bar button:hover { background: rgba(255, 255, 255, 0.1); }
.dock-bar button[aria-pressed="true"] { background: var(--yellow); color: var(--ink); }
.dock-bar button:active { transform: scale(0.92); }

.tray {
  width: 100%; padding: 14px 16px 12px; background: var(--paper); border: 4px solid var(--ink); border-radius: 22px;
  box-shadow: 8px 8px 0 var(--ink); animation: trayIn 0.35s var(--spring);
}
.tray[hidden] { display: none; }
@keyframes trayIn { from { transform: translateY(20px) scale(0.96); opacity: 0; } }
.tray-title { font-family: var(--display); font-size: 22px; text-transform: uppercase; letter-spacing: 0.02em; margin-bottom: 10px; }
.tray-hint { margin-top: 10px; font-size: 12.5px; opacity: 0.7; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.row + .row { margin-top: 10px; }
.sep { width: 2px; height: 26px; background: rgba(17, 17, 17, 0.15); margin: 0 2px; }

.chip {
  height: 38px; padding: 0 14px; border-radius: 12px; border: 3px solid var(--ink); background: #fff;
  font-weight: 700; font-size: 14px; white-space: nowrap;
  transition: transform 0.25s var(--spring), background 0.2s ease, color 0.2s ease;
}
.chip:hover { transform: translateY(-2px); }
.chip:active { transform: scale(0.94); }
.chip.on, .chip[aria-pressed="true"] { background: var(--ink); color: var(--yellow); }
.chip.act { background: var(--pink); color: #fff; }

.swatch { width: 34px; height: 34px; border-radius: 50%; background: var(--c); border: 3px solid var(--ink); transition: transform 0.25s var(--spring); }
.swatch.on { transform: scale(1.18); box-shadow: 0 0 0 3px var(--paper), 0 0 0 6px var(--ink); }

.emoji button { width: 46px; height: 46px; font-size: 28px; border-radius: 12px; display: grid; place-items: center; transition: transform 0.25s var(--spring), background 0.2s ease; }
.emoji button:hover { background: rgba(17, 17, 17, 0.07); transform: scale(1.15) rotate(-6deg); }

/* ---------------- overlays ---------------- */
.floater {
  position: fixed; left: 0; top: 0; z-index: 90; pointer-events: none; white-space: nowrap;
  font-family: var(--display); font-size: 34px; color: var(--pink); -webkit-text-stroke: 1.5px var(--ink);
  animation: floatUp 0.9s var(--ease) forwards;
}
.floater.big { font-size: 48px; color: var(--yellow); }
@keyframes floatUp {
  from { transform: translate(-50%, -50%) scale(0.6); opacity: 1; }
  to { transform: translate(calc(-50% + var(--dx, 0px)), -170%) scale(1.1); opacity: 0; }
}

.toast {
  position: fixed; left: 50%; top: 76px; z-index: 110; transform: translate(-50%, -20px); opacity: 0; pointer-events: none;
  padding: 12px 20px; border-radius: 999px; background: var(--ink); color: var(--yellow);
  font-weight: 700; font-size: 15px; box-shadow: 5px 5px 0 var(--pink); max-width: calc(100% - 30px); text-align: center;
  transition: opacity 0.25s ease, transform 0.4s var(--spring);
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }

.alarm {
  position: fixed; inset: 0; z-index: 200; display: grid; place-content: center; text-align: center; gap: 18px;
  background: #ff1f3d; color: #fff; cursor: pointer; padding: 20px;
  animation: alarmFlash 0.35s steps(1) infinite;
}
.alarm[hidden] { display: none; }
.alarm-big { font-family: var(--display); font-size: clamp(56px, 13vw, 200px); line-height: 0.92; text-transform: uppercase; -webkit-text-stroke: 3px var(--ink); animation: alarmShake 0.18s linear infinite; }
.alarm-small { font-family: var(--hand); font-size: clamp(18px, 2.4vw, 28px); }
@keyframes alarmFlash { 50% { background: var(--ink); } }
@keyframes alarmShake { 25% { transform: translate(-6px, 3px) rotate(-1deg); } 75% { transform: translate(6px, -3px) rotate(1deg); } }

.fx-layer { position: fixed; inset: 0; z-index: 40; pointer-events: none; overflow: hidden; }
.head { border-radius: 50%; background-repeat: no-repeat; border: 4px solid var(--ink); }
.dvd {
  position: absolute; left: 0; top: 0; pointer-events: auto; cursor: pointer;
  border: 6px solid hsl(var(--hue, 330) 95% 55%); box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
  transition: border-color 0.2s ease;
}
.drop {
  position: absolute; top: 0; will-change: transform;
  animation: fall var(--dur, 3s) linear var(--delay, 0s) both;
}
@keyframes fall {
  from { transform: translateY(-160px) rotate(0deg); }
  to { transform: translateY(calc(100vh + 160px)) rotate(var(--rot, 360deg)); }
}
.ball {
  position: absolute; left: 50%; top: -10px; font-size: 90px; transform-origin: 50% -200px;
  animation: ballIn 0.6s var(--spring) both, swing 1.8s ease-in-out 0.6s infinite alternate;
}
.ball::before { content: ""; position: absolute; left: 50%; bottom: 90%; width: 2px; height: 300px; background: var(--ink); }
@keyframes ballIn { from { transform: translate(-50%, -200px); } to { transform: translate(-50%, 60px); } }
@keyframes swing { from { transform: translate(-50%, 60px) rotate(-10deg); } to { transform: translate(-50%, 60px) rotate(10deg); } }

.confetti { position: fixed; left: 0; top: 0; width: 100vw; height: 100vh; z-index: 95; pointer-events: none; }

body.shaking main { animation: quake 0.24s linear 8; }

/* ---------------- responsive ---------------- */
@media (max-width: 1100px) {
  .note { display: none; }
}

@media (max-width: 760px), (max-aspect-ratio: 4/5) {
  :root { --w: min(86vw, max(260px, calc((100svh - 330px) * 0.75)), 560px); }
  .stage { justify-content: flex-start; padding-top: 86px; }
  .giant { position: relative; top: auto; transform: none; font-size: 41vw; margin-bottom: -0.2em; z-index: 1; }
  .stamp { right: -12px; top: -22px; }
  .meta { justify-content: center; margin-top: 28px; }
  .extras { grid-template-columns: 1fr; margin-top: 50px; }
}

@media (max-width: 520px) {
  .counter span { display: none; }
  .logo { font-size: 24px; }
  .dock { bottom: 10px; }
  .dock-bar { width: 100%; justify-content: space-between; }
  .dock-bar button { min-width: 0; flex: 1; padding: 7px 4px 6px; font-size: 11px; }
  .tray { padding: 12px; }
  .chip { height: 36px; padding: 0 11px; font-size: 13px; }
  .emoji button { width: 42px; height: 42px; font-size: 26px; }
  .card { padding: 22px 18px 20px; }
  .star { font-size: 46px; }
  .ticker-track span { font-size: 21px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ticker-track, .stamp, .note b, .live::after { animation: none; }
  body.fx-spin .fx-spin, body.fx-quake .fx-quake, body.fx-disco, body.fx-disco .photo-img, body.shaking main, .alarm, .alarm-big { animation: none; }
}
