/*
 * game.css — Times Tables Galaxy. Everything lives on a 390px-wide logical
 * stage that main.js scales to fit the window; positions below are stage px.
 */

:root {
  --ink: #1b1747;
  --card: #fffaf0;
  --gold: #ffc83d;
  --gold-dark: #c99a1a;
  --mint: #2fd39a;
  --coral: #ff6b6b;
  --sky: #5fd0ff;
  --violet: #8f7bff;
  --font: "Baloo 2", ui-rounded, "Nunito", "Segoe UI", system-ui, sans-serif;
}

html, body {
  margin: 0; height: 100%; overflow: hidden; background: #07061a;
  touch-action: manipulation; -webkit-user-select: none; user-select: none;
  -webkit-tap-highlight-color: transparent; font-family: var(--font);
}

#stage {
  position: absolute; left: 50%; top: 50%; overflow: hidden; color: #fff;
  /* pastel cartoon sky: deep violet at the top (so the HUD reads), then
     lavender, pink and a warm peach glow over the desert horizon */
  background:
    radial-gradient(300px 220px at 85% 12%, rgba(255,214,250,.25), transparent 70%),
    linear-gradient(180deg, #3b2a86 0%, #6a4fc4 22%, #a77fdc 42%, #e59ac9 62%, #ffb8b0 78%, #ffd6ac 100%);
}

button { font-family: var(--font); -webkit-tap-highlight-color: transparent; }

/* ---- stars ----------------------------------------------------------- */

