/* ---------- Planet Sort mini game ---------- */
.planet-sort-level {
  position: fixed;
  inset: 0;
  z-index: 30;
  overflow: auto;
  display: grid;
  place-items: center;
  padding: 82px clamp(16px, 3vw, 36px) 28px;
  background:
    radial-gradient(
      circle at 28% 32%,
      rgba(126, 231, 255, 0.16),
      transparent 34%
    ),
    radial-gradient(
      circle at 78% 68%,
      rgba(255, 214, 107, 0.16),
      transparent 30%
    ),
    linear-gradient(180deg, rgba(7, 7, 20, 0.2), rgba(7, 7, 20, 0.92)), #070714;
}
.planet-sort-back {
  position: fixed;
  left: 24px;
  top: 24px;
  z-index: 44;
  min-height: 60px;
  border: 1px solid var(--panel-border);
  border-radius: 999px;
  background: rgba(13, 12, 32, 0.78);
  color: var(--ink);
  font-family: inherit;
  font-size: 13px;
  font-weight: 900;
  padding: 12px 18px;
  cursor: pointer;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.planet-sort-shell {
  position: relative;
  z-index: 34;
  width: min(1080px, 100%);
  display: grid;
  grid-template-columns: minmax(260px, 0.64fr) minmax(0, 1fr);
  align-items: stretch;
  gap: clamp(16px, 3vw, 30px);
}
.planet-sort-copy {
  display: grid;
  align-content: center;
  gap: 16px;
  min-height: 520px;
}
.planet-sort-copy > span {
  color: var(--accent);
  font-size: 13px;
  font-weight: 1000;
  text-transform: uppercase;
}
.planet-sort-copy h1 {
  max-width: 440px;
  color: #fff7d8;
  font-family: "Fraunces", serif;
  font-size: clamp(42px, 6vw, 74px);
  font-weight: 500;
  line-height: 0.92;
}
.planet-sort-copy p {
  max-width: 390px;
  color: var(--ink-dim);
  font-size: 17px;
  line-height: 1.35;
}
.planet-sort-message {
  min-height: 86px;
  width: min(390px, 100%);
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  background: rgba(13, 12, 32, 0.76);
  color: #fff7d8;
  padding: 15px 17px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.planet-sort-message.good {
  border-color: rgba(255, 214, 107, 0.5);
  background: rgba(72, 54, 10, 0.58);
}
.planet-sort-message.try {
  border-color: rgba(126, 231, 255, 0.42);
  background: rgba(24, 55, 76, 0.56);
}
.planet-sort-message img {
  width: 52px;
  height: 52px;
  object-fit: contain;
}
.planet-sort-message strong {
  font-size: 16px;
  line-height: 1.3;
}
.planet-sort-comparison {
  width: min(390px, 100%);
  display: grid;
  gap: 7px;
  padding: 12px;
  border: 1px solid rgba(126, 231, 255, 0.24);
  border-radius: 8px;
  background: rgba(10, 38, 68, 0.58);
}
.planet-sort-comparison > strong {
  color: #fff7d8;
  font-size: 14px;
  font-weight: 1000;
}
.planet-sort-comparison span {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}
.planet-sort-comparison em {
  overflow: hidden;
  color: #d8f5ff;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.planet-sort-comparison i {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
}
.planet-sort-comparison b {
  display: block;
  height: 100%;
  min-width: 12px;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(126, 231, 255, 0.72), rgba(255, 214, 107, 0.86));
}
.planet-sort-progress {
  display: flex;
  gap: 10px;
}
.planet-sort-progress span {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}
.planet-sort-progress span.on {
  background: var(--accent);
  box-shadow: 0 0 16px rgba(255, 214, 107, 0.72);
}
.planet-sort-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.planet-sort-actions button {
  min-height: 52px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(13, 12, 32, 0.76);
  color: var(--ink);
  font: inherit;
  font-weight: 900;
  padding: 12px 18px;
  cursor: pointer;
}
.planet-sort-actions button:first-child {
  border-color: transparent;
  background: var(--accent);
  color: #1b1308;
}
.planet-sort-choices {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
}
.game-keyboard-status {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.planet-sort-card {
  min-height: 520px;
  display: grid;
  grid-template-rows: minmax(250px, 1fr) auto auto;
  justify-items: center;
  align-items: center;
  gap: 9px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 38%),
    rgba(13, 12, 32, 0.72);
  color: var(--ink);
  font-family: inherit;
  padding: 18px 12px 22px;
  cursor: pointer;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.36);
  transition:
    border-color 0.18s ease,
    transform 0.18s ease,
    box-shadow 0.18s ease;
}
.planet-sort-card:hover,
.planet-sort-card:focus-visible,
.planet-sort-card.selected {
  border-color: rgba(255, 214, 107, 0.55);
  transform: translateY(-3px);
  box-shadow:
    0 26px 66px rgba(0, 0, 0, 0.42),
    0 0 0 5px rgba(255, 214, 107, 0.09);
  outline: none;
}
.planet-sort-card.correct {
  border-color: rgba(255, 214, 107, 0.82);
  background:
    radial-gradient(
      circle at 50% 32%,
      rgba(255, 214, 107, 0.22),
      transparent 46%
    ),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 38%),
    rgba(72, 54, 10, 0.62);
  box-shadow:
    0 26px 66px rgba(0, 0, 0, 0.42),
    0 0 0 6px rgba(255, 214, 107, 0.12),
    0 0 28px rgba(255, 214, 107, 0.3);
}
.planet-sort-card.wrong {
  border-color: rgba(126, 231, 255, 0.58);
  animation: planet-sort-wiggle 0.36s ease-in-out;
}
.planet-sort-card.hint {
  border-color: rgba(255, 214, 107, 0.72);
  box-shadow:
    0 26px 66px rgba(0, 0, 0, 0.42),
    0 0 0 7px rgba(255, 214, 107, 0.12),
    0 0 28px rgba(255, 214, 107, 0.28);
}
.planet-sort-card:disabled {
  cursor: default;
  opacity: 0.72;
}
@keyframes planet-sort-wiggle {
  0%,
  100% {
    transform: translateX(0);
  }
  30% {
    transform: translateX(-7px);
  }
  66% {
    transform: translateX(7px);
  }
}
.planet-sort-planet-wrap {
  min-height: 250px;
  display: grid;
  place-items: center;
  width: 100%;
}
.planet-sort-planet {
  position: relative;
  display: block;
  max-width: 100%;
  max-height: 230px;
}
.planet-sort-card strong {
  color: #fff7d8;
  font-family: "Fraunces", serif;
  font-size: 30px;
  font-weight: 500;
  line-height: 1;
}
.planet-sort-card small {
  min-height: 34px;
  color: var(--ink-dim);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
}
@media (max-width: 840px) {
  .planet-sort-level {
    align-items: start;
    padding: 78px 14px 20px;
  }
  .planet-sort-back {
    left: 14px;
    top: 14px;
  }
  .planet-sort-shell {
    grid-template-columns: 1fr;
  }
  .planet-sort-copy {
    min-height: 0;
    justify-items: center;
    text-align: center;
  }
  .planet-sort-copy h1 {
    font-size: clamp(36px, 11vw, 56px);
  }
  .planet-sort-choices {
    grid-template-columns: 1fr;
  }
  .planet-sort-card {
    min-height: 138px;
    grid-template-columns: 112px minmax(0, 1fr);
    grid-template-rows: auto auto;
    justify-items: start;
    padding: 12px;
    text-align: left;
  }
  .planet-sort-planet-wrap {
    grid-row: 1 / 3;
    min-height: 112px;
  }
  .planet-sort-planet {
    max-width: 106px;
    max-height: 106px;
  }
}

