:root {
  --font: "Plus Jakarta Sans", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ink: #102033;
  --muted: #557086;
  --panel: rgba(255, 255, 255, .92);
  --line: rgba(18, 69, 78, .18);
  --leaf: #1f8a4c;
  --leaf-dark: #0e5f36;
  --sky: #b9edff;
  --gold: #ffbf3d;
  --danger: #dc2626;
}

* {
  box-sizing: border-box;
  letter-spacing: 0;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #0d472d;
  color: var(--ink);
  font-family: var(--font);
}

button {
  font: inherit;
  touch-action: manipulation;
}

.game-app {
  position: relative;
  width: 100%;
  height: 100svh;
  min-height: 560px;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 12%, rgba(255, 255, 255, .9), rgba(255, 255, 255, 0) 13%),
    linear-gradient(180deg, #9fe5ff 0%, #bdf3ff 40%, #7ecb7d 72%, #315f2f 100%);
  isolation: isolate;
  user-select: none;
}

.asset-loader,
.game-overlay {
  position: absolute;
  inset: 0;
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background:
    linear-gradient(180deg, rgba(6, 78, 59, .38), rgba(6, 95, 70, .62)),
    radial-gradient(circle at 50% 20%, rgba(255, 255, 255, .38), transparent 34%);
  backdrop-filter: blur(10px);
}

.game-app.is-loading .asset-loader,
.game-overlay.is-visible {
  display: flex;
}

.asset-loader {
  z-index: 80;
  background:
    radial-gradient(circle at 22% 18%, rgba(255, 255, 255, .95), rgba(255, 255, 255, 0) 18%),
    radial-gradient(circle at 78% 22%, rgba(255, 191, 61, .42), rgba(255, 191, 61, 0) 24%),
    linear-gradient(135deg, #073b30 0%, #0f766e 46%, #102033 100%);
}

.loader-card,
.overlay-card {
  width: min(520px, 100%);
  border: 1px solid rgba(255, 255, 255, .62);
  border-radius: 8px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 26px 80px rgba(8, 37, 26, .28);
  padding: clamp(20px, 5vw, 34px);
  text-align: center;
}

.brand-loader {
  position: relative;
  overflow: hidden;
  border-color: rgba(255, 255, 255, .74);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(241, 253, 247, .92));
}

.brand-loader::before {
  content: "";
  position: absolute;
  inset: -45% -18% auto;
  height: 140px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .78), transparent);
  transform: rotate(-8deg) translateX(-55%);
  animation: loaderSweep 2.2s ease-in-out infinite;
  pointer-events: none;
}

.loader-eyebrow {
  margin: 0 0 12px;
  color: #0e6b40;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.loader-brand,
.overlay-card h2 {
  margin: 0;
  color: #0f2438;
  line-height: 1.08;
  font-size: clamp(25px, 5vw, 38px);
}

.loader-brand {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 0;
  width: 100%;
  max-width: 100%;
  overflow: visible;
  white-space: nowrap;
  font-size: clamp(28px, 10vw, 58px);
  font-weight: 950;
}

.loader-brand span {
  flex: 0 0 auto;
  display: inline-block;
  background: linear-gradient(135deg, #102033 0%, #0f766e 52%, #ffbf3d 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,
.overlay-card p {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.brand-loader .loader-eyebrow {
  margin: 0 0 12px;
  color: #0e6b40;
  line-height: 1.2;
}

.loader-bar {
  height: 10px;
  margin-top: 18px;
  border-radius: 999px;
  overflow: hidden;
  background: #dceee7;
}

.loader-bar span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #1f8a4c, #27c6a1, #ffbf3d);
  transition: width .25s ease;
}

@media (max-width: 360px) {
  .brand-loader {
    padding-inline: 12px;
  }

  .loader-brand {
    font-size: clamp(24px, 9.6vw, 34px);
  }
}

@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%); }
}

.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;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 66px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, .64);
  border-radius: 8px;
  background: rgba(255, 255, 255, .82);
  box-shadow: 0 14px 40px rgba(13, 71, 45, .16);
  backdrop-filter: blur(14px);
}

