/* Aerospace GUI: titanium housings, navy enamel and cyan status lights.
   Geometry stays in CSS so translated labels and touch bounds remain real. */
:root{--space-rim:#98bbc9;--space-dark:#0c2239;--space-face:#294b65;--space-ink:#f0faff;--space-accent:#54dce7;--gui-ink:#dfedf4;--panel-gap:12px;--queue-ship:62px}
:root{--control-rim:#98bbc9;--control-base:#132e46;--control-ink:#f0faff;--control-face:linear-gradient(165deg,#426984,#29485f 55%,#243e56);--control-depth:inset 0 1px #d7f5ff70,inset 0 -1px #081e3566,0 3px #081a2b,0 5px 8px #04152666}
.toy-gui :is(.home-screen,.game-shell,dialog) button:where(:not(.unit):not(.world-node):not(.map-card)){
 border:2px solid var(--space-rim);border-bottom:4px solid #132e46;border-radius:12px!important;
 background:linear-gradient(165deg,#426984,#29485f 55%,#243e56);color:var(--space-ink);
 box-shadow:inset 0 1px #d7f5ff70,inset 0 -1px #081e3566,0 3px #081a2b,0 5px 8px #04152666;
 text-shadow:0 1px #10283a;letter-spacing:0;font-weight:800;
}
.toy-gui :is(.home-screen,.game-shell,dialog) button.primary{
 background:linear-gradient(155deg,#8befed,#50cdd9 55%,#3bb4ca);border-color:#bcffff;border-bottom-color:#217f97;color:#092e43;text-shadow:0 1px #caffff88;
 box-shadow:inset 0 1px #e5ffff,inset 0 -1px #238294,0 3px #10415b,0 6px 10px #03182966;
}
.toy-gui :is(.home-screen,.game-shell,dialog) button:where(:not(.unit):not(.world-node)):disabled{
 background:#304657;border-color:#718b9d;border-bottom-color:#263b4c;color:#aebfcb;box-shadow:inset 0 1px #a0bdcc33;text-shadow:none;filter:none;
}
.toy-gui :is(.home-screen,.game-shell,dialog) button:where(:not(.unit):not(.world-node)):active:not(:disabled){transform:translateY(2px);box-shadow:inset 0 2px 4px #06172966,0 1px #102b41}
.toy-gui :is(button,input,select):focus-visible{outline:3px solid #7cffff;outline-offset:3px}
.toy-gui .ui-icon{filter:none}
.toy-gui .world-home .home-wallet :is(.life-pill,.wallet-coins){background:linear-gradient(#29495e,#172d42);border-color:var(--space-rim);border-bottom-color:#132d43;color:var(--space-ink);box-shadow:inset 0 1px #d4f5ff55,0 3px #0b1e30}
.toy-gui .wallet-plus{background:#51cdd9;color:#102e41;border-color:#bdffff;border-bottom-color:#2d7d95}
.toy-gui .game-top .level-badge{border-color:#9bbdcb;border-bottom-color:#19374e;background:linear-gradient(110deg,#2b506b,#1c354e);box-shadow:inset 0 1px #d3f5ff66,0 3px #102238}
.toy-gui .game-top h2{color:#edfaff;text-shadow:0 2px #122b42}
.toy-gui #speed-btn[aria-pressed=true]{background:linear-gradient(#8befed,#41bacd);border-color:#baffff;border-bottom-color:#236d89;color:#102d44;text-shadow:none}
.toy-gui .play-button .entry-cost{color:inherit;text-shadow:none;border-left-color:#207c9366}
.toy-gui .game-shell .board-panel{border-color:#b5ccd4;border-bottom-color:#47677c;background:linear-gradient(135deg,#d2e1e6,#92afbd);box-shadow:inset 0 0 0 2px #eefaff,0 4px #142e44,0 8px 14px #071a3066}
.toy-gui .board-panel:before,.toy-gui .board-panel:after{background:#64889b;border-color:#d4e7ef;box-shadow:inset 0 1px #37546d}
.toy-gui .board-stage{background:radial-gradient(ellipse,#f0f4f0,#d6e4e7);box-shadow:inset 0 2px 6px #34576c44,inset 0 0 0 1px #8faab8}
.toy-gui .game-shell:after{border-top-color:#8ab2c4;box-shadow:0 -5px #203e53,0 -8px #486e83}
.toy-gui .game-shell .progress-track{border-color:#8eb5c4;background:#142a3e;box-shadow:inset 0 1px #071d30}
.toy-gui .progress-track>div{background:linear-gradient(#a4ffff,#43c6d8);box-shadow:inset 0 1px #d8ffff}
.toy-gui .world-departure{border-color:#7399ac}
/* 2 full carriers and half of the next silhouette. Only the front is actionable. */
.toy-gui .game-shell .queues{height:calc(var(--queue-ship)*2.5 + 28px);min-height:calc(var(--queue-ship)*2.5 + 28px);padding:8px 8px;gap:8px;border:2px solid #7595a8;border-bottom:4px solid #153349;box-shadow:inset 0 2px 8px #061d31,0 2px #0b2035;overflow:hidden}
.toy-gui .game-shell .queue{height:calc(var(--queue-ship)*2.5 + 12px);min-width:0;display:flex;flex-direction:column;align-items:center;gap:6px;overflow:hidden;padding:0}
.toy-gui .game-shell .queue .unit,.toy-gui .game-shell .queue .unit:not(button){display:block;position:relative;flex:0 0 var(--queue-ship);height:var(--queue-ship);min-height:var(--queue-ship);max-height:none;width:100%;max-width:none;margin:0;border:0;background:none;box-shadow:none;opacity:1;border-radius:0;padding:0}
.toy-gui .game-shell .queue .unit:nth-child(3){display:block;opacity:.75}
.toy-gui .game-shell .queue .unit:nth-child(3) :is(.unit-count,.color-code){visibility:hidden}
.toy-gui .game-shell .queue .unit .drone-art,.toy-gui .game-shell .queue .unit:not(button) .drone-art{inset:0 -3%;width:auto;height:auto}
.toy-gui .game-shell .queue button.unit:before{inset:70% 10% 0;border-bottom-width:2px;box-shadow:none;background:radial-gradient(ellipse,#72ddec35,transparent 70%)}
/* The count belongs to the forward hull, rather than a hanging paper label. */
.toy-gui .unit>span.unit-count,.toy-gui .game-shell .queue .unit:not(button) .unit-count{
 position:absolute;left:50%;right:auto;top:50%;bottom:auto;transform:translateX(-50%);min-width:34px;width:49%;height:25px;padding:0 2px;display:grid;place-items:center;
 background:linear-gradient(#23435b,#102a40);border:2px solid #c2d8e2;border-bottom:3px solid #6e8c9f;border-radius:5px;box-shadow:inset 0 1px #53758b,0 1px #0a1f33;color:#f7ffff;text-shadow:0 1px #071829;font-size:21px;font-weight:900;line-height:1;font-variant-numeric:tabular-nums;
}
.toy-gui .slot .unit>span.unit-count{top:42%;width:54%;height:26px;font-size:21px}
.toy-gui .game-shell .slots:has(.slot:nth-child(6)) .unit-count{min-width:30px;font-size:18px}
/* Item housings and inventory chips use the same material. */
.toy-gui .game-shell .tools-deck button.item-button{border:2px solid #a2c6d4;border-bottom:4px solid #203f55;background:radial-gradient(ellipse at 50% 20%,#648a9d,#2d4a61 75%);box-shadow:inset 0 1px #daffff77,0 3px #10273c,0 5px 8px #05172b66;border-radius:16px!important}
.toy-gui .tools-deck button.item-button:before{background:radial-gradient(ellipse,#b7f4ff33,transparent 75%)}
.toy-gui .tools-deck button.item-button .item-stock{right:-3px;bottom:-5px;background:#173247;border:2px solid #a5c7d5;border-bottom:3px solid #4c6f84;border-radius:8px;box-shadow:0 2px #0a1e30;color:#f2fcff;text-shadow:none}
.toy-gui .tools-deck button.item-button.is-empty .item-stock{background:#71e3e9;color:#102e41;border-color:#c3ffff;border-bottom-color:#3d849e}
.toy-gui .tools-deck button.item-button[data-item-state=used],.toy-gui .tools-deck button.item-button[data-item-state=unavailable]{background:#263d50;border-color:#6e8c9f;border-bottom-color:#1a3043;box-shadow:inset 0 2px 4px #0d2237}
/* Fixed header rail: close never overlaps title, art or another touch target. */
.toy-gui dialog{width:min(460px,calc(100% - 24px));max-height:calc(100dvh - 24px);padding:16px;gap:12px;border:2px solid #bad0db;border-bottom:5px solid #48697f;border-radius:20px;background:linear-gradient(145deg,#28465c,#152b40);color:#e9f7fc;box-shadow:inset 0 0 0 2px #6d94a633,0 4px #0a1c2f,0 18px 52px #020f27aa;overflow:auto}
.toy-gui dialog[open]{display:flex;flex-direction:column}
.toy-gui dialog :is(.dialog-heading,.gui-title),.toy-gui #settings-dialog .dialog-heading,.toy-gui #booster-dialog[data-item=priority] .dialog-heading{
 display:grid;grid-template-columns:minmax(0,1fr);align-items:center;min-height:52px;flex:none;gap:12px;margin:0;padding:0;background:none;border-bottom:1px solid #6c98ad66;padding-bottom:10px;isolation:auto;
}
.toy-gui dialog .dialog-heading:has(.gui-close){grid-template-columns:minmax(0,1fr) 48px}
.toy-gui dialog :is(.dialog-heading,.gui-title) h2,.toy-gui #result-title,.toy-gui #confirm-title{margin:0;color:#f1fcff;text-shadow:0 1px #071e33;text-align:center;font-size:clamp(18px,5vw,22px);line-height:1.3;letter-spacing:0;white-space:normal;overflow-wrap:anywhere}
.toy-gui dialog .dialog-heading .gui-close{position:static;inset:auto;display:grid;place-items:center;min-width:48px;width:48px;min-height:48px;height:48px;margin:0;padding:0;border:2px solid #a9cad8;border-bottom:4px solid #28465d;border-radius:12px!important;background:linear-gradient(#4b6e85,#2a475f);box-shadow:inset 0 1px #ddf6ff66,0 2px #0c2237;color:#e8faff;font-size:28px;text-shadow:none}
.toy-gui dialog .gui-close .ui-icon{width:20px;height:20px;margin:0}
.toy-gui dialog :is(.primary,.secondary,.google-button){min-height:52px;margin:0;width:100%;padding:12px 14px;font-size:17px;line-height:1.35;flex:none}
.toy-gui #pause-settings{min-height:52px;width:100%;height:auto;min-width:0;font-size:17px}
.toy-gui .popup-scene{height:112px;min-height:88px;margin:0 auto;flex:none}
.toy-gui dialog :is(p,#confirm-text,#result-text,#life-balance,#life-dialog-timer,#booster-description,#booster-balance,.life-rules){color:#d7e8f1;line-height:1.55}
.toy-gui :is(#confirm-text,#result-text,#life-dialog-timer){background:#10283c;border:1px solid #668a9f;border-radius:12px;box-shadow:inset 0 1px #061b2b;margin:0;padding:12px}
.toy-gui dialog .toggle,.toy-gui .language-picker,.toy-gui .account-card,.player-id-card{background:linear-gradient(#29465b,#20394e);border:1px solid #688b9f;border-radius:12px;color:#ecf9ff;box-shadow:inset 0 1px #a8d6e633;margin:0}
.toy-gui .toggle input{background:#132e44;border-color:#6a8c9e;box-shadow:inset 0 2px #071c2e}
.toy-gui .toggle input:before{background:linear-gradient(#e0f2f5,#9dbdcb);border-color:#ebffff;border-bottom-color:#6c8b9d}
.toy-gui .toggle input:checked{background:#2baebf;border-color:#9feaf2}
.toy-gui .language-picker select{background:#142c43;border:1px solid #8db0c2;border-bottom:3px solid #061d31;color:#edfaff}
.toy-gui :is(.account-card p,.analytics-setting small,.version,.legal-link,#life-dialog-count){color:#d1e7f2;text-shadow:none}
.toy-gui .coin-capsule,.toy-gui .stock-capsule{background:#102b3e;border-color:#769cae;border-bottom-color:#365d72;color:#e9fbff}
.toy-gui .settings-scroll{padding:2px 2px 6px;gap:12px}
.toy-gui #settings-dialog{overflow:hidden}
.toy-gui .hangar-legend{color:#aeeaf2}
.toy-gui #queue-scroll,.toy-gui #booster-options:not(:empty){border-color:#6e98ac;background:#11293e}
.toy-gui .priority-lane h3{color:#def8ff;background:#264a63;border-color:#83aabc}
.toy-gui #booster-options :is(.priority-option,.priority-front) b{background:#173448;color:#fff;border-color:#b5d5e1;border-bottom-color:#5e8094;text-shadow:none}
@media(max-width:350px){:root{--queue-ship:56px}.toy-gui dialog{padding:12px}.toy-gui .game-shell .tools-deck{gap:10px}}
@media(max-height:700px){:root{--queue-ship:56px}.toy-gui .game-shell .queues{height:168px;min-height:168px}.toy-gui .game-shell .board-panel{min-height:100px}.toy-gui .game-shell .game-top{height:48px;min-height:48px;margin-bottom:10px}.toy-gui .game-shell .slots{height:50px;min-height:50px;margin-bottom:10px}.toy-gui .game-shell .flight-corridor{height:14px;min-height:14px}.toy-gui .game-shell .tools-deck{margin-top:12px}.toy-gui .game-shell .tools-deck button.item-button{height:60px;min-height:60px}.toy-gui .game-shell .tools-deck .gui-item-art{height:50px;width:50px}}
/* Both designers chose a light silver reading surface inside the navy shell. */
.toy-gui dialog{background:linear-gradient(145deg,#eef5f7,#cadce5);color:#203e54}
.toy-gui dialog :is(.dialog-heading,.gui-title){background:linear-gradient(120deg,#2a4d67,#17344e);border:0;border-radius:12px;padding:4px 0;min-height:56px}
.toy-gui dialog :is(.dialog-heading,.gui-title) h2{padding:4px 8px}
.toy-gui dialog :is(p,#confirm-text,#result-text,#life-balance,#life-dialog-timer,#booster-description,#booster-balance,.life-rules),.toy-gui :is(.account-card p,.analytics-setting small,.version,.legal-link,#life-dialog-count){color:#2d4b60}
.toy-gui :is(#confirm-text,#result-text,#life-dialog-timer){background:#f4f9fb;border-color:#9db6c4;box-shadow:inset 0 1px #fff}
.toy-gui dialog .toggle,.toy-gui .language-picker,.toy-gui .account-card,.player-id-card{background:linear-gradient(#f8fcfd,#e0ecf1);color:#223e53;border-color:#a1b8c6;box-shadow:inset 0 1px #fff}
.toy-gui #delete-confirm{background:linear-gradient(#b95067,#8b344a);color:#fff5f8;border-color:#e3a7b5;border-bottom-color:#5a2339}
.toy-gui :is(dialog,#settings-dialog,#booster-dialog) .dialog-heading:has(.gui-close){grid-template-columns:minmax(0,1fr) 48px;gap:12px}
.toy-gui :is(dialog,#settings-dialog,#booster-dialog) .dialog-heading{background:linear-gradient(120deg,#2a4d67,#17344e);min-height:56px;padding:4px 0;border:0}
.toy-gui :is(#confirm-dialog,#delete-dialog,#account-flow,#result) h2{color:#f1fcff;text-shadow:0 1px #071e33}
.toy-gui :is(#home-settings,#settings-btn,#pause-settings,#world-locate,#speed-btn),.toy-gui .account-card .google-button{border:2px solid var(--control-rim);border-bottom:4px solid var(--control-base);background:var(--control-face);box-shadow:var(--control-depth);color:var(--control-ink);text-shadow:0 1px #10283a}
.toy-gui #speed-btn[aria-pressed=true]{background:linear-gradient(#8befed,#41bacd);border-color:#baffff;border-bottom-color:#236d89;color:#102d44;text-shadow:none}

/* Compensate for transparent sprite padding so the third silhouette reads as a half ship. */
.toy-gui .game-shell .queues{height:calc(var(--queue-ship)*2.5 + 34px);min-height:calc(var(--queue-ship)*2.5 + 34px)}
.toy-gui .game-shell .queue{height:calc(var(--queue-ship)*2.5 + 18px)}
.toy-gui .game-shell .queue .unit>span.unit-count,.toy-gui .game-shell .queue .unit:not(button) .unit-count{top:45%}
.toy-gui dialog :is(.primary,.secondary){font-weight:800}
.toy-gui :is(dialog,#queue-dialog,#settings-dialog,#booster-dialog) .dialog-heading{position:sticky;top:0;z-index:10;height:auto;min-height:56px;padding:4px 0;background:linear-gradient(120deg,#2a4d67,#17344e)}
.toy-gui .hangar-legend,.toy-gui .hangar-legend span{color:#2a5269}
.toy-gui .plan-ship .hangar-count{background:#173448;color:#fff;border-color:#b5d5e1;border-bottom-color:#5e8094;text-shadow:none;box-shadow:0 2px #0c2337}
.toy-gui .plan-ship.is-next:before{border-color:#a8edf5;box-shadow:0 3px #091c31,0 0 8px #6bdeef33}
.toy-gui :is(#booster-dialog[data-item=radar],#queue-preview) .gui-item-art{clip-path:inset(0 0 7% 0)}
