@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap');
:root{color-scheme:dark;--mint:#80f9dc;--ink:#060b16;--muted:#81959f}*{box-sizing:border-box}body{margin:0;background:var(--ink);color:#f1f6ef;font-family:Manrope,Arial,sans-serif;overflow:hidden}button,a{-webkit-tap-highlight-color:transparent}button{font:inherit;cursor:pointer;color:inherit;border:1px solid #304449;background:#0a1820}button:focus-visible,a:focus-visible{outline:2px solid var(--mint);outline-offset:5px}button:hover{border-color:var(--mint);background:#15312e}canvas{position:fixed;inset:0;width:100%;height:100%;touch-action:none}.vignette{position:fixed;inset:0;pointer-events:none;background:linear-gradient(90deg,rgba(6,11,22,.7),transparent 68%)}header{position:fixed;z-index:3;top:0;width:100%;padding:30px 4%;display:flex;justify-content:space-between;align-items:center}.brand{display:flex;align-items:center;gap:12px;letter-spacing:3px;font-size:17px;font-weight:800;text-decoration:none;color:inherit}.brand-mark{font-size:30px;color:var(--mint)}.edition{font-size:10px;font-weight:500;letter-spacing:1.5px;color:var(--muted);margin-left:22px}.top-actions{display:flex;gap:10px}.top-actions button{border-radius:50%;height:38px;min-width:38px;font-size:16px;background:#09131c99}.top-actions #sound{border-radius:25px;font-size:10px;letter-spacing:1px;padding:0 16px}.screen{position:absolute;inset:0;padding:clamp(140px,21vh,240px) 7% 80px;pointer-events:none}.screen button{pointer-events:auto}.eyebrow{color:var(--mint);font-size:11px;letter-spacing:2.8px;font-weight:600;display:flex;align-items:center;gap:10px}.eyebrow>span{width:5px;height:5px;border-radius:100%;background:var(--mint)}h1{font-size:clamp(40px,5.7vw,88px);line-height:1.08;letter-spacing:-3px;font-weight:800;margin:25px 0}h1 span{color:var(--mint)}.intro{color:#9caeb5;font-size:15px;line-height:1.9;max-width:460px;margin-bottom:30px}.primary{background:var(--mint);border:0;color:#071c1a;border-radius:4px;padding:19px 26px;font-size:12px;letter-spacing:1.5px;font-weight:800;display:inline-flex;gap:48px;align-items:center;box-shadow:0 0 38px #80f9dc16}.primary:hover{color:white;background:#278d79}.primary span{font-size:22px}.best{margin-top:24px;font-size:9px;letter-spacing:1.8px;color:#6c8591}.best strong{margin-left:15px;font-size:12px;letter-spacing:2px;color:#b6c9cc;font-weight:500}.menu-bottom{position:absolute;left:7%;bottom:95px;display:flex;gap:44px}.menu-bottom b{font-size:10px;letter-spacing:1.7px;font-weight:600;color:#c1d2d2}.menu-bottom p{font-size:11px;color:#6e8895}.orbit-caption{position:absolute;right:9%;bottom:26%;font-size:10px;letter-spacing:3px;color:#b6d7d5}.orbit-caption span{display:block;font-size:8px;margin-top:9px;color:#546d78;letter-spacing:2px}footer{position:fixed;bottom:0;left:4%;right:4%;padding:20px 0;border-top:1px solid #1a2b35;font-size:9px;letter-spacing:2px;color:#526975;display:flex;justify-content:space-between}footer i{color:var(--mint);font-style:normal;margin-left:16px}.hidden{display:none!important}#hud{position:fixed;inset:96px 4% 25px;pointer-events:none}.hud-left,.hud-right,.hud-center{position:absolute;top:0}.hud-right{right:0;text-align:right}.hud-center{left:50%;transform:translateX(-50%);text-align:center;width:180px}small{font-size:10px;color:#839ca6;letter-spacing:2px}#health{display:flex;gap:6px;margin-top:12px}#health i{display:block;width:25px;height:5px;background:var(--mint);box-shadow:0 0 12px #80f9dc44}#health i.empty{background:#24343c;box-shadow:none}#score{display:block;font-size:26px;letter-spacing:2px;font-weight:500;margin-top:2px}.progress{height:3px;background:#24343c;margin-top:12px}.progress i{height:100%;display:block;background:var(--mint);width:0;transition:width .25s}#hint{position:absolute;bottom:20px;left:50%;transform:translateX(-50%);color:#92aaae;font-size:12px;text-align:center;width:65%}.ability{position:absolute;bottom:0;right:0;display:flex;align-items:end;gap:10px;flex-direction:column}#dash{pointer-events:auto;padding:12px 18px;font-size:11px;letter-spacing:1.8px;border-radius:4px}kbd{font:inherit;font-size:9px;padding:3px 5px;background:#243c43;margin-left:14px;color:#a5bec1}#dashState{font-size:9px;letter-spacing:2px;color:var(--mint)}#combo{position:absolute;left:50%;top:60px;transform:translateX(-50%);color:var(--mint);font-size:17px;letter-spacing:4px}#bossbar{position:absolute;bottom:65px;width:40%;left:30%;text-align:center}#bosshealth{background:#fe7f92}.overlay{position:fixed;inset:0;z-index:10;background:#030912bc;backdrop-filter:blur(12px);display:flex;align-items:center;justify-content:center;padding:22px}.panel{width:760px;max-width:100%;text-align:center}.panel .eyebrow{justify-content:center}h2{font-size:clamp(32px,5vw,56px);letter-spacing:-1.8px;line-height:1.2;margin:20px 0}.panel p{color:#9db2bb;font-size:15px;line-height:1.8;max-width:580px;margin:0 auto 28px;white-space:pre-line}#dialogActions{display:flex;justify-content:center;gap:12px;margin-top:25px}#dialogActions button{padding:16px 24px;border-radius:4px;font-size:12px;letter-spacing:1px}#choices{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}.choice{text-align:left;padding:25px 22px;border-radius:7px;background:linear-gradient(145deg,#11262c,#09151e);transition:transform .2s}.choice:hover{transform:translateY(-5px)}.choice .icon{color:var(--mint);font-size:30px;display:block;margin-bottom:25px}.choice b{display:block;font-size:15px;margin-bottom:12px}.choice span:last-child{font-size:12px;line-height:1.7;color:#95adb7;display:block}#toast{position:fixed;left:50%;top:25%;transform:translateX(-50%);pointer-events:none;color:var(--mint);font-size:20px;letter-spacing:4px;opacity:0;transition:opacity .3s;text-align:center;width:90%}body.playing .vignette{display:none}@media(min-width:1600px){.screen{padding-left:10%}.menu-bottom{left:10%}}@media(max-width:700px){header{padding:20px 5%}.brand{font-size:13px;letter-spacing:2px;gap:6px}.edition{display:none}.screen{padding:160px 7% 50px}h1{font-size:clamp(30px,7.6vw,52px);letter-spacing:-1.4px}.intro{font-size:13px;max-width:310px}.menu-bottom{bottom:75px;left:7%;right:7%;gap:12px;justify-content:space-between}.menu-bottom b{font-size:8px;letter-spacing:.6px}.menu-bottom p{font-size:9px;max-width:92px;line-height:1.6}.orbit-caption{display:none}footer{font-size:7px;letter-spacing:1px}footer span{display:none}.vignette{background:linear-gradient(90deg,#060b16bb,#060b1611)}#hud{inset:80px 5% 20px}.hud-center{width:100px}small{font-size:8px;letter-spacing:1px}#health i{width:15px}#score{font-size:21px}#hint{bottom:70px;font-size:11px;width:85%}#choices{gap:8px;grid-template-columns:1fr}.choice{padding:16px;display:grid;grid-template-columns:35px 1fr;gap:2px 10px}.choice .icon{grid-row:span 2;font-size:26px;margin:0}.choice b{margin:0;font-size:14px}.choice span:last-child{font-size:12px}#bossbar{width:70%;left:15%;bottom:110px}.panel p{font-size:13px}#dialogActions button{padding:14px 18px}h2{margin:14px 0}.ability{right:0}#dash kbd{display:none}.top-actions #sound{padding:0 11px;font-size:9px}}@media(max-height:650px){.screen{padding-top:105px}h1{font-size:44px;margin:15px 0}.intro{margin:12px 0}.best{margin-top:12px}.menu-bottom{display:none}.primary{padding:13px 24px}}
.meta-launch{display:flex;gap:10px;margin-top:25px;flex-wrap:wrap;pointer-events:auto}.meta-launch button{padding:11px 15px;font-size:11px;letter-spacing:.7px;border-radius:4px;background:#0a1d25b3}.account-state{color:#859ca5;font-size:12px;pointer-events:auto;margin-top:12px}.account-state a{color:var(--mint)}#remaining{display:block;font-size:9px;letter-spacing:1px;margin-top:6px}.hangar-panel{width:920px;max-width:100%;height:min(820px,90dvh);max-height:90dvh;overflow:hidden;display:flex;flex-direction:column;padding:32px;background:linear-gradient(145deg,#11232d,#070e19);border:1px solid #35505b;border-radius:12px}.hangar-top{display:flex;justify-content:space-between;align-items:start}.hangar-top h2{margin:12px 0 20px}.hangar-top>button{font-size:28px;border:0;background:none;padding:0 8px}.pilot-strip{display:flex;align-items:center;gap:18px;border-top:1px solid #29404b;border-bottom:1px solid #29404b;padding:15px 0;font-size:14px}.pilot-strip strong{color:var(--mint);margin-left:auto;font-size:20px}.pilot-strip button{padding:7px 10px;font-size:10px;border-radius:4px}.hangar-tabs{display:flex;gap:5px;margin:23px 0}.hangar-tabs button{padding:12px 18px;font-size:14px;border:0;background:transparent;border-bottom:2px solid transparent;color:#96acb6}.hangar-tabs button.active{border-color:var(--mint);color:var(--mint)}#hangarMessage{font-size:14px;color:#ffc277;line-height:1.6;margin-bottom:16px}#hangarMessage:empty{display:none}.shop-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}.item-card{border:1px solid #29404b;border-radius:8px;padding:18px 15px;background:#08151e}.item-card canvas{position:static;width:100%;height:90px;display:block}.item-card h3{font-size:14px;margin:12px 0 8px}.item-card p{font-size:12px;line-height:1.6;color:#8da8b5;min-height:57px}.item-card button{width:100%;padding:11px 4px;font-size:12px;border-radius:4px}.item-card button:disabled{opacity:.5;cursor:default}.item-card.equipped{border-color:#80f9dc88;background:#112e2c}.shop-heading{font-size:12px;letter-spacing:2px;color:#8eaab5;margin:24px 0 12px}.hangar-copy{font-size:14px;color:#9ab0bc;line-height:1.7}.daily-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:10px;margin:24px 0}.day-card{border:1px solid #2e4551;border-radius:8px;text-align:center;padding:18px 4px}.day-card.active{border-color:var(--mint);background:#153b33}.day-card.done{opacity:.5}.day-card span{display:block;font-size:12px;color:#9eb8c0}.day-card strong{display:block;margin:16px 0 4px;font-size:20px;color:var(--mint)}.daily-action{display:flex;align-items:center;gap:20px}.daily-action p{font-size:13px;color:#9eb8c0}.leader-table{width:100%;border-collapse:collapse;font-size:14px}.leader-table th{font-size:11px;letter-spacing:1px;color:#7f9ba8;font-weight:500;text-align:left;padding:12px;border-bottom:1px solid #36505c}.leader-table td{padding:15px 12px;border-bottom:1px solid #1b313b}.leader-table tr.mine{background:#143730;color:#a6ffe8}.leader-table th:last-child,.leader-table td:last-child{text-align:right}.empty-board{text-align:center;padding:45px 20px;color:#9fb3bd}.empty-board b{color:#d5eeeb;display:block;font-size:20px;margin-bottom:12px}.name-form{display:flex;gap:10px;margin:22px 0}.name-form input{min-width:0;flex:1;border:1px solid #486471;border-radius:4px;background:#0a1721;color:#efffee;padding:14px;font:inherit}.name-form button{padding:12px 20px}.saving-status{font-size:13px!important;color:var(--mint)!important;margin:18px auto 0!important}.saving-status button{padding:8px 12px;margin-left:10px;border-radius:4px;font-size:12px}.signin-link{display:inline-block;color:var(--mint);padding:14px 0}.practice{color:#ffc277!important}.menu-bottom{bottom:80px}.screen{padding-top:clamp(125px,17vh,200px)}@media(max-width:700px){.meta-launch{gap:6px;margin-top:18px;max-width:340px}.meta-launch button{font-size:9px;padding:10px}.hangar-panel{padding:20px 16px}.hangar-tabs{gap:0}.hangar-tabs button{padding:10px 12px;font-size:12px}.shop-grid{grid-template-columns:repeat(2,1fr)}.daily-grid{grid-template-columns:repeat(4,1fr)}.day-card{padding:12px 4px}.day-card strong{font-size:18px;margin-top:8px}.daily-action{flex-direction:column;align-items:start;gap:3px}.hangar-copy{font-size:13px}.leader-table td,.leader-table th{padding:12px 7px}.pilot-strip{gap:8px}.pilot-strip strong{font-size:17px}.screen{padding-top:125px}.menu-bottom{display:none}.account-state{font-size:11px}#remaining{font-size:8px}}@media(max-height:740px){.screen{padding-top:105px}h1{font-size:clamp(32px,4.5vw,60px);margin:16px 0}.intro{margin:12px 0 20px}.menu-bottom{display:none}.best{margin-top:14px}.meta-launch{margin-top:18px}}@media(max-height:560px){.screen{padding-top:85px}.intro{display:none}.account-state{margin-top:7px}.meta-launch{margin-top:12px}.primary{padding:12px 22px}.best{margin-top:10px}.screen h1{font-size:32px;margin:12px 0}}

.hangar-top,.pilot-strip,.hangar-tabs,#hangarMessage{flex-shrink:0}#hangarContent{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable;padding-right:4px}
#menu{overflow-y:auto;pointer-events:auto;padding-top:110px;padding-bottom:90px}.screen h1{font-size:clamp(32px,4vw,62px);margin:16px 0}.screen .intro{display:none}.screen .menu-bottom{display:none}.mode-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:9px;max-width:530px;margin-top:24px}.mode-grid button{position:relative;text-align:left;padding:14px 16px 14px 48px;border-radius:6px;background:#0b1a23ce;border-color:#29414c}.mode-grid button.active{border-color:var(--mint);background:#11322f}.mode-grid button>span{position:absolute;left:15px;top:18px;color:var(--mint);font-size:24px}.mode-grid b{display:block;font-size:15px;font-weight:600}.mode-grid small{display:block;margin-top:5px;font-size:11px;letter-spacing:0}.mode-brief{max-width:530px;min-height:40px;font-size:13px;line-height:1.6;color:#9bb1bb;margin:12px 0 16px}.screen .primary{padding:17px 26px}.screen .best{margin-top:18px}.screen .meta-launch{margin-top:18px}.leader-filters{display:flex;gap:8px;flex-wrap:wrap;margin:4px 0 20px}.leader-filters button{font-size:12px;padding:9px 13px;border-radius:20px;background:#11202c}.leader-filters button.active{border-color:var(--mint);color:var(--mint)}.star-map{position:relative;width:100%;height:270px;background:radial-gradient(ellipse at center,#172c3d,#080f1b);border:1px solid #304650;border-radius:10px;overflow:hidden;margin:14px 0}.star-map svg{position:absolute;inset:0;width:100%;height:100%}.star-map line{stroke:#31434e;stroke-width:.3;stroke-dasharray:1 1}.star-map line.open{stroke:var(--sector-color);opacity:.5;stroke-dasharray:none}.system-node{position:absolute;transform:translate(-50%,-50%);border:0;background:none!important;text-align:center;width:110px;padding:0;outline-offset:6px}.system-node>span{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:50%;background:#152633;border:1px solid #456071;font-size:20px;color:#849dab}.system-node>b{display:block;margin-top:7px;font-size:10px;letter-spacing:.2px;color:#7c929e}.system-node.available>span{color:var(--sector-color);border-color:var(--sector-color);box-shadow:0 0 23px color-mix(in srgb,var(--sector-color) 20%,transparent)}.system-node.available>b{color:#c0d4d6}.system-node.selected>span{outline:2px solid var(--sector-color);outline-offset:5px}.system-node.cleared>span{background:#19443c;color:#b6ffe0}.system-detail{padding:18px;background:#0c1b26;border:1px solid #2a414e;border-radius:8px}.system-detail h3{margin:0;font-size:19px}.system-detail .primary{font-size:11px;padding:13px 20px}.galaxy-victory{color:var(--mint);font-size:17px;padding:16px;border:1px solid var(--mint)}.hangar-tabs{overflow-x:auto;flex-shrink:0}.hangar-tabs button{white-space:nowrap}@media(max-width:700px){#menu{padding-top:105px}.screen h1{font-size:34px;letter-spacing:-1px}.mode-grid{margin-top:18px}.mode-grid button{padding:12px 10px 12px 39px}.mode-grid button>span{left:10px;font-size:21px}.mode-grid b{font-size:13px}.mode-grid small{font-size:9px}.mode-brief{font-size:12px;min-height:40px}.system-node{width:75px}.system-node>b{font-size:9px;line-height:1.3}.star-map{height:230px}.system-node>span{width:26px;height:26px;font-size:17px}.hangar-tabs button{font-size:11px;padding:10px}.leader-filters{gap:5px}.leader-filters button{font-size:10px;padding:8px 9px}.hangar-top h2{font-size:29px}.hangar-panel{padding:20px 14px}}@media(max-height:660px){#menu{padding-top:85px}.screen h1{font-size:30px}.screen .eyebrow{font-size:9px}.mode-grid{margin-top:15px}.mode-grid button{padding-top:10px;padding-bottom:10px}.mode-brief{margin:8px 0}.screen .best{margin-top:12px}.screen .meta-launch{margin-top:12px}}

/* Game start screen: the flight scene remains the dominant visual. */
#menu.game-menu{display:flex;align-items:center;padding:95px 7% 65px;pointer-events:none}.menu-console{width:400px;max-width:100%;pointer-events:auto}.game-menu h1{font-size:clamp(34px,4vw,58px);letter-spacing:.11em;margin:10px 0 34px;font-weight:500;text-shadow:0 0 45px #80f9dc33}.menu-insignia{font-size:35px;color:var(--mint);text-shadow:0 0 30px #80f9dc77}.game-menu .mode-grid{margin:0;gap:6px;grid-template-columns:1fr 1fr}.game-menu .mode-grid button{border-radius:0;background:#09172166;border-color:#284b5144;padding:16px 12px 16px 43px}.game-menu .mode-grid button.active{background:linear-gradient(90deg,#80f9dc22,transparent);border-color:#80f9dc88}.game-menu .mode-grid button>span{top:11px;left:12px}.game-menu .mode-grid b{font-size:14px;font-weight:500}.game-menu .mode-brief{font-size:13px;min-height:20px;margin:15px 0 24px;color:#8dacae}.game-menu #start{display:flex;justify-content:center;width:100%;font-size:16px;letter-spacing:4px;padding:20px;clip-path:polygon(0 0,96% 0,100% 25%,100% 100%,4% 100%,0 75%);border-radius:0}.game-menu .best{display:flex;justify-content:space-between;font-size:12px;margin-top:16px}.game-menu .best strong{font-size:14px;letter-spacing:1px}.game-menu .meta-launch{display:flex;gap:0;border-top:1px solid #28434b77;margin-top:28px;padding-top:9px}.game-menu .meta-launch button{flex:1;border:0;background:transparent;padding:14px 6px;font-size:12px;letter-spacing:1px;color:#a6bcc2}.game-menu .meta-launch button:hover{color:var(--mint);background:#80f9dc0c}.game-menu .account-state{font-size:12px;color:#627f88;line-height:1.5;margin-top:8px}.edition{display:none}.biome-brief{color:#b7d8d2;font-size:14px;line-height:1.7;border-left:2px solid var(--mint);padding-left:12px}.item-card p{font-size:13px}.shop-heading{font-size:14px}.vignette{background:linear-gradient(90deg,#060b1688,transparent 60%)}
@media(max-width:700px){#menu.game-menu{align-items:flex-end;padding:105px 6% 35px}.menu-console{width:100%;max-width:430px;margin:auto auto 0;padding:18px 14px 0;background:linear-gradient(0deg,#060b16ee,#060b16b0 75%,transparent)}.game-menu h1{font-size:32px;margin:8px 0 20px}.menu-insignia{display:none}.game-menu .mode-grid b{font-size:13px}.game-menu .mode-grid button{padding-top:13px;padding-bottom:13px}.game-menu .mode-brief{margin:12px 0 16px}.game-menu #start{padding:17px}.game-menu .meta-launch{margin-top:18px}.game-menu .meta-launch button{font-size:11px}.game-menu .account-state{font-size:11px}footer{display:none}}
@media(max-height:650px){#menu.game-menu{align-items:flex-start;padding-top:90px;padding-bottom:24px}.menu-insignia{display:none}.game-menu h1{font-size:30px;margin:0 0 18px}.game-menu .mode-grid button{padding-top:11px;padding-bottom:11px}.game-menu .mode-brief{margin:10px 0 14px}.game-menu #start{padding:14px}.game-menu .meta-launch{margin-top:15px}.game-menu .account-state{margin:4px 0}.game-menu .best{margin-top:12px}.menu-console{margin-top:0}}

.hangar-top h2{font-size:32px;letter-spacing:.02em;margin:10px 0 16px}.hangar-top .eyebrow{font-size:12px}.hangar-tabs{margin:16px 0}.shop-grid{padding-bottom:8px}
/* Atlas: distinct route topology, readable mission risk and tactical detail. */
.galaxy-selector{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin:0 0 20px}.galaxy-tab{text-align:left;padding:15px 16px;background:#0a162266;border:1px solid #283b4d;border-radius:7px;position:relative;overflow:hidden}.galaxy-tab.active{border-color:var(--galaxy-color);background:linear-gradient(130deg,color-mix(in srgb,var(--galaxy-color) 13%,#0b1423),#0b1423)}.galaxy-tab small{font-size:10px;letter-spacing:1.4px;color:#728c9e}.galaxy-tab b{display:block;font-size:16px;margin:9px 0 5px;color:#d8e8eb;font-weight:500}.galaxy-tab.active b{color:var(--galaxy-color)}.galaxy-tab>span{font-size:11px;color:#829eac}.galaxy-completion{display:flex;align-items:center;gap:10px;margin-top:13px}.galaxy-completion i{display:block;flex:1;height:2px;background:linear-gradient(90deg,var(--galaxy-color) var(--complete),#29404b var(--complete))}.galaxy-completion em{font-size:10px;font-style:normal;color:#9bb4bf}.galaxy-workspace{display:grid;grid-template-columns:minmax(0,1.65fr) minmax(240px,1fr);gap:18px}.galaxy-chart{min-width:0}.galaxy-chart .star-map{margin:0;height:auto;aspect-ratio:1.55;border-color:#36536377;border-radius:5px}.map-texture{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;pointer-events:none}.map-coordinates{position:absolute;inset:14px 15px auto;display:flex;justify-content:space-between;font-size:9px;color:#9ab6c088;letter-spacing:1.5px;pointer-events:none}.star-map svg{pointer-events:none}.star-map path{fill:none;stroke:#566e8659;stroke-width:.3}.star-map path.chosen{stroke:#9abcca77;stroke-width:.4}.star-map path.open{stroke:var(--sector-color);stroke-width:.4;opacity:.7}.star-map path.jump{stroke-dasharray:1.3 1.1;stroke:#b298dc77}.star-map path.jump.open{stroke:var(--sector-color);animation:route-signal 6s linear infinite}.galaxy-chart .system-node{width:95px;z-index:1}.galaxy-chart .system-node>span{height:31px;width:31px;border:1px solid #69829c66;background:#0a1425;font-size:19px;color:#8298aa;box-shadow:0 0 0 5px #07102077}.galaxy-chart .system-node>b{font-size:10px;margin-top:9px;text-shadow:0 2px 6px #000;line-height:1.25;color:#9aabb8}.galaxy-chart .system-node>small{display:block;font-size:7px;letter-spacing:1.1px;margin-top:4px;color:#64828b}.galaxy-chart .system-node.available>span{color:var(--sector-color);border-color:var(--sector-color);box-shadow:0 0 24px color-mix(in srgb,var(--sector-color) 24%,transparent),0 0 0 5px #07102077}.galaxy-chart .system-node.available>b{color:#e3f3ef}.galaxy-chart .system-node.selected>span{outline:1px solid var(--sector-color);outline-offset:5px}.galaxy-chart .system-node.cleared>span{background:#133d36}.galaxy-chart .mission-elite>span{border-radius:6px}.galaxy-chart .mission-boss>span{border-radius:7px;width:39px;height:39px;box-shadow:0 0 0 5px #07102077,0 0 0 6px #bc9cd633}.galaxy-chart .system-node:hover>span{transform:scale(1.14);transition:transform .15s}.map-legend{display:flex;flex-wrap:wrap;gap:12px;margin-top:14px;color:#89a8b5;font-size:10px}.map-description{color:#839ba9;font-size:12px;line-height:1.7;margin:10px 0 0}.mission-detail{padding:22px 19px;margin:0;border-radius:5px;display:flex;flex-direction:column;background:radial-gradient(ellipse at 90% 0,color-mix(in srgb,var(--biome-color) 11%,transparent),transparent 65%),#0a1622;border-color:#35505e66;min-width:0}.mission-crest{display:flex;align-items:center;gap:12px;margin:0 0 17px;color:var(--biome-color)}.mission-crest>span{font-size:31px;line-height:1}.mission-crest>small{font-size:10px;letter-spacing:1.5px;color:var(--biome-color)}.mission-detail h3{font-size:27px;font-weight:500;letter-spacing:-.5px;line-height:1.1}.system-biome{font-size:12px;color:#91a9b9;margin:9px 0 20px}.mission-stats{display:flex;gap:30px;padding:14px 0;border-top:1px solid #2b415377;border-bottom:1px solid #2b415377}.mission-stats small{font-size:9px;letter-spacing:1.5px}.mission-stats strong{display:block;font-size:21px;font-weight:500;color:#d0e4e7;margin-top:7px}.mission-rule{color:#c4d9df;font-size:13px;line-height:1.6;margin:17px 0 3px}.mission-detail .hangar-copy{font-size:12px;line-height:1.7;color:#91a7b5;margin:14px 0}.enemy-intel{display:flex;gap:5px;flex-wrap:wrap;margin:0 0 18px}.enemy-intel span{font-size:10px;color:#9bb4c3;background:#1e33465c;border:1px solid #344b5a55;padding:5px 7px;border-radius:3px}.mission-detail .primary{margin-top:auto;justify-content:center;padding:14px 7px;font-size:11px;letter-spacing:1px;min-height:44px;gap:0;white-space:normal;line-height:1.4}.mission-detail button:disabled{background:#1e2e3c;color:#7c93a0;cursor:default;box-shadow:none}.reward-note{font-size:9px;letter-spacing:0;color:#748e9a;line-height:1.6;margin-top:11px}.galaxy-footer{display:flex;justify-content:space-between;gap:12px;margin:20px 0 6px;padding-top:15px;border-top:1px solid #263b4755;font-size:10px;letter-spacing:.5px;color:#7596a5}.galaxy-footer span:last-child{font-size:11px;letter-spacing:0}.hangar-panel{width:1080px}.hangar-panel:has(.galaxy-workspace) .hangar-top h2{font-size:28px}.hangar-panel:has(.galaxy-workspace) .hangar-top .eyebrow{display:none}.hangar-panel:has(.galaxy-workspace) .pilot-strip{padding:10px 0}.hangar-panel:has(.galaxy-workspace) .hangar-tabs{margin:10px 0 18px}@keyframes route-signal{to{stroke-dashoffset:-18}}
@media(max-width:780px){.galaxy-workspace{grid-template-columns:1fr}.galaxy-selector{gap:5px;margin-bottom:13px}.galaxy-tab{padding:12px 8px}.galaxy-tab small{font-size:8px;letter-spacing:.3px}.galaxy-tab b{font-size:12px;line-height:1.35;min-height:32px;margin:6px 0}.galaxy-tab>span{display:none}.galaxy-completion{margin-top:7px}.galaxy-chart .star-map{aspect-ratio:1.25}.galaxy-chart .system-node{width:74px}.galaxy-chart .system-node>b{font-size:9px}.galaxy-chart .system-node>small{font-size:6px;letter-spacing:.7px}.galaxy-chart .system-node>span{width:26px;height:26px;font-size:17px}.galaxy-chart .mission-boss>span{width:32px;height:32px}.map-coordinates{font-size:7px;inset:12px 10px auto;letter-spacing:.7px}.mission-detail{padding:18px}.mission-detail h3{font-size:25px}.mission-crest{margin-bottom:10px}.mission-detail .primary{margin-top:10px}.galaxy-footer{flex-direction:column;gap:7px}.galaxy-chart .map-legend{gap:10px;font-size:9px}.hangar-panel{padding:20px 14px}.map-description{font-size:11px}.reward-note{font-size:10px}}
@media(prefers-reduced-motion:reduce){.star-map path{animation:none!important}.system-node>span{transition:none!important}}
/* Round 1 review: keep the full route map visible on a laptop. */
.hangar-panel:has(.galaxy-workspace){padding:22px 26px}.hangar-panel:has(.galaxy-workspace) .hangar-top h2{font-size:24px;line-height:1.2;margin:0 0 12px}.hangar-panel:has(.galaxy-workspace) .pilot-strip{padding:8px 0;font-size:12px}.hangar-panel:has(.galaxy-workspace) .pilot-strip strong{font-size:17px}.hangar-panel:has(.galaxy-workspace) .hangar-tabs{margin:5px 0 12px}.hangar-panel:has(.galaxy-workspace) .hangar-tabs button{padding:9px 16px;font-size:12px}.galaxy-selector{margin-bottom:14px}.galaxy-tab{padding:10px 13px}.galaxy-tab b{margin:6px 0 3px;font-size:14px}.galaxy-tab small{font-size:9px}.galaxy-tab>span{font-size:10px}.galaxy-completion{margin-top:8px}.galaxy-chart .star-map{height:clamp(245px,39vh,355px);aspect-ratio:auto}.map-description{margin-top:7px;font-size:11px}.map-legend{margin-top:10px}.mission-detail{padding:16px}.mission-crest{margin-bottom:10px}.mission-detail h3{font-size:25px}.system-biome{margin:7px 0 13px}.mission-stats{padding:9px 0}.mission-stats strong{font-size:18px;margin-top:4px}.mission-rule{font-size:12px;margin-top:12px}.mission-detail .hangar-copy{font-size:11px;margin:10px 0}.enemy-intel{margin-bottom:12px}.galaxy-footer{margin-top:12px;padding-top:10px}.reward-note{font-size:9px}
@media(max-width:780px){.hangar-panel:has(.galaxy-workspace){padding:18px 12px}.galaxy-tab{padding:10px 7px}.galaxy-tab b{font-size:12px}.galaxy-chart .star-map{height:auto;aspect-ratio:1.25}.mission-detail .hangar-copy{font-size:13px}.mission-rule{font-size:13px}.reward-note{font-size:11px}}

.galaxy-tab>span{display:none}.galaxy-chart .system-node>b{font-size:11px}.mission-detail .hangar-copy{font-size:12px}.game-menu .menu-console{animation:console-arrive .5s ease-out}@keyframes console-arrive{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}@media(max-width:780px){.galaxy-chart .system-node>b{font-size:10px}.mission-detail .hangar-copy{font-size:13px}}@media(prefers-reduced-motion:reduce){.game-menu .menu-console{animation:none}}

/* Round 3: flight debrief, keyboard focus, scroll-safe dialogs. */
.panel{max-height:calc(100dvh - 44px);overflow-y:auto;overscroll-behavior:contain;padding:10px 5px;scrollbar-width:thin}.panel:has(.result-stats){width:620px;background:radial-gradient(ellipse at 50% 0,#173c3a66,transparent 70%),#07121bcc;border:1px solid #446a7044;border-radius:10px;padding:30px 35px}.panel:has(.result-stats) h2{font-size:38px;letter-spacing:-1px;margin:15px 0}.panel:has(.result-stats)>p{font-size:13px;line-height:1.7;margin-bottom:18px;max-width:440px}.result-score{padding:16px 0 20px}.result-score small{color:var(--mint);font-size:11px;letter-spacing:2.5px}.result-score strong{display:block;font-size:58px;line-height:1.2;font-weight:500;letter-spacing:1px;margin-top:7px;color:#e9fff6;text-shadow:0 0 35px #80f9dc33}.result-metrics{display:grid;grid-template-columns:repeat(3,1fr);border-top:1px solid #33515b77;border-bottom:1px solid #33515b77;padding:18px 0}.result-metrics b{display:block;font-size:22px;font-weight:500;color:#bdd8dd}.result-metrics span{display:block;font-size:9px;color:#7696a2;letter-spacing:1.6px;margin-top:8px}.panel:has(.result-stats) #dialogActions{margin-top:22px}.panel:has(.result-stats) #dialogActions button{min-height:44px;padding:14px 20px}.panel:has(.result-stats) .saving-status{font-size:12px!important;margin-top:14px!important}.system-node:focus-visible>span{outline:2px solid white!important;outline-offset:6px}button:disabled{cursor:default}body.playing header .brand{opacity:.7}body.playing header .brand:hover{opacity:1}
@media(max-width:700px){.panel:has(.result-stats){padding:24px 18px}.panel:has(.result-stats) h2{font-size:29px}.result-score strong{font-size:46px}.result-metrics span{font-size:8px;letter-spacing:.6px}.result-metrics b{font-size:19px}.panel:has(.result-stats) #dialogActions{flex-direction:column}.panel:has(.result-stats) #dialogActions button{justify-content:center}.panel p{font-size:14px}#bossName{font-size:9px;letter-spacing:.5px;line-height:1.5;display:block}}

.panel:has(.result-stats.loss){background:radial-gradient(ellipse at 50% 0,#51263555,transparent 70%),#0c101bcc;border-color:#94506544}.result-stats.loss .result-score small{color:#f3a1ae}.result-stats.loss .result-score strong{text-shadow:0 0 35px #ff8c9922}

/* The menu already carries the game title. Keep the header brand for flight. */
body:has(#menu:not(.hidden)) header .brand{visibility:hidden;pointer-events:none}

/* Shared station geometry keeps navigation stable across every tab. */
.hangar-panel,.hangar-panel:has(.galaxy-workspace){padding:22px 26px}
.hangar-top .eyebrow{display:none}
.hangar-top h2,.hangar-panel:has(.galaxy-workspace) .hangar-top h2{font-size:24px;line-height:1.2;margin:0 0 12px}
.hangar-top>button{width:40px;height:40px;margin-top:-8px;border-radius:6px}
.pilot-strip,.hangar-panel:has(.galaxy-workspace) .pilot-strip{padding:8px 0;font-size:12px}
.pilot-strip strong,.hangar-panel:has(.galaxy-workspace) .pilot-strip strong{font-size:17px;font-variant-numeric:tabular-nums}
.hangar-tabs,.hangar-panel:has(.galaxy-workspace) .hangar-tabs{margin:5px 0 12px}
.hangar-tabs button,.hangar-panel:has(.galaxy-workspace) .hangar-tabs button{padding:12px 16px;font-size:12px;min-height:44px}
#hangarContent{scrollbar-width:thin;scrollbar-color:#42606b transparent}
.shop-filters{display:flex;flex-wrap:wrap;gap:6px;margin:18px 0 20px}
.shop-filters button{min-height:40px;padding:9px 17px;border-radius:5px;font-size:12px;color:#a5bbc5;background:#0b1823;border-color:#29414f}
.shop-filters button.active{color:#b5ffec;border-color:#72dac0;background:#173830}
.shop-heading{font-size:11px;letter-spacing:2px;margin:0 0 12px;color:#aac0c9}
.item-card{display:flex;flex-direction:column;padding:16px 14px;background:radial-gradient(ellipse at 50% 0,color-mix(in srgb,var(--item-color) 9%,transparent),transparent 65%),#09151f;transition:border-color .15s}
.item-card canvas{height:auto;aspect-ratio:2;flex-shrink:0;background:radial-gradient(ellipse,color-mix(in srgb,var(--item-color) 8%,transparent),transparent 70%)}
.item-card h3{min-height:36px;line-height:1.4;margin:12px 0 4px}
.item-card p{margin:0 0 16px;min-height:63px;color:#a8bdc8;font-size:12px}
.item-card button{margin-top:auto;min-height:42px;letter-spacing:.5px;font-size:11px}
.item-card.equipped{border-color:#73d7bc;background:linear-gradient(150deg,#1c3c38,#0b1b24)}
.item-card.equipped button:disabled{opacity:1;color:#a8f6df;border-color:#345a53;background:#16312e}
.game-menu .account-state{color:#89a4af}.game-menu .best{color:#9cb4bd}
.top-actions button{min-width:44px;height:44px}
.choice{display:flex;flex-direction:column;border-color:#35505d}.choice b{min-height:40px}.choice .icon{margin-bottom:18px}
@media(max-width:700px){
 .overlay{padding:10px}.hangar-panel,.hangar-panel:has(.galaxy-workspace){height:94dvh;max-height:94dvh;padding:18px 12px}
 .hangar-tabs button,.hangar-panel:has(.galaxy-workspace) .hangar-tabs button{padding:11px 10px;font-size:11px}
 .shop-filters{gap:5px;margin:12px 0 16px}.shop-filters button{padding:8px 10px;font-size:11px;min-height:40px}
 .item-card{padding:12px 10px}.item-card h3{font-size:13px}.item-card p{font-size:11px;min-height:56px;line-height:1.6}.shop-grid{gap:8px}
 .choice{display:grid}.choice b{min-height:0}.choice .icon{margin-bottom:0}
 #hud{top:85px}.hud-center{top:61px;width:150px}#combo{top:108px;font-size:14px}#health{gap:4px}#health i{width:14px}
 .game-menu .menu-console{padding-bottom:env(safe-area-inset-bottom)}
}
@media(prefers-reduced-motion:reduce){.item-card,.choice{transition:none}.choice:hover{transform:none}}

#joystick{display:none;position:absolute;bottom:24px;left:6px;width:116px;height:116px;border:1px solid #7ae6cb55;border-radius:50%;background:radial-gradient(circle,#193b3c66,#081a2288);pointer-events:auto;touch-action:none;user-select:none;-webkit-user-select:none}
#stickKnob{position:absolute;left:50%;top:50%;width:44px;height:44px;transform:translate(-50%,-50%);border-radius:50%;border:1px solid #9effe2bb;background:#60bcaa55;box-shadow:0 0 22px #80f9dc15;pointer-events:none}
.stick-axis{position:absolute;inset:22px;border:1px dashed #96d6ce33;border-radius:50%;pointer-events:none}#joystick small{position:absolute;top:calc(100% + 10px);left:0;width:100%;text-align:center;font-size:8px;letter-spacing:1.5px;color:#95b9bd;pointer-events:none}
body.touch-controls #joystick{display:block}body.touch-controls #hint{bottom:170px}body.touch-controls .ability{bottom:30px}body.touch-controls #dash{min-height:64px;padding:16px}body.touch-controls #dash kbd{display:none}
@media(pointer:coarse),(max-width:700px){#joystick{display:block}#hint{bottom:170px;font-size:11px}.ability{bottom:30px}#dash{min-height:64px;padding:16px}#dash kbd{display:none}#bossbar{bottom:165px}}

@media(min-width:701px){.item-card canvas{max-height:105px;object-fit:contain}}

.assembly-preview{position:relative;min-height:130px;margin-bottom:16px;background:radial-gradient(ellipse,#16373866,transparent 72%),#07131d;border:1px solid #2b4550;border-radius:8px;overflow:hidden}.assembly-preview canvas{position:static;display:block;width:100%;height:175px;object-fit:contain}.preview-pulse{position:absolute;right:12px;bottom:12px;min-height:36px;padding:8px 12px;border-radius:4px;font-size:10px;letter-spacing:1px;background:#0b2229dd}
.choice{justify-content:flex-start;align-items:stretch;min-height:250px}.choice .icon{height:42px;line-height:42px;margin-bottom:18px}.choice b{min-height:42px;margin-bottom:8px}.upgrade-value{display:block;color:#80f9dc;font-size:17px;font-weight:500;margin-bottom:14px}.choice span:last-child{line-height:1.65}.choice:focus-visible{outline-offset:-3px}.panel:has(.choice){padding:16px 8px}.panel:has(.choice) h2{font-size:40px}.panel:has(.choice)>p{margin-bottom:24px}
body.left-hand #joystick{left:auto;right:6px}body.left-hand .ability{right:auto;left:0}
@media(max-width:700px){header{padding:14px 4%}.brand{font-size:10px;letter-spacing:1px;gap:4px}.brand-mark{font-size:24px}.top-actions{gap:5px}.top-actions button{min-width:36px;height:38px}.top-actions #sound{font-size:8px;padding:0 9px}.assembly-preview canvas{height:140px}.choice{min-height:0;grid-template-columns:32px 1fr;padding:15px}.choice .icon{grid-row:span 3;height:auto;margin:0}.choice b{min-height:0}.upgrade-value{font-size:14px;margin-bottom:5px}.panel:has(.choice) h2{font-size:29px}.panel:has(.choice)>p{font-size:13px}}
@media(pointer:coarse) and (orientation:landscape){#hud{inset:64px 16px 12px}.hud-center{top:0}.hud-left{left:140px}.hud-right{right:140px}#joystick{bottom:18px}.ability{bottom:34px}#hint{bottom:12px;width:50%}#bossbar{bottom:40px}#combo{top:42px}header{padding:9px 18px}.brand{font-size:12px}.top-actions button{height:34px;min-width:34px}.top-actions{gap:6px}}
@media(pointer:coarse){#hud{bottom:max(18px,env(safe-area-inset-bottom))}}
#dialogActions{flex-wrap:wrap}
@media(min-width:850px){.assembly-preview{float:right;width:42%;margin:0 0 12px 18px;min-height:118px}.assembly-preview canvas{height:118px}.assembly-preview~.hangar-copy{max-width:53%;font-size:12px;margin:8px 0 14px}.assembly-preview~.shop-filters{max-width:54%;margin:12px 0}.assembly-preview~.shop-heading{clear:both;padding-top:6px}.assembly-preview~.shop-grid .item-card canvas{max-height:85px}}
@media(max-height:500px) and (orientation:landscape){body.touch-controls #hud{inset:64px 16px 12px}body.touch-controls .hud-center{top:0}body.touch-controls .hud-left{left:140px}body.touch-controls .hud-right{right:140px}body.touch-controls #joystick{bottom:18px}body.touch-controls .ability{bottom:34px}body.touch-controls #hint{bottom:12px;width:50%}body.touch-controls #bossbar{bottom:40px}body.touch-controls #combo{top:42px}}

@media(min-width:850px){.assembly-preview~.shop-grid .item-card p{min-height:48px}}

.training-link{display:block;margin:12px auto 0;padding:8px 12px;font-size:12px;color:var(--muted,#91adb4);border:0;background:transparent;letter-spacing:.08em}.training-link:hover{color:#80f9dc}

.route-bonus{font-size:12px;line-height:1.6;color:#b7f1db;padding:10px 12px;border-left:2px solid #80f9dc;background:#80f9dc08}.panel{max-height:90dvh;overflow-y:auto;padding:8px}#dialog{z-index:11}

#buildStatus{color:#b5a9df;font-size:10px;line-height:1.6;margin-top:9px;max-width:190px;letter-spacing:.2px}@media(max-width:700px){#buildStatus{font-size:9px;max-width:130px}}
/* Flight preparation: equipment choices beside a live combat demonstration. */
.build-dialog{background:#040a12ed;backdrop-filter:blur(4px)}
.build-dialog .panel{width:1040px;max-height:94dvh;text-align:left;padding:28px 32px;background:#09121b;border:0;border-radius:0;box-shadow:none;overflow:auto}
.build-dialog .panel>.eyebrow{justify-content:flex-start;color:#8ba0ad;font-size:10px;letter-spacing:2px}
.build-dialog h2{font-size:32px;letter-spacing:-1px;margin:12px 0 8px}
.build-dialog .panel>p{font-size:13px;max-width:none;margin:0 0 28px;line-height:1.6;color:#90a3b1}
.build-dialog #choices{display:block}
#buildWorkbench{--module-color:#a9c7db;display:grid;grid-template-columns:minmax(0,1.25fr) minmax(290px,1fr);gap:38px}
.build-stage{min-width:0;position:relative;border-top:1px solid #2c3d48;border-bottom:1px solid #2c3d48;background:#07101a}
.build-stage-top{display:flex;justify-content:space-between;gap:12px;padding:16px 18px 0;font-size:10px;letter-spacing:1.8px;color:#708897}
#buildFamily{color:var(--module-color)}
#buildDemo{position:static;width:100%;height:auto;aspect-ratio:600/390;display:block;pointer-events:none}
.build-caption{padding:0 22px 24px;min-height:105px}.build-demo-label{font-size:9px;letter-spacing:1.6px;color:#7f939f}
.build-caption h3{font-size:23px;font-weight:500;line-height:1.3;margin:7px 0 9px;letter-spacing:-.5px;color:#f0f2ed}
#buildDemoDetail{font-size:12px;color:var(--module-color)}
.build-picker{display:flex;flex-direction:column;min-width:0}
.build-picker-label{font-size:10px;letter-spacing:1.6px;color:#91a5b1;display:flex;justify-content:space-between;padding:16px 0 20px}
.build-picker-label span{color:#566c7c}
#buildOptions{display:flex;flex-direction:column;gap:0}
.build-option{position:relative;display:flex;align-items:center;gap:14px;width:100%;padding:21px 13px 21px 0;background:transparent;border:0;border-top:1px solid #243441;border-radius:0;text-align:left;box-shadow:none;transition:background .15s}
.build-option:last-child{border-bottom:1px solid #243441}.build-option:hover{background:#172632}.build-option.selected{background:#14222d}.build-option.selected:before{content:'';position:absolute;left:0;top:17px;bottom:17px;width:2px;background:var(--module-color)}
.build-option svg{flex:none;width:26px;height:26px;margin-left:16px;fill:none;stroke:#788e9e;stroke-width:1.5;stroke-linecap:square;stroke-linejoin:miter}.build-option.selected svg{stroke:var(--module-color)}
.build-option>span{flex:1}.build-option b{display:block;font-size:15px;font-weight:600;line-height:1.4;color:#d7e1e5}.build-option small{display:block;font-size:12px;letter-spacing:0;line-height:1.6;color:#849aa9;margin-top:5px}.build-option i{font-size:10px;font-style:normal;color:#576f7f;margin-left:4px}
.build-option.selected b{color:#fff}.build-option:focus-visible{outline:1px solid var(--module-color);outline-offset:-2px}
.build-pair{margin-top:auto;padding:22px 0 4px}.build-pair>span{display:block;font-size:9px;letter-spacing:1.5px;color:#6e8799}.build-pair strong{display:block;font-size:14px;font-weight:500;color:var(--module-color);margin:9px 0 5px}.build-pair small{font-size:11px;letter-spacing:0;color:#7f95a2}
.build-dialog #dialogActions{justify-content:space-between;border-top:1px solid #263744;padding-top:18px;margin-top:24px}.build-dialog #dialogActions button{border-radius:0;min-width:110px;font-size:11px}.build-dialog #dialogActions .primary{background:#d8e5e4;color:#0c1c26;box-shadow:none;min-width:200px}.build-dialog #dialogActions .primary:hover{background:#fff}.build-dialog button:disabled{opacity:.5;cursor:wait}
@media(max-width:700px){.build-dialog{padding:0}.build-dialog .panel{padding:22px 20px;max-height:100dvh;height:100dvh;width:100%;overflow-y:auto}.build-dialog h2{font-size:27px;margin:9px 0 6px}.build-dialog .panel>p{font-size:12px;margin-bottom:18px}#buildWorkbench{grid-template-columns:1fr;gap:14px}.build-stage-top{font-size:9px;padding:12px 12px 0}.build-stage{display:grid;grid-template-columns:1fr}.build-stage canvas{max-height:190px;object-fit:contain}.build-caption{min-height:0;padding:0 14px 14px}.build-caption h3{font-size:19px;margin:5px 0 6px}.build-demo-label{display:none}.build-picker-label{padding:3px 0 12px;font-size:9px}.build-option{padding:12px 8px 12px 0;gap:11px}.build-option b{font-size:14px}.build-option small{font-size:11px;margin-top:3px}.build-option svg{width:23px;height:23px;margin-left:13px}.build-pair{padding:15px 0 0}.build-pair>span{display:inline;font-size:8px;margin-right:8px}.build-pair strong{display:inline;font-size:12px}.build-pair small{display:block;margin-top:5px;font-size:10px}.build-dialog #dialogActions{margin-top:18px;padding-top:14px}.build-dialog #dialogActions button{padding:14px 20px}.build-dialog #dialogActions .primary{min-width:170px}}
@media(max-height:650px) and (min-width:701px){.build-dialog .panel{padding:18px 26px}.build-dialog h2{font-size:25px}.build-dialog .panel>p{margin-bottom:12px}.build-stage canvas{max-height:230px;object-fit:contain}.build-caption{min-height:0;padding-bottom:14px}.build-caption h3{font-size:20px}.build-option{padding-top:13px;padding-bottom:13px}.build-pair{padding-top:12px}.build-dialog #dialogActions{margin-top:14px;padding-top:12px}}
@media(min-width:701px){.build-stage canvas{max-height:min(32vh,280px);object-fit:contain}.build-caption{min-height:88px;padding-bottom:18px}.build-option{padding-top:17px;padding-bottom:17px}.build-dialog .panel>p{margin-bottom:20px}.build-pair{padding-top:18px}.build-dialog #dialogActions{margin-top:18px}}

.brand-mark{display:inline-flex;flex:none;line-height:0}.brand-mark svg{width:34px;height:34px}.menu-insignia svg{display:block;width:70px;height:70px}.menu-insignia{line-height:0}@media(max-width:700px){.brand-mark svg{width:27px;height:27px}.menu-insignia svg{width:54px;height:54px}}

/* Floating pad never intercepts a new touch; the playfield owns the gesture. */
#joystick,body.touch-controls #joystick,body.left-hand #joystick{display:none;position:fixed;right:auto;bottom:auto;width:108px;height:108px;transform:translate(-50%,-50%);pointer-events:none;opacity:.65;z-index:4}
#joystick.engaged,body.touch-controls #joystick.engaged{display:block}#joystick small{display:none}#space{touch-action:none}.top-actions button,#dash{touch-action:manipulation}
@media(max-width:700px){#dialogActions{flex-wrap:wrap}.panel #dialogActions button{min-height:44px}}
#dialogActions:has(button:nth-child(4)){display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}#dialogActions:has(button:nth-child(4)) button{white-space:normal;line-height:1.5}#dialogActions:has(button:nth-child(4)) button:last-child{grid-column:1/-1}@media(max-width:450px){#dialogActions:has(button:nth-child(4)){grid-template-columns:1fr}#dialogActions:has(button:nth-child(4)) button{padding:11px 14px}}

/* Stack battle messages so wrapped sector names cannot overlap the combo. */
#combatFeedback{position:fixed;left:5%;right:5%;top:25%;display:flex;flex-direction:column;align-items:center;gap:10px;pointer-events:none;text-align:center}
body.playing #combatFeedback{top:164px}
#combatFeedback #combo,#combatFeedback #toast{position:static;transform:none;width:100%;max-width:720px;line-height:1.4;overflow-wrap:anywhere}
#combatFeedback #combo{font-size:14px;letter-spacing:2px}
#combatFeedback #combo:empty,body:not(.playing) #combo{display:none}
#combatFeedback #toast{font-size:18px;letter-spacing:2px}
@media(max-width:700px){body.playing #combatFeedback{top:202px}#combatFeedback #combo{font-size:12px;letter-spacing:1.5px}#combatFeedback #toast{font-size:16px;letter-spacing:1.5px}}
@media(pointer:coarse) and (orientation:landscape){body.playing #combatFeedback{top:116px}}
@media(max-height:500px) and (orientation:landscape){body.touch-controls.playing #combatFeedback{top:116px}}

#dash{position:relative;overflow:hidden;--charge:100%}#dash::after{content:'';position:absolute;bottom:0;left:0;height:3px;width:var(--charge);background:var(--mint);pointer-events:none}#dash.recharging::after{background:#88aeb3}

#weaponStatus{font-size:10px;line-height:1.5;color:#b7c9ff;letter-spacing:.5px;margin-top:4px}#weaponStatus:empty{display:none}

#weaponStatus{position:absolute;bottom:130px;left:0;max-width:150px;text-shadow:0 1px 4px #000;font-size:11px}

@media(pointer:coarse),(max-width:700px){#hud:has(#bossbar:not(.hidden)) #hint{bottom:220px}}

.atlas-reward{padding:12px 0;color:#ead6a1;border-top:1px solid #ead6a133;font-size:12px;line-height:1.6}.completion-reward{display:block;color:#ffe6aa;margin-top:10px;font-size:13px;line-height:1.6}

/* One continuous hangar catalog: four items per section, two per row on phones. */
.shop-intro{display:grid;grid-template-columns:1fr 1fr;gap:24px;align-items:center;margin-bottom:28px}
.shop-intro .assembly-preview{float:none;width:100%;margin:0;min-height:0}.shop-intro .assembly-preview canvas{height:118px}.shop-intro .hangar-copy{margin:0;max-width:360px}
.shop-section{clear:both;margin:0 0 32px}.shop-section+.shop-section{padding-top:24px;border-top:1px solid #29404b}.shop-section .shop-heading{margin-bottom:14px;font-size:13px}.shop-section .shop-grid{grid-template-columns:repeat(4,minmax(0,1fr));padding:0}.shop-section .item-card{min-width:0}.shop-section .item-card button{min-height:44px}
.elite-reward{display:grid;grid-template-columns:130px 1fr auto;gap:18px;align-items:center;margin-top:16px;padding:18px;border:1px solid #b7a26a55;border-radius:8px;background:linear-gradient(110deg,#ead6a10b,transparent)}
.elite-reward canvas{position:static;width:130px;height:78px;object-fit:contain}.elite-reward h3{margin:6px 0;font-size:19px}.elite-reward small{color:#ead6a1;font-size:10px;letter-spacing:1px}.elite-reward p{margin:0;font-size:13px;line-height:1.6;color:#a8bdc8}.elite-reward button{padding:12px 16px;min-height:44px;font-size:11px;border-color:#ead6a155;color:#ead6a1}.elite-reward button:disabled{cursor:default;opacity:.65}
@media(max-width:700px){.shop-intro{grid-template-columns:1fr;gap:12px;margin-bottom:24px}.shop-intro .assembly-preview{grid-row:1}.shop-intro .assembly-preview canvas{height:100px}.shop-intro .hangar-copy{font-size:12px}.shop-section .shop-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.shop-section .item-card h3{font-size:14px;min-height:40px}.shop-section .item-card p{font-size:12px;min-height:76px}.shop-section .item-card canvas{min-height:72px}.shop-section{margin-bottom:24px}.elite-reward{grid-template-columns:76px 1fr;gap:12px;padding:14px}.elite-reward canvas{width:76px;height:76px}.elite-reward button{grid-column:1/-1;width:100%}.elite-reward small{font-size:10px;letter-spacing:.5px}}

/* Landscape phones: the floating stick needs no reserved side lanes. */
.rotate-hint{display:none}
@media(max-width:700px) and (orientation:portrait){.rotate-hint{display:block;font-size:11px;color:#90a9b0;margin:12px 0 0}}
@media(orientation:landscape) and (max-height:600px){
 body.touch-controls header{padding:6px max(16px,env(safe-area-inset-right)) 6px max(16px,env(safe-area-inset-left))}
 body.touch-controls .brand{font-size:11px}body.touch-controls .brand-mark{width:24px;height:24px}
 body.touch-controls .top-actions button{height:34px;min-width:34px;padding:6px 10px;font-size:10px}
 body.touch-controls #hud{inset:50px max(18px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(18px,env(safe-area-inset-left))}
 body.touch-controls .hud-left{left:0;top:0}body.touch-controls .hud-right{right:0;top:0}body.touch-controls .hud-center{top:0;width:28%;left:36%;transform:none}
 body.touch-controls #hud small{font-size:9px;letter-spacing:1px}body.touch-controls #score{font-size:22px}body.touch-controls #health{margin-top:7px;gap:4px}body.touch-controls #health i{width:18px;height:5px}
 body.touch-controls #buildStatus{font-size:9px;margin-top:4px}body.touch-controls #remaining{margin-top:4px}body.touch-controls .hud-center .progress{margin-top:5px;height:3px}
 body.touch-controls .ability{bottom:14px;right:0}body.touch-controls.left-hand .ability{right:auto;left:0}body.touch-controls #dash{min-height:44px;padding:10px 16px;font-size:11px}body.touch-controls #dashState{font-size:9px;margin-top:4px}
 body.touch-controls #weaponStatus{bottom:4px;left:0;font-size:9px}body.touch-controls.left-hand #weaponStatus{left:auto;right:0}
 body.touch-controls #bossbar{bottom:5px;left:30%;width:40%}body.touch-controls #hint,body.touch-controls #hud:has(#bossbar:not(.hidden)) #hint{bottom:35px;left:25%;width:50%;transform:none;font-size:10px}
 body.touch-controls.playing #combatFeedback{top:103px;gap:3px}body.touch-controls #combatFeedback #toast{font-size:13px;letter-spacing:1px;max-width:65%}body.touch-controls #combatFeedback #combo{font-size:10px}
 body.touch-controls #menu.game-menu{padding:48px 24px 10px;overflow-y:auto;justify-content:flex-start;pointer-events:auto}
 body.touch-controls .menu-console{width:460px;max-width:100%;margin:0 auto;padding:0}body.touch-controls .menu-insignia{display:none}body.touch-controls .menu-console h1{font-size:28px;margin:0 0 12px}body.touch-controls .mode-grid button{padding:10px 14px 10px 43px;min-height:40px}body.touch-controls .mode-grid button>span{top:7px}body.touch-controls #footer{display:none}body.touch-controls .mode-brief{margin:8px 0;font-size:11px}body.touch-controls #start{padding:10px 20px;min-height:40px}body.touch-controls .training-link{padding:7px}body.touch-controls .best{display:none}body.touch-controls .meta-launch{margin-top:6px}body.touch-controls .account-state{margin-top:6px}
 body.touch-controls #dialog.overlay{padding:12px}body.touch-controls .panel{max-height:calc(100dvh - 24px);overflow-y:auto;padding:20px}body.touch-controls .panel h2{font-size:26px;margin:10px 0}body.touch-controls .panel>p{font-size:13px;margin:10px 0}body.touch-controls #dialogActions{margin-top:12px}body.touch-controls #dialogActions button{padding:10px;min-height:40px}
}

/* The HUD overlays the playfield; only actual controls intercept input. */
:root{--safe-top:env(safe-area-inset-top,0px);--safe-right:env(safe-area-inset-right,0px);--safe-bottom:env(safe-area-inset-bottom,0px);--safe-left:env(safe-area-inset-left,0px)}
body.playing header{pointer-events:none}body.playing header .brand{pointer-events:none}body.playing header button{pointer-events:auto}
.hud-left,.hud-center,.hud-right,#hint,#bossbar,#weaponStatus{transition:opacity .12s ease;text-shadow:0 1px 5px #060b16}
@media(display-mode:standalone),(display-mode:fullscreen){
 header{top:env(safe-area-inset-top);padding-left:max(18px,env(safe-area-inset-left));padding-right:max(18px,env(safe-area-inset-right))}
 #hud{margin-top:env(safe-area-inset-top);margin-bottom:env(safe-area-inset-bottom)}
 .overlay{padding-top:max(12px,env(safe-area-inset-top));padding-bottom:max(12px,env(safe-area-inset-bottom));padding-left:max(12px,env(safe-area-inset-left));padding-right:max(12px,env(safe-area-inset-right))}
}

.shop-preview-toggle{display:none}
/* Short landscape screens need a station layout, not a scaled desktop dialog. */
@media(orientation:landscape) and (max-height:650px){
 #hangar.overlay{padding:8px max(8px,env(safe-area-inset-right)) 8px max(8px,env(safe-area-inset-left));padding-top:max(8px,env(safe-area-inset-top));padding-bottom:max(8px,env(safe-area-inset-bottom))}
 #hangar .hangar-panel{width:100%;height:100%;max-height:100%;padding:8px 14px;border-radius:8px;display:grid;grid-template-columns:minmax(0,1fr) auto 44px;grid-template-rows:44px 44px auto minmax(0,1fr);column-gap:10px;overflow:hidden}
 #hangar .hangar-top,#hangar .hangar-top>div{display:contents}
 #hangar .hangar-top h2{grid-column:1;grid-row:1;align-self:center;margin:0;font-size:19px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 #hangar .hangar-top>button{grid-column:3;grid-row:1;width:44px;height:44px;margin:0;font-size:26px}
 #hangar .pilot-strip{grid-column:2;grid-row:1;border:0;padding:0;gap:10px;margin:0;min-width:0}
 #hangar #pilotName{display:none}#hangar .pilot-strip strong{font-size:16px;white-space:nowrap}#hangar #rename{min-height:40px;font-size:10px;padding:8px}
 #hangar .hangar-tabs{grid-row:2;grid-column:1/-1;margin:0;border-bottom:1px solid #29404b;overflow-y:hidden;gap:0}
 #hangar .hangar-tabs button{font-size:12px;min-height:44px;padding:10px 18px}
 #hangarMessage{grid-row:3;grid-column:1/-1;margin:4px 0;font-size:11px;max-height:40px;overflow:auto}
 #hangarContent{grid-row:4;grid-column:1/-1;min-height:0;min-width:0;padding:10px 4px 12px 0;overflow-y:auto;touch-action:pan-y}
 #hangar .shop-intro{display:block;margin:0 0 6px}#hangar .shop-preview-toggle{display:block;min-height:40px;padding:8px 12px;font-size:11px;color:var(--mint)}
 #hangar .shop-intro:not(.expanded)>.hangar-copy,#hangar .shop-intro:not(.expanded)>.assembly-preview{display:none}
 #hangar .shop-intro.expanded{display:grid;grid-template-columns:1fr 260px;gap:8px}#hangar .shop-intro.expanded .shop-preview-toggle{grid-column:1/-1}#hangar .shop-intro.expanded .assembly-preview{grid-row:auto}#hangar .shop-intro .assembly-preview canvas{height:85px}
 #hangar .shop-section .shop-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:9px}#hangar .shop-section .item-card{padding:9px;display:flex;flex-direction:column}#hangar .item-card canvas{height:60px;min-height:0}#hangar .item-card h3{font-size:12px;min-height:0;margin:5px 0}#hangar .item-card p{font-size:11px;min-height:0;margin:4px 0 8px;line-height:1.4;flex:1}#hangar .item-card button{min-height:40px;font-size:10px;padding:8px 3px}#hangar .shop-heading{margin:8px 0;font-size:11px}#hangar .shop-section{margin-bottom:16px}#hangar .shop-section+.shop-section{padding-top:12px}
 #hangar .galaxy-selector{gap:8px;margin-bottom:10px}#hangar .galaxy-tab{padding:8px 10px;min-height:58px}#hangar .galaxy-tab>b{font-size:12px;min-height:0;margin:0 0 4px}#hangar .galaxy-tab>small:first-child{display:none}#hangar .galaxy-tab>small:last-child{font-size:8px;letter-spacing:0;margin-top:4px}#hangar .galaxy-completion{margin-top:4px}#hangar .galaxy-completion em{font-size:10px}
 #hangar .galaxy-workspace{grid-template-columns:minmax(0,1.5fr) minmax(220px,1fr);gap:10px;align-items:start}
 #hangar .galaxy-chart .star-map{height:clamp(190px,calc(100dvh - 205px),340px);aspect-ratio:auto}#hangar .galaxy-chart .system-node{width:80px}#hangar .galaxy-chart .system-node>b{font-size:10px;margin-top:5px}#hangar .galaxy-chart .system-node>small{font-size:6px;margin-top:2px}#hangar .galaxy-chart .system-node>span{width:26px;height:26px;font-size:17px}
 #hangar .mission-detail{padding:10px}#hangar .mission-crest{order:0;margin:0 0 5px;gap:7px}#hangar .mission-crest>span{font-size:20px}#hangar .mission-crest>small{font-size:8px;letter-spacing:.7px}#hangar .mission-detail h3{order:1;font-size:19px}#hangar .system-biome{order:2;margin:5px 0;font-size:10px}#hangar .mission-stats{order:3;padding:5px 0;gap:20px}#hangar .mission-stats strong{font-size:15px}#hangar .mission-detail>.primary{order:4;min-height:44px;margin:8px 0 0;font-size:11px}#hangar .mission-detail>.mission-rule,#hangar .mission-detail>.hangar-copy,#hangar .mission-detail>.enemy-intel,#hangar .mission-detail>.route-bonus,#hangar .mission-detail>.reward-note{order:5;font-size:11px;line-height:1.5}
 #hangarContent:has(.daily-grid),#hangarContent:has(.leader-table){display:flex;flex-direction:column;gap:8px}
 #hangarContent:has(.daily-grid)>*,#hangarContent:has(.leader-table)>*{flex-shrink:0}
 #hangar .daily-action{order:0;flex-direction:row;align-items:center;gap:14px}#hangar .daily-action .primary{min-height:44px;padding:10px 16px;font-size:12px}#hangar .daily-action p{font-size:10px;margin:0}
 #hangar .daily-grid{order:1;grid-template-columns:repeat(7,minmax(0,1fr));gap:7px;margin:0}#hangar .day-card{padding:12px 4px}#hangar .day-card strong{font-size:20px;margin:8px 0}#hangar .day-card span{font-size:9px}#hangarContent>.hangar-copy{font-size:11px;line-height:1.5;margin:4px 0;order:2}
 #hangar .leader-filters{order:0;gap:7px;margin:0}#hangar .leader-filters button{min-height:40px;padding:8px 14px;font-size:11px}#hangar .leader-table{order:1;font-size:12px}#hangar .leader-table th,#hangar .leader-table td{padding:10px 8px}
}
@media(orientation:landscape) and (max-height:650px){
 #hangar .galaxy-tab{padding:6px 10px;font-size:0}#hangar .galaxy-tab>b{line-height:16px}#hangar .galaxy-tab>small:last-child{display:block;line-height:10px}#hangar .galaxy-completion{height:12px}
 #hangar .galaxy-chart .star-map{height:clamp(174px,calc(100dvh - 205px),340px)}
 #hangar .mission-detail{padding:8px}#hangar .mission-stats small{font-size:8px;line-height:10px;display:block}#hangar .mission-stats strong{line-height:17px;margin-top:1px}#hangar .mission-stats{padding:4px 0}#hangar .system-biome{line-height:14px;margin:4px 0}
}
@media(orientation:landscape) and (max-height:650px){
 #hangarContent{position:relative}#hangar .shop-intro:not(.expanded){position:absolute;right:4px;top:10px;margin:0;z-index:1}#hangar .shop-section:first-of-type .shop-heading{height:40px;display:flex;align-items:center;margin:0 0 6px}
}

/* Passive charge telemetry: never intercepts flight gestures. */
#pulseCharge{--charge:100%;display:flex;align-items:center;justify-content:flex-end;gap:6px;margin-top:4px;height:18px;color:#6e969c;pointer-events:none}
#pulseCharge svg{width:14px;height:16px;fill:none;stroke:currentColor;stroke-width:1.7;flex:none}
.pulse-track{display:block;width:54px;height:3px;background:#2a424c;overflow:hidden}.pulse-track i{display:block;height:100%;width:var(--charge);background:currentColor}
#pulseState{font-size:11px;line-height:1;width:11px;text-align:center}#pulseCharge.ready{color:var(--mint)}#pulseCharge.shielded{color:#a3eaff}
@media(orientation:landscape) and (max-height:650px){#pulseCharge{height:14px;margin-top:2px}.pulse-track{width:44px}#pulseCharge svg{height:13px;width:12px}}
/* Keep result actions visible on short landscape screens. */
@media(orientation:landscape) and (max-height:650px){
 #dialog:has(.result-stats){padding:max(8px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left))}
 #dialog .panel:has(.result-stats){width:760px;max-height:100%;padding:16px 22px;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px 20px;overflow-y:auto}
 #dialog .panel:has(.result-stats)>.eyebrow{grid-row:1;grid-column:1/-1;font-size:10px;letter-spacing:2px}
 #dialog .panel:has(.result-stats)>h2{grid-row:2;grid-column:1;font-size:28px;line-height:1.15;text-align:left;margin:6px 0 0}
 #dialog .panel:has(.result-stats)>#dialogText{grid-row:3;grid-column:1;font-size:12px;line-height:1.5;text-align:left;margin:0;max-width:none;align-self:start}
 #dialog .result-stats{display:contents}#dialog .result-score{grid-row:2/4;grid-column:2;padding:0;align-self:center}#dialog .result-score small{font-size:9px;letter-spacing:1.5px}#dialog .result-score strong{font-size:42px;line-height:1.1;margin:4px 0 0}
 #dialog .result-metrics{grid-row:4;grid-column:1/-1;padding:10px 0}#dialog .result-metrics b{font-size:21px}#dialog .result-metrics span{font-size:8px;letter-spacing:.7px;margin-top:4px}
 #dialog .panel:has(.result-stats)>#choices:empty{display:none}
 #dialog .panel:has(.result-stats)>#dialogActions{grid-row:5;grid-column:1/-1;display:flex;flex-direction:row;flex-wrap:wrap;justify-content:center;gap:8px;margin:0;padding-top:2px}
 #dialog .panel:has(.result-stats)>#dialogActions button{min-height:44px;padding:10px 16px;font-size:11px;letter-spacing:.8px}
 #dialog .panel:has(.result-stats)>.saving-status{grid-row:6;grid-column:1/-1;font-size:10px!important;line-height:1.4;margin:0!important;max-width:100%}#dialog .panel:has(.result-stats) .completion-reward{font-size:10px;margin-top:4px}
}

/* Keep settings usable in short standalone/PWA viewports. */
@media (orientation:landscape) and (max-height:650px){
 #dialog.settings-dialog .panel{padding:12px 18px;max-height:100%;overflow-y:auto}
 #dialog.settings-dialog h2{font-size:26px;margin:8px 0}
 #dialog.settings-dialog .eyebrow{font-size:9px;letter-spacing:1.5px}
 #dialog.settings-dialog .panel>p{font-size:12px;margin:0 0 10px}
 #dialog.settings-dialog #dialogActions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:10px}
 #dialog.settings-dialog #dialogActions button{min-height:44px;padding:9px;font-size:10px;letter-spacing:.5px}
 #dialog.settings-dialog #dialogActions button:last-child{grid-column:auto}
}
@media (max-width:450px){
 #dialog.settings-dialog .panel{padding:16px 8px}
 #dialog.settings-dialog h2{font-size:28px}
 #dialog.settings-dialog #dialogActions{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
 #dialog.settings-dialog #dialogActions button{min-height:44px;font-size:10px;padding:10px 6px}
}

#dialog.settings-dialog #dialogActions .primary{justify-content:center}
/* Identity belongs at the screen edge, away from the launch controls. */
#menu #accountState{position:fixed;right:max(24px,env(safe-area-inset-right));bottom:max(16px,env(safe-area-inset-bottom));left:auto;margin:0;max-width:min(310px,45vw);text-align:right;font-size:10px;line-height:1.6;opacity:.8;pointer-events:none}
#menu #accountState>span{display:block}#menu #accountState>span:first-child{color:#c1d6da;font-size:11px}
#hangar.galaxy-screen .hangar-tabs,#hangar.galaxy-screen .pilot-strip{display:none}
#hangar.galaxy-screen .hangar-panel{max-width:1400px}
@media(orientation:landscape) and (max-height:650px){
 #hangar.galaxy-screen .hangar-panel{grid-template-columns:minmax(0,1fr) 44px;grid-template-rows:44px auto minmax(0,1fr)}
 #hangar.galaxy-screen .hangar-top>button{grid-column:2}
 #hangar.galaxy-screen #hangarMessage{grid-row:2}
 #hangar.galaxy-screen #hangarContent{grid-row:3;padding-top:4px}
 #hangar.galaxy-screen .galaxy-chart .star-map{height:clamp(190px,calc(100dvh - 150px),420px)}
 #dialog.build-dialog{padding:max(8px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left))}
 #dialog.build-dialog .panel{width:1100px;height:100%;max-height:100%;padding:8px 14px;display:grid;grid-template-rows:14px 30px 22px minmax(0,1fr) 52px;gap:4px;overflow:hidden}
 #dialog.build-dialog .eyebrow{font-size:8px;letter-spacing:1.4px}
 #dialog.build-dialog h2{font-size:23px;margin:0;line-height:30px}
 #dialog.build-dialog .panel>p{font-size:11px;line-height:18px;margin:0;max-width:none}
 #dialog.build-dialog #choices{min-height:0;display:block;overflow:hidden}
 #dialog.build-dialog #buildWorkbench{height:100%;min-height:0;grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);gap:18px}
 #dialog.build-dialog .build-stage{display:grid;grid-template-rows:20px minmax(0,1fr) auto;min-height:0;overflow:hidden}
 #dialog.build-dialog .build-stage-top{padding:4px 10px;font-size:8px}
 #dialog.build-dialog .build-stage canvas{position:static;width:100%;height:100%;min-height:0;max-height:none;object-fit:contain}
 #dialog.build-dialog .build-caption{min-height:0;padding:3px 10px 6px}
 #dialog.build-dialog .build-demo-label{display:none}
 #dialog.build-dialog .build-caption h3{font-size:15px;margin:0 0 3px}
 #dialog.build-dialog #buildDemoDetail{font-size:10px;line-height:1.3}
 #dialog.build-dialog .build-picker{min-height:0;display:flex;flex-direction:column}
 #dialog.build-dialog .build-picker-label{font-size:8px;padding:2px 0 5px}
 #dialog.build-dialog #buildOptions{min-height:0;flex:1;display:grid;grid-template-rows:repeat(3,minmax(44px,1fr))}
 #dialog.build-dialog .build-option{padding:5px 6px 5px 0;gap:8px;min-height:44px}
 #dialog.build-dialog .build-option svg{width:20px;height:20px;margin-left:10px}
 #dialog.build-dialog .build-option b{font-size:12px;line-height:1.3}
 #dialog.build-dialog .build-option small{font-size:10px;line-height:1.3;margin-top:2px}
 #dialog.build-dialog .build-pair{padding:4px 0 0;margin:0;line-height:1.2}
 #dialog.build-dialog .build-pair>span{display:inline;font-size:8px;margin-right:6px}
 #dialog.build-dialog .build-pair strong{display:inline;font-size:10px;margin:0}
 #dialog.build-dialog .build-pair small{display:none}
 #dialog.build-dialog #dialogActions{margin:0;padding:7px 0 0;display:flex;justify-content:space-between;gap:12px}
 #dialog.build-dialog #dialogActions button{min-height:44px;padding:10px 20px;margin:0;justify-content:center}
}
@media(orientation:portrait) and (max-width:700px){
 #menu #accountState{max-width:80vw;font-size:9px;bottom:max(10px,env(safe-area-inset-bottom))}
 #dialog.build-dialog .panel{display:flex;flex-direction:column;padding:16px;gap:6px}
 #dialog.build-dialog h2{margin:0;font-size:24px}
 #dialog.build-dialog .panel>p{margin:0;font-size:11px;line-height:1.4}
 #dialog.build-dialog #choices{min-height:0;overflow-y:auto;flex:1}
 #dialog.build-dialog #buildWorkbench{gap:8px}
 #dialog.build-dialog .build-stage canvas{max-height:110px}
 #dialog.build-dialog .build-caption h3{font-size:16px}
 #dialog.build-dialog .build-caption{padding-bottom:8px}
 #dialog.build-dialog .build-stage-top{padding-top:6px}
 #dialog.build-dialog .build-picker-label{padding-bottom:5px}
 #dialog.build-dialog .build-option{padding-top:9px;padding-bottom:9px}
 #dialog.build-dialog .build-pair{padding-top:6px}
 #dialog.build-dialog #dialogActions{flex-shrink:0;margin:0;padding-top:8px}
}
@media(orientation:landscape) and (max-height:650px){
 body #menu.game-menu{padding:48px max(24px,env(safe-area-inset-right)) 14px max(24px,env(safe-area-inset-left));align-items:center;justify-content:flex-start;overflow:hidden}
 body #menu .menu-console{width:min(500px,66vw);max-width:100%;margin:0;padding:0;background:none}
 body #menu h1{font-size:28px;margin:0 0 8px}
 body #menu .mode-grid button{padding:10px 10px 10px 40px;min-height:44px}
 body #menu .mode-grid button>span{top:9px}
 body #menu .mode-grid b{font-size:12px}
 body #menu .mode-brief{margin:6px 0 8px;font-size:11px;min-height:16px}
 body #menu #start{min-height:44px;padding:10px;font-size:13px}
 body #menu .training-link{margin:2px auto 0;padding:8px 10px;min-height:34px;font-size:10px}
 body #menu .best{display:none}
 body #menu .meta-launch{margin:2px 0 0;padding:0}
 body #menu .meta-launch button{min-height:44px;padding:8px 3px;font-size:10px}
 body #menu #accountState{max-width:28vw;bottom:max(12px,env(safe-area-inset-bottom));font-size:9px}
}

@media(orientation:portrait) and (max-width:700px){#dialog.build-dialog .panel{padding-top:max(16px,env(safe-area-inset-top));padding-bottom:max(16px,calc(env(safe-area-inset-bottom) + 8px))}}

/* Full-bleed epilogue: luminous navigation, no modal card or pixel-art styling. */
.finale{position:fixed;inset:0;z-index:1000;overflow:hidden;color:#eefaf6;background:#050b13;--finale-reveal:0}
.finale-space{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}
.finale-top{position:absolute;inset:max(20px,env(safe-area-inset-top)) max(24px,env(safe-area-inset-right)) auto max(24px,env(safe-area-inset-left));display:flex;justify-content:space-between;align-items:center;font-size:12px;letter-spacing:.18em;color:#92afb9}
.finale-top>div{display:flex;gap:8px}.finale-top button{font-size:11px;letter-spacing:.08em;min-height:44px;padding:8px 14px;background:#07131ecc;border-color:#42616b}
.finale-copy{position:absolute;top:12%;left:8%;right:8%;text-align:center;opacity:var(--finale-reveal);pointer-events:none}
.finale-kicker{color:#9ae9dd;font-size:12px;letter-spacing:.3em;margin:0 0 12px}.finale-copy h1{font-size:clamp(28px,5vw,66px);font-weight:500;letter-spacing:-.035em;margin:0;line-height:1.1}.finale-pilot{font-size:14px;letter-spacing:.12em;color:#acc2ca;margin:12px 0}
.finale-end{position:absolute;bottom:max(28px,env(safe-area-inset-bottom));left:5%;right:5%;text-align:center;opacity:0;visibility:hidden;transform:translateY(10px);transition:opacity .45s,transform .45s}
.finale.complete .finale-end{opacity:1;visibility:visible;transform:none}.finale-award>span{font-size:26px;letter-spacing:.17em;font-variant-numeric:tabular-nums}.finale-award p{font-size:10px;letter-spacing:.25em;color:#99b5bf;margin:4px 0 14px}.finale-award strong{color:#ffe2a7;font-size:15px;letter-spacing:.2em;font-weight:500}.finale-actions{display:flex;justify-content:center;gap:10px;margin-top:23px}.finale-actions button{min-height:48px;padding:12px 24px;font-size:13px;letter-spacing:.09em}.finale-replay{margin-top:12px;min-height:44px;font-size:12px}
@media(max-height:500px) and (orientation:landscape){.finale-top{top:max(8px,env(safe-area-inset-top));left:max(16px,env(safe-area-inset-left));right:max(16px,env(safe-area-inset-right))}.finale-copy{top:17%}.finale-copy h1{font-size:30px}.finale-kicker{font-size:10px;margin-bottom:6px}.finale-pilot{margin:6px 0;font-size:12px}.finale-end{bottom:max(12px,env(safe-area-inset-bottom))}.finale-award{display:flex;align-items:center;justify-content:center;gap:16px}.finale-award>span{font-size:20px}.finale-award p{font-size:9px;max-width:95px;text-align:left;margin:0}.finale-award strong{font-size:12px}.finale-actions{margin-top:12px}.finale-actions button{min-height:44px;padding:8px 16px;font-size:11px}}
@media(max-width:480px){.finale-top{left:14px;right:14px;font-size:9px;letter-spacing:.1em}.finale-top button{font-size:9px;padding:6px 9px}.finale-copy{top:19%;left:4%;right:4%}.finale-actions{flex-wrap:wrap;gap:8px}.finale-actions button{padding:10px 14px;font-size:11px}.finale-actions .primary{flex-basis:100%;max-width:310px}}
@media(prefers-reduced-motion:reduce){.finale-end{transition:none;transform:none}}

.guest-note{display:flex;align-items:center;justify-content:space-between;gap:8px 20px;flex-wrap:wrap;font-size:12px;color:#95adb7;padding:8px 0 16px}@media(max-height:500px){.guest-note{padding:2px 0 8px;font-size:11px}}
