html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: #1b1340;
  font-family: "Segoe UI", "Comic Sans MS", system-ui, sans-serif;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  overscroll-behavior: none;
  -webkit-tap-highlight-color: transparent;
}

#stage {
  position: relative;
  width: 540px;
  height: 820px;
  margin: 0 auto;
  transform-origin: top center;
}

#game {
  display: block;
  width: 540px;
  height: 820px;
  touch-action: none;
  cursor: crosshair;
}

/* Reserved banner space below gameplay. Insert an ad into #gameAdMount. */
#gameAdSlot {
  position: fixed;
  z-index: 30;
  right: 0;
  bottom: 0;
  left: 0;
  box-sizing: border-box;
  height: calc(clamp(50px, 10vh, 90px) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  display: grid;
  place-items: center;
  overflow: hidden;
  border-top: 1px solid rgba(255,255,255,.2);
  background: linear-gradient(180deg, #152b52, #0b1832);
  box-shadow: 0 -7px 20px rgba(4,18,45,.28);
}

#gameAdMount {
  position: relative;
  z-index: 2;
  display: flex;
  width: min(100%, 728px);
  height: 100%;
  align-items: center;
  justify-content: center;
}

#gameAdMount > iframe,
#gameAdMount > ins { max-width: 100%; max-height: 100%; }

#gameAdSlot .adLabel {
  position: absolute;
  z-index: 1;
  color: rgba(255,255,255,.48);
  font: 700 10px/1 system-ui, sans-serif;
  letter-spacing: .14em;
  text-transform: uppercase;
  pointer-events: none;
}

/* ===== overlay panels ===== */
.panel {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: rgba(20, 12, 60, 0.88);
  z-index: 10;
  text-align: center;
}

.hidden { display: none !important; }

