:root{--bg:#071320;--panel:#0d1d31;--panel-alt:#11263c;--outline:#253a50;--line:#26394c;--white:#f1f7ff;--muted:#8ca4b8;--accent:#b8fc65;--cyan:#69c5e6;--warn:#ffbd64;--danger:#ff7c77}*{box-sizing:border-box}html,body{margin:0;min-height:100%;scroll-behavior:smooth}body{font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;color:var(--white);background:radial-gradient(circle at 14% 3%,#12304b 0,transparent 38%),radial-gradient(circle at 88% 82%,#172845 0,transparent 42%),var(--bg);font-size:15px}button{font-family:inherit;cursor:pointer}button:focus-visible,a:focus-visible{outline:3px solid #b8fc65;outline-offset:3px}a{color:#9be7ff}#stars{position:fixed;inset:0;width:100%;height:100%;z-index:-1;pointer-events:none}.app-shell{width:min(1370px,calc(100% - 50px));margin:auto}.topbar{display:flex;align-items:center;justify-content:space-between;min-height:106px;border-bottom:1px solid rgba(137,182,213,.18);gap:12px}.brand{display:flex;align-items:center;gap:15px;letter-spacing:.05em}.brand-logo{width:46px;height:46px;border:2px solid var(--accent);border-radius:50%;display:grid;place-items:center;color:var(--accent);font-size:35px;box-shadow:0 0 28px #b8fc6520}.brand b{font-size:21px;letter-spacing:.035em;line-height:1}.brand em{font-style:normal;color:var(--accent)}.brand small{display:block;font-size:9px;letter-spacing:.26em;color:var(--muted);margin-top:8px}.header-actions{display:flex;gap:11px;align-items:center}.nasa-pill{border:1px solid #42607d;background:#0e2238;border-radius:100px;padding:10px 14px;font-size:10px;letter-spacing:.16em;color:#9dcced;font-weight:750}.icon-button{border:1px solid #456079;background:#12263c;color:#d9ecff;border-radius:50%;width:40px;height:40px;font-size:19px;font-weight:900}.main-grid{display:grid;grid-template-columns:minmax(0,1.08fr) minmax(415px,.92fr);gap:24px;padding-top:27px;align-items:start}.panel{background:linear-gradient(135deg,rgba(15,32,52,.97),rgba(7,22,38,.98));border:1px solid var(--outline);border-radius:20px;box-shadow:0 26px 70px rgba(0,0,0,.16);min-width:0}.flight-panel{padding:30px 31px 23px}.eyebrow{font-weight:800;letter-spacing:.22em;font-size:10px;color:#9fc2df;display:flex;align-items:center;gap:10px}.eyebrow.green{color:var(--accent)}.live-dot{background:var(--accent);width:8px;height:8px;border-radius:50%;box-shadow:0 0 13px var(--accent)}.separator{color:#587389}.flight-header{display:flex;align-items:flex-start;justify-content:space-between;margin-top:26px;min-height:149px}.flight-header h1{font-weight:900;font-size:clamp(35px,3.8vw,57px);letter-spacing:-.056em;line-height:1.05;margin:0}.flight-header h1 span{color:var(--accent)}.flight-header p{font-size:13px;max-width:450px;color:#95abc0;line-height:1.6;margin:17px 0 0}.stage-counter{color:var(--accent);font-size:43px;font-weight:850;letter-spacing:-.06em;white-space:nowrap}.stage-counter span{font-size:16px;color:#6b859c}.space-scene{height:350px;position:relative;overflow:hidden;border:1px solid #28465d;border-radius:17px;background:radial-gradient(ellipse at 50% 20%,rgba(46,102,152,.23),transparent 54%),radial-gradient(ellipse at 80% 80%,rgba(28,57,90,.4),transparent 54%),#050f1e}.space-scene:before{content:"";position:absolute;inset:0;background-image:radial-gradient(#e9f7ff 1px,transparent 1.5px),radial-gradient(#d0f0ff .8px,transparent 1.4px);background-size:62px 62px,96px 93px;background-position:21px 9px,36px 38px;opacity:.33}.space-scene:after{content:"";position:absolute;inset:0;background:linear-gradient(to bottom,transparent 70%,rgba(2,8,17,.45) 100%);pointer-events:none}.planet{position:absolute;width:100px;height:100px;top:40%;border-radius:50%;z-index:2;box-shadow:inset -20px -13px 25px #0008,0 0 55px #ffffff16;transition:background .45s,box-shadow .45s}.planet-earth{left:calc(18% - 50px);background:radial-gradient(ellipse at 37% 33%,#8dc7d4 0 7%,transparent 8%),radial-gradient(ellipse at 61% 62%,#81b784 0 11%,transparent 12%),radial-gradient(ellipse at 28% 64%,#5fb37e 0 13%,transparent 14%),radial-gradient(ellipse at 41% 25%,#387f8b 0 20%,transparent 20%),radial-gradient(circle at 31% 28%,#4ca2ce,#1c5f9b 70%)}.planet-moon{right:calc(18% - 50px);background:radial-gradient(circle at 30% 36%,#777a82 0 6%,transparent 7%),radial-gradient(circle at 69% 63%,#8a8c94 0 11%,transparent 12%),radial-gradient(circle at 70% 28%,#c9c8c4 0 12%,transparent 13%),radial-gradient(circle at 35% 30%,#d9d9d7,#8f9299 70%)}.planet-mars{background:radial-gradient(ellipse at 30% 50%,#b75b39 0 15%,transparent 16%),radial-gradient(ellipse at 65% 34%,#8f382e 0 13%,transparent 14%),radial-gradient(circle at 35% 26%,#ecaa78,#b65c41 62%,#723b35 97%)}.planet-name{position:absolute;bottom:-29px;left:50%;transform:translateX(-50%);font-size:11px;font-weight:850;letter-spacing:.18em;color:#c4ddf5}.path-svg{position:absolute;inset:0;width:100%;height:100%;z-index:1;overflow:visible}.ship{position:absolute;width:95px;z-index:3;transform:translate(-50%,-50%);filter:drop-shadow(0 0 12px #77c4ff92);transition:left .75s cubic-bezier(.16,.75,.3,1),top .75s cubic-bezier(.16,.75,.3,1)}.ship svg{width:100%;height:auto}.ship-flame{transform-origin:18px 39px;animation:burn .17s infinite alternate;filter:drop-shadow(0 0 7px #ffc368)}@keyframes burn{to{transform:scaleX(.55);opacity:.7}}.scene-caption{position:absolute;z-index:3;bottom:18px;display:flex;width:100%;justify-content:space-between;padding:0 24px;font-weight:900;letter-spacing:.1em;font-size:11px}.scene-caption-center{font-size:9px;color:#6b91ae;align-self:center;font-weight:700}.hud-stats{display:grid;grid-template-columns:1fr 1fr;gap:22px;margin-top:30px}.stat-heading{display:flex;justify-content:space-between;align-items:center;font-size:10px;letter-spacing:.12em;font-weight:800;color:#94abc1;margin-bottom:13px}.stat-heading strong{color:#e8f4ff;font-size:15px;letter-spacing:0}.meter{height:11px;border:1px solid #2d4c5e;background:#12273a;border-radius:20px;overflow:hidden}.meter-fill{height:100%;width:0;border-radius:20px;transition:width .75s ease}.progress-fill{background:linear-gradient(90deg,#4d91b1,#97e7ff)}.fuel-fill{background:linear-gradient(90deg,#74c75a,#c9fc7c)}.fuel-fill.low{background:linear-gradient(90deg,#d8664e,#ffba6e)}.mission-record{margin-top:30px;border:1px solid #243d53;background:#0c2033;border-radius:13px;display:grid;grid-template-columns:repeat(4,1fr)}.mission-record>div{text-align:center;padding:16px 4px}.mission-record>div:not(:last-child){border-right:1px solid #2b4056}.record-label{font-size:9px;letter-spacing:.14em;color:#789ab2;display:block;font-weight:800}.mission-record strong{font-size:24px;display:block;margin-top:9px;font-variant-numeric:tabular-nums}.flight-footer{margin-top:19px;border-top:1px solid #263b50;padding:20px 1px 0;display:flex;gap:10px;font-size:12px;color:#9db1c5;line-height:1.6}.pulse-icon{color:var(--accent);font-size:17px}.quiz-panel{padding:29px 28px 31px;min-height:805px}.screen h2{font-size:37px;letter-spacing:-.055em;line-height:1.07;margin:16px 0 16px}.screen h2 span{color:var(--accent)}.subdued{color:#a5bacb;line-height:1.65;font-size:14px;margin:0 0 24px}.setup-group{margin:0 0 22px}.setup-label{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}.setup-label span{font-size:10px;font-weight:900;color:#d7e7f5;letter-spacing:.16em}.setup-label small{font-size:10px;color:#7797b0}.select-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.pick-card{min-width:0;min-height:108px;border:1px solid #35536d;background:#10263b;color:#dcefff;border-radius:12px;padding:12px 9px;text-align:left;display:flex;flex-direction:column;gap:5px;transition:transform .12s,border-color .12s,background .12s}.pick-card:hover{border-color:#8ebbcb;transform:translateY(-1px)}.pick-card.active{border-color:var(--accent);background:linear-gradient(145deg,#204232,#193d39);box-shadow:inset 0 0 0 1px #b8fc6537}.pick-card strong{font-size:12px;line-height:1.25}.pick-card small{font-size:10px;color:#abc1cf;line-height:1.3}.pick-symbol{font-size:22px;color:var(--accent);height:28px}.design-report{background:#0a2531;border:1px solid #35605a;border-radius:13px;margin-bottom:20px;padding:15px;font-size:12px;color:#b8d7d5;line-height:1.6}.design-report b{color:#d6faec}.primary-button{width:100%;border:0;background:var(--accent);color:#0e2516;border-radius:11px;padding:18px 21px;display:flex;justify-content:space-between;align-items:center;font-weight:950;font-size:13px;letter-spacing:.09em;transition:transform .12s,filter .12s}.primary-button:hover{filter:brightness(1.09);transform:translateY(-2px)}.primary-button:disabled{cursor:not-allowed;opacity:.4}.primary-button span{font-size:19px}.hidden{display:none!important}.question-header{display:flex;justify-content:space-between;align-items:flex-start;gap:8px}.question-header h2{font-size:37px;margin:12px 0 15px}.hint-badge{border:1px solid #395d69;border-radius:9px;padding:9px 11px;font-size:10px;letter-spacing:.08em;color:#c2e7e7;font-weight:850;text-align:center;margin-top:5px}.photo-frame{height:320px;overflow:hidden;position:relative;background:#121e28;border:1px solid #40546b;border-radius:14px}.photo-frame img{width:100%;height:100%;object-fit:cover;display:block}.photo-noise{position:absolute;inset:0;pointer-events:none;background:linear-gradient(to bottom,#05162390,transparent 25%,transparent 68%,#051623ba);z-index:1}.photo-topline,.photo-bottomline{position:absolute;z-index:2;left:16px;right:16px;display:flex;justify-content:space-between;align-items:center;color:#e8f6ff;font-size:9px;letter-spacing:.13em;font-weight:900;text-shadow:0 1px 4px #001}.photo-topline{top:15px}.photo-bottomline{bottom:14px}.answer-prompt{color:#a0bed0;margin:22px 0 14px;font-size:13px;line-height:1.55}.answer-buttons{display:grid;grid-template-columns:1fr 1fr;gap:12px}.answer-option{background:#10283e;border:1px solid #46617a;color:#e9f5ff;border-radius:11px;padding:17px 12px;font-size:14px;letter-spacing:.08em;font-weight:900;transition:transform .1s,border-color .1s}.answer-option:hover:not(:disabled){border-color:var(--accent);transform:translateY(-2px)}.answer-option:disabled{cursor:default;opacity:.65}.answer-option.success{background:#204a33;border-color:var(--accent);color:#d9ffca;opacity:1}.answer-option.failure{background:#4b2932;border-color:#e47f7a;color:#ffe0df;opacity:1}.result-box{border:1px solid #405b6d;background:#0c2437;border-radius:13px;margin-top:18px;padding:16px 17px}.result-box p{color:#afc9d8;line-height:1.5;font-size:13px;margin:10px 0}.result-headline{font-weight:900;letter-spacing:.02em;font-size:15px}.result-box a{display:block;margin-bottom:17px;font-size:12px}.result-box .primary-button{padding:13px 16px}.tiny-info{font-size:9px;letter-spacing:.12em;line-height:1.6;color:#7293ab;text-align:center;margin-top:25px}.photo-fallback{position:absolute;inset:0;background:#171f33;z-index:1;overflow:hidden}.terrain-placeholder{position:absolute;inset:0;background:linear-gradient(170deg,#7d8493 0%,#424956 38%,#252d43 54%,#a3a09a 73%,#45485a 100%);filter:saturate(.5)}.terrain-placeholder:before{content:"";position:absolute;inset:0;background:repeating-radial-gradient(ellipse at 25% 18%,#c8bba0 0 4px,transparent 4px 35px),repeating-linear-gradient(27deg,#ffffff22 0 4px,transparent 6px 24px);transform:rotate(16deg) scale(1.3);opacity:.5}.fallback-text{position:absolute;inset:0;display:grid;align-content:center;justify-items:center;text-align:center;color:#fff;font-size:15px;font-weight:900;letter-spacing:.13em;text-shadow:0 2px 5px #000;padding:25px}.fallback-text small{font-size:11px;margin-top:13px;letter-spacing:.02em;font-weight:500}.fallback-clue{background:#153043;border:1px solid #486e86;margin-top:12px;border-radius:9px;color:#dceeff;padding:12px;font-size:12px;line-height:1.6}.site-footer{margin:22px 0 34px;display:flex;gap:15px;justify-content:space-between;font-size:10px;letter-spacing:.04em;color:#8499af}.site-footer a{color:#a8cce2}.dot-separator{margin:0 10px;color:#49667c}.overlay{position:fixed;inset:0;z-index:20;background:#030813cf;backdrop-filter:blur(8px);display:grid;place-items:center;padding:20px}.dialog{background:radial-gradient(circle at top,#1e3c52,#0f1d32 65%);border:1px solid #466079;box-shadow:0 25px 95px #000c;border-radius:22px;width:min(530px,100%);padding:34px;text-align:center}.dialog .eyebrow{justify-content:center}.dialog-icon{font-size:62px;margin-bottom:15px}.dialog h2{font-size:36px;letter-spacing:-.055em;margin:17px 0 12px}.dialog p{font-size:14px;color:#a5bed3;line-height:1.7}.reward-box{margin:22px 0;padding:17px;background:#193c39;color:#d7ffc5;border:1px solid #59935a;border-radius:12px;font-size:13px;line-height:1.55}.dialog .primary-button{margin-top:19px}.help-dialog{text-align:left}.help-dialog .eyebrow{justify-content:start}.help-dialog h2{font-size:31px}.help-dialog .primary-button{margin-top:20px}@media(max-width:1100px){.app-shell{width:min(960px,calc(100% - 30px))}.main-grid{grid-template-columns:1fr}.quiz-panel{min-height:0}.flight-panel{padding:26px}.flight-header{min-height:auto;padding-bottom:15px}.space-scene{height:350px}.site-footer{flex-wrap:wrap}.question-screen .photo-frame{height:360px}}@media(max-width:660px){.topbar{min-height:83px}.brand{gap:10px}.brand b{font-size:15px}.brand small{font-size:8px;letter-spacing:.12em}.brand-logo{width:37px;height:37px;font-size:28px}.nasa-pill{display:none}.main-grid{padding-top:14px;gap:13px}.flight-panel,.quiz-panel{padding:18px;border-radius:14px}.flight-header h1{font-size:34px}.flight-header p{font-size:12px}.stage-counter{font-size:31px}.space-scene{height:230px}.planet{width:62px;height:62px;top:42%}.planet-earth{left:calc(18% - 31px)}.planet-moon{right:calc(18% - 31px)}.ship{width:65px}.planet-name{font-size:9px;bottom:-23px}.scene-caption{padding:0 12px;bottom:13px;font-size:9px}.scene-caption-center{display:none}.hud-stats{gap:12px;margin-top:21px}.stat-heading{font-size:8px}.stat-heading strong{font-size:11px}.mission-record{margin-top:21px}.mission-record strong{font-size:20px}.record-label{font-size:7px}.flight-footer{font-size:11px}.screen h2{font-size:31px}.select-cards{gap:6px}.pick-card{padding:10px 7px;min-height:105px}.pick-card strong{font-size:11px}.pick-card small{font-size:9px}.photo-frame{height:244px!important}.site-footer{font-size:9px}.dialog{padding:24px}.dialog h2{font-size:28px}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.01ms!important;transition-duration:.01ms!important}}
/* Keep start/destination positions fixed regardless of the planet displayed. */
#planetStart{left:calc(18% - 50px);right:auto}#planetEnd{right:calc(18% - 50px);left:auto}
@media(max-width:660px){#planetStart{left:calc(18% - 31px)}#planetEnd{right:calc(18% - 31px)}}

.secondary-button{margin-top:11px;width:100%;padding:13px;color:#d5f7ee;background:transparent;border:1px solid #4f8369;border-radius:10px;font-size:12px;font-weight:900;letter-spacing:.08em}.secondary-button:hover{background:#255445}.source-note{font-size:11px;color:#8eabc2;line-height:1.5;margin:-9px 0 17px}.source-note a{color:#b6e5cc}

/* PWA/mobile enhancements: compact flight telemetry remains visible while playing. */
html{overscroll-behavior-y:contain}
button,.pick-card,.answer-option{-webkit-tap-highlight-color:transparent;touch-action:manipulation}
body{padding-left:env(safe-area-inset-left,0px);padding-right:env(safe-area-inset-right,0px)}
@media(max-width:660px){
  .app-shell{width:calc(100% - 20px)}
  .topbar{min-height:67px}
  .flight-panel,.quiz-panel{padding:13px}
  .quiz-panel{min-height:0}
  .flight-header{margin-top:9px;min-height:0;padding-bottom:8px}
  .flight-header h1{font-size:21px;line-height:1.06;margin:0}
  .flight-header p{display:none}
  .stage-counter{font-size:20px;line-height:1}
  .space-scene{height:136px}
  .planet{width:44px;height:44px;top:40%}
  .planet-earth,#planetStart.planet-earth{left:calc(18% - 22px)}
  .planet-moon,#planetEnd.planet-moon,.planet-mars,#planetEnd.planet-mars{right:calc(18% - 22px)}
  .planet-name{font-size:8px;bottom:-18px}
  .ship{width:53px}
  .scene-caption{font-size:8px;bottom:5px}
  .hud-stats{margin-top:12px;gap:8px}
  .stat-heading{font-size:8px}
  .mission-record{margin-top:11px}
  .mission-record>div{padding:7px 3px}
  .record-label{font-size:7px;letter-spacing:.03em}
  .mission-record strong{font-size:15px;margin-top:4px}
  .flight-footer{display:none}
  .photo-frame{height:220px!important}
  .question-header{margin-bottom:8px}
  .question-header h2{font-size:27px;margin:8px 0}
  .screen h2{font-size:27px}
  .answer-option{min-height:49px;padding:12px 10px}
  .select-cards{gap:6px}
  .pick-card{min-height:104px}
  .primary-button{min-height:51px}
  .site-footer{padding-bottom:calc(24px + env(safe-area-inset-bottom,0px))}
  .overlay{padding:calc(12px + env(safe-area-inset-top,0px)) 12px calc(12px + env(safe-area-inset-bottom,0px));overflow-y:auto}
  .dialog{max-height:calc(100vh - 24px);overflow-y:auto}
}
@media(max-width:360px){
  .brand small{font-size:7px}
  .flight-header h1{font-size:18px}
  .space-scene{height:118px}
  .photo-frame{height:186px!important}
  .pick-card{padding:9px 5px}
  .pick-card strong{font-size:10px}
}

/* Stage-specific quiz controls: three answers on Moon ↔ Mars flights only. */
.answer-buttons.three-choices{grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}
.hint-badge.three-worlds{letter-spacing:0;line-height:1.45}
@media(max-width:660px){
  .answer-buttons.three-choices{gap:6px}
  .answer-buttons.three-choices .answer-option{min-width:0;padding:12px 4px;font-size:12px;letter-spacing:.015em}
  .hint-badge.three-worlds{font-size:9px;max-width:126px}
}
@media(max-width:360px){
  .answer-buttons.three-choices .answer-option{font-size:11px;padding:12px 2px}
}

/* v1.4 — progression-based difficulty unlocking. */
.pick-card.locked{background:#0b1a2b;border-color:#2b3b4b;color:#8a9dae;opacity:.7;cursor:not-allowed}
.pick-card.locked:hover{transform:none;border-color:#2b3b4b}
.pick-card.locked .pick-symbol{filter:grayscale(1);opacity:.8}
.pick-card.locked small{color:#9cadbb}
.difficulty-hint{font-size:12px;line-height:1.5;color:#a9c8d8;margin:11px 1px 0}

/* v1.11 — four difficulty cards and readable exponential scores */
.select-cards{grid-template-columns:repeat(4,minmax(0,1fr))}
.pick-card{padding:10px 7px;min-height:113px}
.mission-record>div:first-child strong{font-size:clamp(13px,1.55vw,21px);overflow-wrap:anywhere}
@media (max-width:620px){.select-cards{grid-template-columns:repeat(2,minmax(0,1fr))}.pick-card{min-height:90px;padding:12px}}
.score-hint{color:#b8fc65;font-size:11px;font-weight:800;letter-spacing:.045em;line-height:1.5;margin:-7px 0 14px}


/* v1.14 — CINEMATIC VISUAL UPGRADE. Original procedural planet artwork.
   Decoration only: no changes to NASA terrain images, answer choices or game rules. */
body{
  background:
    radial-gradient(ellipse at 10% 3%, rgba(37,90,146,.32), transparent 42%),
    radial-gradient(ellipse at 90% 72%, rgba(67,37,114,.25), transparent 47%),
    radial-gradient(ellipse at 45% 95%, rgba(10,71,102,.25), transparent 50%), #050d19;
}
body::before{
  content:"";position:fixed;inset:-20%;z-index:0;pointer-events:none;
  background:radial-gradient(ellipse at 18% 26%,#3b6cd51c,transparent 37%),radial-gradient(ellipse at 84% 63%,#763e971a,transparent 40%);
  filter:blur(24px);animation:ambientDrift 32s ease-in-out infinite alternate;
}
@keyframes ambientDrift{from{transform:translate3d(-3%,0,0) rotate(-4deg)}to{transform:translate3d(3%,2%,0) rotate(4deg)}}
.app-shell{position:relative;z-index:1}
#stars{z-index:0;opacity:.6}
.topbar{position:relative}
.brand-logo{background:radial-gradient(circle at 50% 50%,#aefa752c,transparent 68%);animation:logoHalo 3.8s ease-in-out infinite alternate}
@keyframes logoHalo{to{box-shadow:0 0 34px #b8fc6540,inset 0 0 12px #b8fc6525}}
.panel{background:linear-gradient(145deg,rgba(16,34,55,.95),rgba(6,20,36,.96));border-color:#304b66;box-shadow:0 20px 80px #0005,inset 0 1px #ecf9ff0a}
.flight-panel{position:relative}
.space-scene{
  isolation:isolate;
  border-color:#396785;
  background:radial-gradient(ellipse at 46% 38%,#18415e 0%,#091f39 37%,#050f21 72%,#040912 100%);
  box-shadow:inset 0 0 80px #02060ccb,0 12px 36px #0007,0 0 0 1px #8fcbf00a;
}
.space-scene::before{z-index:0;opacity:.16;animation:sceneStarShift 80s linear infinite}
.space-scene::after{z-index:4;background:linear-gradient(to bottom,#02081488,transparent 22%,transparent 72%,#03091bab);}
.scene-nebula{position:absolute;inset:-30%;z-index:0;pointer-events:none;
  background:radial-gradient(ellipse at 30% 42%,#4374ad47 0%,transparent 38%),radial-gradient(ellipse at 82% 66%,#8156a028 0%,transparent 40%),radial-gradient(ellipse at 50% 15%,#1b6f9e33,transparent 44%);
  filter:blur(19px);opacity:.78;animation:nebulaBreath 24s ease-in-out infinite alternate;
}
.scene-stars{position:absolute;inset:-20%;z-index:1;pointer-events:none;background-repeat:repeat;will-change:transform}
.scene-stars-far{
  background-image:radial-gradient(circle,#b9d9fb 1px,transparent 1.8px),radial-gradient(circle,#fff .65px,transparent 1.3px),radial-gradient(circle,#78d5ff 1px,transparent 2px);
  background-size:83px 87px,137px 109px,173px 157px;
  background-position:10px 9px,58px 64px,115px 21px;
  opacity:.4;animation:starCruise 95s linear infinite;
}
.scene-stars-near{
  background-image:radial-gradient(circle,#f2fbff 1px,transparent 2px),radial-gradient(circle,#c0e8ff 1.4px,transparent 2.8px);
  background-size:218px 193px,322px 279px;background-position:30px 53px,173px 139px;
  opacity:.65;animation:starCruise 44s linear infinite reverse,starTwinkle 4.1s ease-in-out infinite alternate;
}
@keyframes sceneStarShift{to{background-position:390px 85px,-150px 120px}}
@keyframes starCruise{to{transform:translate3d(-8%,4%,0)}}
@keyframes starTwinkle{from{opacity:.28}to{opacity:.66}}
@keyframes nebulaBreath{to{transform:translate3d(7%,2%,0) scale(1.12);opacity:.98}}
.scene-meteor{position:absolute;z-index:1;pointer-events:none;left:110%;top:12%;width:116px;height:1px;
  transform:rotate(-31deg);background:linear-gradient(90deg,transparent,#8cdfff55,#f3ffff);
  filter:drop-shadow(0 0 6px #a2d6ff);opacity:0;animation:meteorPass 17s linear infinite 3s;
}
@keyframes meteorPass{0%,72%{left:110%;top:12%;opacity:0}73%{opacity:.68}82%{left:-22%;top:67%;opacity:0}100%{opacity:0}}
.path-svg{z-index:1}
.flight-route-halo{stroke:#4bc9ff;stroke-width:10;stroke-opacity:.11;filter:blur(6px)}
.flight-route{stroke:#a2ddff;stroke-width:2;stroke-opacity:.58;animation:routeFlow 12s linear infinite}
@keyframes routeFlow{to{stroke-dashoffset:-228}}
.planet{background:transparent!important;box-shadow:none!important;overflow:visible;isolation:isolate}
.planet-earth{--planet-art:url('assets/planet-earth.webp');--planet-glow:#5acbff55;--planet-rim:#91dcff77}
.planet-moon{--planet-art:url('assets/planet-moon.webp');--planet-glow:#c4d4ff3d;--planet-rim:#e4e8ff6a}
.planet-mars{--planet-art:url('assets/planet-mars.webp');--planet-glow:#ff81445a;--planet-rim:#ffae8a75}
.planet::before{content:"";position:absolute;inset:-9%;border-radius:50%;z-index:0;
  background-image:var(--planet-art);background-size:100% 100%;background-position:center;
  filter:drop-shadow(0 0 17px var(--planet-glow));
  animation:planetDrift 7s ease-in-out infinite alternate;
}
.planet::after{content:"";position:absolute;inset:-21%;border:1px solid var(--planet-rim);border-radius:50%;z-index:-1;
  opacity:.52;box-shadow:0 0 15px var(--planet-glow),inset 0 0 12px var(--planet-glow);
  animation:planetBeacon 4.2s ease-in-out infinite;
}
.planet-name{z-index:2;white-space:nowrap;text-shadow:0 0 10px #0d183a,0 2px 7px #000;font-size:11px;letter-spacing:.21em}
@keyframes planetDrift{to{transform:translateY(-5px) rotate(3deg) scale(1.025)}}
@keyframes planetBeacon{50%{transform:scale(1.10);opacity:.20}}
.ship{filter:drop-shadow(0 0 10px #4dc3ffbf) drop-shadow(0 3px 5px #0009);z-index:3;
  transition:left .84s cubic-bezier(.16,.8,.25,1),top .84s cubic-bezier(.16,.8,.25,1);
}
.ship::before{content:"";position:absolute;right:83%;top:43%;height:23px;width:96px;transform:translateY(-50%);z-index:-1;pointer-events:none;
  background:linear-gradient(90deg,transparent 0%,#3b7dff05 15%,#4ac3ff55 58%,#a0eeffb8 95%);
  clip-path:polygon(0 39%,100% 0,100% 100%,0 61%);filter:blur(7px);
  animation:engineWake .68s ease-in-out infinite alternate;
}
.ship svg{filter:drop-shadow(0 0 3px #b0ebff77);animation:shipFloat 3s ease-in-out infinite alternate}
.ship-flame{transform-origin:22px 39px;animation:plasmaPulse .22s ease-in-out infinite alternate;filter:drop-shadow(0 0 9px #4ab6ff)}
.plasma-halo{transform-origin:22px 39px;animation:plasmaPulse .42s ease-in-out infinite alternate-reverse}
.plasma-core{transform-origin:22px 39px;animation:plasmaPulse .18s ease-in-out infinite alternate}
@keyframes shipFloat{to{transform:translateY(-2px) rotate(.6deg)}}
@keyframes plasmaPulse{to{transform:scaleX(.55) scaleY(1.17);opacity:.75}}
@keyframes engineWake{to{opacity:.48;transform:translateY(-50%) scaleX(.78)}}
.scene-flash{position:absolute;inset:0;z-index:4;pointer-events:none;opacity:0}
.scene-score-pop{position:absolute;z-index:6;pointer-events:none;opacity:0;
  font-size:clamp(16px,2vw,27px);font-weight:950;letter-spacing:.03em;white-space:nowrap;
  color:#dcff9f;text-shadow:0 0 14px #b8fc65b0,0 2px 7px #000;
  transform:translate(-50%,-50%);
}
.space-scene.fx-correct .scene-flash{background:radial-gradient(ellipse at center,#8bd9ff44,transparent 72%);animation:fxFlash .9s ease-out both}
.space-scene.fx-wrong .scene-flash{background:radial-gradient(ellipse at center,#f3484e55,transparent 75%);animation:fxFlash .86s ease-out both}
.space-scene.fx-launch .scene-flash{background:radial-gradient(ellipse at 16% 52%,#7ae2ff55,transparent 70%);animation:fxFlash .8s ease-out both}
.space-scene.fx-landing .scene-flash{background:radial-gradient(ellipse at 82% 52%,#9effb255,transparent 68%);animation:fxLanding 1.2s ease-out both}
.space-scene.fx-correct .scene-score-pop{animation:scoreRise 1.2s cubic-bezier(.2,.6,.3,1) both}
.space-scene.fx-correct .ship::before{width:155px;filter:blur(8px);opacity:1}
.space-scene.fx-correct .ship svg{animation:shipBoost .44s ease-in-out 1}
.space-scene.fx-wrong .ship svg{animation:shipShake .55s ease-in-out 1}
.space-scene.fx-wrong{border-color:#ec6368;box-shadow:inset 0 0 45px #d5374e3c,0 12px 36px #0007}
.space-scene.fx-landing #planetEnd::after{opacity:1;animation:planetArrival 1.1s ease-out both}
.space-scene.fx-landing #planetEnd::before{animation:planetTouchdown 1.1s ease-in-out both}
@keyframes planetArrival{0%{transform:scale(.82);opacity:.15}55%{transform:scale(1.26);opacity:.95}100%{transform:scale(1);opacity:.52}}
@keyframes planetTouchdown{50%{transform:scale(1.13)}}
@keyframes fxFlash{0%{opacity:0}23%{opacity:1}100%{opacity:0}}
@keyframes fxLanding{0%{opacity:0}35%{opacity:1}100%{opacity:0}}
@keyframes scoreRise{0%{opacity:0;transform:translate(-50%,0) scale(.72)}18%{opacity:1;transform:translate(-50%,-38%) scale(1.14)}75%{opacity:1}100%{opacity:0;transform:translate(-50%,-135%) scale(.96)}}
@keyframes shipBoost{0%,100%{transform:scale(1)}40%{transform:scale(1.17) translateX(3px)}}
@keyframes shipShake{0%,100%{transform:translateX(0) rotate(0)}18%{transform:translate(-5px,2px) rotate(-4deg)}38%{transform:translate(5px,-2px) rotate(3deg)}60%{transform:translate(-3px,1px) rotate(-2deg)}}
.meter{position:relative;box-shadow:inset 0 1px 4px #01060d}
.meter-fill{position:relative;box-shadow:0 0 9px currentColor;transition:width .84s cubic-bezier(.16,.8,.25,1)}
.meter-fill::after{content:"";position:absolute;inset:0;background:linear-gradient(90deg,transparent 0%,#ffffff28 40%,#ffffff5b 50%,transparent 66%);background-size:180px 100%;animation:meterShine 2.5s linear infinite}
@keyframes meterShine{to{background-position:360px 0}}
.mission-record{background:linear-gradient(135deg,#0e2941,#091c2d);border-color:#31516a;box-shadow:inset 0 1px #ffffff0b}
.mission-record strong{color:#e7f8ff;text-shadow:0 0 15px #7bc0ff12}
.quiz-panel{position:relative}
.primary-button{position:relative;overflow:hidden;box-shadow:0 7px 23px #9acb5536;transition:transform .18s ease,box-shadow .18s ease,filter .18s ease}
.primary-button:hover{transform:translateY(-2px);box-shadow:0 10px 33px #9acb554b;filter:brightness(1.06)}
.primary-button:active{transform:translateY(0) scale(.99)}
.pick-card{transition:transform .22s ease,border-color .22s ease,box-shadow .22s ease}
.pick-card:hover:not(:disabled){transform:translateY(-3px);box-shadow:0 8px 22px #0005}
.answer-option{position:relative;overflow:hidden;transition:transform .18s ease,border-color .18s ease,box-shadow .18s ease,background .18s ease}
.answer-option:hover:not(:disabled){box-shadow:0 0 20px #5ad4ff1c, inset 0 0 12px #5ad4ff0d}
.answer-option.success{box-shadow:inset 0 0 21px #9eff5c17,0 0 17px #92ee5320;animation:answerConfirm .46s ease-out}
.answer-option.failure{box-shadow:inset 0 0 22px #ff5e571d;animation:answerReject .35s ease-out}
@keyframes answerConfirm{35%{transform:scale(1.045)}}
@keyframes answerReject{25%,75%{transform:translateX(-3px)}50%{transform:translateX(3px)}}
.photo-frame{border-color:#4b7794;box-shadow:0 12px 30px #0005,inset 0 0 40px #0007}
.photo-noise{background:linear-gradient(to bottom,#0613269a,transparent 17%,transparent 75%,#061326be)}
.photo-reticle{position:absolute;inset:9px;pointer-events:none;z-index:2;opacity:.7;
  background:linear-gradient(#9be6ff,#9be6ff) left top / 17px 2px no-repeat,
             linear-gradient(#9be6ff,#9be6ff) left top / 2px 17px no-repeat,
             linear-gradient(#9be6ff,#9be6ff) right top / 17px 2px no-repeat,
             linear-gradient(#9be6ff,#9be6ff) right top / 2px 17px no-repeat,
             linear-gradient(#9be6ff,#9be6ff) left bottom / 17px 2px no-repeat,
             linear-gradient(#9be6ff,#9be6ff) left bottom / 2px 17px no-repeat,
             linear-gradient(#9be6ff,#9be6ff) right bottom / 17px 2px no-repeat,
             linear-gradient(#9be6ff,#9be6ff) right bottom / 2px 17px no-repeat;
}
.photo-frame img{animation:photoLink .55s ease-out both}
@keyframes photoLink{from{opacity:.45}to{opacity:1}}
.overlay{background:#01060cdb;backdrop-filter:blur(11px)}
.dialog{position:relative;isolation:isolate;overflow:hidden;background:radial-gradient(ellipse at 50% -20%,#2e5672,#102c45 45%,#0a1c30 100%);
  border-color:#547a97;box-shadow:0 30px 100px #000d,0 0 65px #3d91bb18;
  animation:dialogEntrance .45s cubic-bezier(.2,.8,.25,1) both}
.dialog::before{content:"";position:absolute;inset:-30%;z-index:-1;pointer-events:none;
  background:conic-gradient(from 0deg,transparent 0 55deg,#b8fc6512 70deg,transparent 85deg,transparent 165deg,#5ce1ff12 180deg,transparent 200deg,transparent 360deg);
  animation:celebrateSpin 16s linear infinite}
.dialog-icon{position:relative;z-index:1;filter:drop-shadow(0 0 22px #ffda775f);animation:trophyPop .8s cubic-bezier(.2,.8,.2,1) both}
.dialog-sparks{position:absolute;inset:0;z-index:0;overflow:hidden;pointer-events:none;display:none}
.is-celebration .dialog-sparks{display:block}
.dialog-sparks i{position:absolute;top:28%;left:50%;width:5px;height:14px;border-radius:3px;background:#b8fc65;box-shadow:0 0 8px currentColor;
  animation:particleBurst 1.35s ease-out both}
.dialog-sparks i:nth-child(2){--x:-145px;--y:-65px;background:#63e7fa;animation-delay:.12s}
.dialog-sparks i:nth-child(3){--x:138px;--y:-44px;background:#ffd888;animation-delay:.04s}
.dialog-sparks i:nth-child(4){--x:-112px;--y:72px;background:#e8b2ff;animation-delay:.16s}
.dialog-sparks i:nth-child(5){--x:118px;--y:89px;background:#94f8d3;animation-delay:.08s}
.dialog-sparks i:nth-child(6){--x:36px;--y:-130px;background:#82d4ff;animation-delay:.18s}
.dialog-sparks i:nth-child(7){--x:-58px;--y:-114px;background:#f7ee8e;animation-delay:.03s}
.dialog-sparks i:nth-child(8){--x:153px;--y:27px;background:#ffd0af;animation-delay:.1s}
.dialog-sparks i:nth-child(1){--x:-170px;--y:4px}
@keyframes particleBurst{0%{opacity:0;transform:translate(0,0) scale(.3) rotate(0)}20%{opacity:1}100%{opacity:0;transform:translate(var(--x),var(--y)) rotate(360deg)}}
@keyframes celebrateSpin{to{transform:rotate(360deg)}}
@keyframes trophyPop{0%{transform:scale(.6) translateY(10px);opacity:0}65%{transform:scale(1.14)}100%{transform:scale(1);opacity:1}}
@keyframes dialogEntrance{from{opacity:0;transform:translateY(25px) scale(.95)}to{opacity:1;transform:translateY(0) scale(1)}}
.is-failure .dialog{border-color:#c85f65;box-shadow:0 30px 100px #000d,0 0 50px #ef4b4c25}
.is-failure .dialog::before{background:radial-gradient(circle at 50% 0%,#cf4f4f30,transparent 60%);animation:none}
/* Insane has a deliberately distinct high-energy HUD; correct answers remain green. */
body.mode-insane .flight-panel{border-color:#824958;box-shadow:0 24px 72px #b02d3519}
body.mode-insane .space-scene{border-color:#a94f5d;background:radial-gradient(ellipse at 53% 40%,#47233b 0%,#2b1d35 36%,#0e1023 83%);box-shadow:inset 0 0 58px #f2553f23,0 15px 36px #0008}
body.mode-insane .scene-nebula{background:radial-gradient(ellipse at 30% 42%,#fb5c6546,transparent 40%),radial-gradient(ellipse at 82% 66%,#ed82343f,transparent 42%)}
body.mode-insane .flight-route{stroke:#ffaa8b;stroke-opacity:.76;animation-duration:5s}
body.mode-insane .flight-route-halo{stroke:#ff694e;stroke-opacity:.2}
body.mode-insane .scene-stars-far{animation-duration:45s}
body.mode-insane .scene-stars-near{animation-duration:19s,2.2s}
body.mode-insane .stage-counter,body.mode-insane .flight-header h1 span{color:#ffad82}
body.mode-insane .live-dot{background:#ff785b;box-shadow:0 0 15px #ff6d56}
body.mode-insane .progress-fill{background:linear-gradient(90deg,#f55d6a,#ffb873)}
body.mode-insane .score-hint{color:#ffc78e}
body.mode-insane .ship::before{filter:blur(8px) hue-rotate(-30deg)}
@media(max-width:660px){
  .scene-nebula{filter:blur(12px)}.planet::after{inset:-24%}
  .ship::before{width:57px;height:14px;filter:blur(4px)}
  .scene-score-pop{font-size:15px}.photo-reticle{inset:6px;opacity:.6}
  .dialog-sparks i{height:10px;width:4px}
  .space-scene{box-shadow:inset 0 0 34px #02060ccb,0 8px 25px #0007}
}
@media(prefers-reduced-motion:reduce){
  .scene-stars,.scene-nebula,.scene-meteor,.ship svg,.ship::before,.planet::before,.planet::after,.flight-route,.dialog::before,.dialog-icon,.dialog-sparks i,body::before,.meter-fill::after{animation:none!important}
  .ship,.meter-fill,.primary-button,.answer-option{transition:none!important}
  .space-scene.fx-correct .scene-flash,.space-scene.fx-wrong .scene-flash,.space-scene.fx-landing .scene-flash,.space-scene.fx-launch .scene-flash{animation:none!important;opacity:0}
}

/* v1.14.1: persistent SI-visual disclosure on the decorative spacecraft/planet scene.
   Keep this independent of quiz images: those are genuine NASA observations. */
.artwork-disclosure{
  position:absolute;top:8px;left:8px;z-index:7;pointer-events:none;
  max-width:calc(100% - 16px);padding:5px 8px;border-radius:6px;
  border:1px solid rgba(118,175,215,.45);background:rgba(4,15,29,.87);
  color:#d6e9fb;font-size:9px;line-height:1.35;font-weight:800;
  letter-spacing:.055em;text-align:left;
  box-shadow:0 2px 10px rgba(0,0,0,.2);
}
@media(max-width:660px){
  .artwork-disclosure{top:5px;left:5px;max-width:calc(100% - 10px);font-size:7px;padding:4px 5px;letter-spacing:0}
}
