:root{font-family:Arial,Helvetica,sans-serif;color:#b4e4c0;background:#07100f;color-scheme:dark;font-size:16px;--app-safe-top:env(safe-area-inset-top,0px);--app-safe-right:env(safe-area-inset-right,0px);--app-safe-bottom:env(safe-area-inset-bottom,0px);--app-safe-left:env(safe-area-inset-left,0px);--platform-accent:#6ad9b4}
*{box-sizing:border-box}html,body{height:100%;overscroll-behavior:none}body{margin:0;padding:8px;overflow:hidden;user-select:none;-webkit-user-select:none;background:radial-gradient(ellipse at 50% 30%,#12251f,#07100f 70%)}button,a,summary{-webkit-tap-highlight-color:transparent}button{font:inherit;min-height:44px;border:1px solid #365447;border-radius:4px;background:linear-gradient(145deg,#101f19,#070f0d);color:#b6e8c2;padding:10px 16px;cursor:pointer}button:hover{background:#18362b}button:focus-visible,summary:focus-visible{outline:2px solid var(--platform-accent);outline-offset:3px}button:disabled{opacity:.4;cursor:default}button[hidden]{display:none}.primary{background:linear-gradient(140deg,#242510,#10140d);color:#ffd475;border-color:#e9bb43;box-shadow:inset 0 0 14px #d6aa2720;font-weight:bold;clip-path:polygon(10px 0,100% 0,100% calc(100% - 10px),calc(100% - 10px) 100%,0 100%,0 10px)}.primary:hover{background:#333015}.active{border-color:#7ee5b7;background:#173a2b}
#app{height:calc(var(--app-height,100dvh) - 16px);display:flex;flex-direction:column;max-width:1250px;margin:auto;padding:var(--app-safe-top) var(--app-safe-right) var(--app-safe-bottom) var(--app-safe-left);border:1px solid #517266;border-radius:18px;overflow:hidden;background:linear-gradient(140deg,#07110d,#040c0b 60%,#0a1712)}body.in-battle #app{max-width:560px}header{height:68px;flex-shrink:0;display:flex;justify-content:space-between;align-items:center;gap:10px;padding:10px 18px;border-bottom:1px solid #294339}#brand{color:#b4edbc;text-decoration:none;font-size:15px;letter-spacing:1px;font-weight:400;display:flex;align-items:center;gap:10px;min-width:0}#brand::first-letter{color:#edc254}#brand span{min-width:0;line-height:1.25;max-width:250px}.settings{display:flex;gap:7px;flex-shrink:0}.settings button{min-width:44px;padding:8px 10px;color:#b8ddb9}main{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain}footer{height:25px;padding:4px 18px;font-size:11px;color:#738b7d;flex-shrink:0}.in-battle main{overflow:hidden}.in-battle footer{display:none}
.hangar{padding:30px;max-width:1200px;margin:auto}.eyebrow{color:#bda56a;letter-spacing:2px;font-size:12px;text-transform:uppercase}h1{font-size:clamp(26px,4vw,46px);margin:12px 0 14px}h2{margin-top:0;font-size:26px}p{color:#a5bbb0;line-height:1.5}.intro{max-width:720px}.hangar-top{display:flex;justify-content:space-between;gap:20px;align-items:center}.salvage{color:#dfbd71;font-size:21px;white-space:nowrap}.campaign{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin:25px 0}.mission{min-height:115px;text-align:left;padding:15px;background:linear-gradient(130deg,#12271e,#091810)}.mission strong{display:block;font-size:17px;margin:9px 0}.mission small{color:#8ea99a}.mission.done{border-color:#64857b}.upgrades{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.upgrade,.weapon{border:1px solid #2c4a3b;padding:20px;border-radius:6px;background:#0c1d15}.upgrade h3,.weapon h3{margin:0 0 8px}.upgrade p{font-size:14px;margin:10px 0;min-height:42px}.upgrade button{width:100%}.weapons{display:grid;grid-template-columns:repeat(2,1fr);gap:12px;margin-top:16px}.weapon h3{margin:14px 0 10px}.weapon p{font-size:13px}.weapon-actions{display:flex;gap:8px}.weapon-actions button{flex:1}.sectors{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin:22px 0 0}.sectors button{font-size:13px;text-align:left}.sectors small{display:block;color:#9fb8a7;margin-top:5px}.recovery-card{margin-top:16px;padding:18px 20px;border:1px solid #365746;border-radius:6px;display:flex;align-items:center;gap:20px;background:#0d2118}.recovery-card h3{margin:0 0 8px}.recovery-card p{font-size:13px;margin:0}.recovery-card button{margin-left:auto;flex-shrink:0}
.battle{height:100%;min-height:0;display:flex;flex-direction:column;padding:0 14px 12px;gap:7px}.hud{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));margin:0 -14px;flex-shrink:0}.battle[data-mode=pvp] .hud{grid-template-columns:repeat(3,minmax(0,1fr))}.hud-cell{display:flex;align-items:flex-start;gap:7px;padding:14px 9px 9px;border-right:1px solid #203d2d;min-width:0}.hud-cell:last-child{border:0}.hud-cell small{display:block;font-size:9px;line-height:1.3;text-transform:uppercase;color:#829d8d;margin-bottom:4px;overflow-wrap:anywhere}.hud-cell strong{font-size:15px;font-weight:400;color:#b4edbc}.stat-icon{font-size:24px;color:#7ee6b7;line-height:1}.stat-icon.hostile{color:#ff8150}.stat-icon.amber{color:#f3bf50}#energy.low{color:#ff885c}.telemetry{display:flex;flex-wrap:wrap;gap:3px 16px;font-size:12px;flex-shrink:0;color:#8fd5b0;border-bottom:1px solid #18382b;padding-bottom:5px}.telemetry strong{font-size:13px;color:#bdf4c9;font-weight:400}#engine-power{color:#e8b872}.aux-status{display:flex;flex-wrap:wrap;gap:3px 10px;font-size:11px;flex-shrink:0;color:#eaba72}.aux-status:has(#engine-status:empty):has(#laser-status:empty){display:none}#laser-status{color:#ff9867}
.field-slot{position:relative;flex:1;min-height:0;display:grid;place-items:center;overflow:hidden}.field{position:relative;flex:none;min-height:0;outline:1px solid #244337;overflow:hidden;background:#030e0c}.field::after{content:'';pointer-events:none;position:absolute;inset:0;background:repeating-linear-gradient(transparent 0 3px,#102d1c1a 3px 4px);box-shadow:inset 0 0 22px #02090788}canvas{display:block;touch-action:none;user-select:none;max-width:100%;max-height:100%}.legend{display:flex;gap:15px;flex-shrink:0;font-size:11px;color:#91b49e;padding:3px 0}.cyan{color:#83dcd3}.gold{color:#d6bd7b}.commands{display:flex;align-items:stretch;gap:12px;flex-shrink:0}.commands .primary{margin-left:auto;flex:1;min-width:0;padding:12px 8px;font-size:14px;min-height:56px}#command-menu{position:relative;min-width:0;flex:1}#command-toggle{list-style:none;cursor:pointer;min-height:56px;border:1px solid #73af8b;border-radius:3px;background:linear-gradient(130deg,#0d2117,#07110b);padding:17px 12px;font-size:14px;white-space:nowrap}#command-toggle::-webkit-details-marker{display:none}.command-options{position:absolute;bottom:calc(100% + 8px);left:0;width:min(260px,80vw);padding:6px;display:grid;gap:5px;background:#0b1c13;border:1px solid #638e71;border-radius:4px;z-index:3;box-shadow:0 8px 24px #0008;max-height:55dvh;overflow:auto}.command-options button{text-align:left;min-height:44px}.status{color:#87a592;font-size:11px;line-height:1.25;flex-shrink:0;padding:0 0 1px}
#overlay{position:fixed;inset:0;background:#020a07eb;display:flex;align-items:center;justify-content:center;padding:calc(20px + var(--app-safe-top)) calc(20px + var(--app-safe-right)) calc(20px + var(--app-safe-bottom)) calc(20px + var(--app-safe-left));height:var(--app-height,100dvh);bottom:auto;z-index:5}#overlay[hidden]{display:none}.modal{width:min(560px,100%);border:1px solid #5b8d70;border-radius:12px;padding:28px;background:linear-gradient(140deg,#153124,#06130c);max-height:100%;overflow:auto}.modal .actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:22px}.modal .actions button{flex:1}.modal .symbol{font-size:48px;color:#dfbd71;margin-bottom:12px}.tutorial-step{border-left:2px solid #639f77;padding:6px 0 6px 15px;margin:15px 0}.tutorial-step strong{color:#c3e6ce}.notice{color:#dbb673}.small{font-size:12px}
@media(max-width:700px){header{padding:8px 12px;height:68px}#brand{font-size:13px;letter-spacing:.8px}#brand span{max-width:205px}.hangar{padding:20px 14px}.hangar-top{align-items:flex-start;flex-direction:column;gap:2px}.campaign{grid-template-columns:repeat(2,1fr)}.upgrades,.weapons{grid-template-columns:1fr}.sectors{grid-template-columns:repeat(2,1fr)}.upgrade p{min-height:0}.recovery-card{flex-wrap:wrap;gap:12px}.recovery-card button{margin-left:0;width:100%}.battle{padding:0 10px 10px;gap:6px}.hud{margin:0 -10px}.hud-cell{padding:12px 7px 8px;gap:5px}.stat-icon{font-size:21px}.hud-cell small{font-size:8px}.hud-cell strong{font-size:14px}.commands{gap:10px}#command-toggle{font-size:13px;padding:17px 9px}.commands .primary{font-size:13px}.modal{padding:22px}h2{font-size:23px}}
@media(max-width:350px){#brand{font-size:11px;gap:5px}.settings{gap:4px}.settings button{min-width:42px;padding:8px}.hud-cell{padding:10px 5px 7px;gap:4px}.stat-icon{font-size:17px}.hud-cell strong{font-size:13px}.legend{font-size:10px;gap:10px}.telemetry{gap:3px 10px}#command-toggle{font-size:12px;padding:17px 6px}.commands .primary{font-size:12px}}
#brand{color:#e7be58}#brand span{color:#b4edbc}.stat-icon svg{display:block}
@media(max-height:650px) and (min-height:501px){header{height:56px}.battle{gap:4px;padding-bottom:6px}.hud-cell{padding-top:8px;padding-bottom:6px}.commands .primary,#command-toggle{min-height:44px;padding:11px 8px}.legend,.status{font-size:10px}}
@media(max-height:500px){header{height:44px;padding-top:0;padding-bottom:0}.battle{gap:3px;padding-bottom:5px}.hud-cell{padding:5px 7px}.hud-cell small{font-size:8px;margin-bottom:1px}.hud-cell strong{font-size:12px}.stat-icon{font-size:18px}.telemetry{font-size:10px;padding-bottom:2px}.telemetry strong{font-size:11px}.aux-status,.legend,.status{font-size:10px}.commands .primary,#command-toggle{min-height:44px;padding:11px 8px}.command-options{max-height:65dvh}}
body.in-battle #brand span{max-width:180px;font-size:15px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere}
@media(max-width:350px){body.in-battle #brand span{max-width:135px;font-size:12px}}

/* Compact navigation and complete chamfered button outlines. */
header{height:56px;padding:6px 12px;position:relative;z-index:4}
#brand,body.in-battle #brand{font-size:clamp(10px,3.15vw,15px);letter-spacing:.3px;gap:6px;flex:1}
#brand span,body.in-battle #brand span{display:block;max-width:none;font-size:inherit;white-space:nowrap;overflow-wrap:normal;-webkit-line-clamp:unset}
#app-menu{flex-shrink:0}#app-menu>summary{list-style:none;cursor:pointer;display:grid;place-items:center;width:44px;height:44px;border:1px solid #517266;border-radius:4px;font-size:23px}#app-menu>summary::-webkit-details-marker{display:none}
#app-menu .settings{position:absolute;right:10px;top:calc(100% + 5px);width:min(270px,calc(100vw - 40px));max-height:calc(var(--app-height,100dvh) - 90px);overflow:auto;display:grid;padding:8px;background:#0b1c13;border:1px solid #638e71;border-radius:6px;box-shadow:0 8px 24px #000a}
#app-menu:not([open]) .settings{display:none}.settings button{text-align:left}.settings button[hidden]{display:none}
.main-navigation{display:grid;gap:12px;margin:24px 0}.main-navigation button{min-height:60px;font-size:18px}.main-navigation h2{margin:4px 0}
.hangar-top.hangar-ship{justify-content:flex-start;gap:24px;flex-direction:row;align-items:center;padding:18px;background:radial-gradient(ellipse at 15% 50%,#17333c,#09191c 75%);border:1px solid #345249;border-radius:12px}.hangar-ship>.ship-preview{width:180px;height:180px;flex-shrink:0}.hangar-ship-details{flex:1;min-width:0}.hangar-ship-details h1{font-size:clamp(24px,4vw,36px)}.hangar-ship-details progress{display:block;width:100%;height:12px;accent-color:#79ead8}.hangar-xp-label{font-size:13px}.hangar-ship-details button{min-height:44px}.hangar-ship-details button+button{margin-left:8px}
@media(max-width:500px){.hangar-top.hangar-ship{gap:12px;padding:12px}.hangar-ship>.ship-preview{width:90px;height:130px}.hangar-ship-details .eyebrow{font-size:10px;letter-spacing:1px}.hangar-ship-details h1{font-size:24px;margin:8px 0}.hangar-ship-details button{font-size:12px;padding:10px 8px}.hangar-xp-label{font-size:11px}}
.hangar[data-section="home"]>:is(.sectors,.campaign,.upgrades,.weapons,.recovery-card),.hangar[data-section="campaign"]>:is(.upgrades,.weapons,.recovery-card),.hangar[data-section="upgrades"]>:is(.sectors,.campaign){display:none}
.primary{position:relative;isolation:isolate;border:0;border-radius:0;background:#e9bb43;box-shadow:none}
.primary::before{content:'';position:absolute;inset:1px;z-index:-1;background:linear-gradient(140deg,#242510,#10140d);clip-path:polygon(9.5px 0,100% 0,100% calc(100% - 9.5px),calc(100% - 9.5px) 100%,0 100%,0 9.5px)}
.primary:hover::before{background:#333015}
@media(max-height:500px){header{height:48px}}

.primary:hover{background:#e9bb43}

.training-guide:has(#training-finish:not([hidden])){display:flex;flex-direction:column;overflow:hidden;max-height:50%}.training-guide:has(#training-finish:not([hidden])) strong{flex-shrink:0}.training-guide:has(#training-finish:not([hidden])) p{overflow:auto;min-height:0}#training-finish{flex-shrink:0;background:#14392a;border-color:#79e2c0;width:100%}.battle:has(#training-finish:not([hidden])) :is(.commands,.legend,.status){display:none}

.battle[data-mode=training] .hud{grid-template-columns:repeat(3,minmax(0,1fr))}.battle[data-mode=training] .reinforcement{display:none}.training-guide{flex-shrink:0;border-left:3px solid #79e2c0;background:#0d2117;padding:8px 10px;font-size:12px;line-height:1.35;max-height:29%;overflow:auto}.training-guide strong{color:#b4edbc}.training-guide p{margin:4px 0 0}.training-guide button{margin-top:6px;min-height:44px}.battle[data-mode=training] .field-slot{min-height:90px}@media(max-height:500px){.training-guide{font-size:11px;padding:4px 8px;max-height:27%}}

/* Fit command labels inside their flex cell in either language. */
#command-toggle,.pvp-menu summary{white-space:normal;overflow-wrap:anywhere;line-height:1.25;display:flex;align-items:center;justify-content:center;gap:4px;text-align:center}

/* Fleet hangar: native vector ships, readable research cards and touch controls. */
.fleet-hangar{padding:28px;max-width:1100px;margin:auto}.fleet-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:20px}.fleet-heading-copy{max-width:650px}.fleet-heading h1{font-size:clamp(24px,4vw,38px)}.fleet-heading p{font-size:14px}.fleet-heading>button{flex-shrink:0}.fleet-side-tabs,.fleet-bottom-actions{display:flex;gap:10px;flex-wrap:wrap;align-items:center;margin:18px 0}.fleet-side-tabs button{flex:1}.fleet-ship-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin:20px 0}.fleet-ship-card{position:relative;text-align:left;padding:15px;border-radius:12px;background:radial-gradient(ellipse at 50% 35%,#17333c,#09191c 75%);border:1px solid #39575b;overflow:hidden}.fleet-ship-card.selected{border-color:#79ead8;box-shadow:inset 0 0 24px #79ead810}.ship-preview{display:block;width:100%;height:180px}.fleet-ship-name{display:block;font-size:20px;color:#d6f1e7;margin:5px 0}.fleet-ship-card small{display:block;font-size:12px;line-height:1.5;color:#8fafaa}.fleet-ship-card.locked .ship-preview{opacity:.45;filter:saturate(.25)}.fleet-ship-card:disabled{opacity:.7}.fleet-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:1px;background:#345249;border:1px solid #345249;border-radius:8px;overflow:hidden}.fleet-stat{background:#0b1d19;padding:12px}.fleet-stat small{display:block;color:#8daa9e;font-size:11px;text-transform:uppercase}.fleet-stat strong{display:block;font-weight:400;font-size:23px;margin-top:6px}.fleet-equipment{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:18px 0}.fleet-slot{display:flex;flex-direction:column;gap:10px;padding:16px;border:1px solid #345249;border-radius:9px;background:#0c1f1c}.fleet-icon{width:25px;height:25px;flex-shrink:0;color:#d8be79}.icon-label{display:flex;align-items:center;gap:9px}.fleet-slot select{font:inherit;color:#d5ede2;background:#102c25;border:1px solid #527467;border-radius:5px;padding:10px 8px;width:100%;min-height:44px}.fleet-slot small,.fleet-spec{color:#93b1a3;font-size:12px;line-height:1.4}.fleet-talents{margin-top:30px}.fleet-talents h2{font-size:23px;margin-bottom:8px}.fleet-talents>p{font-size:13px}.fleet-talents progress{width:100%;height:7px;accent-color:#79ead8;margin:6px 0 18px}.fleet-tree{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.fleet-branch h3{font-size:14px;color:#d8be79;font-weight:400;margin:10px 0 14px}.fleet-talent{position:relative;margin-bottom:12px;border:1px solid #345249;border-radius:9px;padding:14px;background:linear-gradient(145deg,#122a22,#0b1916)}.fleet-talent:not(:last-child)::after{content:'';position:absolute;height:13px;width:1px;background:#527467;left:50%;bottom:-14px}.fleet-talent.selected{border-color:#79ead8;background:linear-gradient(145deg,#18392d,#0b211a)}.fleet-talent>small{color:#839e91;font-size:10px;text-transform:uppercase;letter-spacing:1px}.fleet-talent h4{font-size:14px;line-height:1.4;margin:10px 0}.fleet-talent p{font-size:12px;min-height:38px}.fleet-talent button{width:100%;font-size:12px}.fleet-talent.locked{background:#0c1816}.fleet-talent.locked .fleet-icon{color:#7a9286}.fleet-progress-summary{color:#d8be79;font-size:13px}.fleet-bottom-actions>p{font-size:12px;max-width:500px}.fleet-notice{font-size:13px;color:#e4c282;min-height:20px}.fleet-timer-option{display:flex;align-items:center;gap:9px;font-size:13px}.fleet-timer-option input{width:20px;height:20px;accent-color:#79ead8}.fleet-battle .hud{grid-template-columns:repeat(2,minmax(0,1fr))}.fleet-battle-top{display:flex;gap:8px;align-items:center;flex-shrink:0;padding-top:8px}.fleet-battle-top>div{display:flex;gap:5px;flex:1}.fleet-battle-top button{font-size:11px;padding:7px;min-height:44px}.fleet-command-strip{display:flex;overflow-x:auto;gap:6px;flex-shrink:0;padding:2px 0 6px}.fleet-command-strip button{font-size:10px;padding:7px;min-width:105px}.fleet-command-strip .fleet-icon{width:18px;height:18px}.fleet-command-strip .ordered{box-shadow:inset 0 -3px #d8be79}.fleet-battle .commands button{font-size:12px;padding:9px;min-height:44px}.fleet-battle .hud-cell{padding:8px}.fleet-battle .status{margin:0;min-height:25px}.fleet-preparation .ship-preview{height:140px}.fleet-preparation .fleet-ship-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
@media(max-width:700px){.fleet-hangar{padding:18px 12px}.fleet-heading{flex-direction:column;gap:0}.fleet-heading>button{order:-1}.fleet-ship-grid{gap:7px}.fleet-ship-card{padding:9px}.ship-preview{height:115px}.fleet-ship-name{font-size:14px}.fleet-ship-card small{font-size:10px}.fleet-tree{gap:7px}.fleet-talent{padding:9px}.fleet-talent h4{font-size:12px}.fleet-talent .icon-label{display:block}.fleet-talent .fleet-icon{display:block;margin-bottom:5px}.fleet-talent p{font-size:11px;min-height:65px}.fleet-talent button{font-size:10px;padding:7px 3px}.fleet-equipment{grid-template-columns:1fr}.fleet-side-tabs button{font-size:12px;padding:9px}.fleet-stat{padding:9px}.fleet-stat strong{font-size:20px}.fleet-stat small{font-size:9px}}
@media(max-height:500px){.fleet-battle-top{padding-top:2px}.fleet-battle .hud-cell{padding:3px 8px}.fleet-battle .status{min-height:12px}.fleet-command-strip{padding-bottom:2px}.fleet-command-strip button{min-height:44px}.fleet-battle .field-slot{min-height:65px}}
.fleet-orders{display:flex;gap:6px;overflow-x:auto;flex-shrink:0;padding:3px 0}.fleet-orders:empty{display:none}.fleet-orders button{display:flex;align-items:center;gap:6px;font-size:11px;min-width:100px;min-height:44px;padding:8px;max-width:160px;flex-shrink:0}.fleet-orders .fleet-icon{width:20px;height:20px}.fleet-loadout{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:18px 0}.fleet-loadout label{display:flex;flex-direction:column;gap:8px;font-size:13px}.fleet-loadout select{font:inherit;min-height:44px;width:100%;color:#d5ede2;background:#102c25;border:1px solid #527467;border-radius:5px;padding:8px}.fleet-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:18px 0}.fleet-card{padding:14px;border:1px solid #345249;border-radius:10px;background:radial-gradient(ellipse at 50% 30%,#17333c,#09191c 75%)}.fleet-card .ship-preview{height:160px}.fleet-card h3{font-size:16px}.fleet-card p{font-size:12px}.fleet-card .fleet-icon{width:22px;height:22px}.fleet-card .fleet-talents-summary{color:#d8be79}@media(max-width:500px){.fleet-loadout{grid-template-columns:1fr}.fleet-card{padding:10px}.fleet-card .ship-preview{height:120px}.fleet-card h3{font-size:13px}}
.command-carousel{display:grid;grid-template-columns:minmax(0,1fr);min-width:0;flex-shrink:0;align-items:stretch;gap:6px}.command-carousel.has-overflow{grid-template-columns:44px minmax(0,1fr) 44px}.command-carousel[hidden]{display:none}.command-carousel>:is(.fleet-command-strip,.fleet-orders){min-width:0;scrollbar-width:none;-ms-overflow-style:none;touch-action:pan-x;overscroll-behavior-x:contain;padding-bottom:2px}.command-carousel>:is(.fleet-command-strip,.fleet-orders)::-webkit-scrollbar{display:none}.command-scroll-arrow{display:grid;place-items:center;min-width:44px;min-height:44px;padding:6px;color:#d8be79;border:1px solid #527467;border-radius:4px;background:linear-gradient(145deg,#14291f,#081510)}.command-scroll-arrow[hidden]{display:none}.command-scroll-arrow svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.command-scroll-arrow:disabled{opacity:.3}.command-scroll-arrow:not(:disabled):hover{border-color:#79ead8;background:#18392b}
.campaign-xp,.campaign-xp-note{border-left:2px solid #79ead8;padding:10px 12px;background:#10251d;color:#b4e4c0;font-size:13px;line-height:1.5}.campaign-xp button{display:block;margin-top:10px;min-height:44px}.campaign-xp-note{margin:12px 0}.campaign-xp{margin-top:14px}
/* Shared battle actions: one scrollable row, with cancellation on the weapon. */
.battle-order{position:relative;display:flex;flex-shrink:0;max-width:180px}.fleet-orders .battle-order>button:first-child{width:100%;max-width:none;padding-right:32px}.fleet-orders .battle-order-cancel{position:absolute;top:0;right:0;min-width:30px;min-height:44px;width:30px;padding:0;justify-content:center;border:0;border-radius:0;background:#0d231d;color:#ffb992;font-size:22px}.fleet-orders .battle-order-cancel:hover{background:#423128}.commands>.battle-inspect{flex:1;min-width:0;min-height:48px}.battle-inspect.active{border-color:#79ead8;background:#173b30}.ship-inspection{position:absolute;z-index:4;left:8px;right:8px;top:8px;max-width:350px;border:1px solid #79ead8;border-radius:6px;padding:12px 44px 12px 12px;background:#081b17f5;box-shadow:0 4px 18px #0008;color:#cdebdc;font-size:12px;line-height:1.7}.ship-inspection strong{display:block;color:#79ead8;font-size:15px}.ship-inspection-close{position:absolute;right:0;top:0;min-width:44px;min-height:44px;padding:5px;font-size:23px;border:0;background:transparent}.battle .field-slot:has(.ship-inspection){overflow:hidden}
/* Compact battle chrome funds the precision control without shrinking the arena. */
body.in-battle header{height:50px;padding-top:3px;padding-bottom:3px}
.battle:has(.battle-slider){gap:4px;padding-bottom:8px}
.battle:has(.battle-slider) .hud-cell{padding-top:6px;padding-bottom:5px}
.battle:has(.battle-slider) .commands>button{min-height:44px;padding:8px;font-size:13px}
.battle-slider{--slider-color:#79ead8;display:flex;align-items:center;gap:10px;flex-shrink:0;height:34px;min-width:0;padding:0 9px;border:1px solid #365447;border-radius:4px;background:linear-gradient(145deg,#101f19,#070f0d);color:var(--slider-color);font-size:11px}
.battle-slider.weapon{--slider-color:#e4c174;border-color:#655732}
.battle-slider.disabled{opacity:.45}
.battle-slider-label{flex-shrink:0}
.battle-slider output{min-width:36px;text-align:right;font-variant-numeric:tabular-nums}
.battle-slider input{appearance:none;-webkit-appearance:none;flex:1;min-width:0;height:32px;margin:0;background:transparent;cursor:pointer;touch-action:pan-y}
.battle-slider input:disabled{cursor:default}
.battle-slider input:focus-visible{outline:2px solid var(--slider-color);outline-offset:1px;border-radius:3px}
.battle-slider input::-webkit-slider-runnable-track{height:5px;border:1px solid #365447;border-radius:3px;background:linear-gradient(to right,var(--slider-color) 0 var(--range-fill),#0a1611 var(--range-fill) 100%)}
.battle-slider input::-webkit-slider-thumb{appearance:none;-webkit-appearance:none;width:18px;height:22px;margin-top:-9px;border:1px solid var(--slider-color);border-radius:3px;background:linear-gradient(145deg,#244b3b,#0a1e17);box-shadow:0 0 5px #79ead825}
.battle-slider input::-moz-range-track{height:3px;border:1px solid #365447;border-radius:3px;background:#0a1611}
.battle-slider input::-moz-range-progress{height:3px;background:var(--slider-color)}
.battle-slider input::-moz-range-thumb{width:16px;height:20px;border:1px solid var(--slider-color);border-radius:3px;background:linear-gradient(145deg,#244b3b,#0a1e17)}
@media(max-height:650px){body.in-battle header{height:44px}.battle:has(.battle-slider){gap:3px}.battle:has(.battle-slider) .legend{padding:0;font-size:10px}.battle:has(.battle-slider) .hud-cell{padding-top:4px;padding-bottom:3px}}
@media(max-height:500px){.battle:has(.battle-slider){gap:2px;padding-bottom:4px}.battle:has(.battle-slider) .legend{display:none}.battle:has(.battle-slider) .hud-cell{padding-top:2px;padding-bottom:2px}.battle-slider{height:30px}.battle-slider input{height:28px}}
.battle:has(#training-finish:not([hidden])) .battle-slider{display:none}
@media(max-height:650px){.battle:has(.battle-slider){padding-bottom:5px}.battle:has(.battle-slider) .hud-cell small{margin-bottom:3px}}
.ship-inspection-layer{position:absolute;inset:0;z-index:4;pointer-events:none}.ship-inspection-layer .ship-inspection{left:auto;right:auto;top:auto;width:max-content;max-width:calc(100% - 8px);padding:6px 38px 6px 9px;font-size:12px;line-height:1.5;box-shadow:0 2px 8px #0006;pointer-events:auto}.ship-inspection-layer .ship-inspection strong{font-size:12px}.ship-inspection-layer .ship-inspection-close{min-width:36px;min-height:44px}.ship-inspection-vector{position:absolute;inset:0;width:100%;height:100%;overflow:hidden}.ship-inspection-vector path{fill:none;stroke:#ffcf70;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;filter:drop-shadow(0 1px 2px #000)}.ship-inspection-idle{position:absolute;padding:1px 4px;border-radius:3px;background:#081b17e8;color:#ffcf70;font-size:11px;white-space:nowrap}
.ship-inspection-layer .ship-inspection-idle{position:static;display:block;padding:0;background:none}.ship-inspection-layer .ship-inspection-idle[hidden]{display:none}

/* End-of-battle actions remain readable and reachable in narrow webviews. */
.result-modal[data-outcome="defeat"] .symbol{color:#f19887}
.result-modal[data-outcome="draw"] .symbol{color:#a7c8df}
.result-modal h2{line-height:1.25}
.result-details{padding:12px;border:1px solid #466753;border-radius:8px;color:#c3e6ce}
.result-modal .actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
.result-modal .actions button{min-height:48px;white-space:normal;overflow-wrap:anywhere}
.result-modal .actions .primary{grid-column:1/-1}
@media(max-width:380px){.result-modal .actions{grid-template-columns:1fr}}

.audio-level{display:grid;grid-template-columns:1fr auto;align-items:center;gap:2px 8px;padding:4px 10px;color:#b8ddb9;font-size:13px}.audio-level output{font-variant-numeric:tabular-nums;color:#8fae96}.audio-level input{grid-column:1/-1;width:100%;min-width:0;height:30px;margin:0;accent-color:#9bd6ad;touch-action:pan-x}.audio-level:has(input:disabled){opacity:.5}