.stars { position: absolute; inset: 0; pointer-events: none; }
.star { position: absolute; border-radius: 50%; background: #fff; animation: twinkle var(--d, 3s) ease-in-out infinite alternate; }
@keyframes twinkle { from { opacity: .25; } to { opacity: 1; } }
/* ---- Claw Machine (key express) ---------------------------------------------- */
.claw-dome { border-radius: 160px 160px 18px 18px; border: 4px solid rgba(190,225,255,.7);
  background: radial-gradient(ellipse at 30% 20%, rgba(255,255,255,.28), transparent 40%), linear-gradient(180deg, rgba(120,160,255,.18), rgba(70,60,200,.28));
  box-shadow: inset 0 0 30px rgba(140,200,255,.45), 0 0 24px rgba(120,160,255,.35); pointer-events: none; }
.claw-rail { height: 8px; border-radius: 4px; background: linear-gradient(180deg, #dcd8ee, #8f88b8); box-shadow: 0 2px 0 #3b2a5e; pointer-events: none; }
.claw-cable { width: 4px; margin-left: -2px; background: linear-gradient(90deg, #8f88b8, #e8e4f6, #8f88b8); z-index: 6; pointer-events: none; }
.claw { width: 84px; height: 82px; margin: -12px 0 0 -42px; z-index: 7; pointer-events: none; }
.claw svg { width: 100%; height: 100%; overflow: visible; }
.claw .arm { transition: transform .22s ease-in-out; transform-box: fill-box; }
.claw .arm-l { transform-origin: 100% 0; } .claw .arm-r { transform-origin: 0 0; }
.claw.open .arm-l { transform: rotate(22deg); } .claw.open .arm-r { transform: rotate(-22deg); }
.claw-base { height: 34px; border-radius: 14px; background: linear-gradient(180deg, #6a58e0, #3d2f9e); border: 3px solid #241a6b; pointer-events: none; }
.claw-prize { width: 104px; height: 106px; margin: -53px 0 0 -52px; padding: 0; border: 0; background: none; cursor: pointer; z-index: 5;
  animation: critter-hop 1.8s ease-in-out infinite; animation-delay: var(--d, 0s); }
.claw-prize svg, .claw-prize img { width: 100%; height: 100%; object-fit: contain; display: block; }
.claw-box, .gum-box { min-width: 92px; height: 60px; margin: -30px 0 0 -46px; padding: 0 12px; cursor: pointer; z-index: 5;
  background: #fffdf6; color: #1b1747; border: 4px solid #4f7dff; border-radius: 16px; box-shadow: 0 5px 0 #2a3f9e; font: 800 32px/1 var(--font); }
.claw-box.good, .gum-box.good { background: var(--mint); color: #fff; border-color: #fff; box-shadow: 0 5px 0 #1f9c70; }
.claw-box.bad, .gum-box.bad { background: #ffd0d0; border-color: #ff6b6b; box-shadow: 0 5px 0 #c0392b; }
.claw-stick { width: 36px; height: 36px; margin: -18px 0 0 -18px; border-radius: 50%; background: #3d3a5c; box-shadow: 0 4px 0 #1b1747; pointer-events: none; }
.claw-stick::after { content: ""; position: absolute; left: 13px; top: -34px; width: 10px; height: 36px; border-radius: 5px; background: linear-gradient(90deg, #8f88b8, #e8e4f6); }
.claw-stick::before { content: ""; position: absolute; left: 3px; top: -56px; width: 30px; height: 30px; border-radius: 50%; z-index: 1;
  background: radial-gradient(circle at 35% 30%, #ff9a9a, #e8413c 60%, #9c2420); }
.claw-knob { width: 68px; height: 46px; margin: -23px 0 0 -34px; border-radius: 50%; display: grid; place-items: center; font-size: 24px; color: #fff; pointer-events: none; }
.claw-knob.star { background: radial-gradient(circle at 40% 30%, #8fb8ff, #3a64ff); box-shadow: 0 5px 0 #1b2a7a, 0 0 14px rgba(95,160,255,.7); color: #ffe680; }
.claw-knob.go { background: radial-gradient(circle at 40% 30%, #7dff9a, #1faa4a); box-shadow: 0 5px 0 #0f6a2c; }
/* ---- Gumball Shake (key dock) ------------------------------------------------ */
.gum-floor { width: calc(100% + 20px); height: 190px; border-radius: 50% 50% 0 0 / 34px 34px 0 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(120,110,230,.55), rgba(60,50,160,.75)); box-shadow: 0 -4px 20px rgba(95,208,255,.35); }
.gum-machine { width: 200px; height: 330px; margin: -100px 0 0 -100px; pointer-events: none; z-index: 3; transform-origin: 50% 90%; }
.gum-globe { position: absolute; left: 8px; top: 8px; width: 184px; height: 184px; border-radius: 50%; overflow: hidden; z-index: 2;
  background: radial-gradient(circle at 32% 26%, rgba(255,255,255,.55), rgba(255,255,255,.05) 34%), radial-gradient(circle, rgba(140,190,255,.22), rgba(70,90,220,.35));
  border: 4px solid rgba(200,230,255,.85); box-shadow: inset 0 0 24px rgba(140,200,255,.6), 0 0 18px rgba(120,170,255,.45); }
.gum-ball { position: absolute; width: 46px; height: 46px; margin: -23px 0 0 -23px; object-fit: contain; }
.gum-neck { position: absolute; left: 60px; top: 182px; width: 80px; height: 22px; border-radius: 6px; background: linear-gradient(180deg, #ffd23f, #c98a00); border: 3px solid #6a3c00; z-index: 3; }
.gum-stand { position: absolute; left: 22px; top: 198px; width: 156px; height: 118px; border-radius: 20px 20px 30px 30px; z-index: 3;
  background: linear-gradient(180deg, #ff5a5f, #c8262e); border: 4px solid #6a1420; box-shadow: inset 0 8px 0 rgba(255,255,255,.25); }
.gum-star { position: absolute; left: 50%; top: 12px; transform: translateX(-50%); font-size: 46px; line-height: 1; color: #ffd23f;
  text-shadow: 0 0 10px rgba(255,210,63,.8), 0 3px 0 #b06a00; }
.gum-chute { position: absolute; left: 50%; bottom: 10px; width: 50px; height: 26px; margin-left: -25px; border-radius: 12px 12px 4px 4px; background: #2a0d14; border: 3px solid #ffd23f; }
.gum-handle { position: absolute; right: -22px; top: 30px; width: 30px; height: 30px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #e8e4f6, #8f88b8);
  border: 3px solid #3b2a5e; }
.gum-handle::after { content: ""; position: absolute; left: 10px; top: -14px; width: 6px; height: 16px; border-radius: 3px; background: #3b2a5e; }
.gum-friend { width: 96px; height: 100px; margin: -50px 0 0 -48px; pointer-events: none; z-index: 2; animation: critter-hop 1.8s ease-in-out infinite; }
.gum-friend svg, .gum-friend img { width: 100%; height: 100%; object-fit: contain; }
.gum-out { width: 66px; height: 66px; margin: -33px 0 0 -33px; border-radius: 50%; display: grid; place-items: center; z-index: 6; pointer-events: none;
  font: 800 26px/1 var(--font); color: #1b1747; border: 3px solid #fff; }
.gum-out.gold { background: radial-gradient(circle at 35% 30%, #fff6c8, #ffd23f 55%, #d99a00); box-shadow: 0 0 18px #ffd23f; }
.gum-out.cracked { background: radial-gradient(circle at 35% 30%, #d8d8de, #8b8b98 60%, #5c5c68); color: #fff; }
.gum-out.cracked::after { content: ""; position: absolute; inset: 8px; background: linear-gradient(60deg, transparent 46%, #3b3b48 47%, #3b3b48 51%, transparent 52%); }
/* ---- the user's own game screens (scene.js): her picture + moving parts --------------- */
.scene-pic { background: center / 100% 100% no-repeat; pointer-events: none; z-index: 0; }
.scene-pic.fade-edges { -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 56px, #000 calc(100% - 40px), transparent 100%); mask-image: linear-gradient(180deg, transparent 0, #000 56px, #000 calc(100% - 40px), transparent 100%); }
.scene-qcard { z-index: 3; pointer-events: none; border-radius: 18px; background: linear-gradient(180deg, #ffffff, #f2f6ff);
  box-shadow: 0 0 0 4px #4f8dff, 0 0 0 7px #1d3aa8, 0 6px 14px rgba(10,20,80,.45), inset 0 -3px 0 rgba(79,141,255,.25); }
.gum-hd-shake { position: absolute; padding: 0; border: 0; background: transparent; border-radius: 50%; cursor: pointer; z-index: 4; touch-action: none; }
.gum-hd-shake.ready { animation: hd-shake-glow 1.1s ease-in-out infinite; }
@keyframes hd-shake-glow { 0%, 100% { box-shadow: 0 0 0 0 rgba(255,230,90,0); } 50% { box-shadow: 0 0 0 5px rgba(255,230,90,.9), 0 0 22px 6px rgba(255,200,60,.75); } }
.gum-hd-shake:active { transform: translateY(3px); }
.scene-sky { pointer-events: none; z-index: 0; opacity: .92; }
.scene-pic.fade-top { -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 90px); mask-image: linear-gradient(180deg, transparent 0, #000 90px); }
.scene-mirror { background: center / 100% 100% no-repeat; pointer-events: none; z-index: 0; filter: brightness(.85); }
.scene-part { z-index: 3; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.scene-part img { width: 100%; height: 100%; display: block; pointer-events: none; }
.scene-part.toy, .scene-part.rocket-pic { cursor: pointer; }
.scene-part.claw-pic { z-index: 5; transform-origin: 50% 0; }
.scene-cable { width: 5px; margin-left: -2.5px; transform-origin: 50% 0; z-index: 4; border-radius: 3px;
  background: linear-gradient(90deg, #7d78a8, #e8e4f6, #7d78a8); box-shadow: 0 0 0 1px #3b2a5e; pointer-events: none; }
.scene-q { display: grid; place-items: center; z-index: 4; color: #1b1f5e; font-family: var(--font); font-weight: 800; line-height: 1; pointer-events: none; white-space: nowrap; }
.scene-box { display: grid; place-items: center; padding: 0; border: 0; background: transparent; color: #1b1f5e; cursor: pointer; z-index: 4;
  font-family: var(--font); font-weight: 800; line-height: 1; border-radius: 14px; touch-action: none; user-select: none; -webkit-user-select: none; }
.scene-box .ans { font-size: 1em; }
/* her gold-framed white boxes, redrawn crisp at screen resolution (user: no blur on the frames) */
.scene-box.crisp { background: linear-gradient(180deg, #ffffff, #fbf7ee); border-radius: 12px;
  box-shadow: 0 0 0 3px #f6b928, 0 0 0 5px #a8650c, 0 4px 10px rgba(20,10,60,.35), inset 0 -3px 0 rgba(246,185,40,.25); }
.scene-box.crisp.good { background: #2fd39a; box-shadow: 0 0 0 3px #fff, 0 0 0 5px #1f9c70, 0 0 18px rgba(47,211,154,.9); }
.scene-box.crisp.bad { background: #ff8b8b; box-shadow: 0 0 0 3px #fff, 0 0 0 5px #c0392b; }
.scene-box.good { background: rgba(47,211,154,.88); color: #fff; box-shadow: 0 0 18px rgba(47,211,154,.9); }
.scene-box.bad { background: rgba(255,107,107,.75); color: #fff; }
.scene-part.alien-toy img { object-fit: contain; object-position: 50% 100%; filter: drop-shadow(0 4px 6px rgba(0,0,0,.35));
  transform-origin: 50% 100%; animation: toy-bob 1.4s ease-in-out infinite; animation-delay: var(--d, 0s); }
/* the aliens stand on the dome floor and bounce gently on the spot (user 2026-11-23) */
@keyframes toy-bob { 0%, 100% { transform: translateY(0) scale(1, 1); } 30% { transform: translateY(0) scale(1.04, .95); }
  60% { transform: translateY(-9px) scale(.98, 1.03); } }
.qbox-pic { z-index: 3; }
.toy.good { filter: drop-shadow(0 0 12px var(--mint)); }
.gum-ball-out { z-index: 6; display: grid; place-items: center; }
.gum-pic { z-index: 3; }
/* SHAKE: a real push button on the machine (user 2026-11-22: no yellow frame) — a glossy red dome button
   with a darker rim underneath, that presses down when tapped */
.gum-pic .gum-shake { position: absolute; display: flex; align-items: center; justify-content: center; padding: 0; margin: 0; border: 0; cursor: pointer;
  border-radius: 50%; pointer-events: auto; overflow: visible;
  background: radial-gradient(ellipse 70% 55% at 50% 30%, #ff8a8e 0%, #f0353f 45%, #b8141e 100%);
  box-shadow: 0 6px 0 #6e0b12, 0 8px 10px rgba(40,0,10,.45), inset 0 3px 3px rgba(255,255,255,.35), inset 0 -4px 6px rgba(80,0,10,.35);
  transform: scale(.92, .82); transition: transform .08s, box-shadow .08s; }
.gum-pic .gum-shake::before { content: ""; position: absolute; left: 18%; right: 18%; top: 9%; height: 26%; border-radius: 50%;
  background: linear-gradient(180deg, rgba(255,255,255,.75), rgba(255,255,255,0)); pointer-events: none; }
.gum-pic .gum-shake:active { transform: scale(.92, .82) translateY(5px); box-shadow: 0 1px 0 #6e0b12, 0 2px 4px rgba(40,0,10,.45), inset 0 3px 3px rgba(255,255,255,.3), inset 0 -2px 4px rgba(80,0,10,.35); }
.gum-pic .gum-shake b { display: block; font: 800 25px/1 var(--font); letter-spacing: .5px; color: #fff15a;
  text-shadow: -1.5px -1.5px 0 #7a1420, 1.5px -1.5px 0 #7a1420, -1.5px 1.5px 0 #7a1420, 1.5px 1.5px 0 #7a1420, 0 3px 0 #7a1420, 0 0 10px rgba(255,240,120,.8); transform: translateY(1px); }
.gum-pic .gum-shake.ready { animation: shake-pulse 1.1s ease-in-out infinite; }
@keyframes shake-pulse { 50% { filter: brightness(1.18) drop-shadow(0 0 10px rgba(255,120,120,.9)); } }
.gum-ball-out { border: 0; padding: 0; background: none; cursor: pointer; pointer-events: auto; touch-action: none; }
.gum-ball-out img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.gum-ball-out span { position: relative; color: #fff; font: 800 30px/1 var(--font); text-shadow: 0 2px 0 #7a3a00, 0 0 6px rgba(0,0,0,.6); }
.gum-ball-out.gold { filter: drop-shadow(0 0 14px #ffd23f) drop-shadow(0 0 4px #fff); }
.gum-ball-out.cracked img { filter: grayscale(1) brightness(.75); }
.gum-ball-out.gold img { filter: brightness(1.12) saturate(1.15); }
.gum-ball-out.cracked::after { content: ""; position: absolute; inset: 10%; background: linear-gradient(60deg, transparent 46%, #2b2b38 47%, #2b2b38 51%, transparent 52%), linear-gradient(-30deg, transparent 47%, #2b2b38 48%, #2b2b38 51%, transparent 52%); }
.scene-ring { z-index: 2; pointer-events: none; opacity: 0; transform: rotate(-90deg); transition: opacity .15s; }
.scene-ring.on { opacity: 1; }
.scene-ring svg { width: 100%; height: 100%; }
.scene-ring .track { fill: rgba(255,255,255,.08); stroke: rgba(255,255,255,.35); stroke-width: 6; }
.scene-ring .fill { fill: none; stroke: #ffd23f; stroke-width: 6; stroke-linecap: round; filter: drop-shadow(0 0 6px #ffd23f); }
.scene-ring.good .fill { stroke: var(--mint); filter: drop-shadow(0 0 8px var(--mint)); }
.rocket-pic.holding img { animation: lr-rumble .08s linear infinite; }
.rocket-pic.bad img { filter: grayscale(.6) brightness(.8); }
.scene-flame { position: absolute; left: 50%; top: 88%; width: 44%; height: 70%; transform: translateX(-50%); opacity: 0; z-index: -1; pointer-events: none; }
.scene-flame svg { width: 100%; height: 100%; display: block; transform-origin: 50% 0; animation: rk-flicker .18s ease-in-out infinite alternate; }
.rocket-pic.lit .scene-flame { opacity: 1; }
/* ---- Meteor Blaster bullets ------------------------------------------------- */
.cannon { transform-origin: 50% 100%; }
.bullet { width: 8px; height: 22px; margin: -11px 0 0 -4px; border-radius: 6px; z-index: 7; pointer-events: none;
  background: linear-gradient(180deg, #fff 0%, #fff6c8 30%, #ffc83d 65%, rgba(255,94,58,0) 100%);
  box-shadow: 0 0 8px #ffc83d, 0 0 16px rgba(255,200,61,.6); }
/* ---- Hold to Launch --------------------------------------------------------- */
.moon-ground { width: 100%; height: 200px; left: 0 !important; border-radius: 50% 50% 0 0 / 40px 40px 0 0;
  background: radial-gradient(ellipse 40px 14px at 20% 40%, rgba(60,40,120,.35) 98%, transparent),
              radial-gradient(ellipse 30px 10px at 78% 62%, rgba(60,40,120,.35) 98%, transparent),
              radial-gradient(ellipse 22px 8px at 52% 80%, rgba(60,40,120,.3) 98%, transparent),
              linear-gradient(180deg, #b9aef0, #8f80d8 40%, #6b5bc0); box-shadow: 0 -6px 24px rgba(160,140,255,.35); }
.hold-title { margin-left: -130px; width: 260px; text-align: center; font: 800 28px/1 var(--font); color: #fff; letter-spacing: 1px;
  text-shadow: 0 3px 0 #3b2a86, 0 0 14px rgba(120,90,255,.8); transition: opacity .3s, transform .3s; pointer-events: none; }
.hold-title b { display: block; font-size: 46px; color: #ffd23f; text-shadow: 0 4px 0 #b06a00, 0 0 16px rgba(255,200,60,.7); }
.hold-title.gone { opacity: 0; transform: scale(.85); }
.lrocket { width: 104px; height: 210px; margin: -150px 0 0 -52px; border: 0; padding: 0; background: none; cursor: pointer;
  touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.lrocket:focus-visible { outline: 3px solid #ffd23f; outline-offset: 4px; border-radius: 16px; }
.lr-body { position: absolute; left: 4px; top: -8px; width: 96px; height: 168px; z-index: 2; }
.lr-body svg { width: 100%; height: 100%; display: block; }
.lr-ring { position: absolute; left: 2px; top: 4px; width: 100px; height: 100px; transform: rotate(-90deg); z-index: 3; pointer-events: none; opacity: 0; transition: opacity .15s; }
.lrocket.holding .lr-ring, .lrocket.good .lr-ring { opacity: 1; }
.lr-ring .track { fill: none; stroke: rgba(255,255,255,.25); stroke-width: 7; }
.lr-ring .fill { fill: none; stroke: #ffd23f; stroke-width: 7; stroke-linecap: round; filter: drop-shadow(0 0 6px #ffd23f); }
.lrocket.holding .lr-body { animation: lr-rumble .08s linear infinite; }
@keyframes lr-rumble { 0% { transform: translateX(-1px); } 50% { transform: translateX(1px); } 100% { transform: translateX(-1px); } }
.lr-pad { position: absolute; left: 10px; top: 100px; width: 84px; height: 22px; border-radius: 50%; z-index: 1;
  background: radial-gradient(ellipse at 50% 40%, #6fe8ff, #2a7bd6 55%, #1d2a6b); box-shadow: 0 0 16px rgba(95,208,255,.7); }
.lrocket .sign { position: absolute; left: 50%; top: 134px; transform: translateX(-50%); min-width: 78px; padding: 6px 12px; z-index: 4;
  background: #fffdf6; color: #1b1747; border: 3px solid #ffc83d; border-radius: 14px; box-shadow: 0 5px 0 #b98a1e; font: 800 30px/1.1 var(--font); }
.lrocket.good .sign { background: var(--mint); color: #fff; border-color: #fff; box-shadow: 0 5px 0 #1f9c70; }
.lrocket.good .lr-ring .fill { stroke: var(--mint); filter: drop-shadow(0 0 8px var(--mint)); }
.lrocket.bad .sign { background: #ffd0d0; border-color: #ff6b6b; box-shadow: 0 5px 0 #c0392b; }
.lrocket.bad .lr-body { filter: grayscale(.6) brightness(.8); }
.lr-smoke { width: 120px; height: 70px; margin: 0; border-radius: 50%; z-index: 1; pointer-events: none;
  background: radial-gradient(ellipse, rgba(255,255,255,.95), rgba(220,215,255,.6) 55%, transparent 72%); }
.lr-smoke.grey { background: radial-gradient(ellipse, rgba(120,120,130,.9), rgba(90,90,100,.5) 55%, transparent 72%); }
.lineup .lrocket-icon svg { width: 42px; height: 42px; }
/* the painted rocket's flame flickers */
.rk-flame { transform-box: fill-box; transform-origin: 50% 0; animation: rk-flicker .18s ease-in-out infinite alternate; }
@keyframes rk-flicker { from { transform: scaleY(.85) scaleX(1.05); opacity: .9; } to { transform: scaleY(1.1) scaleX(.95); opacity: 1; } }
/* sparkling four-point stars over the background picture */
.sparkle { position: absolute; --c: #fff; opacity: 0; transform: translate(-50%, -50%) scale(.2);
  animation: sparkle var(--d, 3s) ease-in-out infinite; filter: drop-shadow(0 0 4px var(--c)) drop-shadow(0 0 9px var(--c)); }
.sparkle::before, .sparkle::after { content: ""; position: absolute; left: 50%; top: 50%; background: var(--c);
  border-radius: 50%; transform: translate(-50%, -50%); }
.sparkle::before { width: 100%; height: 14%; clip-path: polygon(0 50%, 50% 0, 100% 50%, 50% 100%); border-radius: 0; height: 22%; }
.sparkle::after { width: 22%; height: 100%; clip-path: polygon(0 50%, 50% 0, 100% 50%, 50% 100%); border-radius: 0; }
@keyframes sparkle {
  0%, 35%, 100% { opacity: 0; transform: translate(-50%, -50%) scale(.2) rotate(0deg); }
  55% { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(25deg); }
  65% { opacity: .75; transform: translate(-50%, -50%) scale(.7) rotate(35deg); }
  75% { opacity: 1; transform: translate(-50%, -50%) scale(.95) rotate(45deg); }
}
@media (prefers-reduced-motion: reduce) { .sparkle { animation: none; opacity: .6; transform: translate(-50%, -50%) scale(.6); } }

/* ---- living background (ambient.js) ------------------------------------ */

.ambient { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.ambient > * { position: absolute; left: 0; top: 0; }
.rim-planet { width: 300px; height: 300px; margin: -150px 0 0 -150px; animation: breathe 9s ease-in-out infinite; }
.rim-planet svg { width: 100%; height: 100%; }
@keyframes breathe { 50% { opacity: .75; transform: scale(1.02); } }
.flare {
  width: 240px; height: 3px; margin: -1.5px 0 0 -120px; border-radius: 2px;
  background: linear-gradient(90deg, transparent, rgba(255,236,200,.9) 50%, transparent);
  animation: flare 5s ease-in-out infinite;
}
.flare::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px;
  border-radius: 50%; background: #fff; box-shadow: 0 0 14px 6px rgba(255,220,170,.8);
}
@keyframes flare { 0%, 100% { opacity: .35; transform: scaleX(.6); } 50% { opacity: 1; transform: scaleX(1.15); } }
.dust { width: 2px; height: 2px; border-radius: 50%; background: #d8d0ff; animation: dust linear infinite; }
@keyframes dust { to { transform: translateX(var(--dx)); } }
.drift-rock svg, .far-saucer svg { width: 100%; height: 100%; display: block; }
.far-saucer { width: 44px; height: 30px; }
.shoot {
  height: 2px; transform-origin: 0 50%; border-radius: 2px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.95));
  box-shadow: 0 0 6px rgba(255,240,200,.8);
}
.glint { width: 18px; height: 18px; margin: -9px 0 0 -9px; }
.glint::before, .glint::after {
  content: ""; position: absolute; left: 50%; top: 0; width: 2px; height: 100%; margin-left: -1px;
  background: linear-gradient(180deg, transparent, #fff, transparent);
}
.glint::after { transform: rotate(90deg); }

.layer { position: absolute; inset: 0; }
.layer > * { position: absolute; }

/* ---- HUD ------------------------------------------------------------- */

.hud {
  position: absolute; top: 0; left: 0; right: 0; height: 52px; z-index: 20;
  display: flex; align-items: center; gap: 10px; padding: 0 12px;
}
.hud[hidden] { display: none; }
.shields { display: flex; gap: 4px; }
.shields svg { width: 24px; height: 28px; transition: opacity .3s, transform .3s; }
.shields svg.lost { opacity: .2; transform: scale(.8); }
.score { margin-left: auto; font-size: 24px; font-weight: 800; min-width: 60px; text-align: right; }
.boost {
  font-size: 15px; font-weight: 800; color: var(--ink); background: var(--gold);
  border-radius: 999px; padding: 2px 10px 0; opacity: 0; transform: scale(.6); transition: .25s;
}
.boost.on { opacity: 1; transform: scale(1); }
.icon-btn {
  width: 36px; height: 36px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255,255,255,.12); color: #fff; font-size: 17px; line-height: 36px; padding: 0;
}

/* Exit button (last in the top bar) and its "are you sure?" box */
.icon-btn.exit-btn { order: 9; background: #e8413c; font-weight: 800; box-shadow: 0 3px 0 #9c2420; }
.exit-ask { position: absolute; inset: 0; z-index: 60; display: grid; place-items: center; padding: 20px; background: rgba(10,8,40,.7); }
.exit-card { width: 100%; max-width: 320px; background: #fff; color: #1b1747; border-radius: 24px; padding: 22px 20px 18px; text-align: center;
  box-shadow: 0 16px 40px rgba(0,0,0,.45); animation: exit-pop .3s cubic-bezier(.34,1.56,.64,1); }
.exit-card h2 { margin: 0 0 8px; font-size: 22px; line-height: 1.2; }
.exit-card p { margin: 0 0 16px; font-size: 15px; opacity: .75; }
.exit-row { display: grid; gap: 10px; }
.exit-row .btn { width: 100%; margin: 0; font-size: 19px; }
.exit-row .exit-go { background: #e8413c; color: #fff; box-shadow: 0 5px 0 #9c2420; }
@keyframes exit-pop { from { transform: scale(.7); opacity: 0; } }
/* ---- shared pieces --------------------------------------------------- */

.qcard {
  left: 45px; top: 62px; width: 300px; z-index: 10; padding: 0 12px;
  background: var(--card); color: var(--ink); border-radius: 22px;
  font-size: 42px; font-weight: 800; text-align: center; line-height: 1.05; height: 64px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 0 #c9b98f, 0 12px 24px rgba(0,0,0,.35);
}

/* stacked fractions in questions and answers */
.frac { display: inline-flex; flex-direction: column; vertical-align: middle; text-align: center; font-size: .6em; line-height: 1; margin: 0 .08em; }
.frac i { font-style: normal; padding: 0 .1em; }
.frac i:first-child { border-bottom: .09em solid currentColor; }
.ans { display: block; transform-origin: center; white-space: nowrap; }
.ans.s2 { transform: scale(.78); }
.ans.s3 { transform: scale(.58); }
.ans.s4 { transform: scale(.44); white-space: normal; line-height: 1.1; }
.progress { left: 0; right: 0; top: 140px; display: flex; justify-content: center; gap: 8px; z-index: 10; }
.progress i { width: 12px; height: 12px; border-radius: 50%; background: rgba(255,255,255,.22); transition: .3s; }
.progress i.done { background: var(--gold); }
.progress i.now { box-shadow: 0 0 0 2px #fff; }

.btn {
  font-size: 26px; font-weight: 800; color: var(--ink); background: var(--gold);
  border: 0; border-radius: 999px; padding: 12px 38px 8px; cursor: pointer;
  box-shadow: 0 6px 0 var(--gold-dark); transition: transform .1s, box-shadow .1s;
}
.btn:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--gold-dark); }
.btn.ghost { background: rgba(255,255,255,.14); color: #fff; box-shadow: inset 0 0 0 2px rgba(255,255,255,.4); font-size: 20px; }

.spark { position: absolute; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%; z-index: 15; pointer-events: none; }
.float-text {
  position: absolute; z-index: 16; pointer-events: none; transform: translateX(-50%);
  font-size: 26px; font-weight: 800; white-space: nowrap; text-shadow: 0 2px 0 rgba(0,0,0,.4);
}
.float-text.good { color: var(--gold); }
.float-text.bad { color: #ffd0d0; font-size: 22px; }
.laser {
  position: absolute; height: 5px; margin-top: -2.5px; transform-origin: 0 50%; z-index: 9; pointer-events: none;
  border-radius: 3px; background: linear-gradient(90deg, #fff, var(--sky)); box-shadow: 0 0 12px var(--sky);
}

/* ---- screens --------------------------------------------------------- */

.screen {
  inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 0 28px; gap: 10px;
}
.screen h1 { margin: 0; font-size: 46px; line-height: .95; font-weight: 800; }
.screen h1 b { display: block; font-size: 64px; color: var(--gold); }
.screen h1.custom-title { font-size: 40px; line-height: 1.05; color: var(--gold); overflow-wrap: anywhere; }
.screen h2 { margin: 0; font-size: 34px; font-weight: 800; }
.screen p { margin: 0; font-size: 18px; color: #dcd6ff; line-height: 1.35; }
.screen .brand { position: absolute; bottom: 22px; left: 0; right: 0; font-size: 14px; color: var(--gold); opacity: .85; }
.title-rocket { width: 110px; height: 190px; animation: hover 3s ease-in-out infinite; }
.title-rocket svg { width: 100%; height: 100%; }
@keyframes hover { 50% { transform: translateY(-14px); } }
.screen .btn { margin-top: 14px; }

.round-big { font-size: 72px !important; color: var(--gold); line-height: 1 !important; }
.lineup { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; width: 100%; }
.lineup div {
  display: flex; align-items: center; gap: 12px; background: rgba(255,255,255,.08);
  border-radius: 16px; padding: 8px 14px; font-size: 20px; font-weight: 700; text-align: left;
}
.lineup svg { width: 42px; height: 42px; flex: none; }

.banner {
  left: 20px; right: 20px; top: 50%; transform: translateY(-50%); z-index: 30;
  background: var(--card); color: var(--ink); border-radius: 26px; padding: 22px 20px 20px; text-align: center;
  box-shadow: 0 10px 0 #c9b98f, 0 20px 40px rgba(0,0,0,.5);
}
.banner h2 { margin: 0 0 4px; font-size: 32px; font-weight: 800; color: #5b3fd9; }
.banner p { margin: 0; font-size: 18px; line-height: 1.3; }

.found-planet { width: 170px; height: 170px; animation: spin-in .9s cubic-bezier(.34,1.56,.64,1); }
.found-planet svg { width: 100%; height: 100%; }
.found-row { display: flex; align-items: flex-end; justify-content: center; gap: 4px; }
.found-row .found-planet { width: 150px; height: 150px; }
.cheer-astro { width: 96px; height: auto; margin-bottom: -6px; filter: drop-shadow(0 6px 10px rgba(0,0,0,.35));
  animation: cheer-pop .7s .5s cubic-bezier(.34,1.56,.64,1) backwards, cheer-bob 2.4s 1.2s ease-in-out infinite; }
@keyframes cheer-pop { from { opacity: 0; transform: translateY(30px) scale(.6); } }
@keyframes cheer-bob { 50% { transform: translateY(-6px) rotate(-3deg); } }
@keyframes spin-in { from { transform: scale(0) rotate(-90deg); } }
.planet-name { font-size: 30px; font-weight: 800; color: var(--gold); }
.shelf { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; margin-top: 6px; max-width: 300px; }
.shelf svg { width: 34px; height: 34px; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; margin: 10px 0 4px; }
.stats div { background: rgba(255,255,255,.08); border-radius: 16px; padding: 10px 6px 6px; }
.stats b { display: block; font-size: 30px; line-height: 1; }
.stats span { font-size: 14px; color: #bfb6ff; }
.new-best { color: var(--ink); background: var(--gold); border-radius: 999px; padding: 2px 14px 0; font-weight: 800; animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.08); } }
.lesson-link { color: #bfb6ff; font-size: 16px; font-weight: 700; margin-top: 6px; }

/* ---- Meteor Blaster -------------------------------------------------- */

.surface {
  left: -60px; right: -60px; height: 220px; border-radius: 50% 50% 0 0 / 60px 60px 0 0;
  background: radial-gradient(circle at 30% 30%, #4a3a9a, #2a1f66 70%);
  box-shadow: inset 0 8px 0 rgba(255,255,255,.08);
}
.surface::before, .surface::after {
  content: ""; position: absolute; border-radius: 50%; background: rgba(0,0,0,.18);
}
.surface::before { width: 60px; height: 18px; left: 90px; top: 60px; }
.surface::after { width: 40px; height: 12px; right: 110px; top: 100px; }
.shield {
  left: 0; right: 0; height: 14px; margin-top: -7px; z-index: 5; pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(95,208,255,.55) 50%, transparent);
  box-shadow: 0 0 18px rgba(95,208,255,.6);
}
.shield.hit { animation: shield-hit .5s; }
@keyframes shield-hit { 30% { background: linear-gradient(180deg, transparent, rgba(255,107,107,.9) 50%, transparent); } }
.cannon { width: 64px; height: 112px; margin: -112px 0 0 -32px; z-index: 6; }
.cannon svg { width: 100%; height: 100%; }

.meteor {
  width: 92px; height: 92px; margin: -46px 0 0 -46px; padding: 0; border: 0; background: none;
  cursor: pointer; z-index: 7;
}
.meteor svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.meteor > span {
  position: absolute; left: 0; right: 0; top: 34px; font-size: 32px; font-weight: 800; color: #fff; line-height: 1;
  text-shadow: 0 2px 0 #3a2410, 0 0 6px #000, 0 0 2px #000;
}
.meteor.bad svg { filter: sepia(1) saturate(4) hue-rotate(-30deg); }
.meteor.good { filter: drop-shadow(0 0 14px var(--mint)); }

/* ---- Planet Hop ------------------------------------------------------ */

.world { inset: 0; }
.world > * { position: absolute; }
.planet {
  width: 110px; height: 110px; margin: -55px 0 0 -55px; padding: 0; border: 0; background: none; cursor: pointer;
}
.planet .bob { position: absolute; inset: 0; animation: bob 2.6s ease-in-out infinite; }
.planet .bob svg { width: 100%; height: 100%; }
.planet > span {
  position: absolute; left: 0; right: 0; top: 36px; font-size: 34px; font-weight: 800; color: #fff; line-height: 1;
  text-shadow: 0 2px 0 rgba(0,0,0,.45), 0 0 8px rgba(0,0,0,.5);
}
.planet.bad .bob { filter: grayscale(1) brightness(.7); }
.planet.good .bob { filter: drop-shadow(0 0 16px var(--mint)); }
.planet.base { cursor: default; }
@keyframes bob { 50% { transform: translateY(-8px); } }
.astro { width: 54px; height: 72px; margin: -72px 0 0 -27px; z-index: 8; pointer-events: none; }
.astro svg { width: 100%; height: 100%; }
.station { width: 170px; height: 96px; margin: -48px 0 0 -85px; }
.station svg { width: 100%; height: 100%; }

/* ---- Docking Bay ----------------------------------------------------- */

.ship { width: 120px; height: 80px; margin: -40px 0 0 -60px; z-index: 8; pointer-events: none; }
.ship .bob { width: 100%; height: 100%; animation: bob 2s ease-in-out infinite; }
.ship svg { width: 100%; height: 100%; }
.beam {
  width: 90px; height: 0; margin-left: -45px; z-index: 4; pointer-events: none;
  background: linear-gradient(180deg, rgba(255,200,61,.35), transparent);
  clip-path: polygon(35% 0, 65% 0, 100% 100%, 0 100%);
}
/* UFO Beam-Up critters: a bouncing character with its answer on a sign */
.critter {
  width: 84px; height: 118px; margin: -59px 0 0 -42px; padding: 0; border: 0; background: none; cursor: pointer; z-index: 6;
  -webkit-tap-highlight-color: transparent;
}
.critter .hop { position: absolute; left: 4px; top: 0; width: 76px; height: 76px; animation: critter-hop 1.6s ease-in-out infinite; animation-delay: var(--d, 0s); transform-origin: 50% 100%; }
.critter svg { width: 100%; height: 100%; display: block; overflow: visible; }
.critter .sign {
  position: absolute; left: 6px; right: 6px; bottom: 0; height: 40px; display: flex; align-items: center; justify-content: center;
  background: #fffaf0; border: 3px solid #fff; border-radius: 14px; box-shadow: 0 4px 0 #c9b98f;
  color: var(--ink, #1b1747);
}
.critter .sign > span { font-size: 28px; font-weight: 800; line-height: 1; }
.critter:active .hop { transform: scale(.92); }
.critter.lifted .hop { animation: none; }
.critter.lifted { filter: drop-shadow(0 0 12px rgba(255,200,61,.9)); z-index: 7; }
.critter.good { filter: drop-shadow(0 0 14px var(--mint)); }
.critter.good .sign { background: var(--mint); color: #fff; box-shadow: 0 4px 0 #1f9c70; }
.critter.bad .sign { background: var(--coral); color: #fff; box-shadow: 0 4px 0 #c94a4a; }
.critter.bad .hop { filter: grayscale(.6); }
@keyframes critter-hop {
  0%, 100% { transform: translateY(0) scale(1, 1); }
  15% { transform: translateY(0) scale(1.08, .9); }
  40% { transform: translateY(-12px) scale(.96, 1.05); }
  65% { transform: translateY(0) scale(1.05, .94); }
}
.port {
  width: 84px; height: 104px; margin: -52px 0 0 -42px; padding: 0; border: 0; background: none; cursor: pointer; z-index: 6;
}
.port svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.port > span {
  position: absolute; left: 0; right: 0; top: 46px; font-size: 34px; font-weight: 800; color: #fff; line-height: 1;
  text-shadow: 0 2px 0 rgba(0,0,0,.5);
}
.port.good .light { fill: var(--mint); }
.port.bad .light { fill: var(--coral); }
.port.good { filter: drop-shadow(0 0 14px var(--mint)); }
/* ---- Star Express ---------------------------------------------------- */

.rails {
  left: 0; right: 0; height: 16px; margin-top: -2px;
  border-top: 4px solid #c9c3e8; border-bottom: 4px solid #c9c3e8;
  background: repeating-linear-gradient(90deg, #6b5cc0 0 8px, transparent 8px 30px);
}
.rails.moving { animation: rails .3s linear infinite; }
@keyframes rails { to { background-position-x: -30px; } }
.train { display: flex; flex-direction: row-reverse; align-items: flex-end; gap: 2px; z-index: 6; }
.loco { width: 104px; height: 80px; flex: none; }
.loco svg, .car svg { width: 100%; height: 100%; display: block; }
.car { position: relative; width: 72px; height: 62px; flex: none; margin-bottom: 4px; }
.car > span { position: absolute; left: 0; right: 4px; top: 12px; text-align: center; font-size: 24px; font-weight: 800; color: #fff; }
.car.faded { opacity: .5; }
.puff { width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; background: rgba(255,255,255,.7); z-index: 7; pointer-events: none; }
.step-sign {
  transform: translateX(-50%); padding: 4px 16px 2px; border-radius: 12px; font-size: 18px; font-weight: 800;
  background: rgba(255,255,255,.12); color: var(--gold); white-space: nowrap;
}
.ticket, .pad {
  width: 100px; height: 74px; margin: -37px 0 0 -50px; padding: 0; cursor: pointer; z-index: 8;
  border: 3px dashed #c9b98f; border-radius: 18px; background: var(--card); color: var(--ink);
  box-shadow: 0 5px 0 #c9b98f; font-size: 34px; font-weight: 800;
}
.pad { border-style: solid; border-color: #fff; background: #ffe9b8; box-shadow: 0 5px 0 #c99a1a; }
.ticket.good, .pad.good { background: var(--mint); color: #fff; border-color: #fff; box-shadow: 0 5px 0 #1f9c70; }
.ticket.bad, .pad.bad { background: var(--coral); color: #fff; border-color: #fff; box-shadow: 0 5px 0 #c94a4a; }

/* ---- Starburst Show -------------------------------------------------- */

.hills {
  left: -40px; right: -40px; height: 160px; border-radius: 50% 50% 0 0 / 50px 50px 0 0;
  background: linear-gradient(180deg, #2a1f66, #150f3f);
}
.shell { width: 8px; height: 22px; margin: -11px 0 0 -4px; border-radius: 4px; z-index: 6;
  background: linear-gradient(0deg, transparent, #ffc83d); box-shadow: 0 0 10px #ffc83d; }
.burst { width: 124px; height: 124px; margin: -62px 0 0 -62px; padding: 0; border: 0; background: none; cursor: pointer; z-index: 7; }
.burst svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.burst .rays { transform-origin: center; animation: spin 6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.burst > span { position: absolute; left: 0; right: 0; top: 44px; font-size: 32px; font-weight: 800; color: #fff; line-height: 1; text-shadow: 0 2px 0 rgba(0,0,0,.4); }
.burst.bad svg { filter: grayscale(1) brightness(.6); }

/* ---- Mirror Planets -------------------------------------------------- */

.planet.home { width: 130px; height: 130px; margin: -65px 0 0 -65px; cursor: default; }
.planet.home > span { top: 46px; }
.mirror-line {
  width: 4px; height: 140px; margin-left: -2px; border-radius: 2px; transform-origin: top; z-index: 3; pointer-events: none;
  background: linear-gradient(180deg, transparent, #fff 20%, #8fe3ff 50%, #fff 80%, transparent); box-shadow: 0 0 14px #8fe3ff;
}
.mirror-eq {
  width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%; z-index: 5; text-align: center;
  font-size: 40px; font-weight: 800; line-height: 52px; background: var(--card); color: var(--ink); box-shadow: 0 4px 0 #c9b98f;
}
.dot-array { transform: translate(-50%, -50%); z-index: 4; padding: 7px; line-height: 0; border-radius: 14px; background: rgba(12,10,40,.55); pointer-events: none; }
.dot-array svg { display: block; fill: var(--gold); }
.dot-array.twin svg { fill: var(--sky); }
.array-label { transform: translateX(-50%); z-index: 4; font-size: 18px; font-weight: 800; white-space: nowrap; text-shadow: 0 2px 4px rgba(0,0,0,.75); }

/* ---- Fact Family Rocket ---------------------------------------------- */

.fam-rocket { width: 250px; transform: translateX(-50%); z-index: 5; pointer-events: none; }
.fam-nose svg { display: block; width: 100%; height: auto; margin-bottom: -5px; position: relative; z-index: 2; }
.fam-body {
  position: relative; z-index: 2; margin: 0 7px; padding: 10px; display: flex; flex-direction: column; gap: 8px;
  background: #f4f1ff; border: 4px solid var(--ink); border-top: 0; border-radius: 0 0 26px 26px;
}
.fam-slot {
  height: 50px; display: flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 16px; border: 3px solid #4b43a3; background: var(--ink); color: #9d95d6;
  font-size: 26px; font-weight: 800; transition: border-color .3s, color .3s;
}
.fam-slot .blank { min-width: 50px; height: 38px; padding: 0 4px; border-radius: 10px; line-height: 42px; text-align: center; color: #fff; background: rgba(255,255,255,.08); }
.fam-slot.now { color: #fff; border-color: var(--gold); box-shadow: 0 0 14px rgba(255,200,61,.7); }
.fam-slot.now .blank { color: var(--ink); background: var(--gold); animation: pulse 1s ease-in-out infinite; }
.fam-slot.good, .fam-slot.fixed { color: #fff; }
.fam-slot.good { border-color: var(--mint); }
.fam-slot.good .blank { background: var(--mint); }
.fam-slot.fixed { border-color: var(--coral); }
.fam-slot.fixed .blank { background: var(--coral); }
.fam-rocket.lit .fam-slot { box-shadow: 0 0 16px rgba(47,211,154,.8); }
.fam-fin { position: absolute; bottom: -16px; width: 48px; height: 84px; z-index: 1; }
.fam-fin.left { left: -22px; }
.fam-fin.right { right: -22px; }
.fam-fin svg, .fam-flame svg { width: 100%; height: 100%; display: block; }
.fam-flame { position: absolute; left: 50%; bottom: -84px; width: 84px; height: 90px; margin-left: -42px; z-index: 0; opacity: 0; transform-origin: top; }
.fam-rocket.lit .fam-flame { opacity: 1; animation: flicker .12s ease-in-out infinite alternate; }
@keyframes flicker { to { transform: scaleY(1.18); } }

/* ---- Cosmic Catch ---------------------------------------------------- */

.nebula {
  inset: 0; pointer-events: none;
  background: radial-gradient(220px 160px at 30% 70%, rgba(47,211,154,.16), transparent 70%),
              radial-gradient(200px 160px at 75% 55%, rgba(95,208,255,.14), transparent 70%);
}
.tractor {
  width: 90px; height: 0; margin-left: -45px; z-index: 5; pointer-events: none; opacity: 0;
  background: linear-gradient(180deg, rgba(255,200,61,.65), rgba(255,200,61,.08));
  clip-path: polygon(38% 0, 62% 0, 100% 100%, 0 100%); transition: opacity .2s;
}
.tractor.on { opacity: 1; }
.jelly { width: 80px; height: 88px; margin: -44px 0 0 -40px; padding: 0; border: 0; background: none; cursor: pointer; z-index: 6; }
.jelly .bob { position: absolute; inset: 0; animation: bob 2.2s ease-in-out infinite; transform: rotate(var(--tilt, 0deg)); }
.jelly svg { width: 100%; height: 100%; }
.jelly > span { position: absolute; left: 0; right: 0; top: 12px; font-size: 26px; font-weight: 800; color: #fff; line-height: 1; text-shadow: 0 2px 0 rgba(0,0,0,.45); }
.jelly .tent { animation: sway 1.4s ease-in-out infinite alternate; transform-origin: top; }
.jelly .t1, .jelly .t3 { animation-delay: -.7s; }
@keyframes sway { to { transform: skewX(12deg); } }
.jelly.bad .bob { filter: grayscale(1) brightness(.7); }
.jelly.good { filter: drop-shadow(0 0 14px var(--mint)); }

/* ---- Robot Rumble ---------------------------------------------------- */

.ring {
  left: 10px; right: 10px; height: 70px; border-radius: 12px;
  background: linear-gradient(180deg, #3a3480, #241e5c);
  box-shadow: 0 -10px 0 -4px #ff6b6b, 0 -22px 0 -8px #ffc83d;
}
.robot { width: 126px; height: 128px; margin: -64px 0 0 -63px; z-index: 6; pointer-events: none; }
.robot svg { width: 100%; height: 100%; }
.robot.alien svg { transform: scaleX(-1); }
.robot.hit svg { filter: brightness(1.8) saturate(.4); }
.hp { left: 40px; right: 40px; top: 140px; display: flex; align-items: center; gap: 6px; z-index: 10; }
.hp b { font-size: 14px; color: #ffd0d0; margin-right: 4px; }
.hp i { flex: 1; height: 14px; border-radius: 7px; background: var(--coral); transition: .3s; }
.hp i.gone { background: rgba(255,255,255,.15); }
.charge { width: 100px; height: 10px; margin-left: -50px; border-radius: 5px; background: rgba(255,255,255,.15); overflow: hidden; z-index: 7; }
.charge i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--gold), var(--coral)); }
.ko { font-size: 64px; font-weight: 800; color: var(--gold); text-shadow: 0 4px 0 #c94a4a; z-index: 12; transform: translateX(-50%); }

/* ---- Spin the Wheel (mission key 'rumble') ----------------------------- */
/* the finished wheel game (/play/wheel/) runs in this frame under the HUD */
.wheel-frame { left: 0; top: 52px; width: 100%; height: calc(100% - 52px); border: 0; z-index: 15; background: transparent; }
.wheel { width: 300px; height: 300px; margin: -150px 0 0 -150px; z-index: 6; filter: drop-shadow(0 8px 14px rgba(0,0,0,.4)); }
.wheel svg { width: 100%; height: 100%; overflow: visible; }
.wheel .hub { cursor: pointer; }
.wheel .hub.ready .hubdisc { animation: hubpulse .9s ease-in-out infinite alternate; }
.wheel .hub.busy { cursor: default; }
.wheel .hub.busy text { opacity: .35; }
@keyframes hubpulse { from { stroke: #ffc83d; stroke-width: 7; } to { stroke: #ff8a3d; stroke-width: 14; } }
.wheel .target { animation: holepulse .8s ease-in-out infinite alternate; }
.wheel .porthole { filter: drop-shadow(0 0 6px rgba(95,208,255,.8)); }
.wheel .wh-light { animation: whblink 1.4s ease-in-out infinite alternate; }
.wheel .wh-light.b { animation-delay: -.7s; }
@keyframes whblink { from { opacity: .35; } to { opacity: 1; } }
@keyframes holepulse { from { stroke: #ffc83d; stroke-width: 5; } to { stroke: #fff; stroke-width: 10; } }
.wheel-pointer { width: 40px; height: 46px; margin: -23px 0 0 -20px; z-index: 8; filter: drop-shadow(0 3px 2px rgba(0,0,0,.45)); pointer-events: none; }
.wheel-pointer svg { width: 100%; height: 100%; }
.wheel-timer { width: 52px; height: 52px; margin: -26px 0 0 -26px; z-index: 9; }
.wheel-timer[hidden] { display: none; }
.wheel-timer svg { width: 100%; height: 100%; }
.wheel-timer text { font-size: 24px; font-weight: 800; fill: #fff; }
.wheel-clue { transform: translateX(-50%); width: 340px; text-align: center; font-size: 18px; font-weight: 800; color: #fff3b0;
  text-shadow: 0 2px 0 rgba(0,0,0,.4); z-index: 9; line-height: 1.15; }
.wheel-tally { transform: translateX(-50%); font-size: 18px; letter-spacing: 4px; color: var(--gold); z-index: 9; }

.deck {
  left: -20px; right: -20px; height: 120px; border-radius: 18px 18px 0 0;
  background: linear-gradient(180deg, #3a3480, #241e5c);
  box-shadow: inset 0 6px 0 rgba(255,255,255,.08);
}

/* ---- student login: who is playing, and whether the score was saved ---- */
.screen .player { font-size: 15px; font-weight: 700; color: #ffd76a; margin-top: 4px; }
.screen .save-note { font-size: 14px; font-weight: 700; color: #cfc8ff; margin: 2px 0 6px; }
.screen .save-note.ok { color: #6ff0be; }
.screen .save-note.bad { color: #ff9b9b; }
.screen .save-note a { color: #ffd76a; }

/* ---- critters in every mission (pickup.js) ------------------------------ */
.pickup-ship { z-index: 12; }
.layer > .tractor { z-index: 9; }
.rider { position: absolute; width: 52px; height: 52px; left: 50%; top: -38px; margin-left: -26px; z-index: 2; pointer-events: none; }
.rider svg { width: 100%; height: 100%; display: block; overflow: visible; animation: critter-hop 1.6s ease-in-out infinite; animation-delay: var(--d, 0s); transform-origin: 50% 100%; }
.rider.lifted svg { animation: none; }
.rider.lifted { filter: drop-shadow(0 0 10px rgba(255,200,61,.9)); }
.car .rider { width: 40px; height: 40px; top: -30px; margin-left: -22px; }
.car .rider svg { animation-duration: 2.2s; }

/* Meteor Rescue: the critter sits on a falling meteor with a fiery tail */
.critter.on-meteor { height: 128px; margin-top: -74px; z-index: 6; }
.critter.on-meteor .ride { position: absolute; left: 50%; top: 30px; width: 70px; height: 70px; margin-left: -35px; z-index: -1; }
.critter.on-meteor .ride svg { width: 100%; height: 100%; }
.critter.on-meteor::before {
  content: ""; position: absolute; left: 50%; top: -40px; width: 34px; height: 90px; margin-left: -17px; z-index: -2;
  background: linear-gradient(0deg, rgba(255,140,60,.7), rgba(255,200,61,0)); border-radius: 50%; filter: blur(4px);
}
.critter.on-meteor .hop { top: -6px; }
.critter.on-meteor .sign { bottom: 0; }

/* Starburst: the critter pops out of the firework */
.critter.pop { position: absolute; left: 50%; top: 50%; z-index: 1; pointer-events: none; }
.burst.bad svg { filter: grayscale(1) brightness(.6); }

/* Cosmic Catch: critters drift in bubble helmets */
.critter.swim .hop::after {
  content: ""; position: absolute; inset: -6px; border-radius: 50%;
  background: radial-gradient(circle at 30% 28%, rgba(255,255,255,.55) 0 8%, rgba(255,255,255,.08) 9% 62%, rgba(143,227,255,.35) 63% 70%, transparent 71%);
  border: 2px solid rgba(255,255,255,.55);
}

/* ---- pastel cartoon-space theme (ambient.js sceneSVG) -------------------- */
.scene { position: absolute !important; inset: 0; }
.scene svg { width: 100%; height: 100%; display: block; }
.twinkle-star { transform-box: fill-box; transform-origin: center; animation: star-twinkle 2.6s ease-in-out infinite; }
@keyframes star-twinkle { 50% { transform: scale(.7) rotate(18deg); opacity: .7; } }
.dust { background: #fff; box-shadow: 0 0 4px #fff; }
.star { box-shadow: 0 0 3px #fff; }
.far-saucer { opacity: .8; }

/* text on the brighter sky gets a soft shadow; panels get a violet glass */
.screen h1, .screen h2, .screen p, .planet-name, .round-big, .score { text-shadow: 0 2px 0 rgba(59,42,134,.55), 0 0 12px rgba(59,42,134,.45); }
.screen p { color: #fff; }
.lineup div, .stats div { background: rgba(59,42,134,.55); box-shadow: inset 0 0 0 2px rgba(255,255,255,.18); }
.stats span { color: #f3e9ff; }
.lesson-link { color: #fff; text-shadow: 0 1px 0 rgba(59,42,134,.6); }
.progress i { background: rgba(255,255,255,.45); }
.icon-btn { background: rgba(59,42,134,.45); }

/* mission floors become sandy desert dunes */
.surface, .deck {
  background: linear-gradient(180deg, #ffd2a8 0%, #f4ad8b 55%, #e38f7e 100%);
  box-shadow: inset 0 6px 0 rgba(255,255,255,.35);
}
.surface::before, .surface::after { background: rgba(190,110,100,.3); }
.hills { background: linear-gradient(180deg, #e9a3c0, #c97ca8); box-shadow: inset 0 6px 0 rgba(255,255,255,.25); }
.ring { background: linear-gradient(180deg, #6a4fc4, #4b3596); }
.rails { border-color: #fff3e0; background: repeating-linear-gradient(90deg, #8a5fb8 0 8px, transparent 8px 30px); }
.step-sign { background: rgba(59,42,134,.55); }
.shield { background: linear-gradient(180deg, transparent, rgba(95,208,255,.7) 50%, transparent); }
/* the lower screen sits on sand: darker violet text there */
.screen .brand { color: #5b2fa8; opacity: 1; text-shadow: 0 1px 0 rgba(255,255,255,.6); font-weight: 800; }
.screen .player { color: #fff; background: rgba(59,42,134,.6); border-radius: 999px; padding: 3px 14px 1px; text-shadow: none; }
.screen .save-note { background: rgba(59,42,134,.6); border-radius: 12px; padding: 4px 12px 2px; text-shadow: none; }

/* title screen: big UFO, green beam, two aliens and the astronaut */
.title-scene { position: relative; width: 250px; height: 250px; margin-bottom: -6px; }
.title-scene > svg { width: 100%; height: 100%; overflow: visible; }
.title-scene .ufo-body { animation: ufo-hover 3s ease-in-out infinite; }
.title-scene .ufo-beam { animation: beam-glow 2.4s ease-in-out infinite; transform-origin: 50% 0; transform-box: fill-box; }
.title-scene .ufo-light, .ship .ufo-light, .far-saucer .ufo-light, .scene .ufo-light { animation: ufo-blink 1.2s steps(1) infinite; }
.ts-astro { position: absolute; right: -6px; bottom: 6px; width: 46px; height: 62px; animation: hover 3.4s ease-in-out infinite; }
.ts-astro svg { width: 100%; height: 100%; }
@keyframes ufo-hover { 50% { transform: translateY(-8px); } }
@keyframes beam-glow { 50% { opacity: .7; transform: scaleX(1.06); } }
@keyframes ufo-blink { 50% { fill: #fff; } }

/* the owner's monster sprites (img/aliens) in every answer slot */
.critter .hop img.sprite, .rider img.sprite {
  width: 100%; height: 100%; object-fit: contain; display: block; pointer-events: none;
  filter: drop-shadow(0 4px 4px rgba(20,10,50,.35));
}
.critter .hop { left: -2px; width: 88px; height: 82px; top: -6px; }
.rider img.sprite { animation: critter-hop 1.6s ease-in-out infinite; animation-delay: var(--d, 0s); transform-origin: 50% 100%; }
.rider.lifted img.sprite { animation: none; }
.critter.bad .hop img.sprite { filter: grayscale(.7) drop-shadow(0 4px 4px rgba(20,10,50,.35)); }

/* ---- the owner's background pictures (img/bg-play.*, img/bg-menu.*) ------ */
#stage.photo-bg { background: #0b0930 var(--bg-play) center / cover no-repeat; transition: background-image .4s; }
#stage.photo-bg.menu { background-image: var(--bg-menu); }
#stage.photo-bg .scene { display: none; }
#stage.photo-bg .drift-rock { display: none; }   /* the pictures already have their own asteroids */
/* mission floors become a soft dark glass so the picture shows through */
#stage.photo-bg .surface, #stage.photo-bg .deck, #stage.photo-bg .hills {
  background: linear-gradient(180deg, rgba(20,16,60,.15), rgba(10,8,30,.7)); box-shadow: inset 0 3px 0 rgba(255,255,255,.18);
}
#stage.photo-bg .surface::before, #stage.photo-bg .surface::after { background: rgba(255,255,255,.08); }
#stage.photo-bg .screen .brand { color: var(--gold); text-shadow: 0 1px 2px rgba(0,0,0,.7); }

/* ---- dark theme: drawn nebula (missions) + neon chalk (menus) ------------ */
#stage.dark-theme { background: #05081a; }
#stage .scene-menu { display: none; }
#stage.menu .scene-menu { display: block; }
#stage.menu .scene-play { display: none; }
#stage.photo-bg .scene-play, #stage.photo-bg .scene-menu { display: none; }
#stage.dark-theme .drift-rock { display: none; }
#stage.dark-theme .surface, #stage.dark-theme .deck, #stage.dark-theme .hills {
  background: linear-gradient(180deg, rgba(20,16,60,.1), rgba(6,6,24,.75)); box-shadow: inset 0 3px 0 rgba(255,255,255,.16);
}
#stage.dark-theme .surface::before, #stage.dark-theme .surface::after { background: rgba(255,255,255,.07); }
#stage.dark-theme .screen p { color: #e8e4ff; }
#stage.dark-theme .screen h1, #stage.dark-theme .screen h2, #stage.dark-theme .screen p, #stage.dark-theme .score { text-shadow: 0 2px 6px rgba(0,0,0,.75); }
#stage.dark-theme .screen .brand { color: var(--gold); text-shadow: 0 1px 2px rgba(0,0,0,.8); }
#stage.dark-theme .lineup div, #stage.dark-theme .stats div { background: rgba(12,10,40,.7); }
#stage.dark-theme .progress i { background: rgba(255,255,255,.3); }
#stage.dark-theme .rails { border-color: #c9c3e8; }

/* menus over the monster poster: the picture already shows the whole cast,
   so the drawn UFO scene steps aside and a soft dark glow sits behind the text */
#stage.photo-bg .title-scene { display: none; }
#stage.photo-bg.menu .screen {
  background: radial-gradient(ellipse 78% 34% at 50% 50%, rgba(5,8,26,.82), rgba(5,8,26,.45) 65%, transparent 100%);
}
#stage.photo-bg.menu .screen h1 { text-shadow: 0 3px 0 rgba(0,0,0,.5), 0 0 18px rgba(0,0,0,.8); }
/* the owner's pictures win over the dark theme's plain colour */
#stage.dark-theme.photo-bg { background: #05081a var(--bg-play) center / cover no-repeat; }
#stage.dark-theme.photo-bg.menu { background-image: var(--bg-menu); }
/* 2026-11-21 (user): the same galaxy and the same soft dark wash as Spin the Wheel */
#stage.dark-theme.photo-bg, #stage.dark-theme.photo-bg.menu {
  background-image: linear-gradient(180deg, rgba(10,8,40,.45), rgba(10,8,40,.25) 40%, rgba(10,8,40,.55)), var(--bg-play); }
/* user 2026-11-23: every game = the real galaxy above and a drawn moon ground below */
#stage.dark-theme.photo-bg, #stage.dark-theme.photo-bg.menu {
  /* the ground is cut straight from her Hold to Launch picture (img/ground-her.png), not redrawn */
  background-image: url("img/ground-her.png"), linear-gradient(180deg, rgba(10,8,40,.45), rgba(10,8,40,.2) 40%, rgba(10,8,40,.35)), var(--bg-play);
  background-size: auto 15%, cover, cover; background-position: center bottom, center, center top; background-repeat: no-repeat; }

/* ---- Fact Family Rocket on her rocket picture (user 2026-11-23) --------------------------------------------- */
.fam-pic { background: center / 100% 100% no-repeat; z-index: 2; filter: drop-shadow(0 10px 24px rgba(0,0,0,.45)); }
.fam-pic > div { position: absolute; }
.fam-head { display: flex; align-items: center; justify-content: center; gap: .28em; color: #fff; font-family: var(--font); font-weight: 800; letter-spacing: .5px;
  text-shadow: 0 2px 0 #0c0a3a, 0 0 10px rgba(120,160,255,.6); white-space: nowrap; }
.fam-head i { font-style: normal; color: #ffd23f; text-shadow: 0 2px 0 #7a4a00, 0 0 10px rgba(255,210,63,.7); }
.fam-row { border-radius: 999px; pointer-events: none; transition: box-shadow .25s; }
.fam-row.now { animation: fam-now 1s ease-in-out infinite; }
@keyframes fam-now { 0%, 100% { box-shadow: 0 0 0 2px rgba(255,210,63,.6), 0 0 10px rgba(255,210,63,.35); }
  50% { box-shadow: 0 0 0 3px #ffd23f, 0 0 22px rgba(255,210,63,.85); } }
.fam-row.good { box-shadow: 0 0 0 3px #2fd39a, 0 0 16px rgba(47,211,154,.8); }
.fam-row.fixed { box-shadow: 0 0 0 3px #ff9b5a, 0 0 14px rgba(255,155,90,.7); }
.fam-pic .eq { display: flex; align-items: center; justify-content: center; color: #fff; font-family: var(--font); font-weight: 800;
  text-shadow: 0 2px 0 #0c0a3a; white-space: nowrap; pointer-events: none; }
.fam-pic .blank { display: grid; place-items: center; color: #ffd23f; font-family: var(--font); font-weight: 800;
  text-shadow: 0 2px 0 #7a4a00, 0 0 8px rgba(255,210,63,.6); pointer-events: none; }
.fam-row.good ~ .blank { color: #fff; }
.fam-pic-flame { left: 50%; bottom: -16%; width: 30%; height: 22%; transform: translateX(-50%); opacity: 0; z-index: -1; transition: opacity .2s; }
.fam-pic-flame svg { width: 100%; height: 100%; display: block; transform-origin: 50% 0; animation: rk-flicker .16s ease-in-out infinite alternate; }
.fam-pic.lit .fam-pic-flame { opacity: 1; }

/* ---- the reward in every game: praise word, fireworks, diamonds (user 2026-11-23) ----------------------------- */
.fw-canvas { position: absolute; left: 0; top: 0; width: 100%; height: 100%; pointer-events: none; z-index: 40; }
.praise-word { position: absolute; left: 50%; top: 30%; z-index: 41; pointer-events: none; opacity: 0; white-space: nowrap;
  font: 800 46px/1 var(--font); color: #ffd23f; letter-spacing: 1px;
  text-shadow: 0 4px 0 #b06a00, 0 0 18px rgba(255,210,63,.85), -2px -2px 0 #6a1fa0, 2px -2px 0 #6a1fa0, -2px 2px 0 #6a1fa0, 2px 2px 0 #6a1fa0; }
.gem-count { order: 8; font: 800 18px/1 var(--font); color: #fff; background: rgba(80,200,255,.18); border: 2px solid rgba(127,232,255,.6);
  border-radius: 999px; padding: 4px 10px 3px; white-space: nowrap; }
.gem-fly { position: absolute; z-index: 42; font-size: 30px; pointer-events: none; filter: drop-shadow(0 0 8px #7fe8ff); }

/* top bar 2026-11-23 (user): no shields; 💎 and the score on the left, sound and Exit on the right */
.hud .shields { display: none; }
.hud .gem-count { order: 1; }
.hud .score { order: 2; margin-left: 4px; min-width: 0; text-align: left; font-size: 20px; background: rgba(255,255,255,.12);
  border-radius: 999px; padding: 4px 12px 3px; }
.hud .score::before { content: "⭐ "; font-size: 16px; }
.hud .boost { order: 3; }
.hud .icon-btn:not(.exit-btn) { order: 8; margin-left: auto; }
.hud .exit-btn { order: 9; }

/* question card template 2026-11-23 (user): one white card for every game that grows with the question —
   wider first, then onto more lines — centred under the top bar */
.qcard, .qcard-auto { left: 50% !important; translate: -50% 0; width: max-content !important; min-width: 300px; max-width: calc(100% - 24px);
  height: auto !important; min-height: 64px; padding: 8px 18px !important; white-space: normal; box-sizing: border-box; }
.qcard-auto { position: absolute; z-index: 5; display: flex; align-items: center; justify-content: center; text-align: center;
  color: #1b1f5e; font-family: var(--font); font-weight: 800; line-height: 1.12; pointer-events: none; border-radius: 18px;
  background: linear-gradient(180deg, #ffffff, #f2f6ff);
  box-shadow: 0 0 0 4px #4f8dff, 0 0 0 7px #1d3aa8, 0 6px 14px rgba(10,20,80,.45), inset 0 -3px 0 rgba(79,141,255,.25); }
.qcard-auto.from-bottom { translate: -50% -100%; }

/* user 2026-11-23: fractions in the question card were too small; make them big and evenly spaced */
.qcard .frac, .qcard-auto .frac { font-size: .86em; margin: 0 .14em; }
.qcard .frac i, .qcard-auto .frac i { padding: .04em .14em; }
.qcard-auto:has(.frac), .qcard:has(.frac) { padding-top: 10px !important; padding-bottom: 10px !important; letter-spacing: .02em; }

/* ---- one game at a time, diamonds only (user 2026-11-23) ---- */
.hud .score, .hud .boost { display: none !important; }
.pick-screen { justify-content: flex-start; padding-top: 40px; overflow-y: auto; }
.pick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; max-width: 360px; margin: 6px auto 0; }
.pick-card { position: relative; border: 2px solid rgba(160,190,255,.45); border-radius: 14px; overflow: hidden; padding: 0;
  aspect-ratio: 3 / 2; background: #0b0a2a; cursor: pointer; font: inherit; }
.pick-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pick-card span { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 4px 5px; color: #fff; font-weight: 800; font-size: 13px;
  text-align: center; background: linear-gradient(180deg, transparent, rgba(8,6,36,.9)); text-shadow: 0 1px 0 #1b1747; }
.pick-card:active, .pick-card:hover { border-color: #ffd23f; box-shadow: 0 0 14px rgba(255,210,63,.55); }
.level-game { font-weight: 800; color: #9ed0ff; font-size: 18px; margin: 0; }
.round-big.level-0 { color: #5fe8a0; } .round-big.level-1 { color: #ffd23f; } .round-big.level-2 { color: #ff7a7a; }
.level-tip { max-width: 300px; opacity: .9; }
.finish-screen { justify-content: flex-start; padding-top: 34px; overflow-y: auto; }
.gem-total { font-size: 44px; font-weight: 900; color: #fff; text-shadow: 0 0 16px rgba(120,200,255,.8); }
.pick-more { margin: 14px 0 0; font-weight: 700; }
.pick-screen, .finish-screen { scrollbar-width: none; } .pick-screen::-webkit-scrollbar, .finish-screen::-webkit-scrollbar { display: none; }

/* 2026-11-23: per-game backgrounds were tried and reverted by the user; games keep the galaxy + her moon ground. */

/* user 2026-11-23 (again): every game looks like Hold to Launch - the galaxy photo above, her drawn moon,
   galaxy spiral, starry sky and crater ground below (img/bg-launch-style.png, cut from her picture) */
#stage.dark-theme.photo-bg, #stage.dark-theme.photo-bg.menu {
  background-image: url("img/bg-launch-style.png"), linear-gradient(180deg, rgba(10,8,40,.45), rgba(10,8,40,.2) 40%, rgba(10,8,40,.35)), var(--bg-play);
  background-size: 140% auto, cover, cover; background-position: 38% bottom, center, center top; background-repeat: no-repeat; }

/* Meteor Blaster boss (Hard round, user 2026-11-24) */
.meteor-boss { position: absolute; width: 170px; height: 170px; transform: translate(-50%, -50%); pointer-events: none; z-index: 1;
  filter: drop-shadow(0 0 18px rgba(255,80,40,.75)); animation: boss-bob 2.4s ease-in-out infinite; }
.meteor-boss svg { width: 100%; height: 100%; }
@keyframes boss-bob { 50% { margin-top: 6px; } }
.boss-hp { position: absolute; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 6px; z-index: 2; pointer-events: none; }
.boss-hp b { font: 900 12px var(--font, inherit); color: #fff; background: #e23b3b; border-radius: 6px; padding: 2px 6px; letter-spacing: .5px; }
.boss-hp i { display: block; width: 130px; height: 12px; border-radius: 99px; background: rgba(0,0,0,.45); border: 2px solid #fff; overflow: hidden; }
.boss-hp s { display: block; height: 100%; background: linear-gradient(90deg, #ff4d4d, #ffb347); transition: width .4s ease; }
.float-text.big { font-size: 30px; }

.boss-warn { position: absolute; transform: translate(-50%, -50%); z-index: 6; text-align: center; color: #fff; font: 900 40px/1.1 var(--font, inherit);
  background: rgba(200, 20, 20, .88); border: 3px solid #ffd23f; border-radius: 20px; padding: 14px 26px; box-shadow: 0 0 40px rgba(255,60,40,.8);
  animation: boss-warn .45s ease-in-out infinite alternate; white-space: nowrap; }
.boss-warn small { display: block; font-size: 16px; margin-top: 4px; color: #ffe9a8; }
@keyframes boss-warn { from { transform: translate(-50%, -50%) scale(1); } to { transform: translate(-50%, -50%) scale(1.08); } }

/* the boss question: the three answer meteors are giant fireballs (user 2026-11-24) */
.meteor.boss-rock { width: 140px; height: 140px; margin: -70px 0 0 -70px; filter: drop-shadow(0 0 16px rgba(255,70,30,.85)); }
.meteor.boss-rock > span { top: 54px; font-size: 40px; }