.game-title {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.game-kicker {
  color: #0e6b40;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.game-title strong {
  overflow: hidden;
  color: #102033;
  font-size: clamp(15px, 2.8vw, 22px);
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hud {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hud-item {
  min-width: 72px;
  padding: 7px 9px;
  border: 1px solid rgba(16, 74, 54, .1);
  border-radius: 8px;
  background: rgba(255, 255, 255, .76);
}

.hud-item span,
.overlay-kicker {
  display: block;
  color: #0e6b40;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.hud-item strong {
  display: block;
  margin-top: 2px;
  color: #102033;
  font-size: 18px;
  line-height: 1;
}

.stage-wrap {
  position: absolute;
  inset: 0 0 108px;
  z-index: 1;
  padding: 90px 10px 10px;
}

.stage {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 360px;
  overflow: hidden;
  border-radius: 8px;
  --camera-offset: 0;
  --current-x: 28;
  --current-y: 76;
  --next-x: 66;
  --next-y: 43;
  --robot-x: 28;
  --robot-y: 71;
}

.climb-layer {
  position: absolute;
  inset: 0;
  z-index: 10;
  transform: translateY(calc(var(--camera-offset) * 1%));
  transition: transform .78s cubic-bezier(.22, .86, .28, 1);
  will-change: transform;
}

.jungle-backdrop,
.jungle-backdrop span {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.jungle-backdrop {
  transform: translateY(calc(var(--camera-offset) * .22%));
  transition: transform .78s cubic-bezier(.22, .86, .28, 1);
}

.sun {
  inset: 26px auto auto 9%;
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: #ffdf6b;
  box-shadow: 0 0 0 18px rgba(255, 223, 107, .24), 0 0 50px rgba(255, 191, 61, .55);
}

.cloud {
  width: 140px;
  height: 44px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .72);
  filter: blur(.2px);
}

.cloud::before,
.cloud::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: inherit;
}

.cloud::before {
  width: 62px;
  height: 62px;
  left: 20px;
  top: -28px;
}

.cloud::after {
  width: 52px;
  height: 52px;
  right: 24px;
  top: -22px;
}

.cloud-one {
  inset: 92px auto auto 17%;
  animation: cloudFloat 18s linear infinite;
}

.cloud-two {
  inset: 62px 10% auto auto;
  width: 118px;
  transform: scale(.8);
  animation: cloudFloat 22s linear infinite reverse;
}

@keyframes cloudFloat {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(28px); }
}

.vine {
  width: 16px;
  bottom: auto;
  border-radius: 999px;
  background:
    radial-gradient(circle at 50% 14px, #2cae62 0 10px, transparent 11px) 0 0 / 16px 46px repeat-y,
    linear-gradient(90deg, #126c3a, #1f8a4c);
}

.vine-one {
  left: 3%;
  height: 56%;
}

.vine-two {
  left: auto;
  right: 5%;
  height: 48%;
}

.tree {
  top: auto;
  width: 180px;
  height: 62%;
  bottom: -18px;
}

.tree::before {
  content: "";
  position: absolute;
  left: 72px;
  bottom: 0;
  width: 44px;
  height: 76%;
  border-radius: 999px 999px 0 0;
  background: linear-gradient(90deg, #744320, #9b6237);
}

.tree::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 62%, #2cab62 0 38px, transparent 39px),
    radial-gradient(circle at 68% 58%, #1d8d4f 0 48px, transparent 49px),
    radial-gradient(circle at 50% 28%, #32c972 0 54px, transparent 55px);
}

.tree-left {
  left: -56px;
}

.tree-right {
  right: -62px;
  transform: scaleX(-1);
}

.bush {
  top: auto;
  height: 76px;
  bottom: -24px;
  border-radius: 999px 999px 0 0;
  background:
    radial-gradient(circle at 14% 80%, #1e8a4c 0 42px, transparent 43px),
    radial-gradient(circle at 42% 70%, #27a85f 0 52px, transparent 53px),
    radial-gradient(circle at 76% 86%, #176f3e 0 46px, transparent 47px);
}

.bush-one {
  left: -20px;
  width: 45%;
}

.bush-two {
  right: -24px;
  width: 46%;
  transform: scaleX(-1);
}

.platform {
  position: absolute;
  z-index: 8;
  width: clamp(122px, 18vw, 190px);
  min-height: 66px;
  display: grid;
  place-items: center;
  padding: 10px 14px 16px;
  border: 2px solid rgba(46, 111, 52, .48);
  border-radius: 8px;
  background:
    linear-gradient(180deg, #6fd868 0 16px, #3c9c48 17px 22px, #8d5731 23px 100%);
  box-shadow: 0 16px 0 #603715, 0 22px 24px rgba(21, 63, 34, .26);
  color: #ffffff;
  font-size: clamp(19px, 3vw, 32px);
  font-weight: 900;
  text-shadow: 0 2px 0 rgba(0, 0, 0, .16);
}

.platform::before {
  content: "";
  position: absolute;
  top: -13px;
  left: 8px;
  right: 8px;
  height: 24px;
  border-radius: 999px 999px 8px 8px;
  background:
    radial-gradient(circle at 9% 50%, #9af36d 0 7px, transparent 8px),
    radial-gradient(circle at 24% 40%, #78df58 0 9px, transparent 10px),
    radial-gradient(circle at 45% 50%, #b7fa78 0 8px, transparent 9px),
    radial-gradient(circle at 68% 46%, #7ee45a 0 10px, transparent 11px),
    radial-gradient(circle at 88% 52%, #9af36d 0 8px, transparent 9px),
    linear-gradient(180deg, #6fd868, #3c9c48);
}

.platform-current {
  left: calc(var(--current-x) * 1%);
  top: calc(var(--current-y) * 1%);
  transform: translate(-50%, -50%);
}

.platform > span {
  display: inline-block;
  line-height: .95;
  transform: translateY(clamp(12px, 1.5vw, 18px));
}

.platform-next {
  left: calc(var(--next-x) * 1%);
  top: calc(var(--next-y) * 1%);
  transform: translate(-50%, -50%);
}

.robot {
  position: absolute;
  left: calc(var(--robot-x) * 1%);
  top: calc(var(--robot-y) * 1%);
  z-index: 12;
  width: 74px;
  height: 134px;
  transform: translate(-50%, -100%);
  transform-origin: 50% 100%;
  transition: left .72s cubic-bezier(.2, .88, .28, 1.18), top .72s cubic-bezier(.2, .88, .28, 1.18);
}

.robot > :not(.robot-svg) {
  display: none !important;
}

.robot-svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.robot-svg-bot {
  transform-origin: 90px 160px;
  animation: robotSvgIdle 1.6s ease-in-out infinite;
}

.robot-svg-eye {
  filter: drop-shadow(0 0 7px rgba(101, 228, 255, .9));
  transform-origin: center;
  animation: robotSvgBlink 5s infinite;
}

.robot-svg-shadow {
  animation: robotSvgShadow 1.6s ease-in-out infinite;
}

.robot.is-jumping .robot-svg-bot {
  animation: robotSvgJumpPose .72s ease;
}

.robot.is-jumping .robot-svg-arm-left {
  transform-origin: 62px 110px;
  animation: robotSvgArmLeft .72s ease;
}

.robot.is-jumping .robot-svg-arm-right {
  transform-origin: 118px 110px;
  animation: robotSvgArmRight .72s ease;
}

@keyframes robotSvgIdle {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

@keyframes robotSvgShadow {
  0%, 100% { transform: scaleX(1); opacity: .22; }
  50% { transform: scaleX(.88); opacity: .15; }
}

@keyframes robotSvgBlink {
  0%, 45%, 49%, 100% { transform: scaleY(1); }
  47% { transform: scaleY(.14); }
}

@keyframes robotSvgJumpPose {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  45% { transform: translateY(-8px) rotate(-4deg); }
  70% { transform: translateY(-3px) rotate(3deg); }
}

@keyframes robotSvgArmLeft {
  0%, 100% { transform: rotate(0deg); }
  45% { transform: rotate(-18deg); }
}

@keyframes robotSvgArmRight {
  0%, 100% { transform: rotate(0deg); }
  45% { transform: rotate(18deg); }
}

.robot-head,
.robot-body,
.robot-neck,
.robot-arm span,
.robot-leg span,
.robot-antenna span {
  position: absolute;
  display: block;
}

.robot-antenna {
  position: absolute;
  left: 50%;
  top: 0;
  width: 28px;
  height: 24px;
  transform: translateX(-50%);
}

.robot-antenna::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 5px;
  width: 4px;
  height: 18px;
  border-radius: 999px;
  background: #607989;
}

.robot-antenna span {
  left: 6px;
  top: 0;
  width: 16px;
  height: 16px;
  border: 3px solid #31586a;
  border-radius: 50%;
  background: #64e5ff;
  box-shadow: 0 0 16px rgba(100, 229, 255, .9);
}

.robot-head {
  left: 13px;
  top: 20px;
  width: 48px;
  height: 38px;
  border: 3px solid #31586a;
  border-radius: 8px;
  background: linear-gradient(180deg, #f5fbff, #b7c9d5);
  box-shadow: inset 0 -5px 0 rgba(49, 88, 106, .12);
}

.robot-eye {
  top: 12px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #19c8ff;
  box-shadow: 0 0 12px rgba(25, 200, 255, .95);
}

.robot-eye-left {
  left: 12px;
}

.robot-eye-right {
  right: 12px;
}

.robot-mouth {
  left: 16px;
  bottom: 8px;
  width: 16px;
  height: 4px;
  border-radius: 999px;
  background: #31586a;
}

.robot-neck {
  left: 31px;
  top: 56px;
  width: 12px;
  height: 12px;
  border-radius: 4px;
  background: #607989;
}

.robot-body {
  left: 15px;
  top: 64px;
  width: 44px;
  height: 42px;
  border: 3px solid #31586a;
  border-radius: 8px;
  background: linear-gradient(180deg, #edf7fb, #9eb7c8);
}

.robot-core {
  position: absolute;
  left: 13px;
  top: 10px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: radial-gradient(circle, #ffdf6b 0 34%, #f59e0b 36% 100%);
  box-shadow: 0 0 18px rgba(245, 158, 11, .65);
}

.robot-bolt {
  top: 31px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #31586a;
}

.robot-bolt-left {
  left: 8px;
}

.robot-bolt-right {
  right: 8px;
}

.robot-arm {
  position: absolute;
  top: 65px;
  width: 30px;
  height: 60px;
}

.robot-arm-left {
  left: -5px;
}

.robot-arm-right {
  right: -5px;
  transform: scaleX(-1);
}

.robot-upper,
.robot-forearm {
  width: 10px;
  height: 28px;
  border: 2px solid #31586a;
  border-radius: 999px;
  background: #b7c9d5;
}

.robot-upper {
  left: 13px;
  top: 0;
  transform: rotate(18deg);
  transform-origin: top center;
}

.robot-elbow {
  left: 12px;
  top: 24px;
  width: 13px;
  height: 13px;
  border: 2px solid #31586a;
  border-radius: 50%;
  background: #d8e7ee;
}

.robot-forearm {
  left: 8px;
  top: 33px;
  transform: rotate(-10deg);
}

.robot-hand {
  left: 4px;
  top: 54px;
  width: 22px;
  height: 14px;
  border: 2px solid #31586a;
  border-radius: 999px;
  background: #d8e7ee;
}

.robot-hand i {
  position: absolute;
  top: 9px;
  width: 4px;
  height: 9px;
  border-radius: 999px;
  background: #31586a;
}

.robot-hand i:nth-child(1) { left: 3px; }
.robot-hand i:nth-child(2) { left: 9px; }
.robot-hand i:nth-child(3) { left: 15px; }

.robot-leg {
  position: absolute;
  top: 103px;
  width: 26px;
  height: 38px;
}

.robot-leg-left {
  left: 14px;
}

.robot-leg-right {
  right: 14px;
}

.robot-thigh,
.robot-shin {
  width: 11px;
  height: 19px;
  border: 2px solid #31586a;
  border-radius: 999px;
  background: #b7c9d5;
}

.robot-thigh {
  left: 7px;
  top: 0;
}

.robot-knee {
  left: 5px;
  top: 15px;
  width: 15px;
  height: 12px;
  border: 2px solid #31586a;
  border-radius: 999px;
  background: #d8e7ee;
}

.robot-shin {
  left: 7px;
  top: 24px;
}

.robot-foot {
  left: 1px;
  top: 39px;
  width: 25px;
  height: 10px;
  border: 2px solid #31586a;
  border-radius: 999px 999px 5px 5px;
  background: #d8e7ee;
}

.robot.is-jumping {
  animation: robotJump .72s ease;
}

.robot.is-dead {
  animation: robotFall .9s cubic-bezier(.5, .05, .88, .38) forwards;
  transition: none;
}

.robot.is-respawn {
  animation: robotRespawn .45s ease;
}

@keyframes robotJump {
  0% { transform: translate(-50%, -100%) scaleY(1); }
  25% { transform: translate(-50%, -117%) scaleY(1.04) rotate(-4deg); }
  55% { transform: translate(-50%, -128%) scaleY(1.03) rotate(4deg); }
  100% { transform: translate(-50%, -100%) scaleY(1); }
}

@keyframes robotFall {
  0% { transform: translate(-50%, -100%) rotate(0deg); opacity: 1; }
  50% { transform: translate(-50%, -50%) rotate(140deg); opacity: .85; }
  100% { transform: translate(-50%, 80%) rotate(260deg); opacity: 0; }
}

@keyframes robotRespawn {
  0% { transform: translate(-50%, -80%) scale(.85); opacity: 0; }
  65% { transform: translate(-50%, -108%) scale(1.04); opacity: 1; }
  100% { transform: translate(-50%, -100%) scale(1); opacity: 1; }
}

.feedback {
  position: absolute;
  left: 50%;
  top: 22%;
  z-index: 18;
  min-width: 160px;
  padding: 12px 18px;
  border-radius: 8px;
  background: rgba(16, 32, 51, .86);
  color: #ffffff;
  box-shadow: 0 18px 46px rgba(16, 32, 51, .2);
  font-size: 22px;
  font-weight: 900;
  text-align: center;
  transform: translate(-50%, -20px);
  opacity: 0;
  pointer-events: none;
}

.feedback.show {
  animation: feedbackPop .9s ease;
}

@keyframes feedbackPop {
  0% { transform: translate(-50%, 12px) scale(.9); opacity: 0; }
  18%, 72% { transform: translate(-50%, 0) scale(1); opacity: 1; }
  100% { transform: translate(-50%, -20px) scale(.96); opacity: 0; }
}

.answer-dock {
  position: absolute;
  left: max(12px, env(safe-area-inset-left));
  right: max(12px, env(safe-area-inset-right));
  bottom: max(12px, env(safe-area-inset-bottom));
  z-index: 22;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, .62);
  border-radius: 8px;
  background: rgba(255, 255, 255, .86);
  box-shadow: 0 18px 44px rgba(13, 71, 45, .22);
  backdrop-filter: blur(14px);
}

.answer-btn {
  min-height: 62px;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #eaf8f1);
  color: #102033;
  box-shadow: inset 0 0 0 1px rgba(15, 32, 51, .12), 0 8px 0 #a8c9b7;
  font-size: clamp(24px, 5vw, 38px);
  font-weight: 950;
  cursor: pointer;
}

.answer-btn:active {
  transform: translateY(4px);
  box-shadow: inset 0 0 0 1px rgba(15, 32, 51, .12), 0 4px 0 #a8c9b7;
}

.answer-btn.correct {
  background: linear-gradient(180deg, #dcfce7, #86efac);
}

.answer-btn.wrong {
  background: linear-gradient(180deg, #fee2e2, #fca5a5);
}

.overlay-card {
  position: relative;
  overflow: hidden;
}

.overlay-kicker {
  margin: 0 0 8px;
}

.mode-grid {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}

.mode-card,
.primary-action,
.secondary-action {
  min-height: 62px;
  border-radius: 8px;
  cursor: pointer;
}

.mode-card {
  display: grid;
  gap: 5px;
  padding: 14px;
  border: 1px solid rgba(16, 74, 54, .18);
  background: linear-gradient(135deg, #ffffff, #eefdf5);
  text-align: left;
  box-shadow: 0 10px 24px rgba(14, 107, 64, .08);
}

.mode-card strong {
  color: #102033;
  font-size: 18px;
}

.mode-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.mode-card:hover,
.mode-card:focus-visible {
  outline: 3px solid rgba(39, 198, 161, .28);
  border-color: rgba(14, 107, 64, .42);
}

.overlay-score {
  font-weight: 850;
}

.overlay-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 22px;
}

.primary-action,
.secondary-action {
  min-width: 136px;
  border: 0;
  padding: 0 18px;
  font-weight: 900;
}

.primary-action {
  background: linear-gradient(135deg, #0e6b40, #168ea1);
  color: #ffffff;
  box-shadow: 0 14px 28px rgba(14, 107, 64, .22);
}

.secondary-action {
  border: 1px solid rgba(16, 74, 54, .16);
  background: #ffffff;
  color: #102033;
}

.win-burst {
  position: absolute;
  inset: -80px;
  background:
    radial-gradient(circle at 22% 25%, rgba(255, 191, 61, .52) 0 4px, transparent 5px),
    radial-gradient(circle at 80% 32%, rgba(39, 198, 161, .48) 0 5px, transparent 6px),
    radial-gradient(circle at 42% 82%, rgba(59, 130, 246, .42) 0 4px, transparent 5px),
    radial-gradient(circle at 70% 78%, rgba(255, 191, 61, .55) 0 6px, transparent 7px);
  animation: burstSpin 3s linear infinite;
  pointer-events: none;
}

.win-card > *:not(.win-burst) {
  position: relative;
}

@keyframes burstSpin {
  to { transform: rotate(360deg); }
}

@media (max-width: 720px) {
  .game-app {
    min-height: 540px;
  }

  .game-topbar {
    min-height: 58px;
    padding: 8px;
  }

  .game-title strong {
    max-width: 150px;
  }

  .hud-item {
    min-width: 56px;
    padding: 6px 7px;
  }

  .hud-item strong {
    font-size: 16px;
  }

  .stage-wrap {
    inset-bottom: 102px;
    padding-top: 76px;
  }

  .platform {
    width: clamp(112px, 34vw, 150px);
    min-height: 58px;
  }

  .robot {
    width: 62px;
    height: 116px;
    transform: translate(-50%, -100%) scale(.86);
  }

  .answer-dock {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    padding: 10px;
  }

  .answer-btn {
    min-height: 54px;
  }
}

@media (max-width: 420px) {
  .game-title strong {
    max-width: 112px;
  }

  .hud {
    gap: 5px;
  }

  .hud-item span {
    font-size: 9px;
  }

  .hud-item {
    min-width: 50px;
  }
}

/* Refined game art and climb behavior */
.game-app {
  --meter-progress: 0;
  background:
    radial-gradient(circle at 18% 12%, rgba(255, 241, 154, .82), rgba(255, 241, 154, 0) 12%),
    linear-gradient(180deg, #9fe8ff 0%, #c8f4f0 47%, #a8dc97 74%, #558648 100%);
}

.game-app::before {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 30%;
  z-index: 0;
  background:
    radial-gradient(ellipse at 12% 100%, rgba(35, 114, 65, .7) 0 22%, transparent 23%),
    radial-gradient(ellipse at 48% 100%, rgba(48, 145, 79, .58) 0 28%, transparent 29%),
    radial-gradient(ellipse at 88% 100%, rgba(25, 102, 59, .7) 0 24%, transparent 25%);
  opacity: .75;
}

.game-topbar {
  background: rgba(255, 255, 255, .9);
}

.game-title {
  position: relative;
  padding-left: 42px;
}

.game-title::before {
  content: "+";
  position: absolute;
  left: 0;
  top: 50%;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, #0f5132, #18a36f);
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(15, 81, 50, .22);
  transform: translateY(-50%);
  font-weight: 950;
}

.stage-wrap {
  padding-left: 62px;
}

.stage {
  background:
    linear-gradient(180deg, rgba(255,255,255,.14), rgba(255,255,255,0) 36%),
    radial-gradient(circle at 72% 10%, rgba(255,255,255,.34), transparent 22%);
}

.jungle-backdrop::before {
  content: "";
  position: absolute;
  left: 4%;
  right: 4%;
  top: 12px;
  height: 118px;
  background:
    radial-gradient(circle at 8% 76%, rgba(49, 139, 78, .42) 0 44px, transparent 45px),
    radial-gradient(circle at 20% 45%, rgba(35, 116, 70, .36) 0 58px, transparent 59px),
    radial-gradient(circle at 39% 54%, rgba(67, 159, 87, .34) 0 54px, transparent 55px),
    radial-gradient(circle at 58% 48%, rgba(31, 122, 73, .32) 0 62px, transparent 63px),
    radial-gradient(circle at 78% 58%, rgba(59, 151, 82, .36) 0 54px, transparent 55px),
    radial-gradient(circle at 94% 52%, rgba(25, 102, 59, .28) 0 48px, transparent 49px);
  filter: blur(.2px);
}

.jungle-backdrop::after {
  content: "";
  position: absolute;
  left: -10%;
  right: -10%;
  bottom: -48px;
  height: 120px;
  background:
    radial-gradient(ellipse at 8% 78%, #2b8a51 0 54px, transparent 55px),
    radial-gradient(ellipse at 23% 82%, #1f7a48 0 48px, transparent 49px),
    radial-gradient(ellipse at 72% 84%, #2c9c5f 0 56px, transparent 57px),
    radial-gradient(ellipse at 92% 78%, #176b42 0 50px, transparent 51px);
}

.vine {
  opacity: .7;
  width: 12px;
  background:
    radial-gradient(circle at 50% 16px, rgba(134, 239, 172, .85) 0 7px, transparent 8px) 0 0 / 12px 52px repeat-y,
    linear-gradient(90deg, #126c3a, #249454);
}

.vine-one {
  left: 14px;
  height: 58%;
}

.vine-two {
  right: 18px;
  height: 46%;
}

.tree {
  width: 260px;
  height: 330px;
  bottom: -112px;
  opacity: .42;
  filter: saturate(.92);
}

.tree::before {
  left: 116px;
  width: 34px;
  height: 72%;
  border-radius: 999px;
  background: linear-gradient(90deg, #6e421f, #a56739 58%, #714221);
}

.tree::after {
  left: 22px;
  top: 4px;
  width: 220px;
  height: 180px;
  border-radius: 0;
  background:
    radial-gradient(circle at 24% 62%, #2d9b58 0 50px, transparent 51px),
    radial-gradient(circle at 52% 40%, #57b66d 0 72px, transparent 73px),
    radial-gradient(circle at 78% 62%, #217247 0 54px, transparent 55px),
    radial-gradient(circle at 48% 78%, #368e53 0 62px, transparent 63px);
}

.tree-left {
  left: -176px;
}

.tree-right {
  right: -188px;
}

.platform {
  width: clamp(136px, 18vw, 200px);
  min-height: 72px;
  border-color: rgba(46, 111, 52, .5);
  background:
    linear-gradient(180deg, #7bea68 0 17px, #45ac50 18px 25px, #9a6239 26px 100%);
  box-shadow: 0 14px 0 #603715, 0 24px 34px rgba(21, 63, 34, .28);
  transition:
    left .72s cubic-bezier(.22, .86, .28, 1),
    top .72s cubic-bezier(.22, .86, .28, 1),
    transform .2s ease,
    opacity .28s ease;
}

.platform-current span {
  display: none;
}

.platform.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.platform.no-transition {
  transition: none !important;
}

.platform-next.is-appearing {
  animation: blockAppear .42s cubic-bezier(.2, .9, .3, 1.2);
}

@keyframes blockAppear {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.86); }
  100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

.height-meter {
  position: absolute;
  left: 12px;
  top: 108px;
  bottom: 18px;
  z-index: 24;
  width: 40px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  justify-items: center;
  gap: 8px;
  padding: 8px 5px;
  border: 1px solid rgba(255, 255, 255, .6);
  border-radius: 8px;
  background: rgba(255, 255, 255, .74);
  box-shadow: 0 14px 34px rgba(13, 71, 45, .15);
  backdrop-filter: blur(12px);
}

.height-meter-label {
  writing-mode: vertical-rl;
  color: #0f5132;
  font-size: 10px;
  font-weight: 950;
  text-transform: uppercase;
}

.height-meter-track {
  position: relative;
  width: 9px;
  height: 100%;
  min-height: 210px;
  overflow: visible;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(15, 81, 50, .14), rgba(15, 81, 50, .3));
}

.height-meter-fill {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 0%;
  border-radius: inherit;
  background: linear-gradient(180deg, #65e4ff, #27c6a1, #15a45e);
  box-shadow: 0 0 14px rgba(39, 198, 161, .7);
  transition: height .45s ease;
}

.height-meter-robot {
  position: absolute;
  left: 50%;
  bottom: calc(var(--meter-progress) * 1%);
  width: 28px;
  height: 28px;
  border: 3px solid #31586a;
  border-radius: 8px;
  background:
    radial-gradient(circle at 32% 38%, #11c5ff 0 3px, transparent 4px),
    radial-gradient(circle at 68% 38%, #11c5ff 0 3px, transparent 4px),
    linear-gradient(180deg, #f8fbff, #aebfca);
  box-shadow: 0 8px 16px rgba(15, 32, 51, .2);
  transform: translate(-50%, 50%);
  transition: bottom .45s ease;
}

.height-meter strong {
  color: #102033;
  font-size: 12px;
  font-weight: 950;
  white-space: nowrap;
}

.robot {
  width: 84px;
  height: 144px;
  transition:
    left .78s cubic-bezier(.18, .88, .22, 1.16),
    top .78s cubic-bezier(.18, .88, .22, 1.16);
  filter: drop-shadow(0 14px 14px rgba(15, 32, 51, .22));
}

.robot-head {
  left: 14px;
  width: 56px;
  height: 42px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.96), rgba(183,201,213,.96)),
    linear-gradient(90deg, transparent 0 38%, rgba(255,255,255,.3) 39% 46%, transparent 47%);
}

.robot-eye {
  position: absolute;
  display: block;
  z-index: 4;
  top: 12px;
  width: 14px;
  height: 14px;
  border: 2px solid #102033;
  background:
    radial-gradient(circle at 50% 50%, #071624 0 3px, #13c9ff 4px 7px, #e8fbff 8px 100%);
  box-shadow: 0 0 12px rgba(17, 197, 255, .78);
  animation: robotBlink 5s infinite;
}

.robot-eye::after {
  display: none;
}

.robot-eye-left {
  left: 10px;
}

.robot-eye-right {
  right: 10px;
}

@keyframes robotBlink {
  0%, 46%, 50%, 100% { transform: scaleY(1); }
  48% { transform: scaleY(.12); }
}

.robot-mouth {
  left: 19px;
  width: 18px;
  height: 5px;
  background:
    linear-gradient(90deg, #31586a 0 3px, transparent 3px 5px, #31586a 5px 8px, transparent 8px 10px, #31586a 10px 13px, transparent 13px 15px, #31586a 15px);
}

.robot-neck {
  left: 36px;
  top: 58px;
}

.robot-body {
  left: 16px;
  top: 66px;
  width: 52px;
  height: 48px;
}

.robot-core {
  left: 15px;
  top: 11px;
  width: 22px;
  height: 22px;
  animation: corePulse 1.2s ease-in-out infinite;
}

@keyframes corePulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 14px rgba(245, 158, 11, .45); }
  50% { transform: scale(1.08); box-shadow: 0 0 24px rgba(245, 158, 11, .82); }
}

.robot-arm-left {
  left: -4px;
}

.robot-arm-right {
  right: -4px;
}

.robot.is-jumping .robot-arm-left {
  animation: armLiftLeft .72s ease;
}

.robot.is-jumping .robot-arm-right {
  animation: armLiftRight .72s ease;
}

@keyframes armLiftLeft {
  0%, 100% { transform: rotate(0deg); }
  40% { transform: rotate(-18deg); }
}

@keyframes armLiftRight {
  0%, 100% { transform: scaleX(-1) rotate(0deg); }
  40% { transform: scaleX(-1) rotate(-18deg); }
}

.feedback {
  top: 18%;
  background: rgba(15, 32, 51, .9);
}

.menu-card {
  width: min(680px, 100%);
  text-align: left;
  background:
    radial-gradient(circle at 85% 15%, rgba(101, 228, 255, .22), transparent 26%),
    radial-gradient(circle at 12% 86%, rgba(134, 239, 172, .28), transparent 30%),
    rgba(255, 255, 255, .96);
}

.menu-hero {
  display: grid;
  grid-template-columns: 168px 1fr;
  align-items: center;
  gap: 18px;
}

.menu-robot-svg {
  width: 100%;
  max-width: 168px;
  overflow: visible;
}

.svg-bot {
  transform-origin: 90px 130px;
  animation: menuBotFloat 1.8s ease-in-out infinite;
}

.svg-eye {
  filter: drop-shadow(0 0 6px rgba(17, 197, 255, .75));
  animation: svgBlink 4.6s infinite;
}

.svg-antenna-dot {
  animation: antennaGlow 1.2s ease-in-out infinite;
}

.svg-arm-left {
  transform-origin: 64px 96px;
  animation: svgArmLeft 1.8s ease-in-out infinite;
}

.svg-arm-right {
  transform-origin: 116px 96px;
  animation: svgArmRight 1.8s ease-in-out infinite;
}

.svg-shadow {
  animation: menuShadow 1.8s ease-in-out infinite;
}

@keyframes menuBotFloat {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-11px) rotate(1deg); }
}

@keyframes menuShadow {
  0%, 100% { transform: scaleX(1); opacity: 1; }
  50% { transform: scaleX(.78); opacity: .55; }
}

@keyframes svgBlink {
  0%, 43%, 47%, 100% { transform: scaleY(1); }
  45% { transform: scaleY(.16); }
}

@keyframes antennaGlow {
  0%, 100% { filter: drop-shadow(0 0 4px rgba(101, 228, 255, .6)); }
  50% { filter: drop-shadow(0 0 15px rgba(101, 228, 255, 1)); }
}

@keyframes svgArmLeft {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(-9deg); }
}

@keyframes svgArmRight {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(9deg); }
}

.menu-title-copy h2 {
  font-size: clamp(34px, 6vw, 58px);
  line-height: .98;
}

.menu-title-copy p:last-child {
  margin-top: 10px;
  color: #557086;
  font-weight: 750;
}

.mode-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.mode-card {
  position: relative;
  min-height: 118px;
  align-content: end;
  overflow: hidden;
  padding: 16px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.96), rgba(236,253,245,.94));
}

.mode-card::after {
  content: "";
  position: absolute;
  inset: auto -20px -30px auto;
  width: 86px;
  height: 86px;
  border-radius: 50%;
  background: rgba(39, 198, 161, .16);
}

.mode-icon {
  position: absolute;
  left: 14px;
  top: 14px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, #0f5132, #12a37a);
  color: #ffffff !important;
  font-size: 16px !important;
  font-weight: 950 !important;
}

@media (max-width: 720px) {
  .stage-wrap {
    padding-left: 50px;
  }

  .height-meter {
    left: 7px;
    top: 86px;
    bottom: 116px;
    width: 36px;
  }

  .height-meter-track {
    min-height: 150px;
  }

  .platform {
    width: clamp(120px, 36vw, 160px);
  }

  .menu-hero,
  .mode-grid {
    grid-template-columns: 1fr;
  }

  .menu-robot-svg {
    max-width: 150px;
    margin: 0 auto;
  }

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

  .mode-card {
    min-height: 86px;
    padding-left: 72px;
  }
}

/* Cleaner sky corner and cloud layer */
.jungle-backdrop::before {
  left: 0;
  right: 0;
  top: 18px;
  height: 160px;
  background:
    radial-gradient(ellipse at 9% 48%, rgba(255, 255, 255, .86) 0 44px, transparent 45px),
    radial-gradient(ellipse at 15% 42%, rgba(255, 255, 255, .72) 0 66px, transparent 67px),
    radial-gradient(ellipse at 27% 54%, rgba(255, 255, 255, .5) 0 54px, transparent 55px),
    radial-gradient(ellipse at 62% 50%, rgba(255, 255, 255, .34) 0 72px, transparent 73px),
    radial-gradient(ellipse at 87% 46%, rgba(255, 255, 255, .34) 0 60px, transparent 61px);
  filter: blur(.1px);
  opacity: .82;
}

.tree-left {
  display: none;
}

.tree-right {
  opacity: .2;
  right: -210px;
}

.vine-one {
  left: 16px;
  opacity: .38;
}

.sun {
  left: 26px;
  top: 28px;
  opacity: .75;
}

.cloud {
  background:
    radial-gradient(circle at 22% 28%, rgba(255,255,255,.98) 0 28px, transparent 29px),
    radial-gradient(circle at 50% 20%, rgba(255,255,255,.9) 0 36px, transparent 37px),
    radial-gradient(circle at 78% 36%, rgba(255,255,255,.86) 0 29px, transparent 30px),
    linear-gradient(180deg, rgba(255,255,255,.92), rgba(255,255,255,.68));
  box-shadow: 0 18px 40px rgba(87, 151, 163, .16);
}

.cloud-one {
  inset: 72px auto auto 10%;
}

.cloud-two {
  inset: 80px 15% auto auto;
}

@media (max-width: 720px) {
  .jungle-backdrop::before {
    top: 20px;
    height: 120px;
    opacity: .68;
  }

  .cloud-one {
    left: 22%;
  }
}

/* Final art cleanup: no tree props, larger robot, feet anchored to platform. */
.tree,
.tree-left,
.tree-right {
  display: none !important;
}

.jungle-backdrop::before {
  top: 22px !important;
  height: 125px !important;
  background:
    radial-gradient(ellipse at 9% 35%, rgba(255, 255, 255, .92) 0 42px, transparent 43px),
    radial-gradient(ellipse at 17% 30%, rgba(255, 255, 255, .82) 0 58px, transparent 59px),
    radial-gradient(ellipse at 30% 44%, rgba(255, 255, 255, .48) 0 46px, transparent 47px),
    radial-gradient(ellipse at 68% 48%, rgba(255, 255, 255, .34) 0 64px, transparent 65px),
    radial-gradient(ellipse at 92% 44%, rgba(255, 255, 255, .32) 0 54px, transparent 55px) !important;
  opacity: .78 !important;
}

.robot {
  width: clamp(118px, 8.5vw, 154px) !important;
  height: clamp(178px, 13vw, 232px) !important;
}

.robot-svg-shadow {
  opacity: .16;
}

@media (max-width: 720px) {
  .robot {
    width: clamp(92px, 24vw, 124px) !important;
    height: clamp(138px, 36vw, 188px) !important;
  }
}


/* Visual update: clean sky, full-height climb meter, friendlier robot. */
.game-app {
  min-height: 540px;
  background:
    radial-gradient(circle at 28% 8%, rgba(255, 255, 255, .45), rgba(255, 255, 255, 0) 18%),
    linear-gradient(180deg, #86dcff 0%, #c8f5f3 46%, #afe19a 76%, #5b8e49 100%) !important;
}

.game-app::before {
  display: none !important;
}

.game-topbar {
  display: none !important;
}

.stage-wrap {
  inset: 0 0 108px !important;
  padding: 14px 12px 10px 118px !important;
}

.stage {
  min-height: 0 !important;
  border-radius: 0 !important;
  background:
    radial-gradient(ellipse at 72% 12%, rgba(255, 255, 255, .24) 0 5%, transparent 11%),
    linear-gradient(180deg, rgba(255,255,255,.13), rgba(255,255,255,0) 40%) !important;
}

.jungle-backdrop::before,
.jungle-backdrop::after,
.sun,
.vine,
.vine-one,
.vine-two,
.tree,
.tree-left,
.tree-right,
.bush,
.bush-one,
.bush-two {
  display: none !important;
}

.cloud {
  display: block !important;
  height: 48px !important;
  border-radius: 999px !important;
  background:
    radial-gradient(circle at 22% 40%, rgba(255,255,255,.78) 0 26px, transparent 27px),
    radial-gradient(circle at 48% 26%, rgba(255,255,255,.82) 0 36px, transparent 37px),
    radial-gradient(circle at 76% 44%, rgba(255,255,255,.72) 0 28px, transparent 29px),
    linear-gradient(180deg, rgba(255,255,255,.72), rgba(255,255,255,.38)) !important;
  box-shadow: 0 18px 38px rgba(82, 154, 171, .12) !important;
  opacity: .58 !important;
  filter: blur(.2px) !important;
}

.cloud-one {
  inset: 68px auto auto 29% !important;
  width: 170px !important;
  transform: scale(.9) !important;
}

.cloud-two {
  inset: 74px 8% auto auto !important;
  width: 132px !important;
  transform: scale(.62) !important;
}

.height-meter {
  left: 18px !important;
  top: 16px !important;
  bottom: 18px !important;
  width: 118px !important;
  padding: 14px 12px 34px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 0 !important;
  border: 1px solid rgba(255, 255, 255, .72) !important;
  border-radius: 18px !important;
  background: linear-gradient(180deg, rgba(255,255,255,.95), rgba(255,255,255,.78)) !important;
  box-shadow: 0 22px 48px rgba(32, 87, 63, .18) !important;
  backdrop-filter: blur(16px) !important;
  overflow: hidden !important;
}

.height-meter-label {
  writing-mode: horizontal-tb !important;
  color: #157342 !important;
  font-size: 15px !important;
  line-height: 1 !important;
  font-weight: 950 !important;
  letter-spacing: .04em !important;
  text-transform: uppercase !important;
}

.height-meter::before {
  content: "★";
  position: absolute;
  left: 50%;
  top: 58px;
  z-index: 4;
  color: #ffcc35;
  font-size: 36px;
  line-height: 1;
  text-shadow:
    0 2px 0 rgba(170, 116, 12, .28),
    0 0 18px rgba(255, 205, 53, .54);
  transform: translateX(-50%);
}

.height-meter::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 64px;
  z-index: 3;
  width: 76px;
  height: 46px;
  transform: translateX(-50%);
  background:
    radial-gradient(circle at 16% 55%, rgba(255, 204, 53, .72) 0 2px, transparent 3px),
    radial-gradient(circle at 84% 42%, rgba(255, 204, 53, .62) 0 2px, transparent 3px),
    linear-gradient(30deg, transparent 0 44%, rgba(255, 204, 53, .65) 45% 48%, transparent 49%),
    linear-gradient(-28deg, transparent 0 45%, rgba(255, 204, 53, .6) 46% 49%, transparent 50%);
  opacity: .75;
  pointer-events: none;
}

.height-meter-track {
  flex: 1 1 auto !important;
  width: 26px !important;
  min-height: 0 !important;
  height: auto !important;
  margin-top: 92px !important;
  margin-bottom: 44px !important;
  border-radius: 999px !important;
  overflow: visible !important;
  background:
    repeating-linear-gradient(180deg, transparent 0 48px, rgba(255,255,255,.42) 49px 51px, transparent 52px 96px),
    linear-gradient(180deg, rgba(15, 81, 50, .18), rgba(15, 81, 50, .28)) !important;
  box-shadow:
    inset 0 0 0 1px rgba(15, 81, 50, .1),
    inset 0 12px 16px rgba(255,255,255,.3) !important;
}

.height-meter-track::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -24px;
  width: 54px;
  height: 42px;
  border-radius: 8px 8px 6px 6px;
  background: linear-gradient(180deg, #2dd866, #159947) !important;
  clip-path: polygon(50% 0, 100% 48%, 77% 48%, 77% 100%, 23% 100%, 23% 48%, 0 48%);
  box-shadow: 0 12px 20px rgba(11, 112, 52, .24);
  transform: translateX(-50%);
}

.height-meter-fill {
  left: 0 !important;
  right: 0 !important;
  border-radius: 999px !important;
  background:
    linear-gradient(180deg, rgba(255,255,255,.2), rgba(255,255,255,0) 24%),
    linear-gradient(180deg, #23d86e 0%, #63e84b 58%, #d5fb25 100%) !important;
  box-shadow: 0 0 18px rgba(51, 221, 104, .72) !important;
  transition: height .5s cubic-bezier(.22, .86, .28, 1) !important;
}

.height-meter-robot {
  width: 50px !important;
  height: 40px !important;
  border: 4px solid #31586a !important;
  border-radius: 13px !important;
  background:
    radial-gradient(circle at 32% 44%, #12d8ff 0 5px, transparent 6px),
    radial-gradient(circle at 68% 44%, #12d8ff 0 5px, transparent 6px),
    linear-gradient(#31586a 0 0) 18px 25px / 14px 3px no-repeat,
    linear-gradient(180deg, #fbfdff, #aebfca) !important;
  box-shadow: 0 10px 18px rgba(15, 32, 51, .22) !important;
  transform: translate(-50%, 50%) !important;
  transition: bottom .5s cubic-bezier(.22, .86, .28, 1) !important;
}

.height-meter-robot::before,
.height-meter-robot::after {
  content: "";
  position: absolute;
  bottom: -9px;
  width: 5px;
  height: 9px;
  border-radius: 999px;
  background: #31586a;
}

.height-meter-robot::before { left: 9px; }
.height-meter-robot::after { right: 9px; }

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

.platform {
  width: clamp(176px, 18vw, 254px) !important;
  min-height: 74px !important;
  padding: 12px 16px 18px !important;
  border-radius: 12px !important;
  border-color: rgba(46, 111, 52, .5) !important;
  background:
    linear-gradient(180deg, #73dc5e 0 18px, #3eaa4b 19px 28px, #a46a3f 29px 100%) !important;
  box-shadow: 0 15px 0 #5f3817, 0 25px 38px rgba(21, 63, 34, .28) !important;
  font-size: clamp(28px, 3.7vw, 48px) !important;
}

.platform::before {
  top: -15px !important;
  height: 30px !important;
  left: 10px !important;
  right: 10px !important;
  border-radius: 999px 999px 10px 10px !important;
  background:
    radial-gradient(circle at 9% 50%, #a4f164 0 9px, transparent 10px),
    radial-gradient(circle at 24% 40%, #74d850 0 11px, transparent 12px),
    radial-gradient(circle at 45% 50%, #c5fa75 0 10px, transparent 11px),
    radial-gradient(circle at 68% 46%, #7be354 0 12px, transparent 13px),
    radial-gradient(circle at 88% 52%, #a4f164 0 10px, transparent 11px),
    linear-gradient(180deg, #72db5e, #39a549) !important;
}

.robot {
  width: clamp(132px, 9vw, 166px) !important;
  height: clamp(190px, 13.8vw, 250px) !important;
  filter: drop-shadow(0 16px 14px rgba(15, 32, 51, .22)) !important;
}

.robot-svg-eye {
  filter: drop-shadow(0 0 8px rgba(17, 197, 255, .7)) !important;
}

.answer-dock {
  left: 12px !important;
  right: 12px !important;
  bottom: 12px !important;
  padding: 12px !important;
  gap: 12px !important;
  border-radius: 12px !important;
  background: rgba(255, 255, 255, .86) !important;
  box-shadow: 0 18px 44px rgba(13, 71, 45, .22) !important;
}

.answer-btn {
  min-height: 70px !important;
  border-radius: 10px !important;
  background: linear-gradient(180deg, #ffffff, #edf8f2) !important;
  box-shadow: inset 0 0 0 1px rgba(15, 32, 51, .1), 0 8px 0 #b3cdbf !important;
  font-size: clamp(34px, 5vw, 54px) !important;
}

.answer-btn.correct {
  background: linear-gradient(180deg, #dcfce7, #86efac) !important;
}

.answer-btn.wrong {
  background: linear-gradient(180deg, #fee2e2, #fca5a5) !important;
}

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

  .height-meter {
    left: 8px !important;
    top: 10px !important;
    bottom: 12px !important;
    width: 58px !important;
    padding: 10px 6px 26px !important;
    border-radius: 14px !important;
  }

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

  .height-meter::before {
    top: 38px !important;
    font-size: 24px !important;
  }

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

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

  .height-meter-track::before {
    top: -17px !important;
    width: 36px !important;
    height: 28px !important;
  }

  .height-meter-robot {
    width: 36px !important;
    height: 30px !important;
    border-width: 3px !important;
  }

  .platform {
    width: clamp(120px, 34vw, 160px) !important;
    min-height: 60px !important;
    font-size: clamp(22px, 7vw, 34px) !important;
  }

  .robot {
    width: clamp(92px, 24vw, 124px) !important;
    height: clamp(138px, 36vw, 188px) !important;
  }

  .answer-dock {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 9px !important;
    padding: 10px !important;
  }

  .answer-btn {
    min-height: 54px !important;
  }
}

/* Keep the full-height meter close to the left edge on wide screens. */
@media (min-width: 721px) {
  .stage-wrap {
    padding: 14px 12px 10px 12px !important;
  }
}


/* Top-right hearts and smoother motion update. */
.heart-bar {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 35;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 34px;
  padding: 6px 9px;
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: 999px;
  background: rgba(255, 255, 255, .72);
  box-shadow: 0 12px 30px rgba(15, 32, 51, .14);
  backdrop-filter: blur(12px);
  pointer-events: none;
}

.heart {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  color: #ff3f64;
  font-size: 18px;
  line-height: 1;
  text-shadow: 0 2px 0 rgba(140, 18, 42, .18), 0 0 10px rgba(255, 63, 100, .32);
  transform-origin: center;
  transition: opacity .28s ease, transform .28s ease, width .28s ease, margin .28s ease;
}

.heart.is-alive {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
}

.heart.is-lost {
  width: 0;
  margin-left: -5px;
  opacity: 0;
  transform: translate3d(0, -8px, 0) scale(.25) rotate(-18deg);
}

.stage,
.climb-layer,
.platform,
.robot {
  backface-visibility: hidden;
  transform-style: preserve-3d;
}

.climb-layer {
  transform: translate3d(0, calc(var(--camera-offset) * 1%), 0) !important;
}

.platform,
.robot,
.height-meter-fill,
.height-meter-robot {
  will-change: transform, left, top, height, bottom;
}

@media (max-width: 720px) {
  .heart-bar {
    top: 10px;
    right: 10px;
    gap: 3px;
    min-height: 28px;
    padding: 5px 7px;
  }

  .heart {
    width: 15px;
    height: 15px;
    font-size: 15px;
  }
}

/* Edge-aligned height meter fix: keep the meter almost touching the left side on every screen size. */
.stage-wrap {
  padding-left: max(6px, env(safe-area-inset-left)) !important;
  padding-right: max(6px, env(safe-area-inset-right)) !important;
}

.stage {
  overflow: hidden !important;
}

.height-meter {
  left: max(6px, env(safe-area-inset-left)) !important;
}

@media (max-width: 720px) {
  .stage-wrap {
    padding-left: max(4px, env(safe-area-inset-left)) !important;
    padding-right: max(4px, env(safe-area-inset-right)) !important;
  }

  .height-meter {
    left: max(4px, env(safe-area-inset-left)) !important;
    bottom: 58px !important;
  }

  .height-meter-track {
    margin-bottom: 18px !important;
  }
}

@media (max-width: 420px) {
  .height-meter {
    left: max(3px, env(safe-area-inset-left)) !important;
    bottom: 74px !important;
  }
}

/* Robot Canyon Crossing theme. */
.game-app {
  background:
    radial-gradient(circle at 24% 10%, rgba(255, 248, 214, .72), rgba(255, 248, 214, 0) 18%),
    linear-gradient(180deg, #8dd7ff 0%, #ffd89b 46%, #d28b4a 74%, #7b4a2a 100%) !important;
}

.asset-loader {
  background:
    radial-gradient(circle at 22% 18%, rgba(255, 248, 214, .82), transparent 18%),
    radial-gradient(circle at 78% 22%, rgba(237, 137, 54, .38), transparent 25%),
    linear-gradient(135deg, #4b2d1d 0%, #b86b32 50%, #102033 100%) !important;
}

.loader-brand span {
  background: linear-gradient(135deg, #102033 0%, #b45309 52%, #facc15 100%) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
}

.jungle-backdrop {
  background:
    linear-gradient(24deg, transparent 0 58%, rgba(100, 58, 30, .22) 59% 64%, transparent 65%),
    linear-gradient(-22deg, transparent 0 54%, rgba(120, 70, 35, .18) 55% 61%, transparent 62%) !important;
}

.cloud {
  opacity: .42 !important;
}

.platform {
  border-color: rgba(111, 68, 32, .52) !important;
  background:
    linear-gradient(180deg, #f6c453 0 18px, #c47a34 19px 28px, #8c4c28 29px 100%) !important;
  box-shadow: 0 15px 0 #563018, 0 25px 38px rgba(75, 45, 29, .3) !important;
}

.platform::before {
  background:
    radial-gradient(circle at 9% 50%, #ffe18a 0 9px, transparent 10px),
    radial-gradient(circle at 25% 42%, #e9aa48 0 11px, transparent 12px),
    radial-gradient(circle at 47% 50%, #ffd57a 0 10px, transparent 11px),
    radial-gradient(circle at 69% 46%, #d48738 0 12px, transparent 13px),
    radial-gradient(circle at 88% 52%, #ffc766 0 10px, transparent 11px),
    linear-gradient(180deg, #f6c453, #bd6f31) !important;
}

.height-meter-label {
  color: #9a4f18 !important;
}

.height-meter-track::before {
  background: linear-gradient(180deg, #f59e0b, #b45309) !important;
}

.height-meter-fill {
  background:
    linear-gradient(180deg, rgba(255,255,255,.22), rgba(255,255,255,0) 24%),
    linear-gradient(180deg, #facc15 0%, #f59e0b 58%, #b45309 100%) !important;
  box-shadow: 0 0 18px rgba(245, 158, 11, .72) !important;
}

.robot-svg-bot {
  filter: hue-rotate(154deg) saturate(1.15);
}

.answer-btn {
  background: linear-gradient(180deg, #ffffff, #fff7ed) !important;
  box-shadow: inset 0 0 0 1px rgba(75, 45, 29, .12), 0 8px 0 #d8b58e !important;
}

.primary-action {
  background: linear-gradient(135deg, #b45309, #0f766e) !important;
}

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

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

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

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

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

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

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

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

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

  .platform {
    width: clamp(148px, 24vw, 184px) !important;
    min-height: 50px !important;
    padding: 14px 8px 8px !important;
    font-size: clamp(18px, 3.6vw, 24px) !important;
  }

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

  .robot {
    width: clamp(70px, 13vw, 96px) !important;
    height: clamp(104px, 20vw, 144px) !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;
    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-card::after {
    display: none !important;
  }

  .mode-icon {
    position: static !important;
    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;
}

/* Robot Canyon: keep answers edge-to-edge and keep equations below the grass cap. */
.answer-dock {
  left: max(4px, env(safe-area-inset-left)) !important;
  right: max(4px, env(safe-area-inset-right)) !important;
  width: auto !important;
  max-width: none !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: clamp(6px, 1vw, 12px) !important;
  padding: clamp(6px, 1vw, 12px) !important;
  box-sizing: border-box !important;
}

.platform {
  display: grid !important;
  grid-template-rows: clamp(30px, 3.7vw, 36px) minmax(0, 1fr) !important;
  align-items: center !important;
  justify-items: center !important;
  min-height: clamp(64px, 8vw, 88px) !important;
  padding: 0 10px 8px !important;
}

.platform span,
#problemText,
#currentBlockText {
  grid-row: 2 !important;
  position: relative;
  z-index: 1;
  align-self: center !important;
  justify-self: center !important;
  transform: none !important;
  text-align: center;
}
