/* WillowinWorlds CSS: Burger Stack page (games/burger-stack.html). Loaded after upcoming-game.css.
   Signature element: a burger tower built from the game's ingredient-tray art. Tiles drop in one after another with a
   squash-and-settle while the tower sways, in front of the game's underwater (dark theme) or sky (light theme) kitchen
   backdrop. Only transform and opacity are animated. The static composition is the finished burger, so reduced motion
   and the pause button show a complete picture. */

body[data-game="burger-stack"] {
  --bs-brass: #EFB630;
  --bs-brass-hi: #F6D68B;
  --bs-deep: #083331;
  --bs-sprite: url("../assets/upcoming/burger-stack/gallery-ingredient-tray.webp");
  --ug-motif:
    radial-gradient(circle at 12% 14%, transparent 0 8px, color-mix(in srgb, var(--ug-accent-2) 26%, transparent) 8px 9.5px, transparent 10.5px),
    radial-gradient(circle at 84% 30%, transparent 0 5px, color-mix(in srgb, var(--ug-accent-2) 22%, transparent) 5px 6.5px, transparent 7.5px),
    radial-gradient(circle at 46% 8%, transparent 0 11px, color-mix(in srgb, var(--ug-accent-2) 18%, transparent) 11px 12.5px, transparent 13.5px);
}

/* Ingredient sprite: every tile is a window onto the tray art (76 x 82 source px per tile). */
.bs-tile {
  --u: calc(var(--t) / 76);
  display: block;
  flex: none;
  width: var(--t);
  aspect-ratio: 76 / 82;
  border-radius: 19%;
  background: var(--bs-sprite) no-repeat;
  background-size: calc(960 * var(--u)) calc(395 * var(--u));
  background-position: calc(var(--sx) * var(--u) * -1) calc(var(--sy) * var(--u) * -1);
}

.bs-i-patty { --sx: 100; --sy: 40; }
.bs-i-bun { --sx: 177; --sy: 40; }
.bs-i-tomato { --sx: 255; --sy: 40; }
.bs-i-lettuce { --sx: 332; --sy: 40; }
.bs-i-bacon { --sx: 410; --sy: 40; }

/* Hero copy: three real numbers from the build. */
.bs-hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.bs-hero-stats li {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid var(--ug-line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--ug-card) 90%, transparent);
  transition: transform 0.3s cubic-bezier(0.3, 1.5, 0.5, 1), border-color 0.25s ease;
}

.bs-hero-stats strong {
  color: var(--ug-accent);
  font-size: 1.6rem;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.bs-hero-stats span {
  color: var(--ug-muted);
  font-weight: 760;
}

@media (hover: hover) {
  .bs-hero-stats li:hover {
    transform: translateY(-3px) rotate(-1.5deg);
    border-color: var(--ug-accent);
  }
}

/* Hero stage: a portrait game-screen composition. */
.bs-hero-media {
  position: relative;
  isolation: isolate;
  justify-self: end;
  width: min(100%, 27.5rem);
  min-width: 0;
  margin: 0;
}

.bs-hero-media::before {
  content: "";
  position: absolute;
  inset: 6% -16% -4%;
  z-index: -1;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--ug-accent-2) 34%, transparent), transparent);
  pointer-events: none;
}

.bs-hero-media figcaption {
  margin-top: 14px;
  padding: 8px 12px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--ug-card) 88%, transparent);
  color: var(--ug-ink);
  font-size: 0.9rem;
  font-weight: 760;
  line-height: 1.45;
  text-align: center;
}

.bs-stage {
  --t: 14cqw;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  container-type: inline-size;
  aspect-ratio: 7 / 9;
  border: 3px solid var(--bs-brass);
  border-radius: 30px;
  background: #0A5F78;
  box-shadow:
    0 30px 70px var(--ug-shadow),
    0 0 0 8px color-mix(in srgb, var(--ug-fill) 14%, transparent),
    inset 0 0 0 2px rgba(255, 244, 200, 0.4);
}

/* Soft shade top and bottom keeps the overlays legible on the bright parts of the art. */
.bs-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 6;
  background: linear-gradient(180deg, rgba(4, 40, 48, 0.4), transparent 26%, transparent 74%, rgba(4, 30, 36, 0.34));
  pointer-events: none;
}

.bs-world {
  position: absolute;
  inset: 0;
  transform-origin: 50% 100%;
}

.bs-bg {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: auto;
  transition: opacity 0.5s ease;
}

.bs-bg--sky,
body[data-theme="light"] .bs-bg--sea {
  opacity: 0;
}

body[data-theme="light"] .bs-bg--sky {
  opacity: 1;
}

