:root {
  --bg: #2a1650;
  --ink: #2a1038;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --cabinet: #f48fb1;
  --cabinet-dark: #ad1457;
  --glass: #fff7fb;
  --marquee: #ff80ab;
  --floor: #ffc1e3;
  --accent: #ec407a;
}

@font-face {
  font-family: "Fredoka";
  src: url("fonts/fredoka-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Fredoka";
  src: url("fonts/fredoka-latin-ext.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
html, body, #app, .screen, button, a, p, h1, h2, h3, span, div, svg, canvas, video, img {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  height: 100dvh;
  min-height: 100dvh;
  overflow: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: "Fredoka", "Trebuchet MS", "Comic Sans MS", sans-serif;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}
/* Real text fields stay typable if any are added later */
input, textarea, select, [contenteditable="true"] {
  -webkit-user-select: text;
  user-select: text;
  -webkit-touch-callout: default;
  touch-action: auto;
}
img, svg, video, canvas {
  -webkit-user-drag: none;
  user-drag: none;
  -webkit-touch-callout: none;
}
button, a, [role="button"], .ctrl, .icon-btn, .machine-card, .install-btn,
.play-action-btn, .move-btn, .letgo-btn, .ask-btn, .fs-btn, .shelf-park,
.scope-zbtn, .scope-done, .tip-ok {
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
#app, .screen {
  width: 100%;
  height: 100dvh;
  min-height: 100dvh;
  max-width: 100%;
  overflow-x: hidden;
  position: relative;
}
.hidden { display: none !important; }

/* ===== Picker ===== */
#picker {
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  touch-action: manipulation;
  display: flex;
  flex-direction: column;
  background: #1a0a36;
  padding: calc(12px + var(--safe-top)) 12px calc(14px + var(--safe-bottom));
  position: relative;
}
.picker-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background: #1a0a36 url("media/park-loop.jpg") center / cover no-repeat;
}
.picker-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.picker-bg-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(16, 6, 36, .72) 0%, rgba(16, 6, 36, .42) 38%, rgba(16, 6, 36, .58) 70%, rgba(16, 6, 36, .82) 100%);
  box-shadow: inset 0 0 80px rgba(0, 0, 0, .28);
}
#picker.still .picker-video { display: none; }
@media (prefers-reduced-motion: reduce) {
  #picker .picker-video { display: none; }
}

