/* The flight pages share a painted lunar palette and the same control sprites. */
:root {
  --paper:#f2eee1;
  --ink:#1c3240;
  --navy:#142e3d;
  --milk:#fffaf0;
  --line:#d8d0bd;
  --accent:#ffd18a;
}
body { background:var(--paper) }
.play-panel button:focus-visible,.result-card button:focus-visible { outline-color:#ffce79 }
.graphic {
  display:inline-block; width:var(--graphic-size,24px); height:var(--graphic-size,24px);
  flex:none; vertical-align:middle; background:url('./assets/mission-controls.webp') no-repeat;
  background-size:300% 200%; background-position:0 0;
}
.graphic-sound { background-position:50% 0 }
.graphic-arrow { background-position:100% 0 }
.graphic-star { background-position:0 100% }
.graphic-check { background-position:50% 100% }
.star-trio>span:not(.lit) .graphic { filter:grayscale(1); opacity:.45 }
.star-trio .lit .graphic { filter:drop-shadow(0 1px 0 #95612c6b) }
.launch-plume {
  position:absolute; pointer-events:none; width:34%; height:52%; right:10%; bottom:-20%; 
  background:radial-gradient(ellipse,#ffe4a28f,transparent 58%); opacity:0;
}
.ignition .launch-plume { animation:ignition .9s ease-out both }
.ignition { animation:lift-in .6s ease-out both }
@keyframes ignition { 35%{opacity:.8; transform:translateY(-18px) scale(1.28)} to{opacity:0;transform:translateY(6px) scale(1.6)} }
@keyframes lift-in { 20%{transform:translateY(2px)} 50%{transform:translateY(-3px)} }
.primary { background:#ffd18a; color:#292f30; box-shadow:0 4px 0 #b97b45 }
.primary:hover { background:#ffe0a6 }
.primary:active { box-shadow:0 2px 0 #b97b45 }
.primary.unavailable { background:#eddfc1; color:#554d3c; box-shadow:0 3px 0 #a38a64 }
.primary .graphic { transition:transform .17s }
.primary:hover .graphic-arrow,.primary:hover .graphic-rocket { transform:translate(2px,-2px) scale(1.12) }
.world-art {
  position:relative; display:block; overflow:hidden; width:100%; height:clamp(115px,11.5vw,155px);
  background:#132637;
}
.world-art i {
  position:absolute; width:min(100%,241px); aspect-ratio:3/2; top:50%; left:50%;
  transform:translate(-50%,-50%); background:url('./assets/mission-worlds.webp') no-repeat; background-size:200% 200%;
  transition:transform .35s cubic-bezier(.2,.8,.24,1);
}
.world-twins i { background-position:100% 0 }
.world-rocket i { background-position:0 100% }
.world-station i { background-position:100% 100% }
.play-panel {
  isolation:isolate; position:relative; overflow:hidden; border:1px solid #466275; color:#f9f0d7;
  background:radial-gradient(ellipse at 55% 16%,#284555,#172e3e 66%);
  box-shadow:0 5px 0 #b8b8a6; min-height:484px;
}
.play-panel::before {
  content:""; position:absolute; pointer-events:none; inset:8px; border:1px solid #9aaeb540;
  border-radius:18px; background-image:radial-gradient(#f6d696 1px,transparent 1.5px),radial-gradient(#a6d8d0 1px,transparent 1.4px);
  background-size:139px 151px,181px 113px; background-position:9px 11px,42px 27px; opacity:.25; z-index:-2;
}
.panel-world {
  position:absolute; z-index:-1; top:22%; right:-2%; width:clamp(120px,26%,320px); opacity:.33;
  pointer-events:none; -webkit-mask-image:radial-gradient(ellipse,#000 22%,transparent 68%);
  mask-image:radial-gradient(ellipse,#000 22%,transparent 68%);
}
.panel-world .world-art { height:215px; background:transparent }
.panel-world .world-art i { width:100%; animation:world-drift 7s ease-in-out infinite alternate }
@keyframes world-drift { to{transform:translate(-50%,-54%) rotate(-5deg)} }
.instruction {
  background:#f6ead0; border:1px solid #e1cfa8; border-radius:9px;
  color:#243945; padding:6px 12px; min-height:39px;
}
.stimulus-text { color:#fff1d5; text-shadow:0 3px #132833 }
.hear {
  background:#fff3d6; border:3px solid #627778; box-shadow:0 3px 0 #0d212d,0 0 0 1px #d6b583;
  transition:transform .18s,background .18s;
}
.hear .graphic { --graphic-size:44px !important }
.hear:hover { background:#ffdda0 }
.hear:active { transform:scale(.94) }
.hear.playing::after { border-color:#f4c479 }
.hear.playing .graphic { animation:transmit .56s ease-in-out infinite alternate }
@keyframes transmit { to{scale:1.14} }
.quiz-choice {
  color:#203544; border-color:#dac9a8; background:#fff5e0; box-shadow:0 4px 0 #a38665;
  min-width:115px; background-clip:padding-box; transition:background .18s,transform .15s,border .15s;
}
.orbits .quiz-choice,.demo-options .quiz-choice { position:relative; border-radius:32px 32px 18px 18px }
.orbits .quiz-choice:first-child,.orbits .quiz-choice:nth-child(2) { background-image:none }
.letter-demo .quiz-choice b { font-weight:800; color:#a2462c }
.letter-demo .quiz-choice:nth-child(2) b { color:#215e57 }
.demo-options .quiz-choice .pinyin { line-height:1.08 }
.demo-options .quiz-choice small.pinyin { font-size:20px }
.quiz-choice.yes,.quiz-choice.speaking { background:#d7ecd8; border-color:#8ac6a2; box-shadow:0 4px 0 #699f87 }
.quiz-choice.no { animation:wrong-turn .24s ease-out both }
@keyframes wrong-turn { 25%{translate:-5px 0} 68%{translate:4px 0} }
.slot:not(.filled) { color:#e7d9bf; background:#223947; border-color:#8da2a4 }
.slot:not(.filled) .slot-empty { opacity:.8 }
.piece.selected,.slot.drop-target { outline-color:#ffc675 }
.slot-group+.slot-group { border-color:#a3ada766 }
.touch-hint { color:#d0dfda }
.first-action .touch-hint svg { animation:tap-cue .6s ease-out .45s 2 }
@keyframes tap-cue { 48%{transform:translateY(-4px) rotate(-9deg);color:#ffcf83} }
.feedback.good { color:#d1efd8 }
.feedback.again { color:#ffe0ab }
.mouth-demo { color:#ead9b9 }
.station-core { background:#f9e7c9; color:#534163 }
.station-build i { background:#354453; border-color:#9885a5 }
.station-build .done,.station-build .new { background:#d4b7df; border-color:#d4b7df }
.award-sparks { position:absolute; z-index:-1; inset:0; pointer-events:none }
.award-sparks .graphic {
  position:absolute; left:50%; top:47%; opacity:0;
  transform:translate(-50%,-50%); animation:award .72s cubic-bezier(.16,.7,.25,1) both;
}
.award-sparks .graphic:nth-child(1) { --dx:-178px; --dy:-88px; --spin:-44deg }
.award-sparks .graphic:nth-child(2) { --dx:-145px; --dy:70px; --spin:28deg; animation-delay:45ms }
.award-sparks .graphic:nth-child(3) { --dx:153px; --dy:62px; --spin:33deg; animation-delay:80ms }
.award-sparks .graphic:nth-child(4) { --dx:169px; --dy:-98px; --spin:25deg }
.award-sparks .graphic:nth-child(5) { --dx:120px; --dy:-121px; --spin:-26deg; animation-delay:80ms }
.award-sparks .graphic:nth-child(6) { --dx:-104px; --dy:-126px; --spin:-54deg; animation-delay:60ms }
@keyframes award {
  22%{opacity:1}
  72%{opacity:.82}
  to{opacity:0;transform:translate(var(--dx),var(--dy)) scale(1.2) rotate(var(--spin))}
}
.result-card {
  background:#16394a url('./assets/moon-launch.webp') center 42% / cover no-repeat;
  border:1px solid #29404b;
}
.result-card::before { opacity:1; background:linear-gradient(90deg,#122b3de8,#13374a65 48%,transparent 74%) }
.result-card .star-trio .graphic { --graphic-size:39px !important }
.result-card .star-trio .lit { animation:award-pop .44s cubic-bezier(.17,.81,.19,1.25) both }
.result-card .star-trio .lit:nth-child(2) { animation-delay:100ms }
.result-card .star-trio .lit:nth-child(3) { animation-delay:200ms }
@keyframes award-pop { from{opacity:.18;scale:.68;rotate:-18deg} }
.volume-row { gap:14px }
.volume-row input { flex:1; min-width:55px; max-width:205px; min-height:44px }
.volume-row output { min-width:44px; text-align:right; font-variant-numeric:tabular-nums }
@media(max-width:960px) {
  .world-art i { width:min(100%,215px) }
}
@media(max-width:650px) {
  .world-art { height:111px }
  .world-art i { width:min(100%,185px) }
  .quiz-choice { min-width:78px; padding-inline:13px }
  .play-panel { min-height:440px }
  .panel-world { display:none }
  .award-sparks .graphic:nth-child(n+4) { display:none }
  .result-card { background-size:auto 110%; background-position:58% 44% }
}
@media(max-height:650px) and (orientation:landscape) {
  .play-panel { min-height:355px }
}