/* ---------- Engine Match mini game ---------- */
.engine-match-level {
  position: fixed;
  inset: 0;
  z-index: 30;
  overflow: auto;
  display: grid;
  place-items: center;
  padding: 82px clamp(16px, 3vw, 36px) 28px;
  background:
    radial-gradient(
      circle at 22% 72%,
      rgba(255, 103, 72, 0.18),
      transparent 32%
    ),
    radial-gradient(
      circle at 80% 28%,
      rgba(126, 231, 255, 0.15),
      transparent 30%
    ),
    linear-gradient(180deg, rgba(7, 7, 20, 0.16), rgba(7, 7, 20, 0.94)), #070714;
}
.engine-match-shell {
  position: relative;
  z-index: 34;
  width: min(1040px, 100%);
  display: grid;
  grid-template-columns: minmax(260px, 0.72fr) minmax(320px, 1fr);
  align-items: center;
  gap: clamp(18px, 5vw, 54px);
}
.engine-match-rocket {
  position: relative;
  min-height: 560px;
  display: grid;
  place-items: center;
  isolation: isolate;
}
.engine-match-rocket img:first-child,
.engine-match-hero-rocket {
  width: min(320px, 72vw);
  height: auto;
  filter: drop-shadow(0 28px 46px rgba(0, 0, 0, 0.46));
  transform: rotate(-2deg);
}
.engine-match-art-v2 .engine-match-hero-rocket {
  width: min(340px, 72vw);
  transform: rotate(0deg);
}
.engine-match-installed-part {
  position: absolute;
  z-index: 2;
  height: auto;
  object-fit: contain;
  filter:
    drop-shadow(0 10px 16px rgba(0, 0, 0, 0.44))
    drop-shadow(0 0 16px rgba(255, 214, 107, 0.3));
  animation: engine-part-install 0.42s ease-out both;
  pointer-events: none;
}
.engine-match-installed-part.installed-fuelTank {
  left: 52%;
  top: 48%;
  width: min(70px, 15vw);
  transform: translate(-50%, -50%) rotate(0deg);
}
.engine-match-installed-part.installed-igniter {
  left: 50%;
  top: 70%;
  width: min(46px, 10vw);
  transform: translate(-50%, -50%) rotate(0deg);
}
.engine-match-installed-part.installed-engine {
  left: 50%;
  top: 76%;
  width: min(78px, 15vw);
  transform: translate(-50%, -50%) rotate(0deg);
}
.engine-match-fire {
  position: absolute;
  left: 50%;
  bottom: 50px;
  width: 120px;
  height: auto;
  transform: translateX(-50%) rotate(-8deg);
  filter: drop-shadow(0 0 26px rgba(255, 136, 70, 0.55));
  animation: rocket-flame-flicker 0.22s ease-in-out infinite alternate;
}
.engine-match-panel {
  display: grid;
  gap: 16px;
}
.engine-match-panel > span {
  color: var(--accent);
  font-size: 13px;
  font-weight: 1000;
  text-transform: uppercase;
}
.engine-match-panel h1 {
  color: #fff7d8;
  font-family: "Fraunces", serif;
  font-size: clamp(42px, 6vw, 74px);
  font-weight: 500;
  line-height: 0.92;
}
.engine-match-panel p {
  max-width: 470px;
  color: var(--ink-dim);
  font-size: 17px;
  line-height: 1.35;
}
.engine-match-guide-button {
  width: 60px;
  min-width: 60px;
  height: 60px;
  min-height: 60px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(126, 231, 255, 0.32);
  border-radius: 50%;
  background: rgba(13, 12, 32, 0.72);
  color: #fff7d8;
  font: inherit;
  font-size: 22px;
  font-weight: 1000;
  padding: 0;
  cursor: pointer;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.24);
}
.engine-match-guide-button:hover,
.engine-match-guide-button:focus-visible {
  border-color: rgba(255, 214, 107, 0.62);
  outline: 3px solid rgba(255, 214, 107, 0.86);
  outline-offset: 3px;
}
.engine-match-message {
  min-height: 74px;
  display: grid;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  background: rgba(13, 12, 32, 0.76);
  color: #fff7d8;
  padding: 15px 17px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.engine-match-message.done {
  border-color: rgba(255, 214, 107, 0.5);
  background: rgba(72, 54, 10, 0.58);
}
.engine-match-force-chain {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}
.engine-match-force-chain span {
  min-height: 64px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 4px;
  padding: 8px 6px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
  color: rgba(237, 246, 255, 0.66);
  text-align: center;
}
.engine-match-force-chain span.on {
  border-color: rgba(255, 214, 107, 0.56);
  background: rgba(255, 214, 107, 0.16);
  color: #fff7d8;
  box-shadow: 0 0 20px rgba(255, 214, 107, 0.14);
}
.engine-match-force-chain b {
  font-size: 21px;
  line-height: 1;
}
.engine-match-force-chain strong {
  font-size: 11px;
  font-weight: 1000;
  line-height: 1.08;
}
.engine-match-progress {
  display: flex;
  gap: 10px;
}
.engine-match-progress span {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}
.engine-match-progress span.on {
  background: var(--accent);
  box-shadow: 0 0 16px rgba(255, 214, 107, 0.72);
}
.engine-match-choices {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.engine-match-choices button {
  min-height: 210px;
  display: grid;
  grid-template-rows: 126px minmax(34px, auto);
  justify-items: center;
  align-items: center;
  gap: 10px;
  min-width: 0;
  overflow: hidden;
  position: relative;
  isolation: isolate;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), transparent 46%),
    rgba(13, 12, 32, 0.74);
  color: #fff7d8;
  font: inherit;
  font-weight: 900;
  padding: 14px 10px 16px;
  cursor: pointer;
  box-shadow: 0 20px 54px rgba(0, 0, 0, 0.34);
  transition:
    border-color 0.18s ease,
    transform 0.18s ease,
    box-shadow 0.18s ease;
}
.engine-match-choices button:hover,
.engine-match-choices button:focus-visible,
.engine-match-choices button.selected {
  border-color: rgba(255, 214, 107, 0.55);
  transform: translateY(-3px);
  box-shadow:
    0 26px 66px rgba(0, 0, 0, 0.42),
    0 0 0 5px rgba(255, 214, 107, 0.09);
  outline: none;
}
.engine-match-choices button.correct {
  border-color: rgba(255, 214, 107, 0.82);
  background:
    radial-gradient(
      circle at 50% 32%,
      rgba(255, 214, 107, 0.22),
      transparent 46%
    ),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 38%),
    rgba(72, 54, 10, 0.62);
  box-shadow:
    0 26px 66px rgba(0, 0, 0, 0.42),
    0 0 0 6px rgba(255, 214, 107, 0.12),
    0 0 28px rgba(255, 214, 107, 0.3);
}
.engine-match-choices button.wrong {
  border-color: rgba(126, 231, 255, 0.58);
  animation: planet-sort-wiggle 0.36s ease-in-out;
}
.engine-match-choices button.needs-hint {
  border-color: rgba(255, 214, 107, 0.76);
  box-shadow:
    0 26px 66px rgba(0, 0, 0, 0.42),
    0 0 0 7px rgba(255, 214, 107, 0.12),
    0 0 28px rgba(255, 214, 107, 0.28);
}
.engine-match-choices img {
  width: auto;
  max-width: min(132px, 82%);
  max-height: 132px;
  object-fit: contain;
  filter: drop-shadow(0 14px 24px rgba(0, 0, 0, 0.38));
}
.engine-match-part-art {
  display: block;
  width: auto;
  height: auto;
  align-self: end;
  max-width: min(136px, 84%);
  max-height: 118px;
  min-height: 76px;
}
.engine-match-choices strong {
  position: relative;
  z-index: 2;
  align-self: start;
  font-size: 15px;
  line-height: 1.15;
  text-align: center;
  max-width: 100%;
}
@media (max-width: 840px) {
  .engine-match-level {
    align-items: start;
    padding: 78px 14px 20px;
  }
  .engine-match-shell {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .engine-match-rocket {
    min-height: 120px;
  }
  .engine-match-rocket img:first-child,
  .engine-match-hero-rocket {
    width: 132px;
  }
  .engine-match-fire {
    bottom: -2px;
    width: 44px;
  }
  .engine-match-panel {
    justify-items: center;
    text-align: center;
  }
  .engine-match-guide-button {
    justify-self: center;
  }
  .engine-match-panel h1 {
    font-size: clamp(32px, 10vw, 48px);
  }
  .engine-match-choices {
    width: 100%;
    grid-template-columns: 1fr;
  }
  .engine-match-choices button {
    min-height: 94px;
    grid-template-columns: 86px minmax(0, 1fr);
    grid-template-rows: 1fr;
    justify-items: start;
    text-align: left;
  }
  .engine-match-choices img {
    width: 70px;
    max-height: 76px;
  }
  .engine-match-part-art {
    width: 70px;
    max-height: 76px;
    min-height: 62px;
    align-self: center;
  }
}
@keyframes engine-part-install {
  0% {
    opacity: 0;
    scale: 0.7;
  }
  72% {
    opacity: 1;
    scale: 1.12;
  }
  100% {
    opacity: 1;
    scale: 1;
  }
}

/* ---------- Asteroid Dodge mini game ---------- */
.asteroid-dodge-level {
  position: fixed;
  inset: 0;
  z-index: 30;
  overflow: auto;
  display: grid;
  place-items: center;
  padding: 82px clamp(16px, 3vw, 36px) 28px;
  background:
    radial-gradient(
      circle at 18% 24%,
      rgba(255, 180, 86, 0.16),
      transparent 32%
    ),
    radial-gradient(
      circle at 78% 70%,
      rgba(126, 231, 255, 0.15),
      transparent 31%
    ),
    linear-gradient(180deg, rgba(7, 7, 20, 0.12), rgba(7, 7, 20, 0.94)), #070714;
}
.asteroid-dodge-level.playing {
  display: block;
  overflow: hidden;
  padding: 0;
}
.asteroid-dodge-opening {
  position: relative;
  z-index: 34;
  width: min(1080px, 100%);
  min-height: min(690px, calc(100vh - 126px));
  display: grid;
  grid-template-columns: minmax(320px, 1.05fr) minmax(280px, 0.72fr);
  align-items: center;
  gap: clamp(18px, 4vw, 44px);
}
.asteroid-dodge-opening-art {
  position: relative;
  min-height: 590px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 28px;
  background: #070714;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.42);
  isolation: isolate;
}
.asteroid-opening-bg,
.asteroid-track-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.asteroid-opening-bg {
  opacity: 0.96;
  animation: asteroid-bg-drift 9s ease-in-out infinite alternate;
}
.asteroid-dodge-opening-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      circle at 50% 55%,
      transparent 0 36%,
      rgba(7, 7, 20, 0.28) 70%
    ),
    linear-gradient(180deg, transparent 0 58%, rgba(7, 7, 20, 0.36));
  pointer-events: none;
}
.asteroid-opening-rocket {
  position: absolute;
  left: 15%;
  bottom: 7%;
  z-index: 2;
  width: min(270px, 39%);
  height: auto;
  transform: rotate(-12deg);
  filter: drop-shadow(0 28px 36px rgba(0, 0, 0, 0.42));
  animation: asteroid-rocket-float 2.4s ease-in-out infinite;
}
.asteroid-opening-rock {
  position: absolute;
  z-index: 2;
  height: auto;
  filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.45));
}
.asteroid-opening-rock.rock-one {
  top: 11%;
  right: 18%;
  width: min(150px, 24%);
  animation: asteroid-opening-rock-one 4.6s ease-in-out infinite;
}
.asteroid-opening-rock.rock-two {
  top: 44%;
  right: 8%;
  width: min(118px, 20%);
  animation: asteroid-opening-rock-two 5.2s ease-in-out infinite;
}
.asteroid-secret-hotspot {
  position: absolute;
  z-index: 5;
  top: 39%;
  right: 4%;
  width: min(170px, 28%);
  height: min(170px, 28%);
  border: 0;
  background: transparent;
  cursor: pointer;
}
.asteroid-secret-hotspot:focus-visible {
  outline: 4px solid rgba(126, 231, 255, 0.82);
  outline-offset: 4px;
}
.asteroid-secret-friend {
  position: absolute;
  z-index: 4;
  top: 34%;
  right: 14%;
  width: min(134px, 24%);
  pointer-events: none;
  transform-origin: 50% 100%;
  animation: asteroid-secret-peek 0.7s cubic-bezier(0.18, 1.28, 0.3, 1) both;
}
.asteroid-secret-friend.wave {
  animation:
    asteroid-secret-peek 0.7s cubic-bezier(0.18, 1.28, 0.3, 1) both,
    asteroid-secret-wave 0.42s ease-in-out 0.7s 4 alternate;
}
.asteroid-secret-alien {
  position: relative;
  z-index: 2;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 16px 22px rgba(0, 0, 0, 0.42));
}
.asteroid-secret-star {
  position: absolute;
  z-index: 1;
  width: 34%;
  height: auto;
  opacity: 0;
  animation: asteroid-secret-star-pop 1.35s ease-in-out infinite;
}
.asteroid-secret-star.star-one {
  left: -18%;
  top: 8%;
}
.asteroid-secret-star.star-two {
  right: -15%;
  top: 42%;
  animation-delay: 0.36s;
}
.asteroid-dodge-opening-copy {
  display: grid;
  gap: 18px;
  align-content: center;
}
.asteroid-dodge-opening-copy > span {
  color: var(--accent);
  font-size: 13px;
  font-weight: 1000;
  text-transform: uppercase;
}
.asteroid-dodge-opening-copy h1 {
  color: #fff7d8;
  font-family: "Fraunces", serif;
  font-size: clamp(48px, 7vw, 82px);
  font-weight: 500;
  line-height: 0.9;
}
.asteroid-dodge-opening-copy p {
  max-width: 390px;
  color: var(--ink-dim);
  font-size: 18px;
  line-height: 1.35;
}
.asteroid-begin-button {
  width: min(320px, 100%);
  min-height: 86px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #1b1308;
  font: inherit;
  font-size: 28px;
  font-weight: 1000;
  cursor: pointer;
  box-shadow:
    0 18px 36px rgba(0, 0, 0, 0.36),
    0 0 34px rgba(255, 214, 107, 0.34);
}
.asteroid-begin-button:focus-visible {
  outline: 4px solid rgba(126, 231, 255, 0.82);
  outline-offset: 5px;
}
.asteroid-dodge-shell {
  display: none;
}
.asteroid-dodge-progress {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  margin-left: auto;
  max-width: 210px;
}
.asteroid-dodge-progress span {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}
.asteroid-dodge-progress span.on {
  background: var(--accent);
  box-shadow: 0 0 16px rgba(255, 214, 107, 0.72);
}
.asteroid-dodge-stage {
  position: fixed;
  inset: 0;
  z-index: 34;
  width: 100%;
  height: 100%;
  min-height: 100%;
  background: rgba(13, 12, 32, 0.72);
  overflow: hidden;
  isolation: isolate;
  cursor: grab;
  touch-action: none;
}
.asteroid-dodge-stage:active {
  cursor: grabbing;
}
.asteroid-stage-bg {
  position: absolute;
  inset: 0;
  z-index: -3;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.9;
  transform: scale(1.18);
  animation: asteroid-stage-bg-drift 12s ease-in-out infinite alternate;
}
.asteroid-dodge-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(
      circle at var(--rocket-x) 78%,
      rgba(255, 214, 107, 0.24),
      transparent 20%
    ),
    linear-gradient(
      180deg,
      rgba(7, 7, 20, 0.18),
      rgba(7, 7, 20, 0.52) 55%,
      rgba(7, 7, 20, 0.8)
    );
}
.asteroid-dodge-hud {
  position: absolute;
  z-index: 5;
  top: max(82px, env(safe-area-inset-top));
  left: clamp(16px, 4vw, 42px);
  right: clamp(16px, 4vw, 42px);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  pointer-events: none;
}
.asteroid-dodge-hud > div:first-child {
  display: none;
}
.asteroid-dodge-hud > div:first-child > span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 1000;
  text-transform: uppercase;
}
.asteroid-dodge-hud strong {
  color: #fff7d8;
  font-family: "Fraunces", serif;
  font-size: clamp(32px, 5vw, 62px);
  font-weight: 500;
  line-height: 0.92;
}
.asteroid-dodge-hud small {
  width: max-content;
  border: 1px solid rgba(255, 214, 107, 0.32);
  border-radius: 999px;
  background: rgba(7, 7, 20, 0.62);
  color: var(--accent);
  font-size: 12px;
  font-weight: 1000;
  padding: 5px 9px;
  text-transform: uppercase;
}
.asteroid-cargo-counter {
  position: fixed;
  z-index: 45;
  left: clamp(18px, 4vw, 42px);
  top: max(90px, env(safe-area-inset-top));
  display: flex;
  align-items: baseline;
  gap: 6px;
  border: 1px solid rgba(255, 214, 107, 0.34);
  border-radius: 999px;
  background: rgba(7, 7, 20, 0.68);
  color: #fff7d8;
  padding: 10px 14px;
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.asteroid-cargo-counter strong {
  color: var(--accent);
  font-family: "Fraunces", serif;
  font-size: 28px;
  font-weight: 600;
  line-height: 0.9;
}
.asteroid-cargo-counter span {
  font-size: 13px;
  font-weight: 1000;
}
.asteroid-shield-meter {
  position: fixed;
  z-index: 45;
  right: clamp(18px, 4vw, 42px);
  top: max(90px, env(safe-area-inset-top));
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(126, 231, 255, 0.36);
  border-radius: 999px;
  background: rgba(7, 7, 20, 0.66);
  color: #e9fbff;
  padding: 11px 14px;
  box-shadow:
    0 16px 42px rgba(0, 0, 0, 0.28),
    0 0 24px rgba(126, 231, 255, 0.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.asteroid-shield-meter span {
  font-size: 12px;
  font-weight: 1000;
  text-transform: uppercase;
}
.asteroid-shield-meter div {
  display: flex;
  gap: 5px;
}
.asteroid-shield-meter i {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}
.asteroid-shield-meter i.on {
  background: #7ee7ff;
  box-shadow:
    0 0 12px rgba(126, 231, 255, 0.82),
    inset 0 0 0 1px rgba(255, 255, 255, 0.7);
}
.asteroid-motion-rule {
  position: fixed;
  z-index: 45;
  right: clamp(18px, 4vw, 42px);
  top: max(142px, calc(env(safe-area-inset-top) + 142px));
  width: min(286px, calc(100vw - 36px));
  display: grid;
  gap: 3px;
  padding: 11px 13px;
  border: 1px solid rgba(255, 214, 107, 0.28);
  border-radius: 8px;
  background: rgba(10, 14, 32, 0.78);
  color: #fff7d8;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.asteroid-motion-rule span {
  color: #7ee7ff;
  font-size: 11px;
  font-weight: 1000;
  text-transform: uppercase;
}
.asteroid-motion-rule strong {
  font-size: 14px;
  line-height: 1.14;
}
.asteroid-dodge-message {
  position: absolute;
  z-index: 6;
  top: clamp(146px, 20vh, 184px);
  left: 50%;
  width: min(440px, calc(100vw - 34px));
  min-height: 58px;
  display: grid;
  place-items: center;
  transform: translateX(-50%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(13, 12, 32, 0.72);
  color: #fff7d8;
  padding: 13px 18px;
  text-align: center;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.asteroid-dodge-message.done {
  border-color: rgba(255, 214, 107, 0.5);
  background: rgba(72, 54, 10, 0.62);
}
.asteroid-speed-line {
  position: absolute;
  z-index: 1;
  top: -28%;
  width: 5px;
  height: 130px;
  border-radius: 999px;
  background: linear-gradient(
    180deg,
    transparent,
    rgba(126, 231, 255, 0.78),
    transparent
  );
  opacity: 0.72;
  animation: asteroid-speed-drop 1.4s linear infinite;
}
.asteroid-speed-line.line-one {
  left: 21%;
}
.asteroid-speed-line.line-two {
  left: 53%;
  animation-delay: 0.45s;
}
.asteroid-speed-line.line-three {
  left: 78%;
  animation-delay: 0.9s;
}
.asteroid-rock {
  position: absolute;
  z-index: 3;
  left: var(--asteroid-x);
  top: var(--asteroid-y);
  width: clamp(68px, var(--asteroid-size), 132px);
  height: auto;
  transform: translateX(-50%) rotate(var(--asteroid-spin));
  filter: drop-shadow(0 14px 24px rgba(0, 0, 0, 0.42));
  will-change: top, transform;
}
.asteroid-dodge-stage.phase-done .asteroid-rock {
  display: none;
}
.asteroid-core {
  position: absolute;
  z-index: 3;
  left: var(--core-x);
  top: var(--core-y);
  width: clamp(44px, 6vw, 72px);
  height: auto;
  transform: translateX(-50%) scale(1);
  filter:
    drop-shadow(0 0 16px rgba(255, 214, 107, 0.86))
    drop-shadow(0 10px 18px rgba(0, 0, 0, 0.34));
  animation: asteroid-core-glow 0.72s ease-in-out infinite alternate;
  will-change: top, transform;
}
.asteroid-dodge-stage.phase-done .asteroid-core {
  display: none;
}
.asteroid-bubble-shield {
  position: absolute;
  z-index: 4;
  left: var(--rocket-x);
  bottom: clamp(76px, 12vh, 110px);
  width: clamp(164px, 20vw, 244px);
  aspect-ratio: 1;
  border-radius: 50%;
  transform: translateX(-50%);
  pointer-events: none;
  opacity: 0.34;
  background:
    radial-gradient(circle at 34% 28%, rgba(255, 255, 255, 0.74), transparent 0 8%, transparent 22%),
    radial-gradient(circle at 55% 58%, rgba(126, 231, 255, 0.13), rgba(126, 231, 255, 0.04) 58%, transparent 70%);
  box-shadow:
    inset 0 0 24px rgba(255, 255, 255, 0.34),
    inset 0 0 58px rgba(126, 231, 255, 0.22),
    0 0 26px rgba(126, 231, 255, 0.22);
  outline: 3px solid rgba(126, 231, 255, 0.2);
  outline-offset: -9px;
  transition:
    opacity 0.18s ease,
    transform 0.18s ease,
    filter 0.18s ease;
  will-change: left, transform, opacity;
}
.asteroid-bubble-shield.charged {
  opacity: 0.86;
  animation: asteroid-bubble-breathe 1.1s ease-in-out infinite alternate;
}
.asteroid-bubble-shield.charging {
  opacity: 0.22;
  filter: saturate(0.75);
}
.asteroid-bubble-shield.popped {
  opacity: 0.92;
  transform: translateX(-50%) scale(1.2);
  filter: brightness(1.45);
}
.asteroid-ship {
  position: absolute;
  z-index: 5;
  left: var(--rocket-x);
  bottom: clamp(92px, 14vh, 132px);
  width: clamp(116px, 14vw, 180px);
  height: auto;
  transform: translateX(-50%);
  filter: drop-shadow(0 18px 24px rgba(0, 0, 0, 0.38));
  animation: asteroid-ship-thrum 0.8s ease-in-out infinite alternate;
  will-change: left, transform;
  pointer-events: none;
}
.asteroid-dodge-controls {
  position: absolute;
  z-index: 8;
  left: 50%;
  bottom: max(20px, env(safe-area-inset-bottom));
  width: min(520px, calc(100vw - 32px));
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  transform: translateX(-50%);
}
.asteroid-dodge-controls button,
.asteroid-dodge-win button {
  min-height: 72px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: var(--accent);
  color: #1b1308;
  font: inherit;
  font-size: 20px;
  font-weight: 1000;
  padding: 14px 22px;
  cursor: pointer;
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.28);
}
.asteroid-dodge-controls button:disabled,
.asteroid-dodge-win button:disabled {
  cursor: default;
  opacity: 0.52;
}
.asteroid-dodge-win {
  position: absolute;
  z-index: 9;
  left: 50%;
  bottom: clamp(108px, 18vh, 156px);
  width: min(520px, calc(100vw - 32px));
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  transform: translateX(-50%);
}
.asteroid-dodge-win button + button {
  background: rgba(13, 12, 32, 0.82);
  color: var(--ink);
}
@keyframes asteroid-drop {
  0% {
    transform: translate(-50%, -40px) scale(0.72);
  }
  72% {
    transform: translate(-50%, 330px) scale(1.08);
  }
  100% {
    transform: translate(-50%, 420px) scale(1.14);
  }
}
@keyframes asteroid-bg-drift {
  0% {
    transform: scale(1.04) translate3d(-1.5%, -1%, 0);
  }
  100% {
    transform: scale(1.08) translate3d(1.5%, 1%, 0);
  }
}
@keyframes asteroid-stage-bg-drift {
  0% {
    transform: scale(1.18) translate3d(-1%, -1%, 0);
  }
  100% {
    transform: scale(1.22) translate3d(1%, 1%, 0);
  }
}
@keyframes asteroid-rocket-float {
  0% {
    transform: translate3d(0, 0, 0) rotate(-12deg);
  }
  100% {
    transform: translate3d(14px, -18px, 0) rotate(-8deg);
  }
}
@keyframes asteroid-opening-rock-one {
  0%,
  100% {
    transform: translate3d(0, 0, 0) rotate(-9deg);
  }
  50% {
    transform: translate3d(-34px, 26px, 0) rotate(18deg);
  }
}
@keyframes asteroid-opening-rock-two {
  0%,
  100% {
    transform: translate3d(0, 0, 0) rotate(14deg);
  }
  50% {
    transform: translate3d(24px, -30px, 0) rotate(-16deg);
  }
}
@keyframes asteroid-secret-peek {
  0% {
    opacity: 0;
    transform: translate3d(14px, 62px, 0) scale(0.62) rotate(10deg);
  }
  72% {
    opacity: 1;
    transform: translate3d(-4px, -8px, 0) scale(1.06) rotate(-8deg);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1) rotate(-5deg);
  }
}
@keyframes asteroid-secret-wave {
  0% {
    transform: translate3d(0, 0, 0) scale(1) rotate(-5deg);
  }
  100% {
    transform: translate3d(0, -7px, 0) scale(1.04) rotate(7deg);
  }
}
@keyframes asteroid-secret-star-pop {
  0%,
  100% {
    opacity: 0;
    transform: scale(0.6) rotate(-18deg);
  }
  38%,
  68% {
    opacity: 1;
    transform: scale(1.08) rotate(12deg);
  }
}
@keyframes asteroid-hover {
  0% {
    transform: translateX(-50%) rotate(-4deg);
  }
  100% {
    transform: translateX(-50%) rotate(5deg);
  }
}
@keyframes asteroid-ship-thrum {
  0% {
    transform: translateX(-50%) translateY(0);
  }
  100% {
    transform: translateX(-50%) translateY(-7px);
  }
}
@keyframes asteroid-core-glow {
  0% {
    opacity: 0.82;
    transform: translateX(-50%) scale(0.94) rotate(-8deg);
  }
  100% {
    opacity: 1;
    transform: translateX(-50%) scale(1.06) rotate(8deg);
  }
}
@keyframes asteroid-bubble-breathe {
  0% {
    transform: translateX(-50%) scale(0.98);
    box-shadow:
      inset 0 0 24px rgba(255, 255, 255, 0.34),
      inset 0 0 58px rgba(126, 231, 255, 0.22),
      0 0 22px rgba(126, 231, 255, 0.2);
  }
  100% {
    transform: translateX(-50%) scale(1.03);
    box-shadow:
      inset 0 0 28px rgba(255, 255, 255, 0.44),
      inset 0 0 66px rgba(126, 231, 255, 0.28),
      0 0 34px rgba(126, 231, 255, 0.32);
  }
}
@keyframes asteroid-speed-drop {
  0% {
    transform: translateY(0);
    opacity: 0;
  }
  12% {
    opacity: 0.7;
  }
  100% {
    transform: translateY(760px);
    opacity: 0;
  }
}
@media (max-width: 840px) {
  .asteroid-dodge-level {
    align-items: start;
    padding: 78px 14px 20px;
  }
  .asteroid-dodge-opening {
    min-height: 0;
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .asteroid-dodge-opening-art {
    min-height: min(46vh, 360px);
    border-radius: 22px;
  }
  .asteroid-dodge-opening-copy {
    justify-items: center;
    text-align: center;
  }
  .asteroid-dodge-opening-copy h1 {
    font-size: clamp(38px, 13vw, 56px);
  }
  .asteroid-dodge-opening-copy p {
    max-width: 330px;
    font-size: 16px;
  }
  .asteroid-begin-button {
    width: min(300px, 100%);
    min-height: 76px;
    font-size: 26px;
  }
  .asteroid-secret-hotspot {
    top: 38%;
    right: 2%;
    width: 34%;
    height: 34%;
  }
  .asteroid-secret-friend {
    top: 30%;
    right: 11%;
    width: min(96px, 24%);
  }
  .asteroid-dodge-hud {
    top: max(72px, env(safe-area-inset-top));
    left: 14px;
    right: 14px;
    align-items: center;
  }
  .asteroid-dodge-hud strong {
    font-size: clamp(28px, 9vw, 42px);
  }
  .asteroid-dodge-hud .asteroid-dodge-progress {
    gap: 6px;
    max-width: 128px;
  }
  .asteroid-dodge-progress span {
    width: 10px;
    height: 10px;
  }
  .asteroid-dodge-message {
    top: 164px;
    min-height: 54px;
    font-size: 15px;
  }
  .asteroid-cargo-counter {
    top: 82px;
    left: 14px;
    padding: 8px 11px;
  }
  .asteroid-cargo-counter strong {
    font-size: 23px;
  }
  .asteroid-cargo-counter span {
    font-size: 12px;
  }
  .asteroid-shield-meter {
    top: 126px;
    right: 14px;
    padding: 8px 11px;
  }
  .asteroid-shield-meter span {
    display: none;
  }
  .asteroid-shield-meter i {
    width: 11px;
    height: 11px;
  }
  .asteroid-motion-rule {
    left: 14px;
    right: auto;
    top: 126px;
    width: min(210px, calc(100vw - 112px));
    padding: 8px 10px;
  }
  .asteroid-motion-rule span {
    display: none;
  }
  .asteroid-motion-rule strong {
    font-size: 12px;
  }
  .asteroid-rock {
    width: clamp(72px, 22vw, 104px);
  }
  .asteroid-core {
    width: clamp(38px, 13vw, 54px);
  }
  .asteroid-ship {
    width: clamp(100px, 28vw, 128px);
    bottom: 112px;
  }
  .asteroid-bubble-shield {
    bottom: 88px;
    width: clamp(140px, 38vw, 174px);
  }
  .asteroid-dodge-controls button {
    min-height: 64px;
    font-size: 18px;
  }
  .asteroid-dodge-win {
    bottom: 96px;
  }
}

/* ---------- Launch Countdown mini game ---------- */
.launch-countdown-level {
  position: fixed;
  inset: 0;
  z-index: 30;
  overflow: auto;
  display: grid;
  place-items: center;
  padding: 82px clamp(16px, 3vw, 36px) 28px;
  background:
    radial-gradient(
      circle at 74% 24%,
      rgba(255, 214, 107, 0.16),
      transparent 32%
    ),
    radial-gradient(
      circle at 22% 72%,
      rgba(255, 103, 72, 0.17),
      transparent 30%
    ),
    linear-gradient(180deg, rgba(7, 7, 20, 0.14), rgba(7, 7, 20, 0.94)), #070714;
}
.launch-countdown-shell {
  position: relative;
  z-index: 34;
  width: min(1040px, 100%);
  display: grid;
  grid-template-columns: minmax(260px, 0.62fr) minmax(320px, 1fr);
  align-items: center;
  gap: clamp(16px, 4vw, 48px);
}
.launch-countdown-copy {
  display: grid;
  align-content: center;
  gap: 16px;
  min-height: 540px;
}
.launch-countdown-copy > span {
  color: var(--accent);
  font-size: 13px;
  font-weight: 1000;
  text-transform: uppercase;
}
.launch-countdown-copy h1 {
  max-width: 440px;
  color: #fff7d8;
  font-family: "Fraunces", serif;
  font-size: clamp(42px, 6vw, 74px);
  font-weight: 500;
  line-height: 0.92;
}
.launch-countdown-copy p {
  max-width: 390px;
  color: var(--ink-dim);
  font-size: 17px;
  line-height: 1.35;
}
.launch-countdown-message {
  min-height: 78px;
  width: min(390px, 100%);
  display: grid;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  background: rgba(13, 12, 32, 0.76);
  color: #fff7d8;
  padding: 15px 17px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.launch-countdown-progress {
  display: flex;
  gap: 10px;
}
.launch-countdown-progress span {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}
.launch-countdown-progress span.on {
  background: var(--accent);
  box-shadow: 0 0 16px rgba(255, 214, 107, 0.72);
}
.launch-countdown-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.launch-countdown-actions button {
  min-height: 54px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(13, 12, 32, 0.76);
  color: var(--ink);
  font: inherit;
  font-weight: 900;
  padding: 12px 18px;
  cursor: pointer;
}
.launch-countdown-actions button:first-child {
  border-color: transparent;
  background: var(--accent);
  color: #1b1308;
}
.launch-countdown-actions button:disabled {
  cursor: default;
  opacity: 0.5;
}
.launch-pad {
  position: relative;
  min-height: 590px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 26px;
  background:
    linear-gradient(180deg, rgba(126, 231, 255, 0.1), transparent 40%),
    radial-gradient(
      circle at 50% 88%,
      rgba(255, 147, 62, 0.18),
      transparent 34%
    ),
    rgba(13, 12, 32, 0.74);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}
.launch-count {
  position: absolute;
  top: 28px;
  left: 50%;
  min-width: 150px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: rgba(7, 7, 20, 0.72);
  color: #fff7d8;
  font-family: "Fraunces", serif;
  font-size: 54px;
  line-height: 1;
  text-align: center;
  padding: 14px 26px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}
.launch-count.go {
  background: var(--accent);
  color: #1b1308;
  box-shadow: 0 0 30px rgba(255, 214, 107, 0.6);
}
.launch-rocket {
  width: min(260px, 58vw);
  height: auto;
  transform: rotate(90deg);
  filter: drop-shadow(0 24px 32px rgba(0, 0, 0, 0.42));
  transition:
    transform 0.7s ease,
    opacity 0.4s ease;
}
.launch-fire {
  position: absolute;
  left: 50%;
  bottom: 150px;
  width: 92px;
  height: auto;
  transform: translateX(-50%);
  opacity: 0;
  filter: drop-shadow(0 0 24px rgba(255, 136, 70, 0.6));
}
.launch-pad.launched .launch-rocket {
  transform: translateY(-190px) rotate(90deg) scale(0.86);
}
.launch-pad.launched .launch-fire {
  opacity: 1;
  animation: rocket-flame-flicker 0.14s ease-in-out infinite alternate;
}
.launch-button {
  position: absolute;
  left: 50%;
  bottom: 28px;
  min-width: min(320px, calc(100% - 44px));
  min-height: 82px;
  transform: translateX(-50%);
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #1b1308;
  font: inherit;
  font-size: 26px;
  font-weight: 1000;
  cursor: pointer;
  box-shadow: 0 18px 32px rgba(0, 0, 0, 0.32);
}
@media (max-width: 840px) {
  .launch-countdown-level {
    align-items: start;
    padding: 78px 14px 20px;
  }
  .launch-countdown-shell {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .launch-countdown-copy {
    min-height: 0;
    justify-items: center;
    text-align: center;
  }
  .launch-countdown-copy h1 {
    font-size: clamp(34px, 10vw, 50px);
  }
  .launch-pad {
    min-height: 410px;
  }
  .launch-count {
    top: 16px;
    min-width: 118px;
    font-size: 40px;
  }
  .launch-rocket {
    width: min(170px, 50vw);
  }
  .launch-fire {
    bottom: 124px;
    width: 66px;
  }
  .launch-pad.launched .launch-rocket {
    transform: translateY(-126px) rotate(90deg) scale(0.82);
  }
  .launch-button {
    bottom: 18px;
    min-height: 76px;
    font-size: 24px;
  }
}

/* ---------- Mission Control mini game ---------- */
.mission-control-level {
  position: fixed;
  inset: 0;
  z-index: 30;
  overflow: auto;
  display: grid;
  place-items: center;
  padding: 82px clamp(16px, 3vw, 36px) 28px;
  background:
    radial-gradient(
      circle at 24% 26%,
      rgba(126, 231, 255, 0.17),
      transparent 32%
    ),
    radial-gradient(
      circle at 78% 72%,
      rgba(255, 214, 107, 0.15),
      transparent 30%
    ),
    linear-gradient(180deg, rgba(7, 7, 20, 0.12), rgba(7, 7, 20, 0.94)), #070714;
}
.mission-control-shell {
  position: relative;
  z-index: 34;
  width: min(1060px, 100%);
  display: grid;
  grid-template-columns: minmax(260px, 0.58fr) minmax(320px, 1fr);
  align-items: center;
  gap: clamp(16px, 4vw, 48px);
}
.mission-control-copy {
  display: grid;
  align-content: center;
  gap: 16px;
  min-height: 540px;
}
.mission-control-copy > span {
  color: var(--accent);
  font-size: 13px;
  font-weight: 1000;
  text-transform: uppercase;
}
.mission-control-copy h1 {
  max-width: 440px;
  color: #fff7d8;
  font-family: "Fraunces", serif;
  font-size: clamp(42px, 6vw, 74px);
  font-weight: 500;
  line-height: 0.92;
}
.mission-control-copy p {
  max-width: 390px;
  color: var(--ink-dim);
  font-size: 17px;
  line-height: 1.35;
}
.mission-control-message {
  min-height: 78px;
  width: min(390px, 100%);
  display: grid;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  background: rgba(13, 12, 32, 0.76);
  color: #fff7d8;
  padding: 15px 17px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.3);
}
.mission-control-message.done {
  border-color: rgba(255, 214, 107, 0.5);
  background: rgba(72, 54, 10, 0.58);
}
.mission-control-progress {
  display: flex;
  gap: 10px;
}
.mission-control-progress span {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}
.mission-control-progress span.on {
  background: var(--accent);
  box-shadow: 0 0 16px rgba(255, 214, 107, 0.72);
}
.mission-system-path {
  width: min(420px, 100%);
  display: grid;
  gap: 8px;
}
.mission-system-path span {
  min-height: 58px;
  display: grid;
  grid-template-columns: 34px minmax(70px, 0.42fr) minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(237, 246, 255, 0.78);
  padding: 8px 10px;
}
.mission-system-path span.next {
  border-color: color-mix(in srgb, var(--switch-color) 54%, rgba(255, 255, 255, 0.14));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--switch-color) 18%, transparent);
}
.mission-system-path span.on {
  color: #fff7d8;
  background: color-mix(in srgb, var(--switch-color) 18%, rgba(255, 255, 255, 0.06));
}
.mission-system-path em {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: color-mix(in srgb, var(--switch-color) 24%, rgba(255, 255, 255, 0.12));
  color: #fff7d8;
  font-style: normal;
  font-weight: 1000;
}
.mission-system-path strong {
  overflow: hidden;
  font-size: 13px;
  font-weight: 1000;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}
.mission-system-path small {
  color: inherit;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
}
.mission-control-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.mission-control-actions button {
  min-height: 54px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(13, 12, 32, 0.76);
  color: var(--ink);
  font: inherit;
  font-weight: 900;
  padding: 12px 18px;
  cursor: pointer;
}
.mission-control-actions button:first-child {
  border-color: transparent;
  background: var(--accent);
  color: #1b1308;
}
.mission-switchboard {
  min-height: 560px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 26px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 38%),
    rgba(13, 12, 32, 0.74);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}
.mission-switch {
  min-height: 250px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 20px;
  background:
    radial-gradient(
      circle at 50% 34%,
      rgba(255, 255, 255, 0.08),
      transparent 48%
    ),
    rgba(255, 255, 255, 0.04);
  color: #fff7d8;
  font: inherit;
  cursor: pointer;
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}
.mission-switch.target {
  border-color: var(--switch-color);
  box-shadow:
    0 0 0 6px color-mix(in srgb, var(--switch-color) 16%, transparent),
    0 0 28px color-mix(in srgb, var(--switch-color) 38%, transparent);
}
.mission-switch.online {
  border-color: var(--switch-color);
  background:
    radial-gradient(
      circle at 50% 34%,
      color-mix(in srgb, var(--switch-color) 24%, transparent),
      transparent 48%
    ),
    rgba(255, 255, 255, 0.06);
}
.mission-switch.wrong {
  animation: planet-sort-wiggle 0.36s ease-in-out;
}
.mission-switch:disabled {
  cursor: default;
}
.mission-switch-light {
  width: 78px;
  height: 78px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 0 0 8px rgba(7, 7, 20, 0.5);
}
.mission-switch.target .mission-switch-light,
.mission-switch.online .mission-switch-light {
  background: var(--switch-color);
  box-shadow:
    inset 0 0 0 8px rgba(7, 7, 20, 0.42),
    0 0 28px color-mix(in srgb, var(--switch-color) 62%, transparent);
}
.mission-switch.target .mission-switch-light {
  animation: mission-light-pulse 0.9s ease-in-out infinite alternate;
}
@keyframes mission-light-pulse {
  from {
    transform: scale(0.94);
  }
  to {
    transform: scale(1.04);
  }
}
.mission-switch strong {
  font-family: "Fraunces", serif;
  font-size: 32px;
  font-weight: 500;
  line-height: 1;
}
.mission-switch small {
  color: var(--ink-dim);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}
@media (max-width: 840px) {
  .mission-control-level {
    align-items: start;
    padding: 78px 14px 20px;
  }
  .mission-control-shell {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .mission-control-copy {
    min-height: 0;
    justify-items: center;
    text-align: center;
  }
  .mission-system-path span {
    grid-template-columns: 32px minmax(62px, 0.35fr) minmax(0, 1fr);
    text-align: left;
  }
  .mission-control-copy h1 {
    font-size: clamp(34px, 10vw, 50px);
  }
  .mission-switchboard {
    min-height: 0;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 10px;
  }
  .mission-switch {
    min-height: 150px;
    gap: 8px;
  }
  .mission-switch-light {
    width: 56px;
    height: 56px;
  }
  .mission-switch strong {
    font-size: 24px;
  }
}

/* ---------- Gravity Jump mini game ---------- */
.gravity-jump-level {
  position: fixed;
  inset: 0;
  z-index: 30;
  overflow: auto;
  display: grid;
  place-items: center;
  padding: 82px clamp(16px, 3vw, 36px) 28px;
  background:
    radial-gradient(
      circle at 24% 68%,
      rgba(166, 184, 196, 0.16),
      transparent 32%
    ),
    radial-gradient(
      circle at 82% 24%,
      rgba(126, 231, 255, 0.14),
      transparent 30%
    ),
    linear-gradient(180deg, rgba(7, 7, 20, 0.12), rgba(7, 7, 20, 0.94)), #070714;
}
.gravity-jump-shell {
  position: relative;
  z-index: 34;
  width: min(1060px, 100%);
  display: grid;
  grid-template-columns: minmax(260px, 0.58fr) minmax(320px, 1fr);
  align-items: center;
  gap: clamp(16px, 4vw, 48px);
}
.gravity-jump-copy {
  display: grid;
  align-content: center;
  gap: 16px;
  min-height: 540px;
}
.gravity-jump-copy > span {
  color: var(--accent);
  font-size: 13px;
  font-weight: 1000;
  text-transform: uppercase;
}
.gravity-jump-copy h1 {
  max-width: 440px;
  color: #fff7d8;
  font-family: "Fraunces", serif;
  font-size: clamp(42px, 6vw, 74px);
  font-weight: 500;
  line-height: 0.92;
}
.gravity-jump-copy p {
  max-width: 390px;
  color: var(--ink-dim);
  font-size: 17px;
  line-height: 1.35;
}
.gravity-jump-message {
  min-height: 78px;
  width: min(390px, 100%);
  display: grid;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  background: rgba(13, 12, 32, 0.76);
  color: #fff7d8;
  padding: 15px 17px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.3);
}
.gravity-best-jump,
.gravity-target-card,
.gravity-aim-guide,
.gravity-prediction-strip,
.gravity-compare-card,
.gravity-pull-meter {
  width: min(390px, 100%);
}
.gravity-best-jump {
  border-radius: 999px;
  padding: 10px 14px;
  background: rgba(255, 229, 138, 0.16);
  color: #ffe58a;
  font-weight: 900;
}
.gravity-target-card {
  display: grid;
  gap: 4px;
  border: 1px solid rgba(126, 231, 255, 0.28);
  border-radius: 8px;
  padding: 11px 14px;
  background: rgba(9, 42, 62, 0.68);
  color: #d8f5ff;
}
.gravity-target-card strong {
  color: #ffffff;
  font-size: 15px;
}
.gravity-target-card span {
  color: #ffe58a;
  font-size: 14px;
  font-weight: 900;
}
.gravity-aim-guide {
  display: grid;
  gap: 4px;
  border: 1px solid rgba(126, 231, 255, 0.26);
  border-radius: 8px;
  padding: 11px 14px;
  background: rgba(12, 25, 48, 0.72);
  color: #d8f5ff;
}
.gravity-aim-guide.ready {
  border-color: rgba(143, 255, 191, 0.5);
  background: rgba(22, 74, 54, 0.72);
}
.gravity-aim-guide.watching {
  border-color: rgba(255, 214, 107, 0.44);
  background: rgba(71, 52, 20, 0.68);
}
.gravity-aim-guide span {
  color: #7ee7ff;
  font-size: 12px;
  font-weight: 1000;
  text-transform: uppercase;
}
.gravity-aim-guide strong {
  color: #ffffff;
  font-size: 18px;
  line-height: 1.15;
}
.gravity-aim-guide small {
  color: #fff7d8;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.25;
}
.gravity-prediction-strip {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(255, 214, 107, 0.26);
  border-radius: 8px;
  background: rgba(255, 214, 107, 0.1);
}
.gravity-prediction-strip > strong {
  color: #fff7d8;
  font-size: 15px;
}
.gravity-prediction-strip div {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.gravity-prediction-strip button {
  min-height: 60px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #edf6ff;
  font: inherit;
  font-size: 13px;
  font-weight: 1000;
  cursor: pointer;
}
.gravity-prediction-strip button.on,
.gravity-prediction-strip button:hover,
.gravity-prediction-strip button:focus-visible {
  border-color: rgba(255, 214, 107, 0.72);
  background: rgba(255, 214, 107, 0.22);
  color: #fff7d8;
  outline: 2px solid rgba(126, 231, 255, 0.72);
  outline-offset: 2px;
}
.gravity-compare-card {
  display: grid;
  gap: 4px;
  border: 1px solid rgba(126, 231, 255, 0.28);
  border-radius: 8px;
  padding: 12px 14px;
  background: rgba(10, 38, 68, 0.68);
  color: #d8f5ff;
}
.gravity-compare-card strong {
  color: #ffffff;
  font-size: 16px;
}
.gravity-compare-card span {
  font-size: 14px;
  font-weight: 800;
  line-height: 1.25;
}
.gravity-pull-meter {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}
.gravity-pull-meter div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: #d8f5ff;
  font-size: 14px;
  font-weight: 900;
}
.gravity-pull-meter strong {
  color: #ffffff;
}
.gravity-pull-meter i {
  display: block;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
}
.gravity-pull-meter b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #7ee7ff, #ffe58a, #ff8f70);
}
.gravity-jump-progress {
  display: flex;
  gap: 10px;
}
.gravity-jump-progress span {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}
.gravity-jump-progress span.on {
  background: var(--accent);
  box-shadow: 0 0 16px rgba(255, 214, 107, 0.72);
}
.gravity-jump-complete {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  background: rgba(8, 20, 38, 0.78);
}
.gravity-jump-complete strong {
  color: #fff6a8;
}
.gravity-jump-complete div,
.helmet-lab-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.gravity-jump-complete button {
  min-height: 60px;
  border: 0;
  border-radius: 8px;
  padding: 10px 14px;
  color: #14213a;
  background: #8ef5ff;
  font-weight: 800;
}
.gravity-jump-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.gravity-jump-actions button {
  min-height: 54px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(13, 12, 32, 0.76);
  color: var(--ink);
  font: inherit;
  font-weight: 900;
  padding: 12px 18px;
  cursor: pointer;
}
.gravity-jump-actions button:first-child {
  border-color: transparent;
  background: var(--accent);
  color: #1b1308;
}
.gravity-jump-stage {
  position: relative;
  min-height: 590px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 26px;
  background:
    linear-gradient(180deg, rgba(126, 231, 255, 0.09), transparent 42%),
    radial-gradient(
      ellipse at 50% 86%,
      rgba(180, 188, 196, 0.3),
      transparent 36%
    ),
    rgba(13, 12, 32, 0.74);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}
.gravity-jump-stage.earth {
  background:
    linear-gradient(180deg, rgba(126, 231, 255, 0.13), transparent 42%),
    radial-gradient(
      ellipse at 50% 86%,
      rgba(75, 180, 116, 0.28),
      transparent 36%
    ),
    rgba(13, 12, 32, 0.74);
}
.gravity-world-label {
  position: absolute;
  left: 50%;
  top: 24px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: rgba(7, 7, 20, 0.72);
  color: #fff7d8;
  font-size: 15px;
  font-weight: 1000;
  padding: 10px 16px;
}
.gravity-jump-pad {
  position: absolute;
  left: 12%;
  right: 12%;
  bottom: 112px;
  height: 40px;
  border-radius: 50%;
  background:
    radial-gradient(
      ellipse at center,
      rgba(255, 214, 107, 0.24),
      transparent 62%
    ),
    rgba(255, 255, 255, 0.08);
  transform: perspective(420px) rotateX(62deg);
}
.gravity-astronaut {
  position: absolute;
  left: 50%;
  bottom: 124px;
  width: 126px;
  height: 90px;
  background-image: url("../data/sprites/astronaut-flying-v2-atlas.png");
  background-size: 504px 270px;
  background-repeat: no-repeat;
  background-position: 0 0;
  transform: translateX(-50%);
  filter: drop-shadow(0 22px 26px rgba(0, 0, 0, 0.38));
  animation: moon-gravity-jump 1.45s ease-in-out both;
}
.gravity-jump-stage.earth .gravity-astronaut {
  animation: earth-gravity-jump 0.75s ease-in-out both;
}
.gravity-jump-controls {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 22px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.gravity-jump-controls button {
  min-height: 68px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: var(--accent);
  color: #1b1308;
  font: inherit;
  font-size: 18px;
  font-weight: 1000;
  cursor: pointer;
}
.gravity-jump-controls button:first-child {
  background: linear-gradient(180deg, #7ee7ff, #2c9dff);
  color: #04111c;
}
@keyframes moon-gravity-jump {
  0%,
  100% {
    transform: translate(-50%, 0) rotate(-2deg);
  }
  48% {
    transform: translate(-50%, -210px) rotate(5deg);
  }
}
@keyframes earth-gravity-jump {
  0%,
  100% {
    transform: translate(-50%, 0) rotate(-2deg);
  }
  45% {
    transform: translate(-50%, -92px) rotate(3deg);
  }
}
@media (max-width: 840px) {
  .gravity-jump-level {
    align-items: start;
    padding: 78px 14px 20px;
  }
  .gravity-jump-shell {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .gravity-jump-copy {
    min-height: 0;
    justify-items: center;
    text-align: center;
  }
  .gravity-jump-copy h1 {
    font-size: clamp(34px, 10vw, 50px);
  }
  .gravity-jump-stage {
    min-height: 430px;
  }
  .gravity-astronaut {
    width: 126px;
    height: 90px;
  }
  .gravity-jump-controls button {
    min-height: 62px;
    font-size: 16px;
  }
  @keyframes moon-gravity-jump {
    0%,
    100% {
      transform: translate(-50%, 0) rotate(-2deg);
    }
    48% {
      transform: translate(-50%, -132px) rotate(5deg);
    }
  }
  @keyframes earth-gravity-jump {
    0%,
    100% {
      transform: translate(-50%, 0) rotate(-2deg);
    }
    45% {
      transform: translate(-50%, -62px) rotate(3deg);
    }
  }
}

/* Tiny Physics Play Lab */
.physics-play-lab {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  padding: 82px 22px 24px;
  color: #f8fbff;
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 211, 93, 0.22), transparent 22%),
    radial-gradient(circle at 82% 14%, rgba(84, 217, 190, 0.2), transparent 24%),
    linear-gradient(135deg, #151238 0%, #102a43 48%, #1d163d 100%);
}

.physics-play-preload {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.physics-play-preload img {
  width: 1px;
  height: 1px;
}

.physics-play-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(260px, 0.78fr) minmax(360px, 1.2fr);
  grid-template-rows: auto auto;
  gap: 16px;
  width: min(1180px, 100%);
  margin: 0 auto;
}

.physics-play-copy,
.physics-play-stage,
.physics-play-controls,
.physics-play-complete {
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(2, 6, 23, 0.28);
}

.physics-play-copy {
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 520px;
  padding: 22px;
  background: rgba(9, 18, 40, 0.72);
  backdrop-filter: blur(12px);
}

.physics-play-copy > span {
  width: max-content;
  max-width: 100%;
  border-radius: 999px;
  padding: 7px 12px;
  background: rgba(255, 221, 112, 0.18);
  color: #ffe58a;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.physics-play-copy h1 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(2.25rem, 3rem, 3.35rem);
  line-height: 0.96;
  letter-spacing: 0;
}

.physics-play-copy p {
  margin: 0;
  max-width: 28ch;
  color: #c8f7ff;
  font-size: 19px;
  font-weight: 850;
}

.physics-play-lesson-strip {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 229, 138, 0.28);
  border-radius: 8px;
  background: rgba(255, 229, 138, 0.12);
  color: #fff3bc;
}

.physics-play-lesson-strip strong {
  font-size: 12px;
  text-transform: uppercase;
}

.physics-play-lesson-strip span {
  color: #ffffff;
  font-size: 15px;
  font-weight: 850;
  line-height: 1.22;
}

.physics-play-action-track {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.physics-play-action-track button {
  min-height: 60px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #edf6ff;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.physics-play-action-track button.done {
  border-color: rgba(126, 231, 255, 0.48);
  background: rgba(126, 231, 255, 0.14);
}

.physics-play-action-track span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 229, 138, 0.2);
  color: #fff3bc;
  font-size: 13px;
  font-weight: 1000;
}

.physics-play-action-track button.done span {
  background: #7ee7ff;
  color: #061225;
}

.physics-play-action-track strong {
  overflow: hidden;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.physics-play-message {
  display: grid;
  gap: 6px;
  min-height: 116px;
  padding: 14px;
  border: 1px solid rgba(126, 231, 255, 0.34);
  border-radius: 8px;
  background: rgba(10, 38, 68, 0.72);
}

.physics-play-message strong {
  color: #ffffff;
  font-size: 22px;
  line-height: 1.12;
}

.physics-play-message span {
  color: #d8f5ff;
  font-size: 16px;
  line-height: 1.25;
}

.physics-play-next-card {
  display: grid;
  grid-template-columns: 54px 1fr;
  align-items: center;
  gap: 10px;
  min-height: 72px;
  padding: 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
}

.physics-play-next-card > span {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: #ffe58a;
  color: #241303;
  font-size: 28px;
}

.physics-play-next-card div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.physics-play-next-card strong,
.physics-play-next-card em {
  overflow-wrap: anywhere;
  letter-spacing: 0;
}

.physics-play-next-card strong {
  color: #ffffff;
  font-size: 17px;
  line-height: 1.12;
}

.physics-play-next-card em {
  color: #bcecff;
  font-size: 14px;
  font-style: normal;
  font-weight: 800;
}

.physics-play-toolbar,
.physics-play-badges,
.physics-play-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.physics-play-toolbar button,
.physics-play-badges button,
.physics-play-controls button,
.physics-play-complete button {
  min-height: 48px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.13);
  color: #ffffff;
  font: inherit;
  font-weight: 950;
  letter-spacing: 0;
  cursor: pointer;
}

.physics-play-toolbar button {
  padding: 0 18px;
}

.physics-play-badges {
  align-items: center;
  margin-top: 2px;
}

.physics-play-badges button {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  min-height: 58px;
  padding: 0;
  border: 2px solid rgba(255, 255, 255, 0.16);
}

.physics-play-badges button span {
  display: block;
  height: 24px;
  font-size: 22px;
  line-height: 1;
}

.physics-play-badges button strong {
  display: block;
  font-size: 13px;
  line-height: 1;
}

.physics-play-badges button.on {
  border-color: #ffe58a;
  background: rgba(255, 229, 138, 0.22);
}

.physics-play-badges button.done {
  background: linear-gradient(180deg, #62e8b3, #26a86b);
  color: #061d17;
}

.physics-play-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 520px;
  padding: 26px;
  overflow: hidden;
  background:
    linear-gradient(rgba(3, 10, 28, 0.25), rgba(3, 10, 28, 0.25)),
    radial-gradient(circle at 50% 78%, rgba(96, 215, 198, 0.22), transparent 34%),
    #091424;
  color: inherit;
  font: inherit;
  text-align: inherit;
  cursor: pointer;
}

.physics-play-orbit-ring {
  position: absolute;
  width: min(66%, 420px);
  aspect-ratio: 1;
  border: 6px dashed rgba(255, 226, 121, 0.22);
  border-radius: 50%;
  opacity: 0.38;
}

.physics-play-sprite {
  position: relative;
  z-index: 1;
  width: min(78%, 430px);
  max-width: 430px;
  aspect-ratio: 1;
  transition:
    transform 320ms ease,
    filter 320ms ease;
}

.physics-play-atlas-source {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.physics-play-sprite-frame {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 8px;
  object-fit: cover;
  pointer-events: none;
  user-select: none;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.36);
}

.physics-play-progress {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 22px;
  height: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
}

.physics-play-progress i {
  display: block;
  width: var(--physics-play-progress);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #62e8b3, #ffe58a, #ff8f70);
  transition: width 260ms ease;
}

.physics-play-frame-note {
  position: absolute;
  top: 18px;
  right: 18px;
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(3, 10, 28, 0.68);
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
}

.physics-play-tap-cue {
  position: absolute;
  left: 18px;
  top: 18px;
  border-radius: 999px;
  padding: 8px 12px;
  background: #ffe58a;
  color: #241303;
  font-size: 13px;
  font-weight: 1000;
}

.physics-play-controls {
  grid-column: 1 / -1;
  justify-content: center;
  padding: 14px;
  background: rgba(7, 16, 38, 0.72);
  backdrop-filter: blur(10px);
}

.physics-play-controls button {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 8px;
  row-gap: 2px;
  min-width: 150px;
  min-height: 68px;
  padding: 8px 18px;
  background: linear-gradient(180deg, #ffe58a, #ffb84d);
  color: #241303;
  text-align: left;
}

.physics-play-controls button:last-child {
  display: block;
  background: linear-gradient(180deg, #7ee7ff, #35b6ff);
  color: #04111c;
  text-align: center;
}

.physics-play-controls button.tried {
  background: linear-gradient(180deg, #8ff2c9, #42c889);
}

.physics-play-controls button span {
  grid-row: 1 / 3;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  font-size: 19px;
  line-height: 1;
}

.physics-play-controls button strong,
.physics-play-controls button em {
  min-width: 0;
  overflow-wrap: anywhere;
  letter-spacing: 0;
}

.physics-play-controls button strong {
  font-size: 16px;
  line-height: 1.05;
}

.physics-play-controls button em {
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
  line-height: 1.05;
  opacity: 0.76;
}

.physics-play-complete {
  position: absolute;
  z-index: 5;
  right: 22px;
  bottom: 22px;
  display: grid;
  gap: 8px;
  max-width: min(340px, calc(100% - 44px));
  padding: 16px;
  background: rgba(7, 16, 38, 0.92);
  color: #ffffff;
}

.physics-play-complete strong {
  font-size: 20px;
}

.physics-play-complete span {
  color: #d8f5ff;
}

.physics-play-complete button {
  justify-self: start;
  padding: 0 18px;
  background: #62e8b3;
  color: #061d17;
}

.physics-play-lab.step-1.push .physics-play-sprite,
.physics-play-lab.step-2.push .physics-play-sprite {
  transform: translateX(18px) rotate(2deg);
}

.physics-play-lab.step-3.push .physics-play-sprite,
.physics-play-lab.step-4.push .physics-play-sprite,
.physics-play-lab.step-5.push .physics-play-sprite {
  transform: translateX(42px) translateY(-16px) rotate(6deg);
}

.physics-play-lab.step-1.drop .physics-play-sprite {
  transform: translateY(16px);
}

.physics-play-lab.step-2.drop .physics-play-sprite,
.physics-play-lab.step-3.drop .physics-play-sprite {
  transform: translateY(38px);
}

.physics-play-lab.step-4.drop .physics-play-sprite,
.physics-play-lab.step-5.drop .physics-play-sprite {
  transform: translateY(54px);
}

.physics-play-lab.step-1.glide .physics-play-sprite {
  transform: translateX(18px);
}

.physics-play-lab.step-2.glide .physics-play-sprite,
.physics-play-lab.step-3.glide .physics-play-sprite {
  transform: translateX(46px);
  filter: drop-shadow(-18px 0 14px rgba(126, 231, 255, 0.26));
}

.physics-play-lab.step-4.glide .physics-play-sprite,
.physics-play-lab.step-5.glide .physics-play-sprite {
  transform: translateX(62px);
}

.physics-play-lab.orbit .physics-play-orbit-ring {
  opacity: 0.78;
  border-color: rgba(255, 226, 121, 0.42);
}

.physics-play-lab.step-1.orbit .physics-play-sprite,
.physics-play-lab.step-2.orbit .physics-play-sprite {
  transform: rotate(5deg);
}

.physics-play-lab.step-3.orbit .physics-play-sprite,
.physics-play-lab.step-4.orbit .physics-play-sprite,
.physics-play-lab.step-5.orbit .physics-play-sprite {
  transform: rotate(11deg) scale(1.02);
}

.physics-play-lab.step-1.bounce .physics-play-sprite {
  transform: scale(0.98);
}

.physics-play-lab.step-2.bounce .physics-play-sprite,
.physics-play-lab.step-3.bounce .physics-play-sprite {
  transform: scale(1.04);
}

.physics-play-lab.step-4.bounce .physics-play-sprite,
.physics-play-lab.step-5.bounce .physics-play-sprite {
  transform: translateY(-16px) scale(1.02);
}

@media (max-width: 880px) {
  .physics-play-lab {
    padding: 78px 12px 18px;
  }

  .physics-play-shell {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .physics-play-copy {
    min-height: 0;
    padding: 16px;
  }

  .physics-play-copy h1 {
    font-size: clamp(2rem, 2.4rem, 2.55rem);
  }

  .physics-play-message {
    min-height: 92px;
  }

  .physics-play-stage {
    min-height: 360px;
    padding: 18px;
  }

  .physics-play-sprite {
    width: min(82%, 320px);
  }

  .physics-play-controls {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .physics-play-controls button {
    min-width: 0;
    min-height: 58px;
    padding: 0 12px;
  }
}

@media (max-width: 480px) {
  .physics-play-copy h1 {
    font-size: 2rem;
  }

  .physics-play-copy p,
  .physics-play-message strong {
    font-size: 17px;
  }

  .physics-play-badges button {
    width: 52px;
    height: 52px;
    min-height: 52px;
  }

  .physics-play-stage {
    min-height: 330px;
  }

  .physics-play-controls {
    grid-template-columns: 1fr;
  }
}

/* ---------- Gravity Goldfish mini game ---------- */
.gravity-goldfish-level {
  position: fixed;
  inset: 0;
  z-index: 30;
  overflow: auto;
  display: grid;
  place-items: center;
  padding: 82px clamp(16px, 3vw, 36px) 28px;
  background:
    radial-gradient(circle at 18% 76%, rgba(255, 214, 107, 0.22), transparent 28%),
    radial-gradient(circle at 78% 20%, rgba(126, 231, 255, 0.18), transparent 32%),
    linear-gradient(180deg, rgba(5, 8, 22, 0.22), rgba(5, 8, 22, 0.96)), #070714;
  color: #edf6ff;
}

.gravity-goldfish-back {
  position: fixed;
  left: max(16px, env(safe-area-inset-left));
  top: max(16px, env(safe-area-inset-top));
  z-index: 44;
  min-height: 60px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(7, 12, 30, 0.86);
  color: #fff7d8;
  font: inherit;
  font-weight: 1000;
  cursor: pointer;
}

.gravity-goldfish-shell {
  width: min(1080px, 100%);
  display: grid;
  grid-template-columns: minmax(260px, 0.58fr) minmax(360px, 1fr);
  align-items: center;
  gap: clamp(18px, 5vw, 56px);
}

.gravity-goldfish-copy {
  display: grid;
  gap: 16px;
}

.gravity-goldfish-copy > span {
  color: #7ee7ff;
  font-size: 13px;
  font-weight: 1000;
  text-transform: uppercase;
}

.gravity-goldfish-copy h1 {
  color: #fff7d8;
  font-family: "Fraunces", serif;
  font-size: clamp(42px, 6vw, 74px);
  font-weight: 500;
  line-height: 0.92;
}

.gravity-goldfish-copy p {
  max-width: 480px;
  color: rgba(237, 246, 255, 0.78);
  font-size: 17px;
  font-weight: 800;
  line-height: 1.35;
}

.gravity-goldfish-message {
  min-height: 70px;
  display: grid;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid rgba(126, 231, 255, 0.24);
  border-radius: 8px;
  background: rgba(7, 12, 30, 0.72);
  color: #fff7d8;
  font-size: 17px;
  font-weight: 900;
  line-height: 1.25;
}

.gravity-goldfish-status {
  min-height: 44px;
  display: grid;
  align-items: center;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(126, 231, 255, 0.12);
  color: #c9f6ff;
  font-size: 15px;
  font-weight: 1000;
  line-height: 1.2;
}

.gravity-goldfish-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.gravity-goldfish-controls button {
  min-height: 78px;
  display: grid;
  place-items: center;
  gap: 4px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #edf6ff;
  font: inherit;
  cursor: pointer;
}

.gravity-goldfish-controls button.on,
.gravity-goldfish-controls button:hover,
.gravity-goldfish-controls button:focus-visible {
  border-color: rgba(255, 214, 107, 0.72);
  background: rgba(255, 214, 107, 0.16);
  outline: 3px solid rgba(126, 231, 255, 0.44);
  outline-offset: 2px;
}

.gravity-goldfish-controls span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(126, 231, 255, 0.18);
  color: #c9f6ff;
  font-size: 24px;
  line-height: 1;
}

.gravity-goldfish-controls strong {
  font-size: 13px;
  font-weight: 1000;
}

.gravity-goldfish-stage {
  position: relative;
  min-height: min(620px, 66vh);
  overflow: hidden;
  border: 1px solid rgba(126, 231, 255, 0.2);
  border-radius: 8px;
  background:
    radial-gradient(circle at 22% 78%, rgba(255, 214, 107, 0.16), transparent 22%),
    radial-gradient(circle at 78% 20%, rgba(126, 231, 255, 0.16), transparent 30%),
    linear-gradient(180deg, rgba(10, 15, 36, 0.9), rgba(6, 8, 22, 0.98));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.gravity-goldfish-moon {
  position: absolute;
  left: -8%;
  right: -8%;
  bottom: -24%;
  height: 38%;
  border-radius: 50% 50% 0 0;
  background:
    radial-gradient(circle at 24% 34%, rgba(255, 255, 255, 0.18), transparent 12%),
    radial-gradient(circle at 62% 22%, rgba(255, 255, 255, 0.12), transparent 10%),
    linear-gradient(180deg, #d8e5ef, #8d9faf);
  opacity: 0.88;
}

.gravity-goldfish-target,
.gravity-goldfish-trail {
  position: absolute;
  transform: translate(-50%, -50%);
}

.gravity-goldfish-target {
  width: 58px;
  height: 58px;
  z-index: 2;
  display: grid;
  place-items: center;
  border: 2px solid rgba(126, 231, 255, 0.62);
  border-radius: 50%;
  background: rgba(126, 231, 255, 0.14);
  color: #fff7d8;
  font-size: 20px;
  font-weight: 1000;
  box-shadow: 0 0 28px rgba(126, 231, 255, 0.22);
}

.gravity-goldfish-target.collected {
  border-color: rgba(255, 214, 107, 0.78);
  background: rgba(255, 214, 107, 0.22);
}

.gravity-goldfish-trail {
  width: 36px;
  height: 36px;
  z-index: 1;
  border-radius: 50%;
  background: rgba(255, 214, 107, 0.22);
  box-shadow: 0 0 24px rgba(255, 214, 107, 0.32);
  animation: gravity-goldfish-pulse 1.2s ease-out both;
}

.gravity-goldfish-fish {
  position: absolute;
  z-index: 3;
  width: min(190px, 30vw);
  max-width: 34%;
  aspect-ratio: 1;
  background-image: var(--goldfish-swim-sheet);
  background-position: var(--goldfish-frame-x) var(--goldfish-frame-y);
  background-repeat: no-repeat;
  background-size: 400% 200%;
  filter: drop-shadow(0 20px 34px rgba(0, 0, 0, 0.36));
  transform: translate(-50%, -50%) rotate(var(--goldfish-rotate, 0deg));
  transition:
    left 0.58s cubic-bezier(0.2, 0.74, 0.2, 1),
    top 0.58s cubic-bezier(0.2, 0.74, 0.2, 1),
    transform 0.58s cubic-bezier(0.2, 0.74, 0.2, 1);
}

.gravity-goldfish-fish.dart {
  animation: gravity-goldfish-dart 0.42s cubic-bezier(0.16, 1, 0.3, 1);
}

.gravity-goldfish-fish.happy {
  animation: gravity-goldfish-happy 0.52s cubic-bezier(0.16, 1, 0.3, 1);
}

.gravity-goldfish-fish.celebrate {
  animation: gravity-goldfish-celebrate 0.88s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes gravity-goldfish-pulse {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.35);
  }
  30% {
    opacity: 0.9;
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.6);
  }
}

@keyframes gravity-goldfish-dart {
  0% {
    transform: translate(-50%, -50%) rotate(var(--goldfish-rotate, 0deg)) scale(0.92, 1.08);
  }
  45% {
    transform: translate(-50%, -50%) rotate(var(--goldfish-rotate, 0deg)) scale(1.08, 0.94);
  }
  100% {
    transform: translate(-50%, -50%) rotate(var(--goldfish-rotate, 0deg)) scale(1);
  }
}

@keyframes gravity-goldfish-happy {
  0% {
    transform: translate(-50%, -50%) rotate(var(--goldfish-rotate, 0deg)) scale(1);
  }
  45% {
    transform: translate(-50%, -56%) rotate(calc(var(--goldfish-rotate, 0deg) - 8deg)) scale(1.08);
  }
  100% {
    transform: translate(-50%, -50%) rotate(var(--goldfish-rotate, 0deg)) scale(1);
  }
}

@keyframes gravity-goldfish-celebrate {
  0% {
    transform: translate(-50%, -50%) rotate(var(--goldfish-rotate, 0deg)) scale(1);
  }
  30% {
    transform: translate(-50%, -62%) rotate(calc(var(--goldfish-rotate, 0deg) - 18deg)) scale(1.12);
  }
  68% {
    transform: translate(-50%, -46%) rotate(calc(var(--goldfish-rotate, 0deg) + 16deg)) scale(1.05);
  }
  100% {
    transform: translate(-50%, -50%) rotate(var(--goldfish-rotate, 0deg)) scale(1);
  }
}

@media (max-width: 820px) {
  .gravity-goldfish-level {
    place-items: start center;
    padding-top: 90px;
  }
  .gravity-goldfish-shell {
    grid-template-columns: 1fr;
  }
  .gravity-goldfish-stage {
    min-height: 420px;
  }
  .gravity-goldfish-controls {
    grid-template-columns: 1fr;
  }
  .gravity-goldfish-fish {
    width: 132px;
    max-width: 42%;
  }
}

/* ---------- Comet Curling mini game ---------- */
.comet-curling-level {
  position: fixed;
  inset: 0;
  z-index: 30;
  overflow: auto;
  display: grid;
  place-items: center;
  padding: 82px clamp(16px, 3vw, 36px) 28px;
  background:
    radial-gradient(circle at 82% 18%, rgba(126, 231, 255, 0.18), transparent 30%),
    radial-gradient(circle at 18% 76%, rgba(255, 214, 107, 0.18), transparent 28%),
    linear-gradient(180deg, rgba(5, 8, 22, 0.2), rgba(5, 8, 22, 0.96)), #070714;
  color: #edf6ff;
}

.comet-curling-back {
  position: fixed;
  left: max(16px, env(safe-area-inset-left));
  top: max(16px, env(safe-area-inset-top));
  z-index: 44;
  min-height: 60px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(7, 12, 30, 0.86);
  color: #fff7d8;
  font: inherit;
  font-weight: 1000;
  cursor: pointer;
}

.comet-curling-shell {
  width: min(1100px, 100%);
  display: grid;
  grid-template-columns: minmax(260px, 0.58fr) minmax(360px, 1fr);
  align-items: center;
  gap: clamp(18px, 5vw, 56px);
}

.comet-curling-copy {
  display: grid;
  gap: 14px;
}

.comet-curling-copy > span {
  color: #7ee7ff;
  font-size: 13px;
  font-weight: 1000;
  text-transform: uppercase;
}

.comet-curling-copy h1 {
  color: #fff7d8;
  font-family: "Fraunces", serif;
  font-size: clamp(42px, 6vw, 74px);
  font-weight: 500;
  line-height: 0.92;
}

.comet-curling-copy p {
  max-width: 480px;
  color: rgba(237, 246, 255, 0.78);
  font-size: 17px;
  font-weight: 800;
  line-height: 1.35;
}

.comet-curling-message {
  min-height: 70px;
  display: grid;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid rgba(126, 231, 255, 0.24);
  border-radius: 8px;
  background: rgba(7, 12, 30, 0.72);
  color: #fff7d8;
  font-size: 17px;
  font-weight: 900;
  line-height: 1.25;
}

.comet-curling-status {
  min-height: 44px;
  display: grid;
  align-items: center;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(126, 231, 255, 0.12);
  color: #c9f6ff;
  font-size: 15px;
  font-weight: 1000;
  line-height: 1.2;
}

.comet-curling-preview {
  display: grid;
  gap: 4px;
  padding: 11px 13px;
  border: 1px solid rgba(255, 214, 107, 0.3);
  border-radius: 8px;
  background: rgba(255, 214, 107, 0.1);
}

.comet-curling-preview span {
  color: #7ee7ff;
  font-size: 12px;
  font-weight: 1000;
  text-transform: uppercase;
}

.comet-curling-preview strong {
  color: #fff7d8;
  font-size: 18px;
  line-height: 1.1;
  text-transform: capitalize;
}

.comet-curling-preview small {
  color: rgba(237, 246, 255, 0.88);
  font-size: 14px;
  font-weight: 850;
  line-height: 1.25;
}

.comet-curling-chooser,
.comet-curling-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.comet-curling-actions {
  grid-template-columns: 1fr 1fr;
}

.comet-curling-chooser button,
.comet-curling-actions button {
  min-height: 68px;
  display: grid;
  place-items: center;
  gap: 4px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #edf6ff;
  font: inherit;
  font-size: 13px;
  font-weight: 1000;
  cursor: pointer;
}

.comet-curling-chooser button.on,
.comet-curling-chooser button:hover,
.comet-curling-chooser button:focus-visible,
.comet-curling-actions button:hover,
.comet-curling-actions button:focus-visible {
  border-color: rgba(255, 214, 107, 0.72);
  background: rgba(255, 214, 107, 0.16);
  outline: 3px solid rgba(126, 231, 255, 0.44);
  outline-offset: 2px;
}

.comet-curling-chooser span {
  font-size: 22px;
  line-height: 1;
}

.comet-curling-stage {
  position: relative;
  min-height: min(620px, 66vh);
  overflow: hidden;
  border: 1px solid rgba(126, 231, 255, 0.2);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(10, 15, 36, 0.82), rgba(6, 8, 22, 0.98)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.06) 0 2px, transparent 2px 78px);
}

.comet-curling-stage.surface-ice {
  box-shadow: inset 0 -120px 120px rgba(126, 231, 255, 0.1);
}

.comet-curling-stage.surface-dust {
  box-shadow: inset 0 -120px 120px rgba(255, 214, 107, 0.1);
}

.comet-curling-stage.surface-bumps {
  box-shadow: inset 0 -120px 120px rgba(210, 180, 255, 0.1);
}

.comet-curling-lane {
  position: absolute;
  left: 8%;
  right: 8%;
  top: 58%;
  height: 76px;
  border-radius: 999px;
  background: rgba(237, 246, 255, 0.1);
}

.comet-curling-lane i {
  position: absolute;
  top: 50%;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(255, 214, 107, 0.36);
  transform: translateY(-50%);
}

.comet-curling-lane i:nth-child(1) { left: 20%; }
.comet-curling-lane i:nth-child(2) { left: 52%; }
.comet-curling-lane i:nth-child(3) { left: 82%; }

.comet-curling-puck {
  position: absolute;
  left: var(--comet-left, 50%);
  top: 52%;
  z-index: 2;
  width: min(180px, 28vw);
  max-width: 34%;
  height: auto;
  filter: drop-shadow(0 20px 34px rgba(0, 0, 0, 0.36));
  transform: translate(-50%, -50%) rotate(var(--comet-spin, 0deg));
  transition:
    left 0.72s cubic-bezier(0.2, 0.74, 0.2, 1),
    transform 0.72s cubic-bezier(0.2, 0.74, 0.2, 1);
}

.comet-curling-puck.slide {
  animation: comet-curling-slide-squash 0.56s cubic-bezier(0.16, 1, 0.3, 1);
}

.comet-curling-puck.celebrate {
  animation: comet-curling-win-roll 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

.comet-curling-target {
  position: absolute;
  right: 10%;
  top: 54%;
  min-height: 60px;
  display: grid;
  place-items: center;
  padding: 0 14px;
  border: 1px solid rgba(255, 214, 107, 0.5);
  border-radius: 999px;
  background: rgba(255, 214, 107, 0.16);
  color: #fff7d8;
  font-size: 13px;
  font-weight: 1000;
}

.comet-curling-far-sparkles {
  position: absolute;
  right: 9%;
  top: 43%;
  width: 128px;
  height: 116px;
  pointer-events: none;
}

.comet-curling-far-sparkle {
  position: absolute;
  width: 48px;
  height: auto;
  opacity: 0;
  animation: comet-curling-far-sparkle 0.95s ease-out both;
}

.comet-curling-far-sparkle.sparkle-1 {
  left: 0;
  top: 18px;
}

.comet-curling-far-sparkle.sparkle-2 {
  right: 8px;
  top: 0;
  animation-delay: 0.1s;
}

.comet-curling-far-sparkle.sparkle-3 {
  left: 44px;
  bottom: 8px;
  animation-delay: 0.18s;
}

.comet-curling-score {
  position: absolute;
  left: 10%;
  right: 10%;
  bottom: 34px;
  display: grid;
  gap: 6px;
}

.comet-curling-score span {
  min-width: 42px;
  height: 18px;
  display: grid;
  place-items: center end;
  padding-right: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(126, 231, 255, 0.2), rgba(255, 214, 107, 0.42));
  color: #061225;
  font-size: 11px;
  font-weight: 1000;
}

@keyframes comet-curling-slide-squash {
  0% {
    transform: translate(-50%, -50%) rotate(var(--comet-spin, 0deg)) scale(0.9, 1.08);
  }
  45% {
    transform: translate(-50%, -50%) rotate(var(--comet-spin, 0deg)) scale(1.08, 0.92);
  }
  100% {
    transform: translate(-50%, -50%) rotate(var(--comet-spin, 0deg)) scale(1);
  }
}

@keyframes comet-curling-win-roll {
  0% {
    transform: translate(-50%, -50%) rotate(var(--comet-spin, 0deg)) scale(1);
  }
  35% {
    transform: translate(-50%, -60%) rotate(calc(var(--comet-spin, 0deg) + 24deg)) scale(1.1);
  }
  70% {
    transform: translate(-50%, -46%) rotate(calc(var(--comet-spin, 0deg) - 16deg)) scale(1.04);
  }
  100% {
    transform: translate(-50%, -50%) rotate(var(--comet-spin, 0deg)) scale(1);
  }
}

@keyframes comet-curling-far-sparkle {
  0% {
    opacity: 0;
    transform: scale(0.42) rotate(-18deg);
  }
  30%,
  68% {
    opacity: 1;
    transform: scale(1) rotate(8deg);
  }
  100% {
    opacity: 0;
    transform: scale(1.24) rotate(24deg);
  }
}

@media (max-width: 820px) {
  .comet-curling-level {
    place-items: start center;
    padding-top: 90px;
  }
  .comet-curling-shell {
    grid-template-columns: 1fr;
  }
  .comet-curling-stage {
    min-height: 420px;
  }
  .comet-curling-chooser,
  .comet-curling-actions {
    grid-template-columns: 1fr;
  }
  .comet-curling-puck {
    width: 128px;
    max-width: 42%;
  }
}

.solar-sail-level {
  position: fixed;
  inset: 0;
  z-index: 30;
  overflow: auto;
  display: grid;
  place-items: center;
  padding: 82px clamp(16px, 3vw, 36px) 26px;
  background:
    radial-gradient(circle at 18% 42%, rgba(255, 214, 107, 0.18), transparent 28%),
    radial-gradient(circle at 82% 18%, rgba(126, 231, 255, 0.14), transparent 28%),
    linear-gradient(180deg, rgba(5, 8, 24, 0.18), rgba(5, 8, 24, 0.96)),
    #050818;
}

.solar-sail-shell {
  position: relative;
  z-index: 34;
  width: min(1180px, 100%);
  display: grid;
  grid-template-columns: minmax(250px, 0.52fr) minmax(360px, 1fr) minmax(260px, 0.48fr);
  gap: clamp(14px, 3vw, 28px);
  align-items: stretch;
}

.solar-sail-copy,
.solar-sail-stage,
.solar-sail-controls {
  border: 1px solid rgba(126, 231, 255, 0.2);
  border-radius: 8px;
  background: rgba(12, 22, 46, 0.78);
  box-shadow: 0 22px 58px rgba(0, 0, 0, 0.34);
}

.solar-sail-copy,
.solar-sail-controls {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: clamp(16px, 2.2vw, 24px);
}

.solar-sail-copy > span {
  color: #7ee7ff;
  font-size: 12px;
  font-weight: 1000;
  text-transform: uppercase;
}

.solar-sail-copy h1 {
  max-width: 12ch;
  color: #fff7d8;
  font-family: "Fraunces", serif;
  font-size: clamp(34px, 5vw, 58px);
  font-weight: 500;
  line-height: 0.96;
}

.solar-sail-copy p {
  max-width: 340px;
  color: rgba(237, 246, 255, 0.78);
  font-weight: 800;
  line-height: 1.35;
}

.solar-sail-card,
.solar-sail-meter {
  display: grid;
  gap: 8px;
  padding: 13px;
  border: 1px solid rgba(255, 214, 107, 0.24);
  border-radius: 8px;
  background: rgba(255, 214, 107, 0.1);
}

.solar-sail-card strong,
.solar-sail-meter strong,
.solar-sail-controls strong {
  color: #fff7d8;
  font-size: 15px;
  font-weight: 1000;
}

.solar-sail-card span,
.solar-sail-meter small {
  color: rgba(237, 246, 255, 0.78);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.3;
}

.solar-sail-meter i {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
}

.solar-sail-meter b {
  display: block;
  min-width: 18px;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(255, 214, 107, 0.72), rgba(126, 231, 255, 0.88));
}

.solar-sail-push-guide {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.solar-sail-push-guide span {
  display: grid;
  gap: 3px;
  min-width: 0;
  min-height: 62px;
  align-content: center;
  border: 1px solid rgba(126, 231, 255, 0.2);
  border-radius: 8px;
  padding: 8px 10px;
  background: rgba(7, 18, 38, 0.7);
}

.solar-sail-push-guide small {
  color: rgba(237, 246, 255, 0.62);
  font-size: 11px;
  font-weight: 1000;
  text-transform: uppercase;
}

.solar-sail-push-guide strong {
  color: #fff7d8;
  font-size: 16px;
  font-weight: 1000;
  line-height: 1.05;
}

.solar-sail-push-guide .solar-sail-push-ready {
  border-color: rgba(112, 255, 170, 0.46);
  background: rgba(32, 86, 58, 0.46);
}

.solar-sail-push-guide .solar-sail-push-low,
.solar-sail-push-guide .solar-sail-push-high {
  border-color: rgba(255, 214, 107, 0.34);
  background: rgba(78, 55, 20, 0.42);
}

.solar-sail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.solar-sail-actions button,
.solar-sail-controls button {
  min-height: 60px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff7d8;
  font: inherit;
  font-weight: 1000;
  cursor: pointer;
}

.solar-sail-actions button {
  padding: 10px 14px;
}

.solar-sail-actions button:first-child,
.solar-sail-controls button.selected,
.solar-sail-shine {
  border-color: transparent;
  background: linear-gradient(180deg, #ffd66b, #ff9a30);
  color: #231400;
}

.solar-sail-stage {
  position: relative;
  min-height: 540px;
  overflow: hidden;
  isolation: isolate;
  background:
    linear-gradient(90deg, rgba(255, 214, 107, 0.12), transparent 42%),
    radial-gradient(circle at 72% 22%, rgba(126, 231, 255, 0.18), transparent 26%),
    #061025;
}

.solar-sail-sun {
  position: absolute;
  left: -58px;
  top: 44%;
  z-index: 1;
  width: 148px;
  height: 148px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff7d8 0 22%, #ffd66b 42%, #ff8b30 70%);
  box-shadow: 0 0 54px rgba(255, 214, 107, 0.58);
}

.solar-sail-beam {
  position: absolute;
  left: 42px;
  top: 24%;
  z-index: 1;
  width: 68%;
  height: 52%;
  clip-path: polygon(0 42%, 100% 0, 100% 100%, 0 58%);
  background: linear-gradient(90deg, rgba(255, 214, 107, 0.26), rgba(255, 214, 107, 0.02));
}

.solar-sail-target {
  position: absolute;
  left: var(--target-stop);
  top: 50%;
  z-index: 2;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 2px solid rgba(255, 214, 107, 0.76);
  transform: translate(-50%, -50%);
  box-shadow: 0 0 24px rgba(255, 214, 107, 0.34);
}

.solar-sail-target span {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ffd66b;
}

.solar-sail-craft {
  position: absolute;
  left: 12%;
  top: 50%;
  z-index: 3;
  width: min(210px, 32vw);
  transform: translate(-50%, -50%) rotate(var(--sail-angle));
  transition:
    left 0.62s cubic-bezier(0.2, 0.86, 0.24, 1.04),
    transform 0.62s cubic-bezier(0.2, 0.86, 0.24, 1.04);
  filter: drop-shadow(0 22px 28px rgba(0, 0, 0, 0.38));
}

.solar-sail-stage.launched .solar-sail-craft {
  left: var(--sail-glide);
  transform: translate(-50%, -50%) rotate(var(--sail-angle));
}

.solar-sail-controls > div {
  display: grid;
  gap: 9px;
}

.solar-sail-controls button {
  width: 100%;
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  text-align: left;
}

.solar-sail-controls button small {
  color: inherit;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  opacity: 0.78;
}

.solar-sail-shine {
  margin-top: 4px;
  min-height: 62px;
  place-items: center;
  text-align: center;
}

.solar-sail-shine:disabled {
  opacity: 0.58;
  cursor: default;
}

@media (max-width: 920px) {
  .solar-sail-level {
    align-items: start;
    padding: 78px 14px 20px;
  }

  .solar-sail-shell {
    grid-template-columns: 1fr;
  }

  .solar-sail-copy h1 {
    max-width: 100%;
    font-size: clamp(32px, 10vw, 48px);
  }

  .solar-sail-stage {
    min-height: 390px;
  }

  .solar-sail-craft {
    width: min(176px, 44vw);
  }

  .solar-sail-push-guide {
    grid-template-columns: 1fr;
  }
}