.panel .title {
  font-size: 64px;
  margin: 0 0 4px 0;
  color: #ffd32a;
  text-shadow: 0 4px 0 #b8860b, 0 8px 18px rgba(0,0,0,.5);
  letter-spacing: 1px;
}
.panel .title span { color: #4ecdff; text-shadow: 0 4px 0 #1a6fa8, 0 8px 18px rgba(0,0,0,.5); }

.panel .tagline {
  color: #cfc6ff;
  font-size: 18px;
  margin: 0 0 18px 0;
}

.panel h1 { color: #fff; font-size: 48px; margin: 0; }
.panel h2 { color: #cfc6ff; font-size: 22px; margin: 6px 0 0 0; font-weight: 600; }
.panel p  { color: #ffd32a; font-size: 26px; font-weight: 700; margin: 0; }

.bigbtn {
  font-family: inherit;
  font-size: 26px;
  font-weight: 800;
  padding: 16px 44px;
  border: 0;
  border-radius: 40px;
  cursor: pointer;
  color: #fff;
  min-width: 300px;
  transition: transform .16s ease, filter .16s ease, box-shadow .16s ease;
}
.bigbtn:hover { transform: translateY(-2px) scale(1.035); filter: brightness(1.08); }
.bigbtn:active { transform: scale(.97); }
.bigbtn.play { background: linear-gradient(#3ae374, #1fa84c); box-shadow: 0 6px 0 #157a36; }
.bigbtn.math { background: linear-gradient(#4ecdff, #1e90ff); box-shadow: 0 6px 0 #1362ad; }
.bigbtn.secondary { background: linear-gradient(#4f438d, #32256f); box-shadow: 0 6px 0 #21174e; }

.linkbtn {
  background: none;
  border: 0;
  color: #a99ee0;
  font-size: 17px;
  cursor: pointer;
  font-family: inherit;
}
.linkbtn:hover { color: #fff; }

.optrow { display: flex; gap: 10px; justify-content: center; }
.optrow.wrap { flex-wrap: wrap; max-width: 430px; gap: 8px; }

#mathOptions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.menuScreen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  width: 100%;
}

.titleScreen { gap: 18px; }
.titleBubble {
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  border: 5px solid rgba(255,255,255,.92);
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #bdf3ff, #4ecdff 52%, #1e76ce);
  color: #103c75;
  font-size: 52px;
  font-weight: 900;
  box-shadow: inset 0 0 0 7px rgba(255,255,255,.18), 0 13px 32px rgba(78,205,255,.34);
  animation: titleBubbleFloat 2.8s ease-in-out infinite;
}

.panel .screenEyebrow {
  margin: 0;
  color: #65d9ff;
  font-size: 13px;
  font-weight: 850;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.panel h1.screenTitle {
  max-width: 470px;
  color: #fff;
  font-size: 34px;
  line-height: 1.08;
  text-shadow: 0 5px 18px rgba(0,0,0,.35);
}

#continueCard {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  width: 460px;
  box-sizing: border-box;
  padding: 12px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 18px;
  background: rgba(15,10,45,.62);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 14px 32px rgba(0,0,0,.22);
}

#continueThemePreview {
  display: block;
  width: 220px;
  height: 82px;
  border-radius: 12px;
  background: #080d1c;
}

.continueCopy { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; }
.continueCopy strong { color: #fff; font-size: 23px; }
.continueCopy span { color: #ffd65a; font-size: 13px; font-weight: 800; }
.continueCopy small {
  overflow: hidden;
  max-width: 190px;
  color: #b9c4e7;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@keyframes titleBubbleFloat {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50% { transform: translateY(-9px) rotate(3deg); }
}

.panel h2.stepLabel {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #f2efff;
  font-size: 18px;
  font-weight: 800;
}

.stepLabel > span {
  display: inline-grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: #4ecdff;
  color: #102652;
  font-size: 14px;
}

.optbtn.tiny { width: auto; height: auto; font-size: 14px; padding: 8px 12px; }

.panel .opthint {
  color: #a99ee0;
  font-size: 14px;
  margin: -4px 0 0 0;
  line-height: 1.35;
}

.optbtn {
  font-family: inherit;
  font-size: 30px;
  font-weight: 800;
  width: 64px;
  height: 64px;
  border-radius: 16px;
  border: 3px solid #5a4aa8;
  background: #2a1e6e;
  color: #cfc6ff;
  cursor: pointer;
}
.optbtn.small { width: auto; height: auto; font-size: 18px; padding: 10px 18px; }
.optbtn.problem {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 88px;
  height: 72px;
  padding: 6px 3px;
}
.optbtn.problem b { font-size: 27px; line-height: 1; }
.optbtn.problem span { font-size: 11px; font-weight: 750; }
.optbtn.selected {
  background: linear-gradient(#ffd32a, #f0a500);
  border-color: #fff;
  color: #4a3200;
}

#progressCard {
  width: 430px;
  box-sizing: border-box;
  padding: 13px 14px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 18px;
  background: rgba(15, 10, 45, .58);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 10px 28px rgba(0,0,0,.18);
}

#progressCard #progressStatus {
  margin: 0 0 10px;
  color: #e5e0ff;
  font-size: 14px;
  font-weight: 700;
}

.progressActions { display: grid; grid-template-columns: 1.25fr 1fr; gap: 9px; }
.progressActions button {
  min-height: 42px;
  border: 0;
  border-radius: 13px;
  color: #fff;
  font: 800 15px/1 inherit;
  cursor: pointer;
}
.continueBtn { background: linear-gradient(#3ae374, #1fa84c); box-shadow: 0 4px 0 #157a36; }
.restartBtn { background: #40347f; box-shadow: 0 4px 0 #241b56; }
.progressActions button:hover:not(:disabled) { filter: brightness(1.08); transform: translateY(-1px); }
.progressActions button:active:not(:disabled) { transform: translateY(2px); box-shadow: none; }
.progressActions button:disabled { opacity: .42; cursor: not-allowed; box-shadow: none; }

#muteBtn, #homeBtn {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 20;
  width: 42px;
  height: 42px;
  font-size: 20px;
  border-radius: 50%;
  border: 0;
  background: rgba(255,255,255,.15);
  color: #fff;
  cursor: pointer;
}
#muteBtn:hover, #homeBtn:hover { background: rgba(255,255,255,.3); }
#homeBtn { right: auto; left: 14px; font-size: 24px; }

#perfHud {
  position: fixed;
  z-index: 9999;
  top: max(8px, env(safe-area-inset-top));
  left: max(8px, env(safe-area-inset-left));
  padding: 7px 9px;
  border: 1px solid rgba(255,255,255,.5);
  border-radius: 8px;
  background: rgba(5, 12, 28, .82);
  color: #9dffb6;
  font: 700 11px/1.35 ui-monospace, SFMono-Regular, Consolas, monospace;
  white-space: pre-line;
  pointer-events: none;
  box-shadow: 0 4px 14px rgba(0,0,0,.3);
}

/* ===== polished result reveal ===== */
#overlay {
  background:
    radial-gradient(circle at 50% 38%, rgba(68, 48, 142, .92), rgba(12, 8, 38, .97) 64%);
  backdrop-filter: blur(5px);
}

#overlay:not(.hidden) {
  animation: resultBackdropIn .36s ease-out both;
}

#overlay:not(.hidden) > * {
  animation: resultCardIn .48s cubic-bezier(.2, .85, .25, 1.15) both;
}

#overlay:not(.hidden) > :nth-child(2) { animation-delay: .06s; }
#overlay:not(.hidden) > :nth-child(3) { animation-delay: .11s; }
#overlay:not(.hidden) > :nth-child(4) { animation-delay: .16s; }

#overlayTitle {
  color: #fff;
  text-shadow: 0 3px 0 #8f2639, 0 9px 26px rgba(255, 71, 87, .42);
}

#overlayScore {
  min-width: 280px;
  box-sizing: border-box;
  padding: 13px 22px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 18px;
  background: rgba(15, 10, 45, .56);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 10px 30px rgba(0,0,0,.22);
}

@keyframes resultBackdropIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes resultCardIn {
  from { opacity: 0; transform: translateY(22px) scale(.92); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ===== bright, playful menu system ===== */
html, body { background: #4bc4ff; }

#menu {
  --title-background-image: none;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(circle at 18% 18%, rgba(255,255,255,.9) 0 5%, transparent 17%),
    radial-gradient(circle at 86% 12%, rgba(255,255,255,.76) 0 4%, transparent 15%),
    linear-gradient(180deg, #168cff 0%, #43c9ff 48%, #9deaff 100%);
  color: #164279;
  animation: menuSkyDrift 12s ease-in-out infinite alternate;
}

#menu::after {
  content: "";
  position: absolute;
  z-index: 0;
  right: -55px;
  bottom: -44px;
  left: -55px;
  height: 165px;
  background:
    radial-gradient(ellipse at 11% 100%, #fff 0 40%, transparent 41%),
    radial-gradient(ellipse at 35% 108%, #f8fdff 0 44%, transparent 45%),
    radial-gradient(ellipse at 61% 105%, #fff 0 43%, transparent 44%),
    radial-gradient(ellipse at 86% 100%, #f5fcff 0 42%, transparent 43%);
  filter: drop-shadow(0 -8px 18px rgba(31,140,218,.16));
  pointer-events: none;
}

.menuFloaters {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.menuFloaters span {
  position: absolute;
  width: 52px;
  height: 52px;
  border: 3px solid rgba(255,255,255,.88);
  border-radius: 50%;
  background: radial-gradient(circle at 30% 25%, #fff 0 7%, rgba(255,255,255,.42) 9%, rgba(255,105,196,.86) 28%, rgba(255,50,142,.74) 72%, rgba(170,31,126,.45));
  box-shadow: inset 0 -6px 12px rgba(96,25,126,.18), 0 9px 20px rgba(25,103,194,.18);
  opacity: .82;
  animation: menuBubbleFloat 5.8s ease-in-out infinite;
}

.menuFloaters span:nth-child(1) { left: 27px; top: 112px; width: 58px; height: 58px; }
.menuFloaters span:nth-child(2) { right: 34px; top: 74px; width: 38px; height: 38px; animation-delay: -1.4s; background-color: #8b67ff; filter: hue-rotate(58deg); }
.menuFloaters span:nth-child(3) { right: 16px; top: 430px; width: 70px; height: 70px; animation-delay: -3.1s; filter: hue-rotate(138deg); }
.menuFloaters span:nth-child(4) { left: 46px; top: 580px; width: 34px; height: 34px; animation-delay: -4.2s; filter: hue-rotate(205deg); }
.menuFloaters span:nth-child(5) { left: 225px; top: 42px; width: 24px; height: 24px; animation-delay: -2.2s; filter: hue-rotate(98deg); }

#menu .menuScreen {
  position: absolute;
  inset: 0;
  z-index: 3;
  isolation: isolate;
  backface-visibility: hidden;
  box-sizing: border-box;
  padding: 56px 24px 52px;
}

#menu .menuScreen > * { position: relative; z-index: 2; }
#menu .menuScreen.screenEnter { animation: menuScreenIn .48s cubic-bezier(.2,.8,.2,1) both; }
#menu .menuScreen.screenEnterBack { animation: menuScreenInBack .42s cubic-bezier(.2,.8,.2,1) both; }

#problemScreen::before,
#saveScreen::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 46px 18px 54px;
  border: 2px solid rgba(255,255,255,.62);
  border-radius: 38px;
  background: linear-gradient(160deg, rgba(255,255,255,.37), rgba(225,247,255,.2));
  box-shadow: inset 0 2px 0 rgba(255,255,255,.56), 0 22px 50px rgba(16,91,171,.2);
  backdrop-filter: blur(8px);
}

.titleScreen::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0;
  background-image: var(--title-background-image);
  background-position: center;
  background-size: cover;
  opacity: 0;
  transform: scale(1.025);
  transition: opacity .35s ease;
  animation: titleBackdropBreathe 10s ease-in-out infinite alternate;
}

.titleScreen::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  background: linear-gradient(180deg, rgba(11,110,207,.04) 38%, rgba(8,93,178,.28) 100%);
  pointer-events: none;
}

#menu.has-custom-title .titleScreen::before { opacity: 1; }
#menu.has-custom-title .titleBubble { display: none; }
#menu.full-title-artwork .titleScreen > :not(#btnTitlePlay) { opacity: 0; }
#menu.full-title-artwork #btnTitlePlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: transparent;
}
#menu.full-title-artwork #btnTitlePlay:hover,
#menu.full-title-artwork #btnTitlePlay:active { transform: none; filter: none; }
#menu.full-title-artwork #btnTitlePlay:focus-visible { box-shadow: inset 0 0 0 6px #fff; outline: 0; }

#menu .panel .title,
#menu .title {
  color: #ffe339;
  font-size: 66px;
  letter-spacing: -2px;
  -webkit-text-stroke: 2px #fff;
  text-shadow: 0 5px 0 #ef8c00, 0 9px 0 #fff, 0 14px 28px rgba(23,92,170,.32);
}
#menu .title span {
  color: #ff58aa;
  text-shadow: 0 5px 0 #d42c79, 0 9px 0 #fff, 0 14px 28px rgba(23,92,170,.32);
}
#menu .tagline {
  color: #fff;
  font-size: 17px;
  text-shadow: 0 2px 6px rgba(21,84,156,.52);
}

#menu .titleBubble {
  border-color: #fff;
  background: radial-gradient(circle at 30% 24%, #fff 0 8%, #d8b8ff 11%, #a75cff 48%, #6c2cdb 78%);
  color: #fff;
  text-shadow: 0 3px 0 #5723a7;
  box-shadow: inset 0 0 0 7px rgba(255,255,255,.22), 0 13px 32px rgba(68,84,203,.3);
}

#menu .screenEyebrow { color: #075ba8; text-shadow: 0 1px 0 rgba(255,255,255,.55); }
#menu h1.screenTitle {
  color: #fff;
  font-size: 38px;
  text-shadow: 0 4px 0 #1783d7, 0 9px 22px rgba(9,83,153,.25);
}
#menu .opthint {
  max-width: 430px;
  color: #135c9c;
  font-weight: 750;
}

#menu .bigbtn {
  border: 3px solid rgba(255,255,255,.92);
  box-shadow: inset 0 3px 0 rgba(255,255,255,.35), 0 7px 0 #157a36, 0 13px 26px rgba(22,101,162,.25);
  text-shadow: 0 2px 0 rgba(0,0,0,.18);
}
#menu .bigbtn.play { background: linear-gradient(180deg, #a8f52f, #4fcf14 66%, #34a908); }
#menu .bigbtn.secondary {
  background: linear-gradient(180deg, #a985ff, #7457e8 66%, #5938c9);
  box-shadow: inset 0 3px 0 rgba(255,255,255,.32), 0 7px 0 #43259d, 0 13px 26px rgba(22,101,162,.24);
}

#menu .linkbtn {
  min-height: 40px;
  padding: 9px 18px;
  border: 2px solid rgba(255,255,255,.72);
  border-radius: 22px;
  background: rgba(255,255,255,.35);
  color: #07599f;
  font-size: 15px;
  font-weight: 850;
  box-shadow: 0 5px 12px rgba(20,101,172,.15);
  transition: transform .15s ease, background .15s ease;
}
#menu .linkbtn:hover { color: #074d8c; background: rgba(255,255,255,.62); transform: translateY(-1px); }
#menu .screenBack { position: absolute; top: 30px; left: 24px; z-index: 4; }

#menu .optrow { gap: 9px; }
#menu .optbtn {
  border: 3px solid rgba(255,255,255,.9);
  background: linear-gradient(180deg, #67dfff, #258de8);
  color: #fff;
  box-shadow: inset 0 3px 0 rgba(255,255,255,.32), 0 6px 0 #1268b6, 0 11px 18px rgba(13,99,174,.2);
  text-shadow: 0 2px 0 rgba(0,0,0,.16);
  transition: transform .18s ease, filter .18s ease, opacity .18s ease, box-shadow .18s ease;
}
#menu .optbtn:hover { transform: translateY(-4px) scale(1.04); filter: brightness(1.08); }
#menu .optbtn:active { transform: translateY(2px) scale(.98); box-shadow: inset 0 2px 0 rgba(255,255,255,.25), 0 2px 0 #1268b6; }
#menu .optbtn.selected {
  border-color: #fff;
  color: #fff;
  filter: brightness(1.08) saturate(1.12);
  box-shadow: inset 0 3px 0 rgba(255,255,255,.4), 0 0 0 5px rgba(255,255,255,.34), 0 8px 0 rgba(17,91,161,.8), 0 15px 28px rgba(13,99,174,.28);
}

#menu .optbtn.problem { width: 88px; height: 78px; border-radius: 21px; }
#menu .optbtn.problem b { font-size: 31px; text-shadow: 0 3px 0 rgba(33,69,135,.22); }
#menu .optbtn.problem span { font-size: 11px; letter-spacing: .01em; }
#menu #opRow .problem:nth-child(1) { background: linear-gradient(180deg, #ff91c7, #ff4f9c); box-shadow: inset 0 3px 0 rgba(255,255,255,.38), 0 6px 0 #c62b72, 0 11px 18px rgba(13,99,174,.18); }
#menu #opRow .problem:nth-child(2) { background: linear-gradient(180deg, #ffd34f, #ff921d); box-shadow: inset 0 3px 0 rgba(255,255,255,.38), 0 6px 0 #d36b09, 0 11px 18px rgba(13,99,174,.18); }
#menu #opRow .problem:nth-child(3) { background: linear-gradient(180deg, #a9ef3d, #4dcf35); box-shadow: inset 0 3px 0 rgba(255,255,255,.38), 0 6px 0 #269a24, 0 11px 18px rgba(13,99,174,.18); }
#menu #opRow .problem:nth-child(4) { background: linear-gradient(180deg, #67e3ff, #258de8); box-shadow: inset 0 3px 0 rgba(255,255,255,.38), 0 6px 0 #1268b6, 0 11px 18px rgba(13,99,174,.18); }
#menu #opRow .problem:nth-child(5) { background: linear-gradient(180deg, #c995ff, #8454ed); box-shadow: inset 0 3px 0 rgba(255,255,255,.38), 0 6px 0 #5b31bd, 0 11px 18px rgba(13,99,174,.18); }
#menu #opRow .problem.selected { box-shadow: inset 0 3px 0 rgba(255,255,255,.42), 0 0 0 6px rgba(255,255,255,.38), 0 9px 0 rgba(17,91,161,.78), 0 16px 28px rgba(13,99,174,.3); }
#menu #opRow.has-choice .problem:not(.is-launching) { opacity: .38; transform: scale(.88); filter: saturate(.55); }
#menu #opRow .problem.is-launching { animation: equationChoiceLaunch .44s cubic-bezier(.2,.8,.25,1) both; }

/* difficulty picker removed — runs start on Easy and promote automatically */

#menu #continueCard {
  border: 2px solid rgba(255,255,255,.78);
  background: rgba(255,255,255,.42);
  box-shadow: inset 0 2px 0 rgba(255,255,255,.48), 0 14px 30px rgba(16,91,171,.18);
}
#menu .continueCopy strong { color: #075599; }
#menu .continueCopy span { color: #b45100; }
#menu .continueCopy small { color: #1b609b; }

@keyframes menuSkyDrift {
  from { background-position: 0 0, 0 0, 0 0; }
  to { background-position: 22px 10px, -18px 14px, 0 0; }
}
@keyframes menuBubbleFloat {
  0%, 100% { transform: translateY(0) rotate(-4deg); }
  50% { transform: translateY(-18px) rotate(5deg); }
}
@keyframes menuScreenIn {
  from { opacity: 1; transform: translateX(50px) scale(.96); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}
@keyframes menuScreenInBack {
  from { opacity: 1; transform: translateX(-42px) scale(.97); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}
@keyframes equationChoiceLaunch {
  0% { transform: translateY(0) scale(1); }
  48% { transform: translateY(-13px) scale(1.16) rotate(-3deg); }
  76% { transform: translateY(-5px) scale(1.1) rotate(2deg); }
  100% { transform: translateY(0) scale(1.04); }
}
@keyframes titleBackdropBreathe {
  from { transform: scale(1.025); }
  to { transform: scale(1.055); }
}

@media (prefers-reduced-motion: reduce) {
  #overlay:not(.hidden), #overlay:not(.hidden) > * { animation: none; }
  .bigbtn { transition: none; }
  .titleBubble { animation: none; }
  #menu, #menu .menuScreen, #menu .menuFloaters span,
  #menu .titleScreen::before, #menu #opRow .problem.is-launching { animation: none; }
}

/* ------------------------------------------------------------------
   Phone menu budget.

   The menu is where kids linger, and several decorative effects are
   disproportionately expensive on mobile GPUs:
   - menuSkyDrift animates background-position, which cannot be composited
     and repaints the whole panel every frame;
   - titleBackdropBreathe continuously rescales the full-screen title art;
   - backdrop-filter blurs re-read the framebuffer every frame, on top of
     the animation underneath them;
   - hue-rotate() on the floaters forces each one onto its own layer.
   Coarse pointers keep the layout and the gentle float, minus the repaints.
   ------------------------------------------------------------------ */
@media (pointer: coarse) {
  #menu { animation: none; }
  #menu .titleScreen::before { animation: none; }
  #menu .menuScreen::before,
  #overlay { backdrop-filter: none; }
  #menu .menuFloaters span { filter: none; }
}
