/* Food Squad — Gesture Roulette
   1920×1080 stage. Animate transform/opacity only. Gestures stay readable
   under prefers-reduced-motion (they are content, not decoration). */

:root {
  --ink: #2a1a10;
  --paper: #fff6e8;
  --cream: #fffaf1;
  --sky: #7ec8ff;
  --sky-deep: #3aa0e8;
  --wood: #c9844a;
  --wood-dark: #8a4e22;
  --sill: #f3d7a6;
  --shadow: 0 10px 24px rgba(42, 26, 16, 0.22);
  --font: "Avenir Next", "Segoe UI", "Gill Sans", "Trebuchet MS", sans-serif;
  --team-1: #e23d3d;
  --team-2: #2f6bff;
  --team-3: #e6b422;
  --team-4: #1f9d55;
  --reach-top: 568px;
}

* { box-sizing: border-box; }
html, body {
  margin: 0; height: 100%; overflow: hidden;
  background: #1b120c; color: var(--ink); font-family: var(--font);
  user-select: none; -webkit-user-select: none;
  touch-action: manipulation;
}
button { font-family: inherit; }
img { display: block; max-width: 100%; pointer-events: none; }

#viewport { position: fixed; inset: 0; overflow: hidden; }
#stage {
  position: absolute; width: 1920px; height: 1080px; left: 50%; top: 50%;
  transform-origin: center center; overflow: hidden;
  background:
    radial-gradient(circle at 18% 22%, rgba(255,255,255,.55), transparent 12%),
    radial-gradient(circle at 78% 18%, rgba(255,255,255,.4), transparent 10%),
    linear-gradient(#49b6ff 0 300px, transparent 300px),
    linear-gradient(#f6e0b8 300px, #e8c27a 72%, #c9844a);
}

#gl {
  position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none; display: block;
}

/* Official logo lives in a hidden symbol library. Never framed. */
#logo-lib { position: absolute; width: 0; height: 0; overflow: hidden; }

.screen { position: absolute; inset: 0; opacity: 1; transition: opacity 280ms ease; }
.screen.is-off { opacity: 0; pointer-events: none; visibility: hidden; }

