:root {
  color-scheme: dark;
  --ink: #fffdf8;
  --muted: #c9c3e6;
  --deep: #190b3e;
  --purple: #382071;
  --violet: #6f4ce7;
  --blue: #2fa5dd;
  --cyan: #55d9eb;
  --yellow: #ffd45a;
  --orange: #ff8b4a;
  --pink: #ff6fa9;
  --green: #6de3a7;
  --card: rgba(52, 33, 104, .82);
  --line: rgba(255,255,255,.16);
  font-family: ui-rounded, "SF Pro Rounded", "Arial Rounded MT Bold", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--deep); }
body {
  min-height: 100dvh;
  margin: 0;
  color: var(--ink);
  overflow-x: hidden;
  background: radial-gradient(circle at 85% 10%, #174f78 0, transparent 36%), linear-gradient(135deg, #2b115b, #171044 54%, #074e68);
}
button { font: inherit; }
button:focus-visible { outline: 4px solid var(--yellow); outline-offset: 3px; }
.hidden { display: none !important; }
.space { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: -1; }
.star-field, .star-field::before, .star-field::after {
  position: absolute; inset: 0; content: "";
  background-image: radial-gradient(circle, rgba(255,255,255,.85) 1.2px, transparent 1.8px);
  background-size: 83px 77px; opacity: .42;
}
.star-field::before { transform: translate(29px, 37px); background-size: 121px 113px; opacity: .65; }
.star-field::after { transform: translate(7px, 15px); background-size: 193px 167px; opacity: .45; }
.planet { position: absolute; border-radius: 50%; filter: blur(.2px); }
.planet-one { width: 28rem; height: 28rem; right: -13rem; top: -13rem; background: radial-gradient(circle at 28% 70%, #31549d, #16235c 67%); opacity: .55; }
.planet-two { width: 14rem; height: 14rem; left: -8rem; bottom: 7%; background: radial-gradient(circle at 70% 30%, #794bc9, #3f236e 70%); opacity: .3; }

.site-header {
  width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: max(16px, env(safe-area-inset-top)) 0 8px;
  min-height: 84px; display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.brand-button { border: 0; color: inherit; background: none; padding: 0; display: flex; align-items: center; gap: 11px; cursor: pointer; text-align: left; }
.brand-button strong, .brand-button small { display: block; letter-spacing: .08em; }
.brand-button strong { font-size: .9rem; }
.brand-button small { color: var(--cyan); font-size: .67rem; margin-top: 3px; }
.brand-rocket { width: 48px; height: 48px; transform: rotate(6deg); }
.rocket-body, .hero-rocket { fill: #fff; }
.rocket-window, .hero-window { fill: var(--cyan); stroke: var(--purple); stroke-width: 3; }
.rocket-fin, .hero-fin { fill: var(--pink); stroke: #fff; stroke-width: 3; stroke-linejoin: round; }
.rocket-flame, .hero-flame { fill: var(--yellow); stroke: #fff; stroke-width: 3; stroke-linejoin: round; }
.header-actions { display: flex; gap: 10px; }
.icon-button, .back-button, .map-stars {
  color: var(--ink); border: 1px solid var(--line); background: rgba(31,17,74,.65); border-radius: 999px; min-height: 46px; padding: 0 17px; cursor: pointer; backdrop-filter: blur(12px);
}
.icon-button:hover, .back-button:hover { background: rgba(92,64,172,.75); transform: translateY(-1px); }

#app { width: min(1180px, calc(100% - 32px)); margin: 0 auto; min-height: calc(100dvh - 150px); }
.screen { display: none; animation: screen-in .35s ease both; }
.screen.active { display: block; }
@keyframes screen-in { from { opacity: 0; transform: translateY(8px); } }
.home-screen { padding: clamp(24px, 5vw, 72px) 0 44px; }
.home-screen.active { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(360px, .95fr); align-items: center; gap: clamp(32px, 7vw, 96px); }
.hero-copy h1 { margin: 7px 0 14px; font-size: clamp(2.7rem, 6vw, 5.6rem); line-height: .93; letter-spacing: -.055em; }
.hero-copy h1 span { color: var(--yellow); }
.eyebrow { margin: 0 0 8px; color: var(--cyan); font-size: .78rem; font-weight: 900; letter-spacing: .16em; }
.hero-subtitle { margin: 0; max-width: 620px; color: var(--muted); font-size: clamp(1.05rem, 2vw, 1.3rem); line-height: 1.55; }
.hero-orbit { width: clamp(140px, 20vw, 210px); margin-bottom: -5px; filter: drop-shadow(0 18px 35px rgba(0,0,0,.3)); }
.hero-orbit svg { width: 100%; display: block; overflow: visible; }
.orbit-line { fill: none; stroke: rgba(120,224,255,.6); stroke-width: 2; stroke-dasharray: 5 8; }
.orbit-star { fill: var(--yellow); }
.motion-on .hero-rocket { animation: hover 2.7s ease-in-out infinite; transform-origin: center; }
@keyframes hover { 50% { transform: translate(-4px, 5px) rotate(-2deg); } }
.launch-panel { display: grid; gap: 14px; }
.launch-card {
  width: 100%; min-height: 92px; border: 1px solid var(--line); border-radius: 24px; padding: 16px 18px; color: var(--ink); background: var(--card); cursor: pointer;
  display: grid; grid-template-columns: 54px 1fr 24px; gap: 13px; align-items: center; text-align: left; box-shadow: 0 15px 40px rgba(7,4,28,.24); transition: transform .18s ease, border-color .18s ease, background .18s ease;
}
.launch-card:hover { transform: translateY(-3px); border-color: rgba(255,255,255,.38); background: rgba(72,47,139,.94); }
.launch-card.primary { background: linear-gradient(135deg, #7c50eb, #346fc8); border-color: rgba(255,255,255,.3); }
.launch-card strong, .launch-card small { display: block; }
.launch-card strong { font-size: 1.12rem; }
.launch-card small { color: #ddd8f3; margin-top: 4px; line-height: 1.3; }
.launch-icon { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 17px; background: rgba(255,255,255,.13); font-size: 1.75rem; }
.launch-arrow { font-size: 2rem; color: var(--yellow); }
.resume-card { border: 0; background: none; color: var(--cyan); text-decoration: underline; min-height: 48px; cursor: pointer; }
.home-progress { grid-column: 1 / -1; margin-top: 22px; display: grid; grid-template-columns: auto minmax(120px, 1fr) auto; align-items: center; gap: 15px; color: var(--muted); }
.home-progress div:first-child { display: flex; align-items: baseline; gap: 7px; }
.home-progress strong { color: var(--yellow); font-size: 1.5rem; }
.home-progress p { margin: 0; font-size: .9rem; }
.progress-track, .round-progress { height: 9px; border-radius: 99px; background: rgba(255,255,255,.12); overflow: hidden; }
.progress-track span, .round-progress span { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--yellow), var(--orange)); transition: width .35s ease; }

.map-screen { padding: 32px 0 64px; }
.screen-title-row { display: grid; grid-template-columns: 110px 1fr 110px; align-items: center; text-align: center; margin-bottom: 28px; }
.screen-title-row h1 { margin: 0; font-size: clamp(2rem, 4vw, 3.5rem); }
.map-stars { display: grid; place-items: center; color: var(--yellow); cursor: default; }
.mission-zones { display: grid; gap: 28px; }
.zone-section { border: 1px solid var(--line); border-radius: 30px; padding: clamp(18px, 3vw, 28px); background: rgba(25,12,63,.64); backdrop-filter: blur(13px); }
.zone-heading { display: flex; justify-content: space-between; gap: 15px; align-items: end; margin-bottom: 18px; }
.zone-heading h2 { margin: 0; font-size: 1.45rem; }
.zone-heading p { margin: 0; color: var(--muted); font-size: .9rem; }
.mission-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.mission-card {
  position: relative; min-height: 170px; padding: 18px; border: 1px solid var(--line); border-radius: 23px; background: linear-gradient(145deg, rgba(93,62,171,.62), rgba(41,28,91,.86)); color: var(--ink); text-align: left; cursor: pointer; overflow: hidden;
}
.mission-card::after { content: ""; position: absolute; width: 110px; height: 110px; right: -44px; bottom: -48px; border-radius: 50%; background: var(--zone-color, #6f4ce7); opacity: .24; }
.mission-card:hover { transform: translateY(-3px); border-color: rgba(255,255,255,.4); }
.mission-number { position: absolute; right: 13px; top: 11px; color: rgba(255,255,255,.42); font-weight: 900; }
.mission-emoji { font-size: 2rem; display: block; margin-bottom: 15px; }
.mission-card strong { display: block; font-size: 1.02rem; line-height: 1.2; padding-right: 20px; }
.mission-card small { display: block; color: var(--muted); margin-top: 7px; line-height: 1.35; }
.card-stars { position: absolute; left: 17px; bottom: 13px; color: rgba(255,255,255,.25); letter-spacing: 2px; z-index: 1; }
.card-stars .earned { color: var(--yellow); }

.game-screen { min-height: calc(100dvh - 150px); padding: 16px 0 45px; }
.game-topbar { display: grid; grid-template-columns: 110px 1fr 72px; align-items: center; text-align: center; }
.game-heading p { margin: 0; color: var(--cyan); font-weight: 900; letter-spacing: .12em; font-size: .72rem; }
.game-heading h1 { margin: 3px 0 0; font-size: clamp(1.35rem, 3vw, 2rem); }
.round-count { justify-self: end; width: 60px; height: 48px; border-radius: 17px; display: flex; align-items: center; justify-content: center; gap: 2px; background: rgba(255,255,255,.1); color: var(--yellow); font-weight: 900; white-space: nowrap; }
.round-progress { margin: 16px auto 22px; width: min(680px, 80%); }
.game-layout { min-height: min(660px, calc(100dvh - 230px)); display: grid; place-items: center; }
.problem-panel { width: min(840px, 100%); border: 1px solid var(--line); border-radius: 34px; padding: clamp(18px, 4vw, 38px); background: rgba(27,15,67,.86); box-shadow: 0 24px 70px rgba(4,2,24,.36); backdrop-filter: blur(18px); }
.prompt-row { display: grid; grid-template-columns: 60px 1fr auto; gap: 14px; align-items: center; }
.prompt-row h2 { margin: 0; text-align: center; font-size: clamp(1.2rem, 3vw, 1.8rem); }
.speaker-button, .hint-button { min-height: 54px; border: 1px solid var(--line); border-radius: 18px; color: var(--ink); background: rgba(255,255,255,.09); cursor: pointer; }
.speaker-button { width: 58px; font-size: 1.5rem; }
.hint-button { padding: 0 16px; }
.speaker-button.playing { background: var(--blue); animation: pulse 1s ease infinite; }
@keyframes pulse { 50% { transform: scale(1.05); } }
.hint-copy { margin: 14px auto 0; max-width: 560px; padding: 11px 15px; border-radius: 14px; color: #17234c; background: #d9f8ff; text-align: center; font-weight: 800; }
.problem-visual { min-height: 225px; display: grid; place-items: center; padding: 24px 0 18px; }
.answer-choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; max-width: 680px; margin: 0 auto; }
.answer-button {
  min-height: 88px; border-radius: 23px; border: 2px solid rgba(255,255,255,.2); color: var(--ink); background: linear-gradient(145deg, #5e3eaa, #34236f); cursor: pointer; font-size: clamp(1.8rem, 5vw, 2.8rem); font-weight: 950; box-shadow: 0 9px 0 rgba(10,5,34,.35); transition: transform .12s ease, background .2s ease;
}
.answer-button:hover { transform: translateY(-2px); }
.answer-button:only-child { grid-column: 1 / -1; width: min(260px, 100%); justify-self: center; }
.answer-button:active { transform: translateY(5px); box-shadow: 0 4px 0 rgba(10,5,34,.35); }
.answer-button.correct { background: linear-gradient(145deg, #2cbf83, #127d65); border-color: #aaffd8; }
.answer-button.wrong { background: linear-gradient(145deg, #d45276, #8d3157); animation: shake .3s ease; }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.feedback { min-height: 34px; margin-top: 16px; text-align: center; font-weight: 900; font-size: 1.12rem; color: var(--yellow); }
.object-cloud { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: clamp(10px, 2vw, 18px); max-width: 560px; }
.math-object { width: clamp(42px, 8vw, 66px); height: clamp(42px, 8vw, 66px); display: grid; place-items: center; border-radius: 20px; background: rgba(64,183,226,.18); font-size: clamp(1.8rem, 5vw, 2.6rem); border: 1px solid rgba(96,220,241,.25); }
.math-object.removed { opacity: .28; filter: grayscale(.8); text-decoration: line-through 5px var(--pink); }
.math-object.counted { outline: 4px solid var(--yellow); transform: scale(.9); }
.giant-number { font-size: clamp(5rem, 18vw, 9rem); color: var(--yellow); font-weight: 950; line-height: 1; text-shadow: 0 8px 0 rgba(0,0,0,.2); }
.sequence { display: flex; gap: clamp(7px, 2vw, 14px); align-items: center; justify-content: center; flex-wrap: wrap; }
.sequence span { min-width: clamp(48px, 10vw, 72px); height: clamp(56px, 11vw, 76px); display: grid; place-items: center; border-radius: 18px; background: rgba(255,255,255,.1); font-size: clamp(1.65rem, 5vw, 2.5rem); font-weight: 900; }
.sequence span.missing { border: 3px dashed var(--yellow); color: var(--yellow); background: rgba(255,212,90,.08); }
.compare-groups { width: 100%; display: grid; grid-template-columns: 1fr auto 1fr; gap: 18px; align-items: center; }
.group-box { min-height: 150px; border-radius: 25px; background: rgba(255,255,255,.08); display: flex; align-content: center; justify-content: center; flex-wrap: wrap; gap: 7px; padding: 17px; }
.group-box .math-object { width: 39px; height: 39px; font-size: 1.55rem; border-radius: 13px; }
.versus { color: var(--cyan); font-weight: 950; }
.ten-frame { display: grid; grid-template-columns: repeat(5, clamp(40px, 8vw, 64px)); grid-template-rows: repeat(2, clamp(40px, 8vw, 64px)); border: 4px solid #ece8ff; border-radius: 13px; overflow: hidden; background: rgba(255,255,255,.06); }
.ten-cell { border: 1px solid rgba(255,255,255,.3); display: grid; place-items: center; }
.ten-dot { width: 72%; height: 72%; border-radius: 50%; background: var(--yellow); box-shadow: inset 0 -5px 0 rgba(191,104,20,.24); }
.operation { display: grid; grid-template-columns: 1fr auto 1fr auto 78px; gap: 15px; align-items: center; width: 100%; }
.operation .object-cloud { gap: 5px; }
.operation .math-object { width: 34px; height: 34px; border-radius: 11px; font-size: 1.35rem; }
.operator { font-size: 2.5rem; font-weight: 950; color: var(--cyan); }
.equation-answer { width: 72px; height: 72px; display: grid; place-items: center; border-radius: 18px; border: 3px dashed var(--yellow); font-size: 2rem; color: var(--yellow); }
.number-bond { position: relative; width: 290px; height: 190px; }
.bond-node { position: absolute; width: 86px; height: 86px; display: grid; place-items: center; border-radius: 50%; background: #4f35a0; border: 3px solid rgba(255,255,255,.7); font-size: 2.2rem; font-weight: 950; z-index: 2; }
.bond-node.top { left: 102px; top: 0; color: var(--yellow); }
.bond-node.left { left: 32px; bottom: 0; }
.bond-node.right { right: 32px; bottom: 0; border-style: dashed; color: var(--yellow); }
.bond-line { position: absolute; width: 4px; height: 100px; top: 64px; left: 143px; background: rgba(255,255,255,.55); transform-origin: top; }
.bond-line.left { transform: rotate(45deg); }
.bond-line.right { transform: rotate(-45deg); }
.hundred-strip { display: grid; grid-template-columns: repeat(5, minmax(46px, 70px)); gap: 8px; }
.hundred-strip span { height: 62px; display: grid; place-items: center; border-radius: 14px; background: rgba(255,255,255,.1); font-size: 1.65rem; font-weight: 900; }
.hundred-strip .missing { border: 3px dashed var(--yellow); color: var(--yellow); }
.shape-showcase { display: flex; gap: 24px; align-items: center; justify-content: center; flex-wrap: wrap; }
.shape-icon { width: 94px; height: 94px; display: inline-block; background: var(--yellow); border: 5px solid rgba(255,255,255,.8); filter: drop-shadow(0 8px 0 rgba(0,0,0,.18)); }
.shape-circle, .shape-sphere { border-radius: 50%; }
.shape-sphere { background: radial-gradient(circle at 30% 25%, #fff, #57d6ec 25%, #2469bf 72%); }
.shape-triangle { width: 0; height: 0; border-left: 52px solid transparent; border-right: 52px solid transparent; border-bottom: 94px solid var(--yellow); background: transparent; border-top: 0; filter: drop-shadow(0 7px 0 rgba(0,0,0,.18)); }
.shape-square { border-radius: 8px; }
.shape-rectangle { width: 130px; height: 78px; border-radius: 8px; }
.shape-hexagon { clip-path: polygon(25% 7%,75% 7%,100% 50%,75% 93%,25% 93%,0 50%); }
.shape-cube { background: linear-gradient(135deg, #85ecff 0 50%, #3185c9 50%); transform: rotate(8deg); }
.shape-cone { clip-path: polygon(50% 0,100% 100%,0 100%); background: linear-gradient(90deg,#ffda5d,#ec7e3f); }
.shape-cylinder { border-radius: 48% / 18%; background: linear-gradient(90deg,#4bb2dc,#9cf1ff,#3382ba); }
.shape-prism { width: 126px; height: 80px; transform: skewY(-8deg); background: linear-gradient(135deg,#ff8fb9 0 50%,#b64d8d 50%); }
.answer-button .shape-icon { width: 54px; height: 54px; border-width: 3px; vertical-align: middle; filter: none; }
.answer-button .shape-triangle { width: 0; height: 0; border-left-width: 29px; border-right-width: 29px; border-bottom-width: 53px; }
.compose-visual { display:flex; align-items:center; gap:4px; }
.compose-visual .shape-icon { width:78px; height:78px; }
.sort-example { display:flex; align-items:center; gap:18px; padding:20px 25px; border:2px dashed rgba(255,255,255,.35); border-radius:24px; }
.sort-token { display:inline-block; width:58px; height:58px; background:var(--token-color); border:4px solid rgba(255,255,255,.82); vertical-align:middle; }
.sort-circle { border-radius:50%; }.sort-square { border-radius:7px; }.sort-triangle { width:0; height:0; border-left:31px solid transparent; border-right:31px solid transparent; border-bottom:58px solid var(--token-color); border-top:0; background:transparent; }
.position-grid { display: grid; grid-template-columns: repeat(3, 90px); grid-template-rows: repeat(3, 76px); place-items: center; }
.position-rocket { grid-area: 2 / 2; font-size: 2.8rem; }
.position-target { border: 0; background: none; font-size: 2.6rem; cursor: pointer; width: 68px; height: 60px; border-radius: 17px; }
.position-target:hover { background: rgba(255,255,255,.1); }
.measure-visual { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: end; }
.measure-object { margin: auto; border-radius: 18px; background: linear-gradient(145deg, var(--yellow), var(--orange)); border: 4px solid rgba(255,255,255,.7); min-width: 50px; min-height: 50px; }
.data-bars { display: flex; align-items: end; justify-content: center; gap: 42px; min-height: 180px; }
.data-column { display: grid; gap: 6px; justify-items: center; }
.data-column span { font-size: 1.9rem; }
.data-column b { margin-top: 6px; color: var(--cyan); font-size: 1.4rem; }
.balance { position: relative; width: min(430px, 100%); height: 180px; }
.balance-stand { position: absolute; width: 12px; height: 95px; left: calc(50% - 6px); bottom: 12px; border-radius: 8px; background: #d9f8ff; }
.balance-stand::after { content: ""; position: absolute; width: 90px; height: 12px; left: -39px; bottom: -2px; border-radius: 99px; background: #d9f8ff; }
.balance-beam { position: absolute; width: 82%; height: 10px; left: 9%; top: 55px; border-radius: 99px; background: var(--yellow); transform: rotate(var(--tilt)); transform-origin: center; }
.balance-pan { position: absolute; top: 45px; width: 90px; height: 70px; display: grid; place-items: center; border-bottom: 6px solid #d9f8ff; border-radius: 0 0 50% 50%; font-size: 2.5rem; }
.balance-pan.left { left: 2%; }.balance-pan.right { right: 2%; }

.site-footer { width: min(1180px, calc(100% - 32px)); min-height: 58px; margin: 0 auto; padding: 10px 0 max(12px, env(safe-area-inset-bottom)); display: flex; justify-content: space-between; gap: 20px; align-items: center; color: rgba(255,255,255,.58); font-size: .78rem; }
.site-footer button { border: 0; background: none; color: var(--cyan); cursor: pointer; text-decoration: underline; }
.modal-layer { position: fixed; inset: 0; z-index: 20; padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom)); display: grid; place-items: center; background: rgba(5,2,20,.78); backdrop-filter: blur(10px); overflow-y: auto; }
.modal-card { position: relative; width: min(620px, 100%); max-height: calc(100dvh - 32px); overflow-y: auto; border: 1px solid rgba(255,255,255,.24); border-radius: 30px; background: #21104f; box-shadow: 0 30px 100px rgba(0,0,0,.55); padding: clamp(23px, 5vw, 42px); text-align: center; }
.modal-card h2 { margin: 5px 0 10px; font-size: clamp(2rem, 5vw, 3rem); }
.modal-card p { color: var(--muted); line-height: 1.55; }
.modal-close { position: absolute; right: 14px; top: 12px; width: 46px; height: 46px; border: 0; border-radius: 50%; color: var(--ink); background: rgba(255,255,255,.1); font-size: 1.7rem; cursor: pointer; z-index: 2; }
.modal-icon { font-size: 3rem; }
.stage-options { display: grid; gap: 11px; margin-top: 23px; }
.stage-options button { display: grid; grid-template-columns: 46px 1fr 30px; grid-template-rows: auto auto; gap: 1px 12px; align-items: center; text-align: left; min-height: 78px; padding: 12px 15px; color: var(--ink); background: rgba(255,255,255,.08); border: 1px solid var(--line); border-radius: 19px; cursor: pointer; }
.stage-options button:hover { background: rgba(111,76,231,.36); }
.stage-options button > span { grid-row: 1 / 3; width: 42px; height: 42px; display: grid; place-items: center; background: var(--violet); border-radius: 14px; font-weight: 900; }
.stage-options button strong { font-size: 1.08rem; }
.stage-options button small { color: var(--muted); }
.stage-options button b { grid-area: 1 / 3 / 3; color: var(--yellow); font-size: 1.5rem; text-align: center; }
.tutorial-animation { position: relative; width: 100%; height: 180px; overflow: hidden; border: 0; border-radius: 24px; margin-bottom: 23px; color: var(--ink); background: radial-gradient(circle at 50% 120%, #377ec1 0 38%, transparent 39%), linear-gradient(#281562,#112e69); cursor: pointer; }
.tutorial-planet { position: absolute; width: 190px; height: 75px; left: calc(50% - 95px); bottom: -34px; border-radius: 50%; background: #55c7da; }
.tutorial-ship { position: absolute; left: 45%; top: 62px; font-size: 3.2rem; transform: rotate(-35deg); animation: tutorial-fly 3.2s ease-in-out infinite; }
@keyframes tutorial-fly { 50% { transform: translate(55px,-30px) rotate(-25deg); } }
.tutorial-star { position: absolute; color: var(--yellow); animation: twinkle 1.5s ease-in-out infinite alternate; }
.tutorial-star.s1 { left: 18%; top: 31px; }.tutorial-star.s2 { right: 18%; top: 42px; animation-delay: .5s; }.tutorial-star.s3 { right: 36%; top: 20px; animation-delay: .9s; }
.tutorial-play-badge { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); z-index: 3; padding: 8px 13px; border-radius: 999px; background: rgba(20,10,55,.82); font-size: .78rem; font-weight: 900; white-space: nowrap; }
@keyframes twinkle { to { transform: scale(1.5); opacity: .55; } }
.tutorial-actions, .complete-actions { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin-top: 25px; }
.pill { min-height: 52px; border-radius: 999px; padding: 0 23px; border: 1px solid var(--line); color: var(--ink); font-weight: 900; cursor: pointer; }
.pill.primary { background: linear-gradient(135deg, var(--violet), #2c8dca); }
.pill.secondary { background: rgba(255,255,255,.09); }
.privacy-card { text-align: left; }
.privacy-card h2, .privacy-card .eyebrow { text-align: center; }
.privacy-card .pill { display: block; margin: 25px auto 0; }
.privacy-shield { width: 70px; height: 70px; margin: 0 auto 15px; display: grid; place-items: center; border-radius: 22px 22px 32px 32px; background: linear-gradient(145deg, #6de3a7, #23959d); color: #15344b; font-size: 2rem; font-weight: 950; }
.grownup-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 22px 0; }
.grownup-summary div { padding: 14px 8px; border-radius: 17px; background: rgba(255,255,255,.08); }
.grownup-summary strong, .grownup-summary span { display: block; }
.grownup-summary strong { color: var(--yellow); font-size: 1.6rem; }
.grownup-summary span { color: var(--muted); font-size: .75rem; margin-top: 3px; }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; text-align: left; padding: 16px 0; border-top: 1px solid var(--line); }
.setting-row strong, .setting-row small { display: block; }.setting-row small { color: var(--muted); margin-top: 3px; }
.toggle { position: relative; flex: 0 0 58px; height: 34px; border: 0; border-radius: 99px; background: #6a6185; cursor: pointer; }
.toggle span { position: absolute; width: 26px; height: 26px; left: 4px; top: 4px; border-radius: 50%; background: white; transition: transform .2s ease; }
.toggle[aria-checked="true"] { background: #2cbf83; }.toggle[aria-checked="true"] span { transform: translateX(24px); }
.grownup-actions { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-top: 18px; }
.text-danger { border: 0; background: none; color: #ff9dbd; text-decoration: underline; cursor: pointer; }
.completion-burst { width: 110px; height: 110px; margin: 0 auto 18px; display: grid; place-items: center; border-radius: 50%; background: linear-gradient(145deg, var(--yellow), var(--orange)); color: white; font-size: 4rem; box-shadow: 0 0 0 13px rgba(255,212,90,.12), 0 0 0 26px rgba(255,212,90,.06); }
.earned-stars { color: var(--yellow); font-size: 2.8rem; letter-spacing: 8px; }

@media (max-width: 850px) {
  .home-screen.active { grid-template-columns: 1fr; padding-top: 16px; gap: 28px; }
  .hero-copy { text-align: center; }.hero-orbit { margin: 0 auto -5px; }.hero-subtitle { margin-inline: auto; }
  .home-progress { grid-template-columns: auto 1fr; }.home-progress p { grid-column: 1 / -1; text-align: center; }
  .mission-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (max-width: 560px) {
  .site-header { width: calc(100% - 22px); min-height: 70px; }
  .brand-rocket { width: 40px; height: 40px; }.brand-button strong { font-size: .72rem; }.brand-button small { font-size: .55rem; }
  .icon-button { width: 46px; padding: 0; display: grid; place-items: center; }.icon-button span { display: none; }
  #app { width: calc(100% - 22px); min-height: calc(100dvh - 130px); }
  .home-screen { padding-top: 6px; }.hero-orbit { width: 112px; }.hero-copy h1 { font-size: clamp(2.35rem, 13vw, 3.8rem); }
  .launch-card { min-height: 82px; padding: 12px; grid-template-columns: 46px 1fr 18px; border-radius: 20px; }.launch-icon { width: 44px; height: 44px; border-radius: 14px; font-size: 1.4rem; }.launch-card strong { font-size: 1rem; }.launch-card small { font-size: .77rem; }
  .screen-title-row { grid-template-columns: 76px 1fr 62px; }.screen-title-row .back-button { padding: 0 10px; }.map-stars { padding: 0 10px; }
  .mission-grid { grid-template-columns: 1fr 1fr; gap: 10px; }.mission-card { min-height: 155px; padding: 14px; }.mission-card small { font-size: .76rem; }.mission-emoji { margin-bottom: 10px; }
  .game-topbar { grid-template-columns: 74px 1fr 52px; }.game-topbar .back-button { padding: 0 9px; }.round-count { width: 50px; }
  .game-heading h1 { font-size: 1.05rem; }.game-heading p { font-size: .58rem; }
  .round-progress { margin: 12px auto 14px; }
  .game-layout { min-height: calc(100dvh - 195px); align-items: center; }
  .problem-panel { border-radius: 25px; padding: 14px 12px 18px; }
  .prompt-row { grid-template-columns: 50px 1fr 50px; gap: 7px; }.speaker-button { width: 48px; min-height: 48px; }.hint-button { width: 48px; min-height: 48px; padding: 0; font-size: 0; }.hint-button::before { content: "💡"; font-size: 1.25rem; }
  .prompt-row h2 { font-size: 1.08rem; }.problem-visual { min-height: 190px; padding: 18px 0 12px; }
  .answer-choices { gap: 9px; }.answer-button { min-height: 74px; border-radius: 18px; }
  .compare-groups { gap: 8px; }.group-box { min-height: 125px; padding: 9px; gap: 4px; }.group-box .math-object { width: 31px; height: 31px; font-size: 1.2rem; }
  .operation { grid-template-columns: 1fr auto 1fr; gap: 7px; }.operation .equals, .operation .equation-answer { display: none; }.operation .math-object { width: 30px; height: 30px; font-size: 1.12rem; }
  .position-grid { grid-template-columns: repeat(3, 76px); grid-template-rows: repeat(3, 66px); }
  .site-footer { width: calc(100% - 22px); flex-direction: column; justify-content: center; gap: 2px; text-align: center; }
  .grownup-actions { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
