/* WillowinWorlds CSS: Sandwich Stack page (games/sandwich-stack.html). Loaded after upcoming-game.css.
   Signature element: a sandwich built on a cutting board. Layers slide in from alternating sides, drop onto the stack
   and a press squashes it while crumbs puff out. The composition is landscape and warm, on purpose the opposite of the
   portrait, vertical Burger Stack page. Only transform and opacity are animated. The static composition is the finished
   sandwich, so reduced motion and the pause button show a complete picture. */

body[data-game="sandwich-stack"] {
  --ss-wood: #B5773A;
  --ss-wood-dark: #6E4220;
  --ss-crust: #D4893A;
  --ss-ink: #2E1A0B;
  --ss-sprite: url("../assets/upcoming/sandwich-stack/gallery-04.webp");
  --ss-photo: url("../assets/upcoming/sandwich-stack/hero-1280.webp");
  --ug-motif:
    linear-gradient(90deg, color-mix(in srgb, var(--ug-accent-2) 13%, transparent) 50%, transparent 50%) 0 0 / 64px 64px,
    linear-gradient(0deg, color-mix(in srgb, var(--ug-accent-2) 13%, transparent) 50%, transparent 50%) 0 0 / 64px 64px;
}

/* Hero: the copy column is narrower so the landscape stage can breathe. */
body[data-game="sandwich-stack"] .ug-hero-layout {
  grid-template-columns: minmax(0, 0.84fr) minmax(0, 1.16fr);
}

@media (max-width: 920px) {
  body[data-game="sandwich-stack"] .ug-hero-layout {
    grid-template-columns: 1fr;
  }
}

/* Order slips: three real numbers from the build, drawn as torn tickets. */
.ss-hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.ss-hero-stats li {
  display: grid;
  gap: 2px;
  padding: 10px 18px 10px 16px;
  border: 2px dashed var(--ug-accent);
  border-radius: 6px;
  background: color-mix(in srgb, var(--ug-card) 92%, transparent);
  transform: rotate(var(--r, -1.5deg));
  transition: transform 0.3s cubic-bezier(0.3, 1.5, 0.5, 1);
}

.ss-hero-stats li:nth-child(2) { --r: 1deg; }
.ss-hero-stats li:nth-child(3) { --r: -0.5deg; }

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

.ss-hero-stats span {
  color: var(--ug-muted);
  font-size: 0.9rem;
  font-weight: 760;
}

@media (hover: hover) {
  .ss-hero-stats li:hover {
    transform: rotate(0deg) translateY(-3px);
  }
}

/* Hero stage: a landscape counter scene. */
.ss-hero-media {
  position: relative;
  min-width: 0;
  margin: 0;
}

.ss-hero-media figcaption {
  margin-top: 16px;
  color: var(--ug-ink);
  font-size: 0.9rem;
  font-weight: 760;
  line-height: 1.45;
}

.ss-stage {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  container-type: inline-size;
  aspect-ratio: 16 / 11;
  border-radius: 24px;
  background: #8C7A52;
  box-shadow:
    0 0 0 6px var(--ss-wood-dark),
    0 0 0 8px #E0AC68,
    0 30px 60px var(--ug-shadow);
}

/* The photo is the blurred kitchen behind the build area; the sharp version sits on the order card. */
.ss-bg {
  position: absolute;
  top: -45cqw;
  left: 0;
  z-index: -2;
  width: 246cqw;
  max-width: none;
  height: auto;
  filter: blur(7px) saturate(1.1);
  transform-origin: 20% 50%;
}

.ss-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse at 40% 60%, transparent 35%, rgba(50, 25, 6, 0.34) 100%),
    linear-gradient(180deg, rgba(255, 240, 205, 0.12), rgba(60, 30, 8, 0.2));
}

.ss-light {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(112deg, rgba(255, 238, 190, 0.6), transparent 52%);
  opacity: 0.6;
  pointer-events: none;
}

.ss-chip {
  position: absolute;
  z-index: 5;
  top: 4cqw;
  left: 4cqw;
  padding: 1.1cqw 2.6cqw;
  border-radius: 99px;
  color: var(--ss-ink);
  background: #FBF1DA;
  box-shadow: 0 0.6cqw 1.6cqw rgba(40, 20, 5, 0.35);
  font-size: clamp(10px, 2.8cqw, 15px);
  font-weight: 850;
  letter-spacing: 0.04em;
  line-height: 1.1;
}

.ss-chip::before {
  content: "";
  display: inline-block;
  width: 1.5cqw;
  height: 1.5cqw;
  margin-inline-end: 1.3cqw;
  border-radius: 50%;
  background: #BB4822;
  vertical-align: 0.1cqw;
}

