/* One flight deck, shared with the mission screen. */
.app{max-width:580px}
.app[data-phase="home"],.app[data-phase="launching"]{gap:12px;padding-top:20px}
.app[data-phase="home"] .scene,.app[data-phase="launching"] .scene{aspect-ratio:360/240}
.scene{background:#06122d;border-color:#4d6698;transition:aspect-ratio .5s ease}
.scene canvas{image-rendering:auto}
.app[data-phase="home"] .scene canvas{touch-action:pan-y;cursor:grab}
.app[data-phase="home"] .scene canvas.dragging{cursor:grabbing}
.scene canvas:focus-visible{outline:2px solid #ffdc85;outline-offset:-5px}
.scene .overlay{z-index:2;letter-spacing:1.1px;border-color:#57718d88;backdrop-filter:blur(8px)}
.scene .loc{z-index:2;border-color:#57718d88}
.hangar-arrow{display:none;position:absolute;top:48%;z-index:3;width:44px;height:52px;border:1px solid #86a9cf66;border-radius:9px;background:#08162ad9;color:#f7da96;box-shadow:inset 0 1px #badbff1a;align-items:center;justify-content:center;transition:background .15s,transform .15s}
.hangar-arrow svg{width:17px;height:24px;fill:none;stroke:currentColor;stroke-width:2}
.hangar-arrow:hover{background:#193455;transform:translateY(-2px)}
.hangar-arrow:active{transform:scale(.94)}
.hangar-arrow:disabled{opacity:.35;cursor:default}
.hangar-arrow.prev{left:10px}.hangar-arrow.next{right:10px}
.app[data-phase="home"] .hangar-arrow{display:flex}
.hangar-hint{display:none;position:absolute;bottom:11px;left:12px;z-index:2;pointer-events:none;font-size:8px;letter-spacing:1px;font-weight:700;color:#d9e8ff;text-shadow:0 1px 4px #000}
.app[data-phase="home"] .hangar-hint{display:block}
.hangar-panel{padding:0}
.hangar-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px}
.hangar-heading h1{font-family:'Press Start 2P',monospace;font-size:clamp(14px,3.6vw,20px);line-height:1.65;margin:4px 0 0;min-height:33px;color:#ffe1a0}
.hangar-heading .eyebrow{font-size:9px;letter-spacing:1.8px}
.vehicle-count{font-variant-numeric:tabular-nums;font-size:12px;color:#aebfdd;border-left:1px solid #637ca85c;padding-left:14px;white-space:nowrap}
.vehicle-count strong{color:#ffe1a0;font-size:18px;margin-right:4px}
.fleet-picker{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:7px;margin:0 0 16px}
.fleet-option{position:relative;min-width:0;height:83px;padding:8px 3px 6px;display:flex;flex-direction:column;align-items:center;justify-content:space-between;gap:5px;border:1px solid #4b628d80;border-radius:8px;background:#0b1632;color:#acbfde;transition:background .18s,border-color .18s,box-shadow .18s}
.fleet-option svg{height:43px;width:36px;overflow:visible;opacity:.72;transition:opacity .18s,transform .18s}
.fleet-option span{font-size:10px;line-height:1.2;font-weight:600;white-space:nowrap}
.fleet-option:hover{background:#1b2948;border-color:#96b3dc}.fleet-option:hover svg{opacity:1}
.fleet-option[aria-pressed="true"]{background:linear-gradient(#363448,#202841);border-color:#eebd66;color:#ffe1a0;box-shadow:inset 0 0 16px #edb94e13,0 0 0 1px #ffcf5c22}
.fleet-option[aria-pressed="true"] svg{opacity:1;transform:translateY(-2px)}
.launch-mission{display:flex;align-items:center;justify-content:center;gap:14px;min-height:55px;border-radius:8px;font-family:'Press Start 2P',monospace;font-size:13px;letter-spacing:0}
.launch-mission .launch-arrow{font-family:system-ui;font-size:23px;line-height:1}
.launch-mission:disabled{cursor:default;filter:saturate(.6);opacity:.75}
.hangar-note{text-align:center;color:#b3c3e0;font-size:11px;margin:12px 0 0;line-height:1.4}
.hangar-note .separator{margin:0 8px;color:#e4b860}
.app[data-phase="launching"] #screen{pointer-events:none}
.app[data-phase="launching"] .fleet-option{opacity:.5}
.sr-only{position:absolute!important;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@media(max-width:370px){.app[data-phase="home"],.app[data-phase="launching"]{padding-top:12px;gap:9px}.fleet-picker{gap:4px}.fleet-option{height:75px}.fleet-option span{font-size:9px}.hangar-arrow{width:39px;height:46px}.hangar-heading{margin-bottom:10px}.hangar-heading h1{font-size:14px}.launch-mission{font-size:11px}}
@media(max-height:740px) and (min-width:500px){.app[data-phase="home"],.app[data-phase="launching"]{max-width:475px;padding-top:10px;gap:8px}.app[data-phase="home"] .scene,.app[data-phase="launching"] .scene{aspect-ratio:360/245}.fleet-option{height:68px}.fleet-option svg{height:33px}.fleet-picker{margin-bottom:10px}.hangar-heading{margin-bottom:9px}}
@media(prefers-reduced-motion:reduce){.scene,.fleet-option,.fleet-option svg,.hangar-arrow{transition:none}}

/* A single mission console stays in place from ship selection to the results. */
.app,.app[data-phase="home"],.app[data-phase="launching"]{max-width:560px;padding-top:20px;gap:14px}
.mission-deck{overflow:hidden;border:1px solid #536c9b;border-radius:18px;background:#111e3a;box-shadow:0 18px 60px #02081766,inset 0 1px #bed9ff20}
.app .mission-deck .scene{aspect-ratio:360/240;border:0;border-radius:0;box-shadow:none;transition:none}
.mission-deck .panel{border:0;border-top:1px solid #58749866;border-radius:0;box-shadow:none;padding:20px;background:linear-gradient(140deg,#1b2949,#101a32)}
.scene .overlay{font-size:9px;padding:6px 8px;background:#081630ba}
.scene .loc{font-size:9px;padding:5px 7px}
.brand .mark{color:#ffcf79;font-size:27px;filter:drop-shadow(0 0 8px #ffb96666)}
.mini{background:#11203b;border-color:#4c6387;border-radius:6px;font-size:10px}
.hangar-heading{margin-bottom:16px}
.hangar-heading h1{font-size:clamp(14px,3.8vw,20px);line-height:1.5}
.fleet-picker{gap:6px;margin-bottom:18px}
.fleet-option{height:78px;background:#0a1730;border-radius:7px}
.fleet-option[aria-pressed="true"]::after{content:'';position:absolute;bottom:-5px;left:calc(50% - 3px);width:6px;height:6px;background:#ffcf79;transform:rotate(45deg)}
.launch-mission{min-height:54px;font-size:12px}
.hangar-note{font-size:11px;margin-top:13px}
.hangar-note .separator{margin:0 5px}
.app[data-phase="launching"] .hangar-heading,.app[data-phase="launching"] .fleet-picker,.app[data-phase="launching"] .hangar-note{opacity:.35;transition:opacity .25s}
.app[data-phase="question"] #screen{animation:console-arrive .24s ease-out}
@keyframes console-arrive{from{opacity:.4;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}
.footer{font-size:10px}
@media(max-width:370px){.app,.app[data-phase="home"],.app[data-phase="launching"]{padding-top:12px;gap:10px}.mission-deck .panel{padding:14px}.fleet-option{height:72px}.fleet-option span{font-size:9px}.hangar-heading h1{font-size:14px}.scene .overlay{font-size:8px}.hangar-hint{font-size:7px;letter-spacing:.6px}.hangar-note{font-size:10px}}
@media(max-height:760px) and (min-width:500px){.app,.app[data-phase="home"],.app[data-phase="launching"]{max-width:475px;padding-top:12px;gap:10px}.mission-deck .panel{padding:16px}.fleet-option{height:68px}.fleet-option svg{height:33px}.hangar-heading{margin-bottom:12px}.fleet-picker{margin-bottom:14px}}
@media(prefers-reduced-motion:reduce){.app[data-phase="question"] #screen{animation:none}.app[data-phase="launching"] .hangar-heading,.app[data-phase="launching"] .fleet-picker,.app[data-phase="launching"] .hangar-note{transition:none}}

/* The route remains visible as each successful answer carries the ship outward. */
.mission-route{display:flex;align-items:center;justify-content:space-between;gap:3px;padding:12px 14px 10px;background:#0b1730;border-top:1px solid #526d8e44}
.route-stop{position:relative;flex:1;text-align:center;font-size:9px;line-height:1.4;color:#778aaa;padding-top:11px;white-space:nowrap}
.route-stop::before{content:'';position:absolute;top:0;left:calc(50% - 2px);width:4px;height:4px;border-radius:50%;background:#4c6081;box-shadow:0 0 0 2px #243553}
.route-stop::after{content:'';position:absolute;top:2px;left:calc(50% + 6px);width:calc(100% - 9px);height:1px;background:#2b405f}
.route-stop:last-child::after{display:none}
.route-stop.visited{color:#9fc4bd}.route-stop.visited::before{background:#78c9ae}.route-stop.visited::after{background:#507e7b}
.route-stop.current{color:#ffe1a0;font-weight:700}.route-stop.current::before{background:#ffdc88;box-shadow:0 0 0 2px #60513c,0 0 10px #ffd78888}
.app[data-phase="home"] .mission-route,.app[data-phase="launching"] .mission-route{display:none}
#next-btn:disabled{opacity:.75;cursor:default}
@media(max-width:370px){.mission-route{padding:11px 8px 9px}.route-stop{font-size:8px}}

/* On phones the question is the primary control, not content below the artwork.
   Keep natural document scrolling for accessibility and unusually long feedback. */
@media(max-width:600px){
 .app[data-phase="question"],.app[data-phase="feedback"]{padding:calc(env(safe-area-inset-top) + 8px) 10px calc(env(safe-area-inset-bottom) + 12px);gap:8px}
 .app:is([data-phase="question"],[data-phase="feedback"]) .header{min-height:32px}
 .app:is([data-phase="question"],[data-phase="feedback"]) .brand .logo{font-size:13px}
 .app:is([data-phase="question"],[data-phase="feedback"]) .brand .mark{font-size:22px}
 .app:is([data-phase="question"],[data-phase="feedback"]) .mini{font-size:9px;padding:5px 6px}
 .app:is([data-phase="question"],[data-phase="feedback"]) .mission-deck{display:flex;flex-direction:column}
 .app:is([data-phase="question"],[data-phase="feedback"]) #screen{order:2;padding:14px;border-top:1px solid #58749866}
 .app:is([data-phase="question"],[data-phase="feedback"]) .scene{order:0;height:var(--flight-scene-height,360px)!important;aspect-ratio:auto;border-top:1px solid #58749866}
 .app:is([data-phase="question"],[data-phase="feedback"]) .mission-route{order:1;padding:9px 8px}
 .app:is([data-phase="question"],[data-phase="feedback"]) .footer{display:none}
 .app[data-phase="question"] .question{font-size:clamp(20px,5.4vw,24px);margin:10px 0 14px;line-height:1.25}
 .app[data-phase="question"] .game-top{margin-bottom:6px}
 .app[data-phase="question"] .smallbar{margin-top:6px}
 .app[data-phase="question"] .smallbar .note{margin:4px 0}
 .app[data-phase="question"] .answer-input{font-size:18px;min-height:48px;padding:10px}
 .app[data-phase="question"] .submit{min-height:48px;min-width:72px}
 .app[data-phase="feedback"] .question{font-size:18px;margin:8px 0}
 .app[data-phase="feedback"] .feedback{margin-top:8px;padding:10px}
 .app[data-phase="feedback"] .smallbar{display:none}
}
@media(max-width:600px){.app:is([data-phase="question"],[data-phase="feedback"]) .scene canvas{object-fit:cover}}
