:root{color-scheme:dark;--ink:#111b33;--panel:#1c2945;--line:#536783;--text:#f6f7ff;--muted:#c4d2e7;--joy:#ffd45c;--mint:#9fe0c3;--coral:#ff8d82}*{box-sizing:border-box}html{background:#0b1428}body{margin:0;min-height:100dvh;background:radial-gradient(circle at 85% 5%,#293965 0,#111b33 38%,#0b1428 100%);color:var(--text);font:16px/1.5 system-ui,sans-serif}button{font:inherit;cursor:pointer}button:focus-visible,a:focus-visible,canvas:focus-visible{outline:4px solid var(--joy);outline-offset:4px}button:disabled{opacity:.5;cursor:not-allowed}.skip{position:absolute;left:12px;top:-80px;background:var(--joy);color:var(--ink);padding:10px;z-index:10}.skip:focus{top:12px}.topbar{display:flex;align-items:center;gap:24px;justify-content:space-between;padding:16px clamp(16px,4vw,48px);border-bottom:1px solid #536783;background:#101a31}.brand{display:flex;gap:10px;align-items:center;font-size:17px;font-weight:900;line-height:1;letter-spacing:.08em}.brand>span:first-child{font-size:42px;color:var(--joy)}.brand strong{color:var(--joy)}nav{display:flex;gap:8px;flex-wrap:wrap}nav button,.hero-bottom button{border:0;background:transparent;color:var(--text);font-weight:750;padding:12px 14px;border-radius:10px}nav button[aria-current=page],nav button:hover,.hero-bottom button:hover{background:#344868}.device-pill{border:1px solid var(--mint);color:var(--mint);padding:8px 12px;border-radius:999px;font-size:12px;font-weight:800;white-space:nowrap}main{max-width:1280px;margin:auto;padding:clamp(18px,3vw,40px)}.warning{background:#5f352a;border:2px solid var(--coral);padding:14px;border-radius:12px}.view[hidden],.play[hidden],.pause-panel[hidden],[hidden]{display:none!important}.eyebrow{color:var(--mint);font-weight:900;letter-spacing:.14em;font-size:12px}.deck{display:grid;grid-template-columns:minmax(280px,1fr) minmax(280px,480px);align-items:center;gap:clamp(22px,5vw,76px)}h1{font-size:clamp(42px,6vw,82px);line-height:1.02;letter-spacing:-.045em;margin:14px 0 22px}h2{font-size:clamp(25px,3vw,40px);line-height:1.1;margin:8px 0}.lead{font-size:clamp(18px,2vw,23px);max-width:630px;color:var(--muted)}.actions,.play-actions{display:flex;gap:12px;flex-wrap:wrap;margin:28px 0 10px}.primary,.secondary{border-radius:12px;min-height:48px;padding:12px 20px;font-weight:900;letter-spacing:.025em}.primary{background:var(--joy);color:var(--ink);border:2px solid var(--joy);box-shadow:0 5px 0 #a77d31}.primary:hover{background:#ffe28e}.secondary{background:#263958;color:var(--text);border:2px solid #839ab6}.secondary:hover{background:#385275}.note{color:var(--muted)}.stats{display:flex;gap:12px;flex-wrap:wrap;margin-top:34px}.stats>div{background:var(--panel);border:1px solid var(--line);border-radius:13px;padding:12px 18px;min-width:130px}.stats span{display:block;color:var(--muted);font-size:11px;letter-spacing:.1em;font-weight:800}.stats strong{font-size:28px}.hero{border:3px solid #7f96b4;border-radius:22px;background:#1a2849;overflow:hidden;box-shadow:14px 18px 0 #080f20}.hero-top,.hero-bottom{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:12px 20px;font-size:12px;font-weight:900;letter-spacing:.08em}.hero-top{background:#293b60}.hero-top span:last-child{color:var(--joy)}.hero canvas{display:block;width:100%;height:auto;aspect-ratio:1}.hero-bottom strong{font-size:18px}.hero-bottom button{color:var(--mint)}.play{max-width:760px;margin:auto}.play-heading{display:flex;justify-content:space-between;align-items:center;gap:12px}.play-heading .eyebrow{margin:0}.play-board{position:relative;width:min(100%,400px);margin:12px auto;border:4px solid #8ea6c3;border-radius:16px;overflow:hidden;touch-action:none;box-shadow:0 10px 0 #050a15}.play-board canvas{display:block;width:100%;height:auto;aspect-ratio:9/16;touch-action:none}.play-hud{position:absolute;top:0;left:0;right:0;display:flex;justify-content:space-around;gap:6px;background:#0b1428e8;padding:7px 3px;font-size:10px;font-weight:800;pointer-events:none}.play-hud strong{display:block;font-size:17px;color:var(--joy)}.flight-status{text-align:center;color:var(--muted);min-height:3em}.play-actions{justify-content:center;margin:12px 0}.pause-panel{background:#202f50;border:2px solid #9bb2d0;border-radius:16px;padding:16px 24px;margin:20px auto;max-width:550px;text-align:center}.pause-panel .actions{justify-content:center}.section-intro{max-width:760px}.section-intro h1{font-size:clamp(36px,5vw,62px)}.section-intro p:last-child{font-size:18px;color:var(--muted)}.looks-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:16px;margin-top:30px}.look-card{background:var(--panel);border:2px solid var(--line);border-radius:16px;padding:15px}.look-card canvas{width:100%;height:auto;aspect-ratio:4/3;background:#111c34;border-radius:9px}.look-card h2{font-size:21px}.look-card p{color:var(--muted);min-height:3em}.look-card button{width:100%}.look-card.locked{opacity:.72}.look-card.locked canvas{filter:grayscale(1) brightness(.5)}.about-card{background:var(--panel);border:1px solid var(--line);padding:20px 24px;border-radius:16px;margin:16px 0;max-width:850px}.about-card h2{font-size:24px}.about-card p{color:var(--muted)}footer{text-align:center;color:var(--muted);font-size:12px;letter-spacing:.1em;padding:26px}.status-live{color:var(--mint)}@media(max-width:800px){.topbar{align-items:flex-start;flex-wrap:wrap;gap:10px}.topbar nav{order:3;width:100%}.topbar nav button{flex:1}.device-pill{margin-left:auto}.deck{grid-template-columns:1fr}.hero{width:min(100%,480px);margin:auto}.stats{margin-top:20px}}@media(max-width:430px){main{padding:16px}.brand{font-size:14px}.brand>span:first-child{font-size:32px}.device-pill{font-size:10px}.topbar nav button{font-size:13px;padding:10px 6px}.play-heading h2{font-size:24px}.play-heading .secondary{padding:8px 12px}.play-hud strong{font-size:15px}}@media(prefers-reduced-motion:reduce){.primary{box-shadow:none}}@media(forced-colors:active){.primary,.secondary,.look-card,.pause-panel{border:2px solid ButtonText}.look-card.locked canvas{filter:none}}
:is(nav button,.hero-bottom button){min-height:44px}

.flight-open .topbar,.flight-open footer{display:none}

/* Flight fills the window exactly. The playfield takes whatever height is left,
   so results, pause and the page itself never need to scroll. */
body.flight-open{height:100vh;height:100dvh;display:flex;flex-direction:column}
.flight-open main{flex:1 1 auto;min-height:0;width:100%;display:flex;flex-direction:column;padding:10px 12px}
.flight-open #view-flight{flex:1 1 auto;min-height:0;display:flex;flex-direction:column}
.flight-open .play{flex:1 1 auto;min-height:0;display:flex;flex-direction:column;width:100%}
.flight-open .play-heading h2{font-size:clamp(20px,3.2vw,30px);margin:2px 0 0}
.play-stage{flex:1 1 auto;min-height:0;container:stage / size;display:flex;align-items:center;justify-content:center;padding-bottom:10px}
.flight-open .play-board{container:board / inline-size;width:min(100%,max(150px,calc((100vh - 300px) * .5625)));width:min(100cqw,calc((100cqh - 10px) * .5625));margin:0}
.flight-open .flight-status{margin:6px 0 0;min-height:2.6em;line-height:1.3;font-size:15px}
.flight-open .play-actions{margin:4px 0 0}
.play.panel-open .flight-status{visibility:hidden}
@media(max-width:700px){body.flight-open>.mjl-report-bug{flex:none;margin:6px auto calc(8px + env(safe-area-inset-bottom,0px))}}
@media(orientation:landscape) and (max-height:560px){
  .flight-open main{padding:8px 16px}
  .flight-open .play{display:grid;grid-template-columns:auto minmax(0,1fr);grid-template-rows:auto 1fr auto;column-gap:20px;align-content:stretch}
  .flight-open .play-stage{grid-column:1;grid-row:1/-1;width:min(52vw,calc((100vh - 16px) * .5625));width:min(52vw,calc((100dvh - 16px) * .5625));height:100%;padding:0}
  body.flight-open>.mjl-report-bug{position:fixed;right:12px;bottom:calc(8px + env(safe-area-inset-bottom,0px));z-index:9999;margin:0}
  body.flight-open:has(>.mjl-report-bug) .play-actions{margin-bottom:60px}
  .flight-open .play-heading{grid-column:2;grid-row:1;flex-wrap:wrap}
  .flight-open .flight-status{grid-column:2;grid-row:2;align-self:end;text-align:left}
  .flight-open .play-actions{grid-column:2;grid-row:3;justify-content:flex-start;margin-bottom:4px}
}

.play-actions .secondary{font-size:12px;padding:10px 12px;letter-spacing:0}

/* Pause and results stay inside the flight field, including on short screens. */
.pause-panel{position:absolute;inset:0;z-index:3;display:flex;align-items:center;justify-content:center;margin:0;padding:12px;max-width:none;border:0;border-radius:0;background:#081124d9;touch-action:auto}
.pause-card{display:flex;flex-direction:column;width:100%;max-height:100%;overflow:hidden;border:2px solid #9bb2d0;border-radius:14px;background:#202f50;padding:16px 12px;font-size:14px}
.pause-card h3{flex:none;font-size:22px;margin:0 0 12px}.pause-card p{flex:0 1 auto;min-height:1.4em;overflow:auto;overscroll-behavior:contain;margin:0 0 16px}.pause-card .actions{flex:none;display:grid;gap:10px;margin:0}.pause-card button{padding:10px 8px;font-size:12px;min-height:44px}.look-progress{font-size:14px;color:var(--mint)!important}
@media(max-height:480px){.pause-card{padding:8px;font-size:12px}.pause-card button{min-height:36px}.pause-card h3{font-size:18px;margin-bottom:6px}.pause-card p{margin-bottom:8px}.pause-card .actions{gap:6px}.pause-card button{font-size:10px;padding:6px 2px;letter-spacing:0}}

/* Garage: the bay shows the equipped ship; the equipment panel works like a
   paper-doll equipment tab. Ship and Thruster can be swapped but never removed. */
.garage{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(300px,.8fr);gap:clamp(16px,2.4vw,28px);margin-top:26px;align-items:start}
.garage-bay{position:sticky;top:16px;margin:0;border:3px solid #7f96b4;border-radius:22px;overflow:hidden;background:#18254a;box-shadow:14px 18px 0 #080f20}
.garage-bay canvas{display:block;width:100%;height:auto;aspect-ratio:4/3;image-rendering:pixelated}
.bay-caption{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;gap:4px 14px;padding:12px 18px;background:#293b60;font-size:12px;font-weight:800;letter-spacing:.06em;color:var(--mint)}
.bay-caption strong{font-size:18px;color:var(--text);letter-spacing:0}
.garage-side{display:grid;gap:16px}
.equipment,.locker{background:#16223d;border:2px solid var(--line);border-radius:18px;padding:16px}
.panel-head{display:flex;align-items:baseline;justify-content:space-between;gap:10px;flex-wrap:wrap}
.panel-head h2{font-size:22px;margin:0}
.parts-found{font-size:12px;font-weight:800;color:var(--mint);letter-spacing:.06em}
.equip-grid{position:relative;display:grid;grid-template-columns:repeat(3,76px);grid-template-areas:"aura ship badge" ". thruster ." ". trail .";gap:12px 26px;justify-content:center;margin:16px auto 8px;width:max-content}
.equip-grid::before{content:"";position:absolute;left:50%;top:38px;bottom:60px;width:4px;margin-left:-2px;background:#2d3f63;border-radius:2px}
.equip-grid::after{content:"";position:absolute;left:38px;right:38px;top:36px;height:4px;background:#2d3f63;border-radius:2px}
.slot{position:relative;z-index:1;display:flex;flex-direction:column;align-items:center;gap:5px;width:76px;padding:0;border:0;background:none;color:var(--text);border-radius:14px}
.slot[data-slot=aura]{grid-area:aura}.slot[data-slot=ship]{grid-area:ship}.slot[data-slot=badge]{grid-area:badge}.slot[data-slot=thruster]{grid-area:thruster}.slot[data-slot=trail]{grid-area:trail}
.slot .well{display:grid;place-items:center;width:76px;height:76px;border-radius:14px;background:#0f1a33;border:3px solid #536783;box-shadow:inset 0 0 0 2px #0a1226,inset 0 8px 14px #0008}
.slot canvas{width:60px;height:60px;image-rendering:pixelated;border-radius:6px}
.slot.empty canvas{opacity:.75}
.slot .slot-label{font-size:11px;font-weight:900;letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}
.slot:hover .well{border-color:#8ea6c3}
.slot[aria-current=true] .well{border-color:var(--joy);box-shadow:inset 0 0 0 2px #0a1226,0 0 0 3px #ffd45c40}
.slot[aria-current=true] .slot-label{color:var(--joy)}
.loadout-list{display:grid;grid-template-columns:auto 1fr;gap:6px 14px;margin:14px 0 0;padding:12px 14px;border-radius:12px;background:#0f1a33;font-size:14px}
.loadout-list dt{color:var(--muted);font-weight:800;font-size:12px;letter-spacing:.06em;text-transform:uppercase;align-self:center}
.loadout-list dd{margin:0;font-weight:800;text-align:right}
.loadout-list dd.off{color:#8193ad;font-weight:600}
.locker-note{margin:6px 0 14px;color:var(--muted);font-size:14px}
.locker-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(132px,1fr));gap:10px}
.part{display:flex;flex-direction:column;align-items:stretch;gap:4px;min-height:44px;margin:0;padding:8px;text-align:left;background:var(--panel);border:2px solid var(--line);border-radius:12px;color:var(--text);font-size:13px;line-height:1.3}
.part canvas{display:block;width:100%;height:auto;aspect-ratio:4/3;border-radius:8px;image-rendering:pixelated;margin-bottom:4px}
.part strong{font-size:14px}
.part span{color:var(--muted);font-size:12px}
button.part:hover{border-color:#8ea6c3;background:#243458}
.part[aria-current=true]{border-color:var(--joy);box-shadow:0 0 0 3px #ffd45c33}
.part[aria-current=true] span{color:var(--joy);font-weight:800}
.part{position:relative}.part.new{border-color:var(--mint)}.new-chip{position:absolute;top:12px;left:12px;z-index:1;padding:2px 7px;border-radius:999px;background:var(--mint);color:var(--ink)!important;font-size:11px!important;font-weight:900;letter-spacing:.08em}
.part.locked{opacity:.8;border-style:dashed}
.part.locked canvas{filter:grayscale(1) brightness(.5)}
.part.locked .look-progress{font-size:12px}
@media(max-width:900px){.garage{grid-template-columns:1fr}.garage-bay{position:static;box-shadow:8px 10px 0 #080f20}}
@media(max-width:430px){.equip-grid{grid-template-columns:repeat(3,68px);gap:10px 18px}.slot,.slot .well{width:68px}.slot .well{height:68px}.slot canvas{width:54px;height:54px}.equip-grid::before{top:34px}.equip-grid::after{left:34px;right:34px;top:32px}.locker-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(forced-colors:active){.slot .well,.part{border:2px solid ButtonText}.slot[aria-current=true] .well,.part[aria-current=true]{border:4px solid Highlight}.part.locked canvas{filter:none}}

/* Small playfields (short phones, landscape) get a compact card whose buttons always show. */
@container stage (max-height:420px){.pause-panel{padding:6px}.pause-card{padding:8px 6px;font-size:12px;line-height:1.35}.pause-card h3{font-size:16px;margin-bottom:6px}.pause-card p{margin-bottom:8px}.pause-card .actions{gap:6px}.pause-card button{min-height:34px;padding:4px 2px;font-size:10px;letter-spacing:0}}
@container stage (max-height:300px){.pause-card p{font-size:11px}.pause-card button{min-height:30px}}

/* The score bar and pause/results card grow with the playfield on big screens
   and tablets, and never shrink below their phone sizes. */
.flight-open .play-hud{font-size:max(10px,2.8cqi);padding:max(7px,1.8cqi) 3px}
.flight-open .play-hud strong{font-size:max(17px,4.8cqi)}
.flight-open .pause-panel{padding:max(12px,3cqi)}
.flight-open .pause-card{font-size:max(14px,3.9cqi);padding:max(16px,4cqi) max(12px,3cqi);border-radius:max(14px,3cqi)}
.flight-open .pause-card h3{font-size:max(22px,6.2cqi);margin-bottom:max(12px,2.6cqi)}
.flight-open .pause-card p{margin-bottom:max(16px,3.6cqi)}
.flight-open .pause-card .actions{gap:max(10px,2.4cqi)}
.flight-open .pause-card button{font-size:max(12px,3.4cqi);min-height:max(44px,11cqi);padding:max(10px,2.2cqi) 8px;border-radius:max(12px,2.6cqi)}
@container stage (max-height:420px){.flight-open .pause-panel{padding:6px}.flight-open .pause-card{padding:8px 6px;font-size:12px}.flight-open .pause-card h3{font-size:16px;margin-bottom:6px}.flight-open .pause-card p{margin-bottom:8px}.flight-open .pause-card .actions{gap:6px}.flight-open .pause-card button{min-height:34px;padding:4px 2px;font-size:10px}}
@container stage (max-height:300px){.flight-open .pause-card p{font-size:11px}.flight-open .pause-card button{min-height:30px}}
/* A phone showing the desktop version of the site is zoomed out to fit about
   980px. Scale the flight controls back up to a size a finger can use. */
html.ui-zoomed .flight-open .play-heading,html.ui-zoomed .flight-open .flight-status,html.ui-zoomed .flight-open .play-actions{zoom:var(--ui-zoom,1)}
html.ui-zoomed .flight-open .play{max-width:none}html.ui-zoomed .flight-open .play-heading h2{font-size:24px}
html.ui-zoomed body.flight-open>.mjl-report-bug{zoom:var(--ui-zoom,1)}
html.ui-zoomed body.flight-open:has(>.mjl-report-bug) .play-actions{margin-bottom:62px}
/* The rest of the game on a desktop-mode phone: scale it up and use the phone layout. */
html.ui-zoomed .topbar,html.ui-zoomed footer,html.ui-zoomed body:not(.flight-open) main{zoom:var(--ui-zoom,1)}
html.ui-zoomed .flight-open main{padding:12px 24px}
html.ui-zoomed body:not(.flight-open) main{padding:16px}
html.ui-zoomed .topbar{align-items:flex-start;flex-wrap:wrap;gap:10px;padding:12px 16px}
html.ui-zoomed .topbar nav{order:3;width:100%}
html.ui-zoomed .topbar nav button{flex:1;font-size:13px;padding:10px 6px}
html.ui-zoomed .brand{font-size:14px}html.ui-zoomed .brand>span:first-child{font-size:32px}
html.ui-zoomed .device-pill{margin-left:auto;font-size:10px}
html.ui-zoomed h1{font-size:40px}html.ui-zoomed .section-intro h1{font-size:36px}html.ui-zoomed h2{font-size:25px}
html.ui-zoomed .lead{font-size:18px}
html.ui-zoomed .deck{grid-template-columns:1fr;gap:22px}
html.ui-zoomed .hero{width:100%;margin:auto}
html.ui-zoomed .stats{margin-top:20px}
html.ui-zoomed .garage{grid-template-columns:1fr}
html.ui-zoomed .garage-bay{position:static;box-shadow:8px 10px 0 #080f20}
html.ui-zoomed .equip-grid{grid-template-columns:repeat(3,68px);gap:10px 18px}
html.ui-zoomed .slot,html.ui-zoomed .slot .well{width:68px}html.ui-zoomed .slot .well{height:68px}html.ui-zoomed .slot canvas{width:54px;height:54px}
html.ui-zoomed .equip-grid::before{top:34px}html.ui-zoomed .equip-grid::after{left:34px;right:34px;top:32px}
html.ui-zoomed .locker-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
html.ui-zoomed .panel-head h2{font-size:22px}
html.ui-zoomed body:not(.flight-open)>.mjl-report-bug{position:relative;right:auto;bottom:auto;display:flex;width:max-content;margin:16px 16px 40px auto;zoom:var(--ui-zoom,1)}

/* Portrait phones: one slim control row (sound, motion, pause) above a playfield
   as big as the screen allows. The status line stays for screen readers only;
   the playfield itself shows boss warnings. */
html.phone-flight .flight-open main{padding:8px 8px 0}
html.phone-flight .flight-open .play{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:auto minmax(0,1fr);grid-template-areas:"actions pause" "stage stage";gap:8px}
html.phone-flight .flight-open .play-heading{display:contents}
html.phone-flight .flight-open .play-heading>div,html.phone-flight .flight-open .flight-status{position:absolute;width:1px;height:1px;margin:0;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap}
html.phone-flight .flight-open #pause{grid-area:pause}
html.phone-flight .flight-open .play-actions{grid-area:actions;margin:0;justify-content:flex-start;flex-wrap:nowrap;gap:6px;min-width:0}
html.phone-flight .flight-open #pause,html.phone-flight .flight-open .play-actions .secondary{min-height:40px;padding:6px 10px;font-size:11px;letter-spacing:.02em;white-space:nowrap}
html.phone-flight .flight-open .play-stage{grid-area:stage;padding-bottom:8px}
html.phone-flight body.flight-open>.mjl-report-bug{position:relative;right:auto;bottom:auto;display:flex;width:max-content;margin:0 auto calc(6px + env(safe-area-inset-bottom,0px))}
html.ui-zoomed.phone-flight body.flight-open:has(>.mjl-report-bug) .play-actions{margin-bottom:0}
html.ui-zoomed.phone-flight .flight-open main{padding:16px 20px 0}
