:root{color-scheme:dark;font-family:'Courier New',monospace;background:#080d13;color:#e4f9f5;--mint:#a5ffdc;--cyan:#63d9ed}*{box-sizing:border-box}body{margin:0;overflow:hidden;overscroll-behavior:none}button{font:inherit;color:inherit;cursor:pointer;touch-action:none;-webkit-tap-highlight-color:transparent}button:focus-visible,a:focus-visible{outline:2px solid white;outline-offset:3px}[hidden],.hidden{display:none!important}#arcade{height:100svh;height:100dvh;max-width:1440px;margin:auto;display:flex;flex-direction:column;padding:env(safe-area-inset-top) max(10px,env(safe-area-inset-right)) env(safe-area-inset-bottom) max(10px,env(safe-area-inset-left))}header{display:flex;justify-content:space-between;align-items:center;min-height:42px;flex-shrink:0;border-bottom:1px solid #233a3d;gap:10px}.brand{font-size:17px;font-weight:bold;letter-spacing:2px}.brand span{color:var(--mint)}.tools{display:flex;gap:6px}.tools button{background:transparent;border:1px solid #2e494e;padding:8px 10px;font-size:12px;border-radius:4px}#pause{font-size:18px}#play-area{flex:1;min-height:0;position:relative;--field-size:300px}#cockpit{height:100%;display:grid;grid-template-columns:138px var(--field-size) 138px;gap:12px;align-items:center;justify-content:center}#field{width:var(--field-size);height:var(--field-size);position:relative;border:1px solid #30474a;background:#060b10;overflow:hidden;border-radius:8px;aspect-ratio:1}canvas{display:block;width:100%;height:100%}.rail{height:var(--field-size);display:flex;flex-direction:column;justify-content:space-between;gap:10px;min-height:0}.hud{display:flex;flex-direction:column;gap:12px;padding:8px 3px}.hud small{display:block;color:#95b6b8;font-size:12px;letter-spacing:1px;margin-bottom:4px}.hud strong{font-size:20px;font-weight:normal;letter-spacing:1px}.meters{display:grid;gap:16px}.energy{width:100%}.energy small{display:flex;justify-content:space-between;letter-spacing:0}.bar{height:6px;background:#23373d}.bar i{display:block;width:100%;height:100%}#energy{background:var(--cyan)}#weapon-energy{background:var(--mint)}.controls{display:flex;flex-direction:column;gap:8px}.group{display:flex;gap:6px}.controls button{width:100%;min-width:0;height:62px;border:1px solid #345358;background:#122027;border-radius:10px;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:4px;user-select:none;-webkit-user-select:none}.controls b{font-size:27px;font-weight:normal;line-height:1}.controls span{font-size:12px;font-weight:bold}.combat{flex-direction:column}.controls .fire{background:var(--mint);color:#06231b;border-color:var(--mint)}.controls .shield{color:var(--cyan);border-color:#376b7b}.controls button.held{background:#29464e;box-shadow:inset 0 0 15px #61eee344}.controls .fire.held{background:#65dcb0}#notice{position:absolute;top:16%;width:100%;padding:0 8px;text-align:center;font-size:14px;color:var(--mint);pointer-events:none;letter-spacing:2px;text-shadow:0 0 15px #72d9c6}#overlay{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:#080d13;padding:10px;z-index:4}#arcade[data-screen="menu"] #cockpit,#arcade[data-screen="paused"] #cockpit{visibility:hidden}#arcade[data-screen="menu"] #pause,#arcade[data-screen="menu"] #menu{visibility:hidden}.panel{text-align:center;max-width:700px;width:100%;max-height:100%;overflow-y:auto;padding:8px;scrollbar-width:thin}.eyebrow{font-size:12px;color:var(--mint);letter-spacing:4px}h1{font-size:clamp(24px,4vw,48px);letter-spacing:5px;font-weight:normal;margin:10px 0;text-shadow:0 0 24px #a5ffdc55}h1 span{color:var(--mint);font-size:.6em;letter-spacing:8px;margin-left:16px}.panel p{font-size:14px;line-height:1.5;margin:8px 0}#start{background:var(--mint);border:0;color:#06201c;font-weight:bold;padding:13px 32px;font-size:18px;letter-spacing:2px;border-radius:4px;margin:8px 0 12px;min-height:44px}.instructions{font-size:12px;line-height:1.6;color:#a6c5c6}.keyboard{font-size:12px;color:#718e93;line-height:1.5;margin-top:12px}#level-picker{border:0;padding:0;margin:12px 0 4px;min-width:0}#level-picker legend{font-size:12px;color:#95b6b8;letter-spacing:2px;margin:auto auto 8px}.level-options{display:flex;gap:8px;justify-content:center}.level-options button{background:#102329;border:1px solid #36585c;border-radius:6px;padding:10px 16px;font-size:14px;color:#d7eeea;min-height:44px}.level-options button[aria-pressed="true"]{border-color:var(--mint);background:#24463d;color:var(--mint)}#level-description{font-size:13px;color:#abc6c6}footer{display:none}#install-banner{display:flex;align-items:center;gap:8px;padding:6px;background:#11252a;border-bottom:1px solid #3a6467;flex-shrink:0}#install-banner>div{flex:1;min-width:0}#install-banner strong{display:block;font-size:12px;color:var(--mint);line-height:1.4}#install-banner span{display:block;font-size:12px;color:#b4cece;line-height:1.4}#install-banner button{border:1px solid #7de2bb;background:var(--mint);color:#06201c;border-radius:5px;padding:8px;font-size:12px;font-weight:bold;white-space:nowrap}#install-banner #install-dismiss{background:transparent;border:0;color:#b4cece;font-size:25px;padding:4px 8px}#install-banner .install-actions{display:flex;flex:0 0 auto;align-items:center;gap:6px}#install-button:disabled{opacity:.45;cursor:default}#open-chrome{font-size:12px;color:var(--mint);text-decoration:underline;cursor:pointer}.install-icon{flex-shrink:0;width:32px;height:32px;border:1px solid #396063;border-radius:8px}#arcade[data-screen="playing"] #install-banner{display:none}#rotate-warning{position:fixed;inset:0;z-index:100;background:#080d13;color:var(--mint);display:flex;flex-direction:column;align-items:center;justify-content:center;padding:24px;text-align:center}#rotate-warning svg{transform:rotate(90deg)}#rotate-warning h2{font-size:24px;font-weight:normal;margin:16px 0 8px}#rotate-warning p{font-size:16px;line-height:1.6;color:#b4cece;margin:8px 0}html:fullscreen,html:-webkit-full-screen{background:#080d13;width:100%;height:100%}
@media(max-width:699px){#cockpit{grid-template-columns:92px var(--field-size) 92px}.brand{font-size:13px;letter-spacing:1px}.tools{gap:4px}.tools button{padding:6px}.hud strong{font-size:16px}.hud{gap:8px;padding:4px 0}.controls span{font-size:11px}.controls button{height:54px}.controls b{font-size:24px}.energy small{font-size:11px}.keyboard{display:none}.group.steering{gap:4px}}
@media(max-height:430px){header{min-height:34px}.hud{gap:6px;padding-top:2px}.hud small{margin-bottom:2px}.hud strong{font-size:16px}.meters{gap:12px}.controls{gap:6px}.controls button{height:52px}.controls b{font-size:24px}.panel h1{font-size:26px;margin:4px 0}.panel .eyebrow,.keyboard{display:none}#level-picker{margin-top:6px}#start{padding:10px 28px;margin:4px 0 8px}.instructions{line-height:1.5}#install-banner{padding:4px 6px}}
@media(max-height:300px){.hud{gap:3px}.hud small{font-size:11px}.hud strong{font-size:14px}.controls button{height:44px}.controls b{font-size:20px}.controls span{font-size:11px}.meters{gap:8px}.rail{gap:4px}.panel .instructions{display:none}}

#upgrade-status{color:#6cbcff;font-size:12px;line-height:1.5;margin:10px 0 0} .level-options{flex-wrap:wrap}.level-options button{min-width:90px} .combat button:only-child{min-height:62px}

/* Game surfaces must never enter the browser's text-selection mode. */
#arcade,#arcade *,#rotate-warning,#rotate-warning *{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
#cockpit{touch-action:none}#cockpit img{ -webkit-user-drag:none }
.controls button>*{pointer-events:none}

/* Equal side-by-side turn controls fill the space beside the square field. */
#cockpit{grid-template-columns:minmax(138px,1fr) var(--field-size) minmax(138px,1fr)}
.group.steering{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:6px;width:100%}
.controls .steering button{width:100%;height:clamp(76px,24svh,110px);min-height:76px;padding:6px 2px}
.controls .steering b{font-size:clamp(32px,5vw,46px)}
.controls .steering span{font-size:12px;white-space:nowrap}
@media(max-width:699px){#cockpit{grid-template-columns:minmax(92px,1fr) var(--field-size) minmax(92px,1fr)}.group.steering{gap:4px}}
@media(max-height:300px){.controls .steering button{height:64px;min-height:64px}.controls .steering b{font-size:32px}}

#boss-status,#life-status{font-size:12px;line-height:1.5;margin:6px 0 0}#boss-status{color:#ffbc78}#life-status{color:#fff}.right-rail .hud{gap:4px}#boss-status:not([hidden])~#upgrade-status{margin-top:4px}

/* Campaign selection and compact in-game status remain outside the field. */
.level-options{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:6px}.level-options button{min-width:0;padding:10px 4px;font-size:12px}
#guide{font-size:12px;color:#a6c5c6;margin:12px auto 0;max-width:620px;text-align:left;line-height:1.6}#guide summary{cursor:pointer;color:var(--mint);text-align:center;min-height:30px}#guide p{font-size:12px}
#stage-status{font-size:10px;margin:3px 0 0;letter-spacing:0;line-height:1.2;max-width:190px}.record-stat strong{font-size:14px}.record-stat small{font-size:10px}
#upgrade-status{white-space:pre-line;font-size:11px;margin:4px 0 0;line-height:1.4}#boss-status,#life-status{font-size:11px;line-height:1.3;margin:3px 0 0}.left-rail .hud{gap:7px}.right-rail .hud{gap:3px}.right-rail .meters{gap:9px}
@media(max-height:430px){.left-rail .hud{gap:4px}.record-stat strong{font-size:12px}.record-stat small{margin:0}.level-options button{padding:7px 3px;min-height:38px}.panel p{font-size:13px}.panel h1{font-size:24px}.level-options{gap:5px}#level-picker{margin-top:5px}#start{padding:10px 28px;margin:5px 0}.instructions{font-size:11px}.right-rail .meters{gap:7px}}
@media(max-height:300px){.record-stat{display:none}#stage-status{font-size:9px}.left-rail .hud{gap:3px}#upgrade-status{font-size:10px}#boss-status,#life-status{font-size:10px}}
@media(max-width:599px){.level-options{grid-template-columns:repeat(4,minmax(0,1fr))}}
#play-area{container-type:size}
@container (max-height:430px){
 .panel .eyebrow,.panel .keyboard,.panel .instructions{display:none}
 .panel h1{font-size:22px;letter-spacing:3px;margin:4px 0}
 .panel p{font-size:12px;line-height:1.35;margin:6px 0}
 #level-picker{margin:5px 0 2px}#level-picker legend{font-size:11px;margin-bottom:6px}
 .level-options button{min-height:38px;padding:6px 3px}.level-options{gap:5px}
 #level-description{font-size:12px}#start{padding:10px 24px;font-size:16px;margin:4px 0;min-height:42px}
 #guide{margin-top:4px}#guide summary{min-height:24px;font-size:11px}
}

/* Scrollable settings stay usable in short landscape screens. */
button:disabled{opacity:.38;cursor:default}.settings-backdrop{position:fixed;inset:0;z-index:50;background:#02080ce8;display:flex;align-items:center;justify-content:center;padding:12px;touch-action:auto}.settings-panel{width:min(680px,100%);max-height:100%;overflow-y:auto;overscroll-behavior:contain;padding:18px;border:1px solid #36585c;border-radius:12px;background:#0c171d;color:#e4f9f5;-webkit-user-select:none;user-select:none}.settings-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:12px}.settings-heading h2{font-size:18px;letter-spacing:2px;margin:0;color:var(--mint)}.settings-panel h3{font-size:11px;letter-spacing:1px;color:#95b6b8;margin:0 0 8px}.settings-panel button,#choose-level{background:#102329;border:1px solid #36585c;color:#d7eeea;border-radius:6px;min-height:44px;padding:10px 14px;touch-action:manipulation;font:inherit;font-size:12px}.settings-panel button[aria-pressed="true"]{border-color:var(--mint);color:var(--mint);background:#24463d}.settings-top{display:grid;grid-template-columns:1fr 2fr;gap:16px}.mode-choices{display:flex;gap:8px}.mode-choices button{flex:1}.settings-panel p{font-size:12px;line-height:1.5;color:#a6c5c6}.setting-toggle{display:flex;justify-content:space-between;align-items:center;padding:8px 0;border-bottom:1px solid #233a3d;font-size:13px;min-height:44px}.setting-toggle input{width:22px;height:22px;accent-color:var(--mint);margin:0 4px;cursor:pointer}.settings-panel .danger{border-color:#b66d65;color:#ffc4bc}#hard-level{width:100%;margin:8px 0}#reset-confirm{border:1px solid #b66d65;padding:12px;border-radius:6px;margin-top:10px}#settings-done{width:100%;margin-top:14px;background:var(--mint);color:#06201c;font-weight:bold}#settings-close{min-width:44px}#selection-summary{color:var(--mint)}#choose-level{margin:4px 0}#settings #level-picker legend{margin:0 0 8px}#settings #level-description{min-height:18px}#settings .level-options button{min-height:42px}.settings-panel *{box-sizing:border-box}#mode-help{padding:8px 0;border-bottom:1px solid #233a3d}#settings-open{white-space:nowrap}
@media(max-height:430px){.settings-panel{padding:12px 16px}.settings-heading{margin-bottom:8px}.settings-top{gap:12px}.settings-panel h3{margin-bottom:5px}.settings-panel p{margin:6px 0}.settings-backdrop{padding:8px}#settings #level-picker{margin-top:10px}}
@media(max-width:500px){.settings-top{grid-template-columns:1fr}.settings-heading h2{font-size:15px}#settings-open{font-size:10px}}
/* Mission constellations: each star is a touch-friendly mission. */
#arcade[data-screen="menu"] .panel{max-width:1000px;text-align:left;padding:12px 16px}#arcade[data-screen="menu"] .panel>h1,#arcade[data-screen="menu"] .panel>.eyebrow{display:none}#arcade[data-screen="menu"] #message{color:#9ab5c2;font-size:12px;margin:0 0 12px}#arcade[data-screen="menu"] #start{display:block;margin:12px auto 4px}#arcade[data-screen="menu"] .instructions,#arcade[data-screen="menu"] .keyboard{display:none}#stellar-map{width:100%}.map-heading{display:flex;align-items:center;justify-content:space-between;gap:16px}.map-heading .eyebrow{font-size:10px;letter-spacing:3px;color:#9ab5c2}.map-heading h2{font-size:clamp(24px,3.2vw,36px);font-weight:normal;letter-spacing:9px;color:#d7faff;margin:5px 0;text-shadow:0 0 30px #57d6ff55}.map-navigation{display:flex;align-items:center;gap:14px}.map-navigation button{border:1px solid #284652;background:#0a1821;color:#abdae8;border-radius:50%;width:44px;height:44px;font-size:21px}.map-navigation span{font-size:12px;color:#7e9eae;letter-spacing:2px}#map-description{color:#8daebc;font-size:12px;margin:0 0 8px!important}#star-chart{position:relative;width:100%;height:clamp(190px,35svh,360px);border:1px solid #1c3543;border-radius:14px;overflow:hidden;background:radial-gradient(ellipse at 46% 45%,#18395580,transparent 60%),radial-gradient(circle at 83% 20%,#294c6b33,transparent 25%),#060e17;isolation:isolate}#star-chart:before{content:'';position:absolute;inset:0;opacity:.4;background-image:radial-gradient(circle,#b3d8e8 1px,transparent 1.5px),radial-gradient(circle,#7aa0b6 .7px,transparent 1px);background-size:83px 71px,57px 113px;background-position:17px 29px,41px 9px}#map-lines,#map-stars{position:absolute;inset:0;width:100%;height:100%}#map-lines line{stroke:#446476;stroke-width:1.5;vector-effect:non-scaling-stroke}#map-lines line.charted{stroke:#72cfdf88}#map-lines line.uncharted{stroke:#34455288;stroke-dasharray:4 7}.mission-star{position:absolute;transform:translate(-50%,-50%);width:48px;height:48px;padding:0;background:transparent;border:1px solid transparent;border-radius:50%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:0;touch-action:manipulation;color:#abd9ef;z-index:2}.star-symbol{font-size:24px;line-height:24px;text-shadow:0 0 12px #a9e9ff}.star-number{font-size:10px;letter-spacing:1px;line-height:12px;background:#07121bc7;padding:0 3px;border-radius:3px}.mission-star.complete{color:#92d6c6}.mission-star.selected{color:#fff0c6;border-color:#efd4a255;background:#dac18a12;box-shadow:0 0 28px #f1cc6a22}.mission-star.selected .star-symbol{color:#ffe0a3;text-shadow:0 0 15px #ffe0a3}.mission-star.prize:not(:disabled){color:#e2bdfa}.mission-star:disabled{opacity:.36}.mission-star:disabled .star-symbol{text-shadow:none;font-size:18px}.chart-coordinate{position:absolute;bottom:7px;left:12px;font-size:8px;letter-spacing:2px;color:#567182;pointer-events:none}.map-legend{display:flex;gap:16px;flex-wrap:wrap;font-size:10px;letter-spacing:.5px;color:#7e9dab;padding:10px 0}.mission-card{display:grid;grid-template-columns:1.1fr 1fr;gap:20px;align-items:center;padding:12px 16px;border-left:2px solid #82d8dd;background:#10212b88;border-radius:0 8px 8px 0}.mission-card small{font-size:10px;letter-spacing:2px;color:#8caebb}.mission-card h3{font-size:17px;font-weight:normal;color:#e1f8ff;margin:5px 0}.mission-card p{font-size:11px!important;color:#93afbc;margin:0!important;line-height:1.5!important}#mission-reward{font-size:11px;line-height:1.6;color:#e3c7fa}#guide{max-width:100%;font-size:11px}#choose-level{width:100%;margin-top:12px}#map-stars button:focus-visible{outline:2px solid #fff0c6;outline-offset:2px}
@media(max-height:500px){#arcade[data-screen="menu"] .panel{padding:5px 10px}#arcade[data-screen="menu"] #message{display:none}.map-heading h2{font-size:23px;letter-spacing:6px}.map-heading .eyebrow{font-size:9px}.map-navigation button{width:36px;height:36px}.map-navigation{gap:8px}#map-description{font-size:10px!important}#star-chart{height:190px}.map-legend{padding:6px 0;font-size:9px;gap:12px}.mission-card{padding:8px 12px;gap:12px}.mission-card h3{font-size:14px}.mission-card p{font-size:10px!important}#mission-reward{font-size:10px}.mission-star{width:44px;height:44px}.star-symbol{font-size:21px}#arcade[data-screen="menu"] #start{font-size:14px;padding:10px 24px;margin:8px auto}#guide{margin-top:4px}}
@media(max-width:599px){.mission-card{grid-template-columns:1fr;gap:8px}.map-heading h2{letter-spacing:5px}.map-navigation{gap:6px}.map-navigation span{font-size:10px}.map-heading{gap:8px}.map-legend{gap:8px}.chart-coordinate{font-size:7px}.map-heading .eyebrow{letter-spacing:1px}}

.mission-star:disabled{opacity:.58}.mission-star:disabled .star-number{color:#a8bdc9}#map-lines line.uncharted{stroke:#4a657788}

.controls .shield.pulsar-active{color:#f6b0ff;border-color:#b16dc2;background:#2c1835}.controls .shield.pulsar-loading{color:#b599bc;background:#1d1425}.controls .shield.pulsar-active b{font-size:32px}.controls .shield.pulsar-active span{font-size:10px;white-space:nowrap}

.rank-panel{width:min(850px,100%)}.rank-panel .settings-heading small{font-size:10px;letter-spacing:2px;color:#95b6b8;display:block;margin-bottom:8px}.rank-entry{display:grid;grid-template-columns:1fr auto;gap:8px;align-items:center;padding:12px;background:#10232b;border-radius:8px}.rank-entry label{grid-column:1/-1;font-size:12px;color:#a6c5c6}.rank-entry input{width:100%;min-width:0;min-height:44px;font:inherit;font-size:15px;border:1px solid #36585c;border-radius:5px;background:#08151b;color:#e4f9f5;padding:10px;touch-action:manipulation}.rank-entry button{background:var(--mint);color:#06201c;font-weight:bold}.rank-table-wrap{overflow-x:auto;margin:16px 0;border:1px solid #28444c;border-radius:8px}.rank-panel table{width:100%;border-collapse:collapse;font-size:12px;text-align:left}.rank-panel caption{text-align:left;padding:12px;color:var(--mint);font-size:13px}.rank-panel th{font-size:10px;color:#95b6b8;background:#10232b;letter-spacing:1px;padding:12px 10px}.rank-panel td{padding:12px 10px;border-top:1px solid #233a3d;overflow-wrap:anywhere}.rank-panel tbody tr:first-child{color:#ffe18a}.rank-panel .rank-rules{font-size:11px;line-height:1.6}#rank-own{color:var(--mint)}#rank-status{color:#ffe18a}#rank-login{display:block;color:var(--mint);padding:12px 0;font-size:13px}#rank-live{font-size:10px;color:#a5ffdc;margin:4px 0;flex-shrink:0}#ranking{touch-action:pan-y}#ranking input{-webkit-user-select:text;user-select:text}#ranking button:disabled{opacity:.4}#ranking .settings-panel{touch-action:pan-y}@media(max-width:699px){.rank-entry{grid-template-columns:1fr}.rank-panel h2{font-size:14px}.tools #rank-open{font-size:10px;padding:6px}.rank-panel th,.rank-panel td{padding:10px 6px;font-size:10px}}

/* The mission menu fills its viewport; the chart takes the remaining height. */
#arcade[data-screen="menu"] header{min-height:36px;gap:8px}
#arcade[data-screen="menu"] #menu,#arcade[data-screen="menu"] #pause{display:none}
#arcade[data-screen="menu"] #overlay{padding:6px}
#arcade[data-screen="menu"] .panel{display:grid;grid-template-rows:minmax(0,1fr) auto;gap:6px;width:100%;height:100%;min-height:0;max-height:100%;max-width:1200px;padding:0;overflow:hidden;text-align:left;align-content:stretch}
#arcade[data-screen="menu"] .panel>.eyebrow,#arcade[data-screen="menu"] .panel>h1,#arcade[data-screen="menu"] #message,#arcade[data-screen="menu"] .instructions,#arcade[data-screen="menu"] .keyboard{display:none}
#arcade[data-screen="menu"] #stellar-map{display:grid;grid-template-rows:auto minmax(0,1fr);gap:5px;height:100%;min-height:0;overflow:hidden}
#arcade[data-screen="menu"] .map-heading{min-height:30px;margin:0;gap:8px}
#arcade[data-screen="menu"] .map-heading .eyebrow,#arcade[data-screen="menu"] #map-description,#arcade[data-screen="menu"] .chart-coordinate{display:none}
#arcade[data-screen="menu"] .map-heading h2{font-size:20px;line-height:1.1;letter-spacing:5px;margin:0}
#arcade[data-screen="menu"] .map-navigation{gap:9px}
#arcade[data-screen="menu"] .map-navigation button{width:32px;height:28px;font-size:18px;border-radius:6px;padding:0}
#arcade[data-screen="menu"] .map-navigation span{font-size:10px;letter-spacing:1px}
#arcade[data-screen="menu"] #star-chart{height:100%;min-height:0;max-height:none;border-radius:9px}
#arcade[data-screen="menu"] #map-lines,#arcade[data-screen="menu"] #map-stars{inset:12px;width:calc(100% - 24px);height:calc(100% - 24px)}
#arcade[data-screen="menu"] .mission-star{width:40px;height:40px;min-width:0;padding:0}
#arcade[data-screen="menu"] .star-symbol{font-size:19px;line-height:21px}
#arcade[data-screen="menu"] .star-number{font-size:9px;line-height:11px;letter-spacing:0}
#arcade[data-screen="menu"] .mission-star:disabled .star-symbol{font-size:17px}
.mission-launch{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:stretch;min-width:0}
#arcade[data-screen="menu"] .mission-card{display:grid;grid-template-columns:minmax(110px,.75fr) minmax(0,1fr);gap:10px;align-items:center;padding:6px 10px;min-width:0;min-height:46px;overflow:hidden}
#arcade[data-screen="menu"] .mission-card>div{min-width:0}
#arcade[data-screen="menu"] .mission-card small{display:block;font-size:9px;line-height:12px;letter-spacing:1px;white-space:nowrap}
#arcade[data-screen="menu"] .mission-card h3{font-size:13px;line-height:18px;margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#arcade[data-screen="menu"] #mission-description{display:none}
#arcade[data-screen="menu"] #mission-reward{font-size:10px;line-height:13px;margin:0;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}
#arcade[data-screen="menu"] #start{display:block;width:auto;min-height:44px;max-width:240px;margin:0;padding:8px 16px;font-size:13px;line-height:17px;letter-spacing:1px;align-self:stretch;white-space:normal}
#settings .settings-details{margin-top:12px;padding-top:10px;border-top:1px solid #233a3d}
#settings #guide{margin:0;padding:0}
#settings #credits{font-size:12px;color:#a6c5c6;line-height:1.6}
#settings #credits a{color:var(--mint);overflow-wrap:anywhere}
#settings .settings-details summary{cursor:pointer;color:var(--mint);text-align:left;min-height:32px;padding:6px 0;font-size:12px}
/* Pausing keeps a single clear action; mission navigation stays in the menu. */
#arcade[data-screen="paused"] #stellar-map,#arcade[data-screen="paused"] .mission-card{display:none}
#arcade[data-screen="paused"] .mission-launch{display:block}
@media(orientation:landscape) and (max-height:600px){
 #arcade[data-screen="menu"] header{min-height:32px;height:32px}
 #arcade[data-screen="menu"] .brand{font-size:13px;letter-spacing:2px}
 #arcade[data-screen="menu"] .tools{gap:5px}
 #arcade[data-screen="menu"] .tools .tool-label{display:none}
 #arcade[data-screen="menu"] .tools button{width:36px;height:30px;min-height:30px;padding:3px 6px;display:flex;align-items:center;justify-content:center}
 #arcade[data-screen="menu"] .tools .tool-icon{font-size:18px;line-height:22px}
 #arcade[data-screen="menu"] #overlay{padding:4px}
 #arcade[data-screen="menu"] .panel{gap:5px}
 #arcade[data-screen="menu"] .map-heading{min-height:26px}
 #arcade[data-screen="menu"] .map-heading h2{font-size:17px;letter-spacing:4px}
 #arcade[data-screen="menu"] #stellar-map{gap:4px}
 #arcade[data-screen="menu"] #start{font-size:12px;letter-spacing:.5px;padding:7px 12px;max-width:210px}
}
@media(orientation:landscape) and (max-height:320px){
 #arcade[data-screen="menu"] .mission-card{grid-template-columns:minmax(100px,.8fr) minmax(0,1fr);padding:4px 8px;min-height:42px}
 #arcade[data-screen="menu"] .mission-star{width:36px;height:36px}
 #arcade[data-screen="menu"] .star-symbol{font-size:17px;line-height:18px}
 #arcade[data-screen="menu"] .mission-card small{font-size:8px}
 #arcade[data-screen="menu"] .mission-card h3{font-size:12px}
 #arcade[data-screen="menu"] #mission-reward{font-size:9px;line-height:12px}
}

#arcade[data-screen="menu"][data-state="victory"] .panel,#arcade[data-screen="menu"][data-state="over"] .panel{grid-template-rows:auto minmax(0,1fr) auto}
#arcade[data-screen="menu"][data-state="victory"] #message,#arcade[data-screen="menu"][data-state="over"] #message{display:block;margin:0;padding:4px 8px;max-height:38px;overflow:hidden;font-size:11px;line-height:14px;color:var(--mint);background:#10232b;border-radius:4px}


.admin-login{display:inline-block;font-size:11px;color:var(--mint);padding:8px 0}#ranking .settings-panel{display:flex;flex-direction:column;max-height:calc(100dvh - 16px);overflow:hidden}#ranking .rank-table-wrap{min-height:50px;overflow:auto;flex:1}#ranking .rank-entry{padding:8px}#ranking .rank-rules{margin:6px 0}#ranking .rank-panel table{min-width:360px}@media(max-height:430px){#ranking .settings-heading{margin-bottom:6px}#ranking .settings-heading small{display:none}#ranking h2{font-size:16px}#ranking .rank-entry{grid-template-columns:1fr auto;padding:6px;gap:4px}#ranking .rank-entry label{grid-column:auto;display:none}#ranking input,#ranking .rank-entry button{min-height:34px;padding:6px}#ranking .rank-table-wrap{margin:4px 0}#ranking caption{display:none}#ranking th,#ranking td{padding:6px}#ranking p{margin:3px 0;font-size:10px}#ranking #rank-done{align-self:flex-end;min-height:30px;padding:5px 12px}}

@media(max-height:430px){#ranking #rank-close{width:28px;height:28px;min-height:28px;padding:3px}#ranking .rank-table-wrap{min-height:40px}#ranking p{line-height:1.25}#ranking .settings-panel{padding:10px 12px}#ranking .settings-heading,#ranking .rank-entry,#ranking #rank-done{flex-shrink:0}}

/* Keep settings actions visible in the short landscape viewport of a phone. */
@media (orientation:landscape) and (max-height:500px){
 #settings{padding:8px}
 #settings .settings-panel{width:min(760px,100%);max-height:calc(100dvh - 16px);display:flex;flex-direction:column;gap:6px;padding:10px 14px;overflow:hidden}
 #settings .settings-panel>*{flex-shrink:0}
 #settings .settings-heading{margin:0;min-height:28px}
 #settings .settings-heading h2{font-size:15px;letter-spacing:1px}
 #settings .settings-panel button{min-height:32px;padding:5px 10px;font-size:11px}
 #settings #settings-close{width:30px;min-width:30px;height:28px;min-height:28px;padding:2px;font-size:15px}
 #settings .settings-top{grid-template-columns:minmax(100px,1fr) minmax(0,3fr);gap:10px}
 #settings .settings-top h3{font-size:9px;line-height:1.2;margin:0 0 4px;letter-spacing:.4px}
 #settings .settings-top #sound{width:100%}
 #settings .mode-choices{gap:6px}
 #settings #admin-badge,#settings #mode-help,#settings #progress-status,#settings #test-options>p{display:none}
 #settings .setting-toggle{min-height:30px;padding:3px 0;font-size:12px}
 #settings .setting-toggle input{width:20px;height:20px}
 #settings #choose-level,#settings #reset-game{width:100%;margin:0}
 #settings .settings-details{display:grid;grid-template-columns:1fr 1fr;gap:12px;align-items:start;flex:0 1 auto;min-height:28px;max-height:min(32dvh,135px);margin:0;padding:0;overflow-y:auto;overscroll-behavior:contain}
 #settings .settings-details summary{min-height:28px;padding:6px 0;font-size:11px}
 #settings .settings-details p{font-size:11px;line-height:1.4;margin:6px 0}
 #settings #settings-done{min-height:32px;margin:0}
 #settings .admin-login{font-size:10px;padding:4px 0}
 #settings #reset-confirm{position:fixed;left:50%;top:50%;transform:translate(-50%,-50%);width:min(560px,calc(100vw - 32px));max-height:calc(100dvh - 32px);overflow:auto;margin:0;padding:12px;background:#101e25;box-shadow:0 0 0 100vmax #02080ce8;z-index:60}
 #settings #reset-confirm p{font-size:12px;line-height:1.4;margin:0 0 10px}
}

.score-entry-panel{width:min(520px,100%);text-align:center}.score-entry-panel>small{font-size:11px;letter-spacing:3px;color:#95b6b8}.score-entry-panel h2{color:var(--mint);font-size:22px;letter-spacing:2px;margin:12px 0}.score-entry-panel #score-entry-points{color:#ffe18a;font-size:16px}.score-entry-panel form{display:flex;flex-direction:column;gap:10px}.score-entry-panel label{font-size:12px}.score-entry-panel input{width:100%;min-height:44px;background:#08151b;border:1px solid #36585c;border-radius:6px;padding:8px;color:var(--mint);font:inherit;font-size:22px;text-align:center;letter-spacing:3px;-webkit-user-select:text;user-select:text}.score-entry-panel #score-entry-status{font-size:11px;min-height:14px;margin:0;color:#ffe18a}.score-entry-panel #score-entry-submit{background:var(--mint);color:#06201c;font-weight:bold}.score-entry-panel .mode-choices{justify-content:center}@media(orientation:landscape) and (max-height:500px){.score-entry-panel{padding:12px 16px}.score-entry-panel h2{font-size:16px;margin:6px 0}.score-entry-panel #score-entry-points{font-size:13px;margin:6px 0}.score-entry-panel form{gap:6px}.score-entry-panel input{min-height:34px;padding:4px;font-size:20px}.score-entry-panel button{min-height:32px;padding:5px 8px;font-size:11px}}
.tools .tool-icon svg{display:block}.tools #share-game{display:flex;align-items:center;justify-content:center;gap:3px}#share-dialog{z-index:70;touch-action:pan-y}.share-panel{width:min(560px,100%)}.share-panel h2{font-size:18px}.share-panel textarea{width:100%;resize:none;min-height:90px;border:1px solid #36585c;border-radius:6px;background:#08151b;color:var(--mint);font:inherit;font-size:13px;line-height:1.5;padding:10px;user-select:text;-webkit-user-select:text}.share-panel p{font-size:11px;line-height:1.5}.share-networks{display:flex;gap:8px;margin:10px 0}.share-networks a{flex:1;text-align:center;border:1px solid #36585c;border-radius:6px;padding:10px 6px;color:var(--mint);font-size:13px;text-decoration:none}.share-panel #share-copy{width:100%;background:var(--mint);color:#06201c}#share-status{min-height:16px;color:#ffe18a;margin-bottom:0}@media(orientation:landscape) and (max-height:500px){.share-panel{padding:10px 14px}.share-panel .settings-heading{margin-bottom:6px}.share-panel h2{font-size:15px}.share-panel textarea{min-height:66px;height:66px;font-size:11px;padding:6px}.share-networks{margin:6px 0}.share-networks a{padding:7px 4px;font-size:12px}.share-panel button{min-height:30px;padding:5px 8px;font-size:11px}.share-panel p{margin:6px 0}}

.share-preview{display:grid;grid-template-columns:140px 1fr;gap:10px;align-items:center}.share-preview img{width:100%;height:auto;border:1px solid #36585c;border-radius:6px}.share-panel #share-image{width:100%;margin-top:6px;color:var(--mint)}#share-download{display:block;text-align:center;padding:8px;color:var(--mint);font-size:12px}@media(orientation:landscape) and (max-height:500px){.share-preview{grid-template-columns:125px 1fr;gap:8px}.share-panel #share-image{margin-top:4px;min-height:26px;padding:3px 6px}#share-download{padding:5px;font-size:11px}.share-panel p{font-size:10px;line-height:1.3}.share-networks a{padding:5px 4px}.share-panel textarea{height:64px;min-height:64px}}

/* On short screens, open credits as a full-width view within Configuration. */
@media (orientation:landscape) and (max-height:500px){
 #settings .settings-panel:has(#credits[open])>:not(.settings-heading,.settings-details,#settings-done),
 #settings .settings-details:has(#credits[open])>#guide{display:none}
 #settings .settings-details:has(#credits[open]){display:block;max-height:none}
}