/* Light shafts in the water, drawn over the backdrop. */
.bs-world::after {
  content: "";
  position: absolute;
  inset: 0 0 40% 0;
  background: repeating-linear-gradient(104deg, transparent 0 9%, rgba(210, 250, 255, 0.14) 12%, transparent 17% 27%);
  -webkit-mask-image: linear-gradient(#000, transparent 92%);
  mask-image: linear-gradient(#000, transparent 92%);
  pointer-events: none;
}

body[data-theme="light"] .bs-world::after {
  opacity: 0.55;
}

/* Bubbles in the sea, clouds in the sky: two depths inside the stage. They are still here; the page-wide world below carries the motion. */
.bs-fx {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 1;
  width: 100%;
  height: 200%;
  background-repeat: repeat-y;
  background-size: 100% 50%;
  pointer-events: none;
}

.bs-fx--far {
  opacity: 0.8;
  background-image:
    radial-gradient(circle 3px at 14% 18%, rgba(255,255,255,0.14) 0 50%, rgba(255,255,255,0.80) 66% 82%, transparent 90%),
    radial-gradient(circle 4px at 31% 52%, rgba(255,255,255,0.14) 0 50%, rgba(255,255,255,0.75) 66% 82%, transparent 90%),
    radial-gradient(circle 2.5px at 47% 8%, rgba(255,255,255,0.13) 0 50%, rgba(255,255,255,0.70) 66% 82%, transparent 90%),
    radial-gradient(circle 4px at 63% 70%, rgba(255,255,255,0.14) 0 50%, rgba(255,255,255,0.80) 66% 82%, transparent 90%),
    radial-gradient(circle 3px at 79% 33%, rgba(255,255,255,0.13) 0 50%, rgba(255,255,255,0.70) 66% 82%, transparent 90%),
    radial-gradient(circle 3.5px at 90% 88%, rgba(255,255,255,0.14) 0 50%, rgba(255,255,255,0.75) 66% 82%, transparent 90%);
}

.bs-fx--near {
  z-index: 3;
  background-image:
    radial-gradient(circle 9px at 22% 38%, rgba(255,255,255,0.13) 0 50%, rgba(255,255,255,0.70) 66% 82%, transparent 90%),
    radial-gradient(circle 12px at 71% 62%, rgba(255,255,255,0.12) 0 50%, rgba(255,255,255,0.65) 66% 82%, transparent 90%),
    radial-gradient(circle 7px at 52% 92%, rgba(255,255,255,0.13) 0 50%, rgba(255,255,255,0.70) 66% 82%, transparent 90%);
}

body[data-theme="light"] .bs-fx {
  width: 200%;
  height: 100%;
  background-size: 50% 100%;
  background-repeat: repeat-x;
}

body[data-theme="light"] .bs-fx--far {
  opacity: 0.9;
  background-image:
    radial-gradient(ellipse 15% 4.5% at 22% 20%, rgba(255,255,255,0.8), transparent 72%),
    radial-gradient(ellipse 12% 3.5% at 70% 34%, rgba(255,255,255,0.7), transparent 72%),
    radial-gradient(ellipse 10% 3% at 46% 52%, rgba(255,255,255,0.6), transparent 72%);
}

body[data-theme="light"] .bs-fx--near {
  background-image:
    radial-gradient(ellipse 18% 5.5% at 30% 26%, rgba(255,255,255,0.7), transparent 72%),
    radial-gradient(ellipse 14% 4% at 80% 44%, rgba(255,255,255,0.55), transparent 72%);
}

/* The burger tower. */
.bs-tower {
  position: absolute;
  z-index: 2;
  left: calc(50% - var(--t) / 2);
  bottom: 13cqw;
  width: var(--t);
  height: calc(var(--t) * 6.3);
  transform-origin: 50% 100%;
  animation: bsSway 5.8s ease-in-out infinite alternate;
}

.bs-plate {
  position: absolute;
  left: -70%;
  bottom: calc(var(--t) * -0.2);
  width: 240%;
  height: calc(var(--t) * 0.5);
  border-radius: 50%;
  background: radial-gradient(ellipse at 50% 30%, #FBE7A3, #D9A63A 55%, #8A5E10);
  box-shadow: 0 1.2cqw 2cqw rgba(0, 20, 28, 0.5), inset 0 -0.8cqw 1cqw rgba(60, 35, 0, 0.4);
}

body[data-theme="light"] .bs-plate {
  opacity: 0.55;
}

.bs-tower .bs-tile {
  position: absolute;
  left: calc(var(--dx, 0) * 1cqw);
  bottom: calc(var(--n) * var(--t) * 0.93);
  transform-origin: 50% 100%;
  box-shadow: 0 0.9cqw 1.4cqw rgba(0, 24, 32, 0.4);
  animation: linear infinite 12s;
}

.bs-tower .bs-t1 { --n: 0; animation: none; }
.bs-tower .bs-t2 { --n: 1; --dx: 2; animation-name: bsDrop2; }
.bs-tower .bs-t3 { --n: 2; --dx: -2.6; animation-name: bsDrop3; }
.bs-tower .bs-t4 { --n: 3; --dx: 1.8; animation-name: bsDrop4; }
.bs-tower .bs-t5 { --n: 4; --dx: -1.6; animation-name: bsDrop5; }
.bs-tower .bs-t6 { --n: 5; --dx: 0.1; animation-name: bsDrop6; }

/* The order ticket: the recipe being built and a bar that fills with every landing. */
.bs-ticket {
  position: absolute;
  z-index: 4;
  top: 4.5cqw;
  left: 4.5cqw;
  display: grid;
  gap: 1.4cqw;
  padding: 2cqw 2.4cqw 2.2cqw;
  border-radius: 2cqw;
  color: var(--bs-deep);
  background: #FCF0BA;
  box-shadow: 0 0.8cqw 2cqw rgba(0, 20, 30, 0.35);
  transform: rotate(-2.5deg);
}

.bs-ticket b {
  font-size: clamp(10px, 2.9cqw, 13px);
  font-weight: 850;
  letter-spacing: 0.14em;
  line-height: 1;
  text-transform: uppercase;
}

.bs-ticket-row {
  display: flex;
  gap: 0.8cqw;
}

.bs-ticket-row .bs-tile {
  --t: 5.6cqw;
}

.bs-ticket-bar {
  height: 1.3cqw;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(8, 51, 49, 0.2);
}

.bs-ticket-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #C98A08, #EFB630);
  transform-origin: 0 50%;
  animation: bsOrderBar 12s linear infinite;
}

.bs-perfect {
  position: absolute;
  z-index: 5;
  top: 19cqw;
  left: 62%;
  padding: 1.5cqw 4cqw;
  border-radius: 99px;
  color: #093A38;
  background: linear-gradient(135deg, #F6D68B, #EFB630);
  box-shadow: 0 1cqw 2.4cqw rgba(0, 20, 30, 0.4), inset 0 0 0 0.5cqw rgba(255, 255, 255, 0.45);
  font-size: clamp(14px, 5.2cqw, 24px);
  font-weight: 900;
  line-height: 1.1;
  white-space: nowrap;
  transform: translateX(-50%) rotate(-3deg);
  animation: bsPerfect 12s linear infinite;
}

.bs-perfect::before,
.bs-perfect::after {
  content: "";
  position: absolute;
  width: 3.2cqw;
  aspect-ratio: 1;
  background: #FFF7D1;
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
}

.bs-perfect::before {
  top: -1.8cqw;
  right: -1.2cqw;
}

.bs-perfect::after {
  bottom: -1.2cqw;
  left: -1.6cqw;
  width: 2.2cqw;
}

/* Page-wide world. A fixed, layered backdrop behind every section: the game's own kitchen art (underwater in the dark
   theme, sky in the light theme), a scrim that keeps all text above 4.5:1, brass and aqua glows, and two depths of
   bubbles or clouds. The sections keep their cards. Motion is transform only: a slow drift and the slow particles. */
body.upcoming-game-page[data-game="burger-stack"] {
  isolation: isolate;
}

body.upcoming-game-page[data-game="burger-stack"]::before {
  display: none;
}

.bs-page-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background: #06302F;
}

body[data-theme="light"] .bs-page-bg {
  background: #DDF3F3;
}

.bs-page-art {
  position: absolute;
  inset: -5%;
  transform-origin: 50% 20%;
  animation: bsPageDrift 46s ease-in-out infinite alternate;
}

.bs-page-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 12%;
}

.bs-page-img--sky,
body[data-theme="light"] .bs-page-img--sea {
  opacity: 0;
}

body[data-theme="light"] .bs-page-img--sky {
  opacity: 1;
}

/* Light shafts from the surface (sun rays in the sky theme): their own layer, hung from the top edge, swaying slowly. */
.bs-page-rays {
  position: absolute;
  top: -8%;
  left: -12%;
  z-index: 1;
  width: 124%;
  height: 78%;
  background: repeating-linear-gradient(104deg, transparent 0 9%, rgba(210, 250, 255, 0.15) 12%, transparent 17% 27%);
  -webkit-mask-image: linear-gradient(#000, transparent 88%);
  mask-image: linear-gradient(#000, transparent 88%);
  transform-origin: 50% 0;
}

body[data-theme="light"] .bs-page-rays {
  background: repeating-linear-gradient(104deg, transparent 0 9%, rgba(255, 246, 204, 0.5) 12%, transparent 17% 27%);
}

/* Deck lamps: warm pools of light at the bottom corners that breathe. */
.bs-page-lamps {
  position: absolute;
  inset: 0;
  z-index: 3;
  background:
    radial-gradient(ellipse 22% 30% at 2% 102%, rgba(255, 196, 70, 0.34), transparent 70%),
    radial-gradient(ellipse 22% 30% at 98% 102%, rgba(255, 196, 70, 0.3), transparent 70%);
}

/* Scrim: darkens the art for the text sitting on it, lets the aqua and brass colours through at the edges. */
.bs-page-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(ellipse 60% 46% at 12% 6%, rgba(58, 216, 214, 0.2), transparent 70%),
    radial-gradient(ellipse 50% 42% at 92% 34%, rgba(239, 182, 48, 0.15), transparent 70%),
    linear-gradient(180deg, rgba(5, 42, 44, 0.5) 0%, rgba(8, 51, 49, 0.58) 48%, rgba(4, 30, 32, 0.76) 100%);
}

body[data-theme="light"] .bs-page-bg::before {
  background:
    radial-gradient(ellipse 60% 46% at 12% 6%, rgba(255, 255, 255, 0.5), transparent 70%),
    radial-gradient(ellipse 50% 42% at 92% 34%, rgba(239, 182, 48, 0.1), transparent 70%),
    linear-gradient(180deg, rgba(231, 250, 250, 0.72) 0%, rgba(232, 244, 240, 0.76) 55%, rgba(232, 239, 218, 0.84) 100%);
}

/* Vignette and a warm brass glow rising from the bottom edge, like deck lamps. */
.bs-page-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 4;
  background:
    radial-gradient(ellipse 70% 30% at 50% 108%, rgba(239, 182, 48, 0.12), transparent 70%),
    radial-gradient(ellipse at 50% 50%, transparent 55%, rgba(2, 22, 24, 0.5) 100%);
}

body[data-theme="light"] .bs-page-bg::after {
  background:
    radial-gradient(ellipse 70% 30% at 50% 108%, rgba(239, 182, 48, 0.16), transparent 70%),
    radial-gradient(ellipse at 50% 50%, transparent 60%, rgba(120, 190, 190, 0.22) 100%);
}

/* Bubbles (dark) and clouds (light), far and near. The element is two screens tall and loops by half its height. */
.bs-page-fx {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 200%;
  background-repeat: repeat-y;
  background-size: 100% 50%;
}

.bs-page-fx--far {
  z-index: 2;
  opacity: 0.55;
  background-image:
    radial-gradient(circle 4px at 8% 14%, rgba(255,255,255,0.14) 0 50%, rgba(255,255,255,0.8) 66% 82%, transparent 90%),
    radial-gradient(circle 5px at 23% 57%, rgba(255,255,255,0.14) 0 50%, rgba(255,255,255,0.75) 66% 82%, transparent 90%),
    radial-gradient(circle 3.5px at 38% 31%, rgba(255,255,255,0.13) 0 50%, rgba(255,255,255,0.7) 66% 82%, transparent 90%),
    radial-gradient(circle 6px at 55% 82%, rgba(255,255,255,0.14) 0 50%, rgba(255,255,255,0.8) 66% 82%, transparent 90%),
    radial-gradient(circle 4px at 70% 22%, rgba(255,255,255,0.13) 0 50%, rgba(255,255,255,0.7) 66% 82%, transparent 90%),
    radial-gradient(circle 5px at 86% 64%, rgba(255,255,255,0.14) 0 50%, rgba(255,255,255,0.75) 66% 82%, transparent 90%),
    radial-gradient(circle 3.5px at 94% 9%, rgba(255,255,255,0.13) 0 50%, rgba(255,255,255,0.7) 66% 82%, transparent 90%);
  animation: bsRise 90s linear infinite;
}

.bs-page-fx--near {
  z-index: 3;
  opacity: 0.4;
  background-image:
    radial-gradient(circle 16px at 14% 48%, rgba(255,255,255,0.1) 0 50%, rgba(255,255,255,0.65) 68% 82%, transparent 90%),
    radial-gradient(circle 12px at 47% 12%, rgba(255,255,255,0.1) 0 50%, rgba(255,255,255,0.6) 68% 82%, transparent 90%),
    radial-gradient(circle 20px at 76% 70%, rgba(255,255,255,0.1) 0 50%, rgba(255,255,255,0.65) 68% 82%, transparent 90%),
    radial-gradient(circle 14px at 90% 35%, rgba(255,255,255,0.1) 0 50%, rgba(255,255,255,0.6) 68% 82%, transparent 90%);
  animation: bsRise 58s linear infinite;
}

body[data-theme="light"] .bs-page-fx {
  width: 200%;
  height: 100%;
  background-size: 50% 100%;
  background-repeat: repeat-x;
}

body[data-theme="light"] .bs-page-fx--far {
  opacity: 0.9;
  background-image:
    radial-gradient(ellipse 18% 6% at 20% 16%, rgba(255,255,255,0.85), transparent 72%),
    radial-gradient(ellipse 14% 5% at 66% 30%, rgba(255,255,255,0.75), transparent 72%),
    radial-gradient(ellipse 16% 5% at 40% 62%, rgba(255,255,255,0.65), transparent 72%),
    radial-gradient(ellipse 12% 4% at 86% 78%, rgba(255,255,255,0.6), transparent 72%);
  animation: bsDrift 150s linear infinite;
}

body[data-theme="light"] .bs-page-fx--near {
  opacity: 0.8;
  background-image:
    radial-gradient(ellipse 22% 7% at 30% 24%, rgba(255,255,255,0.7), transparent 72%),
    radial-gradient(ellipse 18% 6% at 78% 52%, rgba(255,255,255,0.6), transparent 72%),
    radial-gradient(ellipse 16% 5% at 54% 86%, rgba(255,255,255,0.55), transparent 72%);
  animation: bsDrift 95s linear infinite;
}

/* Ingredient tiles sinking (dark) or drifting (light) down the sides of the page: the tiles are windows onto the game's own ingredient tray.
   A static wrapper hides the middle (hero text and cards) and leaves the two lanes beside the content; inside it each layer is two identical
   screens tall and slides down by one screen, so the fall loops without a seam. Each tile sits in a lane by a fraction (--k) of its width. */
.bs-rains {
  --gl: calc(50vw - min(590px, 50vw - 20px));
  position: absolute;
  inset: 0;
  z-index: 3;
  -webkit-mask-image: linear-gradient(90deg, #000 calc(var(--gl) - 30px), transparent calc(var(--gl) - 6px), transparent calc(100% - var(--gl) + 6px), #000 calc(100% - var(--gl) + 30px));
  mask-image: linear-gradient(90deg, #000 calc(var(--gl) - 30px), transparent calc(var(--gl) - 6px), transparent calc(100% - var(--gl) + 6px), #000 calc(100% - var(--gl) + 30px));
}

.bs-rain {
  position: absolute;
  top: -100vh;
  left: 0;
  width: 100%;
  height: 200vh;
}

.bs-half {
  position: relative;
  height: 100vh;
}

.bs-rain--far {
  opacity: 0.6;
}

.bs-rain--near {
  opacity: 0.92;
}

.bs-rain i {
  --side: 0;
  --k: 0.5;
  --y: 0;
  --s: 4;
  --r: 0deg;
  --sx: 100;
  --sy: 40;
  --t: calc(var(--s) * 1vmin);
  --u: calc(var(--t) / 76);
  position: absolute;
  top: calc(var(--y) * 1%);
  left: calc(var(--gl) * var(--k) + var(--side) * (100vw - var(--gl)) - var(--t) / 2);
  width: var(--t);
  aspect-ratio: 76 / 82;
  border-radius: 19%;
  background: var(--bs-sprite) no-repeat;
  background-size: calc(960 * var(--u)) calc(395 * var(--u));
  background-position: calc(var(--sx) * var(--u) * -1) calc(var(--sy) * var(--u) * -1);
  box-shadow: 0 0.6vmin 1vmin rgba(0, 24, 32, 0.4);
  transform: rotate(var(--r));
}

.bs-rain i:nth-child(9n + 1) { --sx: 100; --sy: 40; }
.bs-rain i:nth-child(9n + 2) { --sx: 177; --sy: 40; }
.bs-rain i:nth-child(9n + 3) { --sx: 255; --sy: 40; }
.bs-rain i:nth-child(9n + 4) { --sx: 332; --sy: 40; }
.bs-rain i:nth-child(9n + 5) { --sx: 410; --sy: 40; }
.bs-rain i:nth-child(9n + 6) { --sx: 410; --sy: 133; }
.bs-rain i:nth-child(9n + 7) { --sx: 255; --sy: 133; }
.bs-rain i:nth-child(9n + 8) { --sx: 177; --sy: 133; }
.bs-rain i:nth-child(9n + 0) { --sx: 719; --sy: 133; }

.bs-rain--far .bs-half i:nth-child(1) { --side: 0; --k: 0.57; --y: -0.5; --s: 3.4; --r: -1deg; }
.bs-rain--far .bs-half i:nth-child(2) { --side: 1; --k: 0.62; --y: 6.1; --s: 4.6; --r: -15deg; }
.bs-rain--far .bs-half i:nth-child(3) { --side: 0; --k: 0.14; --y: 12.9; --s: 4; --r: 18deg; }
.bs-rain--far .bs-half i:nth-child(4) { --side: 1; --k: 0.39; --y: 23.1; --s: 4.6; --r: 14deg; }
.bs-rain--far .bs-half i:nth-child(5) { --side: 0; --k: 0.11; --y: 28.9; --s: 3.4; --r: -19deg; }
.bs-rain--far .bs-half i:nth-child(6) { --side: 1; --k: 0.51; --y: 36.5; --s: 3.4; --r: -25deg; }
.bs-rain--far .bs-half i:nth-child(7) { --side: 0; --k: 0.26; --y: 43.1; --s: 3.4; --r: 11deg; }
.bs-rain--far .bs-half i:nth-child(8) { --side: 1; --k: 0.12; --y: 49.5; --s: 4.6; --r: -17deg; }
.bs-rain--far .bs-half i:nth-child(9) { --side: 0; --k: 0.36; --y: 58.1; --s: 3.4; --r: -9deg; }
.bs-rain--far .bs-half i:nth-child(10) { --side: 1; --k: 0.34; --y: 64.6; --s: 3.4; --r: 14deg; }
.bs-rain--far .bs-half i:nth-child(11) { --side: 0; --k: 0.16; --y: 72.6; --s: 3.4; --r: 14deg; }
.bs-rain--far .bs-half i:nth-child(12) { --side: 1; --k: 0.49; --y: 79.2; --s: 4; --r: -14deg; }
.bs-rain--far .bs-half i:nth-child(13) { --side: 0; --k: 0.11; --y: 87.1; --s: 3.4; --r: -24deg; }
.bs-rain--far .bs-half i:nth-child(14) { --side: 1; --k: 0.38; --y: 92.6; --s: 4.6; --r: -3deg; }

.bs-rain--near .bs-half i:nth-child(1) { --side: 0; --k: 0.36; --y: -2.1; --s: 9.5; --r: -11deg; }
.bs-rain--near .bs-half i:nth-child(2) { --side: 1; --k: 0.42; --y: 12.2; --s: 7; --r: 13deg; }
.bs-rain--near .bs-half i:nth-child(3) { --side: 0; --k: 0.38; --y: 29.9; --s: 7; --r: -20deg; }
.bs-rain--near .bs-half i:nth-child(4) { --side: 1; --k: 0.58; --y: 40.9; --s: 9.5; --r: -26deg; }
.bs-rain--near .bs-half i:nth-child(5) { --side: 0; --k: 0.53; --y: 58.1; --s: 9.5; --r: 27deg; }
.bs-rain--near .bs-half i:nth-child(6) { --side: 1; --k: 0.61; --y: 72.2; --s: 7; --r: 14deg; }
.bs-rain--near .bs-half i:nth-child(7) { --side: 0; --k: 0.52; --y: 83.1; --s: 8.2; --r: 13deg; }

/* Backdrop motion. Budget: 16 infinite animations on the page (7 backdrop, 8 in the hero stage, none on the cards: those move on hover). */
.bs-page-rays {
  animation: bsRays 22s ease-in-out infinite alternate;
}

.bs-page-lamps {
  animation: bsLamps 7s ease-in-out infinite alternate;
}

.bs-rain--far {
  animation: bsSink 110s linear infinite;
}

.bs-rain--near {
  animation: bsSink 64s linear infinite;
}

/* Local scrims: a soft pool behind the hero copy and the related-worlds text keeps them above 4.5:1; it fades out, no box. */
.ug-hero-copy,
.lab-related-inner {
  position: relative;
  isolation: isolate;
}

.lab-related {
  overflow-x: clip;
}

.ug-hero-copy::before,
.lab-related-inner::before {
  content: "";
  position: absolute;
  inset: -56px -96px;
  z-index: -1;
  pointer-events: none;
  background: var(--bs-scrim);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 96px, #000 calc(100% - 96px), transparent), linear-gradient(180deg, transparent, #000 56px, #000 calc(100% - 56px), transparent);
  mask-image: linear-gradient(90deg, transparent, #000 96px, #000 calc(100% - 96px), transparent), linear-gradient(180deg, transparent, #000 56px, #000 calc(100% - 56px), transparent);
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
}

.lab-related-inner::before {
  inset: -48px -80px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 80px, #000 calc(100% - 80px), transparent), linear-gradient(180deg, transparent, #000 48px, #000 calc(100% - 48px), transparent);
  mask-image: linear-gradient(90deg, transparent, #000 80px, #000 calc(100% - 80px), transparent), linear-gradient(180deg, transparent, #000 48px, #000 calc(100% - 48px), transparent);
}

body[data-game="burger-stack"][data-theme="dark"] {
  --bs-scrim: rgba(4, 36, 38, 0.84);
}

body[data-game="burger-stack"][data-theme="light"] {
  --bs-scrim: rgba(240, 252, 252, 0.88);
}

/* Small screens: no drift, no rays, no lamps, no falling tiles (their lanes are a sliver there), one particle layer. */
@media (max-width: 760px) {
  .bs-page-art {
    animation: none;
  }

  .bs-page-img {
    opacity: 0.7;
  }

  .bs-page-img--sky,
  body[data-theme="light"] .bs-page-img--sea {
    opacity: 0;
  }

  body[data-theme="light"] .bs-page-img--sky {
    opacity: 0.8;
  }

  .bs-page-fx--near,
  .bs-page-rays,
  .bs-page-lamps,
  .bs-rains {
    display: none;
  }
}

/* ---------- Order tickets ----------
   The page's frames are kitchen tickets: every section is a continuous-feed slip with a column of punched holes down both sides,
   every heading is underlined with the layers of a burger (bun, lettuce, tomato, patty), and the cards inside are order chits
   with punched notches and tear lines. Tokens: hole and rim colours, and the four layer colours. */
body[data-game="burger-stack"] {
  --bs-leaf: #7BC043;
  --bs-tomato: #E4572E;
  --bs-patty: #7A4A22;
  --bs-feed: 26px;
}

body[data-game="burger-stack"][data-theme="dark"] {
  --bs-hole: rgba(2, 22, 24, 0.75);
  --bs-hole-rim: rgba(239, 182, 48, 0.6);
}

body[data-game="burger-stack"][data-theme="light"] {
  --bs-hole: rgba(8, 51, 49, 0.2);
  --bs-hole-rim: rgba(124, 95, 25, 0.6);
}

/* Section slips. */
body.upcoming-game-page[data-game="burger-stack"] .soft-card {
  position: relative;
  overflow: clip;
  padding-inline: calc(var(--bs-feed) + clamp(16px, 2.6vw, 30px));
  border-radius: 16px;
  background:
    radial-gradient(circle at 100% 0, color-mix(in srgb, var(--ug-accent-2) 14%, transparent), transparent 42%),
    linear-gradient(160deg, color-mix(in srgb, var(--ug-card) 82%, transparent), color-mix(in srgb, var(--ug-card) 74%, transparent));
}

/* The feed strips: punched holes with a brass rim, and a dashed tear line along the inner edge. */
body[data-game="burger-stack"] .soft-card::before,
body[data-game="burger-stack"] .soft-card::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: var(--bs-feed);
  box-sizing: border-box;
  background: radial-gradient(circle 6px at 50% 50%, var(--bs-hole) 0 4px, var(--bs-hole-rim) 4.5px 5.5px, transparent 6.2px) 0 0 / 100% 26px repeat-y;
  pointer-events: none;
}

body[data-game="burger-stack"] .soft-card::before {
  left: 0;
  border-inline-end: 2px dashed color-mix(in srgb, var(--ug-line) 90%, transparent);
}

body[data-game="burger-stack"] .soft-card::after {
  right: 0;
  border-inline-start: 2px dashed color-mix(in srgb, var(--ug-line) 90%, transparent);
}

/* The vote slip keeps its picture of the tray at the right (see below), so its right strip stays but the picture sits inside it. */
body[data-game="burger-stack"] .game-page-section h2 {
  font-weight: 900;
  letter-spacing: -0.01em;
}

/* Underline made of four burger layers; it stretches when the slip is hovered. */
body[data-game="burger-stack"] .game-page-section:not(.ug-vote) h2::after {
  content: "";
  display: block;
  width: 5.4rem;
  height: 8px;
  margin-top: 0.65rem;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--bs-brass) 0 30%, var(--bs-leaf) 30% 52%, var(--bs-tomato) 52% 74%, var(--bs-patty) 74%);
  transition: width 0.45s var(--ease);
}

body[data-game="burger-stack"] .soft-card:hover h2::after {
  width: 8.4rem;
}

/* The eyebrow is the stub at the top of the slip: punched notches at both ends. */
body[data-game="burger-stack"] .eyebrow {
  padding-inline: 16px;
  border-radius: 5px;
  font-weight: 850;
  letter-spacing: 0.05em;
  -webkit-mask: radial-gradient(circle 5px at 0 50%, #0000 97%, #000) left / 51% 100% no-repeat, radial-gradient(circle 5px at 100% 50%, #0000 97%, #000) right / 51% 100% no-repeat;
  mask: radial-gradient(circle 5px at 0 50%, #0000 97%, #000) left / 51% 100% no-repeat, radial-gradient(circle 5px at 100% 50%, #0000 97%, #000) right / 51% 100% no-repeat;
}

body[data-game="burger-stack"] .btn {
  overflow: hidden;
}

body[data-game="burger-stack"] .btn:active {
  transform: translateY(1px) scale(0.97);
}

/* Buttons are buns: a glossy top and a toasted underside. */
body[data-game="burger-stack"] .btn-primary {
  box-shadow:
    inset 0 3px 0 rgba(255, 255, 255, 0.42),
    inset 0 -3px 0 rgba(120, 70, 0, 0.28),
    0 14px 34px color-mix(in srgb, var(--ug-fill) 30%, transparent);
}

body[data-game="burger-stack"] .btn-primary::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.6) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform 0.6s ease;
  pointer-events: none;
}

body[data-game="burger-stack"] .btn-primary:hover::after,
body[data-game="burger-stack"] .btn-primary:focus-visible::after {
  transform: translateX(120%);
}

/* Order chits: a punched notch at each side halfway down. Chits draw no shadow on hover (the notches would clip it); they lift and light up instead. */
body[data-game="burger-stack"] :is(.ug-features .detail-card, .ug-faq .detail-card, .ug-steps li, .ug-next li, .lab-related-link) {
  position: relative;
  border-radius: 12px;
  -webkit-mask: radial-gradient(circle 7px at 0 50%, #0000 98%, #000) left / 51% 100% no-repeat, radial-gradient(circle 7px at 100% 50%, #0000 98%, #000) right / 51% 100% no-repeat;
  mask: radial-gradient(circle 7px at 0 50%, #0000 98%, #000) left / 51% 100% no-repeat, radial-gradient(circle 7px at 100% 50%, #0000 98%, #000) right / 51% 100% no-repeat;
}

/* Facts are torn off the roll: a sawtooth bottom edge. */
.ug-facts .game-page-facts > div {
  padding-bottom: 22px;
  border-inline-start: 4px solid var(--bs-brass);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  -webkit-mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / 14px 100%;
  mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / 14px 100%;
  transition: transform 0.3s ease, border-color 0.25s ease;
}

.ug-facts .game-page-facts > div:last-child {
  padding-bottom: 22px;
  border-bottom: 0;
}

@media (hover: hover) {
  .ug-facts .game-page-facts > div:hover {
    transform: translateY(-3px);
    border-color: var(--ug-accent);
  }
}

/* How it plays: each step opens with a small aquarium window showing the move, and a stamped step number. */
.ug-steps li {
  overflow: hidden;
  transition: transform 0.3s ease, border-color 0.25s ease;
}

.ug-steps li > span {
  display: inline-block;
  padding: 1px 9px 2px;
  border: 2px solid currentColor;
  border-radius: 6px;
  font-weight: 900;
  letter-spacing: 0.08em;
  transform: rotate(-3deg);
}

.ug-steps li::before {
  content: "";
  display: block;
  height: 64px;
  margin: -2px 0 14px;
  border-radius: 12px;
  background:
    repeating-linear-gradient(90deg, var(--bs-brass-hi) 0 6px, transparent 6px 10px) 50% calc(100% - 3px) / 46px 2px no-repeat,
    radial-gradient(circle 3px at 18% 30%, rgba(255,255,255,0.5), transparent 90%),
    radial-gradient(circle 2px at 82% 56%, rgba(255,255,255,0.45), transparent 90%),
    linear-gradient(180deg, #0F6C86, #083D49);
}

.ug-steps li::after {
  --t: 38px;
  --u: calc(var(--t) / 76);
  content: "";
  position: absolute;
  top: 33px;
  left: calc(50% - 19px);
  width: var(--t);
  aspect-ratio: 76 / 82;
  border-radius: 19%;
  background: var(--bs-sprite) no-repeat;
  background-size: calc(960 * var(--u)) calc(395 * var(--u));
  background-position: calc(var(--sx) * var(--u) * -1) calc(var(--sy) * var(--u) * -1);
  box-shadow: 0 4px 6px rgba(0, 20, 28, 0.4);
  transform-origin: 50% 100%;
}

.ug-steps li:nth-child(1)::after { --sx: 100; --sy: 40; }
.ug-steps li:nth-child(2)::after { --sx: 255; --sy: 40; }
.ug-steps li:nth-child(3)::after { --sx: 332; --sy: 40; }

/* The tile in each window plays its move once when the chit is hovered or has focus inside (no perpetual motion beside the text). */
@media (hover: hover) {
  .ug-steps li:hover {
    transform: translateY(-4px);
    border-color: var(--ug-accent);
  }

  body:not(.animations-paused) .ug-steps li:nth-child(1):hover::after { animation: bsStepDrop 1.8s linear 1 both; }
  body:not(.animations-paused) .ug-steps li:nth-child(2):hover::after { animation: bsStepSlide 2.4s ease-in-out 1 both; }
  body:not(.animations-paused) .ug-steps li:nth-child(3):hover::after { animation: bsStepPop 1.4s ease-in-out 1 both; }
}

/* Feature cards: an ingredient tile leads each title and tips over on hover or focus; a dashed tear line sits under every title. */
.ug-features .detail-card,
.ug-faq .detail-card,
.ug-next li {
  transition: transform 0.3s ease, border-color 0.25s ease;
}

.ug-features .detail-card h3,
.ug-faq .detail-card h3 {
  margin-bottom: 0.75rem;
  padding-bottom: 0.7rem;
  border-bottom: 2px dashed color-mix(in srgb, var(--ug-line) 85%, transparent);
}

.ug-features .detail-card h3 {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.ug-features .detail-card h3::before {
  --t: 1.9rem;
  --u: calc(var(--t) / 76);
  content: "";
  display: block;
  flex: none;
  width: var(--t);
  aspect-ratio: 76 / 82;
  border-radius: 19%;
  background: var(--bs-sprite) no-repeat;
  background-size: calc(960 * var(--u)) calc(395 * var(--u));
  background-position: calc(var(--sx) * var(--u) * -1) calc(var(--sy) * var(--u) * -1);
  box-shadow: 0 3px 5px rgba(0, 20, 28, 0.35);
  transform: rotate(-6deg);
  transition: transform 0.35s cubic-bezier(0.3, 1.6, 0.5, 1);
}

.ug-features .detail-card:nth-child(1) h3::before { --sx: 177; --sy: 40; }
.ug-features .detail-card:nth-child(2) h3::before { --sx: 410; --sy: 133; }
.ug-features .detail-card:nth-child(3) h3::before { --sx: 255; --sy: 40; }
.ug-features .detail-card:nth-child(4) h3::before { --sx: 255; --sy: 133; }
.ug-features .detail-card:nth-child(5) h3::before { --sx: 719; --sy: 133; }
.ug-features .detail-card:nth-child(6) h3::before { --sx: 177; --sy: 133; }

.ug-features .detail-card:hover h3::before,
.ug-features .detail-card:focus-within h3::before {
  transform: rotate(5deg) scale(1.18) translateY(-2px);
}

@media (hover: hover) {
  .ug-features .detail-card:hover,
  .ug-faq .detail-card:hover,
  .ug-next li:hover {
    transform: translateY(-4px);
    border-color: var(--ug-accent);
  }
}

.ug-faq .detail-card:focus-within {
  border-color: var(--ug-accent);
}

/* Direction list: a tick box per goal. */
body[data-game="burger-stack"] .ug-next li::before {
  top: 1.15rem;
  left: 16px;
  width: 15px;
  height: 15px;
  border: 2px solid var(--bs-brass);
  border-radius: 4px;
  background: transparent;
  transform: none;
}

body[data-game="burger-stack"] .ug-next li::after {
  content: "";
  position: absolute;
  top: calc(1.15rem + 2px);
  left: 21px;
  width: 7px;
  height: 4px;
  border-bottom: 2px solid var(--bs-brass-hi);
  border-left: 2px solid var(--bs-brass-hi);
  transform: rotate(-45deg);
}

/* Gallery: brass-rimmed trays with a rivet in each corner; the transparent tray sits on deep water. */
.ug-shot {
  position: relative;
  border: 2px solid color-mix(in srgb, var(--bs-brass) 70%, var(--ug-line));
  border-radius: 14px;
  box-shadow: inset 0 0 0 3px rgba(255, 244, 200, 0.14);
  transition: transform 0.3s ease, border-color 0.25s ease;
}

.ug-shot::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(circle 3.5px at 11px 11px, var(--bs-brass-hi) 0 55%, transparent 100%),
    radial-gradient(circle 3.5px at calc(100% - 11px) 11px, var(--bs-brass-hi) 0 55%, transparent 100%),
    radial-gradient(circle 3.5px at 11px calc(100% - 11px), var(--bs-brass-hi) 0 55%, transparent 100%),
    radial-gradient(circle 3.5px at calc(100% - 11px) calc(100% - 11px), var(--bs-brass-hi) 0 55%, transparent 100%);
  pointer-events: none;
}

.ug-shot img {
  transition: transform 0.6s ease;
}

.ug-shot--strip img {
  background: linear-gradient(180deg, #0F6C86, #083D49);
}

@media (hover: hover) {
  .ug-shot:hover {
    border-color: var(--ug-accent);
  }

  .ug-shot:hover img {
    transform: scale(1.04);
  }
}

/* Gallery: the two backdrops sit either side of the tray instead of leaving the right half empty. */
body[data-game="burger-stack"] .ug-gallery--2 {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) repeat(2, minmax(0, 0.75fr));
  gap: 14px;
  align-items: center;
  max-width: none;
  columns: auto;
}

body[data-game="burger-stack"] .ug-gallery--2 .ug-shot {
  margin: 0;
}

body[data-game="burger-stack"] .ug-gallery--2 .ug-shot--strip {
  max-width: none;
}

@media (max-width: 760px) {
  body[data-game="burger-stack"] .ug-gallery--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body[data-game="burger-stack"] .ug-gallery--2 .ug-shot--strip {
    grid-column: 1 / -1;
  }
}

/* Voting: a bun tile hops beside the heading, like an order bell, when the slip is hovered. */
.ug-vote h2::after {
  --t: 1.9rem;
  --u: calc(var(--t) / 76);
  --sx: 177;
  --sy: 40;
  content: "";
  display: inline-block;
  width: var(--t);
  aspect-ratio: 76 / 82;
  margin-inline-start: 0.6rem;
  vertical-align: -0.35em;
  border-radius: 19%;
  background: var(--bs-sprite) no-repeat;
  background-size: calc(960 * var(--u)) calc(395 * var(--u));
  background-position: calc(var(--sx) * var(--u) * -1) calc(var(--sy) * var(--u) * -1);
  box-shadow: 0 3px 5px rgba(0, 20, 28, 0.35);
  transform-origin: 50% 100%;
}

@media (hover: hover) {
  .ug-vote:hover h2::after {
    animation: bsHop 1.6s ease-in-out 1 both;
  }
}

.ug-vote {
  position: relative;
}

@media (min-width: 1200px) {
  .ug-vote .ug-lede {
    max-width: 32rem;
  }

  .ug-vote .social-block--game {
    max-width: 32rem;
  }
}

body[data-game="burger-stack"] .social-link {
  transition: transform 0.25s cubic-bezier(0.3, 1.5, 0.5, 1), border-color 0.25s ease, background 0.25s ease;
}

body[data-game="burger-stack"] .social-link:hover,
body[data-game="burger-stack"] .social-link:focus-visible {
  transform: translateY(-3px);
}

/* Hero chips are buns: a domed top with sesame seeds. */
.bs-hero-stats li {
  padding-top: 18px;
  border-radius: 26px 26px 10px 10px;
  background:
    radial-gradient(ellipse 3px 1.8px at 24% 60%, rgba(255, 244, 200, 0.75) 0 70%, transparent 100%) 0 0 / 100% 14px no-repeat,
    radial-gradient(ellipse 3px 1.8px at 38% 30%, rgba(255, 244, 200, 0.75) 0 70%, transparent 100%) 0 0 / 100% 14px no-repeat,
    radial-gradient(ellipse 3px 1.8px at 52% 62%, rgba(255, 244, 200, 0.75) 0 70%, transparent 100%) 0 0 / 100% 14px no-repeat,
    radial-gradient(ellipse 3px 1.8px at 66% 30%, rgba(255, 244, 200, 0.75) 0 70%, transparent 100%) 0 0 / 100% 14px no-repeat,
    radial-gradient(ellipse 3px 1.8px at 80% 60%, rgba(255, 244, 200, 0.75) 0 70%, transparent 100%) 0 0 / 100% 14px no-repeat,
    color-mix(in srgb, var(--ug-card) 90%, transparent);
}

/* The status note is a ticket note: a dashed edge and a brass tab. */
body[data-game="burger-stack"] .ug-status-note {
  border-style: dashed;
  border-inline-start: 6px solid var(--bs-brass);
  border-radius: 6px 14px 14px 6px;
}

/* Narrow slips: thinner feed strips, and no right strip on the smallest phones so the text keeps its width. */
@media (max-width: 560px) {
  body[data-game="burger-stack"] {
    --bs-feed: 16px;
  }

  body.upcoming-game-page[data-game="burger-stack"] .soft-card {
    padding-inline: calc(var(--bs-feed) + 12px) 14px;
  }

  body[data-game="burger-stack"] .soft-card::after {
    display: none;
  }
}

/* Motion. */
@keyframes bsPageDrift {
  from { transform: scale(1) translate(0, 0); }
  to { transform: scale(1.06) translate(-1.2%, 1.2%); }
}

@keyframes bsRise {
  from { transform: translateY(0); }
  to { transform: translateY(-50%); }
}

@keyframes bsDrift {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* Tiles sinking: down by one screen, with a gentle sway that comes back to where it started. */
@keyframes bsSink {
  0%   { transform: translate(0, 0); }
  25%  { transform: translate(1.4vw, 25vh); }
  50%  { transform: translate(0, 50vh); }
  75%  { transform: translate(-1.4vw, 75vh); }
  100% { transform: translate(0, 100vh); }
}

@keyframes bsRays {
  from { transform: rotate(-3deg); }
  to { transform: rotate(3deg); }
}

@keyframes bsLamps {
  from { opacity: 0.5; }
  to { opacity: 1; }
}

@keyframes bsSway {
  from { transform: rotate(-1.5deg) translateX(-0.6cqw); }
  to { transform: rotate(1.5deg) translateX(0.6cqw); }
}

@keyframes bsOrderBar {
  0%, 9.6% { transform: scaleX(0); }
  11.25%, 24.6% { transform: scaleX(0.2); }
  26.25%, 39.6% { transform: scaleX(0.4); }
  41.25%, 54.6% { transform: scaleX(0.6); }
  56.25%, 69.6% { transform: scaleX(0.8); }
  71.25%, 93.3% { transform: scaleX(1); }
  96%, 100% { transform: scaleX(0); }
}

@keyframes bsPerfect {
  0%, 70% { opacity: 0; transform: translateX(-50%) rotate(-3deg) scale(0.5); }
  72.9% { opacity: 1; transform: translateX(-50%) rotate(-6deg) scale(1.18); }
  74.6%, 88.5% { opacity: 1; transform: translateX(-50%) rotate(-3deg) scale(1); }
  94%, 100% { opacity: 0; transform: translateX(-50%) rotate(-3deg) scale(0.9); }
}

@keyframes bsStepDrop {
  0%, 2% { opacity: 0; transform: translateY(-16px) scale(1, 1); }
  8% { opacity: 1; transform: translateY(-14px) scale(1, 1); animation-timing-function: cubic-bezier(0.5, 0, 0.9, 0.6); }
  30% { opacity: 1; transform: translateY(0) scale(1, 1); animation-timing-function: ease-out; }
  36% { transform: translateY(0) scale(1.15, 0.82); animation-timing-function: ease-in-out; }
  44% { transform: translateY(0) scale(0.97, 1.05); animation-timing-function: ease-in-out; }
  52%, 86% { opacity: 1; transform: translateY(0) scale(1, 1); }
  96%, 100% { opacity: 0; transform: translateY(0) scale(1, 1); }
}

@keyframes bsStepSlide {
  from { transform: translateX(-3.4rem); }
  to { transform: translateX(3.4rem); }
}

@keyframes bsStepPop {
  0%, 60%, 100% { transform: scale(1) rotate(0); }
  68% { transform: scale(1.22) rotate(-6deg); }
  78% { transform: scale(0.94) rotate(3deg); }
  88% { transform: scale(1.05) rotate(0); }
}

@keyframes bsHop {
  0%, 62%, 100% { transform: translateY(0) scale(1, 1); }
  70% { transform: translateY(-0.7rem) scale(0.94, 1.08); }
  78% { transform: translateY(0) scale(1.1, 0.86); }
  86% { transform: translateY(0) scale(0.98, 1.03); }
}

@keyframes bsDrop2 {
  0%, 5.83% { opacity: 1; transform: translateY(-700%) scale(1, 1); animation-timing-function: cubic-bezier(.5, 0, .9, .6); }
  10% { transform: translateY(0) scale(1, 1); animation-timing-function: ease-out; }
  11% { transform: translateY(0) scale(1.14, .8); animation-timing-function: ease-in-out; }
  12.83% { transform: translateY(0) scale(.97, 1.06); animation-timing-function: ease-in-out; }
  14.83%, 90.83% { opacity: 1; transform: translateY(0) scale(1, 1); }
  95.83%, 99% { opacity: 0; transform: translateY(-6%) scale(.96, .96); }
  100% { opacity: 0; transform: translateY(-700%) scale(1, 1); }
}

@keyframes bsDrop3 {
  0%, 20.83% { opacity: 1; transform: translateY(-700%) scale(1, 1); animation-timing-function: cubic-bezier(.5, 0, .9, .6); }
  25% { transform: translateY(0) scale(1, 1); animation-timing-function: ease-out; }
  26% { transform: translateY(0) scale(1.14, .8); animation-timing-function: ease-in-out; }
  27.83% { transform: translateY(0) scale(.97, 1.06); animation-timing-function: ease-in-out; }
  29.83%, 90.83% { opacity: 1; transform: translateY(0) scale(1, 1); }
  95.83%, 99% { opacity: 0; transform: translateY(-6%) scale(.96, .96); }
  100% { opacity: 0; transform: translateY(-700%) scale(1, 1); }
}

@keyframes bsDrop4 {
  0%, 35.83% { opacity: 1; transform: translateY(-600%) scale(1, 1); animation-timing-function: cubic-bezier(.5, 0, .9, .6); }
  40% { transform: translateY(0) scale(1, 1); animation-timing-function: ease-out; }
  41% { transform: translateY(0) scale(1.14, .8); animation-timing-function: ease-in-out; }
  42.83% { transform: translateY(0) scale(.97, 1.06); animation-timing-function: ease-in-out; }
  44.83%, 90.83% { opacity: 1; transform: translateY(0) scale(1, 1); }
  95.83%, 99% { opacity: 0; transform: translateY(-6%) scale(.96, .96); }
  100% { opacity: 0; transform: translateY(-600%) scale(1, 1); }
}

@keyframes bsDrop5 {
  0%, 50.83% { opacity: 1; transform: translateY(-500%) scale(1, 1); animation-timing-function: cubic-bezier(.5, 0, .9, .6); }
  55% { transform: translateY(0) scale(1, 1); animation-timing-function: ease-out; }
  56% { transform: translateY(0) scale(1.14, .8); animation-timing-function: ease-in-out; }
  57.83% { transform: translateY(0) scale(.97, 1.06); animation-timing-function: ease-in-out; }
  59.83%, 90.83% { opacity: 1; transform: translateY(0) scale(1, 1); }
  95.83%, 99% { opacity: 0; transform: translateY(-6%) scale(.96, .96); }
  100% { opacity: 0; transform: translateY(-500%) scale(1, 1); }
}

@keyframes bsDrop6 {
  0%, 65.83% { opacity: 1; transform: translateY(-400%) scale(1, 1); animation-timing-function: cubic-bezier(.5, 0, .9, .6); }
  70% { transform: translateY(0) scale(1, 1); animation-timing-function: ease-out; }
  71% { transform: translateY(0) scale(1.14, .8); animation-timing-function: ease-in-out; }
  72.83% { transform: translateY(0) scale(.97, 1.06); animation-timing-function: ease-in-out; }
  74.83%, 90.83% { opacity: 1; transform: translateY(0) scale(1, 1); }
  95.83%, 99% { opacity: 0; transform: translateY(-6%) scale(.96, .96); }
  100% { opacity: 0; transform: translateY(-400%) scale(1, 1); }
}
/* Small screens: the stage keeps its proportions; only the copy column reflows. */
@media (max-width: 920px) {
  .bs-hero-media {
    justify-self: center;
  }
}

/* Reduced motion: no decorative animation; the static composition is the finished burger. */
@media (prefers-reduced-motion: reduce) {
  .bs-page-art,
  .bs-page-fx,
  .bs-page-rays,
  .bs-page-lamps,
  .bs-rain,
  .bs-tower,
  .bs-tower .bs-tile,
  .bs-ticket-bar i,
  .bs-perfect,
  .ug-steps li::after,
  .ug-vote h2::after {
    animation: none !important;
  }
}

/* Paused: the loop-based pieces show their finished state instead of freezing mid-fall (the shared rule freezes the rest). */
body.animations-paused .bs-tower .bs-tile,
body.animations-paused .bs-ticket-bar i,
body.animations-paused .bs-perfect,
body.animations-paused .ug-steps li::after,
body.animations-paused .ug-vote h2::after {
  animation: none;
}