/* Cutting board on a gingham napkin. */
.ss-napkin {
  position: absolute;
  z-index: 1;
  left: 2cqw;
  bottom: 3cqw;
  width: 76cqw;
  height: 17cqw;
  border-radius: 1cqw;
  background:
    repeating-conic-gradient(rgba(255, 255, 255, 0.92) 0 25%, #86B07C 0 50%) 0 0 / 4.4cqw 4.4cqw;
  box-shadow: 0 1cqw 2cqw rgba(40, 20, 5, 0.3);
  transform: rotate(-1.2deg);
}

.ss-board {
  position: absolute;
  z-index: 1;
  left: 7cqw;
  bottom: 5.5cqw;
  width: 66cqw;
  height: 12cqw;
  border-radius: 4cqw;
  background:
    repeating-linear-gradient(176deg, rgba(110, 60, 20, 0.16) 0 0.25cqw, transparent 0.25cqw 1.5cqw),
    linear-gradient(180deg, #E3AE6B, #C9893F);
  box-shadow:
    0 1.6cqw 0 #8E5A2A,
    0 3cqw 3cqw rgba(40, 20, 5, 0.4),
    inset 0 0.5cqw 0 rgba(255, 255, 255, 0.35);
}

/* The sandwich. Layers are drawn in code, one block each, sized in cqw so the stage scales as a whole. */
.ss-stack {
  position: absolute;
  z-index: 2;
  left: calc(40cqw - 22cqw);
  bottom: 10cqw;
  width: 44cqw;
  height: 26cqw;
  transform-origin: 50% 100%;
  animation: ssSquash 11s linear infinite;
}

.ss-stack::before {
  content: "";
  position: absolute;
  left: 3cqw;
  right: 3cqw;
  bottom: -1.2cqw;
  height: 3cqw;
  border-radius: 50%;
  background: rgba(50, 25, 5, 0.38);
  filter: blur(4px);
}

.ss-layer {
  position: absolute;
  left: calc(50% - var(--w) / 2);
  bottom: calc(var(--y) * 1cqw);
  width: var(--w);
  height: calc(var(--h) * 1cqw);
  transform-origin: 50% 100%;
  animation: linear infinite 11s;
}

.ss-l0 { --w: 40cqw; --h: 6.6; --y: 0; animation: none; }
.ss-l1 { --w: 44cqw; --h: 4.2; --y: 5.8; animation-name: ssLayer1; }
.ss-l2 { --w: 37.5cqw; --h: 3.8; --y: 9.4; animation-name: ssLayer2; }
.ss-l3 { --w: 41cqw; --h: 3.2; --y: 12.5; animation-name: ssLayer3; }
.ss-l4 { --w: 39cqw; --h: 3.8; --y: 15.2; animation-name: ssLayer4; }
.ss-l5 { --w: 40cqw; --h: 7; --y: 18.4; animation-name: ssLayer5; }

.ss-bread {
  border-radius: 3cqw 3cqw 1.6cqw 1.6cqw / 3cqw 3cqw 1.2cqw 1.2cqw;
  background:
    radial-gradient(circle at 18% 55%, rgba(170, 112, 46, 0.5) 0 0.35cqw, transparent 0.5cqw) 0 0 / 4.1cqw 2.7cqw,
    radial-gradient(circle at 60% 40%, rgba(170, 112, 46, 0.4) 0 0.28cqw, transparent 0.45cqw) 1.3cqw 0.9cqw / 3.3cqw 2.3cqw,
    linear-gradient(180deg, #F8E5B4, #F1D18F);
  border: 0.55cqw solid #C77E2E;
  border-top-width: 1.2cqw;
  border-bottom-width: 1.2cqw;
  box-shadow:
    inset 0 0 0 0.25cqw rgba(255, 236, 190, 0.45),
    0 0.7cqw 1.2cqw rgba(50, 25, 5, 0.35);
  box-sizing: border-box;
}

.ss-top {
  border-radius: 5.4cqw 5.4cqw 1.4cqw 1.4cqw / 4.6cqw 4.6cqw 1.2cqw 1.2cqw;
}

.ss-top::before {
  content: "";
  position: absolute;
  top: 0.45cqw;
  left: 18%;
  width: 40%;
  height: 1.2cqw;
  border-radius: 99px;
  background: rgba(255, 244, 214, 0.55);
}

.ss-lettuce {
  background:
    repeating-linear-gradient(96deg, rgba(255, 255, 255, 0.2) 0 0.3cqw, transparent 0.3cqw 3.2cqw),
    linear-gradient(180deg, #B0DA62 0, #7DB93F 55%, #5A9831 100%);
  -webkit-mask: radial-gradient(circle 1cqw at 50% 0, transparent 0.92cqw, #000 0.98cqw) top / 2.5cqw 52% repeat-x, radial-gradient(circle 1cqw at 50% 100%, transparent 0.92cqw, #000 0.98cqw) bottom / 2.5cqw 52% repeat-x;
  mask: radial-gradient(circle 1cqw at 50% 0, transparent 0.92cqw, #000 0.98cqw) top / 2.5cqw 52% repeat-x, radial-gradient(circle 1cqw at 50% 100%, transparent 0.92cqw, #000 0.98cqw) bottom / 2.5cqw 52% repeat-x;
}

.ss-tomato {
  border-radius: 1.9cqw;
  background:
    radial-gradient(ellipse 5cqw 1cqw at 16% 40%, rgba(255, 190, 160, 0.55), transparent 90%),
    radial-gradient(ellipse 5cqw 1cqw at 52% 55%, rgba(255, 190, 160, 0.5), transparent 90%),
    radial-gradient(ellipse 5cqw 1cqw at 86% 40%, rgba(255, 190, 160, 0.55), transparent 90%),
    linear-gradient(180deg, #EE5B3F, #C8392A);
  box-shadow: 0 0.5cqw 0.9cqw rgba(50, 20, 5, 0.3);
}

.ss-cheese {
  border-radius: 0.5cqw;
  background:
    radial-gradient(ellipse 0.8cqw 0.5cqw at 22% 50%, rgba(190, 120, 10, 0.5), transparent 90%),
    radial-gradient(ellipse 0.6cqw 0.4cqw at 70% 40%, rgba(190, 120, 10, 0.5), transparent 90%),
    linear-gradient(180deg, #FFDC6A, #F3B52A);
  box-shadow: 0 0.4cqw 0.8cqw rgba(60, 30, 0, 0.28);
}

.ss-cheese::after {
  content: "";
  position: absolute;
  right: 3cqw;
  bottom: -1.5cqw;
  width: 6cqw;
  height: 1.8cqw;
  background: #F3B52A;
  clip-path: polygon(0 0, 100% 0, 78% 100%, 18% 100%);
}

.ss-ham {
  border-radius: 1.8cqw;
  background:
    repeating-linear-gradient(100deg, rgba(255, 255, 255, 0.22) 0 0.4cqw, transparent 0.4cqw 4.4cqw),
    linear-gradient(180deg, #F6B1B3, #E07E8A);
  box-shadow: 0 0.5cqw 0.9cqw rgba(60, 20, 20, 0.3);
}

.ss-crumbs {
  position: absolute;
  z-index: 3;
  left: calc(40cqw - 28cqw);
  bottom: 9cqw;
  width: 56cqw;
  height: 28cqw;
  opacity: 0.7;
  background:
    radial-gradient(circle at 3% 86%, #E8B467 0 0.7cqw, transparent 0.8cqw),
    radial-gradient(circle at 7% 62%, #C98A3E 0 0.6cqw, transparent 0.7cqw),
    radial-gradient(circle at 2% 42%, #F6DDA0 0 0.65cqw, transparent 0.75cqw),
    radial-gradient(circle at 9% 78%, #F6DDA0 0 0.5cqw, transparent 0.6cqw),
    radial-gradient(circle at 5% 24%, #E8B467 0 0.6cqw, transparent 0.7cqw),
    radial-gradient(circle at 97% 82%, #E8B467 0 0.7cqw, transparent 0.8cqw),
    radial-gradient(circle at 93% 58%, #F6DDA0 0 0.6cqw, transparent 0.7cqw),
    radial-gradient(circle at 98% 38%, #C98A3E 0 0.65cqw, transparent 0.75cqw),
    radial-gradient(circle at 91% 72%, #C98A3E 0 0.5cqw, transparent 0.6cqw),
    radial-gradient(circle at 95% 18%, #E8B467 0 0.6cqw, transparent 0.7cqw);
  animation: ssCrumbs 11s linear infinite;
  pointer-events: none;
}

.ss-press {
  position: absolute;
  z-index: 4;
  left: calc(40cqw - 25cqw);
  bottom: 36.2cqw;
  width: 50cqw;
  height: 4.6cqw;
  border-radius: 1.2cqw;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.5), transparent 40%),
    linear-gradient(180deg, #8A9097, #4A4F55);
  box-shadow: 0 1cqw 2cqw rgba(30, 15, 5, 0.4);
  transform: translateY(-50cqw);
  animation: ssPress 11s linear infinite;
}

.ss-press::before {
  content: "";
  position: absolute;
  left: 38%;
  bottom: 100%;
  width: 24%;
  height: 4.4cqw;
  border-radius: 1.6cqw 1.6cqw 0 0;
  background: linear-gradient(180deg, #7B4A24, #5A3418);
}

/* The order card: the real menu photo, sharp, taped to the scene. */
.ss-order {
  position: absolute;
  z-index: 5;
  top: 6cqw;
  right: 4.5cqw;
  display: grid;
  gap: 1.2cqw;
  width: 25cqw;
  padding: 1.5cqw 1.5cqw 1.7cqw;
  border-radius: 0.8cqw;
  color: var(--ss-ink);
  background: #FFF8E6;
  box-shadow: 0 1cqw 2.4cqw rgba(40, 20, 5, 0.4);
  transform: rotate(3deg);
}

.ss-order::before {
  content: "";
  position: absolute;
  top: -1.6cqw;
  left: 50%;
  width: 9cqw;
  height: 3cqw;
  background: rgba(224, 186, 120, 0.8);
  transform: translateX(-50%) rotate(-3deg);
}

.ss-order img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: 62% 52%;
  border-radius: 0.4cqw;
}

.ss-order b {
  font-size: clamp(10px, 2.8cqw, 14px);
  font-weight: 850;
  letter-spacing: 0.14em;
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
}

/* Page-wide world. A fixed, layered backdrop behind every section: the menu photo blurred into warm counter bokeh,
   a scrim that keeps all text above 4.5:1, window light, two gingham napkins and two depths of drifting crumbs.
   The sections keep their cards. Motion is transform only: a slow drift and slowly falling crumbs. */
body.upcoming-game-page[data-game="sandwich-stack"] {
  isolation: isolate;
}

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

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

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

.ss-page-art {
  position: absolute;
  inset: -5%;
  transform-origin: 70% 40%;
}

.ss-page-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 80% 45%;
}

/* Scrim: darkens (or lightens) the photo for the text on it and adds window light and a tomato glow. */
.ss-page-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(ellipse 60% 50% at 6% 0%, rgba(255, 214, 140, 0.2), transparent 70%),
    radial-gradient(ellipse 50% 40% at 94% 72%, rgba(187, 72, 34, 0.16), transparent 70%),
    linear-gradient(180deg, rgba(30, 16, 6, 0.55) 0%, rgba(37, 21, 9, 0.6) 50%, rgba(24, 14, 6, 0.78) 100%);
}

body[data-theme="light"] .ss-page-bg::before {
  background:
    radial-gradient(ellipse 60% 50% at 6% 0%, rgba(255, 244, 205, 0.7), transparent 70%),
    radial-gradient(ellipse 50% 40% at 94% 72%, rgba(187, 72, 34, 0.08), transparent 70%),
    linear-gradient(180deg, rgba(251, 241, 218, 0.74) 0%, rgba(250, 238, 212, 0.78) 55%, rgba(244, 231, 200, 0.86) 100%);
}

/* Gingham napkins at two corners, faded into the scene. */
.ss-page-napkin {
  position: absolute;
  z-index: 2;
  background: repeating-conic-gradient(rgba(255, 255, 255, 0.9) 0 25%, #86B07C 0 50%) 0 0 / 56px 56px;
  opacity: 0.1;
  -webkit-mask-image: radial-gradient(ellipse at 50% 50%, #000 18%, transparent 72%);
  mask-image: radial-gradient(ellipse at 50% 50%, #000 18%, transparent 72%);
}

.ss-page-napkin--a {
  left: -10vw;
  bottom: -8vh;
  width: 58vw;
  height: 36vh;
  transform: rotate(-7deg);
}

.ss-page-napkin--b {
  right: -12vw;
  top: 8vh;
  width: 42vw;
  height: 28vh;
  transform: rotate(9deg);
}

body[data-theme="light"] .ss-page-napkin {
  opacity: 0.24;
}

/* Vignette. */
.ss-page-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 5;
  background: radial-gradient(ellipse at 50% 50%, transparent 55%, rgba(20, 10, 3, 0.5) 100%);
}

body[data-theme="light"] .ss-page-bg::after {
  background: radial-gradient(ellipse at 50% 50%, transparent 60%, rgba(181, 119, 58, 0.2) 100%);
}

/* Rain of ingredients. A static wrapper hides the middle (the hero text and the 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. Every sprite
   sits in a lane by a fraction (--k) of the lane's width, so the lanes fill at any window size. */
.ss-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));
}

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

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

.ss-rain--far {
  opacity: 0.7;
  background-repeat: repeat-y;
  background-size: 100% 50%;
  background-image:
    radial-gradient(circle 3px at 7% 12%, #F6DDA0 0 60%, transparent 100%),
    radial-gradient(circle 2.5px at 19% 46%, #C98A3E 0 60%, transparent 100%),
    radial-gradient(circle 3.5px at 33% 78%, #E8B467 0 60%, transparent 100%),
    radial-gradient(circle 2.5px at 47% 24%, #F6DDA0 0 60%, transparent 100%),
    radial-gradient(circle 3px at 58% 62%, #C98A3E 0 60%, transparent 100%),
    radial-gradient(circle 3.5px at 72% 9%, #E8B467 0 60%, transparent 100%),
    radial-gradient(circle 2.5px at 83% 53%, #F6DDA0 0 60%, transparent 100%),
    radial-gradient(circle 3px at 94% 86%, #C98A3E 0 60%, transparent 100%);
}

.ss-rain--near {
  opacity: 0.9;
}

.ss-rain i {
  --side: 0;
  --k: 0.5;
  --y: 0;
  --s: 4;
  --r: 0deg;
  position: absolute;
  top: calc(var(--y) * 1%);
  left: calc(var(--gl) * var(--k) + var(--side) * (100vw - var(--gl)) - var(--s) * 0.5vmin);
  width: calc(var(--s) * 1vmin);
  aspect-ratio: 1;
  transform: rotate(var(--r));
}

/* Seven ingredients, drawn from the same colours as the hero sandwich. */
.ss-rain i:nth-child(7n + 1) {
  aspect-ratio: 1 / 0.92;
  border-radius: 42% 42% 14% 14% / 50% 50% 14% 14%;
  background:
    radial-gradient(circle at 30% 55%, rgba(170, 112, 46, 0.5) 0 6%, transparent 9%) 0 0 / 38% 42%,
    linear-gradient(180deg, #F8E5B4, #F1D18F);
  box-shadow: inset 0 0 0 0.35vmin #C77E2E;
}

.ss-rain i:nth-child(7n + 2) {
  border-radius: 50%;
  background:
    radial-gradient(circle, #FFC1A8 0 9%, transparent 10%),
    repeating-conic-gradient(from 15deg, rgba(255, 200, 170, 0.55) 0 16deg, transparent 16deg 60deg),
    radial-gradient(circle, #F0644A 0 62%, #C8392A 63% 82%, #A12B1F 83%);
}

.ss-rain i:nth-child(7n + 3) {
  border-radius: 8%;
  background:
    radial-gradient(ellipse 12% 9% at 30% 38%, rgba(190, 120, 10, 0.55) 0 70%, transparent 75%),
    radial-gradient(ellipse 9% 7% at 68% 62%, rgba(190, 120, 10, 0.55) 0 70%, transparent 75%),
    linear-gradient(180deg, #FFDC6A, #F3B52A);
}

.ss-rain i:nth-child(7n + 4) {
  border-radius: 46% 54% 40% 60% / 52% 44% 56% 48%;
  background:
    repeating-linear-gradient(100deg, rgba(255, 255, 255, 0.24) 0 3%, transparent 3% 18%),
    linear-gradient(180deg, #B0DA62, #6AA735 60%, #4F8A28);
}

.ss-rain i:nth-child(7n + 5) {
  aspect-ratio: 1.25;
  border-radius: 46%;
  background:
    repeating-linear-gradient(100deg, rgba(255, 255, 255, 0.24) 0 3%, transparent 3% 22%),
    linear-gradient(180deg, #F6B1B3, #E07E8A);
}

.ss-rain i:nth-child(7n + 6) {
  border-radius: 50%;
  background: radial-gradient(circle, #CDE59B 0 38%, #9CC25A 40% 70%, #6E9A3A 72%);
}

.ss-rain i:nth-child(7n) {
  border-radius: 50%;
  background: radial-gradient(circle, transparent 0 36%, #C77AB0 38% 56%, #E3A8D0 57% 62%, transparent 64%);
}

.ss-rain--far .ss-half i:nth-child(1) { --side: 0; --k: 0.58; --y: -1.3; --s: 3.8; --r: -11deg; }
.ss-rain--far .ss-half i:nth-child(2) { --side: 1; --k: 0.51; --y: 7.9; --s: 5; --r: 41deg; }
.ss-rain--far .ss-half i:nth-child(3) { --side: 0; --k: 0.47; --y: 14.8; --s: 4.4; --r: -62deg; }
.ss-rain--far .ss-half i:nth-child(4) { --side: 1; --k: 0.42; --y: 21.3; --s: 4.4; --r: -41deg; }
.ss-rain--far .ss-half i:nth-child(5) { --side: 0; --k: 0.11; --y: 27.4; --s: 3.2; --r: -48deg; }
.ss-rain--far .ss-half i:nth-child(6) { --side: 1; --k: 0.59; --y: 36.9; --s: 5; --r: -65deg; }
.ss-rain--far .ss-half i:nth-child(7) { --side: 0; --k: 0.2; --y: 44.1; --s: 5; --r: 17deg; }
.ss-rain--far .ss-half i:nth-child(8) { --side: 1; --k: 0.39; --y: 50.0; --s: 3.2; --r: -23deg; }
.ss-rain--far .ss-half i:nth-child(9) { --side: 0; --k: 0.38; --y: 57.2; --s: 3.2; --r: -10deg; }
.ss-rain--far .ss-half i:nth-child(10) { --side: 1; --k: 0.57; --y: 63.2; --s: 3.2; --r: -17deg; }
.ss-rain--far .ss-half i:nth-child(11) { --side: 0; --k: 0.17; --y: 69.4; --s: 5; --r: 51deg; }
.ss-rain--far .ss-half i:nth-child(12) { --side: 1; --k: 0.22; --y: 78.1; --s: 5; --r: -33deg; }
.ss-rain--far .ss-half i:nth-child(13) { --side: 0; --k: 0.28; --y: 86.1; --s: 5; --r: 45deg; }
.ss-rain--far .ss-half i:nth-child(14) { --side: 1; --k: 0.29; --y: 91.1; --s: 5; --r: 54deg; }

.ss-rain--near .ss-half i:nth-child(1) { --side: 0; --k: 0.46; --y: -1.4; --s: 7.5; --r: 63deg; }
.ss-rain--near .ss-half i:nth-child(2) { --side: 1; --k: 0.44; --y: 16.3; --s: 10.5; --r: 11deg; }
.ss-rain--near .ss-half i:nth-child(3) { --side: 0; --k: 0.69; --y: 26.5; --s: 7.5; --r: -42deg; }
.ss-rain--near .ss-half i:nth-child(4) { --side: 1; --k: 0.5; --y: 44.2; --s: 9; --r: 19deg; }
.ss-rain--near .ss-half i:nth-child(5) { --side: 0; --k: 0.31; --y: 60.0; --s: 7.5; --r: 8deg; }
.ss-rain--near .ss-half i:nth-child(6) { --side: 1; --k: 0.16; --y: 68.4; --s: 7.5; --r: -54deg; }
.ss-rain--near .ss-half i:nth-child(7) { --side: 0; --k: 0.56; --y: 83.1; --s: 7.5; --r: 25deg; }

/* Window light: a warm band that sweeps slowly across the room and back. */
.ss-page-light {
  position: absolute;
  top: -10vh;
  left: 0;
  z-index: 3;
  width: 180vw;
  height: 120vh;
  background: linear-gradient(98deg, transparent 38%, rgba(255, 226, 160, 0.16) 45%, rgba(255, 238, 196, 0.3) 50%, rgba(255, 226, 160, 0.16) 55%, transparent 62%);
  transform: translateX(-40vw);
}

body[data-theme="light"] .ss-page-light {
  background: linear-gradient(98deg, transparent 38%, rgba(255, 255, 255, 0.18) 45%, rgba(255, 255, 255, 0.42) 50%, rgba(255, 255, 255, 0.18) 55%, transparent 62%);
}

/* Steam from the pans: soft blooms that rise through the room, two screens tall and rising by one. */
.ss-page-steam {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 3;
  width: 100%;
  height: 200vh;
  opacity: 0.8;
  background-repeat: repeat-y;
  background-size: 100% 50%;
  background-image:
    radial-gradient(ellipse 9vw 15vh at 14% 24%, rgba(255, 244, 222, 0.2), transparent 72%),
    radial-gradient(ellipse 11vw 17vh at 36% 52%, rgba(255, 244, 222, 0.16), transparent 72%),
    radial-gradient(ellipse 8vw 13vh at 58% 18%, rgba(255, 244, 222, 0.18), transparent 72%),
    radial-gradient(ellipse 10vw 16vh at 78% 64%, rgba(255, 244, 222, 0.2), transparent 72%),
    radial-gradient(ellipse 7vw 12vh at 90% 30%, rgba(255, 244, 222, 0.16), transparent 72%),
    radial-gradient(ellipse 9vw 14vh at 24% 82%, rgba(255, 244, 222, 0.18), transparent 72%),
    radial-gradient(ellipse 11vw 15vh at 66% 90%, rgba(255, 244, 222, 0.16), transparent 72%),
    radial-gradient(ellipse 7vw 11vh at 48% 36%, rgba(255, 244, 222, 0.14), transparent 72%);
}

body[data-theme="light"] .ss-page-steam {
  opacity: 0.9;
}

/* 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(--ss-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="sandwich-stack"][data-theme="dark"] {
  --ss-scrim: rgba(26, 14, 5, 0.84);
}

body[data-game="sandwich-stack"][data-theme="light"] {
  --ss-scrim: rgba(252, 244, 224, 0.88);
}

/* The caption under the stage sits straight on the room, so it gets a small plate. */
.ss-hero-media figcaption {
  width: fit-content;
  max-width: 100%;
  padding: 8px 14px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--ug-card) 90%, transparent);
}

/* Small screens: no steam, no window light, no falling ingredients (their lanes are a sliver there); the room stays. */
@media (max-width: 760px) {
  .ss-page-img {
    opacity: 0.42;
  }

  .ss-page-light,
  .ss-page-steam,
  .ss-rains {
    display: none;
  }
}

/* Sections. */
body.upcoming-game-page[data-game="sandwich-stack"] .soft-card {
  position: relative;
  overflow: hidden;
  padding-top: calc(clamp(24px, 4vw, 38px) + 8px);
  background: linear-gradient(160deg, color-mix(in srgb, var(--ug-card) 82%, transparent), color-mix(in srgb, var(--ug-card) 75%, transparent));
}

body[data-game="sandwich-stack"] .soft-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 8px;
  background: repeating-conic-gradient(var(--ug-accent-2) 0 25%, color-mix(in srgb, var(--ug-card) 80%, #fff) 0 50%) 0 0 / 8px 8px;
  opacity: 0.8;
}

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

body[data-game="sandwich-stack"] .btn:active {
  transform: translateY(2px) scale(0.97, 0.93);
}

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

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

.ug-facts .game-page-facts > div {
  border-block-start: 4px solid var(--ug-fill);
  transition: transform 0.3s ease, border-color 0.25s ease;
}

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

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

.ug-steps li::before {
  content: "";
  display: block;
  height: 64px;
  margin: -2px 0 14px;
  border-radius: 12px;
  background:
    linear-gradient(180deg, #E3AE6B, #C9893F);
}

.ug-steps li:nth-child(2)::before {
  background:
    linear-gradient(90deg, #B26E26 0 0) 50% calc(100% - 4px) / 56px 14px no-repeat,
    linear-gradient(180deg, #E3AE6B, #C9893F);
}

.ug-steps li::after {
  content: "";
  position: absolute;
  top: 33px;
  left: calc(50% - 28px);
  width: 56px;
  height: 14px;
  border-radius: 7px;
  transform-origin: 50% 100%;
}

.ug-steps li:nth-child(1)::after {
  --t: 40px;
  --u: calc(var(--t) / 162);
  top: 28px;
  left: calc(50% - 20px);
  width: var(--t);
  height: auto;
  aspect-ratio: 162 / 170;
  border-radius: 20%;
  background: var(--ss-sprite) no-repeat;
  background-size: calc(960 * var(--u)) calc(768 * var(--u));
  background-position: calc(-592 * var(--u)) calc(-11 * var(--u));
  box-shadow: 0 3px 5px rgba(50, 25, 5, 0.35);
  animation: ssStepPick 4.4s ease-in-out infinite;
}

.ug-steps li:nth-child(2)::after {
  top: 48px;
  background: linear-gradient(180deg, #86C14A, #5A9831);
  animation: ssStepPress 4.6s linear infinite;
}

.ug-steps li:nth-child(3)::after {
  top: 31px;
  left: calc(50% - 28px);
  width: 56px;
  height: 31px;
  border-radius: 0;
  background:
    linear-gradient(180deg, #F1D18F 0 0) 0 0 / 100% 9px no-repeat,
    linear-gradient(180deg, #E07E8A 0 0) 4px 11px / calc(100% - 8px) 5px no-repeat,
    linear-gradient(180deg, #F3B52A 0 0) 2px 17px / calc(100% - 4px) 4px no-repeat,
    linear-gradient(180deg, #F1D18F 0 0) 0 22px / 100% 9px no-repeat;
  animation: ssStepWobble 3.6s ease-in-out infinite alternate;
}

@media (hover: hover) {
  .ug-steps li:hover {
    transform: translateY(-4px);
    border-color: var(--ug-accent);
  }
}

/* Feature cards: a round crop of the menu photo leads each title and tips over on hover or focus. */
.ug-features .detail-card,
.ug-faq .detail-card,
.ug-next li {
  transition: transform 0.3s ease, border-color 0.25s ease, box-shadow 0.3s ease;
}

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

.ug-features .detail-card h3::before {
  --m: 2.1rem;
  --k: calc(var(--m) / var(--md));
  content: "";
  display: block;
  flex: none;
  width: var(--m);
  height: var(--m);
  border-radius: 50%;
  border: 2px solid var(--ug-card);
  background: var(--ss-photo) no-repeat;
  background-size: calc(1280 * var(--k)) auto;
  background-position: calc(var(--m) / 2 - var(--mx) * var(--k)) calc(var(--m) / 2 - var(--my) * var(--k));
  box-shadow: 0 0 0 2px var(--ug-accent), 0 3px 6px rgba(50, 25, 5, 0.3);
  box-sizing: border-box;
  transform: rotate(-8deg);
  transition: transform 0.35s cubic-bezier(0.3, 1.6, 0.5, 1);
}

.ug-features .detail-card:nth-child(1) h3::before { --mx: 765; --my: 280; --md: 190; }
.ug-features .detail-card:nth-child(2) h3::before { --mx: 770; --my: 395; --md: 150; }
.ug-features .detail-card:nth-child(3) h3::before { --mx: 1120; --my: 160; --md: 130; }
.ug-features .detail-card:nth-child(4) h3::before { --mx: 487; --my: 502; --md: 125; }
.ug-features .detail-card:nth-child(5) h3::before { --mx: 90; --my: 140; --md: 150; }
.ug-features .detail-card:nth-child(6) h3::before { --mx: 1180; --my: 435; --md: 130; }

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

@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);
    box-shadow: 0 16px 30px var(--ug-shadow);
  }
}

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

/* Gallery: the picker panel on top, the two backdrops and the tile sheet below, a little like prints on a counter. */
body[data-game="sandwich-stack"] .ug-gallery--3 {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 0.8fr) minmax(0, 1.4fr);
  gap: 16px;
  align-items: start;
  columns: auto;
}

body[data-game="sandwich-stack"] .ug-gallery--3 .ug-shot {
  margin: 0;
  transform: rotate(var(--r, 0deg));
  transition: transform 0.35s ease, border-color 0.25s ease;
}

body[data-game="sandwich-stack"] .ug-gallery--3 .ug-shot--strip {
  --r: 0deg;
  grid-column: 1 / -1;
  max-width: none;
}

body[data-game="sandwich-stack"] .ug-gallery--3 .ug-shot:nth-child(2) { --r: -1.2deg; }
body[data-game="sandwich-stack"] .ug-gallery--3 .ug-shot:nth-child(3) { --r: 1deg; }
body[data-game="sandwich-stack"] .ug-gallery--3 .ug-shot:nth-child(4) { --r: -0.6deg; }

@media (hover: hover) {
  body[data-game="sandwich-stack"] .ug-gallery--3 .ug-shot:hover {
    --r: 0deg;
    border-color: var(--ug-accent);
    transform: translateY(-4px);
  }
}

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

  body[data-game="sandwich-stack"] .ug-gallery--3 .ug-shot:nth-child(4) {
    grid-column: 1 / -1;
  }
}

/* Voting: a tiny press squashes a mini sandwich beside the heading. */
.ug-vote {
  position: relative;
}

.ug-vote h2::after {
  content: "";
  display: inline-block;
  width: 2.2rem;
  height: 1.7rem;
  margin-inline-start: 0.6rem;
  vertical-align: -0.15em;
  background:
    linear-gradient(180deg, #F1D18F 0 0) 0 0 / 100% 36% no-repeat,
    linear-gradient(180deg, #E07E8A 0 0) 6% 40% / 88% 14% no-repeat,
    linear-gradient(180deg, #F3B52A 0 0) 3% 57% / 94% 11% no-repeat,
    linear-gradient(180deg, #F1D18F 0 0) 0 70% / 100% 30% no-repeat;
  border-radius: 8px 8px 4px 4px;
  transform-origin: 50% 100%;
  animation: ssMiniPress 4.8s ease-in-out infinite;
}

@media (min-width: 1200px) {
  .ug-vote::after {
    content: "";
    position: absolute;
    top: 28px;
    right: 40px;
    width: min(16%, 190px);
    aspect-ratio: 960 / 768;
    border: 6px solid #FFF8E6;
    border-radius: 6px;
    background: var(--ss-sprite) center / cover no-repeat;
    box-shadow: 0 12px 24px rgba(50, 25, 5, 0.35);
    transform: rotate(3deg);
    pointer-events: none;
  }
}

body[data-game="sandwich-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="sandwich-stack"] .social-link:hover,
body[data-game="sandwich-stack"] .social-link:focus-visible {
  transform: translateY(-3px);
}

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

@keyframes ssRise {
  from { transform: translateY(0); }
  to { transform: translateY(-100vh); }
}

@keyframes ssLight {
  from { transform: translateX(-70vw); }
  to { transform: translateX(30vw); }
}

@keyframes ssStepPick {
  0%, 55%, 100% { transform: translateY(0) scale(1); }
  66% { transform: translateY(-9px) scale(1.06); }
  78% { transform: translateY(0) scale(1.1, 0.88); }
  88% { transform: translateY(0) scale(0.98, 1.03); }
}

@keyframes ssStepPress {
  0%, 6% { opacity: 0; transform: translate(-170px, -14px); }
  7% { opacity: 1; transform: translate(-170px, -14px); animation-timing-function: cubic-bezier(0.2, 0.9, 0.3, 1); }
  24% { transform: translate(0, -14px); animation-timing-function: ease-in; }
  30% { transform: translate(0, 0) scale(1, 1); animation-timing-function: ease-out; }
  35% { transform: translate(0, 0) scale(1.08, 0.7); animation-timing-function: ease-in-out; }
  42%, 82% { opacity: 1; transform: translate(0, 0) scale(1, 1); }
  92%, 100% { opacity: 0; transform: translate(0, 0) scale(1, 1); }
}

@keyframes ssStepWobble {
  from { transform: rotate(-3.5deg); }
  to { transform: rotate(3.5deg); }
}

@keyframes ssMiniPress {
  0%, 60%, 100% { transform: scale(1, 1); }
  68% { transform: scale(1.08, 0.8); }
  78% { transform: scale(0.98, 1.05); }
  88% { transform: scale(1, 1); }
}

@keyframes ssLayer1 {
  0%, 3.64% { opacity: 0; transform: translate(-85cqw, -5cqw); animation-timing-function: cubic-bezier(.2, .9, .3, 1); }
  3.91% { opacity: 1; transform: translate(-85cqw, -5cqw); animation-timing-function: cubic-bezier(.2, .9, .3, 1); }
  9.09% { opacity: 1; transform: translate(0, -5cqw) scale(1, 1); animation-timing-function: ease-in; }
  10.73% { transform: translate(0, 0) scale(1, 1); animation-timing-function: ease-out; }
  11.82% { transform: translate(0, 0) scale(1.05, .8); animation-timing-function: ease-in-out; }
  13.45% { transform: translate(0, 0) scale(.99, 1.05); animation-timing-function: ease-in-out; }
  15.27%, 90% { opacity: 1; transform: translate(0, 0) scale(1, 1); animation-timing-function: linear; }
  94.55%, 99% { opacity: 0; transform: translate(0, 1.5cqw) scale(.97, .97); }
  100% { opacity: 0; transform: translate(-85cqw, -5cqw); }
}

@keyframes ssLayer2 {
  0%, 16.36% { opacity: 0; transform: translate(85cqw, -5cqw); animation-timing-function: cubic-bezier(.2, .9, .3, 1); }
  16.64% { opacity: 1; transform: translate(85cqw, -5cqw); animation-timing-function: cubic-bezier(.2, .9, .3, 1); }
  21.82% { opacity: 1; transform: translate(0, -5cqw) scale(1, 1); animation-timing-function: ease-in; }
  23.45% { transform: translate(0, 0) scale(1, 1); animation-timing-function: ease-out; }
  24.55% { transform: translate(0, 0) scale(1.05, .8); animation-timing-function: ease-in-out; }
  26.18% { transform: translate(0, 0) scale(.99, 1.05); animation-timing-function: ease-in-out; }
  28%, 90% { opacity: 1; transform: translate(0, 0) scale(1, 1); animation-timing-function: linear; }
  94.55%, 99% { opacity: 0; transform: translate(0, 1.5cqw) scale(.97, .97); }
  100% { opacity: 0; transform: translate(85cqw, -5cqw); }
}

@keyframes ssLayer3 {
  0%, 29.09% { opacity: 0; transform: translate(-85cqw, -5cqw); animation-timing-function: cubic-bezier(.2, .9, .3, 1); }
  29.36% { opacity: 1; transform: translate(-85cqw, -5cqw); animation-timing-function: cubic-bezier(.2, .9, .3, 1); }
  34.55% { opacity: 1; transform: translate(0, -5cqw) scale(1, 1); animation-timing-function: ease-in; }
  36.18% { transform: translate(0, 0) scale(1, 1); animation-timing-function: ease-out; }
  37.27% { transform: translate(0, 0) scale(1.05, .8); animation-timing-function: ease-in-out; }
  38.91% { transform: translate(0, 0) scale(.99, 1.05); animation-timing-function: ease-in-out; }
  40.73%, 90% { opacity: 1; transform: translate(0, 0) scale(1, 1); animation-timing-function: linear; }
  94.55%, 99% { opacity: 0; transform: translate(0, 1.5cqw) scale(.97, .97); }
  100% { opacity: 0; transform: translate(-85cqw, -5cqw); }
}

@keyframes ssLayer4 {
  0%, 41.82% { opacity: 0; transform: translate(85cqw, -5cqw); animation-timing-function: cubic-bezier(.2, .9, .3, 1); }
  42.09% { opacity: 1; transform: translate(85cqw, -5cqw); animation-timing-function: cubic-bezier(.2, .9, .3, 1); }
  47.27% { opacity: 1; transform: translate(0, -5cqw) scale(1, 1); animation-timing-function: ease-in; }
  48.91% { transform: translate(0, 0) scale(1, 1); animation-timing-function: ease-out; }
  50% { transform: translate(0, 0) scale(1.05, .8); animation-timing-function: ease-in-out; }
  51.64% { transform: translate(0, 0) scale(.99, 1.05); animation-timing-function: ease-in-out; }
  53.45%, 90% { opacity: 1; transform: translate(0, 0) scale(1, 1); animation-timing-function: linear; }
  94.55%, 99% { opacity: 0; transform: translate(0, 1.5cqw) scale(.97, .97); }
  100% { opacity: 0; transform: translate(85cqw, -5cqw); }
}

@keyframes ssLayer5 {
  0%, 54.55% { opacity: 0; transform: translate(-85cqw, -5cqw); animation-timing-function: cubic-bezier(.2, .9, .3, 1); }
  54.82% { opacity: 1; transform: translate(-85cqw, -5cqw); animation-timing-function: cubic-bezier(.2, .9, .3, 1); }
  60% { opacity: 1; transform: translate(0, -5cqw) scale(1, 1); animation-timing-function: ease-in; }
  61.64% { transform: translate(0, 0) scale(1, 1); animation-timing-function: ease-out; }
  62.73% { transform: translate(0, 0) scale(1.05, .8); animation-timing-function: ease-in-out; }
  64.36% { transform: translate(0, 0) scale(.99, 1.05); animation-timing-function: ease-in-out; }
  66.18%, 90% { opacity: 1; transform: translate(0, 0) scale(1, 1); animation-timing-function: linear; }
  94.55%, 99% { opacity: 0; transform: translate(0, 1.5cqw) scale(.97, .97); }
  100% { opacity: 0; transform: translate(-85cqw, -5cqw); }
}

@keyframes ssPress {
  0%, 65.45% { transform: translateY(-50cqw); animation-timing-function: cubic-bezier(.5, 0, .9, .6); }
  68.91% { transform: translateY(0); animation-timing-function: ease-out; }
  69.64%, 72.27% { transform: translateY(1.9cqw); animation-timing-function: ease-in-out; }
  78.18%, 100% { transform: translateY(-50cqw); }
}

@keyframes ssSquash {
  0%, 68.64% { transform: scale(1, 1); animation-timing-function: ease-out; }
  69.64% { transform: scale(1.035, .92); animation-timing-function: ease-in-out; }
  71.36% { transform: scale(.995, 1.018); animation-timing-function: ease-in-out; }
  73.64%, 100% { transform: scale(1, 1); }
}

@keyframes ssCrumbs {
  0% { opacity: 0; transform: scale(.5, .5); }
  10.73% { opacity: 0; transform: scale(.55, .5); animation-timing-function: ease-out; }
  11.64% { opacity: 0.5; transform: scale(1, 1); animation-timing-function: ease-in; }
  17.09% { opacity: 0; transform: scale(1.25, 1.12) translateY(-1cqw); }
  23.45% { opacity: 0; transform: scale(.55, .5); animation-timing-function: ease-out; }
  24.36% { opacity: 0.5; transform: scale(1, 1); animation-timing-function: ease-in; }
  29.82% { opacity: 0; transform: scale(1.25, 1.12) translateY(-1cqw); }
  36.18% { opacity: 0; transform: scale(.55, .5); animation-timing-function: ease-out; }
  37.09% { opacity: 0.5; transform: scale(1, 1); animation-timing-function: ease-in; }
  42.55% { opacity: 0; transform: scale(1.25, 1.12) translateY(-1cqw); }
  48.91% { opacity: 0; transform: scale(.55, .5); animation-timing-function: ease-out; }
  49.82% { opacity: 0.55; transform: scale(1, 1); animation-timing-function: ease-in; }
  55.27% { opacity: 0; transform: scale(1.3, 1.12) translateY(-1cqw); }
  61.64% { opacity: 0; transform: scale(.55, .5); animation-timing-function: ease-out; }
  62.55% { opacity: 0.6; transform: scale(1, 1); animation-timing-function: ease-in; }
  68% { opacity: 0; transform: scale(1.35, 1.12) translateY(-1cqw); }
  69.27% { opacity: 0; transform: scale(.55, .5); animation-timing-function: ease-out; }
  70.18% { opacity: 1; transform: scale(1, 1); animation-timing-function: ease-in; }
  75.64% { opacity: 0; transform: scale(1.9, 1.12) translateY(-1cqw); }
  100% { opacity: 0; transform: scale(.5, .5); }
}

/* Backdrop motion. Budget: 16 infinite animations on the page (4 backdrop, 8 in the hero stage, 4 on the cards). */
@media (prefers-reduced-motion: no-preference) {
  .ss-rain--far {
    animation: ssFall 90s linear infinite;
  }

  .ss-rain--near {
    animation: ssFall 56s linear infinite;
  }

  .ss-page-steam {
    animation: ssRise 70s linear infinite;
  }

  .ss-page-light {
    animation: ssLight 26s ease-in-out infinite alternate;
  }
}

/* Reduced motion: no decorative animation; the static composition is the finished sandwich. */
@media (prefers-reduced-motion: reduce) {
  .ss-stack,
  .ss-layer,
  .ss-press,
  .ss-crumbs,
  .ug-steps li::after,
  .ug-vote h2::after {
    animation: none !important;
  }
}

/* Paused: the loop-based pieces show their finished state instead of freezing mid-slide (the shared rule freezes the rest). */
body.animations-paused .ss-stack,
body.animations-paused .ss-layer,
body.animations-paused .ss-press,
body.animations-paused .ss-crumbs,
body.animations-paused .ug-steps li::after,
body.animations-paused .ug-vote h2::after {
  animation: none;
}
