.unicorn-world {
  position: absolute;
  inset: 0;
  overflow: hidden;
  touch-action: none;
}
.unicorn-map-viewport {
  background: #dff9ff;
}
.unicorn-map-layer {
  position: absolute;
  left: 0;
  top: 0;
  width: 1800px;
  height: 1050px;
  background:
    radial-gradient(
      circle at 14% 18%,
      rgba(255, 255, 255, 0.38) 0 80px,
      transparent 82px
    ),
    radial-gradient(
      circle at 76% 16%,
      rgba(255, 216, 107, 0.25) 0 100px,
      transparent 104px
    ),
    url("../../data/mini_game_art/unicorn_rainbow_meadow.png") center / cover
      no-repeat;
  transition: transform 0.06s linear;
  will-change: transform;
}
.unicorn-map-layer::before {
  content: "";
  position: absolute;
  left: 110px;
  top: 210px;
  width: 1560px;
  height: 650px;
  border-radius: 50% 46% 42% 48%;
  background:
    repeating-linear-gradient(
      90deg,
      rgba(255, 138, 192, 0.1) 0 54px,
      rgba(255, 216, 107, 0.1) 54px 108px,
      rgba(123, 224, 200, 0.1) 108px 162px,
      rgba(136, 216, 245, 0.1) 162px 216px
    ),
    rgba(255, 255, 255, 0.04);
  border: 0;
  box-shadow: none;
  opacity: 0.5;
  pointer-events: none;
}
.unicorn-map-path {
  position: absolute;
  left: 120px;
  top: 300px;
  width: 1500px;
  height: 430px;
  border-radius: 46% 54% 48% 42%;
  background: linear-gradient(
    90deg,
    rgba(255, 138, 192, 0.28),
    rgba(255, 216, 107, 0.26),
    rgba(123, 224, 200, 0.26),
    rgba(136, 216, 245, 0.26),
    rgba(200, 155, 255, 0.28)
  );
  transform: rotate(-4deg);
  pointer-events: none;
}
.unicorn-map-vignette {
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
  background:
    radial-gradient(
      ellipse at 50% 46%,
      rgba(255, 255, 255, 0),
      rgba(93, 37, 77, 0.1) 74%,
      rgba(93, 37, 77, 0.22)
    ),
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.02),
      rgba(255, 255, 255, 0.16)
    );
}
.unicorn-map-crystal {
  left: 130px;
  top: 720px;
  width: 118px;
  height: 162px;
  opacity: 0.96;
}
.unicorn-map-crown-prop {
  left: 1515px;
  top: 365px;
  width: 142px;
  height: 108px;
  opacity: 0.96;
}
.unicorn-map-sign {
  position: absolute;
  left: 1455px;
  top: 320px;
  z-index: 4;
  padding: 7px 12px;
  border: 2px solid rgba(176, 53, 121, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  color: #6b2247;
  font:
    900 15px "Georgia",
    serif;
  box-shadow: 0 6px 16px rgba(107, 34, 71, 0.14);
}
.unicorn-kindness-card {
  position: absolute;
  left: min(455px, calc(100% - 358px));
  top: 84px;
  z-index: 5;
  width: 330px;
  max-width: calc(100% - 24px);
  padding: 11px 14px;
  border: 3px solid rgba(107, 34, 71, 0.18);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.88);
  color: #6b2247;
  box-shadow:
    0 12px 22px rgba(107, 34, 71, 0.14),
    0 0 22px rgba(255, 216, 107, 0.28);
  pointer-events: auto;
}
@media (max-width: 640px) {
  .unicorn-kindness-card {
    left: 12px;
    top: 84px;
  }
}
.unicorn-kindness-card b,
.unicorn-kindness-card span {
  display: block;
}
.unicorn-kindness-card b {
  margin-bottom: 4px;
  color: #b03579;
  font:
    900 12px "Arial Rounded MT Bold",
    "Trebuchet MS",
    Arial,
    sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.unicorn-kindness-card span {
  font:
    900 17px/1.18 "Georgia",
    serif;
}
.unicorn-proof-choices {
  display: grid;
  gap: 7px;
  margin-top: 8px;
}
.unicorn-proof-choices button {
  min-height: 40px;
  padding: 7px 10px;
  border: 2px solid rgba(129, 82, 170, 0.32);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #5b2142;
  font:
    900 11px/1.1 "Arial Rounded MT Bold",
    "Trebuchet MS",
    Arial,
    sans-serif;
}
.unicorn-proof-choices button.selected {
  border-color: rgba(119, 236, 147, 0.9);
  background: rgba(235, 255, 244, 0.96);
  color: #247543;
}
.unicorn-goal {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 3;
  max-width: min(560px, calc(100% - 132px));
  padding: 7px 12px;
  border: 2px solid rgba(176, 53, 121, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: #6b2247;
  font:
    900 13px "Georgia",
    serif;
  pointer-events: none;
}
.unicorn-runner {
  position: absolute;
  left: 180px;
  top: 610px;
  z-index: 5;
  width: 142px;
  height: 142px;
  transform: translate(-50%, -62%);
  background-image: url("../../data/unicorn_game/unicorn_walk_sheet_runtime.png");
  background-size: 400% 400%;
  background-position: 0 0;
  background-repeat: no-repeat;
  filter: drop-shadow(0 10px 12px rgba(107, 34, 71, 0.22));
  pointer-events: none;
  transition:
    filter 0.16s ease,
    scale 0.12s ease;
  image-rendering: auto;
}
.unicorn-runner.run-left {
  scale: -1 1;
}
.unicorn-runner.is-moving {
  animation: unicorn-bob 0.42s ease-in-out infinite alternate;
}
.unicorn-runner.run-down {
  animation: unicorn-down-prance 0.32s ease-in-out infinite;
}
.unicorn-runner.run-up {
  animation-duration: 0.38s;
}
.unicorn-runner.is-coasting {
  animation-duration: 0.56s;
}
.unicorn-runner.is-turning {
  animation:
    unicorn-bob 0.42s ease-in-out infinite alternate,
    unicorn-turn-settle 0.18s ease-out;
}
.unicorn-runner.glowing {
  filter: drop-shadow(0 10px 12px rgba(107, 34, 71, 0.22))
    drop-shadow(0 0 20px rgba(255, 255, 255, 0.95))
    drop-shadow(0 0 24px rgba(255, 216, 107, 0.72));
}
@keyframes unicorn-bob {
  from {
    translate: 0 -1px;
  }
  to {
    translate: 0 3px;
  }
}
@keyframes unicorn-down-prance {
  0%,
  100% {
    translate: 0 2px;
    rotate: -1deg;
  }
  50% {
    translate: 0 -9px;
    rotate: 1deg;
  }
}
@keyframes unicorn-turn-settle {
  0% {
    rotate: 0deg;
  }
  45% {
    rotate: -3deg;
  }
  100% {
    rotate: 0deg;
  }
}
.unicorn-wish {
  position: absolute;
  z-index: 4;
  width: 62px;
  height: 62px;
  transform: translate(-50%, -50%);
  border: 3px solid rgba(255, 255, 255, 0.82);
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 24%, #fff 0 14%, transparent 15%),
    conic-gradient(from 15deg, #ffd86b, #ff8ac0, #c89bff, #7be0c8, #ffd86b);
  color: #7a2a60;
  font-size: 0;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(176, 53, 121, 0.2);
}
.unicorn-wish.next {
  border-color: rgba(255, 216, 107, 0.94);
  box-shadow:
    0 10px 20px rgba(176, 53, 121, 0.18),
    0 0 0 9px rgba(255, 255, 255, 0.34),
    0 0 26px rgba(255, 216, 107, 0.78);
}
.unicorn-wish.waiting {
  opacity: 0.54;
  filter: saturate(0.8);
}
.unicorn-wish span {
  position: absolute;
  right: -4px;
  bottom: -6px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: #8a2f64;
  font-size: 17px;
  line-height: 28px;
}
.unicorn-wish em {
  position: absolute;
  left: 50%;
  top: 58px;
  min-width: 76px;
  transform: translateX(-50%);
  padding: 3px 8px;
  border: 2px solid rgba(122, 42, 96, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  color: #7a2a60;
  font:
    900 13px "Arial Rounded MT Bold",
    "Trebuchet MS",
    Arial,
    sans-serif;
  font-style: normal;
  line-height: 1.1;
  text-align: center;
  box-shadow: 0 8px 14px rgba(122, 42, 96, 0.14);
}
.unicorn-finish {
  position: absolute;
  left: 1160px;
  top: 520px;
  z-index: 5;
  width: 86px;
  height: 104px;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  border: 4px solid rgba(255, 255, 255, 0.74);
  border-radius: 999px 999px 18px 18px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.9),
    rgba(255, 216, 107, 0.84)
  );
  color: #b03579;
  font-size: 42px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.65;
  box-shadow: 0 10px 28px rgba(107, 34, 71, 0.18);
}
.unicorn-finish::after {
  content: "";
  position: absolute;
  inset: -22px;
  border-radius: 50%;
  border: 3px dashed rgba(255, 216, 107, 0.64);
  opacity: 0;
  pointer-events: none;
}
.unicorn-finish.ready {
  opacity: 1;
  animation: goal-ready 0.7s ease-in-out infinite alternate;
}
.unicorn-finish.ready::after {
  opacity: 1;
}
.unicorn-wish.collected {
  opacity: 0;
  transform: translate(-50%, -50%) scale(1.6) rotate(18deg);
  transition:
    opacity 0.22s ease,
    transform 0.22s ease;
}
.unicorn-controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 8;
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 12px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0),
    rgba(255, 255, 255, 0.72)
  );
  pointer-events: none;
}
.unicorn-controls button {
  min-width: 86px;
  height: 44px;
  border: 3px solid rgba(107, 34, 71, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: #6b2247;
  font:
    900 16px "Georgia",
    serif;
  cursor: pointer;
  pointer-events: auto;
  touch-action: none;
  user-select: none;
  box-shadow: 0 4px 0 rgba(107, 34, 71, 0.16);
}
.unicorn-controls button:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 rgba(107, 34, 71, 0.16);
}
@keyframes unicorn-map-wish {
  from {
    translate: 0 -5px;
  }
  to {
    translate: 0 7px;
  }
}
@keyframes unicorn-wait-nudge {
  25% {
    rotate: -8deg;
  }
  65% {
    rotate: 8deg;
  }
}
@media (prefers-reduced-motion: reduce) {
  .unicorn-map-layer,
  .unicorn-runner,
  .unicorn-wish.collected {
    transition: none;
  }

  .unicorn-runner.is-moving,
  .unicorn-runner.run-down,
  .unicorn-runner.run-up,
  .unicorn-runner.is-coasting,
  .unicorn-runner.is-turning,
  .unicorn-wish,
  .unicorn-wish.next,
  .unicorn-wish.kindness-wait,
  .unicorn-finish.ready {
    animation: none;
  }

  .unicorn-wish.collected {
    transform: translate(-50%, -50%) scale(1.08);
  }

  .unicorn-finish.ready::after {
    opacity: 0.45;
  }
}
.mini-game-board.butterfly-net {
  display: block;
  min-height: clamp(410px, 58vh, 540px);
  padding: 0;
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.08),
      rgba(229, 255, 232, 0.16)
    ),
    url("../../data/mini_game_worlds/butterfly_meadow_world_v2.png") center / cover
      no-repeat;
}
.butterfly-net-prop {
  display: none;
}
.butterfly-meadow {
  position: absolute;
  inset: 0;
  overflow: hidden;
  touch-action: none;
}
.butterfly-meadow::before,
.butterfly-meadow::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}
.butterfly-meadow::before {
  background:
    radial-gradient(
      circle at 18% 20%,
      rgba(255, 255, 255, 0.56) 0 2px,
      transparent 3px
    ),
    radial-gradient(
      circle at 42% 16%,
      rgba(255, 216, 107, 0.5) 0 2px,
      transparent 3px
    ),
    radial-gradient(
      circle at 74% 28%,
      rgba(255, 255, 255, 0.52) 0 2px,
      transparent 3px
    ),
    radial-gradient(
      circle at 86% 66%,
      rgba(200, 155, 255, 0.42) 0 3px,
      transparent 4px
    );
  animation: mini-world-twinkle 2.8s ease-in-out infinite alternate;
}
.butterfly-meadow::after {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0),
    rgba(255, 246, 251, 0.34)
  );
}
.butterfly-three-wrap {
  position: absolute;
  inset: 0;
  z-index: 2;
  opacity: 0;
  pointer-events: none;
}
.butterfly-three-wrap canvas {
  width: 100%;
  height: 100%;
  display: block;
}
.butterfly-sprite-layer {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
}
.butterfly-player-sprite {
  position: absolute;
  left: 12%;
  top: 72%;
  width: clamp(118px, 18vw, 172px);
  aspect-ratio: 220 / 240;
  transform: translate(-50%, -78%);
  background: url("../../data/butterfly_net/princess_net_swing_runtime.png") 0 0 /
    600% 100% no-repeat;
  filter: drop-shadow(0 12px 12px rgba(67, 76, 43, 0.22));
  image-rendering: auto;
}
.butterfly-catch-ring {
  position: absolute;
  left: 50%;
  top: 50%;
  width: clamp(116px, 18vw, 168px);
  aspect-ratio: 1;
  border: 4px solid rgba(255, 255, 255, 0.74);
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(255, 216, 107, 0.2),
    rgba(255, 255, 255, 0.06) 54%,
    transparent 62%
  );
  box-shadow:
    0 0 22px rgba(255, 216, 107, 0.58),
    inset 0 0 24px rgba(255, 255, 255, 0.32);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.5);
  transition:
    opacity 0.12s ease,
    transform 0.16s ease;
}
.butterfly-catch-ring.active {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  animation: butterfly-catch-ring 0.44s ease-out both;
}
.butterfly-player-sprite.walking {
  animation: butterfly-princess-walk 0.34s ease-in-out infinite alternate;
}
.butterfly-player-sprite.swinging {
  animation: butterfly-princess-swing 0.2s ease-in-out infinite alternate;
  filter: drop-shadow(0 12px 12px rgba(67, 76, 43, 0.22))
    drop-shadow(0 0 14px rgba(255, 216, 107, 0.72));
}
.butterfly-player-sprite.facing-left {
  scale: -1 1;
}
.butterfly-dom-sprite {
  position: absolute;
  left: 50%;
  top: 50%;
  width: clamp(60px, 9vw, 88px);
  aspect-ratio: 128 / 96;
  transform: translate(-50%, -50%);
  /* --bx/--by: per-frame position from butterfly-net.js (perf sweep 2026-09-24), in the
     individual `translate` so the target glow's `scale` never scales the offset. The
     float keyframes below carry the same vars (only this element uses them). */
  translate: var(--bx, 0px) var(--by, 0px);
  background: url("../../data/butterfly_net/butterfly_sheet_runtime.png") 0 0 / 400%
    100% no-repeat;
  filter: drop-shadow(0 6px 8px rgba(88, 53, 119, 0.2)) saturate(1.14);
  cursor: pointer;
  pointer-events: auto;
  animation: butterfly-float 0.62s ease-in-out infinite alternate;
}
.butterfly-dom-sprite.target {
  animation:
    butterfly-float 0.62s ease-in-out infinite alternate,
    butterfly-target-glow 0.9s ease-in-out infinite alternate;
}
.butterfly-dom-sprite.target::after {
  content: attr(data-word);
  position: absolute;
  left: 50%;
  top: -18px;
  transform: translateX(-50%);
  padding: 2px 7px;
  border: 2px solid rgba(107, 34, 71, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: #7a2a60;
  font:
    900 11px "Arial Rounded MT Bold",
    "Trebuchet MS",
    Arial,
    sans-serif;
  text-transform: capitalize;
  white-space: nowrap;
  box-shadow: 0 5px 10px rgba(88, 53, 119, 0.16);
}
.butterfly-dom-sprite.gold {
  filter: drop-shadow(0 6px 8px rgba(88, 53, 119, 0.2)) hue-rotate(35deg)
    saturate(1.1);
}
.butterfly-dom-sprite.blue {
  filter: drop-shadow(0 6px 8px rgba(88, 53, 119, 0.2)) hue-rotate(145deg)
    saturate(1.04);
}
.butterfly-dom-sprite.lavender {
  filter: drop-shadow(0 6px 8px rgba(88, 53, 119, 0.2)) hue-rotate(250deg)
    saturate(1.05);
}
.butterfly-dom-sprite.mint {
  filter: drop-shadow(0 6px 8px rgba(88, 53, 119, 0.2)) hue-rotate(104deg)
    saturate(1.08);
}
.butterfly-dom-sprite.caught {
  opacity: 0;
  transform: translate(-50%, -50%) scale(1.6) rotate(18deg);
  transition:
    opacity 0.18s ease,
    transform 0.18s ease;
}
.butterfly-jar-celebration {
  position: absolute;
  left: 50%;
  bottom: clamp(70px, 13vh, 118px);
  z-index: 8;
  width: min(560px, calc(100% - 28px));
  height: clamp(250px, 40vh, 330px);
  transform: translateX(-50%);
  pointer-events: none;
  animation: butterfly-celebration-pop 0.34s ease both;
}
.butterfly-celebration-princess {
  position: absolute;
  left: 10%;
  bottom: 0;
  width: clamp(126px, 23vw, 178px);
  aspect-ratio: 220 / 240;
  background: url("../../data/butterfly_net/princess_net_swing_runtime.png") 0 0 /
    600% 100% no-repeat;
  filter: drop-shadow(0 14px 14px rgba(67, 76, 43, 0.24));
  animation: butterfly-princess-happy 0.58s ease-in-out infinite alternate;
}
.butterfly-joy-jar {
  position: absolute;
  right: 4%;
  bottom: 6px;
  width: clamp(190px, 38vw, 270px);
  height: clamp(220px, 36vh, 300px);
  background: url("../../data/butterfly_net/butterfly_jar_generated.png") center /
    contain no-repeat;
  filter: drop-shadow(0 18px 24px rgba(98, 74, 128, 0.24))
    drop-shadow(0 0 30px rgba(255, 216, 107, 0.34));
}
.butterfly-joy-jar::before {
  content: "";
  position: absolute;
  left: 16%;
  right: 16%;
  top: 31%;
  bottom: 13%;
  border-radius: 42%;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.18),
    rgba(150, 238, 255, 0.08)
  );
  box-shadow: inset 0 0 28px rgba(255, 255, 255, 0.22);
}
.jar-shine {
  position: absolute;
  left: 28%;
  top: 34%;
  width: 18px;
  height: 42%;
  border-radius: 999px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.56),
    rgba(255, 255, 255, 0)
  );
  transform: rotate(12deg);
}
.butterfly-jar-orbit {
  position: absolute;
  left: 18%;
  right: 18%;
  top: 33%;
  bottom: 13%;
  overflow: hidden;
  border-radius: 42%;
}
.butterfly-jar-flutter {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 58px;
  aspect-ratio: 128 / 96;
  margin-left: -29px;
  margin-top: -22px;
  background: url("../../data/butterfly_net/butterfly_sheet_runtime.png") 0 0 / 400%
    100% no-repeat;
  animation:
    butterfly-jar-orbit 2.4s linear infinite,
    butterfly-jar-flap 0.42s steps(4) infinite;
  animation-delay: var(--delay), var(--delay);
  filter: drop-shadow(0 5px 6px rgba(88, 53, 119, 0.2));
}
.butterfly-jar-flutter.gold {
  filter: hue-rotate(35deg) saturate(1.1)
    drop-shadow(0 5px 6px rgba(88, 53, 119, 0.2));
}
.butterfly-jar-flutter.blue {
  filter: hue-rotate(145deg) saturate(1.04)
    drop-shadow(0 5px 6px rgba(88, 53, 119, 0.2));
}
.butterfly-jar-flutter.lavender {
  filter: hue-rotate(250deg) saturate(1.05)
    drop-shadow(0 5px 6px rgba(88, 53, 119, 0.2));
}
.butterfly-jar-flutter.mint {
  filter: hue-rotate(104deg) saturate(1.08)
    drop-shadow(0 5px 6px rgba(88, 53, 119, 0.2));
}
.butterfly-catch-sparkle {
  position: absolute;
  z-index: 7;
  transform: translate(-50%, -50%);
  padding: 4px 9px;
  border: 2px solid rgba(255, 255, 255, 0.86);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #6b2247;
  font:
    900 12px/1 "Arial Rounded MT Bold",
    "Trebuchet MS",
    Arial,
    sans-serif;
  text-transform: capitalize;
  pointer-events: none;
  animation: butterfly-catch-sparkle 0.72s ease-out both;
  box-shadow: 0 7px 14px rgba(88, 53, 119, 0.16);
}
.butterfly-catch-sparkle.pink {
  color: #a22268;
}
.butterfly-catch-sparkle.gold {
  color: #7a5514;
}
.butterfly-catch-sparkle.blue {
  color: #18688c;
}
.butterfly-catch-sparkle.lavender {
  color: #6540a7;
}
.butterfly-catch-sparkle.mint {
  color: #1f6e3b;
}
.butterfly-celebration-label {
  position: absolute;
  left: 50%;
  bottom: -8px;
  transform: translateX(-50%);
  min-width: min(360px, 80%);
  padding: 8px 14px;
  border: 3px solid rgba(176, 53, 121, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: #6b2247;
  font:
    900 15px/1.05 "Arial Rounded MT Bold",
    "Trebuchet MS",
    Arial,
    sans-serif;
  text-align: center;
  box-shadow: 0 9px 18px rgba(107, 34, 71, 0.14);
}
@keyframes butterfly-celebration-pop {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(18px) scale(0.94);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
  }
}
@keyframes butterfly-princess-happy {
  from {
    translate: 0 -2px;
  }
  to {
    translate: 0 6px;
  }
}
@keyframes butterfly-jar-orbit {
  from {
    transform: rotate(var(--angle)) translateX(64px) rotate(var(--angle-neg));
  }
  to {
    transform: rotate(calc(var(--angle) + 360deg)) translateX(64px)
      rotate(calc(var(--angle-neg) - 360deg));
  }
}
@keyframes butterfly-jar-flap {
  to {
    background-position: 100% 0;
  }
}
@keyframes butterfly-princess-walk {
  from {
    translate: 0 -2px;
  }
  to {
    translate: 0 5px;
  }
}
@keyframes butterfly-princess-swing {
  from {
    rotate: -3deg;
  }
  to {
    rotate: 4deg;
  }
}
@keyframes butterfly-float {
  from {
    translate: var(--bx, 0px) calc(var(--by, 0px) - 5px);
  }
  to {
    translate: var(--bx, 0px) calc(var(--by, 0px) + 6px);
  }
}
@keyframes butterfly-catch-ring {
  from {
    opacity: 0.9;
    transform: translate(-50%, -50%) scale(0.38);
  }
  to {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.2);
  }
}
@keyframes butterfly-catch-sparkle {
  from {
    opacity: 0;
    translate: 0 10px;
    scale: 0.82;
  }
  24% {
    opacity: 1;
    scale: 1.08;
  }
  to {
    opacity: 0;
    translate: 0 -26px;
    scale: 1;
  }
}
@keyframes butterfly-target-glow {
  from {
    scale: 1;
  }
  to {
    scale: 1.16;
  }
}
.butterfly-space-hint {
  position: absolute;
  top: 10px;
  left: 50%;
  z-index: 7;
  transform: translateX(-50%);
  padding: 6px 12px;
  border: 2px solid rgba(107, 34, 71, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: #6b2247;
  font:
    800 13px "Georgia",
    serif;
  pointer-events: none;
}
.butterfly-mission-chip {
  position: absolute;
  top: 46px;
  left: 50%;
  z-index: 7;
  transform: translateX(-50%);
  min-width: min(340px, calc(100% - 32px));
  padding: 7px 14px;
  border: 2px solid rgba(35, 124, 66, 0.25);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  color: #1f6e3b;
  font-family: "Arial Rounded MT Bold", "Trebuchet MS", Arial, sans-serif;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.15;
  text-align: center;
  box-shadow: 0 8px 18px rgba(35, 124, 66, 0.14);
  pointer-events: none;
}
.butterfly-mission-chip span {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 999px;
  text-transform: capitalize;
}
.butterfly-mission-chip strong {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: #6b2247;
}
.butterfly-mission-chip .pink {
  background: rgba(255, 127, 176, 0.18);
  color: #a22268;
}
.butterfly-mission-chip .gold {
  background: rgba(255, 216, 107, 0.24);
  color: #7a5514;
}
.butterfly-mission-chip .blue {
  background: rgba(118, 215, 255, 0.22);
  color: #18688c;
}
.butterfly-mission-chip .lavender {
  background: rgba(200, 155, 255, 0.22);
  color: #6540a7;
}
.butterfly-mission-chip .mint {
  background: rgba(123, 224, 200, 0.24);
  color: #1f6e3b;
}
.butterfly-mission-chip .current {
  outline: 3px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 0 3px rgba(255, 216, 107, 0.48);
}
.butterfly-controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9;
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0),
    rgba(255, 255, 255, 0.72)
  );
  pointer-events: none;
}
.butterfly-controls button {
  min-width: 46px;
  min-height: 46px;
  height: 46px;
  flex: 0 0 auto;
  padding: 0 12px;
  border: 3px solid rgba(138, 92, 255, 0.34);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: #6b2247;
  font:
    800 18px "Georgia",
    serif;
  cursor: pointer;
  pointer-events: auto;
  touch-action: none;
  user-select: none;
  box-shadow: 0 4px 0 rgba(107, 34, 71, 0.16);
}
.mini-game-board.sprout .mini-map-controls [data-water] {
  min-width: 104px;
}
.butterfly-controls button:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 rgba(107, 34, 71, 0.16);
}
.snow-run-world {
  position: absolute;
  left: 0;
  top: 0;
  width: max(980px, 128vw);
  height: 5760px;
  transform: translate(0, 0);
  transition: transform 0.03s linear;
  will-change: transform;
}
.snow-run-sky {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      circle at 135px 64px,
      rgba(255, 255, 255, 0.96) 0 30px,
      transparent 31px
    ),
    radial-gradient(
      circle at 192px 72px,
      rgba(255, 255, 255, 0.8) 0 38px,
      transparent 39px
    ),
    radial-gradient(
      circle at 560px 46px,
      rgba(244, 252, 255, 0.96) 0 28px,
      transparent 29px
    ),
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.42),
      rgba(197, 235, 255, 0.16)
    );
}
.snow-run-sky::before,
.snow-run-sky::after {
  content: none;
  position: absolute;
  bottom: 220px;
  width: 420px;
  height: 560px;
  background: linear-gradient(
    135deg,
    transparent 46%,
    #d9f5ff 47% 58%,
    #fff 59%
  );
  clip-path: polygon(0 100%, 50% 0, 100% 100%);
  filter: drop-shadow(0 8px 0 rgba(60, 120, 170, 0.1));
}
.snow-run-sky::before {
  left: -60px;
}
.snow-run-sky::after {
  right: -90px;
  transform: scale(1.28);
}
.snow-run-drift {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 210px;
  background:
    radial-gradient(circle at 38px 9px, #d9f5ff 0 8px, transparent 9px) 0 0 /
      82px 28px,
    linear-gradient(180deg, #fff 0%, #dcf6ff 62%, #a7d9f6 100%);
  border-top: 5px solid #ffffff;
  box-shadow: inset 0 12px 20px rgba(114, 181, 218, 0.16);
}
.mini-game-board.ice-skate-run .snow-run-drift {
  display: none;
}
.snow-run-track {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 5500px;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
}
.snow-run-lesson-card {
  position: absolute;
  left: 270px;
  top: 22px;
  z-index: 7;
  width: 430px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  padding: 10px;
  border: 3px solid rgba(46, 122, 172, 0.2);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.84);
  color: #17688c;
  box-shadow: 0 12px 22px rgba(46, 122, 172, 0.14);
  pointer-events: none;
}
.snow-run-lesson-card b {
  grid-column: 1 / -1;
  color: #17688c;
  font:
    900 12px "Arial Rounded MT Bold",
    "Trebuchet MS",
    Arial,
    sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.snow-run-lesson-card span {
  min-height: 28px;
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: center;
  gap: 6px;
  padding: 4px 8px 4px 4px;
  border: 2px solid rgba(46, 122, 172, 0.14);
  border-radius: 999px;
  background: rgba(235, 250, 255, 0.82);
  font:
    900 12px "Arial Rounded MT Bold",
    "Trebuchet MS",
    Arial,
    sans-serif;
}
.snow-run-lesson-card i {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  font-style: normal;
}
.snow-run-lesson-card span.done {
  border-color: rgba(123, 224, 200, 0.76);
  background: rgba(235, 255, 247, 0.9);
  color: #237c42;
}
.snow-run-lesson-card span.done i {
  font-size: 0;
}
.snow-run-lesson-card span.done i::before {
  content: "✓";
  font-size: 13px;
}
@media (max-width: 520px) {
  .mini-game-board.snow-run.snow-run-phone-course {
    overflow-x: clip;
  }
  .mini-game-board.snow-run.snow-run-phone-course .snow-run-lesson-card {
    box-sizing: border-box;
    left: 12px;
    top: 66px;
    width: calc(100% - 24px);
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
    padding: 7px;
    border-radius: 16px;
  }
  .mini-game-board.snow-run.snow-run-phone-course
    .snow-run-lesson-card
    span {
    min-width: 0;
  }
}
.ice-routine-panel {
  position: absolute;
  box-sizing: border-box;
  left: 50%;
  top: 24px;
  z-index: 8;
  display: grid;
  gap: 6px;
  width: min(430px, calc(100% - 32px));
  padding: 10px 12px;
  border: 3px solid rgba(64, 173, 220, 0.28);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.84);
  color: #17688c;
  box-shadow: 0 12px 22px rgba(46, 122, 172, 0.14);
  transform: translateX(-50%);
  pointer-events: none;
}
.ice-routine-panel b {
  font:
    900 12px "Arial Rounded MT Bold",
    "Trebuchet MS",
    Arial,
    sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.ice-routine-status {
  font:
    800 13px/1.2 "Trebuchet MS",
    Arial,
    sans-serif;
}
.ice-routine-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 30px;
}
.ice-routine-steps span {
  display: inline-grid;
  min-height: 28px;
  align-items: center;
  padding: 3px 9px;
  border: 2px solid rgba(46, 122, 172, 0.16);
  border-radius: 999px;
  background: rgba(235, 250, 255, 0.86);
  color: #285c86;
  font:
    900 12px "Arial Rounded MT Bold",
    "Trebuchet MS",
    Arial,
    sans-serif;
}
.ice-routine-panel.recording {
  border-color: rgba(255, 216, 107, 0.92);
  box-shadow:
    0 12px 22px rgba(46, 122, 172, 0.14),
    0 0 0 6px rgba(255, 236, 139, 0.25);
}
.mini-game-board.ice-skate-run .ice-routine-panel {
  position: fixed;
  left: max(14px, env(safe-area-inset-left));
  top: auto;
  bottom: calc(max(74px, env(safe-area-inset-bottom)) + 12px);
  width: min(360px, calc(100vw - 28px));
  transform: none;
}
.snow-run-track::before,
.snow-run-track::after {
  content: none;
  position: absolute;
  top: 0;
  bottom: 0;
  width: 44%;
  border-radius: 50%;
  border-left: 8px dashed rgba(255, 255, 255, 0.86);
  filter: drop-shadow(0 3px 0 rgba(74, 159, 214, 0.14));
}
.snow-run-track::before {
  left: 13%;
  transform: skewX(-13deg);
}
.snow-run-track::after {
  right: 13%;
  transform: skewX(13deg);
}
.snow-world-crystal {
  right: 42px;
  bottom: 82px;
  z-index: 2;
  opacity: 0;
  transform: scale(0.76) rotate(4deg);
}
.snow-run-princess {
  position: absolute;
  width: 106px;
  height: 106px;
  z-index: 6;
  background: url("../../data/mini_game_art/skiing_princess_sheet_v2_square.png?v=2")
    0 0 / 400% 400% no-repeat;
  filter: drop-shadow(0 10px 8px rgba(46, 122, 172, 0.26))
    drop-shadow(0 0 8px rgba(217, 245, 255, 0.45));
  transform: rotate(7deg);
  transform-origin: 50% 90%;
  transition: transform 0.12s ease;
}
.snow-run-princess.ice-skating {
  width: 150px;
  height: 150px;
  background-image: url("../../data/mini_game_art/ice_skating_princess_sheet_5row.png?v=1");
  background-size: 400% 500%;
  transform: rotate(2deg);
  transition: transform 0.18s ease;
}
.snow-run-princess::before {
  content: "";
  display: none;
}
.snow-run-princess::after {
  content: "";
  position: absolute;
  left: 24px;
  bottom: -8px;
  width: 68px;
  height: 13px;
  border-radius: 999px;
  background: rgba(88, 165, 210, 0.26);
}
.snow-run-princess.carving-up {
  transform: rotate(-16deg) translate(-4px, 2px);
}
.snow-run-princess.carving-down {
  transform: rotate(18deg) translate(4px, 2px);
}
.snow-run-princess.ice-skating.carving-up {
  transform: rotate(-9deg) translate(-6px, 1px);
}
.snow-run-princess.ice-skating.carving-down {
  transform: rotate(10deg) translate(6px, 1px);
}
.snow-run-princess.is-sliding {
  animation: snow-ski-bob 0.28s ease-in-out infinite alternate;
}
.snow-run-princess.ice-skating.is-sliding {
  animation: ice-skate-glide 0.72s ease-in-out infinite alternate;
}
.snow-run-princess.ice-skating.is-twirling {
  animation: ice-skate-twirl 0.38s ease-in-out infinite alternate;
  transform: rotate(0deg) translateY(-8px);
}
.ice-twirl-score-burst {
  position: absolute;
  z-index: 8;
  min-width: 46px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 3px solid rgba(255, 216, 107, 0.9);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: #b03579;
  font:
    900 18px "Arial Rounded MT Bold",
    "Trebuchet MS",
    Arial,
    sans-serif;
  pointer-events: none;
  filter: drop-shadow(0 6px 10px rgba(176, 53, 121, 0.18));
  animation: ice-twirl-score-pop 2.2s ease-out forwards;
}
.ice-twirl-score-burst::before,
.ice-twirl-score-burst::after {
  content: "✦";
  position: absolute;
  color: #7ddfff;
  text-shadow: 0 0 9px rgba(255, 255, 255, 0.95);
}
.ice-twirl-score-burst::before {
  left: -15px;
  top: -8px;
}
.ice-twirl-score-burst::after {
  right: -13px;
  bottom: -6px;
  color: #ffd86b;
}
.snow-run-princess.is-sliding::after {
  background: rgba(78, 176, 231, 0.44);
  box-shadow: 0 0 10px rgba(78, 176, 231, 0.35);
}
.snow-run-princess.run-left {
  transform: rotate(7deg);
}
.snow-run-princess.is-jumping {
  animation: snow-ski-bob 0.28s ease-in-out infinite alternate;
}
@keyframes snow-ski-bob {
  from {
    translate: 0 -2px;
  }
  to {
    translate: 0 3px;
  }
}
@keyframes ice-skate-glide {
  from {
    translate: -2px -1px;
  }
  to {
    translate: 2px 1px;
  }
}
@keyframes ice-skate-twirl {
  from {
    translate: 0 -5px;
  }
  to {
    translate: 0 -11px;
  }
}
@keyframes ice-twirl-score-pop {
  0% {
    opacity: 0;
    transform: translateY(4px) scale(0.72);
  }
  18% {
    opacity: 1;
    transform: translateY(-8px) scale(1.08);
  }
  72% {
    opacity: 1;
    transform: translateY(-34px) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(-48px) scale(0.92);
  }
}
.snow-run-crystal {
  position: absolute;
  z-index: 5;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-left: -16px;
  margin-bottom: -12px;
  border: 0;
  border-radius: 14px;
  background: radial-gradient(
    circle at 36% 28%,
    #fff,
    #baf2ff 48%,
    #5ac8ff 100%
  );
  color: #fff;
  font-size: 24px;
  line-height: 1;
  text-shadow: 0 2px 4px rgba(31, 91, 132, 0.36);
  box-shadow:
    0 0 22px rgba(120, 222, 255, 0.9),
    0 6px 0 rgba(31, 91, 132, 0.14);
  cursor: pointer;
  animation: snow-crystal 1.25s ease-in-out infinite alternate;
}
.snow-run-crystal::after {
  content: attr(data-count);
  position: absolute;
  right: -8px;
  bottom: -8px;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.92);
  border-radius: 50%;
  background: #2f5d91;
  color: #fff;
  font-size: 12px;
  line-height: 18px;
  box-shadow: 0 3px 0 rgba(31, 91, 132, 0.18);
}
.snow-run-crystal.collected {
  opacity: 0;
  transform: scale(1.9) rotate(30deg);
  transition:
    opacity 0.18s ease,
    transform 0.18s ease;
}
.snow-run-word-charm {
  position: absolute;
  z-index: 6;
  min-width: 70px;
  max-width: 128px;
  min-height: 44px;
  padding: 0 10px;
  border: 3px solid rgba(46, 122, 172, 0.28);
  border-radius: 999px;
  background:
    radial-gradient(
      circle at 20% 30%,
      rgba(255, 255, 255, 0.95),
      transparent 28%
    ),
    linear-gradient(180deg, #ffffff, #baf2ff);
  color: #2f5d91;
  font-family: "Arial Rounded MT Bold", "Trebuchet MS", Arial, sans-serif;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  box-shadow:
    0 8px 0 rgba(46, 122, 172, 0.13),
    0 0 18px rgba(132, 235, 255, 0.72);
  cursor: pointer;
  animation: snow-word-charm 1.55s ease-in-out infinite alternate;
}
.snow-run-word-charm::before {
  content: "❄";
  margin-right: 4px;
  color: #7b77d8;
}
.snow-run-word-charm.next {
  border-color: rgba(255, 215, 92, 0.96);
  box-shadow:
    0 8px 0 rgba(46, 122, 172, 0.13),
    0 0 0 6px rgba(255, 236, 139, 0.42),
    0 0 28px rgba(255, 236, 139, 0.9);
}
.snow-run-word-charm.collected {
  opacity: 0;
  transform: translateY(-18px) scale(1.18);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}
@keyframes snow-word-charm {
  from {
    transform: translateY(-4px);
  }
  to {
    transform: translateY(5px);
  }
}
.snow-run-gate {
  position: absolute;
  z-index: 4;
  width: 118px;
  height: 92px;
  border: 0;
  padding: 0;
  background: transparent;
  pointer-events: auto;
  cursor: pointer;
}
.snow-run-gate:focus-visible {
  outline: 4px solid #ffd86b;
  outline-offset: 5px;
}
.snowboard-3d-ready .snow-run-gate::before {
  content: "";
  position: absolute;
  left: 17px;
  right: 17px;
  bottom: 27px;
  height: 24px;
  border-block: 2px solid #ff8bd0;
  background: linear-gradient(165deg, rgba(255, 238, 250, 0.55), rgba(255, 69, 167, 0.22) 45%, rgba(255, 172, 220, 0.4));
  box-shadow: 0 0 9px rgba(255, 61, 166, 0.45), inset 0 2px 3px rgba(255, 255, 255, 0.7);
  pointer-events: none;
}
.snowboard-3d-ready .snow-run-gate {
  --gate-hue: #ff58ae !important;
}
.snow-run-gate span {
  position: absolute;
  bottom: 0;
  width: 7px;
  height: 82px;
  border-radius: 999px;
  background: linear-gradient(180deg, #fff, var(--gate-hue));
  box-shadow: 0 4px 0 rgba(46, 122, 172, 0.16);
}
.snow-run-gate span:first-child {
  left: 14px;
  transform: rotate(-5deg);
}
.snow-run-gate span:nth-child(2) {
  right: 14px;
  transform: rotate(5deg);
}
.snow-run-gate strong {
  position: absolute;
  left: 50%;
  bottom: 62px;
  transform: translateX(-50%);
  min-width: 72px;
  padding: 4px 9px;
  border: 2px solid rgba(46, 122, 172, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: #285c86;
  font:
    900 13px "Arial Rounded MT Bold",
    "Trebuchet MS",
    Arial,
    sans-serif;
  text-align: center;
}
.snow-run-gate.cleared {
  opacity: 0.38;
}
.snow-run-gate.cleared strong {
  color: #23824a;
}
.snow-run-gate.missed {
  opacity: 0.58;
  filter: saturate(0.72);
}
.snow-run-gate.missed strong {
  border-color: rgba(138, 38, 74, 0.24);
  color: #8a264a;
}
.snow-run-igloo {
  position: absolute;
  z-index: 4;
  width: 228px;
  height: 172px;
  margin-left: -34px;
  margin-top: -58px;
  background: url("../../data/mini_game_art/snow_igloo_goal.png?v=1") center / contain
    no-repeat;
  filter: drop-shadow(0 0 24px rgba(139, 226, 255, 0.82))
    drop-shadow(0 10px 0 rgba(46, 122, 172, 0.14));
  cursor: pointer;
}
.snow-run-igloo.ready {
  animation: goal-ready 0.7s ease-in-out infinite alternate;
}
.snow-storybook {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 16px;
  background:
    radial-gradient(
      circle at 50% 40%,
      rgba(255, 255, 255, 0.16),
      transparent 46%
    ),
    rgba(19, 54, 86, 0.46);
  backdrop-filter: blur(4px);
}
.snow-story-card {
  width: min(620px, 94vw);
  max-height: min(620px, 92vh);
  display: grid;
  grid-template-rows: minmax(250px, 1fr) auto auto;
  gap: 10px;
  padding: 12px;
  border: 4px solid rgba(255, 255, 255, 0.9);
  border-radius: 18px;
  background: linear-gradient(180deg, #f5fcff, #d9f5ff);
  color: #285c86;
  box-shadow: 0 26px 70px rgba(20, 82, 122, 0.36);
}
.snow-story-scene {
  position: relative;
  min-height: 270px;
  overflow: hidden;
  border-radius: 12px;
  background:
    radial-gradient(
      circle at 50% 28%,
      rgba(255, 255, 255, 0.9) 0 56px,
      transparent 58px
    ),
    url("../../data/mini_game_worlds/snowflake_ski_course_variety_v3_fullcourse.png")
      center 88% / cover no-repeat;
}
.snow-story-character {
  position: absolute;
  border: 0;
  background-color: transparent;
  background-repeat: no-repeat;
  background-position: center bottom;
  background-size: contain;
  cursor: pointer;
  transform-origin: 50% 88%;
}
.snow-story-character span {
  position: absolute;
  left: 50%;
  bottom: -4px;
  transform: translateX(-50%);
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: #285c86;
  font:
    900 12px "Arial Rounded MT Bold",
    "Trebuchet MS",
    Arial,
    sans-serif;
  box-shadow: 0 8px 14px rgba(20, 82, 122, 0.16);
}
.snow-story-princess {
  left: 16%;
  bottom: 12px;
  width: 148px;
  height: 148px;
  background-image: url("../../data/mini_game_art/skiing_princess_sheet_v2_square.png?v=2");
  background-size: 400% 400%;
  background-position: 0 0;
}
.snow-story-princess.ice-skating {
  background-image: url("../../data/mini_game_art/ice_skating_princess_sheet_5row.png?v=1");
  background-size: 400% 500%;
}
.snow-story-yeti {
  right: 12%;
  bottom: 4px;
  width: 190px;
  height: 210px;
  background-image: url("../../data/mini_game_art/snow_yeti_skier.png?v=1");
}
.snow-story-character.wiggle {
  animation: snow-story-wiggle 0.58s ease;
}
.snow-story-copy {
  min-height: 92px;
  padding: 10px 12px;
  border: 2px solid rgba(46, 122, 172, 0.14);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.84);
  font:
    900 0.95rem "Trebuchet MS",
    Arial,
    sans-serif;
}
.snow-story-copy b {
  display: block;
  margin-bottom: 4px;
  color: #b23d82;
  font-size: 1.08rem;
}
.snow-story-copy p {
  margin: 3px 0;
}
.snow-story-finish {
  justify-self: center;
  min-height: 46px;
  padding: 0 18px;
  border: 3px solid rgba(46, 122, 172, 0.24);
  border-radius: 999px;
  background: linear-gradient(180deg, #fff, #ffd86b);
  color: #285c86;
  font:
    900 1rem "Arial Rounded MT Bold",
    "Trebuchet MS",
    Arial,
    sans-serif;
  cursor: pointer;
}
@keyframes snow-story-wiggle {
  0%,
  100% {
    transform: rotate(0deg) translateY(0);
  }
  35% {
    transform: rotate(-7deg) translateY(-10px);
  }
  70% {
    transform: rotate(6deg) translateY(-4px);
  }
}
.snow-run-flake {
  position: absolute;
  z-index: 2;
  color: rgba(255, 255, 255, 0.92);
  font-size: 20px;
  text-shadow: 0 0 7px rgba(83, 174, 224, 0.5);
  animation: snow-fall 2.8s ease-in-out infinite alternate;
}
.snow-run-controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9;
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 12px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0),
    rgba(245, 253, 255, 0.76)
  );
  pointer-events: none;
}
.snow-run-controls button {
  min-width: 76px;
  height: 44px;
  padding: 0 16px;
  border: 3px solid rgba(46, 122, 172, 0.36);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  color: #285c86;
  font:
    800 18px "Georgia",
    serif;
  cursor: pointer;
  pointer-events: auto;
  touch-action: none;
  user-select: none;
  box-shadow: 0 4px 0 rgba(46, 122, 172, 0.16);
}
.snow-run-controls button:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 rgba(46, 122, 172, 0.16);
}
.mini-game-board.snowboard-3d-ready .snow-run-world :is(.snow-run-crystal, .snow-run-gate, .snow-run-igloo) {
  display: none;
}
.snow-run-controls [data-snow-jump] {
  background: #dcf4ff;
  touch-action: manipulation;
}
.snow-run-controls [data-snow-jump]:disabled {
  opacity: 0.7;
  cursor: default;
}
.snow-run-recovery-cue {
  position: absolute;
  left: 50%;
  bottom: 86px;
  z-index: 12;
  display: none;
  min-width: min(310px, calc(100% - 28px));
  padding: 11px 18px;
  transform: translateX(-50%);
  border: 3px solid #7c2455;
  border-radius: 20px;
  background: rgba(255, 247, 252, 0.97);
  box-shadow: 0 8px 0 rgba(96, 31, 68, 0.22);
  color: #4d1737;
  font-family: "Baloo 2", system-ui, sans-serif;
  text-align: center;
}
.snow-run-recovery-cue strong,
.snow-run-recovery-cue span {
  display: block;
}
.snow-run-recovery-cue strong {
  font-size: 21px;
  line-height: 1;
}
.snow-run-recovery-cue span {
  margin-top: 3px;
  font-size: 15px;
  font-weight: 800;
}
.mini-game-board.snow-run-needs-recovery .snow-run-recovery-cue {
  display: block;
}
.snow-run-controls [data-snow-slow].is-recovery {
  min-width: 132px;
  min-height: 64px;
  height: 64px;
  border-color: #7c2455;
  background: #fff4b8;
  box-shadow: 0 6px 0 #7c2455;
  color: #4d1737;
  font-size: 20px;
  font-weight: 900;
}
.snow-run-controls.ice-skate-controls {
  position: fixed;
  gap: 8px;
  background: none;
}
.snow-run-controls.ice-skate-controls button {
  min-width: 58px;
  padding: 0 12px;
}
.snow-run-controls.ice-skate-controls [data-snow-slow] {
  min-width: 92px;
}
.snow-run-controls.ice-skate-controls [data-ice-record] {
  min-width: 104px;
  border-color: rgba(176, 53, 121, 0.28);
  color: #8a3f7b;
}
.snow-run-controls.ice-skate-controls [data-ice-record][aria-pressed="true"] {
  background: linear-gradient(180deg, #fff, #ffe89d);
  border-color: rgba(255, 216, 107, 0.86);
  color: #6b2247;
}
@media (max-width: 520px) {
  body.mini-game-page-open .mini-game-board.cupcake-map .cupcake-map-guide {
    display: none;
  }
  body.mini-game-page-open .mini-game-board.cupcake-map .cupcake-map-recipe-board {
    top: 148px;
    width: min(320px, calc(100% - 48px));
  }
  body.mini-game-page-open .mini-game-board.cupcake-map .cupcake-bake-now {
    right: 14px;
    bottom: calc(max(168px, env(safe-area-inset-bottom)) + 10px);
    min-width: 128px;
    min-height: 48px;
    padding: 8px 14px;
    font-size: 14px;
  }
  .snow-run-controls.ice-skate-controls {
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 10px;
  }
  .snow-run-controls.ice-skate-controls button {
    min-width: 50px;
    height: 48px;
    padding: 0 10px;
  }
  .snow-run-controls.ice-skate-controls [data-snow-slow] {
    min-width: 76px;
  }
  .snow-run-controls.ice-skate-controls [data-ice-record] {
    min-width: 86px;
  }
  body.mini-game-page-open .mini-game-board.ice-skate-run .ice-routine-panel {
    bottom: calc(max(116px, env(safe-area-inset-bottom)) + 10px);
    gap: 4px;
    padding: 8px 10px;
  }
  .ice-routine-status {
    font-size: 12px;
  }
  .ice-routine-steps {
    gap: 4px;
    min-height: 26px;
  }
  .ice-routine-steps span {
    min-height: 24px;
    padding: 2px 7px;
    font-size: 11px;
  }
}
@keyframes snow-crystal {
  from {
    transform: translateY(-5px) rotate(-7deg);
  }
  to {
    transform: translateY(5px) rotate(7deg);
  }
}
@keyframes snow-fall {
  from {
    transform: translateY(-8px);
    opacity: 0.55;
  }
  to {
    transform: translateY(14px);
    opacity: 1;
  }
}
@keyframes goal-ready {
  from {
    transform: scale(1);
    filter: brightness(1);
  }
  to {
    transform: scale(1.08);
    filter: brightness(1.16);
  }
}