#picker > .picker-bg { z-index: 0; }
#picker > *:not(.picker-bg) { position: relative; z-index: 1; }
.hero {
  text-align: center;
  color: #fff;
  margin: 0 0 10px;
  flex: 0 0 auto;
}
.hero-brand {
  display: inline-block;
  padding: 8px 16px 10px;
  border-radius: 28px;
  background: rgba(20, 8, 48, .72);
  border: 2px solid rgba(255, 255, 255, .45);
  box-shadow: 0 8px 28px rgba(0, 0, 0, .4);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.frog-badge {
  width: 64px;
  height: 64px;
  margin: 0 auto 6px;
  border-radius: 50%;
  background: #c8e6c9;
  display: grid;
  place-items: center;
  font-size: 36px;
  box-shadow: 0 6px 0 #2e7d32, 0 10px 20px rgba(0,0,0,.35);
  border: 2px solid #fff;
}
.hero h1 {
  margin: 0;
  font-size: clamp(26px, 7.4vw, 52px);
  line-height: 1.05;
  letter-spacing: .02em;
  color: #fff;
  text-shadow: 0 3px 0 rgba(0,0,0,.45), 0 8px 22px rgba(0,0,0,.5);
}
.hero-sub {
  margin: 8px 0 0;
  font-size: clamp(20px, 5.4vw, 30px);
  font-weight: 700;
  background: #ffeb3b;
  color: #4a148c;
  display: inline-block;
  padding: 4px 14px;
  border-radius: 999px;
  box-shadow: 0 4px 0 #f9a825;
  border: 2px solid #fff8e1;
}
.machine-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
  flex: 1 1 auto;
  align-content: start;
}
/* six machines: an even 3 x 2 on tablets and desktop */
@media (min-width: 820px) {
  .machine-grid { grid-template-columns: repeat(3, 1fr); max-width: 980px; gap: 14px; }
}
.machine-card {
  border: 2.5px solid #fff;
  cursor: pointer;
  border-radius: 22px;
  padding: 10px 8px 10px;
  text-align: center;
  color: #fff;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  box-shadow: 0 5px 0 var(--card-dark, #31113a), 0 12px 24px rgba(0,0,0,.5);
  transform: translateY(0);
  transition: transform .12s ease;
  width: 100%;
  font-family: inherit;
  -webkit-text-stroke: 0;
}
.machine-card:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--card-dark, #31113a), 0 6px 12px rgba(0,0,0,.4); }
.machine-card .preview {
  width: 100%;
  height: 52px;
  border-radius: 14px;
  background: rgba(255,255,255,.28);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 4px;
  padding: 6px;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.25);
}
.machine-card .preview .mini {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
}
.machine-card .preview .mini svg { width: 100%; height: 100%; display: block; }
.machine-card .card-emoji { font-size: 28px; line-height: 1; filter: drop-shadow(0 2px 0 rgba(0,0,0,.35)); }
.machine-card h2 {
  margin: 0;
  font-size: clamp(16px, 4.2vw, 22px);
  line-height: 1.1;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 2px 0 rgba(0,0,0,.5), 0 0 8px rgba(0,0,0,.35);
}
.machine-card .tag {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  background: rgba(0,0,0,.38);
  padding: 2px 8px;
  border-radius: 999px;
  text-shadow: 0 1px 0 rgba(0,0,0,.4);
}
.legal {
  text-align: center;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  margin-top: 8px;
  flex: 0 0 auto;
  text-shadow: 0 1px 2px rgba(0,0,0,.7);
}
/* Phone: keep title + 6 cards on one 390x844 screen, no scroll */
@media (max-width: 819px) {
  #picker { padding: calc(8px + var(--safe-top)) 10px calc(8px + var(--safe-bottom)); }
  .hero { margin: 0 0 8px; }
  .hero-brand { padding: 6px 12px 8px; border-radius: 22px; }
  .frog-badge { width: 44px; height: 44px; font-size: 26px; margin-bottom: 4px; box-shadow: 0 4px 0 #2e7d32, 0 8px 14px rgba(0,0,0,.35); }
  .hero h1 { font-size: clamp(22px, 6.4vw, 28px); }
  .hero-sub { margin-top: 6px; font-size: 15px; padding: 2px 10px; box-shadow: 0 3px 0 #f9a825; }
  .picker-actions { margin: 0 auto 8px; gap: 8px; }
  .picker-actions .install-btn { min-width: 0; flex: 1 1 0; padding: 8px 8px; font-size: 16px; }
  .machine-grid { gap: 8px; }
  .machine-card { padding: 7px 6px 8px; gap: 2px; border-radius: 16px; border-width: 2px; }
  .machine-card .preview { height: 40px; padding: 3px; border-radius: 10px; gap: 2px; }
  .machine-card .preview .mini { width: 26px; height: 26px; }
  .machine-card .card-emoji { font-size: 22px; }
  .machine-card h2 { font-size: 15px; }
  .machine-card .tag { display: none; }
  .legal { margin-top: 6px; font-size: 11px; }
}
@media (min-width: 820px) {
  .machine-card { padding: 14px 12px 14px; gap: 6px; border-radius: 26px; }
  .machine-card .preview { height: 84px; padding: 8px; border-radius: 16px; }
  .machine-card .preview .mini { width: 42px; height: 42px; }
  .machine-card .card-emoji { font-size: 34px; }
  .machine-card h2 { font-size: clamp(20px, 2.2vw, 26px); }
  .machine-card .tag { font-size: 15px; padding: 3px 10px; }
  .hero-brand { padding: 12px 22px 14px; }
  .frog-badge { width: 72px; height: 72px; font-size: 40px; }
  .legal { margin-top: 16px; font-size: 14px; }
}

/* ===== Play ===== */
#play {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  background: var(--play-bg, linear-gradient(180deg, #ffe4f1, #ffb6d9));
}
#play.hidden { display: none !important; }
.play-top {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: calc(8px + var(--safe-top)) 10px 6px;
}
.icon-btn {
  width: 56px;
  height: 56px;
  flex: 0 0 56px;
  border: 0;
  border-radius: 18px;
  font-size: 28px;
  background: #fff;
  box-shadow: 0 5px 0 rgba(0,0,0,.15);
  cursor: pointer;
  font-family: inherit;
}
.icon-btn:active { transform: translateY(3px); box-shadow: 0 2px 0 rgba(0,0,0,.15); }
.fs-btn {
  width: 64px;
  height: 64px;
  flex: 0 0 64px;
  background: linear-gradient(180deg, #ffe082, #ffca28);
  box-shadow: 0 5px 0 #f9a825;
  color: #4a148c;
  padding: 0;
}
.fs-btn svg { display: block; margin: 0 auto; }
#picker .fs-btn {
  position: fixed;
  top: calc(12px + var(--safe-top));
  right: 12px;
  z-index: 40;
}
.play-title {
  flex: 1 1 auto;
  min-width: 0;
  text-align: center;
  font-weight: 700;
  font-size: clamp(20px, 5.4vw, 30px);
  color: #fff;
  text-shadow: 0 2px 0 rgba(0,0,0,.2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.machine-wrap {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
}
.cabinet {
  width: min(100%, 100%);
  height: auto;
  aspect-ratio: 1 / 1;
  max-width: 100%;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--cabinet);
  border-radius: 28px 28px 18px 18px;
  padding: 10px 12px 8px;
  box-shadow:
    inset 0 -10px 0 var(--cabinet-dark),
    0 14px 0 rgba(0,0,0,.18),
    0 22px 40px rgba(0,0,0,.2);
}
.marquee {
  flex: 0 0 auto;
  background: var(--marquee);
  color: #fff;
  text-align: center;
  font-weight: 700;
  font-size: clamp(18px, 4vw, 26px);
  letter-spacing: .08em;
  border-radius: 16px;
  padding: 6px 10px;
  margin-bottom: 8px;
  text-shadow: 0 2px 0 rgba(0,0,0,.15);
  box-shadow: 0 4px 0 rgba(0,0,0,.12);
}
.viewport {
  flex: 1 1 auto;
  min-height: 0;
  position: relative;
  background: linear-gradient(180deg, #e3f2fd 0%, var(--glass) 64%, var(--floor) 64%, var(--floor) 100%);
  border-radius: 16px;
  overflow: hidden;
  border: 6px solid rgba(255,255,255,.55);
  box-shadow: inset 0 0 0 3px rgba(0,0,0,.08);
  touch-action: none;
}
.rail {
  position: absolute;
  top: 8px;
  left: 8%;
  right: 8%;
  height: 10px;
  background: repeating-linear-gradient(90deg, #90a4ae 0 8px, #78909c 8px 16px);
  border-radius: 6px;
  z-index: 3;
}
.claw {
  position: absolute;
  top: 2px;
  left: 50%;
  width: 64px;
  transform: translateX(-50%);
  z-index: 5;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.claw-cord {
  width: 8px;
  height: 28px;
  flex: 0 0 auto;
  margin: 0 auto;
  background: linear-gradient(90deg, #90a4ae, #455a64 45%, #263238 50%, #455a64 55%, #90a4ae);
  border-radius: 4px;
  box-shadow: 1px 0 0 rgba(255,255,255,.25);
}
.claw-head {
  position: relative;
  width: 64px;
  height: 30px;
  flex: 0 0 auto;
  background: #ffd54f;
  border-radius: 10px 10px 8px 8px;
  box-shadow: 0 3px 0 #f9a825;
}
.claw-pincer {
  position: absolute;
  top: 24px;
  width: 16px;
  height: 36px;
  background: #ffb300;
  border-radius: 6px 6px 12px 12px;
  transform-origin: top center;
  transition: transform 0.28s ease;
}
.claw-pincer.left { left: 8px; transform: rotate(22deg); }
.claw-pincer.right { right: 8px; transform: rotate(-22deg); }
.claw.open .claw-pincer.left { transform: rotate(38deg); }
.claw.open .claw-pincer.right { transform: rotate(-38deg); }
.claw.closed .claw-pincer.left { transform: rotate(-10deg); }
.claw.closed .claw-pincer.right { transform: rotate(10deg); }
.claw-hold {
  position: absolute;
  left: 50%;
  top: 50px;
  width: 64px;
  height: 64px;
  transform: translateX(-50%);
}
/* prize chute box: left side of the machine */
.prize-box {
  position: absolute;
  left: 2%;
  bottom: 0;
  width: 22%;
  height: 30%;
  z-index: 4;
  pointer-events: none;
}
.prize-hole {
  position: absolute;
  left: 6%;
  right: 6%;
  bottom: 0;
  height: 38%;
  background: radial-gradient(ellipse at 50% 30%, #1a0f24 0 55%, #3b2150 100%);
  border-radius: 50% 50% 0 0 / 40% 40% 0 0;
  box-shadow: inset 0 8px 12px rgba(0,0,0,.5);
}
.prize-wall {
  position: absolute;
  inset: 0;
  border: 4px solid rgba(255,255,255,.85);
  border-bottom: 0;
  border-radius: 10px 10px 0 0;
  background: linear-gradient(180deg, rgba(255,255,255,.28), rgba(200,230,255,.18));
  box-shadow: inset 0 0 0 2px rgba(0,0,0,.06), 0 0 0 2px rgba(0,0,0,.05);
}
.prize-wall::after {
  content: "";
  position: absolute;
  left: 12%;
  top: 8%;
  width: 14%;
  height: 70%;
  border-radius: 8px;
  background: rgba(255,255,255,.45);
}
.toy.into-chute { z-index: 3; pointer-events: none; margin: 0; }
.claw-hold svg { width: 100%; height: 100%; display: block; }
.bin { position: absolute; inset: 0; z-index: 2; }
.toy {
  position: absolute;
  width: 64px;
  height: 64px;
  transform: translateX(-50%);
  filter: drop-shadow(0 4px 0 rgba(0,0,0,.12));
  z-index: 2;
}
.toy svg { width: 100%; height: 100%; display: block; }
.toy.taken { display: none; }
.glass-shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, rgba(255,255,255,.35) 0 18%, transparent 18% 100%);
  pointer-events: none;
  z-index: 6;
}
.chute {
  flex: 0 0 auto;
  height: 28px;
  margin-top: 8px;
  border-radius: 0 0 12px 12px;
  background: rgba(0,0,0,.18);
  display: flex;
  align-items: stretch;
  justify-content: flex-start;
  padding-left: 2%;
  font-size: 16px;
}
.chute-flap {
  width: 22%;
  background: linear-gradient(180deg, #2b1838, #4a2a5e);
  border-radius: 6px 6px 10px 10px;
  border: 3px solid rgba(255,255,255,.7);
  display: grid;
  place-items: center;
  box-shadow: inset 0 4px 8px rgba(0,0,0,.45);
}
.pickup-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 30;
  overflow: hidden;
}
.pickup-toy, .pickup-hand { position: absolute; will-change: transform; }
.pickup-toy svg, .pickup-hand svg { width: 100%; height: 100%; display: block; overflow: visible; }
.pickup-toy { filter: drop-shadow(0 6px 4px rgba(0,0,0,.25)); }
.pickup-hand { filter: drop-shadow(0 10px 10px rgba(0,0,0,.28)); transform-origin: 50% 100%; }

.controls {
  flex: 0 0 auto;
  display: flex;
  gap: 12px;
  justify-content: center;
  align-items: stretch;
  padding: 10px 12px 6px;
  max-width: 560px;
  width: 100%;
  margin: 0 auto;
}
.ctrl {
  border: 0;
  font-family: inherit;
  cursor: pointer;
  color: #fff;
  font-weight: 700;
}
.ctrl.arrow {
  flex: 0 0 86px;
  height: 86px;
  border-radius: 24px;
  font-size: 40px;
  background: linear-gradient(180deg, #4fc3f7, #0288d1);
  box-shadow: 0 8px 0 #01579b;
}
.ctrl.grab {
  flex: 1 1 auto;
  min-width: 0;
  height: 86px;
  border-radius: 28px;
  background: linear-gradient(180deg, #69f0ae, #00c853);
  box-shadow: 0 8px 0 #1b5e20;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.grab-icon { font-size: 28px; }
.grab-word { font-size: clamp(22px, 5vw, 30px); letter-spacing: .06em; }
.ctrl:active { transform: translateY(5px); box-shadow: 0 3px 0 rgba(0,0,0,.3); }
.ctrl:disabled { opacity: .55; cursor: default; transform: none; }

.shelf-wrap {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px calc(72px + var(--safe-bottom));
  max-width: 560px;
  width: 100%;
  margin: 0 auto;
}
.shelf-label { font-size: 22px; }
.shelf {
  flex: 1 1 auto;
  min-width: 0;
  height: 52px;
  background: rgba(255,255,255,.35);
  border-radius: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  overflow-x: auto;
  overflow-y: hidden;
}
.shelf .kept {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
}
.shelf .kept svg { width: 100%; height: 100%; display: block; }
.shelf-park {
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 16px;
  font-size: 26px;
  cursor: pointer;
  background: linear-gradient(180deg, #a5d6a7, #43a047);
  box-shadow: 0 4px 0 #1b5e20;
}
.shelf-park:active { transform: translateY(3px); box-shadow: 0 1px 0 #1b5e20; }
.shelf:empty::after {
  content: "Win toys!";
  color: rgba(0,0,0,.4);
  font-weight: 600;
  font-size: 15px;
}

/* ===== Win ===== */
#win {
  display: flex;
  flex-direction: column;
  background: radial-gradient(circle at 50% 40%, #fff59d, #ff80ab 55%, #7c4dff);
  overflow: hidden;
}
#win.hidden { display: none !important; }
#confetti {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
}
.stage {
  flex: 1 1 auto;
  min-height: 0;
  position: relative;
  z-index: 1;
}
.stage canvas { display: block; width: 100%; height: 100%; }
.win-banner {
  position: relative;
  z-index: 3;
  text-align: center;
  padding: 0 16px;
  flex: 0 0 auto;
}
.win-title {
  margin: 0;
  font-size: clamp(42px, 12vw, 84px);
  color: #fff;
  text-shadow: 0 5px 0 #4a148c, 0 10px 20px rgba(0,0,0,.25);
  animation: pop .6s cubic-bezier(.2,1.4,.4,1) both;
}
.win-sub {
  margin: 4px 0 8px;
  font-size: clamp(20px, 5vw, 28px);
  color: #fffde7;
  font-weight: 600;
}
@keyframes pop {
  from { transform: scale(.4); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.win-actions {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 10px;
  padding: 8px 14px calc(110px + var(--safe-bottom));
  max-width: 640px;
  width: 100%;
  margin: 0 auto;
}
.win-actions .ctrl { width: 100%; height: 76px; flex: none; font-size: 22px; }
.ctrl.pick {
  background: linear-gradient(180deg, #b39ddb, #7e57c2);
  box-shadow: 0 8px 0 #4527a0;
}
.ctrl.park-go {
  background: linear-gradient(180deg, #81c784, #2e7d32);
  box-shadow: 0 8px 0 #1b5e20;
}
@media (max-width: 520px) {
  .win-actions { grid-template-columns: 1fr 1fr; }
  .win-actions .again { grid-column: 1 / -1; height: 70px; }
  .win-actions .pick, .win-actions .park-go { height: 62px; font-size: 19px; }
}

@media (min-width: 900px) and (min-height: 720px) {
  .ctrl.arrow { flex-basis: 110px; height: 100px; }
  .ctrl.grab { height: 100px; }
  .toy { width: 78px; height: 78px; }
}

@media (max-height: 700px) {
  .frog-badge { width: 56px; height: 56px; font-size: 30px; }
  .play-top { padding: calc(4px + var(--safe-top)) 8px 4px; gap: 8px; }
  .icon-btn { width: 48px; height: 48px; flex: 0 0 48px; font-size: 24px; }
  .fs-btn { width: 52px; height: 52px; flex: 0 0 52px; }
  .fs-btn svg { width: 28px; height: 28px; }
  .ctrl.arrow, .ctrl.grab { height: 64px; }
  .ctrl.arrow { flex-basis: 70px; font-size: 30px; }
  .controls { padding: 6px 10px 4px; gap: 8px; }
  .shelf { height: 40px; }
  .shelf-wrap { padding: 0 12px calc(52px + var(--safe-bottom)); }
  .marquee { font-size: 16px; padding: 4px 8px; margin-bottom: 4px; }
  .chute { height: 18px; margin-top: 4px; font-size: 13px; }
  .cabinet { padding: 6px 8px 6px; border-radius: 20px; }
  .viewport { border-width: 4px; }
}

.install-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0 auto 16px;
  padding: 14px 28px;
  min-height: 64px;
  min-width: min(320px, 86vw);
  border: 0;
  border-radius: 22px;
  background: linear-gradient(180deg, #ffe082, #ffca28);
  box-shadow: 0 6px 0 #f9a825;
  color: #4a148c;
  font-family: inherit;
  font-weight: 700;
  font-size: 22px;
  cursor: pointer;
}
.install-btn:active { transform: translateY(3px); box-shadow: 0 3px 0 #f9a825; }
.install-btn.hidden { display: none !important; }
.install-tip {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(42, 22, 80, .55);
  display: grid;
  place-items: center;
  padding: 24px;
}
.install-tip.hidden { display: none !important; }
.install-tip-card {
  background: #fff;
  border-radius: 28px;
  padding: 24px 22px 20px;
  max-width: 380px;
  width: 100%;
  text-align: center;
  box-shadow: 0 18px 40px rgba(0,0,0,.25);
}
.install-tip-title {
  margin: 0 0 16px;
  font-size: 26px;
  color: #4a148c;
}
.tip-steps { display: grid; gap: 14px; margin-bottom: 16px; }
.tip-step {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  font-size: 18px;
}
.tip-pic {
  flex: 0 0 64px;
  width: 64px;
  height: 64px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: #f3e5f5;
}
.tip-generic { font-size: 18px; line-height: 1.4; margin: 0 0 8px; }
.tip-ok { min-width: 0; width: 100%; margin: 0; }

.encourage {
  position: absolute;
  left: 50%;
  bottom: calc(148px + var(--safe-bottom));
  transform: translateX(-50%);
  z-index: 20;
  background: rgba(255,255,255,.94);
  color: #6a1b9a;
  font-weight: 700;
  font-size: clamp(20px, 4.4vw, 28px);
  padding: 10px 20px;
  border-radius: 20px;
  box-shadow: 0 6px 0 rgba(106, 27, 154, .18);
  pointer-events: none;
  white-space: normal;
  text-align: center;
  max-width: calc(100% - 24px);
  box-sizing: border-box;
  overflow-wrap: anywhere;
}
.encourage.hidden { display: none !important; }
.claw-hold.slipping {
  animation: hold-wobble 0.16s ease-in-out infinite;
}
@keyframes hold-wobble {
  0%, 100% { transform: translateX(-58%) rotate(-20deg); }
  50% { transform: translateX(-42%) rotate(18deg); }
}
.toy.falling {
  z-index: 8;
  pointer-events: none;
  margin: 0;
}
@media (max-height: 700px) {
  .encourage { bottom: calc(118px + var(--safe-bottom)); font-size: 20px; padding: 8px 16px; }
}

/* ===== Picker actions ===== */
.picker-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin: 0 auto 12px;
  max-width: 700px;
  width: 100%;
  flex: 0 0 auto;
}
.picker-actions .install-btn { margin: 0; min-width: min(220px, 42vw); }
.install-btn.park-open {
  background: linear-gradient(180deg, #a5d6a7, #43a047);
  box-shadow: 0 6px 0 #1b5e20;
  color: #fff;
  text-shadow: 0 2px 0 rgba(0,0,0,.2);
}
.park-count {
  background: #fff;
  color: #2e7d32;
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 18px;
  text-shadow: none;
}
.park-count:empty { display: none; }

/* ===== Prize Park ===== */
#park { background: #8fd3ff; overflow: hidden; }
.park-stage { position: absolute; inset: 0; touch-action: none; cursor: pointer; }
.park-stage canvas { display: block; width: 100%; height: 100%; }
.park-top {
  position: absolute;
  top: 0; left: 0; right: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: calc(10px + var(--safe-top)) 12px 8px;
  z-index: 5;
  pointer-events: none;
}
.park-top > * { pointer-events: auto; }
.park-title {
  flex: 1 1 auto;
  text-align: center;
  font-weight: 700;
  font-size: clamp(22px, 5.5vw, 34px);
  color: #fff;
  text-shadow: 0 3px 0 rgba(27,94,32,.55), 0 6px 14px rgba(0,0,0,.2);
  pointer-events: none;
}
.park-hint, .park-name {
  position: absolute;
  left: 50%;
  top: calc(88px + var(--safe-top));
  transform: translateX(-50%);
  z-index: 4;
  background: rgba(255,255,255,.92);
  color: #2e7d32;
  font-weight: 700;
  font-size: clamp(18px, 4.4vw, 24px);
  padding: 8px 18px;
  border-radius: 999px;
  box-shadow: 0 5px 0 rgba(27,94,32,.25);
  white-space: normal;
  text-align: center;
  max-width: calc(100% - 24px);
  box-sizing: border-box;
  overflow-wrap: anywhere;
  pointer-events: none;
}
.park-name { color: #6a1b9a; }
.park-empty, .park-ask {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(20, 60, 30, .28);
}
.park-card {
  background: #fff;
  border-radius: 28px;
  padding: 20px 20px 22px;
  width: min(380px, 100%);
  text-align: center;
  box-shadow: 0 16px 0 rgba(27,94,32,.25), 0 22px 40px rgba(0,0,0,.25);
  animation: pop .35s cubic-bezier(.2,1.4,.4,1) both;
}
.park-card-title { margin: 6px 0 6px; font-size: 32px; font-weight: 700; color: #4a148c; }
.park-card-sub { margin: 0 0 16px; font-size: 18px; color: #5e4b6b; line-height: 1.35; }
.park-card .install-btn { min-width: 0; width: 100%; margin: 0; }
.park-empty-pic { font-size: 54px; }
.park-ask-pic { width: 120px; height: 120px; margin: 0 auto; }
.park-ask-pic svg { width: 100%; height: 100%; display: block; }
.park-ask-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 10px; }
.ask-btn {
  height: 84px;
  border: 0;
  border-radius: 24px;
  font-family: inherit;
  font-weight: 700;
  font-size: 26px;
  color: #fff;
  cursor: pointer;
}
.ask-btn.yes { background: linear-gradient(180deg, #69f0ae, #00c853); box-shadow: 0 7px 0 #1b5e20; }
.ask-btn.no { background: linear-gradient(180deg, #ff8a80, #e53935); box-shadow: 0 7px 0 #b71c1c; }
.ask-btn:active { transform: translateY(4px); box-shadow: 0 3px 0 rgba(0,0,0,.3); }
.joystick {
  position: absolute;
  left: 22px;
  bottom: calc(26px + var(--safe-bottom));
  width: 156px;
  height: 156px;
  border-radius: 50%;
  z-index: 6;
  touch-action: none;
  background: radial-gradient(circle, rgba(255,255,255,.25) 0 55%, rgba(255,255,255,.45) 56%);
  border: 5px solid rgba(255,255,255,.9);
  box-shadow: 0 8px 20px rgba(0,0,0,.2);
  cursor: grab;
}
.joy-knob {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 70px;
  height: 70px;
  margin: -35px 0 0 -35px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff59d, #ffca28 60%, #f9a825);
  box-shadow: 0 6px 0 #f57f17, 0 10px 16px rgba(0,0,0,.25);
  pointer-events: none;
}
.letgo-btn {
  position: absolute;
  right: 18px;
  bottom: calc(46px + var(--safe-bottom));
  z-index: 6;
  height: 76px;
  padding: 0 24px;
  border: 0;
  border-radius: 999px;
  font-family: inherit;
  font-weight: 700;
  font-size: 24px;
  color: #4a148c;
  background: linear-gradient(180deg, #ffe082, #ffca28);
  box-shadow: 0 7px 0 #f9a825;
  cursor: pointer;
}
.letgo-btn:active { transform: translateY(4px); box-shadow: 0 3px 0 #f9a825; }
@media (max-width: 520px) {
  .joystick { width: 140px; height: 140px; left: 16px; }
  .letgo-btn { font-size: 19px; height: 68px; padding: 0 16px; right: 14px; }
}
@media (max-height: 700px) {
  .park-hint, .park-name { top: calc(70px + var(--safe-top)); font-size: 18px; }
  .ask-btn { height: 72px; }
  .park-ask-pic { width: 96px; height: 96px; }
}

/* ===== Play controls: arrows together on the left, Grab on the right ===== */
.arrow-pair { display: flex; flex-wrap: nowrap; gap: 4px; flex: 0 0 auto; order: 0; }
.arrow-pair .ctrl.arrow { margin: 0; }
.arrow-pair #btn-left { border-radius: 24px 8px 8px 24px; }
.arrow-pair #btn-right { border-radius: 8px 24px 24px 8px; }
.controls { flex-wrap: nowrap; flex-direction: row; }
.controls .ctrl.grab { order: 1; }
.controls { gap: 14px; }

/* ===== Playground action button ===== */
.play-action-btn {
  position: absolute;
  right: 18px;
  bottom: calc(136px + var(--safe-bottom));
  z-index: 7;
  height: 84px;
  min-width: 170px;
  padding: 0 26px;
  border: 0;
  border-radius: 999px;
  font-family: inherit;
  font-weight: 700;
  font-size: 28px;
  color: #fff;
  text-shadow: 0 2px 0 rgba(0,0,0,.2);
  background: linear-gradient(180deg, #ff8ac8, #e0409a);
  box-shadow: 0 8px 0 #9c1c63, 0 12px 22px rgba(0,0,0,.25);
  cursor: pointer;
  animation: play-breathe 3s ease-in-out infinite;
}
.play-action-btn[data-action="loop"], .play-action-btn[data-action="loopagain"] { background: linear-gradient(180deg, #ffe082, #ff9800); box-shadow: 0 8px 0 #c25e00, 0 12px 22px rgba(0,0,0,.25), 0 0 18px 4px rgba(255,236,120,.55); color: #4e2a00; text-shadow: 0 1px 0 rgba(255,255,255,.5); }
.play-action-btn[data-action="hopoff"] { background: linear-gradient(180deg, #80d8ff, #2979ff); box-shadow: 0 8px 0 #0d47a1, 0 12px 22px rgba(0,0,0,.25); }
.play-action-btn:active { transform: translateY(4px); box-shadow: 0 3px 0 rgba(0,0,0,.3); }
@keyframes play-breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.035); } }
@media (max-width: 520px) {
  .play-action-btn { right: 14px; height: 76px; min-width: 150px; font-size: 24px; bottom: calc(126px + var(--safe-bottom)); }
}

/* ===== Sensory themed backgrounds ===== */
#play { isolation: isolate; }
.play-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  display: block;
}
#play .play-top, #play .machine-wrap, #play .controls, #play .shelf-wrap { position: relative; z-index: 1; }
#play .cabinet { box-shadow: inset 0 -10px 0 var(--cabinet-dark), 0 14px 0 rgba(0,0,0,.18), 0 22px 50px rgba(0,0,0,.28), 0 0 0 6px rgba(255,255,255,.18); }
#play .shelf { background: rgba(255,255,255,.55); }
#play .play-title { text-shadow: 0 2px 0 rgba(0,0,0,.3); flex: 0 1 auto; margin: 0 auto; padding: 4px 16px; border-radius: 999px; background: rgba(40, 20, 70, .32); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
@media (prefers-reduced-motion: reduce) {
  .play-action-btn { animation: none; }
}

/* ===== Treehouse: second big button (climb down) ===== */
.play-down-btn {
  top: calc(160px + var(--safe-top));
  bottom: auto;
  right: 18px;
  background: linear-gradient(180deg, #a5d66f, #5a9e2e);
  box-shadow: 0 8px 0 #2f6a12, 0 12px 22px rgba(0,0,0,.25);
  animation: none;
}
.play-action-btn[data-action^="spot:"] { background: linear-gradient(180deg, #ffd36e, #f39c12); box-shadow: 0 8px 0 #a35f00, 0 12px 22px rgba(0,0,0,.25); }
@media (max-width: 520px) {
  .play-down-btn { top: calc(148px + var(--safe-top)); bottom: auto; right: 14px; }
}
@media (max-height: 700px) {
  .play-down-btn { top: calc(136px + var(--safe-top)); bottom: auto; }
}

/* ===== Telescope eyepiece (first-person look from the treehouse) ===== */
.scope { position: absolute; inset: 0; z-index: 5; pointer-events: none; --iris: 0px; --fade: 0; opacity: var(--fade); }
.scope.hidden { display: none; }
.scope::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 50%, transparent calc(var(--iris) - 26px), rgba(8,4,20,.55) calc(var(--iris) - 6px), #07030f calc(var(--iris) + 2px));
}
.scope-lens {
  position: absolute; inset: 0;
  background: radial-gradient(circle at 42% 38%, rgba(255,255,255,.10), transparent calc(var(--iris) * .5)),
              radial-gradient(circle at 50% 50%, transparent calc(var(--iris) * .72), rgba(120,190,255,.16) calc(var(--iris) - 4px), transparent calc(var(--iris) + 1px));
  -webkit-backdrop-filter: blur(2.5px); backdrop-filter: blur(2.5px);
  -webkit-mask: radial-gradient(circle at 50% 50%, transparent calc(var(--iris) * .7), #000 calc(var(--iris) - 2px), transparent calc(var(--iris) + 2px));
          mask: radial-gradient(circle at 50% 50%, transparent calc(var(--iris) * .7), #000 calc(var(--iris) - 2px), transparent calc(var(--iris) + 2px));
}
.scope-rim {
  position: absolute; left: 50%; top: 50%;
  width: calc(var(--iris) * 2 + 36px); height: calc(var(--iris) * 2 + 36px);
  transform: translate(-50%, -50%); border-radius: 50%;
  background: conic-gradient(from 0deg, #ff5252, #ffca28, #69f0ae, #40c4ff, #b388ff, #ff5252);
  -webkit-mask: radial-gradient(circle, transparent calc(var(--iris) - 1px), #000 var(--iris), #000 calc(var(--iris) + 16px), transparent calc(var(--iris) + 17px));
          mask: radial-gradient(circle, transparent calc(var(--iris) - 1px), #000 var(--iris), #000 calc(var(--iris) + 16px), transparent calc(var(--iris) + 17px));
  filter: drop-shadow(0 0 6px rgba(255,255,255,.35));
}
.scope-seen {
  position: absolute; left: 50%; top: calc(92px + var(--safe-top)); transform: translateX(-50%);
  z-index: 7; padding: 8px 20px; border-radius: 999px; white-space: nowrap;
  background: rgba(255,255,255,.92); color: #6a1b9a; font-weight: 700; font-size: 22px;
  box-shadow: 0 6px 16px rgba(0,0,0,.3); pointer-events: none; display: none;
}
.park-scoping .scope-seen { display: block; }
.scope-done {
  position: absolute; left: auto; right: 14px; top: calc(10px + var(--safe-top)); transform: none;
  z-index: 8; height: 66px; padding: 0 26px; border: 0; border-radius: 999px;
  font-family: inherit; font-weight: 700; font-size: 26px; color: #fff; cursor: pointer;
  background: linear-gradient(180deg, #ff8a80, #e53935); box-shadow: 0 7px 0 #b71c1c, 0 10px 20px rgba(0,0,0,.35);
}
.scope-done:active { transform: translateY(4px); box-shadow: 0 3px 0 #b71c1c; }
@media (max-height: 520px) { .scope-zoom { bottom: calc(66px + var(--safe-bottom)); } .scope-done { height: 54px; font-size: 21px; } .scope-seen { top: calc(70px + var(--safe-top)); font-size: 17px; } .scope-zbtn { width: 56px; height: 56px; font-size: 28px; } }
.scope-zoom { position: absolute; right: 18px; bottom: calc(84px + var(--safe-bottom)); z-index: 7; display: flex; flex-direction: column; gap: 12px; }
.scope-zoom.hidden, .scope-done.hidden { display: none; }
.scope-zbtn {
  width: 70px; height: 70px; border: 0; border-radius: 50%; cursor: pointer;
  font-family: inherit; font-weight: 800; font-size: 26px; color: #4a148c;
  background: linear-gradient(180deg, #fff59d, #ffca28); box-shadow: 0 6px 0 #f9a825, 0 8px 16px rgba(0,0,0,.3);
}
.scope-zbtn:active { transform: translateY(4px); box-shadow: 0 2px 0 #f9a825; }
.park-scoping .park-top .park-title { opacity: 0; }
.park-scoping .joystick { z-index: 8; }
@media (max-width: 520px) {
  .scope-done { height: 60px; font-size: 23px; padding: 0 24px; }
  .scope-zbtn { width: 68px; height: 68px; font-size: 24px; }
  .scope-zoom { right: 14px; bottom: calc(80px + var(--safe-bottom)); }
  .scope-seen { font-size: 18px; top: calc(82px + var(--safe-top)); }
}
/* wide screens: keep the round eyepiece clear, buttons go to the sides */
@media (min-aspect-ratio: 5/4) {
  .scope-done { left: auto; right: 18px; top: calc(76px + var(--safe-top)); transform: none; }
  .scope-done:active { transform: translateY(4px); }
  .scope-seen { left: 18px; top: calc(80px + var(--safe-top)); transform: none; }
}
@media (min-aspect-ratio: 5/4) and (max-height: 520px) {
  .scope-done { top: calc(64px + var(--safe-top)); right: 14px; }
  .scope-seen { top: calc(66px + var(--safe-top)); left: 14px; font-size: 16px; padding: 6px 14px; }
}
@media (max-height: 520px) { .scope-zoom { bottom: calc(66px + var(--safe-bottom)); } }

/* ---------- raceway HUD (v14) ---------- */
.race-hud {
  position: absolute;
  left: 50%;
  top: calc(168px + var(--safe-top));
  transform: translateX(-50%);
  z-index: 5;
  display: flex;
  gap: 8px;
  pointer-events: none;
  white-space: nowrap;
}
.race-pill {
  background: rgba(255,255,255,.94);
  color: #212121;
  font-weight: 700;
  font-size: clamp(16px, 4.2vw, 22px);
  padding: 6px 14px;
  border-radius: 999px;
  box-shadow: 0 4px 0 rgba(0,0,0,.22);
}
.race-pill.pos { background: linear-gradient(180deg, #fff59d, #ffca28); color: #4a148c; }
.race-pill.turn { background: linear-gradient(180deg, #fff59d, #ffca28); color: #4a148c; min-width: 1.8em; text-align: center; font-size: clamp(22px, 5.6vw, 34px); padding: 4px 12px; }
.race-big {
  position: absolute;
  left: 0; right: 0;
  top: 36%;
  z-index: 7;
  text-align: center;
  font-weight: 700;
  font-size: clamp(72px, 22vw, 150px);
  line-height: 1;
  color: #fff;
  -webkit-text-stroke: 4px #4a148c;
  text-shadow: 0 8px 0 rgba(74,20,140,.45), 0 14px 26px rgba(0,0,0,.3);
  pointer-events: none;
  animation: raceBig .5s cubic-bezier(.2,1.6,.4,1) both;
}
.race-big.small { font-size: clamp(38px, 10vw, 72px); -webkit-text-stroke: 3px #4a148c; padding: 0 12px; }
@keyframes raceBig { from { transform: scale(.3); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@media (max-height: 700px) { .race-hud { top: calc(162px + var(--safe-top)); } }
@media (max-height: 520px) {
  .race-hud { top: calc(156px + var(--safe-top)); }
  .race-pill { font-size: 16px; padding: 4px 12px; }
  .race-big { top: 28%; font-size: clamp(60px, 16vh, 110px); }
  .race-big.small { font-size: clamp(32px, 9vh, 56px); }
}
@media (prefers-reduced-motion: reduce) { .race-big { animation: none; } }
/* ---------- v15.3: Big Loop podium ---------- */
.loop-podium {
  position: absolute; left: 50%; top: calc(208px + var(--safe-top)); transform: translateX(-50%);
  z-index: 6; width: min(420px, 92vw); pointer-events: none;
  background: rgba(255,255,255,.93); border-radius: 22px; padding: 10px 12px 12px;
  box-shadow: 0 6px 0 rgba(74,20,140,.25), 0 14px 30px rgba(0,0,0,.22);
  animation: podIn .55s cubic-bezier(.2,1.5,.4,1) both; font-weight: 700; color: #4a148c;
}
.pod-title { text-align: center; font-size: clamp(17px, 4.6vw, 22px); margin-bottom: 6px; }
.pod-row { display: flex; align-items: flex-end; justify-content: center; gap: 8px; height: 150px; }
.pod-step { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; min-width: 0; }
.pod-who { text-align: center; line-height: 1.1; margin-bottom: 4px; }
.pod-e { display: block; font-size: 30px; animation: podHop 1.1s ease-in-out infinite; }
.pod-step.p2 .pod-e { animation-delay: .25s; } .pod-step.p3 .pod-e { animation-delay: .5s; }
.pod-n { display: block; font-size: 13px; color: #311b92; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pod-block { height: calc(var(--h) - 46px); min-height: 34px; border-radius: 12px 12px 6px 6px; display: flex; align-items: center; justify-content: center; gap: 4px; font-size: 22px; color: #fff; -webkit-text-stroke: 1px rgba(74,20,140,.5); }
.pod-step.p1 .pod-block { background: linear-gradient(180deg, #ffe082, #ffb300); }
.pod-step.p2 .pod-block { background: linear-gradient(180deg, #eceff1, #90a4ae); }
.pod-step.p3 .pod-block { background: linear-gradient(180deg, #ffccbc, #d4895a); }
.pod-step.me .pod-n { color: #d81b60; }
.pod-step.me .pod-block { box-shadow: 0 0 0 3px #ff4081 inset; }
.pod-rest { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 12px; font-size: 14px; color: #4527a0; }
.pod-rest li.me { color: #d81b60; }
@keyframes podIn { from { transform: translate(-50%, -14px) scale(.7); opacity: 0; } to { transform: translate(-50%, 0) scale(1); opacity: 1; } }
@keyframes podHop { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@media (max-height: 700px) { .loop-podium { top: calc(160px + var(--safe-top)); } .pod-row { height: 120px; } }
@media (prefers-reduced-motion: reduce) { .loop-podium, .pod-e { animation: none; } }

/* ---------- v14: keep the right-hand buttons clear of the "Built on Wix" badge ---------- */
.letgo-btn { bottom: calc(80px + var(--safe-bottom)); }
.play-action-btn { bottom: calc(172px + var(--safe-bottom)); }
.play-down-btn { top: calc(160px + var(--safe-top)); bottom: auto; }
@media (max-width: 520px) {
  .letgo-btn { bottom: calc(80px + var(--safe-bottom)); }
  .play-action-btn { bottom: calc(162px + var(--safe-bottom)); }
  .play-down-btn { top: calc(148px + var(--safe-top)); bottom: auto; right: 14px; }
}
@media (max-height: 700px) and (min-width: 521px) {
  .play-down-btn { top: calc(136px + var(--safe-top)); bottom: auto; }
}
@media (max-height: 520px) {
  .letgo-btn { bottom: calc(76px + var(--safe-bottom)); height: 60px; font-size: 20px; }
  .play-action-btn { bottom: calc(146px + var(--safe-bottom)); height: 64px; min-width: 150px; font-size: 22px; }
  .play-down-btn { top: calc(112px + var(--safe-top)); bottom: auto; height: 60px; font-size: 20px; }
}
@media (max-height: 520px) { .race-big { top: 42%; } }

/* ---------- v15: special moves (3 big buttons while you drive a toy) ---------- */
.moves { position: absolute; z-index: 7; display: flex; gap: 12px; left: calc(196px + env(safe-area-inset-left, 0px)); bottom: calc(34px + var(--safe-bottom)); pointer-events: auto; touch-action: none; }
.moves.hidden { display: none; }
.move-btn {
  position: relative; width: 74px; height: 74px; padding: 0; border-radius: 50%;
  border: 4px solid #fff; cursor: pointer; font-family: inherit;
  background: radial-gradient(circle at 34% 28%, #fffde7 0 14%, #ffd54f 42%, #ff9800 78%, #f57c00);
  box-shadow: 0 6px 0 #c25e00, 0 10px 18px rgba(0,0,0,.25);
  display: flex; align-items: center; justify-content: center;
  transition: filter .45s ease;
  -webkit-tap-highlight-color: transparent; touch-action: none;
}
.move-btn:nth-child(2) { background: radial-gradient(circle at 34% 28%, #fff 0 14%, #80deea 42%, #26a69a 78%, #00897b); box-shadow: 0 6px 0 #00695c, 0 10px 18px rgba(0,0,0,.25); }
.move-btn:nth-child(3) { background: radial-gradient(circle at 34% 28%, #fff 0 14%, #f48fb1 42%, #ab47bc 78%, #8e24aa); box-shadow: 0 6px 0 #5e1675, 0 10px 18px rgba(0,0,0,.25); }
.move-btn .mv-e { font-size: 36px; line-height: 1; filter: drop-shadow(0 2px 0 rgba(0,0,0,.18)); pointer-events: none; }
.move-btn .mv-l {
  position: absolute; top: -20px; left: 50%; transform: translateX(-50%); white-space: nowrap; pointer-events: none;
  font-size: 13px; font-weight: 800; color: #3e2723; background: rgba(255,255,255,.92); border-radius: 999px; padding: 1px 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,.15);
}
.move-btn::after {
  content: ""; position: absolute; inset: -8px; border-radius: 50%; pointer-events: none;
  background: conic-gradient(rgba(255,255,255,.95) calc(var(--p, 0) * 1turn), transparent 0);
  -webkit-mask: radial-gradient(circle, transparent 62%, #000 64%); mask: radial-gradient(circle, transparent 62%, #000 64%);
}
.move-btn::before {
  /* v15.2: one soft halo that breathes slowly (3 s) and is never restarted; states only change its colour */
  content: ""; position: absolute; inset: -5px; border-radius: 50%; pointer-events: none;
  box-shadow: 0 0 12px 3px rgba(255,255,255,.5);
  animation: mv-breathe 3s ease-in-out infinite;
  transition: box-shadow .6s ease;
}
.move-btn.on::before { box-shadow: 0 0 0 3px rgba(255,255,255,.9), 0 0 20px 7px rgba(255,236,120,.85); }
.move-btn.cool::before { box-shadow: 0 0 6px 1px rgba(255,255,255,.12); }
.move-btn:active, .move-btn.pop { transform: translateY(4px) scale(.96); box-shadow: 0 2px 0 rgba(0,0,0,.3); }
.move-btn.pop { animation: mv-pop .35s ease-out; }
.move-btn.cool { filter: saturate(.5) brightness(.88); } /* steady dim while it recharges; the ring fills smoothly */
.move-btn.nope { animation: mv-nope .3s; }
@keyframes mv-breathe { 0%, 100% { opacity: .55; transform: scale(1); } 50% { opacity: 1; transform: scale(1.04); } }
@keyframes mv-pop { 0% { transform: scale(.85); } 60% { transform: scale(1.12); } 100% { transform: scale(1); } }
@keyframes mv-nope { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
@media (max-width: 520px) {
  /* portrait phones: a column centred over the joystick, so the right-hand buttons can be any width */
  .moves { left: 56px; bottom: calc(186px + var(--safe-bottom)); flex-direction: column-reverse; gap: 27px; }
  .move-btn { width: 62px; height: 62px; border-width: 3px; }
  .move-btn .mv-e { font-size: 30px; }
  .move-btn .mv-l { font-size: 12px; top: -19px; }
}
@media (max-height: 520px) {
  .moves { left: calc(190px + env(safe-area-inset-left, 0px)); bottom: calc(16px + var(--safe-bottom)); gap: 12px; }
  .move-btn { width: 62px; height: 62px; border-width: 3px; }
  .move-btn .mv-e { font-size: 30px; }
  .move-btn .mv-l { font-size: 12px; top: -19px; }
}
@media (prefers-reduced-motion: reduce) { .move-btn::before { animation: none; } }

/* v15.4: mini game end - one small, friendly Play again that fades away when you walk off */
.play-action-btn[data-action="miniagain"] { height: 58px; min-width: 0; padding: 0 20px; font-size: 20px; background: linear-gradient(180deg, #b388ff, #7c4dff); box-shadow: 0 6px 0 #4527a0, 0 10px 18px rgba(0,0,0,.22); transition: opacity .35s ease; }
.play-action-btn.fade-out { opacity: 0; pointer-events: none; transition: opacity .35s ease; }
@media (max-width: 600px) { .play-action-btn[data-action="miniagain"] { height: 54px; font-size: 19px; } }

/* v15.4: token counter (shows while you drive) */
.token-pill { position: absolute; right: calc(8px + env(safe-area-inset-right, 0px)); top: calc(140px + var(--safe-top)); z-index: 6; pointer-events: none; padding: 5px 12px; border-radius: 999px; background: linear-gradient(180deg, #fff8d6, #ffe082); color: #6d4300; font-weight: 700; font-size: 17px; box-shadow: 0 3px 0 #c79100, 0 6px 12px rgba(0,0,0,.16); }
.token-pill b { font-weight: 800; }
.token-pill.pop { animation: tokPop .45s ease-out; }
@keyframes tokPop { 0% { transform: scale(1); } 35% { transform: scale(1.28); } 100% { transform: scale(1); } }
@media (max-width: 600px) { .token-pill { font-size: 16px; padding: 4px 10px; right: calc(6px + env(safe-area-inset-right, 0px)); top: calc(132px + var(--safe-top)); } }
@media (prefers-reduced-motion: reduce) { .token-pill.pop { animation: none; } }

.fw-banner {
  position: absolute;
  left: 50%;
  top: calc(88px + var(--safe-top));
  transform: translateX(-50%);
  z-index: 6;
  pointer-events: none;
  background: linear-gradient(180deg, #fff8e1, #ffd54f);
  color: #4a148c;
  font-weight: 800;
  font-size: clamp(20px, 5.4vw, 30px);
  letter-spacing: 0.02em;
  padding: 9px 22px;
  border-radius: 999px;
  border: 2.5px solid #fff;
  box-shadow: 0 6px 0 rgba(74, 20, 140, 0.28), 0 12px 24px rgba(0,0,0,.28), 0 0 18px 4px rgba(255, 213, 79, .55);
  text-shadow: 0 1px 0 rgba(255,255,255,.7);
  white-space: nowrap;
  animation: fwPop .45s cubic-bezier(.2,1.4,.4,1) both;
}
@keyframes fwPop {
  from { transform: translateX(-50%) scale(.6); opacity: 0; }
  to { transform: translateX(-50%) scale(1); opacity: 1; }
}
@media (max-width: 820px) {
  .fw-banner { top: calc(70px + var(--safe-top)); font-size: 18px; padding: 8px 16px; }
}

/* v17.5.2 (t133u): smaller green Get Out, tucked into the top-right corner */
#btn-play-down.play-down-btn {
  top: calc(86px + var(--safe-top));
  bottom: auto;
  right: calc(8px + env(safe-area-inset-right, 0px));
  height: 48px;
  min-height: 44px;
  min-width: 44px;
  padding: 0 14px;
  font-size: 16px;
  line-height: 1.1;
  white-space: nowrap;
  box-shadow: 0 4px 0 #2f6a12, 0 8px 14px rgba(0,0,0,.22);
}
#btn-play-down.play-down-btn:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #2f6a12;
}
@media (max-width: 520px) {
  #btn-play-down.play-down-btn {
    top: calc(84px + var(--safe-top));
    right: calc(6px + env(safe-area-inset-right, 0px));
    height: 44px;
    min-height: 40px;
    padding: 0 12px;
    font-size: 15px;
  }
}
@media (max-height: 700px) {
  #btn-play-down.play-down-btn { top: calc(84px + var(--safe-top)); }
}
@media (max-height: 520px) {
  #btn-play-down.play-down-btn {
    top: calc(82px + var(--safe-top));
    height: 42px;
    min-height: 40px;
    font-size: 14px;
    padding: 0 10px;
  }
}

/* v15.7.1: look-up slider during the fireworks show (mid-right, clear of Get Out and the pink cluster) */
.fw-look {
  position: absolute;
  right: calc(10px + env(safe-area-inset-right, 0px));
  top: calc(260px + var(--safe-top));
  z-index: 6;
  width: 70px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  pointer-events: auto;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  transform: translateX(130%);
  transition: transform .45s cubic-bezier(.2, 1.2, .4, 1);
}
.fw-look.on { transform: translateX(0); }
.fw-look.hidden { display: none; }
.fw-look-label {
  pointer-events: none;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.02em;
  color: #fff8e1;
  text-shadow: 0 2px 0 rgba(74, 20, 140, .55), 0 3px 8px rgba(0,0,0,.4);
  white-space: nowrap;
}
.fw-look-track {
  width: 64px;
  height: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 0;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(25, 18, 70, .72), rgba(12, 20, 48, .78));
  border: 2.5px solid rgba(255, 255, 255, .85);
  box-shadow: 0 8px 0 rgba(40, 20, 90, .35), 0 12px 22px rgba(0,0,0,.28);
  touch-action: none;
}
.fw-look-ico {
  font-size: 22px;
  line-height: 1;
  pointer-events: none;
  filter: drop-shadow(0 2px 0 rgba(0,0,0,.25));
}
.fw-look-rail {
  position: relative;
  flex: 1 1 auto;
  width: 10px;
  margin: 2px 0;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffe082, #7e57c2 55%, #43a047);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.35);
  pointer-events: none;
}
.fw-look-thumb {
  position: absolute;
  left: 50%;
  bottom: 0%;
  width: 48px;
  height: 48px;
  margin: 0;
  padding: 0;
  border: 3px solid #fff;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff59d, #ffca28 58%, #f9a825);
  box-shadow: 0 4px 0 #c79100, 0 8px 14px rgba(0,0,0,.28);
  transform: translate(-50%, 50%);
  pointer-events: none;
  touch-action: none;
}
@media (min-width: 821px) {
  .fw-look { top: calc(284px + var(--safe-top)); width: 78px; right: calc(16px + env(safe-area-inset-right, 0px)); }
  .fw-look-track { width: 70px; height: 230px; }
  .fw-look-thumb { width: 54px; height: 54px; }
  .fw-look-label { font-size: 15px; }
}
@media (max-height: 700px) {
  .fw-look { top: calc(248px + var(--safe-top)); }
  .fw-look-track { height: 170px; }
}
@media (max-height: 520px) {
  .fw-look { top: calc(196px + var(--safe-top)); width: 60px; }
  .fw-look-track { height: 140px; width: 54px; }
  .fw-look-thumb { width: 42px; height: 42px; }
  .fw-look-label { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  .fw-look { transition: none; }
}

/* v15.8: carnival aim hints + high-striker meter (left, clear of Get Out / Fire) */
.tp-hint {
  position: absolute;
  left: 50%;
  top: 46%;
  transform: translate(-50%, -50%);
  z-index: 7;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
  -webkit-user-select: none;
  user-select: none;
  text-align: center;
  max-width: min(280px, 78vw);
}
.tp-hint.hidden { display: none; }
.tp-hint p {
  margin: 0;
  padding: 8px 14px;
  border-radius: 18px;
  background: rgba(20, 16, 48, .78);
  border: 2px solid #fff8e1;
  color: #fff8e1;
  font-weight: 800;
  font-size: 16px;
  letter-spacing: 0.01em;
  text-shadow: 0 2px 0 rgba(0,0,0,.35);
  box-shadow: 0 8px 18px rgba(0,0,0,.28);
}
.tp-hint-hand {
  font-size: 42px;
  line-height: 1;
  filter: drop-shadow(0 4px 0 rgba(0,0,0,.25));
  animation: tpHintDrag 1.2s ease-in-out infinite;
}
.tp-hint[data-kind="flick"] .tp-hint-hand { animation-name: tpHintFlick; }
.tp-hint[data-kind="tap"] .tp-hint-hand { animation-name: tpHintTap; }
.tp-hint[data-kind="hold"] .tp-hint-hand { animation-name: tpHintHold; }
@keyframes tpHintDrag {
  0% { transform: translate(18px, 22px) scale(1); }
  50% { transform: translate(-18px, -10px) scale(1.05); }
  100% { transform: translate(18px, 22px) scale(1); }
}
@keyframes tpHintFlick {
  0%, 20% { transform: translate(0, 24px) scale(1); opacity: 1; }
  55% { transform: translate(0, -28px) scale(1.1); opacity: 1; }
  80%, 100% { transform: translate(0, -28px) scale(.9); opacity: .35; }
}
@keyframes tpHintTap {
  0%, 35% { transform: translate(0, 0) scale(1); }
  48% { transform: translate(0, 8px) scale(.88); }
  62%, 100% { transform: translate(0, 0) scale(1); }
}
@keyframes tpHintHold {
  0%, 20% { transform: translate(8px, 8px) scale(1); }
  40%, 70% { transform: translate(8px, 8px) scale(.86); }
  100% { transform: translate(-8px, -12px) scale(1); }
}
.tp-meter {
  position: absolute;
  left: calc(10px + env(safe-area-inset-left, 0px));
  top: calc(248px + var(--safe-top));
  z-index: 6;
  width: 56px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  pointer-events: auto;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
.tp-meter.hidden { display: none; }
.tp-meter-max, .tp-meter-tap {
  font-weight: 800;
  font-size: 13px;
  color: #ffe082;
  text-shadow: 0 2px 0 rgba(80, 40, 0, .45), 0 2px 8px rgba(0,0,0,.35);
}
.tp-meter-track {
  position: relative;
  width: 28px;
  height: 200px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffd54f 0%, #ffd54f 12%, #ff8a65 12%, #ef5350 55%, #5c6bc0 100%);
  border: 3px solid #fff;
  box-shadow: 0 6px 0 rgba(80, 40, 0, .3), 0 10px 16px rgba(0,0,0,.25);
}
.tp-meter-sweet {
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 14%;
  border-radius: 999px 999px 8px 8px;
  box-shadow: 0 0 10px 2px rgba(255, 236, 120, .8);
  pointer-events: none;
}
.tp-meter-needle {
  position: absolute;
  left: 50%;
  bottom: 0%;
  width: 42px;
  height: 14px;
  margin: 0;
  border-radius: 8px;
  background: #fff;
  border: 3px solid #212121;
  box-shadow: 0 2px 0 #000, 0 3px 8px rgba(0,0,0,.35);
  transform: translate(-50%, 50%);
  pointer-events: none;
}
@media (min-width: 821px) {
  .tp-meter { top: calc(268px + var(--safe-top)); width: 64px; left: calc(16px + env(safe-area-inset-left, 0px)); }
  .tp-meter-track { height: 230px; width: 32px; }
  .tp-hint p { font-size: 18px; }
}
@media (max-height: 700px) {
  .tp-meter { top: calc(220px + var(--safe-top)); }
  .tp-meter-track { height: 160px; }
}
@media (prefers-reduced-motion: reduce) {
  .tp-hint-hand { animation: none; }
}

/* v16.0: 12 compact machine cards, lock/preview badges, fly HUD, nest games */
.machine-card { position: relative; }
.lock-badge {
  position: absolute; top: 6px; right: 6px; z-index: 2;
  font-size: 11px; font-weight: 800; line-height: 1;
  background: rgba(0,0,0,.55); color: #fff; border-radius: 999px;
  padding: 3px 7px; text-shadow: none; pointer-events: none;
  border: 1px solid rgba(255,255,255,.5);
}
.lock-badge.preview { background: #1565c0; }
.machine-card.is-locked { filter: saturate(.85); }
.unlock-tip {
  position: fixed; inset: 0; z-index: 40; display: grid; place-items: center;
  background: rgba(20,10,30,.45); padding: 20px;
}
.unlock-tip.hidden { display: none; }

@media (max-width: 819px) {
  #picker { padding: calc(6px + var(--safe-top)) 8px calc(6px + var(--safe-bottom)); overflow: hidden; }
  .hero { margin: 0 0 4px; }
  .frog-badge { display: none; }
  .hero-brand { padding: 4px 10px 5px; border-radius: 16px; }
  .hero h1 { font-size: 18px; }
  .hero-sub { margin-top: 3px; font-size: 12px; padding: 1px 8px; box-shadow: 0 2px 0 #f9a825; }
  .picker-actions { margin: 0 auto 6px; gap: 6px; }
  .picker-actions .install-btn { padding: 6px 6px; font-size: 14px; }
  .machine-grid { gap: 6px; overflow: auto; -webkit-overflow-scrolling: touch; align-content: start; }
  .machine-card { padding: 4px 4px 5px; gap: 1px; border-radius: 12px; }
  .machine-card .card-emoji { display: none; }
  .machine-card .preview { height: 26px; padding: 2px; border-radius: 8px; gap: 1px; }
  .machine-card .preview .mini { width: 20px; height: 20px; }
  .machine-card h2 { font-size: 13px; }
  .lock-badge { font-size: 9px; top: 3px; right: 3px; padding: 2px 5px; }
  .legal { margin-top: 4px; font-size: 10px; }
}
@media (min-width: 820px) {
  .machine-grid { grid-template-columns: repeat(4, 1fr); max-width: 1180px; }
  .machine-card { padding: 10px 10px 12px; }
  .machine-card .preview { height: 68px; }
}

.fly-hud {
  position: absolute; z-index: 7; right: calc(18px + env(safe-area-inset-right, 0px));
  bottom: calc(168px + var(--safe-bottom));
  display: flex; flex-direction: column; gap: 10px; pointer-events: auto; touch-action: none;
}
.fly-hud.hidden { display: none; }
.fly-btn {
  width: 86px; min-height: 52px; border-radius: 16px; border: 3px solid #fff;
  background: linear-gradient(180deg, #fff59d, #ffd54f); color: #3e2723;
  font: 800 16px/1.1 inherit; box-shadow: 0 5px 0 #c49000, 0 8px 14px rgba(0,0,0,.25);
  touch-action: none; -webkit-tap-highlight-color: transparent;
}
.fly-btn:active { transform: translateY(3px); box-shadow: 0 2px 0 #c49000; }
.fly-toggle { background: linear-gradient(180deg, #c8e6c9, #66bb6a); box-shadow: 0 5px 0 #2e7d32, 0 8px 14px rgba(0,0,0,.25); }
@media (min-width: 820px) {
  .fly-hud { right: calc(28px + env(safe-area-inset-right, 0px)); bottom: calc(96px + var(--safe-bottom)); }
  .fly-btn { width: 96px; min-height: 56px; font-size: 17px; }
}

.nest-game {
  position: absolute; inset: 0; z-index: 16; display: grid; place-items: center;
  background: rgba(10,20,40,.45); padding: calc(12px + var(--safe-top)) 12px calc(12px + var(--safe-bottom));
  pointer-events: auto;
}
.nest-game.hidden { display: none; }
.nest-card {
  width: min(420px, 100%); background: #fffde7; border: 3px solid #fff; border-radius: 24px;
  padding: 14px 14px 16px; box-shadow: 0 12px 32px rgba(0,0,0,.4); color: #3e2723; text-align: center;
}
.nest-title { margin: 0 0 6px; font-size: 22px; }
.nest-msg, .nest-sub { margin: 0 0 8px; font-size: 15px; font-weight: 700; }
.nest-stage { min-height: 180px; }
#nest-cv { width: 100%; height: 240px; background: #fffde7; border-radius: 12px; border: 2px solid #e0e0e0; touch-action: none; }
.nest-colors, .nest-notes, .nest-feed { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.nest-col { width: 36px; height: 36px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 2px 0 #999; }
.nest-note, .nest-baby, .nest-stick, .nest-egg {
  width: 64px; height: 64px; border-radius: 16px; border: 3px solid #fff; font-size: 28px;
  background: #ffe082; box-shadow: 0 4px 0 #c49000;
}
.nest-note.on, .nest-baby:active { transform: translateY(2px); }
.nest-egg { width: 120px; height: 120px; font-size: 64px; border-radius: 50%; }
.nest-bowl { font-size: 42px; min-height: 70px; }
.nest-actions { display: flex; gap: 10px; justify-content: center; margin-top: 10px; }
.nest-out { background: #81c784; }


/* ===== v16.1: 3D square machine cards (2x2 visible on phones, 4-col desktop) ===== */
#picker {
  overflow: hidden;
  touch-action: manipulation;
}
.machine-grid {
  min-height: 0;
  align-content: start;
  grid-auto-rows: auto;
  overflow: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
  scrollbar-width: thin;
  perspective: 900px;
}
.machine-grid .machine-card {
  aspect-ratio: 1 / 1;
  min-height: auto;
  height: auto;
  align-self: start;
  padding: 0;
  gap: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  transform: none;
  transition: transform .16s ease, filter .16s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  overflow: visible;
}
.machine-card .card-body {
  position: absolute;
  inset: 0 0 9px 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.34) 0%, rgba(255,255,255,0) 28%),
    linear-gradient(180deg, var(--card) 0%, var(--card) 58%, var(--card-dark) 100%);
  border: 3px solid #fff;
  box-shadow:
    inset 0 2px 0 rgba(255,255,255,.5),
    inset 0 -3px 0 rgba(0,0,0,.16),
    0 8px 0 var(--card-dark),
    5px 8px 0 var(--card-dark),
    0 16px 22px rgba(0,0,0,.42);
  overflow: hidden;
  transform-origin: 50% 100%;
}
.machine-card .card-gloss {
  position: absolute;
  left: 8%;
  right: 8%;
  top: 5%;
  height: 26%;
  border-radius: 18px 18px 50% 50%;
  background: linear-gradient(180deg, rgba(255,255,255,.5) 0%, rgba(255,255,255,.08) 70%, rgba(255,255,255,0) 100%);
  pointer-events: none;
  z-index: 1;
}
.machine-card .card-marquee {
  flex: 0 0 auto;
  height: 11%;
  min-height: 14px;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,.18) 0 10px, rgba(255,255,255,0) 10px 18px),
    var(--card-accent, #ffca28);
  box-shadow: inset 0 2px 0 rgba(255,255,255,.4), inset 0 -2px 0 rgba(0,0,0,.22);
  z-index: 2;
}
.machine-card .card-glass {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 84%;
  margin: 6% auto 4%;
  min-height: 0;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,.62), rgba(255,255,255,.2) 55%, rgba(255,255,255,.08));
  box-shadow:
    inset 0 0 0 2px rgba(255,255,255,.65),
    inset 0 10px 14px rgba(255,255,255,.28),
    inset 0 -6px 10px rgba(0,0,0,.12);
  overflow: hidden;
}
.machine-card .card-emoji {
  display: block;
  font-size: clamp(42px, 16vw, 78px);
  line-height: 1;
  filter: none;
  text-shadow: 0 3px 0 rgba(0,0,0,.28), 0 8px 12px rgba(0,0,0,.2);
}
.machine-card .preview {
  height: auto;
  width: auto;
  background: transparent;
  box-shadow: none;
  padding: 0;
  gap: 3px;
  overflow: visible;
}
.machine-card .preview .mini {
  width: 28px;
  height: 28px;
}
.machine-card .card-plate {
  flex: 0 0 auto;
  width: 86%;
  margin: 0 auto 8%;
  background: rgba(16, 6, 36, .78);
  border: 2px solid #fff;
  border-radius: 12px;
  padding: 5px 6px 6px;
  box-shadow: 0 3px 0 rgba(0,0,0,.35);
  z-index: 2;
}
.machine-card .card-plate h2,
.machine-card h2 {
  margin: 0;
  font-size: clamp(14px, 4.2vw, 22px);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: .02em;
  color: #fff;
  text-shadow: 0 2px 0 rgba(0,0,0,.7), 0 0 8px rgba(0,0,0,.35);
}
.machine-card .tag { display: none; }
.lock-badge {
  z-index: 3;
  top: 12%;
  right: 7%;
  font-size: 10px;
  padding: 3px 7px;
  background: #1565c0;
  box-shadow: 0 2px 0 rgba(0,0,0,.3);
}
.lock-badge.preview { background: #1565c0; }
.machine-card.is-locked .card-body { filter: saturate(.85); }

.machine-card:active { transform: none; box-shadow: none; }
.machine-card:active .card-body {
  transform: translateY(7px);
  box-shadow:
    inset 0 2px 0 rgba(255,255,255,.4),
    inset 0 -2px 0 rgba(0,0,0,.16),
    0 2px 0 var(--card-dark),
    2px 2px 0 var(--card-dark),
    0 6px 10px rgba(0,0,0,.35);
}

@media (hover: hover) and (pointer: fine) {
  .machine-card:hover .card-body {
    transform: translateY(-5px) rotateX(5deg);
    box-shadow:
      inset 0 2px 0 rgba(255,255,255,.55),
      inset 0 -3px 0 rgba(0,0,0,.16),
      0 12px 0 var(--card-dark),
      6px 12px 0 var(--card-dark),
      0 22px 28px rgba(0,0,0,.4);
  }
  .machine-card:active .card-body {
    transform: translateY(7px) rotateX(0);
    box-shadow:
      inset 0 2px 0 rgba(255,255,255,.4),
      inset 0 -2px 0 rgba(0,0,0,.16),
      0 2px 0 var(--card-dark),
      2px 2px 0 var(--card-dark),
      0 6px 10px rgba(0,0,0,.35);
  }
}
@media (prefers-reduced-motion: reduce) {
  .machine-card, .machine-card .card-body { transition: none; }
  .machine-card:hover .card-body { transform: none; }
}

@media (max-width: 819px) {
  #picker { overflow: hidden; padding: calc(8px + var(--safe-top)) 10px calc(10px + var(--safe-bottom)); }
  .hero { margin: 0 0 8px; }
  .frog-badge { display: none; }
  .hero-brand { padding: 6px 12px 7px; border-radius: 18px; background: rgba(20, 8, 48, .82); }
  .hero h1 { font-size: 20px; }
  .hero-sub { margin-top: 4px; font-size: 13px; padding: 2px 10px; }
  .picker-actions { margin: 0 auto 10px; gap: 8px; }
  .picker-actions .install-btn { padding: 7px 8px; font-size: 15px; }
  /* 2 square rows + a peek of the next row, so about 4 cards show and the rest scrolls */
  .machine-grid {
    flex: 0 1 auto;
    gap: 12px;
    width: 100%;
    height: calc(2.32 * ((100vw - 20px - 12px) / 2) + 12px);
    max-height: calc(100dvh - 210px);
    overflow: auto;
  }
  .machine-card .card-emoji { display: block; font-size: clamp(40px, 15vw, 64px); }
  .machine-card .preview .mini { width: 22px; height: 22px; }
  .machine-card .card-plate h2, .machine-card h2 { font-size: 15px; }
  .lock-badge { font-size: 9px; padding: 2px 6px; }
  .legal { margin-top: auto; font-size: 10px; padding-top: 10px; }
}
@media (min-width: 820px) {
  #picker { overflow: hidden; padding: calc(10px + var(--safe-top)) 16px calc(10px + var(--safe-bottom)); }
  .hero { margin: 0 0 8px; }
  .frog-badge { width: 48px; height: 48px; font-size: 28px; margin-bottom: 4px; box-shadow: 0 4px 0 #2e7d32, 0 8px 14px rgba(0,0,0,.35); }
  .hero-brand { padding: 8px 16px 8px; border-radius: 22px; background: rgba(20, 8, 48, .8); }
  .hero h1 { font-size: clamp(22px, 2.4vw, 32px); }
  .hero-sub { margin-top: 5px; font-size: 16px; padding: 2px 12px; }
  .picker-actions { margin: 0 auto 10px; gap: 10px; }
  .picker-actions .install-btn { padding: 8px 14px; font-size: 16px; }
  .machine-grid { grid-template-columns: repeat(4, 1fr); max-width: 920px; gap: 16px; }
  .machine-card .card-body { border-radius: 26px; inset: 0 0 12px 0; }
  .machine-card .card-emoji { font-size: clamp(44px, 4.4vw, 72px); }
  .machine-card .preview .mini { width: 30px; height: 30px; }
  .machine-card .card-plate { border-radius: 14px; padding: 6px 8px 7px; }
  .machine-card .card-plate h2, .machine-card h2 { font-size: clamp(16px, 1.5vw, 20px); }
  .lock-badge { font-size: 12px; padding: 4px 8px; }
  .legal { margin-top: auto; font-size: 12px; }
}


/* ===== v16.2: My Prizes gallery ===== */
.home-foot {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 100%;
  max-width: 920px;
  margin: auto auto 0;
  padding-top: 8px;
  z-index: 2;
}
.home-foot .legal { margin: 0; padding: 0; }
.prizes-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: min(100%, 420px);
  min-height: 56px;
  padding: 10px 18px;
  border: 3px solid #fff;
  border-radius: 20px;
  cursor: pointer;
  font: 800 20px/1 inherit;
  color: #fff;
  letter-spacing: .02em;
  background:
    linear-gradient(180deg, rgba(255,255,255,.4) 0%, rgba(255,255,255,0) 32%),
    linear-gradient(180deg, #ffd54f 0%, #ffb300 55%, #f57c00 100%);
  box-shadow:
    inset 0 2px 0 rgba(255,255,255,.5),
    0 6px 0 #e65100,
    0 12px 18px rgba(0,0,0,.35);
  text-shadow: 0 2px 0 rgba(0,0,0,.35);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.prizes-btn .park-count {
  background: #fff;
  color: #e65100;
  text-shadow: none;
}
.prizes-btn:active {
  transform: translateY(4px);
  box-shadow: inset 0 2px 0 rgba(255,255,255,.4), 0 2px 0 #e65100, 0 6px 10px rgba(0,0,0,.3);
}

#prizes {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #2a1650;
  padding: 0;
  color: #fff;
  touch-action: manipulation;
}
#prizes.hidden { display: none !important; }
.prizes-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(255,213,79,.28), transparent 55%),
    linear-gradient(180deg, #4a148c 0%, #2a1650 42%, #1a0a36 100%);
}
#prizes > *:not(.prizes-bg) { position: relative; z-index: 1; }
.prizes-top {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: calc(10px + var(--safe-top)) 12px 8px;
}
.prizes-top h1 {
  margin: 0;
  flex: 1 1 auto;
  font-size: clamp(22px, 6vw, 32px);
  text-shadow: 0 3px 0 rgba(0,0,0,.4);
}
.prizes-total {
  font-weight: 800;
  background: rgba(255,255,255,.18);
  border: 2px solid #fff;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: clamp(12px, 3.2vw, 16px);
  white-space: nowrap;
}
.park-hud-count {
  display: inline-block;
  margin-left: 8px;
  vertical-align: middle;
  background: #fff;
  color: #2e7d32;
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 0.52em;
  font-weight: 800;
  letter-spacing: 0;
  text-shadow: none;
}
.park-hud-count:empty { display: none; }
.prizes-toolbar.hidden, .prizes-filters.hidden, #prizes-grid.hidden { display: none !important; }
.prizes-toolbar {
  flex: 0 0 auto;
  display: flex;
  gap: 8px;
  padding: 0 12px 8px;
  flex-wrap: wrap;
  justify-content: center;
}
.prizes-tool {
  flex: 1 1 0;
  min-width: 140px;
  min-height: 48px;
  border: 2.5px solid #fff;
  border-radius: 16px;
  font: 800 15px/1.1 inherit;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(180deg, #81c784, #388e3c);
  box-shadow: 0 4px 0 #1b5e20, 0 8px 12px rgba(0,0,0,.25);
  text-shadow: 0 1px 0 rgba(0,0,0,.3);
  touch-action: manipulation;
}
#btn-park-none {
  background: linear-gradient(180deg, #90caf9, #1976d2);
  box-shadow: 0 4px 0 #0d47a1, 0 8px 12px rgba(0,0,0,.25);
}
.prizes-tool:active { transform: translateY(3px); box-shadow: 0 1px 0 #1b5e20; }
#btn-park-none:active { box-shadow: 0 1px 0 #0d47a1; }
.prizes-filters {
  flex: 0 0 auto;
  display: flex;
  gap: 8px;
  padding: 0 12px 10px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
  scrollbar-width: none;
}
.prizes-filters::-webkit-scrollbar { display: none; }
.prizes-chip {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 6px 12px;
  border: 2px solid #fff;
  border-radius: 999px;
  font: 800 14px/1 inherit;
  color: #fff;
  background: rgba(255,255,255,.16);
  cursor: pointer;
  touch-action: manipulation;
}
.prizes-chip.is-on {
  background: linear-gradient(180deg, #ffe082, #ffca28);
  color: #4a148c;
  box-shadow: 0 3px 0 #f9a825;
}
.prizes-grid {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  align-content: start;
  padding: 0 12px calc(16px + var(--safe-bottom));
}
@media (min-width: 560px) {
  .prizes-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 960px) {
  .prizes-grid { grid-template-columns: 1fr 1fr 1fr; max-width: 1100px; margin: 0 auto; width: 100%; }
}
.prize-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 12px 14px;
  border: 3px solid #fff;
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.35) 0%, rgba(255,255,255,0) 28%),
    linear-gradient(180deg, var(--card, #ce93d8) 0%, var(--card-dark, #6a1b9a) 100%);
  box-shadow: inset 0 2px 0 rgba(255,255,255,.45), 0 6px 0 var(--card-dark, #4a148c), 0 12px 18px rgba(0,0,0,.3);
  color: #fff;
  text-align: center;
}
.prize-thumb {
  width: 88px;
  height: 88px;
  border-radius: 18px;
  background: rgba(255,255,255,.55);
  display: grid;
  place-items: center;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.7);
}
.prize-thumb svg { width: 72px; height: 72px; display: block; }
.prize-card h2 {
  margin: 0;
  font-size: 20px;
  text-shadow: 0 2px 0 rgba(0,0,0,.45);
}
.prize-machine { margin: 0; font-size: 13px; font-weight: 800; opacity: .95; }
.prize-count {
  position: absolute;
  top: 10px;
  right: 10px;
  min-width: 28px;
  height: 28px;
  padding: 0 7px;
  border-radius: 999px;
  background: #fff;
  color: #4a148c;
  font-weight: 800;
  font-size: 14px;
  display: grid;
  place-items: center;
  border: 2px solid #4a148c;
}
.prize-actions {
  display: flex;
  gap: 8px;
  width: 100%;
  margin-top: 4px;
}
.prize-park, .prize-del {
  flex: 1 1 0;
  min-height: 48px;
  border: 2.5px solid #fff;
  border-radius: 14px;
  font: 800 15px/1.1 inherit;
  cursor: pointer;
  color: #fff;
  touch-action: manipulation;
}
.prize-park {
  background: linear-gradient(180deg, #a5d6a7, #43a047);
  box-shadow: 0 4px 0 #1b5e20;
}
.prize-park.is-on {
  background: linear-gradient(180deg, #81c784, #2e7d32);
}
.prize-park:not(.is-on) {
  background: linear-gradient(180deg, #ce93d8, #8e24aa);
  box-shadow: 0 4px 0 #4a148c;
}
.prize-del {
  flex: 0 0 auto;
  min-width: 88px;
  background: linear-gradient(180deg, #ef9a9a, #e53935);
  box-shadow: 0 4px 0 #b71c1c;
}
.prize-park:active, .prize-del:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(0,0,0,.4); }
.prizes-empty {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 24px;
  text-align: center;
}
.prizes-empty.hidden { display: none !important; }
.prizes-empty-lead { font-size: 22px; font-weight: 800; margin: 0; }
.prizes-empty p { margin: 0; font-weight: 700; }
.prizes-tip {
  flex: 0 0 auto;
  margin: 0 12px 8px;
  padding: 8px 12px;
  border-radius: 14px;
  background: #fff8e1;
  color: #4a148c;
  font-weight: 800;
  text-align: center;
  box-shadow: 0 3px 0 #f9a825;
}
.prizes-tip.hidden { display: none !important; }
.prizes-confirm {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  background: rgba(20,10,30,.5);
  padding: 20px;
}
.prizes-confirm.hidden { display: none !important; }
.prizes-confirm .park-card {
  width: min(420px, 100%);
  background: #fffde7;
  color: #3e2723;
  border: 3px solid #fff;
  border-radius: 24px;
  padding: 18px 16px 16px;
  text-align: center;
  box-shadow: 0 12px 32px rgba(0,0,0,.4);
}
.prizes-confirm p { margin: 0 0 14px; font-size: 18px; font-weight: 800; }
.prizes-confirm-actions { display: flex; gap: 10px; }
.prizes-confirm-actions > * { flex: 1 1 0; min-height: 52px; }
.prizes-del-btn {
  border: 3px solid #fff;
  border-radius: 16px;
  font: 800 16px/1 inherit;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(180deg, #ef9a9a, #e53935);
  box-shadow: 0 5px 0 #b71c1c;
}

@media (max-width: 819px) {
  .prizes-btn { min-height: 52px; font-size: 18px; border-radius: 18px; }
  .machine-grid { max-height: calc(100dvh - 300px); }
  .home-foot { padding-top: 6px; }
}
@media (min-width: 820px) {
  .prizes-btn { min-height: 58px; font-size: 22px; width: min(100%, 380px); }
  .prize-thumb { width: 100px; height: 100px; }
}


/* ===== v16.3: drag to explore the park ===== */
.park-stage { cursor: grab; }
.park-stage.is-dragging { cursor: grabbing; }
.park-center-btn {
  position: absolute;
  left: calc(16px + env(safe-area-inset-left, 0px));
  top: auto;
  bottom: calc(26px + var(--safe-bottom));
  z-index: 6;
  min-height: 48px;
  padding: 8px 14px;
  border: 3px solid #fff;
  border-radius: 999px;
  font: 800 16px/1 inherit;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(180deg, #81c784, #388e3c);
  box-shadow: 0 5px 0 #1b5e20, 0 10px 16px rgba(0,0,0,.28);
  text-shadow: 0 1px 0 rgba(0,0,0,.3);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.park-center-btn:active { transform: translateY(3px); box-shadow: 0 2px 0 #1b5e20, 0 6px 10px rgba(0,0,0,.25); }
.park-center-btn.hidden { display: none !important; }
.explore-hint {
  position: absolute;
  left: 50%;
  bottom: calc(100px + var(--safe-bottom));
  transform: translateX(-50%);
  z-index: 7;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 18px 12px;
  border-radius: 22px;
  background: rgba(255,255,255,.94);
  color: #4a148c;
  font-weight: 800;
  font-size: clamp(16px, 4vw, 22px);
  box-shadow: 0 6px 0 rgba(74,20,140,.25), 0 12px 24px rgba(0,0,0,.22);
  pointer-events: none;
  text-align: center;
  white-space: nowrap;
}
.explore-hint.hidden { display: none !important; }
.explore-hint p { margin: 0; }
.explore-hint-hand {
  font-size: 34px;
  animation: exploreHintDrag 1.5s ease-in-out infinite;
}
@keyframes exploreHintDrag {
  0% { transform: translateX(-28px) rotate(-12deg); }
  50% { transform: translateX(28px) rotate(8deg); }
  100% { transform: translateX(-28px) rotate(-12deg); }
}
@media (min-width: 820px) {
  .park-center-btn { font-size: 18px; min-height: 52px; padding: 8px 16px; bottom: calc(28px + var(--safe-bottom)); }
  .explore-hint { bottom: calc(100px + var(--safe-bottom)); }
}
@media (max-height: 700px) {
  .park-center-btn { bottom: calc(18px + var(--safe-bottom)); }
  .explore-hint { bottom: calc(80px + var(--safe-bottom)); padding: 8px 14px; font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .explore-hint-hand { animation: none; }
}


/* ===== v16.4: fireworks look-up drag (slider removed) ===== */
.fw-look { display: none !important; }
.fw-hint {
  position: absolute;
  left: 50%;
  bottom: calc(110px + var(--safe-bottom));
  transform: translateX(-50%);
  z-index: 8;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 10px 18px 12px;
  border-radius: 22px;
  background: rgba(20, 16, 48, .88);
  color: #fff8e1;
  font-weight: 800;
  font-size: clamp(16px, 4vw, 22px);
  box-shadow: 0 6px 0 rgba(255, 213, 79, .35), 0 12px 24px rgba(0,0,0,.35);
  pointer-events: none;
  text-align: center;
  white-space: nowrap;
  text-shadow: 0 2px 0 rgba(0,0,0,.35);
}
.fw-hint.hidden { display: none !important; }
.fw-hint p { margin: 0; }
.fw-hint-hand {
  font-size: 34px;
  animation: fwHintUp 1.35s ease-in-out infinite;
}
@keyframes fwHintUp {
  0% { transform: translateY(16px); opacity: .7; }
  50% { transform: translateY(-18px); opacity: 1; }
  100% { transform: translateY(16px); opacity: .7; }
}
@media (min-width: 820px) {
  .fw-hint { bottom: calc(100px + var(--safe-bottom)); }
}
@media (max-height: 700px) {
  .fw-hint { bottom: calc(80px + var(--safe-bottom)); padding: 8px 14px; font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .fw-hint-hand { animation: none; }
}

/* ===== v17.0 telescope zoom levels + shuttle / planets ===== */
.scope-zbtn.is-on {
  color: #fff;
  background: linear-gradient(180deg, #b388ff, #7c4dff);
  box-shadow: 0 6px 0 #4a148c, 0 8px 16px rgba(0,0,0,.3);
}
.scope-zbtn.is-on:active { box-shadow: 0 2px 0 #4a148c; }
.scope-zbtn { font-size: 26px; letter-spacing: -0.03em; }
@media (max-width: 520px) { .scope-zbtn { font-size: 22px; } }

.planets-btn { margin-top: 10px; }
.planets-lead {
  text-align: center; margin: 4px 16px 16px; font-weight: 700; color: #4a148c;
  font-size: 18px; user-select: none;
}

.planet-pick {
  position: fixed; inset: 0; z-index: 40; display: flex; align-items: center; justify-content: center;
  background: rgba(12, 8, 40, 0.55); padding: 16px;
  padding-top: calc(16px + var(--safe-top)); padding-bottom: calc(16px + var(--safe-bottom));
}
.planet-pick.hidden { display: none; }
.planet-pick-card {
  width: min(560px, 100%); max-height: 100%; overflow: auto;
  background: linear-gradient(180deg, #fff8e1, #ffe0b2);
  border-radius: 28px; padding: 18px 16px 16px;
  box-shadow: 0 18px 40px rgba(0,0,0,.4);
  user-select: none; -webkit-user-select: none;
}
.planet-pick-title, #planet-pick-title {
  margin: 0; font-size: 24px; font-weight: 800; color: #4a148c; line-height: 1.25; text-align: left;
}
.shuttle-pilot-row { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; }
.shuttle-pilot-face {
  flex: 0 0 64px; width: 64px; height: 64px; border-radius: 50%;
  background: linear-gradient(180deg, #c8e6c9, #66bb6a);
  display: flex; align-items: center; justify-content: center; font-size: 36px;
  box-shadow: 0 4px 0 #2e7d32; border: 3px solid #fff;
}
.planet-pick-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px;
}
@media (min-width: 520px) { .planet-pick-grid { grid-template-columns: repeat(3, 1fr); } }
.planet-card {
  appearance: none; border: 0; border-radius: 20px; cursor: pointer;
  background: linear-gradient(180deg, #ede7f6, #d1c4e9);
  padding: 10px 8px 12px; text-align: center;
  box-shadow: 0 5px 0 #673ab7, 0 8px 14px rgba(0,0,0,.2);
  font-family: inherit; color: #311b92; font-weight: 800;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
}
.planet-card:active { transform: translateY(4px); box-shadow: 0 2px 0 #673ab7; }
.planet-card-thumb {
  width: 78px; height: 78px; margin: 0 auto 8px; border-radius: 50%;
  box-shadow: inset 0 -8px 16px rgba(0,0,0,.25), 0 4px 10px rgba(0,0,0,.2);
  background-size: cover; background-position: center;
}
.planet-card h3 { margin: 0; font-size: 18px; }
.planet-card p { margin: 2px 0 0; font-size: 13px; font-weight: 700; color: #6a1b9a; }
#planet-pick-cancel { width: 100%; margin-top: 12px; }

.shuttle-hud {
  position: absolute; inset: 0; z-index: 12; pointer-events: none;
}
.shuttle-hud.hidden { display: none; }
.shuttle-cockpit {
  position: absolute; inset: 0; pointer-events: none;
}
.shuttle-cockpit.hidden { display: none; }
.cockpit-post {
  position: absolute; top: 0; bottom: 18%; width: 44px;
  background: linear-gradient(90deg, #37474f, #90a4ae 40%, #263238);
  box-shadow: 0 0 16px rgba(0,0,0,.4);
}
.cockpit-post-l { left: 0; transform: skewX(-4deg); }
.cockpit-post-r { right: 0; transform: skewX(4deg); }
.cockpit-dash {
  position: absolute; left: 0; right: 0; bottom: 0; height: 22%;
  background: linear-gradient(180deg, #546e7a, #263238);
  border-top: 6px solid #90a4ae;
  display: flex; align-items: center; justify-content: space-evenly;
  padding-bottom: var(--safe-bottom);
}
.cockpit-dial {
  width: 52px; height: 52px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #b9f6ca, #1b5e20 70%);
  box-shadow: inset 0 0 0 4px #37474f, 0 2px 6px #000;
}
.cockpit-screen {
  min-width: 36%; height: 48px; border-radius: 10px;
  background: #0d47a1; color: #e3f2fd; font-weight: 800; font-size: 20px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: inset 0 0 12px #01579b, 0 0 8px #29b6f6;
  letter-spacing: 0.02em;
}
.shuttle-belt {
  position: absolute; left: 18%; right: 18%; bottom: 24%; height: 18px;
  background: linear-gradient(180deg, #eceff1, #78909c);
  border-radius: 8px; transform-origin: left center; transform: scaleX(0);
  box-shadow: 0 3px 0 #455a64;
}
.shuttle-belt.is-on { transform: scaleX(1); transition: transform 0.45s ease-out; }
.shuttle-pilot-bubble {
  position: absolute; left: 14px; right: 14px; top: calc(70px + var(--safe-top));
  background: rgba(255,255,255,.95); color: #4a148c; font-weight: 800; font-size: 22px;
  border-radius: 22px; padding: 12px 16px 12px 12px;
  display: flex; gap: 10px; align-items: center;
  box-shadow: 0 8px 20px rgba(0,0,0,.3); pointer-events: none;
}
.shuttle-pilot-bubble.hidden { display: none; }
.shuttle-pilot-bubble p { margin: 0; overflow-wrap: anywhere; word-break: break-word; }
.shuttle-skip {
  pointer-events: auto; position: absolute; left: 14px; right: auto; top: calc(70px + var(--safe-top));
  z-index: 14; height: 56px; padding: 0 20px; border: 0; border-radius: 999px;
  font-family: inherit; font-weight: 800; font-size: 22px; color: #fff; cursor: pointer;
  background: linear-gradient(180deg, #80cbc4, #00838f);
  box-shadow: 0 6px 0 #004d40, 0 8px 16px rgba(0,0,0,.3);
}
.shuttle-skip.hidden { display: none; }
.shuttle-skip:active { transform: translateY(4px); box-shadow: 0 2px 0 #004d40; }

/* v17.2.3: the Planets screen is a full screen like My Prizes (it sat below the fold outside #app = blank blue) */
#planets {
  z-index: 8; display: flex; flex-direction: column; overflow-x: hidden; overflow-y: auto;
  -webkit-overflow-scrolling: touch; background: #2a1650; color: #fff; padding: 0; touch-action: pan-y;
  padding-bottom: var(--safe-bottom, 0px);
}
#planets.hidden { display: none !important; }
#planets > *:not(.prizes-bg) { position: relative; z-index: 1; }
#planets .prizes-bg { position: fixed; }
#planets .planets-lead { color: #ffe082; }
.planets-screen-grid { padding: 0 16px 24px; }
.planets-foot { display: flex; justify-content: center; padding: 4px 16px 28px; }
.planets-home-big {
  font-family: inherit; font-weight: 800; font-size: 22px; color: #fff; cursor: pointer; border: 0;
  border-radius: 999px; padding: 14px 28px; background: linear-gradient(180deg, #ffb74d, #f57c00);
  box-shadow: 0 6px 0 #e65100, 0 8px 16px rgba(0,0,0,.3);
}
.planets-home-big:active { transform: translateY(4px); box-shadow: 0 2px 0 #e65100; }

/* v17.2 planet stores */
.planet-shop {
  position: fixed; inset: 0; z-index: 42; display: flex; align-items: center; justify-content: center;
  background: rgba(12, 8, 40, 0.58); padding: 12px;
  padding-top: calc(12px + var(--safe-top)); padding-bottom: calc(12px + var(--safe-bottom));
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
.planet-shop.hidden { display: none; }
.planet-shop-card {
  width: min(620px, 100%); max-height: 100%; overflow: auto;
  background: linear-gradient(180deg, #e8f5e9, #fff8e1);
  border-radius: 28px; padding: 16px 14px 14px;
  box-shadow: 0 18px 40px rgba(0,0,0,.4);
  user-select: none; -webkit-user-select: none;
}
.planet-shop-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.planet-shop-title { margin: 0; font-size: 24px; font-weight: 800; color: #1b5e20; line-height: 1.2; }
.planet-shop-bal {
  flex: 0 0 auto; padding: 6px 12px; border-radius: 999px;
  background: linear-gradient(180deg, #fff8d6, #ffe082); color: #6d4300;
  font-weight: 800; font-size: 18px; box-shadow: 0 3px 0 #c79100;
}
.planet-shop-sub { margin: 0 0 12px; font-size: 15px; font-weight: 700; color: #33691e; line-height: 1.3; }
.planet-shop-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
@media (min-width: 560px) { .planet-shop-grid { grid-template-columns: repeat(3, 1fr); } }
.shop-item {
  appearance: none; border: 0; border-radius: 18px; cursor: pointer;
  background: linear-gradient(180deg, #fff, #f3e5f5);
  padding: 10px 8px 12px; text-align: center; font-family: inherit;
  color: #311b92; font-weight: 800; box-shadow: 0 4px 0 #7e57c2, 0 7px 12px rgba(0,0,0,.16);
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
}
.shop-item:active { transform: translateY(3px); box-shadow: 0 1px 0 #7e57c2; }
.shop-item.is-broke { background: linear-gradient(180deg, #eceff1, #cfd8dc); color: #546e7a; box-shadow: 0 4px 0 #90a4ae; }
.shop-item-emoji { font-size: 28px; line-height: 1; display: block; margin-bottom: 4px; }
.shop-item-name { display: block; font-size: 14px; line-height: 1.2; }
.shop-item-price { display: block; margin-top: 4px; font-size: 15px; color: #e65100; }
.shop-item.is-broke .shop-item-price { color: #78909c; }
.shop-item-tag { display: block; font-size: 11px; font-weight: 700; color: #6a1b9a; margin-top: 2px; }
.planet-shop-confirm {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(12, 8, 40, 0.45); padding: 16px;
}
.planet-shop-confirm.hidden { display: none; }
.planet-shop-confirm-card {
  width: min(420px, 100%); background: #fff8e1; border-radius: 24px; padding: 18px 16px;
  box-shadow: 0 14px 32px rgba(0,0,0,.35);
}
.planet-shop-confirm-text { margin: 0 0 14px; font-size: 20px; font-weight: 800; color: #4a148c; line-height: 1.35; text-align: center; }
.planet-shop-confirm-row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.planet-shop-confirm-row .ask-btn, .planet-shop-confirm-row .prizes-tool { min-width: 120px; }
.planet-place-bar {
  position: absolute; left: 0; right: 0; bottom: calc(76px + var(--safe-bottom)); z-index: 20;
  padding: 10px 12px 12px;
  background: linear-gradient(180deg, rgba(255,248,225,0), rgba(255,248,225,.94) 28%, #fff8e1);
  pointer-events: none; user-select: none; -webkit-user-select: none;
}
.planet-place-bar.hidden { display: none; }
.planet-place-hint { pointer-events: none; text-align: center; margin: 0 0 8px; font-weight: 800; color: #4a148c; font-size: 16px; }
.planet-place-row { pointer-events: auto; display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.planet-place-row button { min-width: 64px; }
.planet-fly-hud {
  position: absolute; left: 12px; right: 12px; top: calc(86px + var(--safe-top)); z-index: 8;
  text-align: center; pointer-events: none; user-select: none; -webkit-user-select: none;
}
.planet-fly-hud.hidden { display: none; }
.planet-fly-label, .planet-fly-near {
  margin: 0 auto 6px; display: inline-block; padding: 6px 14px; border-radius: 999px;
  background: rgba(12, 8, 40, .72); color: #fff; font-weight: 800; font-size: 18px;
}
.planet-fly-near { display: block; width: fit-content; margin: 0 auto; font-size: 16px; background: rgba(25, 80, 40, .8); }
/* v17.2.3: quick captions fade on their own; the scope prompt pops */
.scope-seen { transition: opacity .5s ease; }
.scope-seen.seen-off { opacity: 0; }
#btn-play-action[data-action="mtnscope"] { animation: scopePop .9s ease-out 1, scopeGlow 1.6s ease-in-out .9s infinite; background: linear-gradient(180deg,#7e57c2,#5e35b1); color: #fff; }
@keyframes scopePop { 0% { transform: scale(.4); opacity: 0; } 60% { transform: scale(1.12); opacity: 1; } 100% { transform: scale(1); } }
@keyframes scopeGlow { 0%,100% { box-shadow: 0 6px 16px rgba(0,0,0,.3), 0 0 0 0 rgba(179,157,219,.9); } 50% { box-shadow: 0 6px 16px rgba(0,0,0,.3), 0 0 0 12px rgba(179,157,219,0); } }
/* v17.2.3: keep the big Back home button above the host's bottom-right badge on the live site */
#planets .planets-foot { position: sticky; bottom: 0; z-index: 2; padding: 10px 16px calc(74px + var(--safe-bottom, 0px)); background: linear-gradient(to top, rgba(42,22,80,.96) 70%, rgba(42,22,80,0)); }

/* ---------- v17.2.4 (t99u): planet store finder ---------- */
.store-go-btn {
  position: absolute;
  left: calc(12px + env(safe-area-inset-left, 0px));
  top: calc(140px + var(--safe-top));
  z-index: 7;
  min-height: 56px;
  padding: 0 18px;
  border: 3px solid #fff;
  border-radius: 999px;
  font-family: inherit;
  font-weight: 700;
  font-size: 21px;
  line-height: 1;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(180deg, #ffd54f, #f57c00);
  box-shadow: 0 6px 0 #a34f00, 0 10px 18px rgba(0,0,0,.3);
  text-shadow: 0 2px 0 rgba(0,0,0,.25);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  animation: storeGoIn .45s cubic-bezier(.2,1.6,.4,1) both, storeGoGlow 2.2s ease-in-out .5s infinite;
}
.store-go-btn:active { transform: translateY(3px); box-shadow: 0 3px 0 #a34f00, 0 6px 10px rgba(0,0,0,.25); }
.store-go-btn.hidden { display: none !important; }
@keyframes storeGoIn { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes storeGoGlow { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.15) drop-shadow(0 0 10px rgba(255,213,79,.9)); } }
.store-pop {
  position: absolute;
  left: 50%;
  top: calc(254px + var(--safe-top));
  z-index: 8;
  transform: translateX(-50%);
  max-width: 88vw;
  padding: 12px 22px;
  border: 4px solid #ffd54f;
  border-radius: 22px;
  background: rgba(40,16,90,.9);
  color: #fff;
  text-align: center;
  pointer-events: none;
  box-shadow: 0 10px 24px rgba(0,0,0,.35);
  animation: storePopIn .45s cubic-bezier(.2,1.6,.4,1) both;
}
.store-pop b { display: block; font-size: 24px; line-height: 1.15; }
.store-pop b::before { content: "🛒 "; }
.store-pop span { display: block; margin-top: 4px; font-size: 18px; color: #ffe082; font-weight: 700; }
.store-pop.hidden { display: none; }
@keyframes storePopIn { from { transform: translateX(-50%) scale(.6); opacity: 0; } to { transform: translateX(-50%) scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .store-go-btn, .store-pop { animation: none; } }
/* v17.2.4: planet store sheet ends above the "Built on Wix" badge (its grid scrolls inside) */
.planet-shop { padding-bottom: calc(76px + var(--safe-bottom)); }

/* v17.2.6: Items tab, place nudges, Space Rover (clear of the Wix badge) */
.planet-items-btn { top: calc(204px + var(--safe-top)); }
.planet-rover-btn { top: calc(268px + var(--safe-top)); background: linear-gradient(180deg,#ffb74d,#ef6c00); }
.planet-map-btn { top: calc(332px + var(--safe-top)); background: linear-gradient(180deg,#80deea,#00838f); box-shadow: 0 6px 0 #004d40, 0 10px 18px rgba(0,0,0,.3); }
.planet-map-btn:active { box-shadow: 0 3px 0 #004d40, 0 6px 10px rgba(0,0,0,.25); }
@media (max-height: 700px) {
  .planet-items-btn { top: calc(188px + var(--safe-top)); }
  .planet-rover-btn { top: calc(244px + var(--safe-top)); }
  .planet-map-btn { top: calc(300px + var(--safe-top)); }
}
.planet-items-grid { display: flex; flex-direction: column; gap: 8px; }
.planet-item-row {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  background: linear-gradient(180deg,#fff,#f3e5f5); border-radius: 18px; padding: 10px 12px;
  box-shadow: 0 3px 0 #7e57c2;
}
.planet-item-row .nm { font-weight: 800; color: #311b92; flex: 1 1 120px; font-size: 16px; }
.planet-item-row button { min-height: 48px; min-width: 72px; }
.planet-place-nudge { margin-bottom: 6px; }
.planet-place-row button { min-height: 52px; min-width: 64px; font-size: 22px; }

/* ---------- v17.2.7 (t106u): Smash / enter and Up/Down/Fly never overlap ---------- */
/* The pink action button and the fly column share one right-hand stack: Fly stays
   on the bottom of the stack (where kids already look for it), and Smash / Climb /
   Shop / board-a-machine sits in its own slot just above, fully visible and tappable.
   Get Out stays top-right. The stack itself stays at least 70 px above the Wix badge. */
.play-right-stack {
  position: absolute;
  right: calc(18px + env(safe-area-inset-right, 0px));
  bottom: calc(168px + var(--safe-bottom));
  z-index: 7;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  pointer-events: none;
}
.play-right-stack > * { pointer-events: auto; }
/* The park HUD lives in #park (not #play). Reset the old absolute slots so
   Smash / Climb / Shop and the Fly column lay out as a real stacked column. */
#park .play-right-stack #btn-play-action,
#park .play-right-stack #fly-hud,
.play-right-stack #btn-play-action,
.play-right-stack #fly-hud {
  position: relative;
  top: auto;
  right: auto;
  bottom: auto;
  left: auto;
  margin: 0;
}
.play-right-stack #btn-play-action {
  max-width: min(176px, 44vw);
  height: auto;
  min-height: 64px;
  padding: 8px 16px;
  white-space: normal;
  line-height: 1.15;
  text-align: center;
}
@media (max-width: 520px) {
  .play-right-stack { right: calc(14px + env(safe-area-inset-right, 0px)); bottom: calc(168px + var(--safe-bottom)); }
}
@media (min-width: 820px) {
  /* Sit above the bottom-right "Let it play" button (bottom 46px, height 76px). */
  .play-right-stack { right: calc(28px + env(safe-area-inset-right, 0px)); bottom: calc(172px + var(--safe-bottom)); }
}
@media (max-height: 520px) {
  .play-right-stack { bottom: calc(152px + var(--safe-bottom)); }
}

/* ---------- v17.2.7 (t108u / t111u): prize swap + Go to planet? ---------- */
.prize-move { display: flex; flex-direction: column; gap: 6px; width: 100%; }
.prize-move-lab { font-weight: 800; font-size: 15px; color: #311b92; }
.prize-move-select {
  min-height: 52px; width: 100%; border-radius: 14px; border: 3px solid #fff;
  font: 800 16px/1 inherit; padding: 0 12px; background: linear-gradient(180deg, #e8f5e9, #c8e6c9);
  color: #1b5e20; box-shadow: 0 4px 0 #2e7d32; -webkit-tap-highlight-color: transparent;
}
.prize-park[data-act="sendpark"] { background: linear-gradient(180deg, #c8e6c9, #66bb6a); color: #1b5e20; }

.goto-planet {
  position: absolute; inset: 0; z-index: 16; display: grid; place-items: center;
  background: rgba(8, 12, 40, .45); padding: calc(12px + var(--safe-top)) 14px calc(80px + var(--safe-bottom));
  pointer-events: auto;
}
.goto-planet.hidden { display: none; }
.goto-planet-card {
  width: min(440px, 100%); background: #fffde7; border: 3px solid #fff; border-radius: 24px;
  padding: 16px 14px 18px; box-shadow: 0 12px 32px rgba(0,0,0,.4); color: #3e2723; text-align: center;
}
.goto-planet-title { margin: 0 0 6px; font-size: 26px; font-weight: 800; }
.goto-planet-sub { margin: 0 0 12px; font-size: 16px; font-weight: 700; color: #5d4037; }
.goto-planet-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 14px; }
.goto-chip {
  min-height: 52px; padding: 0 14px; border-radius: 999px; border: 3px solid #fff;
  font: 800 16px/1 inherit; background: linear-gradient(180deg, #e3f2fd, #90caf9); color: #0d47a1;
  box-shadow: 0 4px 0 #1565c0; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.goto-chip.is-on { background: linear-gradient(180deg, #fff59d, #ffd54f); color: #4e2a00; box-shadow: 0 4px 0 #f9a825; }
.goto-planet-btns { display: flex; justify-content: center; gap: 12px; }
.goto-planet-btns .ask-btn { min-width: 140px; }
.goto-planet-btns .ask-btn:disabled { filter: none; opacity: 1; pointer-events: none; }
.goto-planet-again {
  position: absolute; left: 50%; transform: translateX(-50%);
  top: calc(96px + var(--safe-top)); z-index: 9;
  min-height: 56px; padding: 0 20px; border-radius: 999px; border: 3px solid #fff;
  font: 800 18px/1 inherit; color: #1a237e;
  background: linear-gradient(180deg, #e3f2fd, #64b5f6);
  box-shadow: 0 6px 0 #1565c0, 0 10px 16px rgba(0,0,0,.25);
  cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.goto-planet-again.hidden { display: none; }
@media (max-width: 520px) {
  .goto-planet-title { font-size: 22px; }
  .goto-chip { min-height: 48px; font-size: 15px; padding: 0 12px; }
  .goto-planet-again { top: calc(86px + var(--safe-top)); min-height: 52px; font-size: 17px; }
}

/* v17.3.0: top-down planet map for placing store items */
.planet-map-bar {
  position: absolute; left: 0; right: 0; top: calc(78px + var(--safe-top)); z-index: 20;
  padding: 8px 12px 10px;
  background: linear-gradient(180deg, rgba(8,40,48,.82), rgba(8,40,48,.55) 70%, rgba(8,40,48,0));
  pointer-events: none; user-select: none; -webkit-user-select: none; text-align: center;
}
.planet-map-bar.hidden { display: none; }
.planet-map-hint, .planet-map-legend {
  pointer-events: none; margin: 0 auto 6px; font-weight: 800; color: #fff;
  text-shadow: 0 2px 0 rgba(0,0,0,.35);
}
.planet-map-hint { font-size: 16px; max-width: 26rem; }
.planet-map-legend { font-size: 14px; opacity: .95; }
.planet-map-bar .planet-place-row { pointer-events: auto; }
.planet-map-bar .ask-btn { min-height: 52px; min-width: 120px; }
.planet-item-row button[data-act="mapplace"],
.planet-item-row button[data-act="mapmove"] { min-width: 88px; }

/* v17.3.1: picture quality setting (kid-easy, clear of Get Out and the Wix badge) */
.quality-btn {
  background: linear-gradient(180deg, #e1bee7, #8e24aa);
  color: #fff;
  box-shadow: 0 5px 0 #6a1b9a;
  font-size: 26px;
}
.quality-btn:active { box-shadow: 0 2px 0 #6a1b9a; }
.quality-btn-picker {
  position: fixed;
  top: calc(12px + var(--safe-top));
  left: 12px;
  z-index: 40;
}
.quality-sheet {
  position: fixed; inset: 0; z-index: 80;
  display: flex; align-items: center; justify-content: center;
  padding: 16px 16px calc(80px + var(--safe-bottom));
  background: rgba(20, 8, 40, .55);
}
.quality-sheet.hidden { display: none; }
.quality-card {
  width: min(420px, 100%);
  background: linear-gradient(180deg, #fff, #f3e5f5);
  border-radius: 28px;
  padding: 18px 16px 16px;
  box-shadow: 0 16px 36px rgba(0,0,0,.35);
  text-align: center;
}
.quality-title { margin: 0 0 6px; font-size: 26px; font-weight: 800; color: #4a148c; }
.quality-sub { margin: 0 0 14px; font-size: 16px; font-weight: 700; color: #6a1b9a; line-height: 1.35; }
.quality-opts { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.quality-opt {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  min-height: 58px; padding: 10px 16px; border: 3px solid #fff; border-radius: 18px;
  font: 800 20px/1.15 inherit; text-align: left; cursor: pointer;
  background: linear-gradient(180deg, #fff, #ede7f6);
  box-shadow: 0 4px 0 #7e57c2;
  color: #311b92;
  -webkit-tap-highlight-color: transparent;
}
.quality-opt-desc { font-size: 14px; font-weight: 700; color: #7e57c2; }
.quality-opt.is-on {
  background: linear-gradient(180deg, #fff59d, #ffd54f);
  color: #4e2a00;
  box-shadow: 0 4px 0 #f9a825;
}
.quality-opt.is-on .quality-opt-desc { color: #6d4c41; }
.quality-sheet .ask-btn { min-width: 140px; min-height: 52px; }
.quality-note {
  position: fixed; left: 50%; top: calc(96px + var(--safe-top));
  transform: translateX(-50%);
  z-index: 85;
  max-width: 88vw;
  padding: 12px 20px;
  border-radius: 22px;
  border: 4px solid #ce93d8;
  background: rgba(40, 16, 70, .92);
  color: #fff;
  font-weight: 800;
  font-size: 16px;
  text-align: center;
  pointer-events: none;
  box-shadow: 0 10px 24px rgba(0,0,0,.35);
  transition: opacity .45s ease;
}
.quality-note.hidden { display: none; }
.quality-note.is-off { opacity: 0; }
@media (max-height: 700px) {
  .quality-btn { font-size: 22px; }
  .quality-opt { min-height: 52px; font-size: 18px; }
}

/* v17.5.1 (t131u): Join a race? picker + Boost button */
.race-pick-card { width: min(520px, 100%); }
.race-pick-grid { display: grid; grid-template-columns: 1fr; gap: 10px; margin-top: 4px; }
@media (min-width: 520px) { .race-pick-grid { grid-template-columns: 1fr 1fr 1fr; } }
.race-pick-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  min-height: 92px; padding: 12px 10px; border-radius: 20px; border: 3px solid #fff;
  font: 800 18px/1.1 inherit; color: #3e2723; cursor: pointer;
  background: linear-gradient(180deg, #fff8e1, #ffe082);
  box-shadow: 0 5px 0 #f9a825, 0 8px 14px rgba(0,0,0,.22);
  -webkit-tap-highlight-color: transparent;
}
.race-pick-btn span { font-size: 16px; }
.race-pick-btn[data-ride="snow"] { background: linear-gradient(180deg, #e3f2fd, #90caf9); box-shadow: 0 5px 0 #1565c0, 0 8px 14px rgba(0,0,0,.22); color: #0d47a1; }
.race-pick-btn[data-ride="bike"] { background: linear-gradient(180deg, #ffe0b2, #ff9800); box-shadow: 0 5px 0 #e65100, 0 8px 14px rgba(0,0,0,.22); color: #e65100; }
.race-pick-btn[data-ride="quad"] { background: linear-gradient(180deg, #c8e6c9, #66bb6a); box-shadow: 0 5px 0 #2e7d32, 0 8px 14px rgba(0,0,0,.22); color: #1b5e20; }
.race-pick-btn:active { transform: translateY(3px); box-shadow: 0 2px 0 #bdbdbd; }
.mtn-boost-btn {
  position: absolute;
  right: calc(16px + env(safe-area-inset-right, 0px));
  bottom: calc(84px + var(--safe-bottom));
  z-index: 12;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  min-width: 92px; min-height: 72px; padding: 8px 12px 7px;
  border: 3px solid #fff; border-radius: 18px; cursor: pointer;
  font: 800 18px/1 inherit; color: #3e1a00;
  background: linear-gradient(180deg, #ffe082, #ff9800);
  box-shadow: 0 5px 0 #e65100, 0 8px 14px rgba(0,0,0,.25);
  -webkit-tap-highlight-color: transparent;
  touch-action: none;
  pointer-events: auto;
}
.mtn-boost-btn.hidden { display: none; }
.mtn-boost-btn:active { transform: translateY(3px); box-shadow: 0 2px 0 #e65100; }
.mtn-boost-btn.is-empty { filter: grayscale(.35) brightness(.95); opacity: .8; }
.mtn-boost-pips { display: flex; gap: 5px; }
.mtn-boost-pips i {
  width: 12px; height: 12px; border-radius: 50%; background: #ffe0b2; border: 2px solid #fff;
  box-shadow: inset 0 -1px 0 #bf360c; display: block;
}
.mtn-boost-pips i.on { background: #76ff03; box-shadow: 0 0 6px #76ff03; }
@media (max-width: 520px) {
  .mtn-boost-btn { right: calc(14px + env(safe-area-inset-right, 0px)); bottom: calc(80px + var(--safe-bottom)); min-height: 68px; }
}
@media (min-width: 820px) {
  .mtn-boost-btn { right: calc(28px + env(safe-area-inset-right, 0px)); bottom: calc(86px + var(--safe-bottom)); }
}

/* v17.6.0 weather chip (in Picture quality) and flashlight; v17.20.1 Bonita Bay */
.sky-chip {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin: 0 0 14px; padding: 8px 12px;
  border-radius: 16px;
  background: rgba(74, 20, 140, 0.08);
  color: #4a148c;
  font-weight: 800;
  font-size: 14px;
  line-height: 1.3;
  text-align: left;
}
.sky-chip-icon { font-size: 20px; line-height: 1; }
.flashlight-btn {
  position: absolute;
  left: calc(14px + env(safe-area-inset-left, 0px));
  bottom: calc(176px + var(--safe-bottom));
  z-index: 12;
  width: 58px; height: 58px; min-width: 58px;
  padding: 0; border-radius: 50%;
  border: 3px solid #fff8e1;
  background: linear-gradient(180deg, #ffe082, #ffb300);
  box-shadow: 0 4px 0 #f57f17, 0 8px 14px rgba(0,0,0,.28);
  font-size: 26px; line-height: 1;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.flashlight-btn.is-on { box-shadow: 0 4px 0 #f57f17, 0 0 16px 4px rgba(255, 236, 120, .7); }
.flashlight-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #f57f17; }
.flashlight-btn.hidden { display: none !important; }
@media (min-width: 900px) {
  .flashlight-btn { left: 22px; bottom: calc(190px + var(--safe-bottom)); width: 62px; height: 62px; min-width: 62px; font-size: 28px; }
}
@media (max-width: 600px) {
  .flashlight-btn { bottom: calc(170px + var(--safe-bottom)); }
}


/* v17.7.0 High Scores board and race clock */
.scores-btn {
  background:
    linear-gradient(180deg, rgba(255,255,255,.4) 0%, rgba(255,255,255,0) 32%),
    linear-gradient(180deg, #7c4dff 0%, #5e35b1 55%, #4527a0 100%);
  box-shadow:
    inset 0 2px 0 rgba(255,255,255,.5),
    0 6px 0 #311b92,
    0 12px 18px rgba(0,0,0,.35);
}
.scores-btn:active {
  box-shadow: inset 0 2px 0 rgba(255,255,255,.4), 0 2px 0 #311b92, 0 6px 10px rgba(0,0,0,.3);
}
.race-pill.time {
  background: linear-gradient(180deg, #e3f2fd, #90caf9);
  color: #0d47a1;
}
#scores {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #2a1650;
  padding: 0;
  color: #fff;
  touch-action: manipulation;
}
#scores.hidden { display: none !important; }
#scores > *:not(.prizes-bg) { position: relative; z-index: 1; }
.hs-me {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 12px 6px;
  font: 700 15px/1.2 inherit;
}
.hs-rename {
  border: 2px solid #fff;
  background: rgba(255,255,255,.18);
  color: #fff;
  font: 800 13px inherit;
  border-radius: 999px;
  padding: 4px 10px;
  cursor: pointer;
}
.hs-tabs {
  flex: 0 0 auto;
  display: flex;
  gap: 8px;
  padding: 0 10px 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.hs-tab {
  flex: 1 0 auto;
  min-height: 40px;
  border: 2px solid rgba(255,255,255,.7);
  border-radius: 16px;
  background: rgba(255,255,255,.12);
  color: #fff;
  font: 800 14px/1 inherit;
  padding: 6px 10px;
  cursor: pointer;
}
.hs-tab.on {
  background: linear-gradient(180deg, #fff59d, #ffca28);
  color: #4a148c;
  border-color: #fff;
}
.hs-acts {
  flex: 0 0 auto;
  display: flex;
  gap: 8px;
  padding: 0 10px 10px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.hs-act {
  flex: 0 0 auto;
  min-height: 38px;
  border: 2px solid rgba(255,255,255,.55);
  border-radius: 14px;
  background: rgba(0,0,0,.22);
  color: #fff;
  font: 800 13px/1 inherit;
  padding: 6px 12px;
  cursor: pointer;
  white-space: nowrap;
}
.hs-act.on {
  background: #fff;
  color: #4a148c;
  border-color: #fff;
}
.hs-game-title {
  margin: 0 12px 4px;
  font: 800 20px/1.2 inherit;
}
.hs-h {
  margin: 8px 12px 4px;
  font: 800 15px/1 inherit;
  opacity: .9;
}
.hs-box {
  flex: 1 1 auto;
  min-height: 72px;
  margin: 0 10px 8px;
  padding: 6px 8px;
  border-radius: 16px;
  background: rgba(0,0,0,.28);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.hs-ol { list-style: none; margin: 0; padding: 0; }
.hs-row {
  display: grid;
  grid-template-columns: 2.2em 1fr auto auto;
  gap: 6px;
  align-items: center;
  padding: 6px 4px;
  border-bottom: 1px solid rgba(255,255,255,.1);
  font: 700 15px/1.2 inherit;
}
.hs-row.mine { background: rgba(255,213,79,.18); border-radius: 10px; }
.hs-medal { font-weight: 800; }
.hs-who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hs-extra { opacity: .8; font-size: 12px; }
.hs-val { font-weight: 800; color: #fff59d; }
.hs-empty { margin: 10px 6px; opacity: .85; font: 700 15px/1.4 inherit; }
.hs-name {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(20, 8, 40, .55);
}
.hs-name.hidden { display: none !important; }
.hs-name-card {
  width: min(100%, 360px);
  text-align: center;
}
.hs-name-card p { font: 800 22px/1.3 inherit; margin: 0 0 12px; }
.hs-name-card input {
  width: 100%;
  min-height: 48px;
  border-radius: 14px;
  border: 3px solid #fff;
  font: 800 20px inherit;
  text-align: center;
  padding: 8px;
}
.hs-name-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.hs-skip {
  border: 0;
  background: transparent;
  color: #fff;
  font: 800 15px inherit;
  cursor: pointer;
  text-decoration: underline;
}
@media (max-width: 600px) {
  .hs-tab { font-size: 12px; min-height: 36px; }
  .hs-game-title { font-size: 18px; }
}

/* v17.8.0 Building tab */
.shop-tabs { display: flex; gap: 8px; margin: 0 0 10px; }
.shop-tab {
  appearance: none; border: 0; border-radius: 999px; cursor: pointer;
  padding: 8px 14px; font-family: inherit; font-weight: 800; font-size: 15px;
  background: #efebe9; color: #5d4037; box-shadow: 0 3px 0 #bcaaa4;
}
.shop-tab.is-on { background: linear-gradient(180deg, #ffe082, #ffca28); color: #5d4037; box-shadow: 0 3px 0 #f9a825; }
.shop-mats { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.shop-mats.hidden { display: none; }
.shop-mat {
  appearance: none; border: 0; border-radius: 999px; cursor: pointer;
  padding: 6px 10px; font-family: inherit; font-weight: 800; font-size: 13px;
  background: #fff; color: #37474f; box-shadow: 0 2px 0 #b0bec5;
}
.shop-mat.is-on { background: #e8f5e9; color: #1b5e20; box-shadow: 0 2px 0 #66bb6a; }
.shop-item.is-build { background: linear-gradient(180deg, #fff, #efebe9); }

/* v17.9.0 woods concert */
.concert-chip {
  position: fixed;
  left: 50%;
  top: calc(10px + var(--safe-top));
  transform: translateX(-50%);
  z-index: 35;
  max-width: min(520px, calc(100vw - 150px));
  padding: 6px 14px;
  border-radius: 16px;
  border: 2px solid rgba(255,255,255,.75);
  background: rgba(28, 12, 48, .78);
  color: #fff8e1;
  font-weight: 800;
  font-size: 13px;
  line-height: 1.3;
  text-align: center;
  pointer-events: none;
  box-shadow: 0 6px 16px rgba(0,0,0,.28);
}
.concert-chip.hidden { display: none; }
.concert-credits-btn { margin: 0 0 10px; background: linear-gradient(180deg, #fff8e1, #ffe082); color: #4e2a00; }
.concert-credits-card { width: min(560px, 100%); text-align: left; max-height: min(86vh, 720px); display: flex; flex-direction: column; }
.concert-credits-card .quality-title, .concert-credits-card .quality-sub { text-align: center; }
.concert-credits-body {
  flex: 1;
  overflow: auto;
  max-height: min(58vh, 480px);
  margin: 0 0 14px;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(74, 20, 140, 0.06);
  color: #311b92;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.45;
  text-align: left;
  white-space: pre-wrap;
}
.concert-credits-card .ask-btn { align-self: center; }

/* v17.10.0 monster trucks */
.monster-pick-card { width: min(640px, 100%); }
.monster-pick-grid { grid-template-columns: 1fr 1fr; }
@media (min-width: 520px) { .monster-pick-grid { grid-template-columns: 1fr 1fr 1fr; } }
.mon-btn[data-mon="crush"] { background: linear-gradient(180deg, #ffcdd2, #e53935); box-shadow: 0 5px 0 #b71c1c, 0 8px 14px rgba(0,0,0,.22); color: #b71c1c; }
.mon-btn[data-mon="thunder"] { background: linear-gradient(180deg, #bbdefb, #1e88e5); box-shadow: 0 5px 0 #0d47a1, 0 8px 14px rgba(0,0,0,.22); color: #0d47a1; }
.mon-btn[data-mon="mud"] { background: linear-gradient(180deg, #c8e6c9, #43a047); box-shadow: 0 5px 0 #1b5e20, 0 8px 14px rgba(0,0,0,.22); color: #1b5e20; }
.mon-btn[data-mon="sky"] { background: linear-gradient(180deg, #fff9c4, #fdd835); box-shadow: 0 5px 0 #f9a825, 0 8px 14px rgba(0,0,0,.22); color: #e65100; }
.mon-btn[data-mon="barn"] { background: linear-gradient(180deg, #ffe0b2, #fb8c00); box-shadow: 0 5px 0 #e65100, 0 8px 14px rgba(0,0,0,.22); color: #e65100; }
.mon-btn[data-mon="star"] { background: linear-gradient(180deg, #e1bee7, #8e24aa); box-shadow: 0 5px 0 #4a148c, 0 8px 14px rgba(0,0,0,.22); color: #4a148c; }


/* ===== v17.11.2 loading overlay + smoother muted buttons ===== */
.install-btn:disabled,
.install-btn[aria-busy="true"] {
  opacity: 0.72;
  cursor: wait;
  transform: none;
  pointer-events: none;
}
.park-load {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 24px;
  padding-top: calc(24px + var(--safe-top, 0px));
  padding-bottom: calc(24px + var(--safe-bottom, 0px));
  background: #1a0a36 url("media/park-loop.jpg") center / cover no-repeat;
  opacity: 1;
  visibility: visible;
  transition: opacity .45s ease, visibility .45s ease;
}
.park-load.is-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.park-load.hidden { display: none !important; }
.park-load-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.park-load-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.park-load-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(16, 6, 36, .72) 0%, rgba(16, 6, 36, .42) 40%, rgba(16, 6, 36, .62) 100%);
}
.park-load.is-still .park-load-video,
html.still-media .park-load-video,
html.still-media .picker-video {
  display: none;
}
.park-load-card {
  position: relative;
  z-index: 1;
  background: linear-gradient(180deg, #fff8e1, #fff);
  border-radius: 28px;
  padding: 28px 24px 24px;
  width: min(380px, 100%);
  text-align: center;
  box-shadow: 0 16px 0 rgba(74, 20, 140, .22), 0 22px 40px rgba(0,0,0,.28);
}
.park-load-spin {
  font-size: 64px;
  line-height: 1;
  margin: 0 0 10px;
  display: inline-block;
  animation: park-load-bounce 1.1s ease-in-out infinite;
  filter: drop-shadow(0 6px 0 rgba(27, 94, 32, .2));
}
.park-load-title {
  margin: 0 0 16px;
  font-size: clamp(22px, 5.4vw, 30px);
  font-weight: 700;
  color: #4a148c;
  line-height: 1.25;
}
.park-load-bar {
  height: 16px;
  border-radius: 999px;
  background: #ede7f6;
  box-shadow: inset 0 2px 0 rgba(0,0,0,.08);
  overflow: hidden;
}
.park-load-fill {
  display: block;
  height: 100%;
  width: 8%;
  border-radius: 999px;
  background: linear-gradient(90deg, #ffd54f, #66bb6a 60%, #26c6da);
  box-shadow: 0 0 0 1px rgba(255,255,255,.4) inset;
  transition: width .35s ease;
}
.park-load-hint {
  margin: 12px 0 0;
  font-size: 16px;
  font-weight: 600;
  color: #6a1b9a;
}
@keyframes park-load-bounce {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-8px) scale(1.06); }
}
@media (prefers-reduced-motion: reduce) {
  .park-load-spin { animation: none; }
  .park-load-fill { transition: none; }
  .park-load-video { display: none; }
}


/* v17.13.0 (t175u): flashlight lives in the bottom-right control stack, labeled, >=70px up */
#park .play-right-stack #btn-flashlight,
.play-right-stack #btn-flashlight {
  position: relative;
  top: auto; right: auto; bottom: auto; left: auto;
  width: auto;
  min-width: 64px;
  height: auto;
  min-height: 58px;
  padding: 8px 10px 6px;
  border-radius: 18px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 22px;
  line-height: 1;
}
.play-right-stack #btn-flashlight.hidden { display: none !important; }
.flashlight-lab {
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #4e2600;
}
@media (max-width: 520px) {
  .play-right-stack #btn-flashlight { min-width: 58px; min-height: 52px; font-size: 20px; padding: 6px 8px 5px; }
  .flashlight-lab { font-size: 10px; }
}

/* v17.13.0 ocean UI */
.ocean-shore-cue {
  position: absolute;
  left: 50%;
  top: calc(18px + var(--safe-top, 0px));
  transform: translateX(-50%);
  z-index: 16;
  background: linear-gradient(180deg, #e0f7fa, #4dd0e1);
  border: 3px solid #fff;
  border-radius: 999px;
  padding: 8px 18px;
  font-weight: 900;
  font-size: 18px;
  color: #004d56;
  box-shadow: 0 4px 0 #00838f, 0 8px 16px rgba(0,0,0,.2);
  pointer-events: none;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}
.ocean-shore-cue.hidden { opacity: 0; visibility: hidden; }
.ocean-go {
  position: absolute; inset: 0; z-index: 30;
  display: flex; align-items: center; justify-content: center;
  background: rgba(3, 28, 48, 0.62);
  pointer-events: none;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.45s ease, visibility 0.45s ease;
}
.ocean-go.hidden { opacity: 0; visibility: hidden; display: flex !important; }
.ocean-go-card {
  background: linear-gradient(180deg, #e0f7fa, #80deea 60%, #26c6da);
  border: 3px solid #fff;
  border-radius: 24px;
  padding: 22px 26px 18px;
  box-shadow: 0 10px 0 #00838f, 0 16px 28px rgba(0,0,0,.28);
  text-align: center;
  min-width: min(280px, 80vw);
}
.ocean-go-title { margin: 0 0 6px; font-size: 22px; font-weight: 900; color: #004d56; }
.ocean-go-sub { margin: 0; font-size: 15px; font-weight: 700; color: #006064; }

#fish-game {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(78px + var(--safe-bottom));
  z-index: 12;
  width: min(420px, calc(100% - 24px));
  background: linear-gradient(180deg, rgba(224,247,250,.96), rgba(38,198,218,.92));
  border: 3px solid #fff;
  border-radius: 22px;
  padding: 10px 12px 12px;
  box-shadow: 0 6px 0 #00838f, 0 12px 18px rgba(0,0,0,.25);
  text-align: center;
}
#fish-game.hidden { display: none !important; }
.fish-hint { margin: 0 0 8px; font-weight: 800; color: #004d56; font-size: 16px; min-height: 1.2em; }
.fish-meter, .fish-tension { height: 16px; border-radius: 10px; background: rgba(255,255,255,.6); overflow: hidden; margin: 0 0 8px; border: 2px solid #fff; }
.fish-tension { position: relative; }
.fish-tension::before {
  content: ""; position: absolute; left: 25%; width: 50%; top: 0; bottom: 0;
  background: rgba(102,187,106,.35);
}
#fish-power-fill, #fish-tension-fill { display: block; height: 100%; width: 0; background: #29b6f6; transition: width .08s linear; position: relative; z-index: 1; }
.fish-btns { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.fish-btns .install-btn, .fish-btns .ask-btn { min-height: 52px; font-size: 16px; }
.fish-zones { display: flex; gap: 6px; justify-content: center; margin: 0 0 8px; flex-wrap: wrap; }
.fish-zones button {
  border: 2px solid #fff; border-radius: 14px; padding: 6px 10px; font-weight: 800;
  background: #fff8e1; color: #004d56; cursor: pointer;
}
.fish-zones button.on, .fish-zones button:active { background: #26c6da; color: #fff; }

#fish-book {
  position: absolute; inset: 0; z-index: 22;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,30,40,.45);
}
#fish-book.hidden { display: none !important; }
.fish-book-card {
  width: min(520px, calc(100% - 20px));
  max-height: min(78vh, 640px);
  overflow: auto;
  background: linear-gradient(180deg, #e0f7fa, #b2ebf2);
  border: 3px solid #fff; border-radius: 24px;
  padding: 16px 14px 18px;
  box-shadow: 0 8px 0 #00838f, 0 16px 24px rgba(0,0,0,.28);
}
.fish-book-card h2 { margin: 0 0 10px; text-align: center; color: #004d56; font-size: 22px; }
#fish-book-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.fish-card {
  border: 2px solid #fff; border-radius: 16px; padding: 8px 6px; background: #fff;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  font-weight: 800; color: #004d56;
}
.fish-card.off { background: #cfd8dc; color: #546e7a; }
.fish-card .fish-emo { font-size: 28px; line-height: 1; }
.fish-card .sil { filter: grayscale(1) contrast(0) brightness(0.2); opacity: 0.85; }
.fish-card .fish-nm { font-size: 12px; text-align: center; }
.fish-card .fish-sz { font-size: 11px; font-weight: 700; }

#ocean-depth {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: calc(12px + var(--safe-top));
  z-index: 8;
  background: rgba(0, 77, 86, 0.72);
  color: #e0f7fa;
  font-weight: 800;
  font-size: 14px;
  padding: 6px 12px;
  border-radius: 14px;
  pointer-events: none;
}
#ocean-depth.hidden { display: none !important; }

#btn-ocean-book {
  position: absolute;
  right: calc(14px + env(safe-area-inset-right, 0px));
  bottom: calc(86px + var(--safe-bottom));
  z-index: 8;
  min-height: 48px;
  padding: 6px 12px;
  border-radius: 16px;
  border: 3px solid #fff;
  background: linear-gradient(180deg, #fff8e1, #ffe082);
  box-shadow: 0 4px 0 #f9a825;
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
}
#btn-ocean-book.hidden { display: none !important; }
@media (max-height: 600px) {
  #btn-ocean-book { bottom: calc(78px + var(--safe-bottom)); }
  #fish-game { bottom: calc(72px + var(--safe-bottom)); }
}

/* v17.24.3 (t215u): searchlight button removed; flood Light stays in the same stack. */

.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0;}


/* v17.15.0 (t183u): Sandcastle Beach play HUD. Tools sit above the 70px floor,
   zoom is mid-left, Get Out stays top-right, no store arrows.
   v17.14.3 (t182u): shore cue pill + smoother ocean fade overlay.
   v17.14.2 (t180u): morning twilight fix, no CSS change.
   v17.14.1 (t179u): smoothness pass, no CSS change.
   v17.14.0 (t177u, t178u): talk with other toys. Panel stays clear of Get Out (top-right)
   and the joystick / bottom-right controls (>=70px up). Hidden bubble does not block anything. */
.toy-chat-bubble {
  position: absolute;
  z-index: 8;
  left: 0; top: 0;
  transform: translate(-50%, -120%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  min-width: 72px;
  min-height: 58px;
  padding: 6px 12px 5px;
  border: 3px solid #fff;
  border-radius: 22px;
  background: linear-gradient(180deg, #fff8e1, #ffe082 60%, #ffca28);
  box-shadow: 0 5px 0 #f9a825, 0 10px 16px rgba(0,0,0,.25);
  font-family: inherit;
  font-weight: 800;
  color: #4a148c;
  cursor: pointer;
  pointer-events: auto;
  line-height: 1.05;
}
.toy-chat-bubble.hidden { display: none !important; }
.toy-chat-bubble-ico { font-size: 22px; line-height: 1; }
.toy-chat-bubble-lab { font-size: 13px; letter-spacing: 0.02em; }
.toy-chat-bubble:active { transform: translate(-50%, -116%); box-shadow: 0 3px 0 #f9a825, 0 6px 10px rgba(0,0,0,.2); }
@media (max-width: 520px) {
  .toy-chat-bubble { min-width: 66px; min-height: 54px; padding: 5px 10px 4px; }
  .toy-chat-bubble-lab { font-size: 12px; }
}

.toy-chat {
  position: absolute;
  left: 8px;
  right: 84px; /* keep Get Out in the top-right free */
  top: calc(8px + var(--safe-top, 0px));
  bottom: calc(200px + var(--safe-bottom, 0px)); /* joystick + bottom-right stack */
  z-index: 11;
  display: flex;
  align-items: stretch;
  justify-content: flex-start;
  pointer-events: none;
}
.toy-chat.hidden { display: none !important; }
.toy-chat-card {
  pointer-events: auto;
  width: 100%;
  max-width: 440px;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #fffdf6, #fff3e0 70%, #ffe0b2);
  border: 3px solid #fff;
  border-radius: 24px;
  box-shadow: 0 10px 0 rgba(230, 81, 0, 0.28), 0 16px 28px rgba(0,0,0,.28);
  overflow: hidden;
  font-family: inherit;
}
.toy-chat-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px 8px 12px;
  background: linear-gradient(180deg, #fff8e1, #ffe082);
  border-bottom: 2px solid rgba(255,255,255,.7);
  flex: 0 0 auto;
}
.toy-chat-pic { width: 52px; height: 52px; flex: 0 0 auto; }
.toy-chat-pic svg { width: 100%; height: 100%; display: block; }
.toy-chat-who { flex: 1 1 auto; min-width: 0; }
.toy-chat-name {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  color: #4a148c;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.toy-chat-sub { margin: 2px 0 0; font-size: 13px; font-weight: 600; color: #6a1b9a; opacity: 0.85; }
.toy-chat-close {
  flex: 0 0 auto;
  width: 44px; height: 44px;
  border: 0; border-radius: 14px;
  background: #fff;
  color: #4a148c;
  font-size: 20px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 3px 0 #ce93d8;
}
.toy-chat-close:active { transform: translateY(2px); box-shadow: 0 1px 0 #ce93d8; }
.toy-chat-log {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 10px 12px 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 90px;
  -webkit-overflow-scrolling: touch;
}
.toy-chat-msg,
.toy-chat-msg.toy,
.toy-chat-msg.you,
.toy-chat-msg.typing {
  /* The 2D claw prize class `.toy` is also used on pal replies
     (`toy-chat-msg toy`). That rule is position:absolute, 64×64,
     and translateX(-50%), which shoved the writing off the left
     of the screen (v17.18.4 / t194u). Reset it here with higher
     specificity so the bubble can wrap and stay in the log. */
  position: relative;
  width: auto;
  height: auto;
  max-width: 92%;
  transform: none;
  filter: none;
  z-index: auto;
  padding: 8px 12px;
  border-radius: 18px;
  font-size: 18px;
  font-weight: 650;
  line-height: 1.35;
  color: #311b92;
  word-wrap: break-word;
  overflow-wrap: anywhere;
  word-break: break-word;
  box-sizing: border-box;
}
.toy-chat-msg.toy {
  align-self: flex-start;
  background: #fff;
  border: 2px solid #ffe082;
  border-bottom-left-radius: 6px;
}
.toy-chat-msg.you {
  align-self: flex-end;
  background: #e8f5e9;
  border: 2px solid #a5d6a7;
  border-bottom-right-radius: 6px;
  color: #1b5e20;
}
.toy-chat-msg.typing {
  align-self: flex-start;
  background: #fff;
  color: #8d6e63;
  font-size: 22px;
  letter-spacing: 0.12em;
  min-width: 52px;
  text-align: center;
}
.toy-chat-chips {
  flex: 0 0 auto;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 6px 10px 8px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.toy-chat-chip {
  flex: 0 0 auto;
  border: 0;
  border-radius: 999px;
  padding: 8px 14px;
  font-family: inherit;
  font-weight: 700;
  font-size: 15px;
  color: #4a148c;
  background: #fff;
  box-shadow: 0 3px 0 #ce93d8;
  cursor: pointer;
  white-space: nowrap;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.toy-chat-chip:active { transform: translateY(2px); box-shadow: 0 1px 0 #ce93d8; }
.toy-chat-form {
  flex: 0 0 auto;
  display: flex;
  gap: 8px;
  padding: 6px 10px 10px;
  background: rgba(255,255,255,.45);
}
.toy-chat-input {
  flex: 1 1 auto;
  min-width: 0;
  height: 44px;
  border: 2px solid #ffe082;
  border-radius: 14px;
  padding: 0 12px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  color: #4a148c;
  background: #fff;
}
.toy-chat-send {
  flex: 0 0 auto;
  height: 44px;
  min-width: 64px;
  border: 0;
  border-radius: 14px;
  font-family: inherit;
  font-weight: 800;
  font-size: 16px;
  color: #fff;
  background: linear-gradient(180deg, #69f0ae, #00c853);
  box-shadow: 0 3px 0 #1b5e20;
  cursor: pointer;
}
.toy-chat-send:active { transform: translateY(2px); box-shadow: 0 1px 0 #1b5e20; }
.toy-chat[data-flavor="cheerful"] .toy-chat-head { background: linear-gradient(180deg, #fff8e1, #fff176); }
.toy-chat[data-flavor="shy"] .toy-chat-head { background: linear-gradient(180deg, #f3e5f5, #ce93d8); }
.toy-chat[data-flavor="silly"] .toy-chat-head { background: linear-gradient(180deg, #e0f7fa, #80deea); }
.toy-chat[data-flavor="adventurous"] .toy-chat-head { background: linear-gradient(180deg, #ffe0b2, #ffb74d); }
.toy-chat[data-flavor="sleepy"] .toy-chat-head { background: linear-gradient(180deg, #e8eaf6, #9fa8da); }
@media (min-width: 900px) {
  .toy-chat { left: 16px; right: auto; width: min(440px, 42vw); bottom: calc(120px + var(--safe-bottom, 0px)); }
  .toy-chat-msg { font-size: 19px; }
}
@media (max-height: 520px) {
  .toy-chat { bottom: calc(140px + var(--safe-bottom, 0px)); }
  .toy-chat-name { font-size: 18px; }
  .toy-chat-msg { font-size: 16px; }
}


/* v17.15.0 Sandcastle Beach */
.sand-shore-cue { background: linear-gradient(180deg, #fff8e1, #ffcc80); color: #5d4037; box-shadow: 0 4px 0 #ef6c00, 0 8px 16px rgba(0,0,0,.2); }
.sand-hud {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(78px + var(--safe-bottom, 0px));
  z-index: 12;
  width: min(520px, calc(100% - 16px));
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.sand-hud.hidden { display: none !important; }
/* v17.24.4 (t216u): hide vehicle feature buttons while sculpting at the beach */
body.sand-playing #moves,
body.sand-playing #btn-flashlight,
body.sand-playing #fly-hud,
body.sand-playing #planet-fly-hud,
body.sand-playing #btn-play-action,
body.sand-playing #btn-mtn-boost,
body.sand-playing #joystick,
body.sand-playing #btn-letgo,
body.sand-playing #btn-store-go,
body.sand-playing #btn-planet-items,
body.sand-playing #btn-drive-rover,
body.sand-playing #btn-planet-map,
body.fish-playing #moves,
body.fish-playing #btn-flashlight,
body.fish-playing #fly-hud,
body.fish-playing #planet-fly-hud,
body.fish-playing #btn-play-action,
body.fish-playing #btn-mtn-boost,
body.fish-playing #joystick,
body.fish-playing #btn-letgo,
body.fish-playing #btn-store-go,
body.fish-playing #btn-planet-items,
body.fish-playing #btn-drive-rover,
body.fish-playing #btn-planet-map,
body.fish-playing #btn-ocean-book,
body.fish-playing #ocean-depth {
  display: none !important;
}
.sand-hud > * { pointer-events: auto; }
.sand-tools, .sand-molds, .sand-decor {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}
.sand-hud button {
  border: 2px solid #fff;
  border-radius: 14px;
  padding: 7px 10px;
  min-height: 44px;
  font-weight: 800;
  font-size: 14px;
  background: linear-gradient(180deg, #fff8e1, #ffe0b2);
  color: #5d4037;
  box-shadow: 0 3px 0 #ef6c00;
  cursor: pointer;
}
.sand-hud button.on {
  background: linear-gradient(180deg, #ffe082, #ffb74d);
  box-shadow: 0 2px 0 #ef6c00;
  transform: translateY(1px);
}
.sand-hud button:active { transform: translateY(2px); box-shadow: 0 1px 0 #ef6c00; }
.sand-size {
  background: rgba(255,248,225,.92);
  border: 2px solid #fff;
  border-radius: 999px;
  padding: 4px 12px;
  font-weight: 900;
  color: #5d4037;
  box-shadow: 0 3px 0 #ef6c00;
}
.sand-zoom {
  display: flex;
  flex-direction: row;
  justify-content: center;
  gap: 8px;
}
.sand-zoom button {
  width: 48px;
  min-width: 48px;
  min-height: 48px;
  border-radius: 16px;
  font-size: 20px;
  padding: 0;
}
@media (max-width: 520px) {
  .sand-hud { width: calc(100% - 10px); bottom: calc(76px + var(--safe-bottom, 0px)); }
  .sand-hud button { font-size: 13px; padding: 6px 8px; min-height: 42px; }
}
@media (max-height: 520px) {
  .sand-hud { bottom: calc(72px + var(--safe-bottom, 0px)); }
  .sand-hud button { min-height: 40px; }
}


/* ===== v17.16.0 True 3D claw machines ===== */
.claw3-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 2;
  pointer-events: none;
}
.cabinet.is-3d .rail,
.cabinet.is-3d .claw,
.cabinet.is-3d .bin { visibility: hidden; pointer-events: none; }
.cabinet.is-3d .viewport {
  background: linear-gradient(180deg, #e3f2fd 0 36%, var(--glass) 36% 58%, var(--floor) 58% 100%);
}
.cabinet.is-3d .prize-box { z-index: 4; }
.cabinet.is-3d .glass-shine { z-index: 6; pointer-events: none; }

.claw-pad {
  display: grid;
  grid-template-columns: 56px 56px 56px;
  grid-template-rows: 52px 52px 52px;
  gap: 4px;
  flex: 0 0 auto;
  order: 0;
}
#btn-fwd { grid-column: 2; grid-row: 1; }
#btn-left { grid-column: 1; grid-row: 2; }
#btn-right { grid-column: 3; grid-row: 2; }
#btn-back { grid-column: 2; grid-row: 3; }
.claw-pad .ctrl.arrow {
  flex: 0 0 auto;
  width: 56px;
  height: 52px;
  min-width: 0;
  margin: 0;
  font-size: 24px;
  border-radius: 16px;
  padding: 0;
}
.controls .ctrl.grab { order: 1; min-width: 132px; }
@media (min-width: 700px) {
  .claw-pad { grid-template-columns: 70px 70px 70px; grid-template-rows: 64px 64px 64px; }
  .claw-pad .ctrl.arrow { width: 70px; height: 64px; font-size: 32px; border-radius: 20px; }
  .controls .ctrl.grab { min-width: 170px; }
}
@media (max-height: 700px) {
  .claw-pad { grid-template-columns: 50px 50px 50px; grid-template-rows: 46px 46px 46px; }
  .claw-pad .ctrl.arrow { width: 50px; height: 46px; font-size: 22px; }
  .ctrl.grab { height: 72px; }
  .controls { padding: 6px 10px 4px; }
}


/* ===== v17.17.0 Token Shop ===== */
#token-shop { z-index: 20; overflow: auto; }
.shop-title { flex: 1 1 auto; margin: 0; text-align: center; font-size: clamp(18px, 4.4vw, 26px); color: #fff; text-shadow: 0 2px 0 rgba(0,0,0,.25); }
.shop-body { max-width: 560px; margin: 0 auto; padding: 8px 16px calc(78px + var(--safe-bottom)); }
.shop-h { margin: 16px 0 6px; font-size: 18px; color: #4a148c; }
.shop-p { margin: 0 0 10px; font-size: 15px; line-height: 1.4; color: #4a148c; font-weight: 600; }
.shop-odds { background: rgba(255,255,255,.72); border-radius: 16px; padding: 12px 14px; }
.shop-packs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.shop-pack {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  border: 0; border-radius: 18px; padding: 12px 8px 10px;
  background: linear-gradient(180deg, #fff8e1, #ffe082);
  box-shadow: 0 5px 0 #f9a825; color: #6d4300;
  font-family: inherit; font-weight: 800; cursor: pointer;
}
.shop-pack:active { transform: translateY(3px); box-shadow: 0 2px 0 #f9a825; }
.shop-pack-tok { font-size: 18px; }
.shop-pack-price { font-size: 22px; }
.shop-pack-go { font-size: 13px; background: #fff; border-radius: 999px; padding: 3px 10px; }
.shop-unlocks { margin-top: 4px; }
.shop-unlock { display: flex; justify-content: space-between; gap: 8px; background: rgba(255,255,255,.7); border-radius: 12px; padding: 8px 12px; margin: 0 0 6px; font-weight: 700; color: #4a148c; }
#btn-shop-daily { display: block; width: 100%; margin: 0 0 12px; }
.shop-parent-card { max-width: 420px; }
.shop-hold-track { height: 14px; border-radius: 999px; background: rgba(0,0,0,.12); overflow: hidden; margin: 8px 0 12px; }
.shop-hold-fill { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #81d4fa, #43a047); }
#shop-parent-hold, #shop-parent-cancel { width: 100%; margin: 0 0 8px; }
#shop-parent-cancel { min-height: 48px; }
.token-pill { pointer-events: auto; cursor: pointer; }
@media (max-width: 520px) {
  .shop-packs { grid-template-columns: 1fr; }
  .shop-body { padding-left: 12px; padding-right: 12px; }
}


/* ===== v17.17.1 Bigger claw cabinet, prizes button ===== */
#play {
  --play-controls-h: 168px;
}
#play .machine-wrap {
  padding: 0 6px 0;
  align-items: stretch;
  justify-content: stretch;
}
#play .cabinet {
  aspect-ratio: auto;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  box-sizing: border-box;
}
#play .controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 12;
  max-width: none;
  width: auto;
  margin: 0;
  padding: 8px 12px calc(12px + var(--safe-bottom));
  justify-content: space-between;
  align-items: flex-end;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(20,8,30,.18) 55%, rgba(20,8,30,.32) 100%);
}
#play .controls .claw-pad,
#play .controls .ctrl.grab {
  pointer-events: auto;
}
#play .encourage {
  bottom: calc(var(--play-controls-h) + 8px);
}
#play .chute {
  position: absolute;
  left: 12px;
  bottom: calc(var(--play-controls-h) + 6px);
  height: 26px;
  margin: 0;
  width: 24%;
  max-width: 130px;
  z-index: 8;
  pointer-events: none;
  background: transparent;
  padding-left: 0;
}
#play .cabinet.is-3d .prize-box {
  visibility: hidden;
  pointer-events: none;
}
.play-prizes-btn {
  position: relative;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  font-size: 24px;
  background: linear-gradient(180deg, #ffe082, #ffca28);
  box-shadow: 0 5px 0 #f9a825;
  padding: 0;
}
.play-prizes-btn:active { box-shadow: 0 2px 0 #f9a825; }
.play-prizes-count {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 10px;
  background: #e53935;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 20px;
  text-align: center;
  box-shadow: 0 2px 0 rgba(0,0,0,.2);
}
.play-prizes-count.hidden { display: none !important; }
.play-prizes {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(12px + var(--safe-top)) 14px calc(14px + var(--safe-bottom));
  background: rgba(40, 10, 70, .45);
}
.play-prizes.hidden { display: none !important; }
.play-prizes-card {
  width: min(420px, 100%);
  max-height: 100%;
  overflow: auto;
  background: linear-gradient(180deg, #fff8e1, #ffe0b2);
  border-radius: 24px;
  box-shadow: 0 12px 0 rgba(0,0,0,.18);
  padding: 12px 14px 16px;
}
.play-prizes-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.play-prizes-title {
  flex: 1 1 auto;
  margin: 0;
  font-size: clamp(20px, 5vw, 26px);
  color: #4a148c;
  text-align: center;
}
.play-prizes-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 40px;
}
.play-prize-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,.8);
  border-radius: 16px;
  padding: 6px 10px;
  color: #4a148c;
  font-weight: 700;
  font-size: 16px;
}
.play-prize-item .kept {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
}
.play-prize-item .kept svg { width: 100%; height: 100%; display: block; }
.play-prizes-empty {
  margin: 16px 8px;
  text-align: center;
  color: #6a1b9a;
  font-weight: 700;
  font-size: 16px;
  line-height: 1.4;
}
.play-prizes-empty.hidden { display: none !important; }
@media (max-height: 700px) {
  .play-prizes-btn { width: 44px; height: 44px; flex: 0 0 44px; font-size: 22px; }
  #play { --play-controls-h: 140px; }
}
@media (orientation: landscape) and (max-height: 500px) {
  #play { --play-controls-h: 110px; }
  #play .play-top { padding: calc(2px + var(--safe-top)) 8px 2px; }
  #play .marquee { padding: 2px 8px; margin-bottom: 2px; font-size: 14px; }
  #play .controls { padding: 4px 10px calc(6px + var(--safe-bottom)); }
  .claw-pad { grid-template-columns: 44px 44px 44px; grid-template-rows: 40px 40px 40px; }
  .claw-pad .ctrl.arrow { width: 44px; height: 40px; font-size: 18px; }
  .ctrl.grab { height: 56px; }
}


/* ===== v17.17.2 Prize pile in view ===== */
#play .controls {
  background: none;
  padding: 6px 10px calc(10px + var(--safe-bottom));
  align-items: flex-end;
  justify-content: space-between;
}
#play .controls .ctrl.grab {
  flex: 0 0 auto;
  width: 128px;
  min-width: 120px;
  max-width: 168px;
  height: 72px;
  opacity: 0.96;
}
#play .claw-pad {
  grid-template-columns: 52px 52px 52px;
  grid-template-rows: 48px 48px 48px;
  gap: 4px;
  opacity: 0.96;
}
#play .claw-pad .ctrl.arrow {
  width: 52px;
  height: 48px;
  font-size: 22px;
  border-radius: 16px;
}
#play { --play-controls-h: 154px; }
#play .chute {
  left: 10px;
  bottom: calc(10px + var(--safe-bottom));
  width: 72px;
  max-width: 22%;
  height: 22px;
  z-index: 11;
  opacity: 0.9;
}
@media (min-width: 700px) {
  #play .claw-pad { grid-template-columns: 62px 62px 62px; grid-template-rows: 56px 56px 56px; }
  #play .claw-pad .ctrl.arrow { width: 62px; height: 56px; font-size: 28px; }
  #play .controls .ctrl.grab { width: 150px; min-width: 140px; height: 84px; }
  #play { --play-controls-h: 176px; }
}
@media (max-height: 700px) {
  #play { --play-controls-h: 132px; }
  #play .claw-pad { grid-template-columns: 48px 48px 48px; grid-template-rows: 44px 44px 44px; }
  #play .claw-pad .ctrl.arrow { width: 48px; height: 44px; font-size: 20px; }
  #play .controls .ctrl.grab { width: 118px; min-width: 110px; height: 64px; }
}
@media (orientation: landscape) and (max-height: 500px) {
  #play { --play-controls-h: 108px; }
  #play .controls { padding: 4px 10px calc(8px + var(--safe-bottom)); }
  #play .claw-pad { grid-template-columns: 44px 44px 44px; grid-template-rows: 40px 40px 40px; }
  #play .claw-pad .ctrl.arrow { width: 44px; height: 40px; font-size: 18px; }
  #play .controls .ctrl.grab { width: 110px; min-width: 100px; height: 56px; }
}


/* ===== v17.18.2 Compact controls, visible prize chute pocket ===== */
#play { --play-controls-h: 124px; }
#play .controls {
  padding: 4px 8px calc(8px + var(--safe-bottom));
}
#play .claw-pad {
  margin-left: 74px;
  grid-template-columns: 46px 46px 46px;
  grid-template-rows: 42px 42px 42px;
  gap: 3px;
  opacity: 0.88;
}
#play .claw-pad .ctrl.arrow {
  width: 46px;
  height: 42px;
  font-size: 20px;
  border-radius: 14px;
}
#play .controls .ctrl.grab {
  width: 104px;
  min-width: 96px;
  height: 56px;
  opacity: 0.9;
  font-size: 20px;
}
#play .chute {
  left: 8px;
  bottom: calc(8px + var(--safe-bottom));
  width: 66px;
  max-width: 20%;
  height: 28px;
  z-index: 13;
  opacity: 1;
}
#play .chute-flap {
  width: 100%;
  height: 100%;
}
@media (min-width: 700px) {
  #play { --play-controls-h: 140px; }
  #play .claw-pad {
    margin-left: 88px;
    grid-template-columns: 54px 54px 54px;
    grid-template-rows: 50px 50px 50px;
  }
  #play .claw-pad .ctrl.arrow { width: 54px; height: 50px; font-size: 24px; }
  #play .controls .ctrl.grab { width: 124px; min-width: 114px; height: 66px; }
  #play .chute { width: 80px; height: 32px; }
}
@media (max-height: 700px) {
  #play { --play-controls-h: 112px; }
  #play .claw-pad {
    margin-left: 64px;
    grid-template-columns: 42px 42px 42px;
    grid-template-rows: 38px 38px 38px;
  }
  #play .claw-pad .ctrl.arrow { width: 42px; height: 38px; font-size: 18px; }
  #play .controls .ctrl.grab { width: 96px; min-width: 90px; height: 50px; }
}
@media (orientation: landscape) and (max-height: 500px) {
  #play { --play-controls-h: 96px; }
  #play .controls { padding: 4px 8px calc(6px + var(--safe-bottom)); }
  #play .claw-pad {
    margin-left: 58px;
    grid-template-columns: 38px 38px 38px;
    grid-template-rows: 34px 34px 34px;
  }
  #play .claw-pad .ctrl.arrow { width: 38px; height: 34px; font-size: 16px; }
  #play .controls .ctrl.grab { width: 92px; min-width: 84px; height: 46px; }
  #play .chute { width: 54px; height: 22px; left: 6px; }
}


/* ===== v17.18.3 Bigger claw controls, slightly raised ===== */
/* ===== v17.18.4 Talk text stays on screen (t194u) ===== */
/* ===== v17.19.0 Real-world weather in toy chat (t195u) ===== */
.toy-chat-wx,
.toy-chat-wx-ask {
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
}
.toy-chat-wx-text {
  margin: 0 0 8px;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.toy-chat-wx-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 3px;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
}
.toy-chat-wx-day {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 1px;
  padding: 4px 1px 3px;
  background: #fff8e1;
  border: 1px solid #ffe082;
  border-radius: 10px;
  text-align: center;
  font-weight: 700;
  color: #4a148c;
  line-height: 1.15;
  box-sizing: border-box;
}
.toy-chat-wx-day .wx-d {
  font-size: 10px;
  letter-spacing: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.toy-chat-wx-day .wx-i { font-size: 16px; line-height: 1.1; }
.toy-chat-wx-day .wx-t {
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}
.toy-chat-wx-day .wx-t small {
  display: block;
  font-size: 10px;
  font-weight: 700;
  color: #6a1b9a;
  opacity: 0.85;
}
.toy-chat-wx-day .wx-p { font-size: 9px; font-weight: 700; color: #1565c0; }
.toy-chat-city {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
.toy-chat-city-input {
  flex: 1 1 auto;
  min-width: 0;
  height: 40px;
  border: 2px solid #ffe082;
  border-radius: 12px;
  padding: 0 10px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  color: #4a148c;
  background: #fff;
  box-sizing: border-box;
}
.toy-chat-city-go {
  flex: 0 0 auto;
  height: 40px;
  border: 0;
  border-radius: 12px;
  padding: 0 12px;
  font-family: inherit;
  font-weight: 800;
  font-size: 15px;
  color: #fff;
  background: linear-gradient(180deg, #69f0ae, #00c853);
  box-shadow: 0 3px 0 #1b5e20;
  cursor: pointer;
}
.toy-chat-city-go:active { transform: translateY(2px); box-shadow: 0 1px 0 #1b5e20; }
.quality-forget-btn {
  width: 100%;
  min-width: 0 !important;
  min-height: 48px;
  margin: 0 0 6px;
  font-size: 16px;
  color: #4a148c;
  background: #fff;
  box-shadow: 0 3px 0 #ce93d8;
}
.quality-forget-btn.is-empty { opacity: 0.7; }
.quality-forget-note {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 600;
  color: #6a1b9a;
  line-height: 1.35;
  text-align: center;
}
@media (max-width: 390px) {
  .toy-chat-wx-day .wx-d { font-size: 9px; }
  .toy-chat-wx-day .wx-i { font-size: 14px; }
  .toy-chat-wx-day .wx-t { font-size: 10px; }
}

#play { --play-controls-h: 168px; }
#play .controls {
  bottom: 16px;
  padding: 4px 8px calc(8px + var(--safe-bottom));
}
#play .claw-pad {
  margin-left: 78px;
  grid-template-columns: 60px 60px 60px;
  grid-template-rows: 55px 55px 55px;
  gap: 4px;
  opacity: 0.9;
}
#play .claw-pad .ctrl.arrow {
  width: 60px;
  height: 55px;
  min-width: 60px;
  min-height: 55px;
  font-size: 26px;
  border-radius: 16px;
}
#play .controls .ctrl.grab {
  width: 135px;
  min-width: 135px;
  height: 73px;
  min-height: 73px;
  opacity: 0.92;
  font-size: 26px;
}
@media (min-width: 700px) {
  #play { --play-controls-h: 190px; }
  #play .controls { bottom: 18px; }
  #play .claw-pad {
    margin-left: 92px;
    grid-template-columns: 70px 70px 70px;
    grid-template-rows: 65px 65px 65px;
  }
  #play .claw-pad .ctrl.arrow { width: 70px; height: 65px; min-width: 70px; min-height: 65px; font-size: 30px; }
  #play .controls .ctrl.grab { width: 161px; min-width: 161px; height: 86px; min-height: 86px; font-size: 30px; }
}
@media (max-height: 700px) {
  #play { --play-controls-h: 150px; }
  #play .controls { bottom: 14px; }
  #play .claw-pad {
    margin-left: 68px;
    grid-template-columns: 55px 55px 55px;
    grid-template-rows: 49px 49px 49px;
  }
  #play .claw-pad .ctrl.arrow { width: 55px; height: 49px; min-width: 55px; min-height: 49px; font-size: 23px; }
  #play .controls .ctrl.grab { width: 125px; min-width: 125px; height: 65px; min-height: 65px; font-size: 23px; }
}
@media (orientation: landscape) and (max-height: 500px) {
  #play { --play-controls-h: 128px; }
  #play .controls { bottom: 16px; padding: 4px 8px calc(6px + var(--safe-bottom)); }
  #play .claw-pad {
    margin-left: 60px;
    grid-template-columns: 49px 49px 49px;
    grid-template-rows: 44px 44px 44px;
  }
  #play .claw-pad .ctrl.arrow { width: 49px; height: 44px; min-width: 49px; min-height: 44px; font-size: 21px; }
  #play .controls .ctrl.grab { width: 120px; min-width: 120px; height: 60px; min-height: 60px; font-size: 22px; }
}

/* ===== v17.20.0 Anonymous toy-question log (t196u, t197u) ===== */
.quality-privacy-note { margin-top: 4px; }

/* ===== v17.20.1 Two-part weather + where-am-I (t198u–t201u) ===== */
.toy-chat-wx-park {
  margin: 0 0 8px;
  font-weight: 700;
}

/* ===== v17.21.0 Florida-ocean sunrise / sunset (t202u) ===== */

/* ===== v17.21.1 Half-size fullscreen, pinned to the top-right (t203u) ===== */
/* Visual control is 32×32 (half of 64). The button itself is 44×44 so the
   tap target stays at least 36px on phones. Get Out sits just below it in
   the same top-right column. Park/play top bars and the chat panel leave
   that column free so nothing covers either button. */
.fs-btn,
#picker .fs-btn,
#play .fs-btn,
#park .fs-btn {
  position: fixed;
  top: calc(6px + var(--safe-top));
  right: calc(6px + env(safe-area-inset-right, 0px));
  z-index: 40;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #4a148c;
  display: grid;
  place-items: center;
  overflow: visible;
  -webkit-tap-highlight-color: transparent;
}
.fs-btn::before,
#picker .fs-btn::before,
#play .fs-btn::before,
#park .fs-btn::before {
  content: "";
  position: absolute;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: linear-gradient(180deg, #ffe082, #ffca28);
  box-shadow: 0 3px 0 #f9a825;
  z-index: 0;
  pointer-events: none;
}
.fs-btn:active,
#picker .fs-btn:active,
#play .fs-btn:active,
#park .fs-btn:active {
  transform: none;
  box-shadow: none;
}
.fs-btn:active::before {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #f9a825;
}
.fs-btn svg,
#picker .fs-btn svg,
#play .fs-btn svg,
#park .fs-btn svg {
  width: 17px;
  height: 17px;
  display: block;
  position: relative;
  z-index: 1;
  margin: 0;
}
@media (max-height: 700px) {
  .fs-btn,
  #picker .fs-btn,
  #play .fs-btn,
  #park .fs-btn { width: 44px; height: 44px; flex: 0 0 44px; }
  .fs-btn svg,
  #picker .fs-btn svg,
  #play .fs-btn svg,
  #park .fs-btn svg { width: 17px; height: 17px; }
}

/* Leave a right gutter so Home / quality / mute / prizes never sit under FS or Get Out */
#play .play-top {
  padding-right: calc(58px + env(safe-area-inset-right, 0px));
}
#park .park-top {
  right: calc(120px + env(safe-area-inset-right, 0px));
  width: auto;
}

/* Get Out: just below the 32px disc, still clearly top-right and easy to tap */
#btn-play-down.play-down-btn {
  top: calc(54px + var(--safe-top));
  bottom: auto;
  right: calc(6px + env(safe-area-inset-right, 0px));
  z-index: 18;
}
@media (max-width: 520px) {
  #btn-play-down.play-down-btn {
    top: calc(54px + var(--safe-top));
    right: calc(6px + env(safe-area-inset-right, 0px));
  }
}
@media (max-height: 700px) {
  #btn-play-down.play-down-btn { top: calc(54px + var(--safe-top)); }
}
@media (max-height: 520px) {
  #btn-play-down.play-down-btn { top: calc(54px + var(--safe-top)); }
}

/* Chat panel already reserved the top-right; keep the taller Get Out + FS column free */
.toy-chat { right: 112px; }

/* Centered top pills stay out of the FS / Get Out column */
.park-hint, .park-name, .fw-banner, .ocean-shore-cue {
  max-width: calc(100% - 220px);
  box-sizing: border-box;
}


/* ===== v17.22.0 Local time + city picker (t205u, t206u) ===== */
.quality-loc-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin: 0 0 8px;
}
.quality-change-btn {
  background: linear-gradient(180deg, #b3e5fc, #0288d7);
  box-shadow: 0 4px 0 #01579b;
  color: #012a4a;
}
.quality-change-btn:active { box-shadow: 0 2px 0 #01579b; }
.city-pick { width: 100%; }
.city-pick-input,
.toy-chat-city-input {
  width: 100%;
  min-height: 52px;
  font: 800 20px/1.2 inherit;
  padding: 10px 14px;
  border: 3px solid #fff;
  border-radius: 16px;
  box-shadow: 0 3px 0 #7e57c2;
  color: #311b92;
  background: #fff;
}
.city-pick-list { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.city-pick-hit {
  min-height: 52px;
  width: 100%;
  padding: 10px 14px;
  border: 3px solid #fff;
  border-radius: 16px;
  font: 800 18px/1.2 inherit;
  text-align: left;
  cursor: pointer;
  color: #4a148c;
  background: linear-gradient(180deg, #fff, #ede7f6);
  box-shadow: 0 4px 0 #7e57c2;
  -webkit-tap-highlight-color: transparent;
}
.city-pick-hit:active { transform: translateY(2px); box-shadow: 0 2px 0 #7e57c2; }
.city-pick-empty { margin: 4px 2px 0; font-weight: 700; color: #6a1b9a; }
.city-pick-sheet { z-index: 85; }
.city-pick-card { width: min(440px, 100%); }
.city-invite {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(18px + var(--safe-bottom));
  z-index: 35;
  display: flex;
  justify-content: center;
  pointer-events: none;
}
.city-invite.hidden { display: none !important; }
.city-invite-card {
  pointer-events: auto;
  width: min(440px, 100%);
  background: linear-gradient(180deg, #fff8e1, #ffe082);
  border: 3px solid #fff;
  border-radius: 24px;
  padding: 16px 16px 14px;
  box-shadow: 0 10px 24px rgba(0,0,0,.28), 0 6px 0 #f9a825;
  text-align: center;
}
.city-invite-title { margin: 0 0 6px; font-size: 20px; font-weight: 800; color: #4a148c; line-height: 1.25; }
.city-invite-sub { margin: 0 0 12px; font-size: 15px; font-weight: 700; color: #6a1b9a; }
.city-invite-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.city-invite-pick { min-height: 52px; min-width: 140px; }
.city-invite-skip { min-height: 52px; min-width: 120px; background: linear-gradient(180deg, #fff, #e0e0e0); color: #4527a0; box-shadow: 0 4px 0 #7e57c2; }

/* v17.26.0 (t218u): fishing upgrade — aim, big cast/reel, Captain Paws, underwater peek, catch card */
#fish-game { padding: 8px 10px 10px; }
#fish-game .hidden { display: none !important; }
.fish-btns .fish-big { min-height: 60px; min-width: 150px; font-size: 19px; touch-action: none; user-select: none; -webkit-user-select: none; }
.fish-btns .fish-aim {
  min-height: 60px; min-width: 56px; font-size: 24px; font-weight: 900; border-radius: 18px;
  border: 3px solid #fff; background: linear-gradient(180deg, #fff8e1, #ffe082); color: #6d4c00;
  box-shadow: 0 4px 0 #f9a825; cursor: pointer; touch-action: manipulation;
}
.fish-btns .fish-aim:active { transform: translateY(2px); box-shadow: 0 2px 0 #f9a825; }
#btn-fish-reel.on { filter: brightness(1.12); transform: translateY(2px); }
#btn-fish-hook { background: linear-gradient(180deg, #ffeb3b, #ff9800); color: #3e2100; animation: fishPulse .5s ease-in-out infinite alternate; }
@keyframes fishPulse { from { transform: scale(1); } to { transform: scale(1.07); } }
#fish-game .fish-btns.fish-small { position: absolute; top: -17px; right: 12px; margin: 0; gap: 6px; flex-wrap: nowrap; }
#fish-game .fish-btns.fish-small .ask-btn { height: 34px; min-height: 34px; font-size: 13px; padding: 0 10px; border-radius: 14px; border: 2px solid #fff; box-shadow: 0 3px 0 #1b5e20; color: #fff; }
#fish-game .fish-hint { padding-right: 132px; text-align: left; margin-top: 6px; }
@media (min-width: 521px) { #fish-game .fish-hint { padding-right: 0; text-align: center; } }
#fish-guide {
  position: absolute; left: 50%; transform: translateX(-50%);
  top: calc(64px + var(--safe-top)); z-index: 13;
  width: min(440px, calc(100% - 150px));
  background: #fffde7; color: #4e342e; border: 3px solid #fff; border-radius: 18px;
  box-shadow: 0 5px 0 #ffb300, 0 10px 16px rgba(0,0,0,.2);
  padding: 8px 12px; font-weight: 800; font-size: 15px; line-height: 1.3;
  pointer-events: none; transition: opacity .55s ease; opacity: 1;
  display: flex; flex-direction: column; gap: 2px;
}
#fish-guide.fade { opacity: 0; }
#fish-guide.hidden { display: none !important; }
.fish-guide-who { font-size: 12px; color: #8d6e63; letter-spacing: .02em; }
@media (max-width: 520px) { #fish-guide { width: calc(100% - 128px); left: 12px; transform: none; font-size: 14px; top: calc(112px + var(--safe-top)); } }
#fish-under {
  position: absolute; inset: 0; z-index: 7; pointer-events: none;
  background: radial-gradient(ellipse at 50% 45%, rgba(0,150,170,.08), rgba(0,60,90,.55));
  display: flex; align-items: flex-start; justify-content: center;
  animation: fishUnderIn .45s ease;
}
#fish-under.hidden { display: none !important; }
@keyframes fishUnderIn { from { opacity: 0; } to { opacity: 1; } }
.fish-under-text { margin-top: calc(120px + var(--safe-top)); background: rgba(0,60,80,.6); color: #e0f7fa; font-weight: 800; padding: 6px 14px; border-radius: 14px; font-size: 15px; }
#fish-card {
  position: absolute; inset: 0; z-index: 21; display: flex; align-items: center; justify-content: center;
  background: rgba(0,30,40,.25); animation: fishUnderIn .3s ease;
}
#fish-card.hidden { display: none !important; }
.fish-card-in {
  position: relative; width: min(360px, calc(100% - 28px)); max-height: calc(100% - 150px); overflow: auto;
  background: linear-gradient(180deg, #ffffff, #e0f7fa); border: 4px solid #fff; border-radius: 24px;
  box-shadow: 0 8px 0 #00838f, 0 16px 24px rgba(0,0,0,.3); padding: 12px 14px 14px; text-align: center; color: #004d56;
}
.fish-card-in h3 { margin: 2px 0 0; font-size: 21px; }
.fish-card-in p { margin: 4px 0; font-weight: 700; font-size: 14px; }
.fish-card-in .fish-sci { font-style: italic; font-weight: 600; color: #00796b; font-size: 13px; margin-top: 0; }
.fish-card-in .fish-fact { background: #fff8e1; border-radius: 12px; padding: 6px 8px; color: #5d4037; font-size: 14px; text-align: left; }
.fish-card-in .fish-art { width: 200px; max-width: 70%; height: auto; image-rendering: auto; }
.fish-card-in .install-btn { margin-top: 6px; min-height: 48px; }
.fish-new { position: absolute; top: 8px; left: 10px; background: #ff7043; color: #fff; font-weight: 900; border-radius: 10px; padding: 2px 8px; font-size: 13px; transform: rotate(-8deg); }
.fish-book-sum { text-align: center; margin: -4px 0 8px; font-weight: 800; color: #00695c; }
.fish-hab-h { grid-column: 1 / -1; margin: 8px 0 0; color: #004d56; font-size: 15px; }
.fish-card .fish-art { width: 96px; height: 48px; object-fit: contain; }
.fish-card .fish-art.sil { filter: brightness(0) opacity(.45); }
.fish-card .fish-fact-s { font-size: 10px; font-weight: 600; color: #5d4037; line-height: 1.25; }
@media (max-height: 600px) {
  .fish-btns .fish-big, .fish-btns .fish-aim { min-height: 50px; }
}

/* v17.26.4 (t225u): one shared, very visible bright-green Done / OK / confirm style */
.done-btn,
.ask-btn:not(.no):not(.city-invite-skip):not(.quality-forget-btn):not(.concert-credits-btn):not(.city-pick-skip) {
  background: linear-gradient(180deg, #4ade80, #22c55e);
  box-shadow: 0 6px 0 #15803d, 0 8px 16px rgba(0, 0, 0, .28);
  color: #fff;
  font-weight: 800;
  text-shadow: 0 1px 0 rgba(21, 128, 61, .35);
  border: 0;
  min-height: 56px;
  padding: 0 22px;
  border-radius: 22px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.done-btn:active,
.ask-btn:not(.no):not(.city-invite-skip):not(.quality-forget-btn):not(.concert-credits-btn):not(.city-pick-skip):active {
  transform: translateY(3px);
  box-shadow: 0 3px 0 #15803d, 0 5px 10px rgba(0, 0, 0, .22);
}
.done-btn:disabled,
.ask-btn:disabled:not(.no) {
  background: linear-gradient(180deg, #86efac, #4ade80);
  box-shadow: 0 5px 0 #16a34a, 0 6px 12px rgba(0, 0, 0, .18);
  color: #fff;
  opacity: 1;
  filter: none;
  cursor: default;
  pointer-events: none;
  text-shadow: 0 1px 0 rgba(21, 128, 61, .25);
}
.city-pick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 14px;
}
.city-pick-actions .done-btn,
.city-pick-actions .city-pick-skip,
.city-pick-go {
  flex: 1 1 140px;
  min-width: 140px;
  width: auto;
  margin: 0;
}
.city-pick-skip {
  background: linear-gradient(180deg, #fff, #e8e0f5);
  color: #4527a0;
  box-shadow: 0 5px 0 #7e57c2, 0 8px 12px rgba(0, 0, 0, .16);
  font-weight: 800;
  min-height: 56px;
  text-shadow: none;
}
.city-pick-skip:active {
  transform: translateY(3px);
  box-shadow: 0 2px 0 #7e57c2;
}
.city-pick-hit.is-on {
  background: linear-gradient(180deg, #fff59d, #ffd54f);
  color: #4e2a00;
  box-shadow: 0 4px 0 #f9a825;
}
.city-pick-go { margin-top: 10px; width: 100%; }
#fish-book-close.done-btn,
#fish-card-ok.done-btn,
#tip-ok.done-btn,
#shop-need-ok.done-btn,
#btn-unlock-ok.done-btn,
#btn-nest-done.done-btn {
  margin-left: auto;
  margin-right: auto;
}


/* ---------- v17.27.0 (t227u): water skiing, Trick button, tidy water HUD ---------- */
.water-trick-btn {
  position: absolute;
  right: calc(16px + env(safe-area-inset-right, 0px));
  bottom: calc(86px + var(--safe-bottom, 0px));
  z-index: 12;
  width: 108px; height: 108px; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  border: 4px solid #fff; cursor: pointer;
  font-family: inherit; font-weight: 900; font-size: 20px; line-height: 1; color: #fff; text-shadow: 0 2px 0 rgba(0,0,0,.25);
  background: linear-gradient(180deg, #ff80ab, #e91e63 60%, #ad1457);
  box-shadow: 0 7px 0 #880e4f, 0 10px 18px rgba(0,0,0,.28), 0 0 18px 3px rgba(255,128,171,.55);
  -webkit-tap-highlight-color: transparent; touch-action: none; user-select: none; -webkit-user-select: none;
  pointer-events: auto;
}
.water-trick-btn .water-trick-ico { font-size: 38px; line-height: 1; }
.water-trick-btn.hidden { display: none; }
.water-trick-btn:active { transform: translateY(4px); box-shadow: 0 3px 0 #880e4f, 0 6px 12px rgba(0,0,0,.25); }
.water-trick-btn.with-boost {
  right: calc(120px + env(safe-area-inset-right, 0px));
  bottom: calc(80px + var(--safe-bottom, 0px));
  width: 84px; height: 84px; font-size: 16px;
}
.water-trick-btn.with-boost .water-trick-ico { font-size: 30px; }
@media (min-width: 820px) {
  .water-trick-btn { right: calc(28px + env(safe-area-inset-right, 0px)); bottom: calc(86px + var(--safe-bottom, 0px)); }
  .water-trick-btn.with-boost { right: calc(134px + env(safe-area-inset-right, 0px)); bottom: calc(86px + var(--safe-bottom, 0px)); }
}
.ski-hud {
  position: absolute; left: 50%; transform: translateX(-50%);
  top: calc(80px + var(--safe-top, 0px)); z-index: 11;
  display: flex; gap: 6px; align-items: center; pointer-events: none;
}
.ski-hud.hidden { display: none; }
.ski-pill {
  background: rgba(13, 71, 161, .82); color: #fff; border: 2px solid #fff; border-radius: 999px;
  padding: 4px 12px; font-family: inherit; font-weight: 800; font-size: 17px; line-height: 1.1; box-shadow: 0 3px 0 rgba(0,0,0,.2);
}
.ski-pill b { color: #ffee58; font-size: 20px; }
.ski-pill.combo { background: linear-gradient(180deg, #ffb300, #ef6c00); }
.ski-pill.hidden { display: none; }
.trick-pop {
  position: absolute; left: 50%; top: 30%; z-index: 13; transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  pointer-events: none; opacity: 0; text-align: center; max-width: 94vw;
}
.trick-pop-name {
  font-family: inherit; font-weight: 900; font-size: clamp(34px, 9vw, 64px); line-height: 1.05; color: #fff200; -webkit-text-stroke: 3px #4a148c;
  text-shadow: 0 6px 0 rgba(0,0,0,.25); paint-order: stroke fill; white-space: nowrap;
}
.trick-pop-sub {
  font-family: inherit; font-weight: 800; font-size: clamp(20px, 5.4vw, 30px); line-height: 1.1; color: #fff; text-shadow: 0 2px 0 #4a148c, 0 0 8px #4a148c;
}
.trick-pop.show { animation: trickPop 1.6s ease-out forwards; }
@keyframes trickPop {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.5); }
  14% { opacity: 1; transform: translate(-50%, -50%) scale(1.16); }
  28% { transform: translate(-50%, -50%) scale(1); }
  78% { opacity: 1; transform: translate(-50%, -62%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -90%) scale(1); }
}
@media (prefers-reduced-motion: reduce) { .trick-pop.show { animation: trickPopFade 1.6s linear forwards; } @keyframes trickPopFade { 0%, 80% { opacity: 1; } 100% { opacity: 0; } } }
/* on the water: hide the unrelated vehicle / claw buttons so only steering, boost and Trick remain */
body.water-playing #moves,
body.water-playing #btn-flashlight,
body.water-playing #fly-hud,
body.water-playing #planet-fly-hud,
body.water-playing #btn-letgo,
body.water-playing #btn-store-go,
body.water-playing #btn-planet-items,
body.water-playing #btn-drive-rover,
body.water-playing #btn-planet-map,
body.water-playing #btn-ocean-book,
body.water-playing #ocean-depth {
  display: none !important;
}
.goto-planet-btns .ocean-ski-btn.yes { flex: 1 1 100%; background: linear-gradient(180deg, #ff80ab, #e91e63); box-shadow: 0 5px 0 #880e4f; color: #fff; }


/* ---------- v17.27.1 (t231u): pump the swing ---------- */
.swing-pump-btn {
  position: absolute;
  right: calc(18px + env(safe-area-inset-right, 0px));
  bottom: calc(76px + var(--safe-bottom, 0px));
  z-index: 12;
  width: 88px; height: 88px; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0;
  border: 4px solid #fff; cursor: pointer;
  font-family: inherit; font-weight: 900; font-size: 18px; line-height: 1; color: #fff; text-shadow: 0 2px 0 rgba(0,0,0,.25);
  background: linear-gradient(180deg, #69f0ae, #00c853 60%, #00a152);
  box-shadow: 0 7px 0 #00692f, 0 10px 18px rgba(0,0,0,.28);
  -webkit-tap-highlight-color: transparent; touch-action: none; user-select: none; -webkit-user-select: none;
  pointer-events: auto;
}
.swing-pump-btn .sp-ico { font-size: 32px; line-height: 1; }
.swing-pump-btn.hidden { display: none; }
.swing-pump-btn:active { transform: translateY(4px); box-shadow: 0 3px 0 #00692f, 0 6px 12px rgba(0,0,0,.25); }
.swing-pump-btn.now { box-shadow: 0 7px 0 #00692f, 0 10px 18px rgba(0,0,0,.28), 0 0 0 6px rgba(255,255,255,.55), 0 0 22px 8px rgba(105,240,174,.85); animation: swingNow .5s ease-in-out infinite alternate; }
@keyframes swingNow { from { transform: scale(1); } to { transform: scale(1.08); } }
@media (max-width: 520px) { .swing-pump-btn { bottom: calc(72px + var(--safe-bottom, 0px)); width: 86px; height: 86px; } }
@media (prefers-reduced-motion: reduce) { .swing-pump-btn.now { animation: none; } }


/* ---------- v17.27.2 (t232u): Back to claw machines on the locked popup ---------- */
.unlock-back-btn {
  display: block; margin: 12px auto 0; width: 100%; max-width: 320px; min-height: 56px; padding: 10px 18px;
  border: 3px solid #1565c0; border-radius: 999px; cursor: pointer;
  font-family: inherit; font-weight: 800; font-size: 20px; line-height: 1.15; color: #0d47a1;
  background: linear-gradient(180deg, #ffffff, #e3f2fd); box-shadow: 0 5px 0 #1565c0;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.unlock-back-btn:active { transform: translateY(3px); box-shadow: 0 2px 0 #1565c0; }
.unlock-tip .park-card { text-align: center; }
