* { box-sizing: border-box; }
:root {
  --ink: #16133f;
  --deep: #090b25;
  --panel: rgba(255,255,255,.9);
  --pink: #ff6fb1;
  --mint: #49e0c0;
  --gold: #ffd166;
  --blue: #55d6ff;
  --purple: #715aff;
  --danger: #ff4d6d;
  --ok: #16c784;
  --meter-progress: 0;
}
html, body { width: 100%; min-height: 100%; margin: 0; }
body {
  overflow: hidden;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at 20% 15%, #3342b8 0, transparent 28%), radial-gradient(circle at 82% 20%, #b44bff 0, transparent 22%), linear-gradient(145deg, #080a25 0%, #15245d 48%, #37155b 100%);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
button { font: inherit; }
.game-app { position: relative; width: 100vw; height: 100vh; height: 100dvh; overflow: hidden; isolation: isolate; }
.asset-loader { position: fixed; inset: 0; z-index: 99; display: grid; place-items: center; padding: 20px; background: radial-gradient(circle at 24% 18%, rgba(255,255,255,.78), transparent 18%), radial-gradient(circle at 76% 22%, rgba(255,209,102,.36), transparent 24%), linear-gradient(135deg, #071a3f 0%, #0f766e 48%, #25124f 100%); transition: opacity .25s ease, visibility .25s ease; }
.game-app:not(.is-loading) .asset-loader { opacity: 0; visibility: hidden; pointer-events: none; }
.loader-card { width: min(520px, 94vw); padding: clamp(22px, 5vw, 34px); border: 2px solid rgba(255,255,255,.68); border-radius: 28px; background: linear-gradient(180deg, rgba(255,255,255,.97), rgba(242,247,255,.91)); color: var(--ink); text-align: center; box-shadow: 0 22px 70px rgba(0,0,0,.35); backdrop-filter: blur(16px); }
.brand-loader { position: relative; overflow: hidden; }
.brand-loader::before { content: ""; position: absolute; inset: -45% -18% auto; height: 140px; background: linear-gradient(90deg, transparent, rgba(255,255,255,.82), transparent); transform: rotate(-8deg) translateX(-55%); animation: loaderSweep 2.2s ease-in-out infinite; pointer-events: none; }
.loader-eyebrow { margin: 0 0 12px; color: #0f766e; font-size: 11px; font-weight: 1000; letter-spacing: .12em; text-transform: uppercase; }
.loader-brand { display: flex; flex-wrap: nowrap; justify-content: center; gap: 0; width: 100%; max-width: 100%; margin: 0; overflow: visible; white-space: nowrap; font-size: clamp(28px, 10vw, 58px); line-height: 1.02; font-weight: 1000; }
.loader-brand span { flex: 0 0 auto; display: inline-block; background: linear-gradient(135deg, #16133f 0%, #0f766e 52%, #ffd166 100%); -webkit-background-clip: text; background-clip: text; color: transparent; opacity: 0; transform: translateX(-28px) translateY(8px) rotate(-5deg); animation: brandLetterIn .68s cubic-bezier(.18,.86,.25,1.18) forwards; animation-delay: calc(var(--i) * .075s); }
.loader-card p { margin: 0 0 16px; color: #514b75; font-weight: 700; }
.brand-loader .loader-eyebrow { margin: 0 0 12px; color: #0f766e; font-weight: 1000; letter-spacing: .12em; line-height: 1.2; }
.loader-bar { height: 13px; overflow: hidden; border-radius: 999px; background: rgba(22,19,63,.12); }
.loader-bar span { display: block; width: 0%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--mint), var(--gold), var(--pink)); transition: width .25s ease; }
@media (max-width: 360px) { .brand-loader { padding-inline: 12px; } .loader-brand { font-size: clamp(24px, 9.6vw, 34px); } }
.game-topbar { position: absolute; top: max(12px, env(safe-area-inset-top)); left: max(12px, env(safe-area-inset-left)); right: max(12px, env(safe-area-inset-right)); z-index: 20; min-height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border: 1px solid rgba(255,255,255,.5); border-radius: 20px; background: rgba(255,255,255,.82); box-shadow: 0 20px 50px rgba(0,0,0,.18); backdrop-filter: blur(14px); }
.game-title { display: grid; gap: 3px; min-width: 0; }
.game-kicker, .overlay-kicker, .hud-item span { display: block; color: #5a36c9; font-size: 10px; font-weight: 1000; letter-spacing: .08em; text-transform: uppercase; }
.game-title strong { overflow: hidden; font-size: clamp(16px, 3vw, 24px); line-height: 1.05; white-space: nowrap; text-overflow: ellipsis; }
.hud { display: flex; align-items: center; gap: 8px; }
.hud-item { min-width: 70px; padding: 8px 10px; border-radius: 16px; background: rgba(255,255,255,.68); border: 1px solid rgba(22,19,63,.08); }
.hud-item strong { display: block; margin-top: 2px; font-size: 18px; line-height: 1; }
.stage-wrap { position: absolute; inset: 0; padding: 92px 10px 106px; display: grid; place-items: stretch; }
.stage { position: relative; width: min(100%, 980px); height: 100%; margin: auto; overflow: hidden; border: 2px solid rgba(255,255,255,.24); border-radius: 34px; background: radial-gradient(circle at 50% 12%, #293989 0, transparent 42%), linear-gradient(180deg, #11164c 0%, #21145c 52%, #37104c 100%); box-shadow: inset 0 0 65px rgba(255,255,255,.08), 0 28px 90px rgba(0,0,0,.26); }
.space-backdrop span { position: absolute; display: block; pointer-events: none; }
.planet-one { width: 112px; height: 112px; left: 12%; top: 13%; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff0a9, #ff8c5a 45%, #8d35d4 74%); box-shadow: 0 0 35px rgba(255,140,90,.4); }
.planet-two { width: 76px; height: 76px; right: 11%; top: 20%; border-radius: 50%; background: radial-gradient(circle at 35% 28%, #dffff8, #49e0c0 50%, #15859a 80%); }
.star { width: 9px; height: 9px; background: white; border-radius: 50%; box-shadow: 0 0 14px white; animation: twinkle 2s ease-in-out infinite; }
.star-one { left: 39%; top: 16%; } .star-two { right: 27%; top: 44%; animation-delay: .5s; } .star-three { left: 21%; top: 49%; animation-delay: 1s; }
.comet { width: 118px; height: 5px; right: 9%; top: 11%; border-radius: 999px; background: linear-gradient(90deg, transparent, rgba(255,255,255,.95)); transform: rotate(-20deg); }
.moon-ground { left: -5%; right: -5%; bottom: -15%; height: 34%; border-radius: 50% 50% 0 0; background: linear-gradient(180deg, #ddd3ff, #a99ce9); box-shadow: inset 0 14px 20px rgba(255,255,255,.35); }
.crater-one { left: 15%; bottom: 11%; width: 110px; height: 28px; border-radius: 50%; background: rgba(74,55,135,.22); }
.crater-two { right: 17%; bottom: 7%; width: 160px; height: 36px; border-radius: 50%; background: rgba(74,55,135,.2); }
.height-meter { position: absolute; left: 10px; top: 18px; bottom: 18px; z-index: 11; width: clamp(42px, 7vw, 64px); display: grid; grid-template-rows: auto 1fr auto; align-items: center; justify-items: center; gap: 7px; color: white; text-align: center; }
.height-meter-label { font-size: 10px; font-weight: 1000; text-transform: uppercase; writing-mode: vertical-rl; transform: rotate(180deg); opacity: .9; }
.height-meter-track { position: relative; width: clamp(14px, 2.3vw, 22px); height: 100%; min-height: 150px; border: 2px solid rgba(255,255,255,.55); border-radius: 999px; background: rgba(255,255,255,.16); overflow: hidden; }
.height-meter-fill { position: absolute; left: 0; right: 0; bottom: 0; height: 0%; border-radius: inherit; background: linear-gradient(0deg, var(--pink), var(--gold), var(--mint)); transition: height .35s ease; }
.height-meter-robot { position: absolute; left: 50%; bottom: calc((var(--meter-progress) * 1%) - 8px); width: 23px; height: 23px; border-radius: 50% 50% 45% 45%; background: #fff; border: 3px solid #21145c; transform: translateX(-50%); transition: bottom .35s ease; }
.heightValue, .height-meter strong { font-size: 11px; text-shadow: 0 2px 6px rgba(0,0,0,.35); }
.heart-bar { position: absolute; right: 18px; top: 8px; z-index: 12; display: flex; gap: 5px; padding: 6px 8px; border-radius: 999px; background: rgba(255,255,255,.84); box-shadow: 0 8px 22px rgba(0,0,0,.13); }
.heart { font-size: 18px; line-height: 1; color: var(--danger); transition: transform .2s ease, opacity .2s ease, filter .2s ease; }
.heart.is-lost { opacity: .24; filter: grayscale(1); transform: scale(.78); }
.climb-layer { position: absolute; inset: 0; transition: transform .75s cubic-bezier(.2,.9,.2,1); }
.platform { position: absolute; left: calc(var(--current-x, 28) * 1%); top: calc(var(--current-y, 76) * 1%); width: clamp(104px, 22vw, 172px); min-height: 62px; display: grid; place-items: center; transform: translate(-50%, -50%); border-radius: 24px; border: 3px solid rgba(255,255,255,.75); background: linear-gradient(135deg, #fff8d6, #ffc56d 48%, #ff8d99); box-shadow: 0 14px 0 rgba(76,33,95,.38), 0 20px 35px rgba(0,0,0,.24); color: #34184d; font-size: clamp(23px, 5vw, 38px); font-weight: 1000; transition: opacity .25s ease, transform .35s ease; }
.platform-next { left: calc(var(--next-x, 70) * 1%); top: calc(var(--next-y, 52) * 1%); background: linear-gradient(135deg, #dffff8, #54e4cb 50%, #67b6ff); }
.platform.is-hidden { opacity: 0; transform: translate(-50%, -50%) scale(.82); }
.platform.is-appearing { animation: pop .4s ease; }
.platform span { text-shadow: 0 1px 0 rgba(255,255,255,.4); }
.robot { position: absolute; z-index: 6; left: calc(var(--robot-x, 28) * 1%); top: calc(var(--robot-y, 72) * 1%); width: clamp(88px, 16vw, 132px); transform: translate(-50%, -100%); transform-origin: 50% 100%; transition: left .72s cubic-bezier(.2,.9,.2,1), top .72s cubic-bezier(.2,.9,.2,1); }
.robot-svg { display: block; width: 100%; filter: drop-shadow(0 16px 14px rgba(0,0,0,.22)); }
.robot.is-jumping { animation: robotJump .72s ease; }
.robot.is-dead { animation: wobble .8s ease; filter: grayscale(.65); }
.robot.is-respawn { animation: respawn .42s ease; }
.feedback { position: absolute; left: 50%; top: 22%; z-index: 30; padding: 12px 20px; border-radius: 999px; background: rgba(255,255,255,.92); color: var(--ink); font-weight: 1000; font-size: clamp(20px, 4vw, 34px); box-shadow: 0 18px 45px rgba(0,0,0,.22); opacity: 0; transform: translate(-50%, 10px) scale(.9); pointer-events: none; }
.feedback.show { animation: feedbackPop .85s ease; }
.answer-dock { position: absolute; left: 0; right: 0; bottom: max(12px, env(safe-area-inset-bottom)); z-index: 18; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; width: min(760px, calc(100vw - 20px)); margin: auto; padding: 10px; border: 1px solid rgba(255,255,255,.45); border-radius: 26px; background: rgba(255,255,255,.82); box-shadow: 0 18px 45px rgba(0,0,0,.20); backdrop-filter: blur(15px); }
.answer-btn { min-height: 62px; border: 0; border-radius: 20px; background: linear-gradient(180deg, white, #f0eaff); color: var(--ink); font-size: clamp(22px, 5vw, 34px); font-weight: 1000; cursor: pointer; box-shadow: inset 0 -4px 0 rgba(22,19,63,.1), 0 10px 22px rgba(0,0,0,.12); transition: transform .12s ease, filter .2s ease; }
.answer-btn:active { transform: translateY(2px) scale(.98); }
.answer-btn.correct { background: linear-gradient(180deg, #dffff8, #16c784); color: #073b31; }
.answer-btn.wrong { background: linear-gradient(180deg, #ffe0e8, #ff4d6d); color: white; animation: shake .28s ease; }
.answer-btn:disabled { cursor: default; }
.game-overlay { position: absolute; inset: 0; z-index: 35; display: none; place-items: center; padding: max(88px, env(safe-area-inset-top)) 14px max(94px, env(safe-area-inset-bottom)); background: rgba(5,7,28,.42); backdrop-filter: blur(6px); }
.game-overlay.is-visible { display: grid; }
.overlay-card { width: min(760px, 96vw); max-height: 88vh; overflow: auto; padding: clamp(18px, 4vw, 30px); border: 2px solid rgba(255,255,255,.58); border-radius: 34px; background: linear-gradient(180deg, rgba(255,255,255,.94), rgba(242,236,255,.91)); box-shadow: 0 28px 90px rgba(0,0,0,.35); text-align: center; }
.overlay-card h2 { margin: 4px 0 8px; font-size: clamp(28px, 7vw, 56px); line-height: .95; }
.menu-hero { display: flex; align-items: center; justify-content: center; gap: 18px; margin-bottom: 18px; text-align: left; }
.menu-title-copy p { margin: 0; color: #514b75; font-weight: 650; }
.menu-bot { position: relative; width: 112px; height: 132px; flex: 0 0 auto; animation: floaty 2.2s ease-in-out infinite; }
.menu-bot-head { position: absolute; left: 17px; top: 8px; width: 78px; height: 55px; border: 5px solid var(--ink); border-radius: 20px; background: linear-gradient(180deg, #faffff, #76ead3); }
.menu-bot-head:before { content: ""; position: absolute; left: 34px; top: -23px; width: 6px; height: 18px; border-radius: 999px; background: var(--ink); }
.menu-bot-head:after { content: ""; position: absolute; left: 27px; top: -31px; width: 20px; height: 20px; border: 5px solid var(--ink); border-radius: 50%; background: var(--pink); }
.menu-bot-head i { position: absolute; top: 20px; width: 12px; height: 12px; border-radius: 50%; background: #273abf; box-shadow: 0 0 12px #55d6ff; }
.menu-bot-head i:first-child { left: 20px; } .menu-bot-head i:last-child { right: 20px; }
.menu-bot-body { position: absolute; left: 27px; top: 68px; width: 58px; height: 45px; border: 5px solid var(--ink); border-radius: 20px; background: linear-gradient(180deg, #ffdf81, #ff80b5); }
.menu-flame { position: absolute; left: 42px; bottom: 0; width: 28px; height: 38px; border-radius: 50% 50% 55% 55%; background: linear-gradient(180deg, #fff6a8, #ff8b33 55%, transparent); animation: flame .3s ease-in-out infinite alternate; }
.mode-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.mode-grid.two-col { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mode-card, .number-card, .primary-action, .secondary-action, .back-btn { border: 0; cursor: pointer; }
.mode-card { min-height: 126px; padding: 15px 10px; border-radius: 24px; background: linear-gradient(180deg, white, #efeaff); color: var(--ink); box-shadow: inset 0 -5px 0 rgba(113,90,255,.14), 0 14px 26px rgba(30,17,84,.13); transition: transform .14s ease, box-shadow .14s ease; }
.mode-card:hover, .number-card:hover, .primary-action:hover, .secondary-action:hover { transform: translateY(-2px); }
.mode-icon { display: grid; place-items: center; width: 58px; height: 58px; margin: 0 auto 10px; border-radius: 20px; background: linear-gradient(135deg, var(--mint), var(--blue)); color: #16133f; font-weight: 1000; font-size: 18px; }
.mode-card strong { display: block; font-size: clamp(17px, 2.5vw, 22px); }
.mode-card span:last-child { display: block; margin-top: 5px; color: #615b7d; font-weight: 700; font-size: 13px; }
.big-card { min-height: 170px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; font-size: 20px; font-weight: 1000; }
.back-btn { padding: 10px 14px; border-radius: 999px; background: #e9e3ff; color: var(--ink); font-weight: 900; }
.menu-step.is-hidden { display: none; }
.number-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.number-card { min-height: 66px; border-radius: 20px; background: linear-gradient(180deg, #ffffff, #dcfff7); color: var(--ink); font-size: 25px; font-weight: 1000; box-shadow: inset 0 -4px 0 rgba(22,19,63,.08), 0 10px 20px rgba(0,0,0,.1); }
.overlay-score { color: #514b75; font-size: 19px; font-weight: 800; }
.overlay-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.primary-action, .secondary-action { min-width: 135px; padding: 14px 20px; border-radius: 18px; font-weight: 1000; font-size: 17px; box-shadow: 0 14px 24px rgba(0,0,0,.14); }
.primary-action { background: linear-gradient(135deg, var(--mint), var(--blue)); color: #091230; }
.secondary-action { background: #efeaff; color: var(--ink); }
.win-card { position: relative; overflow: hidden; }
.win-burst { position: absolute; inset: -80px; opacity: .18; background: conic-gradient(from 0deg, var(--pink), var(--gold), var(--mint), var(--blue), var(--pink)); animation: spin 5s linear infinite; }
.win-card > *:not(.win-burst) { position: relative; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes brandLetterIn { 0% { opacity: 0; transform: translateX(-28px) translateY(8px) rotate(-5deg); } 68% { opacity: 1; transform: translateX(3px) translateY(0) rotate(1deg); } 100% { opacity: 1; transform: translateX(0) translateY(0) rotate(0); } }
@keyframes loaderSweep { 0%,18% { transform: rotate(-8deg) translateX(-62%); } 62%,100% { transform: rotate(-8deg) translateX(62%); } }
@keyframes floaty { 50% { transform: translateY(-8px); } }
@keyframes twinkle { 50% { opacity: .28; transform: scale(.72); } }
@keyframes flame { from { transform: scaleY(.82); opacity: .75; } to { transform: scaleY(1.12); opacity: 1; } }
@keyframes pop { 0% { transform: translate(-50%, -50%) scale(.65); } 70% { transform: translate(-50%, -50%) scale(1.08); } 100% { transform: translate(-50%, -50%) scale(1); } }
@keyframes robotJump { 0%,100% { transform: translate(-50%, -100%) scale(1); } 45% { transform: translate(-50%, -128%) scale(1.04); } }
@keyframes wobble { 20% { transform: translate(-50%, -100%) rotate(-10deg); } 45% { transform: translate(-50%, -100%) rotate(8deg); } 70% { transform: translate(-50%, -100%) rotate(-5deg); } }
@keyframes respawn { from { opacity: .2; transform: translate(-50%, -100%) scale(.75); } to { opacity: 1; transform: translate(-50%, -100%) scale(1); } }
@keyframes feedbackPop { 0% { opacity: 0; transform: translate(-50%, 10px) scale(.9); } 18%,72% { opacity: 1; transform: translate(-50%, 0) scale(1); } 100% { opacity: 0; transform: translate(-50%, -12px) scale(.95); } }
@keyframes shake { 25% { transform: translateX(-5px); } 50% { transform: translateX(5px); } 75% { transform: translateX(-3px); } }
@media (max-width: 720px) {
  .game-topbar { min-height: 60px; border-radius: 18px; }
  .game-kicker { display: none; }
  .hud-item { min-width: 58px; padding: 7px; }
  .hud-item span { font-size: 9px; }
  .hud-item strong { font-size: 16px; }
  .lives-text { display: none; }
  .stage-wrap { padding: 82px 6px 96px; }
  .stage { border-radius: 24px; }
  .height-meter { left: 4px; width: 34px; }
  .height-meter-label { display: none; }
  .heart-bar { top: 82px; right: 12px; }
  .answer-dock { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .answer-btn { min-height: 54px; }
  .menu-hero { text-align: center; flex-direction: column; }
  .mode-grid, .mode-grid.two-col { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .number-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .mode-card { min-height: 112px; }
  .big-card { min-height: 138px; }
}
@media (max-width: 430px) {
  .game-title strong { max-width: 170px; }
  .hud { gap: 5px; }
  .number-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .platform { width: 118px; min-height: 58px; }
}

/* Website embed polish: no in-game fullscreen controls, cleaner stage, richer rocket meter. */
.game-topbar {
  display: none !important;
}

.stage-wrap {
  padding: 12px 8px 106px !important;
}

.stage {
  width: 100% !important;
  max-width: none !important;
  border: 0 !important;
  border-radius: 0 !important;
  background:
    radial-gradient(circle at 72% 14%, rgba(85, 214, 255, .2), transparent 18%),
    radial-gradient(circle at 18% 24%, rgba(255, 209, 102, .16), transparent 16%),
    linear-gradient(180deg, #101a52 0%, #21145c 50%, #35104c 100%) !important;
  box-shadow: inset 0 0 70px rgba(255, 255, 255, .08) !important;
}

.height-meter {
  left: max(6px, env(safe-area-inset-left)) !important;
  top: 14px !important;
  bottom: 16px !important;
  width: 90px !important;
  padding: 13px 11px 16px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 9px !important;
  border: 1px solid rgba(255, 255, 255, .42) !important;
  border-radius: 18px !important;
  background: linear-gradient(180deg, rgba(255, 255, 255, .2), rgba(255, 255, 255, .1)) !important;
  box-shadow: 0 22px 58px rgba(5, 7, 28, .28), inset 0 1px 0 rgba(255, 255, 255, .36) !important;
  backdrop-filter: blur(16px) !important;
}

.height-meter-label {
  writing-mode: horizontal-tb !important;
  transform: none !important;
  color: #ffffff !important;
  font-size: 11px !important;
  letter-spacing: .08em !important;
  opacity: .98 !important;
  text-shadow: 0 2px 10px rgba(0, 0, 0, .3) !important;
}

.height-meter::before {
  content: "★";
  position: absolute;
  left: 50%;
  top: 42px;
  z-index: 4;
  color: #ffd166;
  font-size: 30px;
  line-height: 1;
  text-shadow: 0 0 18px rgba(255, 209, 102, .72), 0 2px 0 rgba(93, 55, 8, .28);
  transform: translateX(-50%);
}

.height-meter-track {
  flex: 1 1 auto !important;
  width: 24px !important;
  height: auto !important;
  min-height: 0 !important;
  margin-top: 50px !important;
  margin-bottom: 10px !important;
  overflow: visible !important;
  border: 1px solid rgba(255, 255, 255, .48) !important;
  background:
    repeating-linear-gradient(180deg, transparent 0 38px, rgba(255, 255, 255, .28) 39px 41px, transparent 42px 76px),
    linear-gradient(180deg, rgba(255, 255, 255, .13), rgba(255, 255, 255, .24)) !important;
  box-shadow: inset 0 0 0 1px rgba(13, 20, 62, .24), 0 0 26px rgba(85, 214, 255, .2) !important;
}

.height-meter-track::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -27px;
  width: 52px;
  height: 34px;
  border-radius: 999px 999px 8px 8px;
  background:
    radial-gradient(circle at 50% 32%, #ffffff 0 5px, transparent 6px),
    linear-gradient(180deg, #55d6ff, #715aff);
  box-shadow: 0 12px 24px rgba(85, 214, 255, .25);
  transform: translateX(-50%);
}

.height-meter-fill {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .32), rgba(255, 255, 255, 0) 22%),
    linear-gradient(0deg, #ff6fb1 0%, #ffd166 48%, #49e0c0 100%) !important;
  box-shadow: 0 0 20px rgba(73, 224, 192, .65) !important;
  transition: height .5s cubic-bezier(.2, .9, .2, 1) !important;
}

.height-meter-robot {
  z-index: 5 !important;
  bottom: calc((var(--meter-progress) * 1%) - 5px) !important;
  width: 34px !important;
  height: 48px !important;
  border: 3px solid #21145c !important;
  border-radius: 50% 50% 16px 16px !important;
  background:
    radial-gradient(circle at 50% 30%, #ffffff 0 5px, #55d6ff 6px 10px, transparent 11px),
    linear-gradient(135deg, #ffffff 0%, #dffff8 45%, #ff8bd1 100%) !important;
  box-shadow: 0 12px 24px rgba(5, 7, 28, .32), 0 0 20px rgba(85, 214, 255, .28) !important;
  transform: translate(-50%, 50%) !important;
  transition: bottom .5s cubic-bezier(.2, .9, .2, 1) !important;
}

.height-meter-robot::before,
.height-meter-robot::after {
  content: "";
  position: absolute;
  bottom: -8px;
}

.height-meter-robot::before {
  left: 50%;
  width: 16px;
  height: 18px;
  border-radius: 50% 50% 60% 60%;
  background: linear-gradient(180deg, #fff6a8, #ff8b33 65%, transparent);
  transform: translateX(-50%);
  animation: flame .3s ease-in-out infinite alternate;
}

.height-meter-robot::after {
  left: -8px;
  right: -8px;
  height: 18px;
  background:
    linear-gradient(135deg, transparent 0 44%, #715aff 46% 68%, transparent 70%),
    linear-gradient(-135deg, transparent 0 44%, #715aff 46% 68%, transparent 70%);
  opacity: .95;
}

.height-meter strong {
  color: #ffffff !important;
  font-weight: 1000 !important;
}

.heart-bar {
  top: 14px !important;
  right: 14px !important;
  z-index: 35 !important;
  border: 1px solid rgba(255, 255, 255, .48) !important;
  background: rgba(255, 255, 255, .76) !important;
  backdrop-filter: blur(12px) !important;
}

@media (max-width: 720px) {
  .stage-wrap {
    padding: 8px 5px 96px !important;
  }

  .height-meter {
    left: max(4px, env(safe-area-inset-left)) !important;
    top: 8px !important;
    bottom: 58px !important;
    width: 56px !important;
    padding: 9px 5px 12px !important;
    border-radius: 14px !important;
  }

  .height-meter-label {
    font-size: 9px !important;
  }

  .height-meter::before {
    top: 32px !important;
    font-size: 21px !important;
  }

  .height-meter-track {
    width: 16px !important;
    margin-top: 42px !important;
    margin-bottom: 16px !important;
  }

  .height-meter-track::before {
    top: -19px !important;
    width: 34px !important;
    height: 24px !important;
  }

  .height-meter-robot {
    width: 26px !important;
    height: 38px !important;
    border-width: 2px !important;
  }

  .heart-bar {
    top: 8px !important;
    right: 8px !important;
  }
}

@media (max-width: 430px) {
  .height-meter {
    bottom: 74px !important;
  }
}

/* Robot Reef Rescue theme. */
body {
  background:
    radial-gradient(circle at 20% 18%, rgba(94, 234, 212, .42), transparent 24%),
    radial-gradient(circle at 80% 16%, rgba(125, 211, 252, .3), transparent 24%),
    linear-gradient(145deg, #022c43 0%, #075985 48%, #083344 100%) !important;
}

.asset-loader {
  background:
    radial-gradient(circle at 28% 18%, rgba(167, 243, 208, .46), transparent 20%),
    radial-gradient(circle at 76% 22%, rgba(56, 189, 248, .32), transparent 25%),
    linear-gradient(135deg, #032b3c 0%, #0f766e 52%, #082f49 100%) !important;
}

.loader-brand span {
  background: linear-gradient(135deg, #082f49 0%, #0f766e 52%, #38bdf8 100%) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
}

.stage {
  background:
    radial-gradient(circle at 20% 16%, rgba(186, 230, 253, .18), transparent 18%),
    radial-gradient(circle at 82% 22%, rgba(45, 212, 191, .2), transparent 16%),
    linear-gradient(180deg, #075985 0%, #0f766e 52%, #064e3b 100%) !important;
}

.space-backdrop::before,
.space-backdrop::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.space-backdrop::before {
  left: 8%;
  right: 8%;
  bottom: 5%;
  height: 22%;
  border-radius: 50% 50% 0 0;
  background:
    radial-gradient(circle at 12% 80%, rgba(251, 146, 60, .74) 0 34px, transparent 35px),
    radial-gradient(circle at 32% 82%, rgba(244, 114, 182, .64) 0 28px, transparent 29px),
    radial-gradient(circle at 72% 78%, rgba(45, 212, 191, .72) 0 36px, transparent 37px),
    linear-gradient(180deg, rgba(6, 95, 70, .16), rgba(6, 78, 59, .3));
}

.space-backdrop::after {
  inset: 0;
  background:
    radial-gradient(circle at 18% 28%, rgba(255,255,255,.72) 0 4px, transparent 5px),
    radial-gradient(circle at 21% 24%, rgba(255,255,255,.44) 0 8px, transparent 9px),
    radial-gradient(circle at 72% 38%, rgba(255,255,255,.64) 0 4px, transparent 5px),
    radial-gradient(circle at 76% 33%, rgba(255,255,255,.34) 0 10px, transparent 11px),
    radial-gradient(circle at 58% 18%, rgba(255,255,255,.5) 0 3px, transparent 4px);
  animation: bubbleRise 6s ease-in-out infinite;
}

.planet-one,
.planet-two,
.comet,
.moon-ground,
.crater-one,
.crater-two {
  opacity: .22 !important;
  filter: hue-rotate(108deg) saturate(.8);
}

.platform {
  border-color: rgba(186, 230, 253, .75) !important;
  background: linear-gradient(135deg, #dffdf8, #5eead4 48%, #38bdf8) !important;
  color: #083344 !important;
  box-shadow: 0 14px 0 rgba(8, 47, 73, .42), 0 20px 35px rgba(3, 44, 67, .28) !important;
}

.platform-next {
  background: linear-gradient(135deg, #ecfeff, #67e8f9 50%, #2dd4bf) !important;
}

.robot-svg-bot,
.menu-bot {
  filter: hue-rotate(88deg) saturate(1.12);
}

.height-meter::before {
  content: "◆" !important;
  color: #67e8f9 !important;
  text-shadow: 0 0 18px rgba(103, 232, 249, .74), 0 2px 0 rgba(8, 47, 73, .28) !important;
}

.height-meter-track::before {
  background:
    radial-gradient(circle at 50% 32%, #ffffff 0 5px, transparent 6px),
    linear-gradient(180deg, #2dd4bf, #0284c7) !important;
}

.height-meter-fill {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .32), rgba(255, 255, 255, 0) 22%),
    linear-gradient(0deg, #38bdf8 0%, #67e8f9 48%, #2dd4bf 100%) !important;
  box-shadow: 0 0 20px rgba(45, 212, 191, .68) !important;
}

.height-meter-robot {
  background:
    radial-gradient(circle at 50% 30%, #ffffff 0 5px, #67e8f9 6px 10px, transparent 11px),
    linear-gradient(135deg, #ffffff 0%, #ccfbf1 45%, #38bdf8 100%) !important;
}

.height-meter-robot::before {
  background: linear-gradient(180deg, #cffafe, #38bdf8 65%, transparent) !important;
}

.answer-btn {
  background: linear-gradient(180deg, #ffffff, #ecfeff) !important;
}

.primary-action {
  background: linear-gradient(135deg, #2dd4bf, #38bdf8) !important;
}

@keyframes bubbleRise {
  0%, 100% { transform: translateY(0); opacity: .86; }
  50% { transform: translateY(-18px); opacity: .58; }
}

@media (max-height: 520px) and (orientation: landscape) {
  .game-app {
    height: 100dvh;
  }

  .stage-wrap {
    padding: 6px max(4px, env(safe-area-inset-right)) 62px max(4px, env(safe-area-inset-left)) !important;
  }

  .height-meter {
    top: 6px !important;
    bottom: 32px !important;
    width: 46px !important;
    padding: 7px 4px 8px !important;
  }

  .height-meter-label,
  .height-meter::before {
    display: none !important;
  }

  .height-meter-track {
    width: 14px !important;
    margin: 6px 0 !important;
  }

  .height-meter-track::before {
    display: none !important;
  }

  .height-meter-robot {
    width: 24px !important;
    height: 30px !important;
  }

  .heart-bar {
    top: 6px !important;
    right: 6px !important;
    padding: 4px 6px !important;
  }

  .heart {
    font-size: 14px !important;
  }

  .platform {
    width: clamp(136px, 22vw, 172px) !important;
    min-height: 48px !important;
    padding: 12px 8px 8px !important;
    font-size: clamp(18px, 3.4vw, 24px) !important;
  }

  .platform span,
  #problemText,
  #currentBlockText {
    display: block !important;
    max-width: 100% !important;
    white-space: nowrap !important;
    line-height: .95 !important;
  }

  .robot {
    width: clamp(66px, 12vw, 92px) !important;
  }

  .answer-dock {
    bottom: max(5px, env(safe-area-inset-bottom)) !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 6px !important;
    width: min(680px, calc(100vw - 12px)) !important;
    padding: 6px !important;
    border-radius: 16px !important;
  }

  .answer-btn {
    min-height: 42px !important;
    font-size: clamp(18px, 3.4vw, 26px) !important;
  }
}

@media (max-height: 520px) and (orientation: landscape) {
  .game-overlay {
    align-items: stretch !important;
    justify-content: center !important;
    place-items: stretch center !important;
    padding: 2px max(42px, env(safe-area-inset-right)) 2px max(2px, env(safe-area-inset-left)) !important;
    overflow: hidden !important;
  }

  .game-overlay.is-visible {
    display: flex !important;
  }

  .overlay-card {
    align-self: stretch !important;
    width: min(760px, calc(100vw - 48px)) !important;
    max-height: calc(100dvh - 4px) !important;
    overflow-y: auto !important;
    padding: 8px 10px !important;
    border-radius: 8px !important;
  }

  .menu-card {
    display: grid !important;
    align-content: start !important;
    gap: 8px !important;
  }

  .menu-hero {
    margin: 0 0 4px !important;
    gap: 8px !important;
  }

  .menu-robot-svg,
  .menu-bot,
  .menu-robot-mark {
    display: none !important;
  }

  .menu-title-copy {
    text-align: center !important;
  }

  .overlay-kicker {
    margin: 0 0 2px !important;
    font-size: 9px !important;
  }

  .overlay-card h2 {
    margin: 0 !important;
    font-size: clamp(26px, 9vh, 42px) !important;
    line-height: .95 !important;
  }

  .menu-card > p,
  .menu-title-copy p:not(.overlay-kicker) {
    display: none !important;
  }

  .mode-grid,
  .mode-grid.two-col {
    grid-template-columns: repeat(auto-fit, minmax(104px, 1fr)) !important;
    gap: 6px !important;
  }

  .mode-card,
  .big-card {
    min-height: 86px !important;
    padding: 7px 6px !important;
    border-radius: 10px !important;
  }

  .mode-icon {
    width: 40px !important;
    height: 40px !important;
    margin: 0 auto 4px !important;
    border-radius: 10px !important;
    font-size: 15px !important;
  }

  .mode-card strong {
    font-size: clamp(13px, 3.8vh, 17px) !important;
    line-height: 1.08 !important;
  }

  .mode-card span:last-child {
    margin-top: 2px !important;
    font-size: 10px !important;
    line-height: 1.12 !important;
  }

  .number-grid {
    grid-template-columns: repeat(10, minmax(0, 1fr)) !important;
    gap: 5px !important;
  }

  .number-card {
    min-height: 38px !important;
    border-radius: 10px !important;
    font-size: 16px !important;
  }

  .panel-head {
    margin-bottom: 6px !important;
    font-size: 16px !important;
  }

  .back-btn {
    padding: 6px 10px !important;
    font-size: 12px !important;
  }

  .overlay-actions {
    margin-top: 8px !important;
    gap: 8px !important;
  }

  .action-button,
  .primary-action,
  .secondary-action {
    min-height: 36px !important;
    padding: 8px 12px !important;
    border-radius: 10px !important;
    font-size: 14px !important;
  }
}

@media (max-height: 520px) and (orientation: landscape) {
  .mode-card,
  .big-card {
    display: grid !important;
    grid-template-columns: 34px minmax(0, 1fr) !important;
    grid-template-rows: auto auto !important;
    align-content: center !important;
    align-items: center !important;
    column-gap: 8px !important;
    min-height: 70px !important;
    text-align: left !important;
  }

  .mode-icon {
    grid-row: 1 / 3 !important;
    grid-column: 1 !important;
    width: 34px !important;
    height: 34px !important;
    margin: 0 !important;
    border-radius: 9px !important;
    font-size: 14px !important;
  }

  .mode-card strong,
  .mode-card span:last-child {
    grid-column: 2 !important;
    min-width: 0 !important;
  }

  .mode-card strong {
    font-size: clamp(14px, 4.2vh, 18px) !important;
  }
}

.platform span,
#problemText,
#currentBlockText {
  display: block;
  max-width: 100%;
  white-space: nowrap !important;
  line-height: .95;
}
