:root {
  color-scheme: dark;
  font-family: Inter, "Noto Sans JP", "Hiragino Kaku Gothic ProN", Meiryo, system-ui, sans-serif;
  background: #15142f;
  color: #faf6ff;
  --ink: #171532;
  --muted: #cdcae8;
  --border: #514b77;
  --yellow: #ffdf7e;
  --mint: #97e8cc;
  --panel: #252141;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  min-height: 100svh;
  margin: 0;
  background:
    radial-gradient(circle, #b5a9fd55 1px, transparent 1.5px) 22px 45px / 113px 101px,
    radial-gradient(circle, #a497ef65 1px, transparent 1.5px) 55px 22px / 159px 163px,
    radial-gradient(ellipse at 85% 0%, #302661 0%, transparent 55%), #15142f;
}
button, input { font: inherit; }
button { cursor: pointer; touch-action: manipulation; }
button:disabled { cursor: default; }
button:focus-visible, input:focus-visible, a:focus-visible { outline: 3px solid #a8edfa; outline-offset: 4px; }
main:focus { outline: none; }
h1, h2, p { margin: 0; }
.skip { position: absolute; left: 16px; top: -100px; background: var(--yellow); color: var(--ink); padding: 12px; z-index: 2; }
.skip:focus { top: 12px; }
.shell { width: min(1056px, calc(100% - 56px)); margin: 0 auto; }
.topbar { min-height: 84px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand, .pill {
  border: 1px solid transparent;
  color: inherit;
  font-weight: 850;
  background: none;
  min-height: 44px;
}
.brand { display: flex; align-items: center; gap: 9px; padding: 0; font-size: clamp(1rem, 3.1vw, 1.25rem); white-space: nowrap; }
.brand span { display: grid; place-items: center; width: 39px; height: 39px; font-size: 25px; border-radius: 13px; background: var(--yellow); color: #351d5b; }
.top-actions { display: flex; gap: 8px; align-items: center; }
.pill { border-color: #544b78; background: #242042; border-radius: 30px; padding: 5px 13px; font-size: .85rem; white-space: nowrap; }
.pill:hover, .secondary:hover { background: #403960; }
.stars { min-width: 67px; color: var(--yellow); }
.stars span { margin-right: 2px; font-size: 1.15rem; }
.sound { color: var(--muted); }
.pilot { color: var(--muted); }
.primary, .secondary {
  border-radius: 13px;
  min-height: 48px;
  padding: 10px 16px;
  font-weight: 850;
  line-height: 1.35;
}
.primary {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 13px;
  text-decoration: none;
  color: #272044;
  background: var(--yellow);
  border: 1px solid #ffe69d;
  box-shadow: 0 4px #a57943;
}
.primary span { font-size: 1.28em; line-height: 1; }
.primary:hover { background: #ffeb9e; }
.primary:active { transform: translateY(3px); box-shadow: 0 1px #a57943; }
.secondary { color: #f5f1ff; border: 1px solid #5e557d; background: #2c254b; box-shadow: none; }
.secondary[aria-pressed="true"] { background: #aea0f3; color: #241842; border-color: #beafff; }

.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: 352px;
  overflow: hidden;
  padding: clamp(23px, 5vw, 53px);
  border: 1px solid #7461ad;
  border-radius: 30px;
  background: radial-gradient(ellipse at 73% 70%, #775ac2 0%, transparent 52%), linear-gradient(115deg, #2e2357 25%, #3d327d 90%);
}
.hero-copy { z-index: 1; }
.hero h1 {
  font-size: clamp(1.9rem, 5.4vw, 3.65rem);
  line-height: 1.18;
  font-weight: 950;
  letter-spacing: -.06em;
}
.hero h1 span { color: #ffe590; }
.hero-copy > p:not(.greeting) { margin: 15px 0 22px; color: #eee7ff; font-weight: 650; line-height: 1.55; }
.greeting { margin-bottom: 7px; color: var(--mint); font-weight: 850; overflow-wrap: anywhere; }
.scene { position: absolute; pointer-events: none; width: 445px; height: 320px; right: 1%; top: 50%; transform: translateY(-49%); }
.planet {
  position: absolute;
  width: 50%;
  aspect-ratio: 1;
  background: radial-gradient(circle at 29% 23%, #d9b2ff, #ac83ef 52%, #7656be 90%);
  top: 20%;
  left: 22%;
  border-radius: 50%;
  box-shadow: inset -18px -16px #57379633, 0 0 45px #b095fc55;
}
.planet i { position: absolute; display: block; background: #7254b145; border-top: 3px solid #53348930; border-radius: 50%; }
.planet i:nth-child(1) { top: 32%; left: 17%; width: 19%; height: 13%; transform: rotate(-25deg); }
.planet i:nth-child(2) { top: 65%; left: 46%; width: 21%; height: 10%; transform: rotate(-20deg); }
.planet i:nth-child(3) { top: 23%; left: 58%; width: 12%; height: 9%; }
.planet-emblem {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: clamp(3rem, 7vw, 4.4rem);
  filter: drop-shadow(0 6px 14px #1d103c66);
}
.orbit { position: absolute; left: 1%; top: 42%; width: 93%; height: 30%; border: 1px solid #d4b7ff8c; border-radius: 50%; transform: rotate(-25deg); }
.rocket {
  position: absolute;
  top: 10%;
  right: 19%;
  width: 19%;
  height: 45%;
  transform: rotate(42deg);
  filter: drop-shadow(7px 10px 0 #44277e55);
}
.rocket i { position: absolute; display: block; }
.fuselage {
  inset: 0 19% 23%;
  border-radius: 65% 65% 35% 35% / 54% 54% 24% 24%;
  background: linear-gradient(110deg, #fff7e4 46%, #e4ccfa 47% 84%, #d5b6ef 85%);
  overflow: hidden;
}
.fuselage::before { content: ""; position: absolute; inset: 0 0 73%; border-radius: 0 0 45% 45%; background: #fc8da9; }
.window { top: 33%; left: 35%; width: 31%; aspect-ratio: 1; border-radius: 50%; border: 4px solid #5b4799; background: #a5ecec; box-shadow: inset 3px 3px #e2fff5aa; }
.wing { width: 30%; height: 42%; top: 42%; background: #fb87a6; }
.wing.left { left: 2%; border-radius: 90% 0 40% 0; transform: skewY(-20deg); }
.wing.right { right: 2%; border-radius: 0 90% 0 40%; transform: skewY(20deg); background: #da6d99; }
.flame { width: 34%; height: 31%; top: 73%; left: 33%; background: linear-gradient(#fff8ae, #ff9e86); border-radius: 43% 43% 61% 61% / 31% 31% 83% 83%; }
.spark { position: absolute; color: #ffe69b; font-size: 2rem; }
.spark-one { left: 12%; top: 11%; }
.spark-two { right: 6%; bottom: 24%; color: #e9d2ff; }
.spark-three { right: 12%; top: 5%; font-size: 1.32rem; }
.spark-four { right: 43%; bottom: 3%; color: #e5d2ff; }
.spark-five { left: 7%; bottom: 17%; font-size: 1.2rem; color: #f7caff; }

.scene .gear-ufo,
.scene .gear-sat {
  position: absolute;
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease, transform .25s ease;
}
.scene .gear-ufo svg,
.scene .gear-sat svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.scene .gear-ufo {
  top: 7%;
  right: 43%;
  width: 52px;
  height: 46px;
  transform: scale(.7);
  filter: drop-shadow(0 0 14px #78ffd8cc);
}
.scene .gear-sat {
  right: 7%;
  top: 42%;
  width: 56px;
  height: 44px;
  transform: scale(.7);
  filter: drop-shadow(0 0 14px #ffe07add);
}
.rocket .flame { z-index: 1; }
.rocket .wing { z-index: 2; }
.rocket .fuselage { z-index: 3; }
.rocket .window { z-index: 4; }
.hero .rocket {
  top: 9%;
  right: 18%;
  width: 21%;
  height: 47%;
  filter: drop-shadow(5px 9px 10px #2b145788);
}
.rocket-svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.scene.eq-5 .spark { color: #fff6b0; text-shadow: 0 0 12px #ffe485cc; transform: scale(1.2); }
.scene.eq-6 .gear-ufo { opacity: 1; visibility: visible; transform: scale(1); }
.scene.eq-8 .gear-sat { opacity: 1; visibility: visible; transform: scale(1); }
.scene.eq-8 .orbit { border: 2px solid #ffe47add; box-shadow: 0 0 18px #ffd15477, inset 0 0 12px #ffd15433; }
.scene.eq-9 .rocket { filter: drop-shadow(5px 9px 10px #2b145788) drop-shadow(0 0 22px #ffd85ccc); }
@media (prefers-reduced-motion: no-preference) {
  .rocket-flame { transform-box: fill-box; transform-origin: center top; animation: turbo-flame .42s ease-in-out infinite alternate; }
  .rocket-radar { transform-box: fill-box; transform-origin: left bottom; animation: radar-pulse 1.8s ease-in-out infinite; }
  .rocket-shield { transform-box: fill-box; transform-origin: center; animation: shield-pulse 2.8s ease-in-out infinite; }
  .rocket-dust { transform-box: fill-box; transform-origin: center; animation: dust-twinkle 2s ease-in-out infinite alternate; }
  .scene.eq-6 .gear-ufo { animation: ufo-hover 3.6s ease-in-out infinite; }
  .scene.eq-8 .gear-sat { animation: sat-drift 4.2s ease-in-out infinite; }
  @keyframes turbo-flame { from { transform: scaleY(.91); } to { transform: scaleY(1.12); } }
  @keyframes radar-pulse { 50% { opacity: .68; transform: scale(1.07); } }
  @keyframes shield-pulse { 50% { opacity: .78; transform: scale(1.03); } }
  @keyframes ufo-hover { 50% { transform: translate(8px, -10px) rotate(-6deg); } }
  @keyframes dust-twinkle { from { opacity: .74; } to { opacity: 1; } }
  @keyframes sat-drift { 50% { transform: translate(-8px, -9px) rotate(8deg); } }
}

.mission { margin-top: 32px; }
.section-heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 14px; }
.section-heading h2 { font-size: clamp(1.2rem, 3.5vw, 1.6rem); }
.table-link { font-size: .88rem; }
.planet-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.stage {
  --planet: #b9e7cb;
  display: flex;
  align-items: center;
  gap: clamp(8px, 2vw, 15px);
  min-height: 92px;
  text-align: left;
  padding: 11px clamp(9px, 2vw, 17px);
  border: 1px solid #544a79;
  border-radius: 18px;
  color: inherit;
  background: #24203e;
}
.stage:hover { border-color: var(--planet); background: #332a54; }
.mint { --planet: #b9e7cb; }
.lilac { --planet: #ceb9ff; } .peach { --planet: #ffc3a9; } .blue { --planet: #a7d7fe; }
.gold { --planet: #ffe087; } .pink { --planet: #ffb9df; } .teal { --planet: #a1eadb; }
.violet { --planet: #b9b5ff; } .lime { --planet: #dce7a6; }
.stage-planet { flex: 0 0 auto; display: grid; place-items: center; width: 49px; height: 49px; border-radius: 50%; color: #231944; background: var(--planet); box-shadow: inset -6px -5px #31235424; font-size: 1.42rem; font-weight: 950; }
.stage-text { display: grid; gap: 3px; }
.stage-text b { font-size: clamp(.93rem, 2.2vw, 1.12rem); white-space: nowrap; }
.stage-text small { color: var(--muted); font-weight: 700; white-space: nowrap; }
.review { display: flex; align-items: center; width: 100%; gap: 10px; margin-top: 14px; min-height: 52px; text-align: left; background: #352850; color: #ffecf6; border: 1px solid #8c5b99; border-radius: 15px; padding: 12px 16px; font-weight: 850; }
.review span { color: #ffc4e7; font-size: 1.25rem; }
.review b { margin-left: auto; }
.footer-home { color: #bdb4dc; border: 0; background: none; text-decoration: underline; min-height: 44px; }

.game-navigation { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 14px; }
.mode-label { padding: 7px 13px; background: #3b2d69; border-radius: 35px; color: #e4d6ff; font-weight: 850; }
.question-card, .study-card, .result-card, .gate-card { padding: clamp(18px, 4.2vw, 36px); border-radius: 24px; border: 1px solid var(--border); background: var(--panel); }
.question-progress { display: flex; gap: 14px; align-items: center; color: #e6ddff; font-weight: 800; }
progress { appearance: none; height: 11px; border: 0; border-radius: 12px; overflow: hidden; flex: 1; min-width: 0; background: #484063; }
progress::-webkit-progress-bar { background: #484063; }
progress::-webkit-progress-value { background: var(--mint); border-radius: 12px; }
progress::-moz-progress-bar { background: var(--mint); border-radius: 12px; }
.question-card h1 { text-align: center; font-size: clamp(2.6rem, 11vw, 6rem); margin: 18px 0 23px; line-height: 1.1; white-space: nowrap; }
.question-card h1 span { color: #ccc0f4; }
.question-card h1 b { color: var(--yellow); }
.answers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.answer { min-height: clamp(65px, 11vw, 94px); border-radius: 17px; border: 1px solid #7565a5; background: #3a2b66; color: #fff; box-shadow: 0 4px #1d1936; font-size: clamp(1.65rem, 5vw, 2.7rem); font-weight: 950; }
.answer:not(:disabled):hover { background: #52407f; border-color: #c9b7ff; }
.answer:disabled { color: #e6def9; }
.answer.right { background: #9de9c9; color: #173f32; border-color: #d3ffeb; }
.answer.wrong { background: #643858; color: #ffe4f0; border-color: #c07a9f; }
.question-footer { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 21px; }
.hint-button:disabled { opacity: .55; }
.feedback { flex: 1; min-width: 80px; font-weight: 850; color: #ffe0ef; }
.feedback.success { color: var(--mint); }
.feedback small { color: #e2d9f3; display: block; font-weight: 680; }
.next { margin-left: auto; }
.hint { margin-top: 16px; padding: 13px; border-radius: 14px; background: #191832; }
.hint p { color: #dfd8fa; font-weight: 700; }
.dot-grid { display: grid; gap: 5px; margin-top: 10px; }
.dot-grid div { display: flex; gap: 6px; }
.dot-grid i { width: 12px; height: 12px; border-radius: 50%; background: var(--mint); }

.study-card h1, .result-card h1, .gate-card h1 { font-size: clamp(1.55rem, 4.7vw, 2.35rem); line-height: 1.2; }
.study-card p { color: var(--muted); }
.study-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 19px; }
.table-tabs { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 5px; }
.table-tabs .secondary { min-height: 45px; padding: 4px 0; }
.study-modes, .study-settings, .ranges, .playback { display: flex; gap: 7px; flex-wrap: wrap; align-items: center; }
.study-modes { margin: 17px 0 12px; }
.study-modes button { flex: 1; }
.study-settings { justify-content: space-between; gap: 9px; }
.ranges .secondary, .playback .secondary { min-height: 45px; padding: 7px 12px; font-size: .89rem; }
.playback .play-button { background: #2b5c59; color: #e0fff4; border-color: #70cbb1; }
.study-message { margin: 12px 0; font-weight: 720; font-size: .91rem; min-height: 1.45em; }
.fact-grid { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; margin: 0; padding: 0; }
.fact-button { position: relative; display: grid; align-content: center; gap: 4px; width: 100%; min-height: 79px; padding: 9px 10px; border-radius: 13px; background: #342951; color: #f4ecff; border: 1px solid #645686; text-align: left; }
.fact-button:hover { background: #433567; }
.fact-button span { font-size: clamp(1rem, 2.6vw, 1.5rem); font-weight: 720; }
.fact-button b { color: var(--yellow); }
.fact-button small { color: #e3d8ff; line-height: 1.38; font-size: clamp(.69rem, 2vw, .9rem); }
.fact-button i { position: absolute; top: 6px; right: 8px; font-style: normal; color: var(--mint); }
.speaking .fact-button { background: #2b5156; border-color: #8aebcd; }
.profile form, .gate-card form { display: grid; gap: 10px; }
.profile form { max-width: 380px; margin-top: 18px; }
.profile label, .gate-card label { font-weight: 840; color: #e8ddfa; font-size: .9rem; }
.profile input, .gate-card input { color: #fff; background: #16152f; border: 1px solid #766797; border-radius: 13px; min-height: 54px; padding: 8px 15px; }
.result-card { text-align: center; }
.result-icon { color: var(--yellow); font-size: clamp(3.7rem, 15vw, 6.5rem); line-height: 1.1; text-shadow: 0 0 30px #ffd16155; margin-bottom: 10px; }
.result-card p { margin-top: 12px; }
.result-card .result-stars { font-size: 1.7rem; font-weight: 950; color: var(--yellow); }
.result-actions { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: 20px; }
.result-main-btn { width: min(100%, 340px); min-height: 54px; font-size: 1.06rem; }
.result-sub-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.result-sub-actions .secondary { min-height: 42px; padding: 7px 13px; font-size: .88rem; }

.gate { width: min(420px, calc(100% - 32px)); margin: 0 auto; padding: 14px 0 27px; }
.gate-art { height: 228px; position: relative; overflow: hidden; }
.gate-art .scene { left: 50%; right: auto; transform: translate(-50%, -51%) scale(.72); }
.gate-card { position: relative; box-shadow: 0 18px 50px #120e2c88; }
.gate-card p { color: #e3d8f4; margin-top: 10px; line-height: 1.5; }
.gate-card form { margin-top: 19px; }
.gate-card input { width: 100%; font-size: 1.3rem; letter-spacing: .36em; }
.gate-card .pin-error { margin: 0; color: #ffb7ce; font-weight: 760; }
.gate-card .primary { margin-top: 3px; }
.gate-card a.primary { margin-top: 18px; width: 100%; }
.unavailable { width: min(420px, 90%); margin: 50px auto; text-align: center; }

@media (max-width: 800px) {
  .hero .scene { right: -4%; transform: translateY(-49%) scale(.8); transform-origin: right center; }
}
@media (max-width: 600px) {
  .shell { width: calc(100% - 28px); }
  .topbar { min-height: 65px; }
  .top-actions { gap: 4px; }
  .brand { gap: 5px; }
  .brand span { width: 30px; height: 30px; font-size: 20px; }
  .pill { padding: 4px 8px; }
  .stars { min-width: 45px; }
  .hero { min-height: 290px; border-radius: 21px; align-items: flex-end; }
  .hero .scene { top: 45%; right: -25px; transform: translateY(-52%) scale(.52); }
  .hero-copy { position: relative; }
  .hero h1, .hero-copy > p { text-shadow: 0 2px 7px #251c47; }
  .hero-copy > p:not(.greeting) { font-size: .9rem; margin: 9px 0 14px; }
  .planet-grid { gap: 7px; }
  .stage { min-height: 75px; gap: 5px; padding: 6px; border-radius: 13px; }
  .stage-planet { width: 29px; height: 29px; font-size: .95rem; }
  .stage-text small { font-size: .69rem; }
  .stage-text b { font-size: .83rem; }
  .fact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .study-settings { align-items: flex-start; }
  .greeting { font-size: .89rem; }
}
@media (max-width: 365px) {
  .sound span { display: none; }
  .hero .scene { right: -47px; }
  .stage-planet { width: 23px; height: 23px; }
  .stage-text b { font-size: .77rem; }
  .study-modes button, .study-heading button { font-size: .79rem; padding: 6px; }
}
@media (prefers-reduced-motion: no-preference) {
  .hero .rocket, .gate-art .rocket { animation: float 5s ease-in-out infinite; }
  @keyframes float {
    50% { transform: translateY(-9px) rotate(42deg); }
  }
}
footer { display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; margin: 24px 0 20px; }
.footer-home { flex-shrink: 0; }
.credit { color: #bdb4dc; font-size: .83rem; }
.credit summary { cursor: pointer; min-height: 44px; align-content: center; }
.credit a { color: #e0d5ff; }

.home-tracker { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.tracker {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  min-height: 70px;
  padding: 10px 13px;
  color: inherit;
  text-align: left;
  border: 1px solid var(--border);
  background: #262141;
  border-radius: 15px;
}
.tracker:hover { background: #393058; border-color: #9785c2; }
.tracker b, .tracker small { display: block; }
.tracker b { font-weight: 900; }
.tracker small { margin-top: 3px; color: var(--muted); }
.tracker-icon { flex: 0 0 auto; display: grid; place-items: center; width: 37px; height: 37px; border-radius: 12px; background: #23484d; color: var(--mint); font-size: 1.28rem; font-weight: 950; }
.tracker:last-child .tracker-icon { background: #533948; color: var(--yellow); }
.tracker-arrow { margin-left: auto; color: #d1c0ff; font-size: 1.2rem; }

.answer, .result-icon { position: relative; }
.answer.right { z-index: 1; }
.answer.right.fast { box-shadow: 0 0 24px #ffd85caa, 0 4px #1d1936; border-color: #ffe88e; }
.number-display.right.fast input { box-shadow: 0 0 24px #ffd85caa; border-color: #ffe88e; }
.earned-star { position: absolute; top: 7px; right: 9px; color: #254531; font-size: clamp(.72rem, 2.4vw, 1rem); }
.earned-star.is-double {
  top: -12px;
  right: 8px;
  padding: 2px 9px;
  border-radius: 999px;
  border: 1.5px solid #ffd85c;
  background: #2b1e48;
  color: var(--yellow);
  font-size: clamp(.75rem, 2.4vw, .92rem);
  font-weight: 950;
  box-shadow: 0 3px 10px #150e2b77;
}
.speed-tag {
  position: absolute;
  top: -12px;
  left: 8px;
  padding: 2px 9px;
  border-radius: 999px;
  background: linear-gradient(90deg, #ffe77a, #8ff7ff);
  color: #24163e;
  font-size: clamp(.72rem, 2.3vw, .86rem);
  font-weight: 950;
  box-shadow: 0 3px 10px #150e2b77;
  white-space: nowrap;
}
.speed-pill {
  display: inline-block;
  margin-right: 4px;
  padding: 1px 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, #ffe77a, #8ff7ff);
  color: #24163e;
  font-size: .85em;
  font-weight: 950;
}
.feedback.success b { color: var(--yellow); }
.speed-meter {
  width: min(100%, 345px);
  margin: 7px auto 0;
  display: grid;
  gap: 4px;
}
.speed-meter-label { color: #ffe799; font-size: .78rem; font-weight: 850; text-align: center; }
.speed-meter-track { height: 6px; border-radius: 999px; background: #382f5c; overflow: hidden; }
.speed-meter-fill {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #74f7d8, #ffd85c);
  transform-origin: left center;
}
.speed-meter.turbo .speed-meter-label { color: #ffd09a; }
.speed-meter.turbo .speed-meter-fill { background: linear-gradient(90deg, #ffdf73, #ff8ba7); }
.speed-meter.hit .speed-meter-label { color: #8ff7ff; }
.speed-meter.hit .speed-meter-fill { background: linear-gradient(90deg, #8ff7ff, #ffe878); box-shadow: 0 0 10px #8ff7ff; }
.speed-meter.missed { opacity: .62; }
.speed-meter.missed .speed-meter-label { color: var(--muted); }
.speed-meter.missed .speed-meter-fill { background: #6f6692; }
.celebration { position: absolute; inset: 0; pointer-events: none; }
.celebration i { display: none; position: absolute; top: 48%; left: 48%; opacity: 0; color: var(--yellow); font: 900 1.24rem/1 system-ui; text-shadow: 0 0 9px #ffd782b0; }
.celebration i:nth-child(1) { --x: -67px; --y: -45px; --spin: -28deg; }
.celebration i:nth-child(2) { --x: -22px; --y: -64px; --spin: -18deg; color: #f2b5ff; }
.celebration i:nth-child(3) { --x: 30px; --y: -60px; --spin: 46deg; }
.celebration i:nth-child(4) { --x: 66px; --y: -36px; --spin: 27deg; color: #ffb7d3; }
.celebration i:nth-child(5) { --x: 67px; --y: 23px; --spin: 18deg; }
.celebration i:nth-child(6) { --x: 24px; --y: 51px; --spin: -32deg; color: #d9c5ff; }
.celebration i:nth-child(7) { --x: -28px; --y: 47px; --spin: -22deg; }
.celebration i:nth-child(8) { --x: -74px; --y: 19px; --spin: 24deg; color: #ffeab0; }
.result-icon .celebration { width: 88px; margin: 0 auto; }
.discovery-note { display: block; color: var(--yellow); font-size: .9rem; }
.clear-banner { display: block; width: fit-content; max-width: 100%; margin-inline: auto; padding: 7px 14px; border: 1px solid #a8e4ca; border-radius: 999px; color: var(--mint); background: #244e50; font-weight: 850; }
.bonus-banner { display: block; width: fit-content; max-width: 100%; margin-inline: auto; padding: 8px 16px; border: 1px solid #ffd57e; border-radius: 999px; color: #fff4cc; background: linear-gradient(105deg, #593b52, #463268); font-weight: 850; box-shadow: 0 0 18px #ffcf5633; }
.bonus-banner b { color: var(--yellow); font-size: 1.1em; }
.speed-banner { display: block; width: fit-content; max-width: 100%; margin-inline: auto; padding: 6px 14px; border: 1px solid #8ff7ff; border-radius: 999px; color: #dffcff; background: linear-gradient(105deg, #25486b, #36306e); font-size: .9rem; font-weight: 850; box-shadow: 0 0 16px #7cf6ff33; }
.result-next { color: var(--muted); font-size: .95rem; }
.result-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  width: min(100%, 420px);
  margin: 16px auto 0;
}
.result-metric {
  display: grid;
  gap: 3px;
  padding: 11px 12px;
  border: 1px solid #65568a;
  border-radius: 15px;
  background: #2f254f;
}
.result-metric b { color: var(--mint); font-size: clamp(1.35rem, 4.5vw, 1.8rem); line-height: 1.1; }
.result-metric b small { color: var(--muted); font-size: .78rem; font-weight: 750; }
.result-metric.is-stars { border-color: #8c754d; background: #35294b; }
.result-metric.is-stars b { color: var(--yellow); }
.result-metric span { color: var(--muted); font-size: .8rem; font-weight: 750; }
.result-highlights { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 14px; }
.highlight-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 13px;
  border-radius: 999px;
  font-size: .88rem;
  font-weight: 850;
}
.highlight-chip.clear { border: 1px solid #a8e4ca; color: var(--mint); background: #244e50; }
.highlight-chip.bonus { border: 1px solid #ffd57e; color: #fff4cc; background: linear-gradient(105deg, #593b52, #463268); box-shadow: 0 0 16px #ffcf562b; }
.highlight-chip.bonus b { color: var(--yellow); }
.highlight-chip.speed { border: 1px solid #8ff7ff; color: #dffcff; background: linear-gradient(105deg, #25486b, #36306e); box-shadow: 0 0 14px #7cf6ff29; }
.result-rewards { display: grid; justify-items: center; gap: 10px; margin-top: 16px; }
.result-rewards .new-item, .result-rewards .new-world {
  margin-top: 0;
  width: min(100%, 460px);
  justify-content: flex-start;
}
.result-rewards .new-world > div,
.result-rewards .new-item > div { flex: 1 1 160px; min-width: 0; }
.result-rewards .frontier-note-line {
  margin: 0;
  padding: 6px 14px;
  border: 1px solid #96e9ff;
  border-radius: 999px;
  color: #e6fbff;
  background: linear-gradient(105deg, #2b3f6f, #4c2d6e);
  font-size: .86rem;
  font-weight: 850;
}
.result-rewards .frontier-note-line b { color: var(--yellow); }
.new-world { display: flex; align-items: center; gap: 12px; justify-content: center; flex-wrap: wrap; width: fit-content; max-width: 100%; margin: 16px auto 0; padding: 10px 14px; border-radius: 15px; border: 1px solid #886db8; background: #3b2a60; }
.new-world.is-arrived { border-color: #ffd875; background: linear-gradient(105deg, #3c2b66, #273e57); box-shadow: 0 0 20px #ffd8752e; }
.new-world.is-arrived .world-orb { outline: 2px solid #ffdf7e; outline-offset: 2px; }
.new-world small, .new-world b { display: block; text-align: left; }
.new-world small { color: var(--yellow); }
.new-world b { font-weight: 900; }
.new-world .world-orb { width: 43px; font-size: 1.4rem; }
.departure-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 12px;
  width: min(100%, 460px);
  padding: 8px 12px;
  border: 1px dashed #ffd875aa;
  border-radius: 14px;
  background: #2b2149;
}
.departure-stop { min-height: 38px; padding: 5px 12px; border-radius: 10px; font-size: .82rem; }

.world-base, body[data-world="base"] { --world-light: #d9b2ff; --world-mid: #ac83ef; --world-dark: #7656be; --world-glow: #775ac2; }
.world-moon, body[data-world="moon"] { --world-light: #e0fbff; --world-mid: #8ecdff; --world-dark: #4a6fb6; --world-glow: #365fb8; }
.world-comet, body[data-world="comet"] { --world-light: #ffe7bb; --world-mid: #ff9b78; --world-dark: #a7558b; --world-glow: #a24c76; }
.world-rings, body[data-world="rings"] { --world-light: #fff1a6; --world-mid: #eabd63; --world-dark: #93689c; --world-glow: #7a5198; }
.world-alien, body[data-world="alien"] { --world-light: #bffff0; --world-mid: #6adcae; --world-dark: #378683; --world-glow: #277775; }
.world-galaxy, body[data-world="galaxy"] { --world-light: #ffcdf8; --world-mid: #d575e3; --world-dark: #5a4db3; --world-glow: #6e479e; }
.world-master, body[data-world="master"] { --world-light: #fff7c8; --world-mid: #ffcf78; --world-dark: #cd6d48; --world-glow: #a85a65; }
body[data-world]:not([data-world="base"]) {
  background:
    radial-gradient(circle, #b5a9fd55 1px, transparent 1.5px) 22px 45px / 113px 101px,
    radial-gradient(circle, #a497ef65 1px, transparent 1.5px) 55px 22px / 159px 163px,
    radial-gradient(ellipse at 85% 0%, color-mix(in srgb, var(--world-glow) 58%, #15142f) 0%, transparent 56%), #15142f;
}
.hero { background: radial-gradient(ellipse at 73% 70%, var(--world-glow, #775ac2) 0%, transparent 52%), linear-gradient(115deg, #2e2357 25%, #3d327d 90%); }
.planet { background: radial-gradient(circle at 29% 23%, var(--world-light, #d9b2ff), var(--world-mid, #ac83ef) 52%, var(--world-dark, #7656be) 90%); }
.hero-copy > .world-beacon {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 12px;
  padding: 5px 12px 5px 6px;
  border-radius: 999px;
  border: 1px solid #baa4fa;
  background: #231a48cc;
  color: inherit;
  text-align: left;
  transition: background .15s, border-color .15s;
}
.hero-copy > .world-beacon:hover { background: #342764; border-color: var(--yellow); }
.hero-copy > .world-beacon .world-orb { width: 32px; font-size: 1.05rem; flex: 0 0 auto; }
.hero-copy > .world-beacon small { display: block; color: var(--muted); font-size: .68rem; font-weight: 750; line-height: 1.1; }
.hero-copy > .world-beacon b { display: block; color: #fff2bd; font-size: .88rem; font-weight: 900; line-height: 1.25; }
.hero-copy > .world-beacon .beacon-arrow { margin-left: 4px; color: var(--yellow); font-size: .78rem; font-weight: 850; white-space: nowrap; }
.new-item {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
  width: fit-content;
  max-width: 100%;
  margin: 14px auto 0;
  padding: 10px 16px;
  border-radius: 16px;
  border: 1px solid #ffd875;
  background: linear-gradient(105deg, #43316b, #2a4654);
  box-shadow: 0 0 22px #ffd87533;
  text-align: left;
}
.new-item small, .new-item b { display: block; }
.new-item small { color: var(--yellow); font-weight: 850; }
.new-item b { font-size: 1.12rem; font-weight: 950; color: #fff; }
.new-item .item-note { color: var(--mint); font-weight: 750; }
.item-orb {
  --planet: #b9e7cb;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 46px;
  aspect-ratio: 1;
  border-radius: 14px;
  background: var(--planet);
  color: #211842;
  font-size: 1.55rem;
  box-shadow: inset -4px -4px #31235424;
}
.treasure-shelf {
  margin-top: 20px;
  padding: 14px 15px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: #211d3a;
}
.treasure-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.treasure-title-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.treasure-heading h2 { font-size: clamp(1rem, 3vw, 1.2rem); }
.treasure-heading > span { color: var(--muted); font-size: .88rem; font-weight: 850; }
.treasure-heading > span b { color: var(--yellow); font-size: 1.05rem; }
.rocket-rank-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid #6b5f96;
  background: #2c254e;
  color: #e9e0ff;
  font-size: .76rem;
  font-weight: 800;
}
.rocket-rank-pill b { color: #fff; font-weight: 950; }
.rocket-rank-pill.rank-1 { border-color: #ff92b8; background: #462655; }
.rocket-rank-pill.rank-2 { border-color: #7eeeff; background: #223b66; }
.rocket-rank-pill.rank-3 { border-color: #ffe066; background: linear-gradient(90deg, #5c4022, #4f2c68); color: #fff7cf; box-shadow: 0 0 12px #ffd85c44; }
.rocket-rank-pill.rank-3 b { color: var(--yellow); }
.treasure-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.treasure-hint { color: var(--mint); font-size: .8rem; font-weight: 750; flex: 1 1 220px; }
.treasure-empty { margin: 4px 0 0; color: var(--mint); font-size: .86rem; font-weight: 750; line-height: 1.45; }
.treasure-bulk { display: flex; gap: 6px; flex-wrap: wrap; }
.bulk-equip { min-height: 36px; padding: 4px 11px; border-radius: 10px; font-size: .77rem; }
.treasure-grid { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 8px; }
.item-slot {
  --planet: #b9e7cb;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 3px;
  min-height: 82px;
  padding: 7px 4px;
  border: 1px solid #483f6d;
  border-radius: 14px;
  background: #191630;
  color: inherit;
  text-align: center;
  transition: background .15s, border-color .15s, opacity .15s;
}
.item-slot.unlocked {
  border-color: color-mix(in srgb, var(--planet) 65%, #514b77);
  background: #2b244a;
}
.item-slot.unlocked.equipped {
  box-shadow: 0 0 12px color-mix(in srgb, var(--planet) 28%, transparent);
}
.item-slot.unlocked.unequipped {
  opacity: .64;
  border-style: dashed;
  background: #1f1b38;
}
.item-slot.unlocked.unequipped .item-icon {
  filter: grayscale(.65) brightness(.8);
}
.item-slot:hover { background: #362d5b; border-color: var(--planet); opacity: 1; }
.item-slot.locked { opacity: .72; border-style: dashed; }
.item-slot .item-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  font-size: 1.25rem;
}
.item-slot.unlocked .item-icon { background: var(--planet); color: #20173e; box-shadow: inset -3px -3px #31235424; }
.item-slot.locked .item-icon { background: #292446; color: #9a91c2; font-weight: 900; font-size: 1rem; }
.item-slot b { font-size: .72rem; line-height: 1.2; font-weight: 850; word-break: keep-all; }
.item-slot.locked b { color: #9a91c2; }
.item-slot small { font-size: .65rem; color: var(--muted); font-weight: 700; }
.item-slot.unlocked.equipped small { color: var(--mint); }
.item-slot.unlocked.unequipped small { color: #b5aad8; }
@media (max-width: 729px) {
  .treasure-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
  .item-slot { min-height: 68px; }
}
body[data-world]:not([data-world="base"]) .question-card { border-color: var(--world-mid); }

.mission-status { display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 12px; row-gap: 8px; margin: 14px 0 20px; }
.mission-status > b { color: var(--yellow); font-size: 1.28rem; white-space: nowrap; }
.learning-total { grid-column: 1 / -1; width: 100%; }
.world-grid { display: grid; list-style: none; margin: 0; }
.world-tile { display: grid; align-content: start; justify-items: center; grid-template-rows: auto 1fr auto; gap: 7px; width: 100%; min-height: 152px; height: 100%; padding: 12px 6px; border: 1px solid #6c5f8e; border-radius: 15px; background: #30264d; color: inherit; }
.world-tile:not(:disabled):hover { background: #433263; border-color: var(--world-mid); }
.world-tile[disabled]:not(.current) { color: #e1d8f4; }
.world-tile[disabled]:not(.current) .world-orb { background: #3a3253; filter: grayscale(.8) brightness(.82); box-shadow: none; }
.world-tile.current { border-color: var(--world-light); }
.world-orb { display: grid; place-items: center; width: 60px; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 30% 25%, var(--world-light), var(--world-mid) 64%, var(--world-dark)); box-shadow: inset -5px -5px #29244b3b; font-size: 1.9rem; }
.world-tile b { line-height: 1.35; font-weight: 900; }
.world-tile small { color: var(--yellow); font-weight: 750; }
.world-tile[disabled]:not(.current) small { color: var(--muted); }

.learning-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 15px 0 10px; }
.learning-summary > div { display: grid; gap: 4px; border: 1px solid #695a8c; border-radius: 15px; padding: 11px 13px; background: #33294e; }
.learning-summary b { color: var(--mint); font-size: 1.75rem; line-height: 1.1; }
.learning-summary > div:last-child b { color: var(--yellow); }
.learning-summary b small { color: var(--muted); font-size: .8rem; }
.learning-summary div > span { color: var(--muted); font-size: .9rem; }
.learning-stages { display: grid; gap: 8px; margin-top: 14px; }
.learning-stage { border: 1px solid #645982; border-radius: 12px; padding: 0 10px; background: #302749; }
.learning-stage[open] { padding-bottom: 10px; }
.learning-stage summary { cursor: pointer; min-height: 49px; display: grid; grid-template-columns: auto minmax(30px, 1fr) auto minmax(28px, auto) 12px; gap: 8px; align-items: center; list-style: none; }
.learning-stage summary::-webkit-details-marker { display: none; }
.learning-stage summary::after { content: "⌄"; }
.learning-stage[open] summary::after { content: "⌃"; }
.learning-stage summary progress { width: 100%; }
.learning-stage summary span { font-size: .83rem; white-space: nowrap; font-weight: 740; }
.learning-stage .learning-flag { color: var(--yellow); text-align: right; }
.learning-stage .learning-flag.is-weak { color: #ffb3d9; }
.learning-stage .learning-flag.is-slow { color: #ffd98a; }
.fact-status-panel { margin-top: 14px; padding: 11px 12px; border: 1px solid #625488; border-radius: 14px; background: #292044; }
.fact-status-bar { display: flex; flex-wrap: wrap; gap: 6px; }
.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid #594b7d;
  background: #211a3a;
  font-size: .79rem;
  font-weight: 800;
  color: #e4dcfa;
}
.status-chip b { color: #fff; font-weight: 900; }
.status-chip.is-fast { background: #1c3e52; border-color: #4f9cb8; color: #aef6ff; }
.status-chip.is-known { background: #224444; border-color: #417d78; color: #b7f5e0; }
.status-chip.is-slow { background: #44341e; border-color: #8f6e3a; color: #ffe09e; }
.status-chip.is-weak { background: #4d294a; border-color: #8f4b86; color: #ffc7e4; }
.fact-status-note { margin: 8px 0 0; font-size: .78rem; color: var(--muted); line-height: 1.45; font-weight: 700; }
.learning-facts { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; padding: 0; margin: 0 0 8px; }
.learning-facts li { display: grid; align-content: center; gap: 2px; border: 1px solid #393259; border-radius: 9px; padding: 6px 4px; min-width: 0; text-align: center; background: #211c38; }
.learning-facts li .fact-label { color: #d4ccec; font-size: .74rem; font-weight: 800; }
.learning-facts li .fact-stat { font-size: .66rem; color: #dcd4f0; opacity: .9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.learning-facts li.known { background: #254848; border-color: #3c7570; }
.learning-facts li.known .fact-label { color: #b2f3dd; }
.learning-facts li.fast { background: #1d4459; border-color: #4d9cb8; }
.learning-facts li.fast .fact-label { color: #9df5ff; }
.learning-facts li.slow { background: #47361e; border-color: #8a6b38; }
.learning-facts li.slow .fact-label { color: #ffe09c; }
.learning-facts li.weak,
.learning-facts li.retry { background: #522d4f; border-color: #8a4882; }
.learning-facts li.weak .fact-label,
.learning-facts li.retry .fact-label { color: #ffcae5; }

@media (max-width: 600px) {
  .home-tracker { gap: 7px; }
  .tracker { gap: 6px; padding: 8px; font-size: .84rem; }
  .tracker-icon { width: 27px; height: 30px; font-size: 1rem; }
  .tracker-arrow { font-size: 1rem; }
  .world-tile { min-height: 131px; font-size: .88rem; }
  .world-orb { width: 48px; }
  .learning-stage summary { gap: 6px; }
}
@media (prefers-reduced-motion: no-preference) {
  .celebration i { display: block; animation: star-burst .75s ease-out both; }
  .result-icon .celebration i { animation-duration: 1.05s; }
  .answer.right { animation: answer-pop .33s ease-out; }
  .answer.right.fast, .number-display.right.fast { animation: fast-pop .45s ease-out; }
  .speed-tag, .earned-star.is-double { animation: tag-pop .35s cubic-bezier(.22, 1.35, .36, 1) both; }
  @keyframes star-burst {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(.4); }
    20% { opacity: 1; }
    65% { opacity: 1; }
    100% { opacity: 0; transform: translate(var(--x), var(--y)) rotate(var(--spin)) scale(.8); }
  }
  @keyframes answer-pop {
    40% { transform: scale(1.045); box-shadow: 0 0 22px #a0f3c55c; }
  }
  @keyframes fast-pop {
    35% { transform: scale(1.07); box-shadow: 0 0 30px #ffe878cc; }
  }
  @keyframes tag-pop {
    from { opacity: 0; transform: translateY(8px) scale(.7); }
    to { opacity: 1; transform: translateY(0) scale(1); }
  }
}

.stage-rule { margin: 12px 0; font-size: .87rem; color: var(--muted); }
.result-card .clear-banner { margin-inline: auto; }
.flying-star {
  position: fixed;
  z-index: 30;
  top: 0;
  left: 0;
  display: flex;
  align-items: center;
  gap: 2px;
  color: #ffe68d;
  font: 900 38px/1 system-ui, sans-serif;
  text-shadow: 0 0 9px #ffc33f, 0 0 21px #fa972d;
  pointer-events: none;
  white-space: nowrap;
}
.flying-star small { font-size: 17px; }
.flying-star i { position: absolute; left: -13px; bottom: -3px; font: 800 18px/1 system-ui; color: #fff8cf; }
.flying-star i:nth-child(2) { left: -22px; bottom: -8px; font-size: 13px; opacity: .7; }
.flying-star.speed-star {
  color: #fff6b3;
  font-size: 44px;
  text-shadow: 0 0 12px #7cf7ff, 0 0 24px #ffcf48;
}
.flying-star.speed-star i:nth-child(2) { left: -24px; bottom: -6px; font-size: 20px; color: #8ff7ff; opacity: 1; }

.voyage {
  position: fixed;
  width: min(580px, calc(100% - 28px));
  max-width: none;
  height: min(360px, 83svh);
  padding: 0;
  overflow: hidden;
  color: #fff6dc;
  border: 1px solid var(--world-light);
  border-radius: 25px;
  background:
    radial-gradient(circle, #eadaffb0 1px, transparent 1.5px) 24px 11px / 67px 63px,
    radial-gradient(ellipse at 80% 27%, var(--world-glow), transparent 57%), #171331;
  box-shadow: 0 0 60px #09081eb8;
}
.voyage::backdrop { background: #101022dd; }
.voyage-scene { position: absolute; inset: 0; overflow: hidden; }
.voyage-orbit {
  position: absolute;
  inset: 9% 7% 34% 18%;
  border: 1px solid #efd9ff87;
  border-radius: 50%;
  transform: rotate(-19deg);
}
.voyage-planet {
  position: absolute;
  top: 23%;
  right: 28%;
  width: clamp(105px, 34%, 190px);
  font-size: clamp(38px, 11vw, 75px);
  animation: approach-planet 1.45s cubic-bezier(.23, .8, .23, 1) both;
}
.voyage-rocket {
  position: absolute;
  left: -10%;
  top: 70%;
  width: clamp(54px, 16vw, 88px);
  height: clamp(82px, 24vw, 134px);
  filter: drop-shadow(-12px 13px 13px #ffc76eac);
  animation: launch-voyage .9s cubic-bezier(.36, .18, .56, 1) both;
}
.voyage-flash {
  position: absolute;
  top: 23%;
  right: 29%;
  width: 33%;
  aspect-ratio: 1;
  border: 2px solid #fff3b6;
  border-radius: 50%;
  animation: voyage-flash .50s .69s ease-out both;
}
.voyage-label {
  position: absolute;
  left: 18px;
  bottom: 18px;
  max-width: calc(100% - 42px);
  font-weight: 850;
  text-shadow: 0 1px 8px #211333;
  animation: voyage-title .4s .68s ease-out both;
}
.voyage-label p { color: var(--yellow); }
.voyage-label h2 { font-size: clamp(1.25rem, 5vw, 2.3rem); }
.voyage form { position: absolute; top: 11px; left: 11px; }
@keyframes launch-voyage {
  0% { left: -12%; top: 79%; transform: scale(1.25) rotate(52deg); }
  60% { left: 52%; top: 40%; transform: scale(.82) rotate(48deg); opacity: 1; }
  100% { left: 77%; top: 25%; transform: scale(.15) rotate(40deg); opacity: 0; }
}
@keyframes voyage-flash { from { opacity: .9; transform: scale(.75); } to { opacity: 0; transform: scale(1.7); } }
@keyframes voyage-title { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: translateY(0); } }

.input-question h1 { margin-block: 10px 12px; font-size: clamp(2.4rem, 9vw, 4.3rem); }
.number-answer { width: min(100%, 370px); margin: 0 auto; }
.number-display { position: relative; margin-bottom: 8px; }
.number-display input {
  width: 100%;
  min-height: 52px;
  padding: 6px;
  border: 1px solid #9481c7;
  border-radius: 12px;
  background: #181630;
  color: #fff;
  text-align: center;
  font-size: 1.7rem;
  font-weight: 900;
  opacity: 1;
}
.number-display.right input { background: #9de9c9; color: #173f32; }
.number-display.wrong input { background: #643858; color: #ffe4f0; }
.number-pad { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.number-pad button { padding-inline: 4px; font-size: 1.16rem; }
.number-pad button[type="submit"] { font-size: clamp(.8rem, 3vw, 1rem); }
.number-pad button:disabled { opacity: .56; }

.universe .map-location { margin-top: 11px; color: #e3d9ff; font-size: .95rem; }
.map-location b { margin-left: 5px; color: #ffe59a; }
.inline-rocket {
  display: inline-block;
  width: 18px;
  height: 25px;
  flex: 0 0 auto;
  vertical-align: -5px;
  margin-right: 3px;
  transform: rotate(36deg);
  filter: drop-shadow(0 0 4px #ffd276aa);
}
.world-map {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid #675592;
  border-radius: 19px;
  background:
    radial-gradient(circle, #d2bbff66 1px, transparent 1.7px) 8px 12px / 45px 57px,
    radial-gradient(circle, #cb9ef855 1px, transparent 1.7px) 22px 29px / 71px 73px,
    radial-gradient(ellipse at 70% 34%, #49336b, #211a40 66%, #191532);
}
.map-route { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.world-map .world-grid {
  position: relative;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-flow: dense;
  gap: clamp(11px, 3vw, 25px) 4px;
  padding: 15px 7px 11px;
}
@media (max-width: 729px) {
  .world-grid li:nth-child(6n + 1) { grid-column: 1; }
  .world-grid li:nth-child(6n + 2) { grid-column: 2; }
  .world-grid li:nth-child(6n + 3),
  .world-grid li:nth-child(6n + 4) { grid-column: 3; }
  .world-grid li:nth-child(6n + 5) { grid-column: 2; }
  .world-grid li:nth-child(6n) { grid-column: 1; }
}
@media (min-width: 730px) {
  .world-map .world-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .world-grid li:nth-child(10n + 1),
  .world-grid li:nth-child(10n) { grid-column: 1; }
  .world-grid li:nth-child(10n + 2),
  .world-grid li:nth-child(10n + 9) { grid-column: 2; }
  .world-grid li:nth-child(10n + 3),
  .world-grid li:nth-child(10n + 8) { grid-column: 3; }
  .world-grid li:nth-child(10n + 4),
  .world-grid li:nth-child(10n + 7) { grid-column: 4; }
  .world-grid li:nth-child(10n + 5),
  .world-grid li:nth-child(10n + 6) { grid-column: 5; }
}
.world-map .world-tile {
  display: grid;
  align-content: start;
  grid-template-rows: auto auto auto;
  min-height: 0;
  gap: 4px;
  padding: 5px 1px;
  border-color: transparent;
  background: none;
}
.world-map .world-tile:not(:disabled):hover { background: #60448062; }
.world-map .world-tile .world-orb { width: clamp(44px, 10vw, 69px); font-size: clamp(1.2rem, 3vw, 1.85rem); }
.world-map .world-tile b, .world-map .world-tile small { background: #241a40ea; padding: 1px 3px; border-radius: 5px; }
.world-map .world-tile b { font-size: clamp(.71rem, 2.25vw, 1rem); }
.world-map .world-tile small { font-size: clamp(.65rem, 1.9vw, .83rem); }
.world-map .world-tile.current .world-orb { outline: 2px solid #ffdc78; outline-offset: 3px; box-shadow: 0 0 20px #ffdc787b; }
.world-map .world-tile.current small { background: #ffdf7e; color: #2c2041; padding-inline: 8px; }
.map-planet { position: relative; display: block; }
.map-pin {
  position: absolute;
  right: -13px;
  top: -12px;
  width: clamp(22px, 5vw, 30px);
  height: clamp(32px, 7vw, 42px);
  transform: rotate(34deg);
  filter: drop-shadow(0 0 6px #fbd27b);
}
.in-flight .map-pin { visibility: hidden; }
.map-traveler {
  position: absolute;
  z-index: 2;
  top: 0;
  left: 0;
  width: clamp(30px, 8vw, 46px);
  height: clamp(44px, 11vw, 66px);
  pointer-events: none;
  filter: drop-shadow(-4px 5px 7px #ffd276);
}
.map-pin .rocket-beam, .map-pin .rocket-dust,
.reward-rocket .rocket-beam, .reward-rocket .rocket-dust,
.inline-rocket .rocket-beam, .inline-rocket .rocket-dust { display: none; }
.map-lock { position: absolute; bottom: 1px; right: -3px; font-size: .8rem; }

.quiz-reward {
  width: min(100%, 345px);
  margin: 16px auto 0;
  padding: 6px 14px;
  border: 1px solid #856c94;
  border-radius: 25px;
  color: var(--yellow);
  background: #392848;
  font-size: .85rem;
  font-weight: 800;
}
.badge-reveal {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  padding: 8px 13px;
  border-radius: 13px;
  border: 1px solid #ffd588;
  color: #fff2cd;
  background: linear-gradient(105deg, #523752, #382754);
}
.badge-reveal > span { font-size: 2rem; }
.badge-reveal small, .badge-reveal b { display: block; }
.badge-reveal small { color: var(--yellow); font-weight: 850; }
.map-badge { position: absolute; left: -4px; bottom: -2px; color: #ffe38c; font-size: .92rem; }
.collection-albums { display: grid; gap: 6px; margin-top: 12px; }
.badge-album, .alien-album { color: #e5d6ff; font-size: .9rem; }
.badge-album summary, .alien-album summary { padding-block: 10px; cursor: pointer; font-weight: 850; }
.badge-album ul { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.badge-album li { border: 1px solid #635281; padding: 4px 8px; border-radius: 19px; }
.alien-dex-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
  margin-top: 6px;
}
.dex-card {
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 4px;
  padding: 11px 9px;
  border: 1px solid #594b7d;
  border-radius: 15px;
  background: #231b40;
  color: inherit;
  text-align: center;
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
}
.dex-card.met {
  border-color: color-mix(in srgb, var(--world-mid, #9d86d8) 65%, #514b77);
  background: linear-gradient(160deg, color-mix(in srgb, var(--world-glow, #523c84) 36%, #201a3c), #1b1634);
}
.dex-card.met:hover, .dex-card.unvisited:hover {
  transform: translateY(-2px);
  border-color: var(--world-light, var(--yellow));
  background: #302457;
}
.dex-card.unvisited { border-style: dashed; border-color: var(--world-mid, #8776b8); }
.dex-card.locked { opacity: .66; border-style: dashed; cursor: default; }
.dex-alien-figure .alien-svg { width: 74px; height: 84px; }
.dex-card b { font-size: .88rem; font-weight: 900; color: #fff; }
.dex-world { color: var(--yellow); font-size: .74rem; font-weight: 800; }
.dex-line { color: #e9e0ff; font-size: .73rem; line-height: 1.4; }
.dex-mystery {
  display: grid;
  place-items: center;
  width: 56px;
  height: 64px;
  margin-block: 8px;
  border-radius: 50%;
  background: #2b234d;
  color: #b7a9df;
  font-size: 1.6rem;
  font-weight: 900;
}
@keyframes approach-planet {
  0% { opacity: .45; transform: translate(30%, -23%) scale(.31); }
  45% { opacity: 1; transform: translate(0, 0) scale(1.18); }
  71% { opacity: 1; transform: translate(0, 0) scale(1.04); }
  100% { transform: translate(0, 0) scale(1.04); }
}
@media (prefers-reduced-motion: no-preference) {
  .badge-reveal, .bonus-banner, .speed-banner, .frontier-banner, .new-item, .result-highlights, .new-world.is-arrived { animation: badge-pop .45s ease-out both; }
  @keyframes badge-pop {
    from { opacity: .3; transform: translateY(6px) scale(.97); }
    65% { transform: translateY(0) scale(1.02); }
    to { opacity: 1; transform: translateY(0) scale(1); }
  }
}

.world-ice, body[data-world="ice"] { --world-light: #f0feff; --world-mid: #93eafa; --world-dark: #5787ad; --world-glow: #3b709f; }
.world-gem, body[data-world="gem"] { --world-light: #f8d6ff; --world-mid: #dd92ec; --world-dark: #7939b5; --world-glow: #8740b7; }
.world-aurora, body[data-world="aurora"] { --world-light: #d4ffdf; --world-mid: #6cdecc; --world-dark: #646bc8; --world-glow: #425f9e; }
.world-bear, body[data-world="bear"] { --world-light: #ffe8c8; --world-mid: #d9a595; --world-dark: #a26885; --world-glow: #8f5079; }
.world-garden, body[data-world="garden"] { --world-light: #f5ffc1; --world-mid: #bcdf75; --world-dark: #547e86; --world-glow: #467963; }
.world-port, body[data-world="port"] { --world-light: #c7e8ff; --world-mid: #839fe8; --world-dark: #5654af; --world-glow: #4d56a0; }
.world-crew, body[data-world="crew"] { --world-light: #ffdcb1; --world-mid: #d8979f; --world-dark: #8c588d; --world-glow: #a55086; }
.world-gate, body[data-world="gate"] { --world-light: #fff6c5; --world-mid: #efb365; --world-dark: #9a6690; --world-glow: #a96b63; }
.reward-label { color: var(--yellow); font-size: .9rem; font-weight: 850; line-height: 1.3; }
.universe .reward-label { color: var(--yellow); }
.reward-rail { display: flex; gap: 11px; align-items: center; padding-left: 8px; }
.reward-track { position: relative; min-width: 0; flex: 1; display: flex; align-items: center; }
.reward-track progress { width: 100%; height: 8px; }
.reward-track progress::-webkit-progress-value { background: var(--yellow); }
.reward-track progress::-moz-progress-bar { background: var(--yellow); }
.reward-rocket {
  position: absolute;
  left: 0;
  top: 50%;
  width: 22px;
  height: 32px;
  transform: translate(-46%, -50%) rotate(90deg);
  pointer-events: none;
  filter: drop-shadow(0 0 4px #ffdc79);
}
.reward-destination { font-size: 1.2rem; line-height: 1; }
.quiz-reward .reward-rail { margin-top: 4px; }
.universe .mission-status { align-items: start; }
.world-candy, body[data-world="candy"] { --world-light: #fff0fa; --world-mid: #f1a5ca; --world-dark: #9a5ab6; --world-glow: #a85197; }
.world-whale, body[data-world="whale"] { --world-light: #d5ffff; --world-mid: #73c8f0; --world-dark: #5b61bd; --world-glow: #446fb4; }
.world-prism, body[data-world="prism"] { --world-light: #fff5c9; --world-mid: #b59bfd; --world-dark: #7581e4; --world-glow: #8265c8; }
.world-nova, body[data-world="nova"] { --world-light: #fff9d8; --world-mid: #ffce73; --world-dark: #e36d85; --world-glow: #b85b76; }
.world-unicorn, body[data-world="unicorn"] { --world-light: #fff0ff; --world-mid: #f0b2f7; --world-dark: #8d68cc; --world-glow: #9b52b8; }
.world-dino, body[data-world="dino"] { --world-light: #e5ffd8; --world-mid: #80da9f; --world-dark: #387a6a; --world-glow: #306f5d; }
.world-dragon, body[data-world="dragon"] { --world-light: #ffe4c4; --world-mid: #ff8c70; --world-dark: #a63d6a; --world-glow: #9e385c; }
.world-castle, body[data-world="castle"] { --world-light: #f0f3ff; --world-mid: #9fb8ff; --world-dark: #5b59ad; --world-glow: #5158a6; }
.world-meteor, body[data-world="meteor"] { --world-light: #e0ffff; --world-mid: #74e3ff; --world-dark: #3e69ba; --world-glow: #3778b3; }
.world-donut, body[data-world="donut"] { --world-light: #ffe7f3; --world-mid: #f79ec8; --world-dark: #a4567b; --world-glow: #964c73; }
.world-dolphin, body[data-world="dolphin"] { --world-light: #dbfff9; --world-mid: #6de3db; --world-dark: #2f7d99; --world-glow: #297790; }
.world-magic, body[data-world="magic"] { --world-light: #f3e4ff; --world-mid: #be8eff; --world-dark: #6842ab; --world-glow: #7546b3; }
.world-firework, body[data-world="firework"] { --world-light: #fff3cc; --world-mid: #ff9eb5; --world-dark: #6f49b5; --world-glow: #9e488f; }
.world-crown, body[data-world="crown"] { --world-light: #fff9cf; --world-mid: #ffe073; --world-dark: #8e619e; --world-glow: #a6714b; }
.world-crystal, body[data-world="crystal"] { --world-light: #e8faff; --world-mid: #8dd4ff; --world-dark: #4c62b8; --world-glow: #426ca8; }
.world-owl, body[data-world="owl"] { --world-light: #ffefc8; --world-mid: #c5a3f5; --world-dark: #545d8f; --world-glow: #4e598c; }
.world-cherry, body[data-world="cherry"] { --world-light: #fff0f7; --world-mid: #ffbad9; --world-dark: #9c5b94; --world-glow: #a8548a; }
.world-diamond, body[data-world="diamond"] { --world-light: #f5ffff; --world-mid: #aef5e8; --world-dark: #5b7cb8; --world-glow: #5882b3; }
.world-sun, body[data-world="sun"] { --world-light: #fff8cf; --world-mid: #ffb85c; --world-dark: #c7574c; --world-glow: #b5653b; }

.frontier-banner {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin-inline: auto;
  padding: 8px 16px;
  border: 1px solid #96e9ff;
  border-radius: 999px;
  color: #e6fbff;
  background: linear-gradient(105deg, #2b3f6f, #4c2d6e);
  font-weight: 850;
  box-shadow: 0 0 20px #8ce8ff33;
}
.frontier-banner b { color: var(--yellow); }
.universe .map-location { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.frontier-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border: 1px solid #90e7ff88;
  border-radius: 999px;
  background: #2c3d6a;
  color: #c8f6ff;
  font-size: .8rem;
  font-weight: 850;
}
.badge-reveal .frontier-note { color: var(--mint); margin-top: 3px; font-weight: 800; }
.map-horizon { position: relative; margin: 2px 12px 12px; text-align: center; color: #dcd0ff; font-size: .78rem; font-weight: 750; }


.departure-note { color: var(--yellow); font-weight: 850; }
.voyage.slow-trip .voyage-planet { animation-duration: 2.3s; }
.voyage.slow-trip .voyage-rocket { animation-duration: 1.42s; }
.voyage.slow-trip .voyage-flash { animation-delay: 1.1s; animation-duration: .82s; }
.voyage.slow-trip .voyage-label { animation-delay: 1.08s; animation-duration: .64s; }

.mix-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.mix-actions .recall-link { color: var(--yellow); border-color: #a78b72; }

.mastery-panel { margin-top: 16px; padding: 12px; border: 1px solid #82699c; border-radius: 14px; background: #342650; }
.mastery-panel h2 { color: var(--yellow); font-size: 1.15rem; }
.mastery-panel p { margin-top: 4px; }
.mastery-meter { display: flex; align-items: center; gap: 10px; margin: 9px 0; }
.mastery-meter b { color: var(--yellow); white-space: nowrap; }

.footer-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px 12px; }
.backup-card > section { display: grid; gap: 8px; margin-top: 16px; padding: 13px; border: 1px solid #6d5c8d; border-radius: 13px; }
.backup-card h2 { color: var(--yellow); font-size: 1.08rem; }
.backup-card form { display: grid; gap: 8px; min-width: 0; }
.backup-card button { justify-self: start; }
.backup-card button:disabled { opacity: .55; }
.backup-card input { width: 100%; min-height: 44px; }
#backup-message { margin-top: 10px; color: var(--mint); font-weight: 800; }

.recall-card { perspective: 560px; }
.recall-card[aria-pressed="true"] { border-color: #8aebcd; }
.recall-sides {
  display: grid;
  grid-template: auto / minmax(0, 1fr);
  transform-style: preserve-3d;
}
.recall-sides .card-face {
  grid-area: 1 / 1;
  display: grid;
  align-content: center;
  gap: 4px;
  backface-visibility: hidden;
}
.recall-sides .card-answer, .recall-card[aria-pressed="true"] .recall-sides { transform: rotateY(180deg); }
@media (prefers-reduced-motion: no-preference) {
  .recall-sides { transition: transform .32s ease-in-out; }
}

.question-card, .result-card { position: relative; overflow: hidden; }
.question-card { transition: border-color .25s ease, box-shadow .25s ease; }
.question-card.on-streak { border-color: #ffcf72aa; box-shadow: 0 0 26px #ffcf6b24; }
.question-progress { flex-wrap: nowrap; gap: 10px; }
.combo-pill {
  flex: 0 0 auto;
  padding: 2px 9px;
  border-radius: 999px;
  background: linear-gradient(90deg, #ff9966, #ffe066);
  color: #29163e;
  font-size: .78rem;
  font-weight: 950;
  white-space: nowrap;
  box-shadow: 0 2px 10px #ffb86c44;
}
.combo-pill.hot {
  background: linear-gradient(90deg, #ff79c6, #ffe66d, #7ef6ff);
  box-shadow: 0 0 14px #ffe07588;
}
.question-card h1 b { display: inline-block; transition: color .2s ease; }
.question-card h1 b.solved { color: var(--mint); }
.question-card h1 b.solved-fast { color: #9cf8ff; text-shadow: 0 0 20px #78f6ffaa; }
.question-card h1 b.revealed { color: #ffb7d6; }
.equip-burst { position: absolute; inset: 0; pointer-events: none; z-index: 8; }
.confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.confetti i {
  display: none;
  position: absolute;
  top: -12px;
  font-style: normal;
  font-weight: 900;
  font-size: 1rem;
  opacity: 0;
}
.confetti i:nth-child(1) { left: 8%; color: #ffe066; --dx: -14px; --rot: 140deg; --delay: 0s; }
.confetti i:nth-child(2) { left: 16%; color: #8ef5d4; --dx: 16px; --rot: -180deg; --delay: .12s; }
.confetti i:nth-child(3) { left: 25%; color: #ff9fd6; --dx: -10px; --rot: 210deg; --delay: .05s; }
.confetti i:nth-child(4) { left: 34%; color: #8aefff; --dx: 12px; --rot: -150deg; --delay: .18s; }
.confetti i:nth-child(5) { left: 43%; color: #ffe066; --dx: -18px; --rot: 170deg; --delay: .08s; }
.confetti i:nth-child(6) { left: 52%; color: #c8adff; --dx: 14px; --rot: -200deg; --delay: .22s; }
.confetti i:nth-child(7) { left: 61%; color: #8ef5d4; --dx: -12px; --rot: 190deg; --delay: .03s; }
.confetti i:nth-child(8) { left: 70%; color: #ff9fd6; --dx: 18px; --rot: -160deg; --delay: .15s; }
.confetti i:nth-child(9) { left: 79%; color: #ffe066; --dx: -16px; --rot: 220deg; --delay: .1s; }
.confetti i:nth-child(10) { left: 88%; color: #8aefff; --dx: 10px; --rot: -175deg; --delay: .25s; }
.confetti i:nth-child(11) { left: 20%; color: #fff6b3; --dx: 20px; --rot: 155deg; --delay: .28s; }
.confetti i:nth-child(12) { left: 75%; color: #8ef5d4; --dx: -20px; --rot: -195deg; --delay: .2s; }

@media (prefers-reduced-motion: no-preference) {
  .hero .spark { animation: spark-twinkle 3.4s ease-in-out infinite alternate; }
  .hero .spark-two { animation-delay: .8s; }
  .hero .spark-three { animation-delay: 1.5s; }
  .hero .spark-four { animation-delay: 2.1s; }
  .hero .spark-five { animation-delay: 1.1s; }
  .question-card h1 b.solved,
  .question-card h1 b.revealed { animation: eq-pop .34s cubic-bezier(.22, 1.35, .36, 1) both; }
  .combo-pill:not([hidden]) { animation: tag-pop .32s cubic-bezier(.22, 1.35, .36, 1) both; }
  .answer.wrong, .number-display.wrong { animation: gentle-shake .32s ease-in-out; }
  .confetti i { display: block; animation: confetti-fall 2.1s var(--delay, 0s) cubic-bezier(.25, .6, .45, 1) both; }
  @keyframes spark-twinkle {
    from { opacity: .62; }
    to { opacity: 1; }
  }
  @keyframes eq-pop {
    from { transform: scale(.72); }
    60% { transform: scale(1.16); }
    to { transform: scale(1); }
  }
  @keyframes gentle-shake {
    25% { transform: translateX(-5px); }
    55% { transform: translateX(5px); }
    80% { transform: translateX(-3px); }
  }
  @keyframes confetti-fall {
    0% { opacity: 0; transform: translateY(0) translateX(0) rotate(0deg) scale(.7); }
    12% { opacity: 1; }
    80% { opacity: .95; }
    100% { opacity: 0; transform: translateY(250px) translateX(var(--dx, 0px)) rotate(var(--rot, 180deg)) scale(1); }
  }
}

.scene-alien {
  position: absolute;
  right: 16%;
  bottom: 2%;
  z-index: 6;
  display: grid;
  justify-items: center;
  gap: 2px;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
  pointer-events: auto;
  transition: transform .16s ease;
}
.scene-alien:hover { transform: scale(1.04); }
.scene-alien:focus-visible { outline: 3px solid #a8edfa; outline-offset: 4px; border-radius: 16px; }
.scene-alien-bubble {
  position: absolute;
  bottom: calc(100% + 6px);
  right: -6px;
  min-width: 145px;
  max-width: 225px;
  padding: 7px 12px;
  border-radius: 14px;
  border: 2px solid var(--world-light, #d9b2ff);
  background: #fffcf2;
  color: #231445;
  font-size: .82rem;
  font-weight: 850;
  line-height: 1.38;
  text-align: center;
  box-shadow: 0 7px 18px #100824bd;
  pointer-events: none;
  animation: bubble-pop .26s cubic-bezier(.22, 1.35, .36, 1) both;
}
.scene-alien-bubble::after {
  content: "";
  position: absolute;
  bottom: -7px;
  right: 44px;
  width: 12px;
  height: 12px;
  background: #fffcf2;
  border-right: 2px solid var(--world-light, #d9b2ff);
  border-bottom: 2px solid var(--world-light, #d9b2ff);
  transform: rotate(45deg);
}
@keyframes bubble-pop {
  from { opacity: 0; transform: translateY(6px) scale(.86); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.scene-alien-name {
  padding: 2px 10px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--world-light, #d9b2ff) 65%, transparent);
  background: #1b133beb;
  color: #f6efff;
  font-size: .76rem;
  font-weight: 850;
  white-space: nowrap;
  box-shadow: 0 3px 10px #140d2daa;
}
.alien-figure {
  position: relative;
  display: grid;
  justify-items: center;
  pointer-events: none;
  transform-origin: center bottom;
}
.alien-svg {
  display: block;
  width: 96px;
  height: 108px;
  overflow: visible;
  filter: drop-shadow(0 6px 12px #12092699) drop-shadow(0 0 14px color-mix(in srgb, var(--world-light, #d9b2ff) 42%, transparent));
}
.alien-mini {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.55em;
  height: 1.75em;
  flex: 0 0 auto;
  vertical-align: -0.38em;
  margin-right: 3px;
}
.alien-mini .alien-svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 1px 2px #12092688);
}
.alien-mini .alien-aura,
.alien-mini .alien-micro {
  display: none;
}
.alien-meet { display: inline-flex; align-items: center; gap: 3px; color: var(--mint) !important; margin-top: 2px; font-weight: 800; }
.map-alien-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 10px 2px 7px;
  border: 1px solid color-mix(in srgb, var(--world-light, #d9b2ff) 55%, transparent);
  border-radius: 999px;
  background: #2b2152;
  color: #f4ebff;
  font-size: .82rem;
  font-weight: 850;
}
.voyage-alien-figure {
  position: absolute;
  right: 14%;
  top: 41%;
  z-index: 2;
}
.voyage-alien-figure .alien-svg { width: clamp(72px, 18vw, 102px); height: auto; }
.voyage-alien { display: flex; align-items: center; gap: 4px; margin-top: 4px; color: #f6efff !important; font-size: clamp(.86rem, 3vw, 1.05rem); font-weight: 800; }

@media (max-width: 600px) {
  .hero .scene-alien-name { display: none; }
  .hero .scene-alien-bubble { right: 8px; max-width: 280px; font-size: 1.3rem; padding: 9px 14px; }
  .hero .scene-alien-bubble::after { right: 32px; }
}
@media (max-width: 365px) {
  .hero .scene-alien { right: 21%; }
}
@media (prefers-reduced-motion: no-preference) {
  .scene-alien .alien-svg { animation: alien-stand-bob 3.2s ease-in-out infinite; transform-origin: center bottom; }
  .voyage-alien-figure { animation: voyage-fade .45s .62s ease-out both; }
  .voyage-alien-figure .alien-svg { animation: alien-stand-bob 2.2s 1.05s ease-in-out infinite; transform-origin: center bottom; }
  @keyframes alien-stand-bob {
    50% { transform: translateY(-4px); }
  }
  @keyframes voyage-fade {
    from { opacity: 0; }
    to { opacity: 1; }
  }
}

.play-log-panel {
  margin-top: 16px;
  padding: 13px;
  border: 1px solid #6e5f94;
  border-radius: 15px;
  background: #2f254b;
}
.play-log-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.play-log-head h2 {
  color: var(--mint);
  font-size: 1.12rem;
}
.play-streak-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border: 1px solid #ffba63;
  border-radius: 999px;
  background: #472b4e;
  color: #ffe39e;
  font-size: .8rem;
  font-weight: 850;
}
.play-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}
.play-stat {
  display: grid;
  gap: 2px;
  padding: 10px;
  border: 1px solid #5c5080;
  border-radius: 12px;
  background: #241c3d;
}
.play-stat b {
  color: var(--yellow);
  font-size: 1.25rem;
  line-height: 1.15;
}
.play-stat span {
  font-size: .82rem;
  font-weight: 800;
  color: #efe8ff;
}
.play-stat small {
  font-size: .74rem;
  color: var(--muted);
}
.play-days-caption {
  margin: 12px 0 6px;
  font-size: .82rem;
  color: var(--muted);
  font-weight: 750;
}
.play-days {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
  padding: 0;
  margin: 0;
}
.play-day {
  display: grid;
  justify-items: center;
  gap: 2px;
  padding: 6px 2px;
  border: 1px solid #4c416b;
  border-radius: 10px;
  background: #241c3b;
  text-align: center;
}
.play-day.is-today {
  border-color: var(--yellow);
  background: #332752;
}
.play-bar-track {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  width: 14px;
  height: 30px;
  border-radius: 999px;
  background: #1a1430;
  overflow: hidden;
}
.play-bar {
  display: block;
  width: 100%;
  border-radius: 999px;
  background: #483d66;
  height: 10%;
}
.play-day.lvl-1 .play-bar { height: 30%; background: #77d9b8; }
.play-day.lvl-2 .play-bar { height: 54%; background: var(--mint); }
.play-day.lvl-3 .play-bar { height: 78%; background: #7cf3ff; }
.play-day.lvl-4 .play-bar { height: 100%; background: var(--yellow); }
.play-day b {
  font-size: .68rem;
  line-height: 1.1;
  color: #e6ddff;
}
.play-day small {
  font-size: .63rem;
  line-height: 1.1;
  color: var(--muted);
}
.play-day.lvl-1 small,
.play-day.lvl-2 small,
.play-day.lvl-3 small,
.play-day.lvl-4 small {
  color: #bdf7e4;
  font-weight: 750;
}
@media (max-width: 600px) {
  .play-stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .play-days { gap: 4px; }
  .play-day { padding: 5px 1px; }
  .result-rewards .new-item, .result-rewards .new-world { justify-content: center; }
}

.nav-return {
  min-height: 44px;
  padding: 8px 14px;
  gap: 6px;
  font-size: .92rem;
  white-space: nowrap;
}
.return-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #4e4472;
}
.return-bar .primary { flex: 1 1 220px; max-width: 320px; }
.rules-panel {
  margin-top: 16px;
  border: 1px solid #594e7a;
  border-radius: 13px;
  padding: 0 12px;
  background: #221c3c;
}
.rules-panel summary {
  cursor: pointer;
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #e4d9ff;
  font-size: .9rem;
  font-weight: 800;
  list-style: none;
}
.rules-panel summary::-webkit-details-marker { display: none; }
.rules-panel summary::after { content: "⌄"; color: var(--muted); }
.rules-panel[open] { padding-bottom: 10px; }
.rules-panel[open] summary::after { content: "⌃"; }
.voyage-badge {
  display: inline-block;
  margin: 6px 0 2px;
  padding: 3px 11px;
  border: 1px solid #ffd875;
  border-radius: 999px;
  background: #2f204fe0;
  color: #fff2be !important;
  font-size: clamp(.78rem, 2.7vw, .92rem);
  font-weight: 850;
  text-shadow: none;
}

.rocket-dock {
  position: fixed;
  top: 10px;
  left: 50%;
  z-index: 25;
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(560px, calc(100% - 24px));
  padding: 8px 12px;
  border: 1px solid var(--world-light, #baa4fa);
  border-radius: 18px;
  background: linear-gradient(110deg, color-mix(in srgb, var(--world-glow, #523c84) 48%, #1c1638f2), #1d183af5);
  box-shadow: 0 12px 28px #0a071bcc, 0 0 18px color-mix(in srgb, var(--world-mid, #ac83ef) 26%, transparent);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(-50%, -14px);
  transition: opacity .2s ease, transform .22s ease, visibility .2s;
}
.rocket-dock.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, 0);
}
.dock-stage {
  position: relative;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 68px;
  height: 60px;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--world-light, #baa4fa) 45%, transparent);
  background:
    radial-gradient(circle at 22% 24%, #ffffff99 1px, transparent 1.5px),
    radial-gradient(circle at 78% 76%, #ffe69b88 1px, transparent 1.5px),
    radial-gradient(circle at 68% 35%, color-mix(in srgb, var(--world-glow, #775ac2) 55%, #191435), #181331);
  overflow: visible;
}
.dock-stage.eq-5 { border-color: #ffe485aa; box-shadow: inset 0 0 12px #ffe48533; }
.dock-rocket {
  position: relative;
  display: block;
  width: 34px;
  height: 52px;
  transform: rotate(28deg);
  filter: drop-shadow(0 2px 6px #180c36aa);
}
.dock-stage.eq-9 .dock-rocket {
  filter: drop-shadow(0 2px 6px #180c36aa) drop-shadow(0 0 10px #ffd85ccc);
}
.dock-ufo, .dock-sat {
  position: absolute;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .2s ease;
}
.dock-ufo svg, .dock-sat svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.dock-ufo { left: -5px; top: -4px; width: 24px; height: 21px; }
.dock-sat { right: -6px; bottom: -2px; width: 24px; height: 19px; }
.dock-stage.eq-6 .dock-ufo { opacity: 1; visibility: visible; }
.dock-stage.eq-8 .dock-sat { opacity: 1; visibility: visible; }
.dock-info {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 3px;
}
.dock-info .rocket-rank-pill { justify-self: start; }
.dock-info small {
  color: var(--mint);
  font-size: .78rem;
  font-weight: 750;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.dock-top {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 5px 10px;
  border-radius: 10px;
  font-size: .76rem;
  white-space: nowrap;
}
@media (max-width: 600px) {
  .rocket-dock { top: 8px; gap: 8px; padding: 7px 10px; }
  .dock-stage { width: 58px; height: 52px; }
  .dock-rocket { width: 29px; height: 45px; }
  .dock-info small { font-size: .73rem; }
}
@media (prefers-reduced-motion: reduce) {
  .rocket-dock { transition: none; }
}