/* ========== BOOT ========== */
#screen-boot {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: linear-gradient(#8fd0ff, #ffe7b8 70%, #f0c27a);
  z-index: 20;
}
.boot-logo { width: 360px; height: 240px; }
.boot-logo use { filter: drop-shadow(0 8px 0 rgba(0,0,0,.08)); }
.boot-bar {
  width: 420px; height: 18px; margin-top: 28px; border-radius: 999px;
  background: rgba(255,255,255,.45); overflow: hidden;
  box-shadow: inset 0 2px 6px rgba(0,0,0,.15);
}
.boot-bar > i {
  display: block; height: 100%; width: 0%;
  background: linear-gradient(90deg, #f08a2c, #ffd447);
  transition: width 200ms;
}
.boot-msg { margin-top: 14px; font-weight: 800; font-size: 28px; color: #5a2e08; }

/* ========== TITLE ========== */
#screen-title { z-index: 5; }

.sky-window {
  position: absolute; left: 210px; top: 28px; width: 1500px; height: 338px;
  border-radius: 28px 28px 18px 18px;
  box-shadow: inset 0 0 0 14px #f4e0b8, inset 0 0 0 22px #8a4e22,
    0 18px 0 rgba(80, 40, 10, .18);
  overflow: hidden; pointer-events: none;
}
.sky-window::before, .sky-window::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 70px; z-index: 2;
  background: linear-gradient(90deg, rgba(255, 120, 90, .55), rgba(255,120,90,0));
}
.sky-window::before { left: 0; }
.sky-window::after { right: 0; transform: scaleX(-1); }
.sky-window .sky {
  position: absolute; inset: 0;
  background: linear-gradient(#49b6ff 0%, #8ed4ff 55%, #ffe7a8 100%);
}
.sun-blob {
  position: absolute; right: 64px; top: 16px; width: 86px; height: 86px;
  border-radius: 50%; z-index: 0;
  background: radial-gradient(circle at 38% 36%, #fffce8, #ffd447 58%, #f0a020);
  box-shadow: 0 0 0 12px rgba(255,212,71,.28), 0 0 40px rgba(255,200,40,.55);
  animation: sun-pulse 3.2s ease-in-out infinite;
}
@keyframes sun-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}
.logo-clouds { position: absolute; inset: 0; z-index: 1; }
.logo-cloud {
  position: absolute; width: 220px; height: 146px;
  animation: cloud-drift 40s linear infinite;
  will-change: transform;
}
.logo-cloud svg { width: 100%; height: 100%; display: block; overflow: visible; }
/* 6 clouds, 40s, equal spacing → ≥3 always in the 1500px window */
.logo-cloud:nth-child(1) { top: 18px;  animation-delay: 0s; }
.logo-cloud:nth-child(2) { top: 92px;  animation-delay: -6.66s; }
.logo-cloud:nth-child(3) { top: 36px;  animation-delay: -13.33s; }
.logo-cloud:nth-child(4) { top: 140px; animation-delay: -20s; }
.logo-cloud:nth-child(5) { top: 58px;  animation-delay: -26.66s; }
.logo-cloud:nth-child(6) { top: 110px; animation-delay: -33.33s; }
@keyframes cloud-drift {
  from { transform: translateX(-240px); }
  to   { transform: translateX(1580px); }
}
.sill {
  position: absolute; left: 160px; top: 346px; width: 1600px; height: 40px;
  background:
    repeating-linear-gradient(90deg, transparent 0 56px, rgba(80,40,10,.1) 56px 58px),
    linear-gradient(#f3d08a, #c9844a 58%, #a05a28);
  border-radius: 10px;
  box-shadow: 0 12px 0 #6b3a18, inset 0 4px 0 rgba(255,255,255,.28);
  pointer-events: none; z-index: 2;
}

.kitchen-bits {
  position: absolute; inset: 0; pointer-events: none; z-index: 1;
}
.kitchen-bits .backsplash {
  position: absolute; left: 0; right: 0; top: 386px; height: 62px;
  background-color: #fff4dc;
  background-image:
    linear-gradient(#f0c27a 2px, transparent 2px),
    linear-gradient(90deg, #f0c27a 2px, transparent 2px),
    linear-gradient(#ffe7b8, #ffe7b8);
  background-size: 64px 36px, 64px 36px, 100% 100%;
  opacity: .82;
}
.kitchen-bits .counter-plank {
  position: absolute; left: 0; right: 0; top: 444px; height: 38px;
  background:
    repeating-linear-gradient(90deg, transparent 0 70px, rgba(80,40,10,.1) 70px 73px),
    linear-gradient(#e0a05a, #c9844a 42%, #8a4e22);
  box-shadow: 0 10px 0 #6b3a18, inset 0 4px 0 rgba(255,255,255,.22);
  z-index: 1;
}
.kitchen-bits .counter-front {
  position: absolute; left: 0; right: 0; top: 482px; height: 292px;
  background:
    repeating-linear-gradient(90deg, transparent 0 92px, rgba(80,40,10,.08) 92px 94px),
    linear-gradient(#d4924e, #c9844a 40%, #a05a28);
  box-shadow: inset 0 10px 0 rgba(80,40,10,.18);
}
.kitchen-bits .cabinets {
  position: absolute; left: 0; right: 0; bottom: 0; height: 306px;
  display: flex; gap: 12px; padding: 20px 48px 14px;
  background: linear-gradient(#8a4e22, #8a4e22 16px, #b56a32 16px);
}
.kitchen-bits .cabinets i {
  flex: 1; border-radius: 8px; position: relative;
  background: linear-gradient(180deg, #e0a05a, #c9844a 42%, #a86632);
  box-shadow: inset 0 0 0 4px #8a4e22, inset 0 6px 0 rgba(255,255,255,.16);
}
.kitchen-bits .cabinets i::after {
  content: ""; position: absolute; left: 50%; top: 22px;
  width: 16px; height: 16px; margin-left: -8px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ffe7b4, #c9844a);
  box-shadow: 0 2px 0 #6b3a18;
}
.fruit-cluster { position: absolute; left: 16px; top: 500px; width: 142px; height: 230px; }
.fruit-cluster::before {
  content: ""; position: absolute; left: 18px; bottom: 22px;
  width: 104px; height: 52px; border-radius: 12% 12% 48% 48%;
  background: linear-gradient(#7eb7e0, #3a7ab0);
  box-shadow: inset 0 8px 0 rgba(255,255,255,.28), 0 7px 0 #2a5578;
}
.fruit {
  position: absolute; display: block;
  animation: fruit-wobble 2.6s ease-in-out infinite;
}
.fruit.apple {
  left: 32px; top: 86px; width: 56px; height: 56px; border-radius: 50%;
  background: radial-gradient(circle at 30% 28%, #ff8a7a, #e23d3d 58%, #b91c1c);
  box-shadow: inset -6px -8px 0 rgba(0,0,0,.12); z-index: 2;
}
.fruit.apple::before {
  content: ""; position: absolute; left: 24px; top: -10px; width: 14px; height: 18px;
  background: #3d8b2e; border-radius: 40% 70% 40% 70%; transform: rotate(18deg);
}
.fruit.apple::after {
  content: ""; position: absolute; left: 26px; top: -6px; width: 4px; height: 12px;
  background: #5a2e08; border-radius: 2px;
}
.fruit.orange {
  left: 72px; top: 112px; width: 48px; height: 48px; border-radius: 50%;
  background: radial-gradient(circle at 32% 30%, #ffd080, #f08a2c 62%, #d46a10);
  animation-delay: .25s; z-index: 2;
}
.fruit.banana {
  left: 10px; top: 126px; width: 72px; height: 26px;
  border-radius: 50% 50% 50% 18% / 70% 70% 40% 40%;
  background: linear-gradient(#ffe37a, #f0c14a);
  transform: rotate(-28deg); animation-delay: .5s; z-index: 3;
}
.fruit.grape {
  left: 22px; top: 64px; width: 18px; height: 18px; border-radius: 50%;
  background: #7b3fa0; z-index: 2;
  box-shadow:
    16px 6px 0 #8b4fb3, 8px 16px 0 #6a2f90,
    24px 18px 0 #7b3fa0, 0 20px 0 #9a62c4;
  animation-delay: .15s;
}
.fruit.pear {
  left: 76px; top: 68px; width: 36px; height: 48px;
  border-radius: 50% 50% 46% 46% / 38% 38% 62% 62%;
  background: radial-gradient(circle at 35% 30%, #d4f07a, #8ed44a 60%, #5fbf4a);
  animation-delay: .4s; z-index: 2;
}
.fruit.pear::before {
  content: ""; position: absolute; left: 16px; top: -8px; width: 4px; height: 12px;
  background: #5a2e08; border-radius: 2px;
}
@keyframes fruit-wobble {
  0%, 100% { transform: rotate(-3deg); }
  50% { transform: rotate(4deg); }
}
.fruit.banana { animation-name: banana-wobble; }
@keyframes banana-wobble {
  0%, 100% { transform: rotate(-28deg); }
  50% { transform: rotate(-18deg); }
}
.cutlery { position: absolute; right: 22px; top: 488px; width: 110px; height: 220px; }
.cutlery .spoon, .cutlery .fork {
  position: absolute; left: 22px; top: 28px; width: 18px; height: 118px;
  background: linear-gradient(#f6f6f6, #c8c8c8);
  border-radius: 8px; transform-origin: 50% 100%;
  box-shadow: 2px 4px 0 rgba(60,30,10,.18);
}
.cutlery .spoon { transform: rotate(-16deg); left: 18px; }
.cutlery .spoon::before {
  content: ""; position: absolute; left: -12px; top: -34px;
  width: 42px; height: 48px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff, #c8c8c8);
  box-shadow: inset -4px -6px 0 rgba(0,0,0,.08);
}
.cutlery .fork { transform: rotate(18deg); left: 58px; top: 36px; }
.cutlery .fork::before {
  content: ""; position: absolute; left: -8px; top: -28px; width: 34px; height: 32px;
  background:
    linear-gradient(#c8c8c8, #c8c8c8) 0 22px / 100% 10px no-repeat,
    repeating-linear-gradient(90deg, #f6f6f6 0 6px, transparent 6px 9px);
  border-radius: 4px 4px 0 0;
}
.sparkles i {
  position: absolute; width: 14px; height: 14px; background: #fff8a8;
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
  animation: twinkle 1.7s ease-in-out infinite;
  filter: drop-shadow(0 0 4px #ffe37a);
}
.sparkles.win-spark { position: absolute; inset: 0; z-index: 2; }
.sparkles.win-spark i:nth-child(1) { left: 80px; top: 40px; animation-delay: 0s; }
.sparkles.win-spark i:nth-child(2) { left: 240px; top: 160px; animation-delay: .3s; }
.sparkles.win-spark i:nth-child(3) { left: 720px; top: 28px; animation-delay: .6s; }
.sparkles.win-spark i:nth-child(4) { left: 1100px; top: 180px; animation-delay: .15s; }
.sparkles.win-spark i:nth-child(5) { left: 1320px; top: 50px; animation-delay: .9s; }
.sparkles.win-spark i:nth-child(6) { left: 430px; top: 210px; animation-delay: .45s; }
.sparkles.kit-spark i:nth-child(1) { left: 90px; top: 470px; }
.sparkles.kit-spark i:nth-child(2) { left: 160px; top: 620px; animation-delay: .4s; }
.sparkles.kit-spark i:nth-child(3) { right: 80px; top: 500px; animation-delay: .7s; }
.sparkles.kit-spark i:nth-child(4) { right: 150px; top: 640px; animation-delay: .2s; }
.sparkles.kit-spark i:nth-child(5) { left: 50%; top: 430px; animation-delay: 1s; }
.sparkles.kit-spark i:nth-child(6) { left: 40%; top: 780px; animation-delay: .55s; }
@keyframes twinkle {
  0%, 100% { transform: scale(.6) rotate(0deg); opacity: .45; }
  50% { transform: scale(1.15) rotate(18deg); opacity: 1; }
}

.title-hero {
  position: absolute; left: 0; right: 0; top: 44px;
  display: flex; flex-direction: column; align-items: center; pointer-events: none;
  z-index: 4;
}
.hero-logo {
  width: 176px; height: 118px; margin: 0 0 10px; position: relative; z-index: 2;
  filter: drop-shadow(0 6px 0 rgba(0,0,0,.08));
}
.wordmark {
  margin: 0; display: flex; gap: 28px; align-items: flex-end; justify-content: center;
  position: relative; padding: 8px 90px 18px;
}
.wordmark .word { display: flex; }
.wordmark .ch {
  display: inline-block; font-size: 104px; line-height: .84; font-weight: 900;
  letter-spacing: -0.04em;
  color: #fff; -webkit-text-stroke: 10px #7a2f08;
  paint-order: stroke fill;
  text-shadow: 0 10px 0 #c45a12, 0 16px 0 rgba(80,30,0,.25);
  animation: letter-bounce 1.8s ease-in-out infinite;
}
.wordmark .ch:nth-child(2) { animation-delay: .08s; }
.wordmark .ch:nth-child(3) { animation-delay: .16s; }
.wordmark .ch:nth-child(4) { animation-delay: .24s; }
.wordmark .ch:nth-child(5) { animation-delay: .32s; }
@keyframes letter-bounce {
  0%, 100% { transform: translateY(0) rotate(var(--r, 0deg)); }
  50% { transform: translateY(-10px) rotate(var(--r, 0deg)); }
}
.tagline {
  margin: 10px 0 0; font-size: 30px; font-weight: 800; color: #5a2e08;
  letter-spacing: 0.22em; text-transform: uppercase;
  text-shadow: 0 2px 0 #fff;
}
.peekers { position: absolute; inset: 0; pointer-events: none; }
.peeker { position: absolute; width: 128px; height: 128px; }
.peeker[data-cat="protein"]  { left: -36px;  top: -18px; }
.peeker[data-cat="calcium"]  { right: -40px; top: -12px; }
.peeker[data-cat="fiber"]    { left: 8px;    bottom: 18px; }
.peeker[data-cat="vitamins"] { right: 8px;   bottom: 14px; }
.peeker[data-cat="factory"]  { left: 50%; margin-left: -64px; top: -72px; }

.selectors {
  position: absolute; left: 168px; right: 148px; top: 472px;
  display: grid; grid-template-columns: 1.4fr 1.05fr .85fr; gap: 18px;
  z-index: 3;
}
.sel-card {
  background: linear-gradient(#e8a85a, #c9844a);
  border-radius: 24px; padding: 10px 10px 12px;
  box-shadow: 0 10px 0 #6b3a18, inset 0 3px 0 rgba(255,255,255,.22);
  border: 0;
}
.sel-card h2 {
  margin: 0 auto 8px; font-size: 18px; letter-spacing: .12em; text-transform: uppercase;
  color: #fff8e4; text-align: center; text-shadow: 0 2px 0 #6b3a18;
}
.sel-row { display: flex; gap: 10px; justify-content: center; }
.sel-card.is-diff .sel-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
}
.choice {
  flex: 1; min-width: 72px; min-height: 214px; border: 0; border-radius: 22px;
  background: radial-gradient(circle at 50% 18%, #fffaf0, #ffe7b8 70%, #f3d08a);
  color: var(--ink); font-weight: 900; font-size: 22px;
  box-shadow: 0 7px 0 #8a4e22, inset 0 3px 0 rgba(255,255,255,.55);
  cursor: pointer; position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
}
.sel-card.is-diff .choice { min-height: 102px; }
.choice:active { transform: translateY(4px); box-shadow: 0 3px 0 #8a4e22; }
.choice.is-on {
  background: radial-gradient(circle at 50% 18%, #fffce0, #ffe08a 72%, #f0c14a);
  box-shadow: 0 8px 0 #c56a12, 0 0 0 5px #f08a2c, 0 0 22px rgba(255,180,40,.7);
  transform: translateY(-4px);
}
.choice.is-on:active { transform: translateY(2px); box-shadow: 0 4px 0 #c56a12, 0 0 0 5px #f08a2c; }
.choice small {
  font-size: 13px; font-weight: 800; line-height: 1.15; text-align: center;
  padding: 0 4px; color: #5a2e08;
}
.mini-boxes {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-end; gap: 8px;
}
.mini-boxes.n-4 {
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px 8px;
}
.mini-box {
  display: flex; flex-direction: column; align-items: center;
  width: 62px; background: none; border: 0; position: relative;
}
.mini-boxes.n-2 .mini-box { width: 76px; }
.mini-lid {
  display: block; width: 64px; height: 14px; position: relative;
  background: var(--lb);
  border: 2.5px solid #3a2414; border-radius: 6px 6px 2px 2px;
  box-shadow: inset 0 3px 0 rgba(255,255,255,.4);
}
.mini-boxes.n-2 .mini-lid { width: 78px; height: 16px; }
.mini-lid::after {
  content: ""; position: absolute; left: 50%; top: 4px;
  width: 14px; height: 8px; margin-left: -7px;
  background: #ffe08a; border: 2px solid #3a2414; border-radius: 2px;
}
.mini-body {
  display: block; width: 60px; height: 32px; margin-top: -2px;
  background: var(--lb);
  border: 2.5px solid #3a2414; border-radius: 2px 2px 8px 8px;
  box-shadow: inset 0 6px 0 rgba(255,255,255,.22), inset 0 -7px 0 rgba(0,0,0,.14);
}
.mini-boxes.n-2 .mini-body { width: 66px; height: 42px; }
.mini-name {
  margin-top: 3px; font-size: 11px; font-weight: 900; color: #3a2414;
  letter-spacing: -0.03em; white-space: nowrap; font-style: normal;
}
.choice.is-on .mini-box { animation: toy-pop 1.4s ease-in-out infinite; }
.toy-faces {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 2px;
}
.toy-face {
  width: 52px; height: 52px; object-fit: contain;
  filter: drop-shadow(0 3px 0 rgba(0,0,0,.16));
}
.toy-faces.n-3 .toy-face { width: 50px; height: 50px; margin: 0 -3px; }
.toy-faces.n-4 .toy-face { width: 48px; height: 48px; }
.toy-faces.n-5 .toy-face { width: 40px; height: 40px; }
.toy-faces.n-4 { width: 104px; }
.toy-faces.n-5 { width: 128px; }
.choice.is-on .toy-face { animation: toy-pop 1.4s ease-in-out infinite; }
.diff-pic {
  display: flex; align-items: flex-end; justify-content: center; gap: 3px;
  position: relative; min-height: 48px;
}
.diff-pic .star {
  width: 26px; height: 26px; background: #ffd447; display: block; flex: 0 0 auto;
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
  filter: drop-shadow(0 2px 0 #e09a2a);
}
.diff-pic.is-ramp { width: 92px; height: 56px; }
.diff-pic.is-ramp .ramp-board {
  position: absolute; left: 0; right: 0; bottom: 0; height: 100%;
  background: linear-gradient(to top right, #8a4e22 0 46%, transparent 47%);
  border-radius: 4px;
}
.diff-pic.is-ramp .star { position: relative; z-index: 1; }
.diff-pic.is-ramp .s1 { width: 14px; height: 14px; margin-bottom: 2px; }
.diff-pic.is-ramp .s2 { width: 20px; height: 20px; margin-bottom: 12px; }
.diff-pic.is-ramp .s3 { width: 26px; height: 26px; margin-bottom: 24px; }
.diff-pic.is-tier.t-1 .star { width: 36px; height: 36px; }
.diff-pic.is-tier.t-2 .star { width: 28px; height: 28px; }
.diff-pic.is-tier.t-3 .star { width: 22px; height: 22px; }
.choice.is-on .diff-pic { animation: toy-pop 1.4s ease-in-out infinite; }
@keyframes toy-pop {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

.entries {
  position: absolute; left: 0; right: 0; bottom: 36px;
  display: flex; justify-content: center; gap: 36px; z-index: 4;
}
.entries::before {
  content: ""; position: absolute; left: 220px; right: 220px; bottom: -18px;
  height: 18px; border-radius: 8px;
  background: linear-gradient(#e0a05a, #8a4e22);
  box-shadow: 0 6px 0 #6b3a18; z-index: -1;
}
.big-entry {
  min-width: 440px; min-height: 128px; border: 0; border-radius: 36px;
  font-size: 44px; font-weight: 900; color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 16px;
  letter-spacing: -0.02em; position: relative;
}
.big-entry.play {
  background: linear-gradient(#ffb03a, #f08a2c);
  box-shadow: 0 10px 0 #c56a12, 0 16px 24px rgba(197,106,18,.35);
}
.big-entry.learn {
  background: linear-gradient(#6ad0ff, #2f9adf);
  box-shadow: 0 10px 0 #1d6fa8, 0 16px 24px rgba(29,111,168,.3);
}
.big-entry:active { transform: translateY(6px); box-shadow: 0 4px 0 #8a4e22; }
.finger { font-size: 38px; filter: drop-shadow(0 2px 0 rgba(0,0,0,.2)); }

/* ========== WARMUP ========== */
#screen-warmup { z-index: 6; }
.warmup-bg {
  position: absolute; inset: 0;
  background: linear-gradient(#49b6ff 0 240px, #b8e4ff 240px, #ffe7a8 52%, #f3c27a 100%);
}
.warmup-bg::after {
  content: "";
  position: absolute; left: 0; right: 0; top: 292px; height: 22px;
  background:
    repeating-linear-gradient(90deg, transparent 0 56px, rgba(80,40,10,.1) 56px 58px),
    linear-gradient(#f3d08a, #c9844a 58%, #a05a28);
  box-shadow: 0 8px 0 #6b3a18, inset 0 3px 0 rgba(255,255,255,.28);
  pointer-events: none;
}
.warmup-head {
  position: absolute; top: 18px; left: 28px; right: 28px;
  display: flex; align-items: center; justify-content: space-between;
}
.warmup-head .logo-plain { width: 150px; height: 100px; }
.skip-btn {
  min-width: 160px; min-height: 80px; border: 0; border-radius: 20px;
  background: linear-gradient(#fffaf1, #f3d08a); color: #3a2414;
  font-weight: 900; font-size: 24px; cursor: pointer;
  box-shadow: 0 6px 0 #6b3a18, inset 0 3px 0 rgba(255,255,255,.45);
  border: 4px solid #8a4e22;
}
.skip-btn:active { transform: translateY(4px); box-shadow: 0 2px 0 #6b3a18; }
.warmup-stage {
  position: absolute; left: 160px; right: 160px; top: 120px; bottom: 160px;
  background: linear-gradient(#fffaf1, #fff4dc);
  border-radius: 36px;
  border: 10px solid #c9844a;
  box-shadow: 0 14px 0 #6b3a18, inset 0 4px 0 rgba(255,255,255,.45);
  display: flex; flex-direction: column; align-items: center;
  padding: 28px 40px;
}
.warmup-mascot { width: 380px; height: 380px; }
.warmup-names { text-align: center; }
.warmup-nick { font-size: 56px; font-weight: 900; margin: 0; }
.warmup-formal { font-size: 28px; margin: 4px 0 0; opacity: .75; }
.warmup-cue { font-size: 34px; font-weight: 800; margin: 10px 0 0; color: #7a3a10; }
.warmup-actions { margin-top: auto; display: flex; gap: 20px; }
.try-pill, .next-check {
  min-width: 220px; min-height: 80px; border: 0; border-radius: 24px;
  font-size: 32px; font-weight: 900; cursor: pointer; color: #fff;
}
.try-pill { background: #f08a2c; box-shadow: 0 6px 0 #c56a12; }
.next-check { background: #1f9d55; box-shadow: 0 6px 0 #146b39; }
.quick-call {
  font-size: 92px; font-weight: 900; margin-top: 40px; text-align: center;
  text-shadow: 0 6px 0 rgba(0,0,0,.08);
}

/* ========== GAME ========== */
#screen-game { z-index: 4; }
.game-header {
  position: absolute; left: 0; right: 0; top: 0; height: 78px;
  display: flex; align-items: center; padding: 0 18px;
  background: linear-gradient(rgba(255,250,241,.55), rgba(255,250,241,0));
  pointer-events: none; z-index: 6;
}
.game-header .logo-plain { width: 118px; height: 78px; flex: 0 0 auto; }
.logo-home {
  position: relative; width: 118px; height: 78px; flex: 0 0 auto;
  pointer-events: auto; z-index: 8;
}
.warmup-head .logo-home { width: 150px; height: 100px; }
.warmup-head .logo-home .logo-plain { width: 150px; height: 100px; }
.home-pop {
  position: absolute; left: 50%; top: 72px; transform: translateX(-50%) translateY(-6px);
  width: 56px; height: 56px; min-width: 56px; min-height: 56px;
  border: 0; border-radius: 16px; cursor: pointer;
  background: #fff6e8; color: #3a2414; font-size: 28px;
  box-shadow: 0 5px 0 #c9844a, 0 8px 16px rgba(0,0,0,.18);
  opacity: 0; pointer-events: none;
  transition: opacity 140ms ease, transform 140ms ease;
}
.warmup-head .home-pop { top: 92px; }
.logo-home:hover .home-pop,
.logo-home:focus-within .home-pop,
.logo-home.is-open .home-pop {
  opacity: 1; pointer-events: auto; transform: translateX(-50%) translateY(0);
}
.home-pop:active { transform: translateX(-50%) translateY(3px); box-shadow: 0 2px 0 #c9844a; }
.round-chip {
  margin-left: 16px; background: #fff; border-radius: 999px;
  padding: 8px 18px; font-weight: 800; font-size: 22px;
  box-shadow: 0 3px 0 #e2d0b4;
}
.pips { display: flex; gap: 6px; margin-left: 16px; }
.pip {
  width: 16px; height: 16px; border-radius: 50%; background: #e8d7be;
  box-shadow: inset 0 2px 0 rgba(255,255,255,.6);
}
.pip.is-in { background: #f08a2c; }
.pip.is-win { background: #1f9d55; }

.game-table {
  position: absolute; left: 120px; right: 120px; top: 400px; height: 168px;
  background:
    linear-gradient(#e8c27a, #c9844a 55%, #8a4e22);
  border-radius: 8px;
  box-shadow: 0 22px 0 #4a240e, inset 0 10px 0 rgba(255,230,180,.28);
  pointer-events: none; z-index: 1;
}
.lunch-row {
  position: absolute; top: 96px; right: 22px; display: flex; gap: 12px;
  pointer-events: none; z-index: 5;
}
.lunch-stack { display: flex; flex-direction: column; align-items: stretch; gap: 6px; }
.lunch-score {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  pointer-events: auto;
}
.score-btn {
  width: 44px; height: 44px; min-width: 44px; min-height: 44px;
  border: 0; border-radius: 12px; cursor: pointer;
  background: #fff6e8; color: #3a2414; font-size: 28px; font-weight: 900; line-height: 1;
  box-shadow: 0 4px 0 #8a4e22;
}
.score-btn:active { transform: translateY(2px); box-shadow: 0 2px 0 #8a4e22; }
.score-n {
  min-width: 28px; text-align: center; font-weight: 900; font-size: 22px; color: #3a2414;
  text-shadow: 0 1px 0 #fff;
}
.lunchbox {
  width: 168px; background: #fffef6; border-radius: 8px 8px 18px 18px;
  padding: 14px 8px 10px; box-shadow: var(--shadow);
  border: 4px solid #3a2414; position: relative;
}
.lunchbox::before {
  content: ""; position: absolute; left: 18px; right: 18px; top: -16px; height: 18px;
  border-radius: 10px 10px 4px 4px; background: var(--lid, #ccc);
  border: 4px solid #3a2414; border-bottom: 0;
}
.lunchbox .lb-label { text-align: center; font-weight: 900; font-size: 16px; margin-bottom: 6px; }
.lunch-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; min-height: 72px; }
.lunch-grid img {
  width: 100%; height: 34px; object-fit: contain;
  background: #fff8ec; border-radius: 6px;
}
.lunch-grid .slot {
  height: 34px; border-radius: 6px; background: repeating-linear-gradient(
    45deg, #f3e6d2, #f3e6d2 4px, #efe0c8 4px, #efe0c8 8px);
}

.wheel-wrap {
  position: absolute; left: 50%; top: 78px; width: 400px; height: 400px;
  margin-left: -200px; z-index: 3; pointer-events: none;
}
.wheel-wrap.is-off { display: none; }
.wheel-stand {
  position: absolute; left: 50%; bottom: -36px; width: 220px; height: 56px;
  margin-left: -110px; border-radius: 12px 12px 20px 20px;
  background: linear-gradient(#a05a28, #6b3a18);
  box-shadow: 0 10px 0 #3d200c;
}
#wheel-2d {
  width: 400px; height: 400px; border-radius: 50%;
  box-shadow: 0 0 0 14px #f0c14a, 0 0 0 22px #8a4e22, 0 18px 28px rgba(0,0,0,.28);
  background: #fff6e0;
  transform: rotate(0deg);
  will-change: transform;
}
#wheel-2d canvas { width: 100%; height: 100%; border-radius: 50%; display: block; }
.wheel-hub {
  position: absolute; left: 50%; top: 50%; width: 54px; height: 54px;
  margin: -27px 0 0 -27px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff, #ffe08a 55%, #c9844a);
  box-shadow: 0 4px 0 #8a4e22;
  z-index: 2;
}
.wheel-pointer {
  position: absolute; left: 50%; top: 54px; width: 0; height: 0;
  margin-left: -22px; z-index: 4; pointer-events: none;
  border-left: 22px solid transparent; border-right: 22px solid transparent;
  border-top: 48px solid #ff3b3b;
  filter: drop-shadow(0 4px 0 rgba(0,0,0,.2));
}
.wheel-pointer::after {
  content: ""; position: absolute; left: -8px; top: -48px;
  width: 16px; height: 16px; background: #fff; border-radius: 50%;
  box-shadow: 0 0 0 4px #ff3b3b;
}

.food-card {
  position: absolute; left: 50%; top: 210px; width: 360px; margin-left: -180px;
  background: #fffef8; border-radius: 28px; padding: 16px 16px 20px;
  border: 6px solid #8a4e22;
  box-shadow: 0 12px 0 #6b3a18, var(--shadow);
  text-align: center; z-index: 5; transform: scale(.4); opacity: 0;
  pointer-events: none;
}
.food-card.is-on { animation: card-pop 480ms cubic-bezier(.2,1.4,.4,1) forwards; }
.food-card img { width: 100%; height: 240px; object-fit: contain; }
.food-card .food-name { font-size: 40px; font-weight: 900; margin: 8px 0 0; }
@keyframes card-pop {
  0% { transform: scale(.4); opacity: 0; }
  70% { transform: scale(1.06); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

.showme {
  position: absolute; left: 16px; top: 86px; width: 520px;
  text-align: center; z-index: 8; pointer-events: none; opacity: 0;
  transform: translateX(-16px);
  display: flex; flex-direction: column; align-items: stretch; gap: 10px;
}
.showme.is-on { opacity: 1; transform: translateX(0); transition: opacity 180ms, transform 180ms; }
.call-banner {
  background: linear-gradient(#fffaf1, #ffe7b8);
  border: 6px solid #8a4e22;
  border-radius: 24px;
  box-shadow: 0 8px 0 #6b3a18, inset 0 3px 0 rgba(255,255,255,.55);
  padding: 10px 16px 12px;
  text-align: center;
}
.showme h2 {
  margin: 0; font-size: 64px; font-weight: 900; line-height: 1;
  color: #7a2f08; letter-spacing: -0.03em;
  text-shadow: 0 3px 0 #fff8e4;
}
.showme.is-on h2 { animation: showme-party .55s ease-in-out infinite alternate; }
@keyframes showme-party {
  from { transform: rotate(-2deg) scale(1); }
  to { transform: rotate(2deg) scale(1.04); }
}
.timer-ring { width: 72px; height: 72px; margin: 6px auto 0; }
.timer-ring circle { fill: none; stroke-width: 10; }
.timer-ring .track { stroke: #f0c14a; }
.timer-ring .val { stroke: #f08a2c; stroke-linecap: round; transform: rotate(-90deg); transform-origin: 50% 50%; }
.showme.is-on .timer-ring { animation: timer-pulse .7s ease-in-out infinite; }
@keyframes timer-pulse {
  0%,100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}
.showme-cue {
  margin: 6px 0 0; font-size: 26px; font-weight: 800; color: #5a2e08;
}
.showme-party {
  position: relative; left: auto; top: auto; width: auto;
  display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-end;
  gap: 4px; margin: 0; padding: 8px 8px 10px;
  background: linear-gradient(#fffaf1, #f3d08a);
  border-radius: 22px;
  box-shadow: 0 8px 0 #6b3a18, inset 0 3px 0 rgba(255,255,255,.4);
  border: 5px solid #8a4e22;
}
.showme-dancer {
  width: 92px; height: 92px; flex: 0 0 auto;
  animation: dancer-bob .9s ease-in-out infinite;
}
.showme-dancer:nth-child(2) { animation-delay: .08s; }
.showme-dancer:nth-child(3) { animation-delay: .16s; }
.showme-dancer:nth-child(4) { animation-delay: .24s; }
.showme-dancer:nth-child(5) { animation-delay: .32s; }
@keyframes dancer-bob {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.go-flash {
  position: absolute; left: 16px; top: 86px; width: 520px; margin-left: 0;
  text-align: center; z-index: 6; pointer-events: none; opacity: 0;
  font-size: inherit; font-weight: inherit; color: inherit;
  -webkit-text-stroke: 0;
}
.go-flash .go-banner {
  background: linear-gradient(#8ee06a, #1f9d55);
  border-color: #146b39;
  box-shadow: 0 8px 0 #0d4a26, inset 0 3px 0 rgba(255,255,255,.35);
  color: #fff;
  font-size: 84px; font-weight: 900; line-height: 1;
  letter-spacing: 0.04em;
  text-shadow: 0 5px 0 #0d4a26;
  padding: 22px 18px;
}
.go-flash.is-on { animation: go-pop 700ms ease forwards; }
@keyframes go-pop {
  0% { opacity: 0; transform: scale(.72); }
  28% { opacity: 1; transform: scale(1.06); }
  78% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1); }
}

.deck {
  position: absolute; left: 0; right: 0; top: var(--reach-top); bottom: 0;
  padding: 6px 12px 8px; display: flex; gap: 10px;
  background: linear-gradient(rgba(80,40,10,0), rgba(80,40,10,.28) 18%, rgba(62,32,12,.55));
  z-index: 7;
  --pad-size: 110px;
}
.team-col {
  --team: #e23d3d;
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; gap: 4px;
  border-radius: 22px; padding: 6px 8px 8px;
  background:
    linear-gradient(180deg, #fff6e0, #f0d9a8);
  box-shadow:
    inset 0 0 0 7px var(--team),
    inset 0 0 0 11px #5a3a18,
    0 8px 0 rgba(0,0,0,.22);
}
.team-col[data-team="0"] { --team: #e23d3d; }
.team-col[data-team="1"] { --team: #2f6bff; }
.team-col[data-team="2"] { --team: #e6b422; }
.team-col[data-team="3"] { --team: #1f9d55; }
.team-col .col-label {
  text-align: center; font-weight: 900; font-size: 18px; line-height: 1.15;
  color: #3a2414; letter-spacing: .02em;
  flex: 0 0 auto;
  background: var(--team); color: #fff; border-radius: 999px;
  margin: 0 auto 2px; padding: 2px 14px;
}
.pad-grid {
  flex: 1; min-height: 0;
  display: grid;
  grid-template-columns: repeat(2, var(--pad-size));
  justify-content: center;
  align-content: center;
  justify-items: center;
  align-items: start;
  gap: 4px 16px;
}
.cat-btn {
  appearance: none; border: 0; background: transparent; padding: 0;
  width: var(--pad-size); min-width: 80px; min-height: 80px;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  cursor: pointer; touch-action: none; position: relative; color: inherit;
}
.cat-btn:last-child:nth-child(odd) {
  grid-column: 1 / -1; justify-self: center;
}
.cat-btn[data-cat="protein"]  { --cap: #F08A2C; --ink: #5A2E08; --cap-side: #b35f14; --well: #1a1008; }
.cat-btn[data-cat="calcium"]  { --cap: #F4E4C1; --ink: #1F4E72; --cap-side: #c4ae86; --well: #2E7DA6; }
.cat-btn[data-cat="fiber"]    { --cap: #5FBF4A; --ink: #1C4A14; --cap-side: #3a8a28; --well: #1a1008; }
.cat-btn[data-cat="vitamins"] { --cap: #FFD447; --ink: #6A4A00; --cap-side: #c9a018; --well: #1a1008; }
.cat-btn[data-cat="factory"]  { --cap: #B388EB; --ink: #3B1D63; --cap-side: #7a54b8; --well: #1a1008; }
.cat-btn .pad {
  position: relative;
  width: var(--pad-size); height: var(--pad-size);
  min-width: 80px; min-height: 80px;
  flex: 0 0 var(--pad-size);
  filter: drop-shadow(0 7px 8px rgba(0,0,0,.32));
}
.cat-btn .bezel {
  display: block; position: absolute; inset: 0; border-radius: 50%;
  padding: 0;
  background:
    radial-gradient(circle at 32% 22%, rgba(255,255,255,.28), transparent 34%),
    conic-gradient(from 200deg, #2a1c12, #7a6554, #1a120c, #5a4638, #120c08, #3a2a1e, #2a1c12);
  box-shadow:
    0 5px 0 #0c0806,
    inset 0 3px 2px rgba(255,255,255,.26),
    inset 0 -4px 5px rgba(0,0,0,.5);
}
.cat-btn .bezel::before {
  content: ""; position: absolute; inset: 11%; border-radius: 50%;
  background:
    radial-gradient(circle at 50% 80%, rgba(0,0,0,.35), transparent 52%),
    radial-gradient(circle at 50% 40%, var(--well, #1a1008), #0c0806 78%);
  box-shadow:
    inset 0 6px 8px rgba(0,0,0,.55),
    inset 0 -2px 0 rgba(255,255,255,.06);
}
.cat-btn[data-cat="calcium"] .bezel {
  background:
    radial-gradient(circle at 32% 22%, rgba(255,255,255,.3), transparent 34%),
    conic-gradient(from 200deg, #16384c, #5aa0c0, #0f2a38, #2E7DA6, #102830, #3a6a80, #16384c);
}
.cat-btn .cap {
  display: flex; align-items: center; justify-content: center;
  position: absolute; inset: 12%; border-radius: 50%;
  background:
    radial-gradient(circle at 32% 26%, rgba(255,255,255,.58) 0 14%, transparent 40%),
    radial-gradient(circle at 50% 112%, rgba(0,0,0,.26), transparent 44%),
    var(--cap);
  color: var(--ink);
  transform: translateY(-5px);
  overflow: hidden;
  box-shadow:
    0 7px 0 var(--cap-side),
    inset 0 -12px 14px rgba(0,0,0,.22),
    inset 0 10px 12px rgba(255,255,255,.34);
}
.cat-btn .cap::after {
  content: ""; position: absolute; left: 14%; right: 28%; top: 6%; height: 30%;
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(255,255,255,.72), rgba(255,255,255,.1) 72%, transparent);
  pointer-events: none;
}
.cat-btn.is-down .cap {
  transform: translateY(5px);
  box-shadow:
    0 1px 0 var(--cap-side),
    inset 0 -8px 10px rgba(0,0,0,.26),
    inset 0 6px 8px rgba(255,255,255,.26);
}
.cat-btn.is-spring .cap { animation: cap-spring 280ms cubic-bezier(.2,1.6,.4,1); }
@keyframes cap-spring {
  0% { transform: translateY(5px); }
  60% { transform: translateY(-7px); }
  100% { transform: translateY(-4px); }
}
.cat-btn.is-off { filter: saturate(.55) brightness(.92); }
.cat-btn .m-slot {
  width: 70%; height: 70%; flex: 0 0 auto; position: relative; z-index: 1;
}
.cat-btn .name-plate {
  display: flex; flex-direction: column; align-items: center;
  min-width: 72px; max-width: calc(var(--pad-size) + 10px);
  padding: 2px 7px 3px; border-radius: 9px;
  background: linear-gradient(#fffaf0, #efe0c4);
  box-shadow: 0 2px 0 rgba(40,20,8,.28), inset 0 1px 0 #fff;
  color: #2a1a10;
}
.cat-btn .nick {
  font-weight: 900; font-size: 13px; line-height: 1.05; text-align: center;
  white-space: nowrap;
}
.cat-btn .formal {
  font-size: 10px; font-weight: 700; line-height: 1.05; opacity: .72; text-align: center;
  white-space: nowrap;
}
.cat-btn .finger-mini {
  position: absolute; right: 9%; top: 7%; font-size: 17px; z-index: 2; line-height: 1;
}
.deck-legend {
  position: absolute; left: 16px; top: -28px; font-weight: 800; font-size: 16px;
  color: #fff; text-shadow: 0 2px 0 rgba(0,0,0,.3);
}

.teacher {
  position: absolute; top: 8px; left: 280px; right: auto; z-index: 12;
  display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 4px;
  max-width: 520px; max-height: 72px; overflow: hidden; opacity: .72;
}
.teacher button {
  min-width: 44px; min-height: 32px; padding: 4px 8px; border: 1px solid #6a5a4a;
  background: #4a4038; color: #d8d0c8; font-size: 12px; border-radius: 4px; cursor: pointer;
}
.teacher button:hover { opacity: 1; background: #5a5048; }
.teacher.is-open { opacity: 1; }

.hint-toast {
  position: absolute; left: 50%; bottom: 448px; transform: translateX(-50%);
  background: #fffef8; border-radius: 18px; padding: 12px 22px; font-size: 26px;
  font-weight: 800; box-shadow: var(--shadow); z-index: 7; opacity: 0;
  pointer-events: none; max-width: 900px; text-align: center;
  transition: opacity 140ms ease;
}
.hint-toast.is-on { opacity: 1; }

.mascot-payoff {
  position: absolute; left: 50%; top: 108px; width: 380px; margin-left: -190px;
  z-index: 10; pointer-events: none; opacity: 0; transform: scale(.8);
  text-align: center; height: 400px;
}
.mascot-payoff.is-on {
  opacity: 1; transform: scale(1);
  animation: payoff-pop 1.2s cubic-bezier(.2,1.5,.4,1) forwards;
}
.mascot-payoff .mascot-svg { height: 280px; }
.payoff-nick {
  margin: 0; font-size: 44px; font-weight: 900; color: #fff;
  -webkit-text-stroke: 6px #7a2f08; paint-order: stroke fill;
  text-shadow: 0 5px 0 #c45a12;
}
.payoff-burst { position: absolute; inset: -8px -6px 70px; pointer-events: none; }
.payoff-burst i {
  position: absolute; width: 16px; height: 16px; background: #fff6b0;
  clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
  animation: spark-pop 1.1s ease-out forwards;
  box-shadow: 0 0 8px #ffe08a;
}
.payoff-burst i:nth-child(1) { left: 6%; top: 16%; }
.payoff-burst i:nth-child(2) { left: 88%; top: 12%; animation-delay: .05s; }
.payoff-burst i:nth-child(3) { left: 14%; top: 58%; animation-delay: .1s; }
.payoff-burst i:nth-child(4) { left: 80%; top: 62%; animation-delay: .08s; }
.payoff-burst i:nth-child(5) { left: 46%; top: 2%; animation-delay: .12s; }
.payoff-burst i:nth-child(6) { left: 2%; top: 38%; animation-delay: .16s; }
.payoff-burst i:nth-child(7) { left: 94%; top: 40%; animation-delay: .14s; }
.payoff-burst i:nth-child(8) { left: 70%; top: 4%; animation-delay: .18s; background: #fff; }
@keyframes spark-pop {
  0% { transform: scale(0) rotate(0); opacity: 0; }
  28% { transform: scale(1.35) rotate(24deg); opacity: 1; }
  100% { transform: scale(.55) rotate(80deg); opacity: 0; }
}
@keyframes payoff-pop {
  0% { transform: scale(.7); opacity: 0; }
  22% { transform: scale(1.08); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

/* ========== COMPLETE — curtain-call dance party ========== */
#screen-complete {
  z-index: 8;
  --win: #e23d3d;
  overflow: hidden;
  background:
    radial-gradient(ellipse 64% 50% at 50% 34%, #fff8d0 0%, transparent 58%),
    radial-gradient(ellipse 46% 38% at 50% 42%, var(--win) 0%, transparent 72%),
    linear-gradient(#49b6ff 0 240px, #b8e4ff 240px, #ffe7a8 52%, #f0c27a 74%, #c9844a 100%);
}
#screen-complete::before {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0; height: 268px;
  background: linear-gradient(#8a4e22 0%, #6b3a18 46%, #3d200c 100%);
  pointer-events: none; z-index: 0;
}
#screen-complete .win-glow {
  position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(ellipse 38% 28% at 50% 46%, var(--win) 0%, transparent 70%),
    radial-gradient(ellipse 70% 18% at 50% 72%, rgba(255, 220, 120, .45), transparent 70%);
  animation: win-glow-pulse 1.8s ease-in-out infinite;
}
@keyframes win-glow-pulse {
  0%, 100% { opacity: .85; }
  50% { opacity: 1; }
}
#screen-complete .win-valance {
  position: absolute; left: 0; right: 0; top: 0; height: 64px; z-index: 5;
  pointer-events: none;
  background:
    linear-gradient(#d4a017, #f0c14a 40%, #b8860b);
  box-shadow: 0 8px 0 #7a4e10;
}
#screen-complete .win-valance::after {
  content: ""; position: absolute; left: 0; right: 0; top: 64px; height: 28px;
  background:
    radial-gradient(circle at 50% 0, #f0c14a 14px, transparent 15px) 0 0 / 48px 28px;
}
#screen-complete .win-curtain {
  position: absolute; top: 0; bottom: 0; width: 150px; z-index: 5;
  pointer-events: none;
  background:
    repeating-linear-gradient(
      90deg,
      #9e1830 0 16px,
      #c41e3a 16px 26px,
      #e24a58 26px 30px,
      #b01c34 30px 46px
    );
}
#screen-complete .win-curtain.left {
  left: 0;
  border-radius: 0 0 86% 0 / 0 0 36% 0;
  box-shadow: inset -14px 0 0 #f0c14a, 16px 0 28px rgba(0,0,0,.28);
}
#screen-complete .win-curtain.right {
  right: 0;
  border-radius: 0 0 0 86% / 0 0 0 36%;
  box-shadow: inset 14px 0 0 #f0c14a, -16px 0 28px rgba(0,0,0,.28);
}
#screen-complete .win-floor {
  position: absolute; left: 70px; right: 70px; top: 732px; height: 90px; z-index: 1;
  pointer-events: none;
  border-radius: 50%;
  background:
    repeating-linear-gradient(90deg, #b8743c 0 36px, #d49254 36px 72px);
  box-shadow:
    0 16px 0 #6b3a18,
    0 0 60px var(--win),
    inset 0 10px 0 rgba(80, 40, 10, .22);
}
#screen-complete .win-floor .lights {
  position: absolute; left: 8%; right: 8%; bottom: -18px;
  display: flex; justify-content: space-between;
}
#screen-complete .win-floor .lights i {
  width: 18px; height: 18px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff, var(--win));
  box-shadow: 0 0 14px var(--win), 0 0 28px #ffe08a;
}
#screen-complete .win-sparkles {
  position: absolute; inset: 0; pointer-events: none; z-index: 4;
}
#screen-complete .win-sparkles i {
  position: absolute; width: 16px; height: 16px;
  background: #fffbe8;
  clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
  animation: win-twinkle 1.3s ease-in-out infinite;
  filter: drop-shadow(0 0 6px #fff);
}
#screen-complete .win-sparkles i:nth-child(1)  { left: 18%; top: 22%; animation-delay: 0s; }
#screen-complete .win-sparkles i:nth-child(2)  { left: 78%; top: 20%; animation-delay: .15s; }
#screen-complete .win-sparkles i:nth-child(3)  { left: 28%; top: 48%; animation-delay: .3s; }
#screen-complete .win-sparkles i:nth-child(4)  { left: 70%; top: 46%; animation-delay: .45s; }
#screen-complete .win-sparkles i:nth-child(5)  { left: 12%; top: 62%; animation-delay: .2s; }
#screen-complete .win-sparkles i:nth-child(6)  { left: 86%; top: 60%; animation-delay: .55s; }
#screen-complete .win-sparkles i:nth-child(7)  { left: 40%; top: 16%; animation-delay: .1s; }
#screen-complete .win-sparkles i:nth-child(8)  { left: 58%; top: 14%; animation-delay: .4s; }
#screen-complete .win-sparkles i:nth-child(9)  { left: 22%; top: 34%; width: 11px; height: 11px; animation-delay: .25s; }
#screen-complete .win-sparkles i:nth-child(10) { left: 74%; top: 32%; width: 11px; height: 11px; animation-delay: .6s; }
#screen-complete .win-sparkles i:nth-child(11) { left: 48%; top: 52%; animation-delay: .05s; }
#screen-complete .win-sparkles i:nth-child(12) { left: 34%; top: 68%; width: 12px; height: 12px; animation-delay: .35s; }
#screen-complete .win-sparkles i:nth-child(13) { left: 64%; top: 66%; width: 12px; height: 12px; animation-delay: .5s; }
#screen-complete .win-sparkles i:nth-child(14) { left: 8%;  top: 40%; animation-delay: .7s; }
#screen-complete .win-sparkles i:nth-child(15) { left: 90%; top: 38%; animation-delay: .18s; }
#screen-complete .win-sparkles i:nth-child(16) { left: 52%; top: 28%; width: 10px; height: 10px; animation-delay: .8s; }
#screen-complete .win-sparkles i:nth-child(17) { left: 16%; top: 78%; animation-delay: .22s; }
#screen-complete .win-sparkles i:nth-child(18) { left: 82%; top: 76%; animation-delay: .48s; }
#screen-complete .win-sparkles i:nth-child(19) { left: 44%; top: 8%;  width: 13px; height: 13px; animation-delay: .12s; }
#screen-complete .win-sparkles i:nth-child(20) { left: 62%; top: 8%;  width: 13px; height: 13px; animation-delay: .62s; }
@keyframes win-twinkle {
  0%, 100% { transform: scale(.55) rotate(0); opacity: .45; }
  50% { transform: scale(1.2) rotate(18deg); opacity: 1; }
}

#screen-complete .win-logo {
  position: absolute; top: 6px; left: 50%; width: 176px; height: 118px;
  margin-left: -88px; z-index: 6;
  /* Official mark, unframed — PNG already carries clear space */
}
#screen-complete .win-banner {
  position: absolute; top: 112px; left: 160px; right: 160px; z-index: 6;
  margin: 0; text-align: center;
  font-size: 76px; font-weight: 900; line-height: 1; color: #fff;
  -webkit-text-stroke: 8px #7a2f08; paint-order: stroke fill;
  text-shadow: 0 8px 0 #c45a12, 0 0 22px var(--win);
  animation: win-banner-pop .7s cubic-bezier(.2, 1.4, .4, 1) both;
}
@keyframes win-banner-pop {
  0% { transform: scale(.6); opacity: 0; }
  70% { transform: scale(1.06); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

#screen-complete .win-hero {
  position: absolute; left: 50%; top: 186px; width: 900px; height: 248px;
  margin-left: -450px; z-index: 4; pointer-events: none;
}
#screen-complete .dancer-row {
  position: absolute; left: -80px; right: -80px; bottom: 72px;
  display: flex; justify-content: center; align-items: flex-end;
  gap: 6px; height: 156px; z-index: 2;
}
#screen-complete .win-food {
  width: 104px; height: 104px; object-fit: contain; flex: 0 0 auto;
  filter: drop-shadow(0 8px 0 rgba(40, 16, 8, .22));
  animation: win-food-dance .72s ease-in-out infinite;
  animation-delay: calc(var(--i, 0) * .08s);
  transform-origin: 50% 90%;
}
#screen-complete .win-hero[data-n="1"] .win-food { width: 168px; height: 168px; }
#screen-complete .win-hero[data-n="2"] .win-food,
#screen-complete .win-hero[data-n="3"] .win-food { width: 132px; height: 132px; }
#screen-complete .win-hero[data-n="4"] .win-food,
#screen-complete .win-hero[data-n="5"] .win-food { width: 114px; height: 114px; }
#screen-complete .win-hero[data-n="6"] .win-food,
#screen-complete .win-hero[data-n="7"] .win-food,
#screen-complete .win-hero[data-n="8"] .win-food { width: 92px; height: 92px; }
@keyframes win-food-dance {
  0%, 100% { transform: translateY(0) rotate(-8deg) scale(1); }
  40% { transform: translateY(-22px) rotate(8deg) scale(1.1); }
  70% { transform: translateY(-6px) rotate(-4deg) scale(1.04); }
}

#screen-complete .open-lunch {
  position: relative; width: 460px; height: 248px; margin: 0 auto;
}
#screen-complete .open-lunch .lid {
  position: absolute; left: 36px; right: 36px; bottom: 118px; height: 92px;
  transform-origin: 50% 100%; z-index: 0;
  animation: win-lid-open .7s cubic-bezier(.2, 1.15, .4, 1) both;
}
#screen-complete .open-lunch .lid-face {
  display: block; height: 100%;
  border-radius: 20px 20px 6px 6px;
  background: linear-gradient(#fff6e8, #ffe0b0);
  box-shadow: 0 0 0 8px var(--win), 0 -6px 0 #2a1208, 0 0 24px var(--win);
}
#screen-complete .open-lunch .handle {
  position: absolute; left: 50%; top: 10px; width: 88px; height: 22px;
  margin-left: -44px; border-radius: 12px;
  border: 6px solid #f0c14a; background: transparent;
  box-shadow: 0 2px 0 #7a4e10;
}
@keyframes win-lid-open {
  0% { transform: perspective(520px) rotateX(10deg) translateY(48px); }
  100% { transform: perspective(520px) rotateX(-56deg) translateY(-6px); }
}
#screen-complete .open-lunch .box {
  position: absolute; left: 0; right: 0; bottom: 0; height: 112px; z-index: 1;
  border-radius: 18px 18px 28px 28px;
  background: var(--win);
  box-shadow: 0 10px 0 #2a1208, 0 0 28px var(--win);
}
#screen-complete .open-lunch .well {
  display: block; position: absolute; left: 14px; right: 14px; top: 10px; bottom: 16px;
  border-radius: 10px 10px 18px 18px;
  background: linear-gradient(#3a2414, #6a4a28);
  box-shadow: inset 0 8px 0 rgba(0,0,0,.25);
}
#screen-complete .open-lunch .latch {
  position: absolute; left: 50%; bottom: 6px; width: 36px; height: 18px;
  margin-left: -18px; border-radius: 6px; background: #f0c14a;
  box-shadow: 0 2px 0 #7a4e10;
}
#screen-complete .win-hero[data-n="0"] .well {
  background:
    radial-gradient(circle at 50% 40%, #ffe08a, transparent 42%),
    linear-gradient(#3a2414, #6a4a28);
}

#screen-complete .chorus {
  position: absolute; left: 80px; right: 80px; top: 400px; height: 340px;
  display: flex; justify-content: center; align-items: flex-end;
  gap: 0; z-index: 3; pointer-events: none;
  background: none; padding: 0; border-radius: 0;
}
#screen-complete .chorus .mascot-wrap {
  width: 280px; height: 320px; flex: 0 0 auto; margin: 0 -18px;
  animation: win-chorus 1.55s ease-in-out infinite;
  animation-delay: calc(var(--i, 0) * .12s);
  filter: drop-shadow(0 14px 0 rgba(20, 8, 16, .28));
}
#screen-complete .chorus .mascot-wrap .mascot-svg {
  width: 100%; height: 100%;
}
@keyframes win-chorus {
  0%, 100% { transform: translateY(0) rotate(0); }
  28% { transform: translateY(-18px) rotate(-4deg); }
  50% { transform: translateY(6px) scale(1.04, .95) rotate(0); }
  74% { transform: translateY(-12px) rotate(4deg); }
}
#screen-complete .chorus .mascot-wrap.is-factory {
  animation: win-factory-joy .85s ease-in-out infinite;
}
@keyframes win-factory-joy {
  0%, 100% { transform: translateY(0) scale(1) rotate(-3deg); }
  35% { transform: translateY(-26px) scale(1.14) rotate(5deg); }
  62% { transform: translateY(-4px) scale(1.06) rotate(-2deg); }
}

#screen-complete .standings {
  position: absolute; left: 220px; right: 220px; top: 800px; height: 70px;
  display: flex; gap: 10px; justify-content: center; align-items: stretch;
  z-index: 6;
}
#screen-complete .stand-card {
  flex: 0 1 auto; min-width: 148px; max-width: 260px;
  background: linear-gradient(#fffaf1, #ffe7b8);
  border: 3px solid #8a4e22;
  border-radius: 14px;
  padding: 5px 10px 6px; box-shadow: 0 4px 0 #6b3a18;
}
#screen-complete .stand-card.is-win {
  box-shadow: 0 0 0 3px var(--win), 0 3px 0 rgba(20, 8, 16, .25);
}
#screen-complete .stand-card h3 {
  margin: 0 0 3px; text-align: center; font-size: 14px; font-weight: 900;
  color: var(--team, #2a1a10); letter-spacing: .02em;
}
#screen-complete .stand-foods {
  display: flex; flex-wrap: nowrap; gap: 2px; justify-content: center;
  min-height: 26px; align-items: center;
}
#screen-complete .stand-foods img {
  width: 26px; height: 26px; object-fit: contain; flex: 0 0 auto;
}

#screen-complete .win-actions {
  position: absolute; bottom: 22px; left: 0; right: 0; z-index: 7;
  display: flex; justify-content: center; gap: 24px;
}
#screen-complete .win-actions button {
  min-width: 300px; min-height: 92px; border: 0; border-radius: 24px;
  font-size: 32px; font-weight: 900; color: #fff; cursor: pointer;
}
#screen-complete .win-actions .again { background: #f08a2c; box-shadow: 0 8px 0 #c56a12; }
#screen-complete .win-actions .home { background: #2f6bff; box-shadow: 0 8px 0 #1c48b4; }
#screen-complete .win-actions button:active { transform: translateY(4px); box-shadow: 0 4px 0 #2a1208; }

@media (prefers-reduced-motion: reduce) {
  #screen-complete .win-glow,
  #screen-complete .win-sparkles i,
  #screen-complete .win-banner { animation: none; }
  #screen-complete .open-lunch .lid { animation: none; transform: perspective(520px) rotateX(-56deg) translateY(-6px); }
}

/* ========== FX / OVERLAYS ========== */
#fx-layer { position: absolute; inset: 0; pointer-events: none; z-index: 15; overflow: hidden; }
.flyer {
  position: absolute; width: 120px; height: 120px; object-fit: contain;
  offset-path: none; will-change: transform, left, top;
}
.confetti-bit {
  position: absolute; width: 12px; height: 18px; border-radius: 2px;
  will-change: transform, opacity;
}
.spark {
  position: absolute; width: 10px; height: 10px; background: #fff6b0;
  border-radius: 50%; box-shadow: 0 0 8px #fff;
}

#lock-card {
  position: absolute; inset: 0; background: rgba(20,12,8,.55);
  display: flex; align-items: center; justify-content: center; z-index: 30;
}
#lock-card.is-off { display: none; }
#lock-card .card {
  background: #fffef8; padding: 36px 64px; border-radius: 28px;
  font-size: 56px; font-weight: 900; box-shadow: var(--shadow);
}

#settings {
  position: absolute; inset: 0; background: rgba(20,12,8,.5);
  display: flex; align-items: center; justify-content: center; z-index: 28;
}
#settings.is-off { display: none; }
#settings .panel {
  width: 980px; max-height: 920px; overflow: auto; background: #f4efe6;
  border-radius: 16px; padding: 20px 24px 24px; color: #2a1a10;
  box-shadow: var(--shadow);
}
#settings h3 { margin: 0 0 12px; }
.set-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; }
.set-grid label { display: flex; flex-direction: column; font-size: 13px; font-weight: 700; gap: 4px; }
.set-grid input, .set-grid select, .set-grid textarea {
  font: inherit; padding: 6px 8px; border-radius: 8px; border: 1px solid #c8b8a0;
}
.set-actions { margin-top: 16px; display: flex; gap: 10px; justify-content: flex-end; }
.set-actions button { min-height: 44px; min-width: 100px; border-radius: 10px; border: 0; font-weight: 800; cursor: pointer; }

.shrug {
  position: absolute; left: 50%; top: 176px; width: 200px; margin-left: -100px;
  z-index: 8; opacity: 0; pointer-events: none;
}
.shrug.is-on { animation: shrug-wobble 700ms ease; }
@keyframes shrug-wobble {
  0% { opacity: 0; transform: rotate(0) translateY(0); }
  22% { opacity: 1; transform: rotate(-6deg) translateY(-6px); }
  50% { transform: rotate(6deg) translateY(0); }
  78% { opacity: 1; transform: rotate(-3deg) translateY(-3px); }
  100% { opacity: 0; transform: rotate(0) translateY(0); }
}

.rainbow-pop {
  position: absolute; top: 120px; right: 24px; z-index: 10;
  font-size: 28px; font-weight: 900; color: #fff;
  text-shadow: 0 2px 0 #7a2f08; opacity: 0; pointer-events: none;
}
.rainbow-pop.is-on { animation: fade-up 1.4s ease forwards; }
@keyframes fade-up {
  0% { opacity: 0; transform: translateY(8px); }
  15% { opacity: 1; }
  100% { opacity: 0; transform: translateY(-16px); }
}

/* Mascot gesture loops — NEVER disabled by reduced-motion */
.mascot-svg { width: 100%; height: 100%; overflow: visible; display: block; }
.mascot-svg .body { transform-origin: 50% 70%; }
.mascot-svg.has-pose-frames .body { animation: none; }
.has-pose-frames .pose-frame {
  opacity: 0;
  animation-duration: var(--pose-ms, 1.6s);
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
}
.has-pose-frames .pose-frame-a { animation-name: pose-frame-a; }
.has-pose-frames .pose-frame-b { animation-name: pose-frame-b; }
.g-flex.has-pose-frames { --pose-ms: 1.6s; }
.g-rattle.has-pose-frames { --pose-ms: 1.2s; }
.g-sweep.has-pose-frames { --pose-ms: 1.6s; }
.g-shield.has-pose-frames { --pose-ms: 1.8s; }
.g-robot.has-pose-frames { --pose-ms: 1.2s; }
@keyframes pose-frame-a {
  0%, 49.999% { opacity: 1; }
  50%, 100% { opacity: 0; }
}
@keyframes pose-frame-b {
  0%, 49.999% { opacity: 0; }
  50%, 100% { opacity: 1; }
}
.g-flex .body { animation: flex-body 1.1s ease-in-out infinite; }
.g-flex .arm-l { animation: flex-l 1.1s ease-in-out infinite; transform-origin: 90% 20%; }
.g-flex .arm-r { animation: flex-r 1.1s ease-in-out infinite; transform-origin: 10% 20%; }
@keyframes flex-body {
  0%,100% { transform: translateY(0) scale(1,1); }
  50% { transform: translateY(-6%) scale(1.04,.94); }
}
@keyframes flex-l {
  0%,100% { transform: rotate(0); }
  50% { transform: rotate(-18deg); }
}
@keyframes flex-r {
  0%,100% { transform: rotate(0); }
  50% { transform: rotate(18deg); }
}
.g-rattle .body { animation: rattle 0.28s linear infinite; }
.g-rattle .arm-l, .g-rattle .arm-r { animation: rattle 0.28s linear infinite; }
@keyframes rattle {
  0% { transform: rotate(-6deg) translateX(-2%); }
  50% { transform: rotate(6deg) translateX(2%); }
  100% { transform: rotate(-6deg) translateX(-2%); }
}
.g-sweep .prop { animation: sweep 0.9s ease-in-out infinite; transform-origin: 50% 20%; }
.g-sweep .body { animation: sweep-shift 0.9s ease-in-out infinite; }
@keyframes sweep {
  0%,100% { transform: rotate(-28deg); }
  50% { transform: rotate(28deg); }
}
@keyframes sweep-shift {
  0%,100% { transform: translateX(-4%) rotate(-4deg); }
  50% { transform: translateX(4%) rotate(4deg); }
}
.g-shield .body { animation: plant 1s ease-in-out infinite; }
.g-shield .prop { animation: shield-up 1s ease-in-out infinite; transform-origin: 80% 80%; }
@keyframes plant {
  0%,100% { transform: scale(1); }
  50% { transform: scale(1.05,0.96); }
}
@keyframes shield-up {
  0%,100% { transform: translate(0,0) rotate(0); }
  50% { transform: translate(-6%, -8%) rotate(-8deg); }
}
.g-robot .body { animation: robot 0.7s steps(2, end) infinite; }
.g-robot .arm-l, .g-robot .arm-r { animation: robot-arm 0.7s steps(2, end) infinite; }
.g-robot .arm-l { transform-origin: 78% 86%; }
.g-robot .arm-r { transform-origin: 22% 86%; animation-delay: .35s; }
@keyframes robot {
  0% { transform: translateX(-3%) rotate(-3deg); }
  100% { transform: translateX(3%) rotate(3deg); }
}
@keyframes robot-arm {
  0% { transform: rotate(-16deg); }
  100% { transform: rotate(16deg); }
}

/* Decorative motion only */
@media (prefers-reduced-motion: reduce) {
  .logo-cloud { animation-duration: 80s; }
  .wordmark .ch { animation: none; }
  #screen-title .sun-blob,
  #screen-title .sparkles i,
  #screen-title .fruit,
  #screen-title .choice.is-on .mini-box,
  #screen-title .choice.is-on .toy-face,
  #screen-title .choice.is-on .diff-pic { animation: none; }
  .food-card.is-on { animation: none; opacity: 1; transform: scale(1); }
  .go-flash.is-on { animation: none; opacity: 1; }
  .showme.is-on { transform: none; }
  .showme.is-on h2,
  .showme.is-on .timer-ring,
  .showme-dancer { animation: none; }
}

.teams-2 { --pad-size: 112px; }
.teams-2 .team-col .col-label { font-size: 20px; }
.teams-2 .cat-btn .nick { font-size: 14px; }
.teams-2 .cat-btn .formal { font-size: 11px; }
.teams-2 .cat-btn .finger-mini { font-size: 18px; }
.teams-4 { --pad-size: 104px; }
.teams-4 .team-col .col-label { font-size: 16px; }
.teams-4 .cat-btn .nick { font-size: 12px; }
.teams-4 .cat-btn .formal { font-size: 9px; }
.teams-4 .cat-btn .finger-mini { font-size: 15px; }
.teams-4 .pad-grid { gap: 2px 12px; }

.debug-bar {
  position: absolute; left: 8px; bottom: 8px; z-index: 40;
  display: flex; gap: 4px; flex-wrap: wrap; max-width: 50%;
}
.debug-bar button {
  font-size: 11px; padding: 3px 6px; border-radius: 4px; border: 0;
  background: rgba(0,0,0,.45); color: #fff; cursor: pointer;
}
.debug-bar.is-off { display: none; }
