/* V20: four-faction tactical legend */
.four-faction-key{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:3px 8px;font-size:10px;}
.four-faction-key span{white-space:nowrap;}
.four-faction-key span:before{content:"◆ ";}
.four-faction-key .ours{color:#8af0c7;}
.four-faction-key .termite{color:#e4b884;}
.four-faction-key .wasp{color:#f2cf61;}
.four-faction-key .spider{color:#bda4f1;}
:root{font-family:system-ui,-apple-system,'Apple SD Gothic Neo','Malgun Gothic',sans-serif;background:#0b1412;color:#f5ebda;font-synthesis:none;--amber:#d5a66b;--ivory:#f1e8d6;--muted:#a0aaa0;--bg:#101e1a}
*{box-sizing:border-box}html,body{width:100%;height:100%;margin:0;overflow:hidden}button{font:inherit;-webkit-tap-highlight-color:transparent}button:focus-visible{outline:2px solid #f9d9a3;outline-offset:4px}
.game{position:relative;width:100vw;height:100vh;min-height:380px;isolation:isolate;background:linear-gradient(165deg,#283f36,#101c19 70%,#101513);overflow:hidden;user-select:none;-webkit-user-select:none;touch-action:none}
.stage-shell,.stage-shell canvas,.cinema-vignette{position:absolute;inset:0;width:100%;height:100%}.stage-shell canvas{display:block}.stage-shell #worldhud{pointer-events:none}.cinema-vignette{background:linear-gradient(180deg,rgba(6,16,14,.68) 0%,transparent 23%,transparent 68%,rgba(5,15,14,.38) 100%),radial-gradient(ellipse at center,transparent 39%,rgba(6,15,13,.28));pointer-events:none}
.topbar{pointer-events:none;position:absolute;z-index:5;inset:0 0 auto;min-height:78px;padding:23px max(28px,env(safe-area-inset-left)) 10px;display:grid;grid-template-columns:minmax(185px,1fr) minmax(230px,1fr) minmax(140px,1fr);gap:14px;align-items:start}
.brand{display:flex;align-items:center;gap:12px}.brand-mark{height:39px;width:39px;border:1px solid rgba(229,188,124,.68);display:grid;place-items:center;transform:rotate(45deg);border-radius:3px}.brand-mark span{font-family:Georgia,serif;font-size:14px;font-weight:700;transform:rotate(-45deg);color:#f1d49f}.brand-strap{display:block;color:var(--amber);font-size:9px;letter-spacing:.24em;font-weight:800}.brand strong{display:block;font-size:17px;letter-spacing:.055em}.brand em{font-style:normal;color:var(--amber)}.mission-status{text-align:center}.mission-label{display:flex;justify-content:center;align-items:center;gap:7px;font-size:9px;letter-spacing:.13em;color:#c3c9b9;font-weight:800}.live-dot{width:6px;height:6px;border-radius:50%;background:#d9b575;box-shadow:0 0 11px #eebd77}.mission-status b{display:block;margin-top:5px;font-size:15px;font-weight:740}.mission-status small{display:block;color:#d2c8a8;font-size:11px;margin-top:3px}.run-number{display:flex;justify-content:flex-end;gap:18px;font-variant-numeric:tabular-nums;font-size:11px;color:#c8cebf;letter-spacing:.06em}.run-number b{color:var(--ivory)}
.hud-left{position:absolute;z-index:5;left:28px;top:100px;width:230px;padding:14px 15px 13px;background:linear-gradient(110deg,rgba(13,25,21,.83),rgba(13,25,21,.35));border:1px solid rgba(227,206,166,.12);border-radius:11px;backdrop-filter:blur(10px);pointer-events:none}.vital-top{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px;color:#d1d2c4;font-size:10px;font-weight:650;letter-spacing:.1em}.vital-top b{color:#f5dfc7;font-variant-numeric:tabular-nums}.hp-track{height:6px;background:#4b3e35;overflow:hidden;border-radius:15px}.hp-fill{height:100%;width:100%;border-radius:15px;background:linear-gradient(90deg,#bd805d,#eab884);transition:width .16s linear}.hud-stats{display:flex;flex-wrap:wrap;justify-content:space-between;gap:9px;margin-top:12px;font-size:10px;color:#abb5a5}.hud-stats b{color:#ead8b7;padding-left:4px}.hud-gene{width:100%;font-size:10px;color:#d1d5c2}
.boss-bar{position:absolute;z-index:5;left:50%;transform:translateX(-50%);top:100px;width:min(320px,55vw);text-align:center;pointer-events:none}.boss-bar[hidden]{display:none}.boss-bar span{font-size:9px;color:#edc498;letter-spacing:.12em}.boss-bar span b{display:block;font-size:12px;color:#fbdfb7;letter-spacing:0;margin:3px 0 7px}.boss-track{height:8px;border:1px solid #b28c65;background:rgba(21,17,14,.73);padding:1px;border-radius:5px}.boss-track i{display:block;background:linear-gradient(90deg,#e09c5b,#f7d29a);height:100%;border-radius:3px;transition:width .15s}
.toast{position:absolute;z-index:6;top:180px;left:50%;transform:translateX(-50%) translateY(-8px);border:1px solid rgba(224,200,158,.25);background:rgba(13,24,19,.86);backdrop-filter:blur(10px);padding:10px 20px;border-radius:12px;text-align:center;font-weight:700;font-size:12px;color:#eddbb8;max-width:65vw;opacity:0;transition:opacity .24s,transform .24s;pointer-events:none}.toast.visible{opacity:1;transform:translateX(-50%) translateY(0)}.attack-feedback{position:absolute;left:50%;bottom:28%;font-size:27px;font-weight:900;color:#f8d9a6;text-shadow:0 2px 18px rgba(221,167,88,.6);opacity:0;transform:translateX(-50%) scale(.95);transition:opacity .15s,transform .15s;pointer-events:none}.attack-feedback.visible{opacity:.92;transform:translateX(-50%) scale(1)}
.bottom-hint{position:absolute;z-index:5;bottom:max(25px,env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);display:flex;align-items:center;gap:18px;white-space:nowrap;color:#abb3a5;font-size:10px;letter-spacing:.04em;text-shadow:0 2px 8px #000}.bottom-hint span{display:flex;align-items:center;gap:4px}.bottom-hint kbd{background:rgba(5,14,11,.7);border:1px solid rgba(230,215,179,.2);border-radius:3px;padding:2px 5px;color:#eadab8;font:inherit;font-weight:800}
.touch-stick,.attack-button{display:none}
.overlay{position:absolute;inset:0;z-index:20;background:radial-gradient(ellipse 65% 68% at 64% 40%,rgba(28,45,36,.63),rgba(6,15,13,.82) 68%),linear-gradient(96deg,rgba(6,13,12,.96),rgba(6,16,14,.1) 100%);backdrop-filter:blur(5px);overflow-y:auto;overscroll-behavior:contain}.overlay[hidden]{display:none!important}.intro-screen{display:flex;flex-direction:column;justify-content:space-between}.intro-decor{position:relative;display:flex;gap:15px;align-items:center;justify-content:flex-start;margin:35px 5% 0;color:#b4b4a4;font-size:9px;letter-spacing:.18em}.intro-decor .rule{display:block;width:40px;height:1px;background:#967b5b}.intro-content{position:relative;max-width:615px;margin:35px 5% 20px}.eyebrow{color:#e2b67b;font-size:10px;letter-spacing:.23em;font-weight:850}.eyebrow span{color:#b0aa9a}.intro-content h1{margin:22px 0 20px;font-size:clamp(45px,6.2vw,91px);letter-spacing:-.076em;line-height:1.06;font-weight:900;text-shadow:0 12px 45px rgba(0,0,0,.4)}.intro-content h1 em{color:#c6a072;font-style:normal}.intro-lead{font-size:clamp(12px,1.24vw,16px);line-height:1.75;color:#dfded1;word-break:keep-all}.subheading{display:flex;align-items:center;gap:10px;margin:30px 0 13px;font-size:12px}.subheading b{font-weight:760}.subheading .divider-line{width:3px;height:13px;background:#dfb884}.subtler{color:#aab09f;font-size:10px;font-weight:450}.gene-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}.gene-card{cursor:pointer;position:relative;display:flex;flex-direction:column;align-items:flex-start;gap:5px;text-align:left;min-height:98px;padding:12px 13px;border-radius:9px;border:1px solid rgba(224,220,200,.21);background:rgba(19,33,28,.74);color:#ede7d8;transition:border-color .15s,background .15s,transform .15s}.gene-card:hover{border-color:rgba(236,190,132,.7);transform:translateY(-1px)}.gene-card.is-selected{background:rgba(121,90,54,.25);border-color:#d5b078;box-shadow:0 0 0 1px rgba(213,176,120,.12) inset}.gene-symbol{color:#d9b47b;font-size:19px;height:22px;font-family:Georgia,serif}.gene-card strong{font-size:13px}.gene-card small{font-size:10px;color:#aab2a5;line-height:1.4}.cta{display:flex;justify-content:space-between;align-items:center;cursor:pointer;min-height:57px;width:100%;margin-top:17px;padding:12px 21px;border:0;border-radius:7px;background:linear-gradient(102deg,#d4a56d,#e9be87);color:#211a13;font-weight:890;font-size:16px;letter-spacing:-.03em;transition:filter .15s,transform .1s}.cta:hover{filter:brightness(1.09)}.cta:active{transform:scale(.991)}.cta b{font-size:25px}.intro-minor{display:flex;flex-wrap:wrap;gap:12px;justify-content:space-between;margin-top:13px;font-size:10px;color:#c3c8ba}.best-note{font-size:10px;color:#b19f83;margin-top:10px}.intro-footer{margin:18px 5% 27px;color:#90978c;font-size:9px;letter-spacing:.14em}.intro-footer span{margin:0 5px;color:#c4a378}
.end-screen{display:grid;place-items:center;text-align:center;background:rgba(6,15,12,.86)}.result-card{width:min(490px,92vw);padding:34px 29px 28px;border:1px solid rgba(227,186,125,.28);border-radius:19px;background:rgba(21,35,28,.88);box-shadow:0 24px 80px rgba(0,0,0,.35)}.result-card h2{font-size:clamp(39px,5vw,62px);margin:17px 0 12px;line-height:1.1}.result-card>p{font-size:13px;color:#d5d5c7;line-height:1.7}.results{display:grid;grid-template-columns:repeat(3,1fr);margin:29px 0 23px;padding:22px 0;border-top:1px solid #3d4a3e;border-bottom:1px solid #3d4a3e;gap:4px}.results div{display:grid;gap:7px}.results span{font-size:10px;color:#b9bfad}.results strong{font-size:22px;color:#ead6b4;font-variant-numeric:tabular-nums}.result-story{display:flex;flex-direction:column;gap:5px;align-items:center;font-size:11px;color:#c8c4b3}.result-card .record{font-size:11px;color:#d4b17d;min-height:15px;margin-top:15px}.result-card>small{display:block;color:#a8afa5;font-size:10px;line-height:1.5;margin-top:13px}.error-screen{padding:20%;text-align:center;color:#f2d3b0}.error-screen p{color:#c1c1ad}
@media(max-width:820px){.topbar{padding:18px 17px;grid-template-columns:1fr 1.2fr;gap:8px}.brand{gap:8px}.brand-mark{width:31px;height:31px}.brand strong{font-size:14px}.brand-strap{font-size:8px}.mission-status{text-align:right}.mission-label{justify-content:flex-end;font-size:8px}.mission-status b{font-size:12px}.run-number{grid-column:1 / -1;justify-content:space-between;padding:6px 2px;color:#c8cebf}.hud-left{left:17px;top:113px;width:185px;padding:10px}.boss-bar{top:128px;width:190px;left:auto;right:17px;transform:none}.toast{top:200px;max-width:75vw;font-size:11px}.bottom-hint{display:none}.touch-stick{display:flex;position:absolute;z-index:7;left:18px;bottom:calc(23px + env(safe-area-inset-bottom));width:125px;height:125px;border-radius:50%;background:rgba(19,37,32,.41);border:1px solid rgba(219,221,190,.23);box-shadow:0 0 0 13px rgba(12,28,22,.08);touch-action:none;align-items:center;justify-content:center;color:rgba(244,233,213,.55);font-size:9px;letter-spacing:.16em;font-weight:700}.touch-stick-knob{position:absolute;width:58px;height:58px;border-radius:50%;border:1px solid #d2b786;background:radial-gradient(circle at 40% 40%,rgba(240,191,125,.28),rgba(135,105,68,.21));box-shadow:0 0 20px rgba(240,196,139,.1)}.touch-stick span{position:absolute;bottom:-15px}.attack-button{display:flex;flex-direction:column;justify-content:center;align-items:center;position:absolute;z-index:8;right:24px;bottom:calc(42px + env(safe-area-inset-bottom));height:108px;width:108px;border:2px solid #e2bd82;border-radius:50%;background:radial-gradient(circle at 30% 28%,#d0a66f,#8f5b3b 80%);box-shadow:0 0 0 8px rgba(234,190,128,.09),inset 0 0 17px rgba(14,15,7,.17);color:#fff0d7;touch-action:none;font-weight:900;font-size:14px;text-shadow:0 1px 5px rgba(0,0,0,.5)}.attack-button small{font-size:7px;letter-spacing:.12em;margin-top:4px;opacity:.75}.attack-button.pressed{transform:scale(.92);filter:brightness(1.14)}.intro-content{margin:26px auto 20px;width:min(560px,91%)}.intro-content h1{font-size:clamp(42px,9vw,66px)}.intro-decor{margin:27px 5% 0}}
@media(max-width:480px){.game{min-height:300px}.topbar{padding:12px 12px}.brand strong{font-size:12px}.brand-mark{width:28px;height:28px}.brand-strap{font-size:7px}.mission-label{font-size:7px}.mission-status b{font-size:11px}.mission-status small{font-size:9px}.hud-left{top:100px;left:11px;width:162px}.vital-top{font-size:8px}.hud-stats{font-size:9px}.hud-gene{font-size:9px}.boss-bar{top:106px;right:11px;width:151px}.boss-bar span b{font-size:10px}.intro-decor{margin-top:18px;font-size:7px}.intro-content{margin:18px auto}.intro-content h1{font-size:clamp(38px,12vw,56px);margin:13px 0}.intro-lead{font-size:12px}.subheading{margin-top:17px}.gene-grid{gap:6px}.gene-card{min-height:83px;padding:8px 7px}.gene-card strong{font-size:12px}.gene-card small{font-size:9px}.cta{min-height:48px;margin-top:11px}.intro-minor{font-size:9px;gap:6px}.best-note{font-size:9px}.intro-footer{font-size:7px;margin-bottom:15px;line-height:1.4}.touch-stick{left:18px;bottom:calc(18px + env(safe-area-inset-bottom));width:116px;height:116px}.attack-button{right:24px;bottom:calc(34px + env(safe-area-inset-bottom));width:101px;height:101px}.toast{top:165px;font-size:10px}.result-card{padding:23px 19px}.results strong{font-size:18px}}
@media(max-height:620px) and (min-width:821px){.intro-decor{margin-top:15px}.intro-content{margin-top:12px}.intro-content h1{font-size:clamp(38px,6vw,62px);margin:9px 0}.intro-lead{line-height:1.4}.subheading{margin:13px 0 9px}.gene-card{min-height:72px;padding:8px 10px}.cta{min-height:46px;margin-top:10px}.intro-footer{margin:6px 5% 12px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important}}

/* V4 physical drops: compact counters, no extra combat action. */
.loot-strip{display:flex;gap:7px;margin-top:9px;padding-top:8px;border-top:1px solid rgba(235,218,172,.13)}
.loot-pill{display:flex;flex:1;flex-direction:column;gap:3px;min-width:0;padding:6px 7px;border:1px solid rgba(196,221,178,.12);background:rgba(6,15,12,.36);border-radius:6px;color:#d0e6dc;font-size:10px}
.loot-pill b{display:flex;align-items:center;justify-content:space-between;gap:3px;white-space:nowrap}
.loot-pill strong{font-size:11px;color:#e7f5e7;font-variant-numeric:tabular-nums}
.loot-pill small{font-size:9px;white-space:nowrap;color:#aebeb4}
.loot-pill.fluid{border-left:2px solid #6baead}.loot-pill.shell{border-left:2px solid #d4a573}
@media(max-width:480px){.loot-strip{gap:4px}.loot-pill{padding:5px 4px;font-size:9px}.loot-pill strong{font-size:9px}.loot-pill small{font-size:8px}.hud-left{width:175px}}

/* V5: a single contextual evolution action, invisible before the first real pickup. */
.evolution-button[hidden],.evolution-panel[hidden]{display:none!important}
.evolution-button{display:flex;align-items:center;justify-content:space-between;gap:9px;width:100%;margin-top:8px;padding:8px 10px;background:rgba(17,32,25,.85);border:1px solid rgba(213,181,133,.4);border-radius:7px;color:#eddbc0;cursor:pointer;font-size:11px;font-weight:780}
.evolution-button small{font-size:9px;font-weight:550;color:#adb8a5}.evolution-button.can-upgrade{border-color:#d5b176;background:rgba(89,70,37,.49)}
.evolution-panel{position:absolute;inset:0;z-index:19;display:grid;place-items:center;padding:16px;background:rgba(4,12,10,.8);backdrop-filter:blur(8px);overflow:auto}
.evolution-content{width:min(720px,96vw);max-height:min(90dvh,740px);overflow:auto;border:1px solid rgba(215,174,123,.4);background:#17251e;border-radius:16px;padding:23px;box-shadow:0 24px 80px rgba(0,0,0,.48)}
.evolution-header{display:flex;align-items:start;justify-content:space-between;gap:12px}.evolution-header h2{margin:7px 0 5px;font-size:26px}.evolution-header p{font-size:12px;color:#c8cdbe;line-height:1.5;margin:0}
#evolutionClose{background:rgba(236,213,179,.12);border:1px solid rgba(230,200,151,.23);color:#f5e8d6;border-radius:8px;font-size:27px;min-width:39px;height:39px;cursor:pointer}
.evolution-inventory{padding:9px 12px;border-radius:7px;background:rgba(9,18,13,.73);color:#dcead6;font-size:13px;font-weight:800}
.evolution-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.evolution-choice{display:flex;flex-direction:column;align-items:flex-start;text-align:left;gap:7px;padding:15px 13px;min-height:173px;border:1px solid #6b674c;border-radius:10px;background:rgba(61,55,40,.44);color:#f5ead6;cursor:pointer}
.evolution-choice:focus-visible,.evolution-button:focus-visible{outline:2px solid #eec581;outline-offset:2px}.evolution-choice:hover:not(:disabled){background:rgba(94,78,49,.7);border-color:#d7ba88}.evolution-choice:disabled{opacity:.57;cursor:not-allowed}.evo-symbol{color:#e3b57b;font-size:24px}.evolution-choice strong{font-size:17px}.evo-level{color:#e4d0a9;font-size:12px;font-weight:700}.evolution-choice small{font-size:11px;line-height:1.55;color:#c8c8b8}.evolution-choice b{margin-top:auto;color:#f5c886;font-size:11px}.evolution-status{min-height:18px;color:#dfc494;font-size:12px}
.evolution-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;color:#b9bfae;font-size:11px}.evolution-footer button{padding:10px 18px;border:1px solid #c4a171;background:#876840;border-radius:7px;color:#ffefda;font-weight:800;cursor:pointer}
@media(max-width:560px){.evolution-content{padding:14px;max-height:90dvh}.evolution-header h2{font-size:20px}.evolution-grid{grid-template-columns:1fr;gap:7px}.evolution-choice{min-height:initial;padding:10px 13px;gap:2px;display:grid;grid-template-columns:36px auto;grid-template-rows:repeat(3,auto)}.evolution-choice .evo-symbol{grid-column:1;grid-row:1 / 4}.evolution-choice strong,.evolution-choice small,.evolution-choice b,.evolution-choice .evo-level{grid-column:2}.evolution-choice strong{font-size:13px}.evolution-choice small,.evolution-choice b{font-size:10px}.evolution-footer span{display:none}.evolution-button{font-size:10px}.evolution-button small{font-size:8px}}

/* V6: no extra actions. Compact HP pips and three explicit numerical capture rewards. */
.squad-readout{border-top:1px solid rgba(213,207,174,.12);margin-top:8px;padding-top:8px}
.squad-readout small{display:block;font-size:9px;letter-spacing:.06em;color:#b6c6b5;margin-bottom:5px}
.squad-health{display:flex;gap:4px;height:5px}
.squad-pip{display:block;flex:1;min-width:8px;background:rgba(99,97,77,.55);border-radius:3px;overflow:hidden}
.squad-pip i{display:block;height:100%;background:#91c89b;transition:width .15s}
.squad-pip.is-fallen{background:rgba(153,80,70,.39)}.squad-pip.is-fallen i{width:0!important}
.outpost-readout{border-top:1px solid rgba(213,207,174,.15);margin-top:9px;padding-top:7px}
.capture-heading{display:flex;align-items:center;justify-content:space-between;color:#d6caaa;font-size:9px;letter-spacing:.1em;font-weight:750;margin-bottom:4px}
.capture-heading b{font-size:11px;color:#e4d4ad;letter-spacing:0}
.capture-list{display:grid;gap:2px}
.capture-row{display:flex;justify-content:space-between;gap:5px;font-size:9px;line-height:1.55;color:#a5a999}
.capture-row span{flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.capture-row strong{color:#d9c294;text-align:right;font-size:8.2px;font-weight:650}
.capture-row.is-claimed span,.capture-row.is-claimed strong{color:#9ed2a8}
@media(max-width:820px){.hud-left{padding:9px 10px}.capture-row{font-size:8px;line-height:1.4}.capture-row strong{font-size:7.4px}.squad-readout small{font-size:8px}}
@media(max-width:480px){.hud-left{width:184px}.capture-row{font-size:7.5px}.capture-row strong{font-size:7.2px}.capture-heading{font-size:8px}.capture-heading b{font-size:9px}}

/* V7 long-form campaign: live home-colony health without extra commands. */
.colony-readout{margin-top:9px;padding-top:8px;border-top:1px solid rgba(172,218,184,.2)}
.colony-heading{display:flex;justify-content:space-between;align-items:center;gap:7px;color:#b5d3b4;font-size:9px;font-weight:800;letter-spacing:.065em}
.colony-heading b{color:#dce8d0;font-size:10px;font-variant-numeric:tabular-nums;letter-spacing:0}
.colony-hp{height:5px;margin:6px 0 5px;background:#364c3a;border-radius:8px;overflow:hidden}
.colony-hp i{display:block;height:100%;background:linear-gradient(90deg,#779b79,#c0dd9d);transition:width .2s}
.colony-readout small{font-size:9px;color:#a5b79e}
@media(max-width:480px){.colony-heading{font-size:8px}.colony-readout small{font-size:8px}.capture-list .capture-row:nth-child(n+3){display:none}}

/* V8: a compact human-readable gauge; no targeting reticle or lock-on button. */
.spirit-bar{margin-top:9px;padding:8px 9px;border:1px solid rgba(164,217,174,.24);border-radius:7px;background:rgba(7,25,19,.59);display:grid;grid-template-columns:1fr auto;gap:5px 8px;color:#bfd7bc;font-size:9px;font-weight:850;letter-spacing:.055em}
.spirit-bar b{color:#e1f7d8;font-size:10px;font-variant-numeric:tabular-nums;letter-spacing:0}
.spirit-track{grid-column:1/-1;height:7px;overflow:hidden;border-radius:8px;background:rgba(49,77,55,.9)}
.spirit-track i{display:block;height:100%;border-radius:8px;background:linear-gradient(90deg,#6fa47c,#bddc8b,#f0de9e);transition:width .13s}
.action-cluster{display:none;pointer-events:auto}
.combat-button{touch-action:none;user-select:none;-webkit-user-select:none;border-radius:50%;display:grid;place-content:center;gap:3px;text-align:center;font-weight:900;letter-spacing:-.03em;cursor:pointer;color:#fff1d8;text-shadow:0 2px 7px #15231d;box-shadow:inset 0 -6px 11px rgba(15,26,21,.25),0 0 0 4px rgba(14,25,22,.17)}
.combat-button small{font-size:8px;font-weight:700;letter-spacing:.07em;color:#faead7;opacity:.85}
.combat-button.pressed{transform:scale(.93);filter:brightness(1.18)}
.combat-button:disabled{cursor:default;opacity:.56;filter:saturate(.6)}
.action-cluster .light-button{position:relative;right:auto;bottom:auto;width:88px;height:88px;font-size:14px;border:2px solid #e3c48d;background:radial-gradient(circle at 30% 25%,#dcae6d,#985d3d 82%)}
.action-cluster .heavy-button{width:77px;height:77px;font-size:11px;border:2px solid #c0a88c;background:linear-gradient(140deg,#99816c,#544b3e)}
.action-cluster .special-button{width:77px;height:77px;font-size:10px;border:2px solid #a8cf9f;background:linear-gradient(140deg,#507a62,#244837)}
.action-cluster .special-button.ready{box-shadow:0 0 0 4px rgba(157,229,155,.20),0 0 16px rgba(177,231,164,.52),inset 0 -7px 10px #1b432d;opacity:1;filter:none}
.action-cluster .dodge-button{width:66px;height:66px;font-size:11px;border:2px solid #acbdbe;background:linear-gradient(140deg,#667d7c,#344b4a)}
.rotate-device{display:none}
/* All landscape iPhone and Android viewports, including >820px wide models. */
@media (max-width:1050px), (pointer:coarse){
 .action-cluster{display:grid;position:absolute;z-index:11;right:max(14px,env(safe-area-inset-right));bottom:max(13px,env(safe-area-inset-bottom));grid-template-columns:77px 88px;grid-template-rows:77px 88px;gap:8px 11px;align-items:center;justify-items:center}
 .touch-stick{display:flex;position:absolute;z-index:11;left:max(17px,env(safe-area-inset-left));bottom:max(25px,env(safe-area-inset-bottom));width:126px;height:126px;border-radius:50%;background:rgba(14,31,24,.52);border:1px solid rgba(222,217,192,.29);touch-action:none;align-items:center;justify-content:center;color:#d8d3bb;font-size:9px;letter-spacing:.1em;font-weight:700}
 .touch-stick-knob{position:absolute;width:55px;height:55px;border-radius:50%;background:rgba(211,169,112,.27);border:2px solid rgba(236,203,154,.74)}
 .touch-stick span{position:absolute;bottom:-15px}
 .bottom-hint{display:none}
 .topbar{padding:12px max(14px,env(safe-area-inset-left)) 5px;min-height:55px;grid-template-columns:1fr 1.5fr auto;gap:10px;align-items:start}
 .brand-mark{width:30px;height:30px}.brand strong{font-size:13px}.brand-strap{font-size:8px}.mission-status b{font-size:12px}.mission-status small{font-size:9px}
 .run-number{font-size:9px;gap:9px;grid-column:auto;justify-content:flex-end}
 .hud-left{left:max(13px,env(safe-area-inset-left));top:69px;width:187px;padding:8px 10px;max-height:calc(100dvh - 77px);overflow:hidden}
 .hud-stats{margin-top:6px;gap:5px}.hud-gene{display:none}.squad-readout{margin-top:5px;padding-top:5px}.colony-readout{margin-top:6px;padding-top:5px}
 .capture-list{display:none}.outpost-readout{margin-top:5px;padding-top:4px}.capture-heading{margin-bottom:0}
 .loot-strip{margin-top:5px;padding-top:5px}.loot-pill{padding:4px 5px}.spirit-bar{margin-top:6px;padding:5px 7px;gap:4px}.spirit-track{height:5px}
 .evolution-button{padding:5px 7px;margin-top:5px;font-size:10px}
 .boss-bar{top:68px;left:50%;right:auto;transform:translateX(-50%);width:min(245px,37vw)}
 .toast{top:70px;max-width:37vw;padding:5px 10px;font-size:10px}
 .attack-feedback{bottom:25%;font-size:20px;white-space:nowrap}
}
@media (orientation:landscape) and (max-height:500px){
 .game{min-height:0;height:100dvh;width:100dvw}
 .topbar{padding-top:5px;min-height:44px}.brand-mark{width:25px;height:25px}.brand strong{font-size:12px}.brand-strap{font-size:7px}.mission-label{font-size:7px}.mission-status b{margin-top:2px;font-size:11px}.mission-status small{margin-top:0;font-size:8px}
 .hud-left{top:47px;width:170px;padding:5px 8px;max-height:calc(100dvh - 52px)}
 .hud-stats{font-size:8px}.vital-top{font-size:8px;margin-bottom:4px}.hp-track{height:4px}
 .squad-readout small,.colony-readout small{font-size:8px}.squad-health{height:3px}.colony-heading{font-size:8px}.colony-hp{height:4px;margin:3px 0}.outpost-readout{padding-top:3px}.capture-heading{font-size:8px}
 .loot-strip{margin-top:3px;padding-top:3px}.loot-pill{font-size:8px;padding:3px}.loot-pill strong{font-size:9px}
 .spirit-bar{padding:3px 6px;margin-top:4px;font-size:8px}.spirit-bar b{font-size:9px}.spirit-track{height:4px}
 .evolution-button{padding:4px 5px;margin-top:3px;font-size:9px}.evolution-button small{font-size:8px}
 .touch-stick{width:109px;height:109px;bottom:max(18px,env(safe-area-inset-bottom))}.touch-stick-knob{width:51px;height:51px}
 .action-cluster{transform:scale(.87);transform-origin:bottom right;right:max(9px,env(safe-area-inset-right));bottom:max(5px,env(safe-area-inset-bottom))}
 .boss-bar{top:46px}.toast{top:46px}.attack-feedback{font-size:16px;bottom:30%}
 .intro-decor{margin-top:5px}.intro-content{margin-top:4px;margin-bottom:4px}.intro-content h1{font-size:clamp(31px,5vw,44px);margin:6px 0}.intro-lead{font-size:10px;line-height:1.35}.subheading{margin:8px 0 5px;font-size:10px}.gene-card{min-height:56px;padding:6px 8px;gap:2px}.gene-symbol{font-size:12px;height:12px}.gene-card strong{font-size:11px}.gene-card small{font-size:8px}.cta{min-height:35px;padding:5px 12px;margin-top:6px;font-size:12px}.intro-minor{margin-top:5px;font-size:8px;gap:5px}.best-note{margin-top:3px;font-size:8px}.intro-footer{font-size:7px;margin:2px 5% 7px}
 .evolution-content{max-height:94dvh;padding:12px}.evolution-header h2{font-size:18px;margin:2px 0}.evolution-header p{font-size:10px}.evolution-inventory{margin:5px 0;padding:5px;font-size:10px}.evolution-choice{min-height:105px;padding:8px;gap:4px}.evolution-choice strong{font-size:13px}.evolution-choice small,.evolution-choice b{font-size:9px}.evo-symbol{font-size:16px}.evolution-status{margin:5px 0}.evolution-footer button{padding:7px 10px}
}
@media (orientation:portrait) and (max-width:820px){
 .game.is-playing .rotate-device{display:flex;position:absolute;z-index:12;pointer-events:none;top:72px;left:50%;transform:translateX(-50%);min-width:225px;max-width:70vw;padding:8px 10px;border:1px solid rgba(227,198,149,.4);border-radius:10px;background:rgba(15,28,23,.87);flex-direction:column;gap:2px;align-items:center;text-align:center;color:#f0d9b6;font-size:10px;box-shadow:0 4px 18px rgba(0,0,0,.25)}
 .rotate-device strong{font-size:12px}.rotate-device span{font-size:9px;color:#ccceb7}
 .action-cluster{transform:scale(.74);transform-origin:bottom right;right:5px;bottom:7px}
 .touch-stick{width:111px;height:111px;bottom:14px}
}
@media (pointer:coarse){.action-cluster .combat-button{min-height:54px;min-width:54px}}

.combat-summary{margin:-8px 0 12px;padding:8px 9px;border-radius:7px;background:rgba(169,123,66,.13);border:1px solid rgba(231,186,119,.17);color:#f1d9ae;font-size:11px;font-weight:700;line-height:1.6}

/* Camera gesture surface is independent of on-field virtual action buttons. */
.stage-shell #world3d{touch-action:none;cursor:grab}
.game.is-playing .stage-shell #world3d:active{cursor:grabbing}
.camera-hint{position:absolute;bottom:17px;left:50%;transform:translateX(-50%);padding:5px 11px;z-index:4;border:1px solid rgba(216,201,162,.25);border-radius:9px;background:rgba(8,21,17,.53);color:#d9d6be;font-size:10px;letter-spacing:.025em;pointer-events:none;white-space:nowrap}
@media(max-width:820px){.camera-hint{bottom:8px;font-size:9px;padding:4px 7px;left:50%;max-width:38vw;white-space:normal;text-align:center}}
@media (orientation:landscape) and (max-height:500px){.camera-hint{bottom:4px;left:50%;font-size:8px;padding:3px 6px}}

/* V10 tactical UI: concise combo/guard status, Q/E-only yaw and five real actions. */
.combo-readout{padding:6px 0 1px;color:#e9c88f;font-size:9px;line-height:1.4;font-weight:750;letter-spacing:.01em}
.guard-stamina{padding:2px 0 0;color:#9ed5b4;font-size:9px;font-weight:700;letter-spacing:.03em}
.stamina-track{height:5px;border-radius:8px;background:#31473e;overflow:hidden;margin:4px 0 1px;box-shadow:inset 0 1px 2px #10231d}
.stamina-track i{display:block;height:100%;border-radius:8px;background:linear-gradient(90deg,#ba9864,#a2d9a7);transition:width .09s linear}
.camera-buttons{display:none}
.stage-shell #world3d{cursor:crosshair}
.game.is-playing .stage-shell #world3d:active{cursor:crosshair}
.action-cluster .guard-button{width:64px;height:64px;font-size:11px;border:2px solid #9bd4ad;background:linear-gradient(135deg,#577761,#25483b)}
@media (max-width:1050px), (pointer:coarse){
 .action-cluster{grid-template-areas:"guard dodge special" ". heavy light";grid-template-columns:64px 72px 81px;grid-template-rows:65px 83px;gap:5px 6px}
 .action-cluster .guard-button{grid-area:guard;width:60px;height:60px}
 .action-cluster .dodge-button{grid-area:dodge;width:62px;height:62px}
 .action-cluster .special-button{grid-area:special;width:67px;height:67px}
 .action-cluster .heavy-button{grid-area:heavy;width:70px;height:70px}
 .action-cluster .light-button{grid-area:light;width:81px;height:81px}
 .camera-buttons{display:flex;position:absolute;z-index:11;bottom:max(15px,env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);gap:8px}
 .camera-buttons button{border:1px solid rgba(233,211,169,.6);background:rgba(17,37,30,.82);color:#f2dba8;width:48px;height:42px;border-radius:9px;touch-action:none;font-size:14px;font-weight:800;display:flex;align-items:center;justify-content:center;gap:4px}
 .camera-buttons button small{font-size:9px;font-weight:650;color:#b6c8b6}
 .camera-buttons button.pressed{background:rgba(106,134,95,.82);filter:brightness(1.2)}
 .camera-hint{display:none}
 .combo-readout{font-size:8px}
 .guard-stamina{font-size:8px}
}
@media (orientation:landscape) and (max-height:500px){
 .action-cluster{transform:scale(.83)}
 .camera-buttons{bottom:4px;gap:5px}
 .camera-buttons button{width:43px;height:34px;font-size:12px}
 .combo-readout{padding-top:3px;font-size:7px}
 .guard-stamina{font-size:7px}
}


/* V11 tactical composition: map never shares the screen-space HUD canvas with
   topbar, boss bar or combat prompts. Four anchored regions do not overlap. */
.tactical-panel{position:absolute;z-index:6;top:101px;right:max(24px,env(safe-area-inset-right));width:172px;padding:8px;background:rgba(9,26,21,.88);border:1px solid rgba(226,205,170,.28);border-radius:10px;box-shadow:0 6px 22px rgba(0,0,0,.26);pointer-events:none;backdrop-filter:blur(6px)}
.tactical-heading{display:flex;align-items:center;justify-content:space-between;gap:4px;color:#eadcbf;font-size:10px;font-weight:750;padding:0 2px 6px}
.tactical-heading span{font-size:9px;color:#a1dcaf;font-variant-numeric:tabular-nums}
#tacticalMap{display:block;width:100%;height:156px;border-radius:4px;image-rendering:auto;background:#1c332a}
.tactical-legend{display:flex;justify-content:space-between;gap:3px;color:#bcd4c1;font-size:8px;padding:5px 0 0}
.tactical-legend span:nth-child(1){color:#8be9cc}.tactical-legend span:nth-child(2){color:#f4e1aa}.tactical-legend span:nth-child(3){color:#f29c94}
.map-orientation{display:block;font-size:8px;color:#9baea1;padding-top:4px;line-height:1.2}
.battle-momentum{display:block;padding:5px 4px 3px;font-size:9px;letter-spacing:-.2px;color:#e4c9a6;line-height:1.25}
.battle-momentum[data-posture="retreat"]{color:#f2a38c}.battle-momentum[data-posture="counter"]{color:#a3e9ba}
.frontline-row.retreat{color:#ffc0a3}.frontline-row.retreat i{background:#ef836b}
.hud-left{width:224px;max-height:calc(100dvh - 146px);overflow:hidden}
.capture-list .capture-row{line-height:1.2;padding-top:4px;padding-bottom:4px}
.bottom-hint{gap:12px;bottom:max(13px,env(safe-area-inset-bottom));padding:5px 13px;border-radius:7px;background:rgba(5,19,15,.57);font-size:9px;max-width:calc(100vw - 35px)}
.toast{top:159px;max-width:min(460px,50vw);font-size:11px;line-height:1.35}
.attack-feedback{bottom:27%;font-size:19px;max-width:min(390px,55vw);text-align:center;line-height:1.24;white-space:normal;text-wrap:balance;text-shadow:0 2px 12px rgba(0,0,0,.9),0 0 16px rgba(229,173,104,.45);z-index:7}
.boss-bar{top:102px;width:min(300px,36vw)}
/* At 1200 and below, keep the top-center mission visually subordinate to the map. */
@media(max-width:1200px){
 .bottom-hint{gap:8px;font-size:8px}
 .hud-left{left:13px;top:79px;width:185px;padding:9px}
 .tactical-panel{right:13px;top:79px;width:151px}
 #tacticalMap{height:140px}
 .topbar{padding:13px 13px 6px;min-height:59px}
 .topbar .brand strong{font-size:13px}
 .mission-status b{font-size:12px}
 .boss-bar{top:76px}
 .toast{top:126px}
}
@media(max-width:1050px),(pointer:coarse){
 .topbar{grid-template-columns:minmax(100px,.9fr) minmax(145px,1.65fr) auto;min-height:46px;padding:5px max(11px,env(safe-area-inset-left)) 2px;gap:5px}
 .topbar .brand-mark{width:25px;height:25px}.topbar .brand strong{font-size:11px}
 .mission-label{font-size:7px}.mission-status b{font-size:10px;margin-top:2px}.mission-status small{font-size:8px;margin-top:0}
 .run-number{font-size:8px;gap:3px;flex-direction:column;align-items:flex-end;justify-content:center}
 .hud-left{left:max(9px,env(safe-area-inset-left));top:48px;width:170px;padding:7px 8px;max-height:calc(100dvh - 168px);overflow:visible}
 .hud-stats{margin-top:5px;gap:4px}.squad-readout{margin-top:3px;padding-top:4px}
 .colony-readout{margin-top:4px;padding-top:4px}.colony-readout small{display:none}
 .outpost-readout{display:none}
 .combo-readout{display:none}.guard-stamina{padding-top:2px;font-size:8px}
 .loot-strip{padding-top:4px;margin-top:3px}.loot-pill{padding:3px 5px}
 .spirit-bar{margin-top:4px;padding:4px 6px;gap:2px}.spirit-track{height:5px}
 .evolution-button{padding:4px;margin-top:4px;font-size:10px}
 .evolution-button small{display:none}
 .tactical-panel{right:max(9px,env(safe-area-inset-right));top:48px;width:143px;padding:5px 6px}
 .tactical-heading{padding:0 0 4px;font-size:9px}.tactical-heading span{font-size:8px}
 #tacticalMap{height:121px}.tactical-legend{font-size:7px}
 .boss-bar{top:48px;width:min(185px,31vw)}
 .toast{top:105px;max-width:33vw;font-size:9px;padding:5px 9px}
 .attack-feedback{bottom:43%;font-size:14px;max-width:30vw}
 .bottom-hint{display:none}
 .camera-hint{display:none}
}
@media(orientation:landscape) and (max-height:500px){
 .hud-left{top:46px;max-height:calc(100dvh - 166px);padding:5px 7px;width:158px}
 .hud-stats{font-size:8px}.squad-readout small{font-size:8px}.squad-health{height:3px}
 .colony-readout{margin-top:3px}.colony-heading{font-size:8px}.colony-hp{height:3px;margin:2px 0}
 .spirit-bar{padding:3px 5px}.spirit-bar span{font-size:7px}.spirit-bar b{font-size:8px}
 .guard-stamina{font-size:7px}.loot-strip{margin-top:2px}.loot-pill{padding:2px 4px}
 .evolution-button{margin-top:3px;padding:3px 5px;font-size:9px}
 .tactical-panel{top:46px;width:139px}.tactical-heading{font-size:8px}
 #tacticalMap{height:116px}.tactical-legend{padding-top:3px}
 .toast{top:94px}.boss-bar{top:47px}
 .action-cluster{right:max(7px,env(safe-area-inset-right));bottom:max(5px,env(safe-area-inset-bottom));transform:scale(.79)}
 .camera-buttons{bottom:max(5px,env(safe-area-inset-bottom))}
}
@media(orientation:landscape) and (max-height:350px){
 .topbar .mission-status small{display:none}.hud-left .squad-health{display:none}
 .hud-left{width:151px;max-height:calc(100dvh - 140px)}
 .tactical-panel{width:128px}#tacticalMap{height:93px}
 .tactical-legend{font-size:6px}
 .action-cluster{transform:scale(.72)}
}
@media(orientation:portrait) and (max-width:820px){
 .hud-left{top:87px;max-height:calc(100dvh - 210px)}
 .tactical-panel{top:89px}
 .topbar{grid-template-columns:1fr 1fr auto}
 .rotate-device{z-index:12}
}

/* V12: no duplicated hotkey strips; full input legend lives behind the Help button. */
.game.is-playing .bottom-hint,.game.is-playing .camera-hint{display:none!important}
.topbar .help-button{pointer-events:auto;flex:0 0 auto;display:grid;place-items:center;width:29px;height:29px;border-radius:7px;border:1px solid rgba(220,189,136,.52);background:rgba(21,41,32,.88);color:#f5d6a3;cursor:pointer;font-weight:900;font-size:15px;margin-left:4px}
.topbar .help-button[aria-expanded="true"]{border-color:#f2cd8a;background:#574a31}
.help-panel[hidden]{display:none!important}
.help-panel{position:absolute;inset:0;z-index:28;display:grid;place-items:center;padding:17px;background:rgba(4,12,10,.82);backdrop-filter:blur(7px);overflow:auto;pointer-events:auto}
.help-content{width:min(785px,96vw);max-height:94dvh;overflow:auto;padding:18px 21px;border:1px solid rgba(223,190,133,.48);border-radius:14px;background:#14261e;color:#efe3ce;box-shadow:0 16px 65px rgba(0,0,0,.52)}
.help-header{display:flex;justify-content:space-between;align-items:center;gap:15px}.help-header small{font-size:9px;letter-spacing:.15em;color:#d9af78}.help-header h2{margin:3px 0 8px;font-size:22px}
#helpClose{font-size:24px;color:#f6e3c7;background:rgba(232,211,172,.12);border:1px solid #80694f;border-radius:8px;width:38px;height:36px;cursor:pointer}
.help-columns{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.help-columns>div{background:rgba(5,20,14,.54);border:1px solid #355342;border-radius:9px;padding:12px 11px}.help-columns h3{font-size:12px;color:#e5bb85;margin:0 0 8px}.help-columns p{font-size:11px;line-height:1.5;color:#c8d6c6;margin:5px 0 8px}
.help-columns kbd{border:1px solid #637668;border-radius:4px;background:#21352a;color:#f4dfac;padding:1px 4px;font-size:10px;white-space:nowrap}.help-note{font-size:10px;line-height:1.6;color:#aebdb2;margin:11px 0 0}
.game.map-expanded .tactical-panel{width:min(290px,42vw)!important;z-index:14!important;background:rgba(9,27,20,.97)!important}
.game.map-expanded .tactical-panel #tacticalMap{height:min(265px,49dvh)!important}
.touch-trigger-button,.touch-jump-button{font-size:8px!important;letter-spacing:.02em!important;min-width:48px!important;width:57px!important;padding:0 2px!important}
.touch-trigger-button.pressed{background:rgba(205,148,72,.91)!important;color:#171c15!important}
@media(max-width:1050px),(pointer:coarse){.topbar .help-button{width:24px;height:24px;font-size:12px;margin-left:0}.camera-buttons{gap:4px}.camera-buttons button{width:38px;height:37px}}
@media(orientation:landscape) and (max-height:500px){.topbar .help-button{width:22px;height:22px}.camera-buttons button{width:35px;height:31px}.camera-buttons .touch-trigger-button,.camera-buttons .touch-jump-button{width:49px!important;min-width:46px!important;font-size:7px!important}}
@media(max-width:620px){.help-columns{grid-template-columns:1fr;gap:5px}.help-content{padding:11px}.help-columns>div{padding:7px 9px}.help-columns p{font-size:10px;margin:3px 0}.help-header h2{font-size:18px}}

/* V13: remote fronts and independent squad status share the map panel;
   the center combat view and touch controls do not receive a new overlay. */
.frontline-summary{margin-top:7px;padding-top:6px;border-top:1px solid rgba(179,219,197,.22)}
.frontline-summary>strong{display:flex;justify-content:space-between;font-size:9px;color:#d6ead3}
.frontline-summary>strong b{font-variant-numeric:tabular-nums;color:#9de4cc}
.frontline-list{display:grid;grid-template-columns:1fr 1fr;gap:3px 5px;margin-top:4px}
.frontline-row{font-size:8px;display:flex;align-items:center;gap:3px;color:#a9c4b4;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.frontline-row i{flex:0 0 5px;width:5px;height:5px;border-radius:50%;background:#90ddc3}
.frontline-row.engage i{background:#eac782}.frontline-row.regroup i{background:#c6846e}
.frontline-row span{overflow:hidden;text-overflow:ellipsis}
@media(max-width:1050px),(pointer:coarse){
 .frontline-summary{margin-top:4px;padding-top:4px}.frontline-summary>strong{font-size:8px}
 .frontline-list{gap:2px}.frontline-row{font-size:7px}
}
@media(orientation:landscape) and (max-height:500px){
 .tactical-panel{width:157px}
 #tacticalMap{height:110px}
 .frontline-summary{margin-top:3px;padding-top:2px}
 .frontline-list{grid-template-columns:repeat(3,minmax(0,1fr));gap:1px 3px}
 .frontline-row{font-size:6px}
}
@media(orientation:landscape) and (max-height:350px){
 .tactical-panel{width:145px}#tacticalMap{height:80px}
 .frontline-summary>strong{font-size:7px}.frontline-row{font-size:6px}
}

/* V14 relative mouse look / on-field cinematic: DOM overlays contain no buttons. */
.game.is-playing.mouse-locked .stage-shell #world3d{cursor:none!important}
.game.is-playing.mouse-locked .stage-shell{cursor:none!important}
.pointer-hint{position:absolute;top:44%;left:50%;transform:translate(-50%,-50%);z-index:9;pointer-events:none;
 padding:12px 17px;border:1px solid rgba(244,210,150,.45);border-radius:8px;background:rgba(8,18,16,.87);
 color:#f7e0b1;font-size:12px;white-space:nowrap;text-align:center;box-shadow:0 12px 40px rgba(0,0,0,.30)}
.pointer-hint[hidden]{display:none!important}
@media(pointer:coarse){.pointer-hint{display:none!important}}
.alpha-reveal{position:absolute;inset:0;z-index:28;display:flex;align-items:center;justify-content:center;flex-direction:column;
 gap:7px;background:radial-gradient(ellipse at 50% 52%,rgba(44,24,21,.15),rgba(4,9,9,.56));pointer-events:none;
 color:#f7dcc2;text-shadow:0 2px 14px #050909;animation:alpha-reveal-in .45s ease both}
.alpha-reveal[hidden]{display:none!important}
.alpha-reveal:before,.alpha-reveal:after{position:absolute;left:0;width:100%;height:6%;background:#050909;content:""}
.alpha-reveal:before{top:0}.alpha-reveal:after{bottom:0}
.alpha-reveal strong{font-size:clamp(24px,5vw,56px);font-weight:900;letter-spacing:-.025em;color:#f5c3a4}
.alpha-reveal .reveal-kicker{color:#f2a88c;font-weight:800;letter-spacing:.25em;font-size:clamp(8px,1.2vw,14px)}
.alpha-reveal #revealTitle{font-size:clamp(11px,1.5vw,18px);font-weight:700}
.alpha-reveal small{font-size:10px;color:#e7d8bd}
.game.commander-reveal .hud-left,.game.commander-reveal .topbar,.game.commander-reveal .tactical-panel,
.game.commander-reveal .action-cluster,.game.commander-reveal .camera-buttons,.game.commander-reveal .toast{opacity:.05!important;pointer-events:none}
.frontline-row.hold i{background:#dccf80}.frontline-row.contested i{background:#ed9a83}
@keyframes alpha-reveal-in{from{opacity:0;filter:blur(4px)}to{opacity:1;filter:blur(0)}}
@media(prefers-reduced-motion:reduce){.alpha-reveal{animation:none}}

/* V17: a single accessible upgrade modal for built colonies, tactical R&D and morphology. */
.upgrade-tabs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;margin:11px 0 7px}
.upgrade-tabs button{border:1px solid #526b54;background:#253a2d;color:#d1dfcf;border-radius:8px;padding:9px 7px;cursor:pointer;font-size:12px;font-weight:800}
.upgrade-tabs button[aria-selected="true"]{background:#896740;color:#fff0d4;border-color:#e9c58c}
.upgrade-tabs button:focus-visible{outline:2px solid #f5cf80;outline-offset:1px}
[data-upgrade-panel][hidden]{display:none!important}
.upgrade-grid .evolution-choice{min-height:136px;gap:5px}
.upgrade-grid .evolution-choice strong{font-size:14px}
.upgrade-grid .evolution-choice .evo-symbol{font-size:22px}
.construction-status{font-size:11px;color:#9ddfba;margin:0 0 9px;border-radius:7px;background:rgba(31,72,51,.47);padding:8px 10px}
.evolution-content{max-height:min(92dvh,850px);width:min(830px,97vw)}
@media(orientation:landscape) and (max-height:500px){.upgrade-tabs{margin:4px 0}.upgrade-tabs button{padding:5px;font-size:10px}.construction-status{margin:0 0 4px;padding:3px 7px;font-size:9px}.upgrade-grid .evolution-choice{min-height:96px}}
@media(max-width:560px){.upgrade-grid .evolution-choice{min-height:unset}.upgrade-tabs button{font-size:10px}}

/* V18 — continuous, observable living supply lines without another menu. */
.logistics-summary{font-size:10px;line-height:1.3;color:#bcd8c1;margin:4px 0 5px;max-width:282px;white-space:normal;letter-spacing:.01em;text-shadow:0 1px 2px #11271d}
@media(max-height:500px){.logistics-summary{font-size:9px;margin:2px 0 3px;max-width:225px}}

/* V20 small-layout tactical readout and complete four-way legend */
.tactical-heading{flex-wrap:wrap;}
.tactical-heading span{display:block;flex:1 0 100%;font-size:9px;line-height:1.2;white-space:normal;}
.tactical-panel .four-faction-key{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:3px 5px;}
.tactical-panel .four-faction-key .ours{color:#8af0c7;}
.tactical-panel .four-faction-key .termite{color:#e4b884;}
.tactical-panel .four-faction-key .wasp{color:#f2cf61;}
.tactical-panel .four-faction-key .spider{color:#bda4f1;}

/* V26: true in-run XP and a three-card pause with no new battle keys. */
.alpha-run-level{margin-top:7px;padding:8px 0 6px;border-top:1px solid rgba(147,218,186,.22)}
.alpha-run-title{display:flex;justify-content:space-between;gap:5px;align-items:center;color:#e5edcf;font-size:9px}
.alpha-run-title strong{color:#a4e2ca;font-size:15px}.alpha-run-title span{color:#cbd4c1}
.alpha-xp-track{height:5px;margin:5px 0;background:#244536;border-radius:7px;overflow:hidden}
.alpha-xp-track i{display:block;width:0%;height:100%;background:linear-gradient(90deg,#7ae2af,#dcf09d);transition:width .12s}
.alpha-run-level small{display:block;color:#bdc9b6;font-size:9px;line-height:1.32}
/* V71: six compact weapon slots; the game field remains unobstructed. */
.organ-slot-row[hidden]{display:none!important}
.organ-slot-row{display:flex;align-items:center;gap:3px;justify-content:space-between;margin:6px 0 4px}
.organ-slot{display:grid;place-items:center;position:relative;min-width:21px;height:24px;flex:1 1 0;
 border:1px solid rgba(157,196,168,.30);border-radius:5px;background:rgba(20,45,34,.65);
 color:#91a999;font-size:11px;line-height:1}
.organ-slot.is-equipped{color:#f4d9a0;border-color:rgba(249,208,139,.8);background:rgba(104,84,42,.54)}
.organ-slot.is-unlocked:not(.is-equipped){border-color:rgba(137,221,176,.66);color:#b2e4c5}
.organ-slot sup{position:absolute;bottom:1px;right:2px;font-size:8px;font-weight:700}
.organ-slot:focus-visible{outline:2px solid #f4d9a0}
@media(max-width:650px){.organ-slot-row{gap:2px;margin:4px 0}.organ-slot{min-width:17px;height:20px;font-size:10px}}

.rogue-choice-panel[hidden]{display:none!important}
.rogue-choice-panel{position:absolute;inset:0;z-index:35;background:rgba(4,13,10,.88);backdrop-filter:blur(12px);display:grid;place-items:center;padding:18px;overflow:auto;touch-action:pan-y}
.rogue-choice-content{max-width:870px;width:100%;padding:26px 25px;background:linear-gradient(150deg,#1f352a,#10221b);border:1px solid rgba(212,188,137,.45);border-radius:16px;box-shadow:0 24px 80px rgba(0,0,0,.6)}
.rogue-choice-content h2{font-size:clamp(21px,3vw,36px);margin:8px 0;color:#e9d7aa}
.rogue-choice-content p{font-size:12px;line-height:1.6;color:#c5d0c1;max-width:660px}
.rogue-choice-content>small{display:block;margin-top:18px;color:#a7bcac;font-size:11px}
.rogue-choice-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-top:20px}
.rogue-skill-card{display:flex;flex-direction:column;gap:15px;text-align:left;align-items:flex-start;min-height:202px;padding:19px 17px;color:#f1e9d5;background:linear-gradient(155deg,rgba(90,77,53,.35),rgba(26,50,39,.9));border:1px solid rgba(230,207,149,.55);border-radius:12px;cursor:pointer}
.rogue-skill-card:hover,.rogue-skill-card:focus-visible{outline:2px solid #f0d590;outline-offset:1px;background:linear-gradient(155deg,rgba(138,104,55,.50),rgba(40,78,58,.9))}
.rogue-skill-card span{font-size:10px;text-transform:uppercase;color:#a6d4b3;letter-spacing:.08em}
.rogue-skill-card strong{font-size:clamp(17px,1.9vw,24px);color:#f1d6a6}
.rogue-skill-card small{font-size:12px;color:#d1d6c3;line-height:1.5}
@media(max-width:650px){.rogue-choice-panel{padding:8px}.rogue-choice-content{max-height:95dvh;overflow:auto;padding:15px}.rogue-choice-grid{grid-template-columns:1fr;gap:8px}.rogue-skill-card{min-height:85px;gap:5px;padding:9px 14px}.rogue-choice-content p{font-size:10px}}

/* V28: capture status is visible even before progress begins; no extra control. */
.capture-focus[hidden]{display:none!important}
.capture-focus{position:absolute;z-index:8;top:clamp(98px,15vh,153px);left:50%;transform:translateX(-50%);width:min(382px,36vw);padding:10px 14px 9px;pointer-events:none;border:1px solid rgba(223,188,117,.45);border-radius:10px;background:linear-gradient(115deg,rgba(14,29,25,.93),rgba(22,32,27,.87));box-shadow:0 6px 28px rgba(0,0,0,.36);color:#ecddbc;text-shadow:0 1px 4px #101917}
.capture-focus-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:12px}
.capture-focus-heading strong{font-weight:780;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.capture-focus-heading b{font-size:17px;color:#d8eec2;font-variant-numeric:tabular-nums}
.capture-focus-track{height:9px;border-radius:9px;border:1px solid rgba(215,193,150,.4);background:#27362c;overflow:hidden;margin:6px 0}
.capture-focus-track i{display:block;height:100%;border-radius:9px;background:linear-gradient(90deg,#76ad8d,#b7dfa0);transition:width .15s ease}
.capture-focus[data-stage="contested"] .capture-focus-track{border-color:rgba(214,119,104,.65)}
.capture-focus[data-stage="needs-support"] .capture-focus-track{border-color:rgba(223,181,107,.55)}
.capture-focus small{display:block;color:#d3c6aa;line-height:1.35;font-size:10px;white-space:normal}
.reinforcement-info{display:block;color:#a7d7b9;line-height:1.35;font-size:9px;padding:4px 0 5px;border-bottom:1px solid rgba(131,172,139,.16)}
@media(max-width:1050px),(pointer:coarse){.capture-focus{top:68px;width:min(275px,36vw);padding:6px 9px}.capture-focus-heading{font-size:9px}.capture-focus-heading b{font-size:12px}.capture-focus-track{height:6px;margin:4px 0}.capture-focus small{font-size:8px}.reinforcement-info{font-size:8px}}
@media(max-width:640px){.capture-focus{top:105px;width:min(260px,52vw);padding:6px 9px}.capture-focus-heading{font-size:8px}.capture-focus-heading b{font-size:11px}.capture-focus small{font-size:8px}}
@media(orientation:landscape) and (max-height:500px){.capture-focus{top:50px;width:min(252px,37vw);padding:5px 8px}.capture-focus-heading{font-size:9px}.capture-focus-heading b{font-size:11px}.capture-focus small{font-size:8px}.capture-focus-track{margin:3px 0;height:5px}}

/* V29: fully expanded strategy map, not a wider mini-map. */
.tactical-heading{gap:7px;align-items:center}
#mapToggle{cursor:pointer;pointer-events:auto;background:#26473a;border:1px solid #668b72;border-radius:5px;padding:5px 7px;color:#f0e4bf;font-size:9px;font-weight:750;white-space:nowrap}
#mapToggle:hover{background:#375e4b}
.map-expanded-details{display:none}
.border-threat{position:absolute;z-index:7;top:15%;left:50%;transform:translateX(-50%);max-width:min(610px,90vw);border:1px solid #fb947e;border-radius:9px;background:rgba(53,20,19,.94);color:#ffe3cc;padding:9px 16px;font-weight:800;font-size:13px;text-align:center;pointer-events:none}
.border-threat[hidden]{display:none!important}
.game.map-expanded .tactical-panel{position:absolute;inset:50% auto auto 50%;transform:translate(-50%,-50%);width:min(1120px,96vw)!important;max-height:90dvh;overflow-y:auto;z-index:21!important;pointer-events:auto;box-shadow:0 0 0 150vmax rgba(0,0,0,.78),0 15px 80px #030b08!important;border:1px solid #c7ad7c!important;background:#101f1b!important;padding:14px!important;display:grid;grid-template-columns:minmax(240px,1.15fr) minmax(210px,.85fr);gap:10px 16px}
.game.map-expanded .tactical-heading{grid-column:1/-1;grid-row:1;display:flex;justify-content:space-between;font-size:14px}
.game.map-expanded .tactical-heading span{flex:1 1 auto;font-size:12px;text-align:right}
.game.map-expanded .tactical-heading #mapToggle{font-size:12px;padding:7px 12px}
.game.map-expanded .tactical-panel #tacticalMap{grid-column:1;grid-row:2/7;width:100%;height:min(70dvh,675px)!important;min-height:265px;border:1px solid #667d62;border-radius:10px;background:#12231e}
.game.map-expanded .tactical-panel .four-faction-key{grid-column:2;grid-row:2;display:flex;flex-wrap:wrap;gap:10px;font-size:11px}
.game.map-expanded .tactical-panel .map-orientation{grid-column:2;grid-row:3;font-size:10px}
.game.map-expanded .tactical-panel .battle-momentum{grid-column:2;grid-row:4;display:block;font-size:11px;white-space:normal}
.game.map-expanded .tactical-panel .frontline-summary{grid-column:2;grid-row:5}
.game.map-expanded .tactical-panel .map-expanded-details{grid-column:2;grid-row:6;display:block;overflow-y:auto;max-height:45dvh;user-select:text}
.map-expanded-details h3{font-size:12px;color:#f2d49d;margin:10px 0 4px}
.map-expanded-details p{font-size:11px;color:#d3e2cd;line-height:1.55;white-space:pre-line;margin:0}
.map-expanded-details small{display:block;color:#a6b7aa;font-size:10px;margin-top:10px}
@media(max-width:720px){.game.map-expanded .tactical-panel{display:block;max-height:91dvh;top:50%;padding:9px!important}.game.map-expanded .tactical-panel #tacticalMap{height:min(48dvh,420px)!important;min-height:190px}.game.map-expanded .tactical-panel .map-expanded-details{max-height:none}.game.map-expanded .tactical-panel .frontline-summary{display:none}.game.map-expanded .tactical-panel .tactical-heading{flex-wrap:wrap}.game.map-expanded .tactical-heading span{font-size:10px}.game.map-expanded .tactical-heading #mapToggle{font-size:10px}.border-threat{top:16%;font-size:10px}}

/* V30 visible silk and readable warnings. No new collision objects. */
.silk-status[hidden]{display:none!important}
.silk-status{position:absolute;z-index:9;left:50%;bottom:19%;transform:translateX(-50%);max-width:min(490px,83vw);padding:8px 14px;text-align:center;pointer-events:none;font-size:12px;font-weight:850;line-height:1.4;letter-spacing:.01em;color:#f6dcff;background:rgba(41,25,58,.90);border:1px solid rgba(218,173,249,.76);border-radius:11px;box-shadow:0 5px 20px rgba(22,10,38,.50)}
.silk-status[data-phase="arming"]{color:#fff2cb;border-color:#ffcc77;background:rgba(67,46,27,.95)}
.silk-status[data-phase="snared"]{color:#fff3fc;border-color:#f49deb;background:rgba(83,26,78,.96)}
.four-faction-key .silk{color:#dfb3fa}
@media(max-width:820px),(pointer:coarse){.silk-status{font-size:10px;bottom:26%;max-width:56vw;padding:5px 7px}}

/* V32 shows decisive reinforcement casualties or a live funded build, never a hold timer. */
.capture-focus[data-stage="counterattack"]{border-color:rgba(236,128,95,.8)}
.capture-focus[data-stage="counterattack"] .capture-focus-track i{background:linear-gradient(90deg,#cd6c55,#ffe19c)}
.capture-focus[data-stage="friendly"]{border-color:rgba(122,213,165,.7)}
.capture-focus[data-stage="friendly"] .capture-focus-track i{background:linear-gradient(90deg,#6fae9a,#b5e7b7)}

/* V33 four genuinely selectable factions; minimal new input controls. */
.faction-select-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:14px auto 12px;max-width:850px}
.faction-select-card{position:relative;display:flex;min-height:128px;flex-direction:column;align-items:center;justify-content:center;gap:6px;cursor:pointer;color:#f7f2e7;background:linear-gradient(160deg,rgba(33,48,43,.92),rgba(13,25,23,.95));border:1px solid rgba(220,230,208,.22);border-radius:16px;transition:transform .17s,border-color .17s,box-shadow .17s}
.faction-select-card[data-player-faction="ours"]{--faction:#D95748}.faction-select-card[data-player-faction="termite"]{--faction:#F1E8D4}.faction-select-card[data-player-faction="wasp"]{--faction:#E8B52A}.faction-select-card[data-player-faction="spider"]{--faction:#8857B7}
.faction-select-card.active,.faction-select-card:focus-visible{border-color:var(--faction);box-shadow:inset 0 0 0 1px var(--faction),0 0 28px color-mix(in srgb,var(--faction),transparent 82%);transform:translateY(-3px);outline:none}
.faction-select-card .faction-icon{font-size:24px;color:var(--faction);text-shadow:0 0 14px var(--faction)}
.faction-select-card strong{font-size:21px;font-weight:800}.faction-select-card small{color:#d9d8ce;font-size:12px}.faction-select-card em{font-style:normal;color:#afc2b8;font-size:11px;letter-spacing:.05em}
.faction-choice-hint{min-height:23px;text-align:center;color:#d6e2d5;font-size:13px!important;margin:6px auto 12px!important}
.intro-screen .intro-lead{max-height:22vh;overflow:auto;line-height:1.65}
@media(max-width:720px){.faction-select-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:8px auto}.faction-select-card{min-height:92px}.faction-select-card strong{font-size:17px}.faction-select-card .faction-icon{font-size:19px}.intro-screen .intro-lead{max-height:18vh;font-size:12px}}

/* V34: stable flight state status without adding a gameplay button. */
.flight-status{display:block;padding:.35rem .6rem;margin:.4rem 0;border:1px solid rgba(233,181,42,.65);border-radius:.5rem;color:#ffdf79;background:rgba(24,25,19,.84);font-size:.78rem;font-weight:650;letter-spacing:.02em;max-width:27rem}
.flight-status[hidden]{display:none}

/* V36: first frame is ONLY the game logo, DEMO, and Start; factions appear on next action. */
#startPanel.intro-screen{display:grid;place-items:center;justify-content:unset;overflow-y:auto;background:radial-gradient(ellipse 65% 72% at 50% 43%,rgba(24,43,32,.74),rgba(5,13,14,.96) 78%);backdrop-filter:blur(7px)}
#startPanel .intro-content{margin:auto;max-width:780px;width:min(90%,760px);text-align:center;display:flex;flex-direction:column;align-items:center;gap:0}
#startPanel .intro-splash{display:flex;flex-direction:column;align-items:center;gap:13px}
#startPanel .intro-logo-mark{width:76px;height:76px;display:grid;place-items:center;position:relative;border:2px solid #e3b977;transform:rotate(45deg);background:linear-gradient(135deg,#273c32,#111c1b);box-shadow:0 0 55px rgba(224,178,96,.17);border-radius:9px}
#startPanel .intro-logo-mark span{transform:rotate(-45deg);font-size:28px;letter-spacing:-.06em;font-weight:900;color:#f2d69d}
#startPanel .intro-logo-series{color:#e6c999;letter-spacing:.36em;font-size:13px;font-weight:750;margin-top:14px}
#startPanel .intro-splash h1{font-size:clamp(44px,7.9vw,98px);line-height:1;margin:0;letter-spacing:-.075em;white-space:nowrap;font-weight:900;color:#fbf6e8}
#startPanel .intro-splash h1 em{font-style:normal;color:#dbaa6b}
#startPanel .intro-demo-tag{font-size:12px;letter-spacing:.45em;color:#d2d5cb;font-weight:800;border-top:1px solid rgba(221,186,125,.38);padding-top:16px;margin:3px 0 8px}
#startPanel .cta{max-width:280px;min-height:54px;display:block;justify-content:center;text-align:center;margin:20px 0 0;border-radius:999px;font-size:15px;letter-spacing:.02em}
#startPanel .intro-factions{width:100%;max-width:760px}
#startPanel .intro-factions[hidden],#startPanel .intro-splash[hidden]{display:none!important}
#startPanel .intro-factions h2{color:#f6eddd;font-size:clamp(23px,3.4vw,38px);margin:10px 0 15px;line-height:1.1}
#startPanel .faction-select-grid{max-width:none;width:100%}
#startPanel .faction-select-card{min-height:124px}
#startPanel .faction-choice-hint{font-size:12px!important;margin:8px auto 0!important}
#startPanel[data-phase="factions"] .cta{margin-top:13px}
@media(max-width:720px){#startPanel .intro-logo-mark{width:57px;height:57px}#startPanel .intro-logo-series{font-size:10px;letter-spacing:.26em}#startPanel .intro-splash h1{font-size:clamp(32px,8.5vw,56px)}#startPanel .intro-demo-tag{font-size:10px}#startPanel .faction-select-grid{grid-template-columns:repeat(2,minmax(0,1fr))}#startPanel .faction-select-card{min-height:84px}}
@media(max-height:430px){#startPanel .intro-logo-mark{width:38px;height:38px}#startPanel .intro-logo-mark span{font-size:15px}#startPanel .intro-splash{gap:5px}#startPanel .intro-demo-tag{padding-top:5px;margin:0}#startPanel .cta{min-height:36px;margin:8px 0 0}#startPanel .faction-select-card{min-height:62px}}

/* V37 MOBILE HUD — thumb zones only, no permanent center-row buttons.
   Core game canvas remains clear between top-left status and the small map.
   Extra combat controls are real accessible buttons, not decorative UI. */
.mobile-more-button{display:none}
.mobile-extra-actions[hidden]{display:none!important}
@media (max-width:1050px), (pointer:coarse){
 .topbar{min-height:34px;max-height:37px;grid-template-columns:1fr auto!important;align-items:center!important;gap:5px;padding:4px max(12px,env(safe-area-inset-right)) 2px max(12px,env(safe-area-inset-left));background:rgba(9,22,18,.34);backdrop-filter:blur(3px)}
 .topbar .mission-status{display:none!important}
 .topbar .brand{gap:5px}
 .topbar .brand-mark{display:none}
 .topbar .brand strong{font-size:12px;line-height:1.1}
 .topbar .brand-strap{font-size:7px}
 .topbar .run-number{grid-column:auto;display:flex;flex-direction:row;align-items:center;font-size:10px;gap:4px}
 .topbar .run-number>span:first-child{display:none}
 .topbar .help-button{width:27px;height:27px;margin-left:7px}
 .hud-left{left:max(10px,env(safe-area-inset-left));top:41px;width:143px!important;max-height:unset;overflow:visible;padding:7px 8px;background:rgba(9,26,21,.57);border-color:rgba(228,202,150,.16);backdrop-filter:blur(4px);border-radius:9px}
 .hud-left .vital-top{margin-bottom:3px;font-size:8px}
 .hud-left .hp-track{height:5px}
 .hud-left .hud-stats{margin-top:3px;font-size:8px;gap:3px}
 .hud-left .hud-gene,.hud-left .squad-readout,.hud-left .colony-readout,.hud-left .reinforcement-info,.hud-left .outpost-readout,.hud-left .loot-strip,.hud-left .logistics-summary,.hud-left .combo-readout,.hud-left .alpha-run-title #alphaRebirthCount,.hud-left #alphaSkillsSummary{display:none!important}
 .hud-left .alpha-run-level{margin-top:4px;padding:3px 0}
 .hud-left .alpha-run-title{font-size:8px;gap:4px}
 .hud-left .alpha-xp-track{height:3px;margin-top:3px}
 .hud-left .spirit-bar{margin:3px 0 0;padding:2px 4px;gap:3px;font-size:8px}
 .hud-left .spirit-bar span,.hud-left .spirit-bar b{font-size:8px}
 .hud-left .spirit-track{height:3px}
 .hud-left .guard-stamina{padding-top:3px;font-size:8px}
 .hud-left .stamina-track{height:3px;margin:2px 0}
 .hud-left .flight-status{margin:3px 0;padding:3px 4px;font-size:9px;line-height:1.2;max-width:100%;border-width:1px}
 .hud-left .evolution-button{pointer-events:auto!important;display:block;width:100%;padding:4px 3px;margin:4px 0 0;font-size:10px;border-radius:6px}
 .hud-left .evolution-button[hidden]{display:none!important}
 .hud-left .evolution-button small{display:none}
 .tactical-panel{top:41px;right:max(10px,env(safe-area-inset-right));width:102px!important;padding:4px 5px;background:rgba(9,26,21,.55);border-color:rgba(228,202,150,.17);box-shadow:none;backdrop-filter:blur(4px)}
 .tactical-panel .tactical-heading{padding:0 0 3px;display:block!important}
 .tactical-panel .tactical-heading strong,.tactical-panel .tactical-heading span{display:none}
 .tactical-panel .tactical-heading #mapToggle{width:100%;display:block;padding:3px 4px;font-size:9px;min-height:28px;pointer-events:auto}
 .tactical-panel #tacticalMap{width:100%;height:82px!important;min-height:0;border-radius:5px}
 .tactical-panel .tactical-legend,.tactical-panel .map-orientation,.tactical-panel .battle-momentum,.tactical-panel .frontline-summary,.tactical-panel .map-expanded-details{display:none!important}
 /* Left thumb — joystick + optional flight throttle, not center of screen. */
 .touch-stick{position:absolute;display:flex;z-index:11;left:max(13px,env(safe-area-inset-left));bottom:max(13px,env(safe-area-inset-bottom));width:105px;height:105px;padding:0;transform:none;background:rgba(13,32,24,.22);border:1px solid rgba(227,206,174,.32);box-shadow:inset 0 0 16px rgba(0,0,0,.06);opacity:.78}
 .touch-stick-knob{width:46px;height:46px;background:rgba(221,179,125,.40);border:1px solid rgba(236,207,161,.70);box-shadow:none}
 .touch-stick span{bottom:-12px;font-size:8px;letter-spacing:.12em}
 .camera-buttons{display:none!important;left:calc(max(13px,env(safe-area-inset-left)) + 110px);right:auto;bottom:max(13px,env(safe-area-inset-bottom));transform:none;gap:6px;flex-direction:column;z-index:11}
 .game.mobile-flying .camera-buttons{display:flex!important}
 .camera-buttons button{width:45px!important;height:45px!important;min-width:45px!important;min-height:45px!important;font-size:17px!important;font-weight:800;background:rgba(15,35,27,.58);border-radius:12px;border:1px solid rgba(239,207,153,.48);color:#fff0d6;touch-action:none}
 /* Right thumb — 4 immediate actions, 1 small expandable button. */
 .action-cluster{display:block;position:absolute;z-index:11;right:max(12px,env(safe-area-inset-right));bottom:max(13px,env(safe-area-inset-bottom));width:188px;height:146px;transform:none!important;grid-template-columns:none;grid-template-rows:none;grid-template-areas:none;gap:0;background:none;border:0;pointer-events:none}
 .action-cluster .combat-button,.action-cluster .touch-jump-button,.action-cluster .mobile-more-button{pointer-events:auto;touch-action:none;user-select:none;-webkit-user-select:none;opacity:.82;box-shadow:inset 0 -2px 8px rgba(0,0,0,.17),0 1px 5px rgba(0,0,0,.12);text-shadow:0 1px 3px rgba(0,0,0,.65)}
 .action-cluster .combat-button:active,.action-cluster .touch-jump-button:active,.action-cluster .combat-button.pressed,.action-cluster .touch-jump-button.pressed{opacity:1!important;filter:brightness(1.22)}
 .action-cluster .combat-button small{display:none}
 .action-cluster #attackButton{display:grid;position:absolute!important;grid-area:auto;right:0!important;bottom:0!important;left:auto!important;top:auto!important;width:71px!important;height:71px!important;min-width:71px;min-height:71px;font-size:12px;background:rgba(165,110,62,.78);border:1.5px solid rgba(255,213,151,.87);border-radius:50%;transform:none}
 .action-cluster #heavyButton{display:grid;position:absolute;grid-area:auto;right:76px;bottom:6px;width:51px;height:51px;min-width:51px;min-height:51px;font-size:10px;background:rgba(92,83,72,.79);border:1px solid rgba(208,188,163,.61)}
 .action-cluster #dodgeButton{display:grid;position:absolute;grid-area:auto;right:83px;bottom:67px;width:48px;height:48px;min-width:48px;min-height:48px;font-size:10px;background:rgba(56,85,81,.80);border:1px solid rgba(164,207,198,.64)}
 .action-cluster #jumpButton{display:grid;position:absolute;right:8px;bottom:80px;width:50px!important;height:50px!important;min-width:50px!important;min-height:50px!important;border-radius:50%;font-size:11px!important;font-weight:800;place-items:center;background:rgba(61,84,65,.76);border:1px solid rgba(181,229,182,.72);color:#f2ffe9}
 .action-cluster #mobileMoreButton{display:grid;position:absolute;right:141px;bottom:6px;width:45px;height:45px;min-width:45px;min-height:45px;place-items:center;border:1px solid rgba(228,209,167,.51);border-radius:50%;background:rgba(19,37,29,.71);color:#f0e3c7;font-weight:900;font-size:14px}
 .action-cluster #mobileMoreButton[aria-expanded="true"]{border-color:#e8ca92;background:rgba(85,64,36,.87);opacity:1}
 .mobile-extra-actions[hidden]{display:none!important}
 .action-cluster .mobile-extra-actions{display:flex;position:absolute;right:0;bottom:148px;align-items:center;justify-content:flex-end;gap:6px;padding:6px;border:1px solid rgba(224,195,151,.32);border-radius:14px;background:rgba(9,26,21,.78);backdrop-filter:blur(6px);box-shadow:0 3px 12px rgba(0,0,0,.15);pointer-events:auto}
 .mobile-extra-actions .combat-button,.mobile-extra-actions #triggerButton{display:grid!important;position:relative!important;grid-area:auto!important;place-items:center;width:48px!important;height:48px!important;min-width:48px!important;min-height:48px!important;margin:0;padding:0 2px;font-size:10px!important;white-space:nowrap;border-radius:50%;touch-action:none;color:#fff4dc}
 .mobile-extra-actions .guard-button{background:rgba(58,91,68,.82)}
 .mobile-extra-actions .special-button{background:rgba(49,105,61,.86)}
 .mobile-extra-actions #triggerButton{border:1px solid rgba(236,192,126,.75);background:rgba(104,69,41,.86);opacity:.82}
 .mobile-extra-actions #triggerButton.pressed{opacity:1}
 .game.map-expanded .action-cluster,.game.map-expanded .touch-stick,.game.map-expanded .camera-buttons{display:none!important}
 .game.map-expanded .hud-left,.game.map-expanded .topbar{opacity:.15;pointer-events:none}
 .game.map-expanded .tactical-panel{position:absolute;inset:50% auto auto 50%;transform:translate(-50%,-50%);width:min(94vw,750px)!important;max-height:90dvh;overflow:auto;padding:9px!important;display:grid;grid-template-columns:minmax(190px,1.1fr) minmax(170px,.9fr);gap:4px 12px;z-index:21!important;background:rgba(12,29,24,.99)!important;border:1px solid #aa976f;pointer-events:auto}
 .game.map-expanded .tactical-panel .tactical-heading{display:flex!important;grid-column:1/-1;grid-row:1;align-items:center;gap:7px}
 .game.map-expanded .tactical-panel .tactical-heading strong,.game.map-expanded .tactical-panel .tactical-heading span{display:inline!important;font-size:10px}
 .game.map-expanded .tactical-panel .tactical-heading #mapToggle{max-width:112px;font-size:10px}
 .game.map-expanded .tactical-panel #tacticalMap{grid-column:1;grid-row:2/6;min-height:190px;height:min(66dvh,240px)!important;width:100%}
 .game.map-expanded .tactical-panel .tactical-legend,.game.map-expanded .tactical-panel .map-orientation,.game.map-expanded .tactical-panel .battle-momentum,.game.map-expanded .tactical-panel .map-expanded-details{display:block!important}
 .game.map-expanded .tactical-panel .map-expanded-details{grid-column:2;grid-row:5;overflow-y:auto;max-height:39dvh}
 .game.map-expanded .tactical-panel .frontline-summary{display:none!important}
 .capture-focus{max-width:min(340px,42vw)}
 .toast{top:41px;max-width:30vw;font-size:9px}
 .attack-feedback{max-width:24vw;font-size:13px;bottom:36%}
 .boss-bar{top:40px;max-width:30vw}
}
@media (orientation:landscape) and (max-height:355px){
 .action-cluster{height:132px;width:183px;bottom:max(9px,env(safe-area-inset-bottom))}
 .action-cluster #jumpButton{bottom:73px}
 .action-cluster #dodgeButton{bottom:64px}
 .action-cluster .mobile-extra-actions{bottom:134px;padding:4px}
 .touch-stick{width:92px;height:92px;bottom:max(9px,env(safe-area-inset-bottom))}
 .touch-stick-knob{width:43px;height:43px}
 .camera-buttons{left:calc(max(13px,env(safe-area-inset-left)) + 96px);bottom:max(9px,env(safe-area-inset-bottom))}
 .hud-left{width:127px!important}
 .tactical-panel{width:94px!important}
 .tactical-panel #tacticalMap{height:69px!important}
}
@media (orientation:landscape) and (max-width:720px){
 .game.map-expanded .tactical-panel{display:block;max-height:90dvh;overflow:auto}
 .game.map-expanded .tactical-panel #tacticalMap{height:min(36dvh,170px)!important;min-height:90px}
 .game.map-expanded .tactical-panel .map-expanded-details{max-height:none}
}

@media (max-width:1050px), (pointer:coarse){
 .action-cluster #mobileMoreButton.special-ready{border-color:rgba(178,238,169,.93);box-shadow:0 0 9px rgba(157,229,155,.41),inset 0 -2px 8px rgba(0,0,0,.18);opacity:1}
}


/* V38 — Approved ANT KINGDOM: ALPHA SWARM logo; no invented AK substitute. */
.brand-official{display:block;width:112px;height:75px;object-fit:contain;object-position:left top;filter:drop-shadow(0 2px 6px rgba(0,0,0,.32))}
#startPanel .intro-official-logo{display:block;width:min(70vw,620px);height:min(56dvh,460px);object-fit:contain;filter:drop-shadow(0 12px 23px rgba(0,0,0,.38))}
#startPanel .intro-splash{gap:4px}
#startPanel .intro-demo-tag{font-size:12px;letter-spacing:.34em;border-top:none;padding:0;margin:0 0 3px;color:#e6d8c3}
#startPanel .cta{margin:10px 0 0}
@media(max-height:500px){
 #startPanel .intro-official-logo{width:min(68vw,520px);height:min(60dvh,262px)}
 #startPanel .cta{min-height:42px;margin:7px 0 0}
}
/* V38 minimal in-game HUD: essential survival + map only. All hidden data
   still exists in DOM and updates; M/U open their original detail panels. */
@media(max-width:1050px),(pointer:coarse){
 .game{min-height:0!important;height:100dvh}
 .topbar{position:absolute;inset:auto auto auto calc(max(8px,env(safe-area-inset-left)) + 186px);top:8px;left:calc(max(8px,env(safe-area-inset-left)) + 186px);right:auto;bottom:auto;height:44px;min-height:0;max-height:none;width:44px;display:block!important;padding:0!important;background:none!important;box-shadow:none;backdrop-filter:none;pointer-events:none}
 .topbar .brand{display:block;gap:0}
 .topbar .brand-official,.topbar .mission-status,.topbar .run-number{display:none!important}
 .topbar .help-button{display:grid!important;place-items:center;width:44px;height:44px;margin:0;border-radius:50%;font-size:15px;pointer-events:auto;background:rgba(10,24,20,.24);border:1px solid rgba(232,218,186,.30);color:#e8ddc8}
 .hud-left{left:max(8px,env(safe-area-inset-left));top:8px;width:124px!important;max-height:unset;min-height:0;padding:5px 6px!important;background:rgba(7,20,16,.16)!important;border:0!important;box-shadow:none!important;backdrop-filter:none!important;overflow:visible!important}
 .hud-left .vital-top{font-size:9px;letter-spacing:0;margin:0 0 3px}
 .hud-left .vital-top b{font-size:9px}
 .hud-left .hp-track{height:5px}
 .hud-left .hud-stats,.hud-left .squad-readout,.hud-left .colony-readout,.hud-left .reinforcement-info,.hud-left .outpost-readout,.hud-left .loot-strip,.hud-left .logistics-summary,.hud-left .combo-readout,.hud-left .spirit-bar,.hud-left .guard-stamina,.hud-left #alphaXpReadout,.hud-left #alphaRebirthCount,.hud-left #alphaSkillsSummary{display:none!important}
 .hud-left .alpha-run-level{margin:3px 0 0;padding:0;border:0!important;background:transparent!important}
 .hud-left .alpha-run-title{display:flex;align-items:center;justify-content:space-between;margin:0;padding:0;line-height:1}
 .hud-left #alphaLevel{font-size:10px}
 .hud-left .alpha-xp-track{height:2px;margin:2px 0}
 .hud-left .stamina-track{height:2px;margin:2px 0}
 .hud-left .flight-status{position:absolute;top:72px;left:0;margin:0;padding:2px 4px;background:rgba(8,25,21,.23);border:0;font-size:9px;white-space:nowrap;max-width:185px}
 .hud-left .evolution-button{position:absolute;top:0;left:140px;width:44px!important;height:44px!important;min-width:44px;min-height:44px;margin:0!important;padding:0!important;display:grid!important;place-items:center;background:rgba(10,24,20,.24)!important;border:1px solid rgba(232,218,186,.30)!important;border-radius:50%!important;color:#e5d4b1;font-size:10px!important;font-weight:750;line-height:1.05;pointer-events:auto}
 .hud-left .evolution-button small{display:none!important}
 .hud-left .evolution-button span{font-size:0!important}
 .hud-left .evolution-button span::after{content:'군체';font-size:11px!important}
 .hud-left .evolution-button[hidden]{display:none!important}
 .tactical-panel{top:7px!important;right:max(8px,env(safe-area-inset-right));width:74px!important;height:74px!important;max-height:74px;overflow:visible;padding:2px!important;background:rgba(10,24,20,.17)!important;border:0!important;border-radius:50%!important;box-shadow:none!important;backdrop-filter:none!important}
 .tactical-panel #tacticalMap{width:70px!important;height:70px!important;min-height:0!important;border-radius:50%!important;border:1px solid rgba(220,212,186,.26);background:rgba(12,27,22,.37)!important}
 .tactical-panel .tactical-heading{position:absolute!important;z-index:2;right:0;bottom:0;width:74px;height:74px;padding:0!important;margin:0!important;display:block!important}
 .tactical-panel .tactical-heading strong,.tactical-panel .tactical-heading span{display:none!important}
 .tactical-panel .tactical-heading #mapToggle{display:block!important;position:absolute!important;inset:0!important;min-height:74px!important;max-height:74px;width:74px!important;height:74px!important;padding:0!important;font-size:0!important;line-height:1;border:0;background:transparent!important;border-radius:50%;color:#f5e7c9}
 .tactical-panel .tactical-heading #mapToggle::after{content:'⤢';position:absolute;right:0;bottom:0;display:grid;place-items:center;width:24px;height:24px;font-size:15px;line-height:1;border-radius:50%;background:rgba(7,23,20,.82);border:1px solid rgba(216,205,181,.52)}
 .tactical-panel .tactical-legend,.tactical-panel .map-orientation,.tactical-panel .battle-momentum,.tactical-panel .frontline-summary,.tactical-panel .map-expanded-details{display:none!important}
 .capture-focus{top:6px!important;max-width:38vw!important;padding:4px 6px!important;background:rgba(12,29,22,.42);border-width:1px}
 .capture-focus #captureFocusHelp{display:none!important}
 .toast{top:7px!important;padding:4px 8px!important;max-width:34vw;font-size:9px}
 .silk-status{bottom:22%;padding:3px 6px;font-size:9px;background:rgba(25,16,31,.4)}
 .boss-bar{top:7px!important;width:min(190px,24vw)!important}
 .touch-stick{width:94px!important;height:94px!important;opacity:.44!important;border:1px solid rgba(230,214,188,.38);background:rgba(14,32,24,.14)}
 .touch-stick:active,.touch-stick.pressed{opacity:.85!important}
 .touch-stick-knob{width:44px!important;height:44px!important;background:rgba(208,179,137,.24)!important;border-color:rgba(241,207,154,.58)}
 .touch-stick span{display:none!important}
 .camera-buttons{left:calc(max(13px,env(safe-area-inset-left)) + 99px)}
 .camera-buttons button{opacity:.61;background:rgba(11,28,24,.33)}
 .action-cluster{width:170px!important;height:131px!important;opacity:.62;transition:opacity .12s linear}
 .action-cluster:active,.action-cluster:focus-within{opacity:.97}
 .action-cluster #attackButton{width:63px!important;height:63px!important;min-width:63px!important;min-height:63px!important;font-size:11px!important;background:rgba(138,95,59,.55)}
 .action-cluster #heavyButton{right:67px;bottom:4px;width:46px!important;height:46px!important;min-width:46px!important;min-height:46px!important;font-size:9px!important;background:rgba(85,80,70,.50)}
 .action-cluster #dodgeButton{right:74px;bottom:58px;width:45px!important;height:45px!important;min-width:45px!important;min-height:45px!important;font-size:9px!important;background:rgba(55,87,78,.50)}
 .action-cluster #jumpButton{right:5px;bottom:72px;width:46px!important;height:46px!important;min-width:46px!important;min-height:46px!important;font-size:9px!important;background:rgba(60,86,62,.49)}
 .action-cluster #mobileMoreButton{right:124px;bottom:5px;width:44px!important;height:44px!important;min-width:44px!important;min-height:44px!important;background:rgba(18,37,30,.43)}
 .action-cluster .mobile-extra-actions{right:0;bottom:129px;opacity:1;background:rgba(8,25,20,.56)}
 .game.map-expanded .hud-left,.game.map-expanded .topbar{opacity:0!important;pointer-events:none!important}
 .game.map-expanded .tactical-panel{position:absolute!important;inset:50% auto auto 50%!important;right:auto!important;top:50%!important;transform:translate(-50%,-50%)!important;width:min(94vw,750px)!important;height:auto!important;max-height:90dvh!important;overflow:auto!important;display:grid!important;grid-template-columns:minmax(190px,1.1fr) minmax(170px,.9fr);padding:9px!important;background:rgba(12,29,24,.98)!important;border:1px solid #aa976f!important;border-radius:12px!important;pointer-events:auto}
 .game.map-expanded .tactical-panel #tacticalMap{width:100%!important;height:min(65dvh,300px)!important;min-height:195px!important;border-radius:8px!important}
 .game.map-expanded .tactical-panel .tactical-heading{position:static!important;width:auto!important;height:auto!important;display:flex!important;align-items:center;gap:8px}
 .game.map-expanded .tactical-panel .tactical-heading strong,.game.map-expanded .tactical-panel .tactical-heading span{display:inline!important}
 .game.map-expanded .tactical-panel .tactical-heading #mapToggle{position:relative!important;inset:auto!important;width:auto!important;max-width:none!important;min-width:60px;min-height:34px!important;height:34px!important;max-height:none!important;padding:4px 12px!important;font-size:11px!important;border-radius:6px!important;background:rgba(38,71,58,.9)!important;border:1px solid #668b72!important}
 .game.map-expanded .tactical-panel .tactical-heading #mapToggle::after{content:none}
 .game.map-expanded .tactical-panel .tactical-legend,.game.map-expanded .tactical-panel .map-orientation,.game.map-expanded .tactical-panel .battle-momentum,.game.map-expanded .tactical-panel .map-expanded-details{display:block!important}
 .game.map-expanded .action-cluster,.game.map-expanded .touch-stick,.game.map-expanded .camera-buttons{display:none!important}
}
@media (orientation:landscape) and (max-height:355px){
 .action-cluster{height:120px!important}
 .action-cluster #jumpButton{bottom:68px}
 .action-cluster #dodgeButton{bottom:57px}
 .action-cluster .mobile-extra-actions{bottom:120px}
 .touch-stick{width:90px!important;height:90px!important}
}
@media (orientation:landscape) and (max-width:720px){
 .game.map-expanded .tactical-panel{display:block!important}
 .game.map-expanded .tactical-panel #tacticalMap{height:min(37dvh,160px)!important;min-height:90px!important}
}

/* V40: only coarse-touch controls change. Desktop keyboard/mouse bindings and layout are unchanged. */
@media (pointer:coarse){
 .game.is-playing .action-cluster{width:185px!important;height:151px!important;right:max(10px,env(safe-area-inset-right))!important;bottom:max(9px,env(safe-area-inset-bottom))!important;opacity:.68!important;pointer-events:none}
 .game.is-playing .action-cluster:active,.game.is-playing .action-cluster:focus-within{opacity:.96!important}
 .game.is-playing .action-cluster #attackButton{right:1px!important;bottom:7px!important;width:69px!important;height:69px!important;min-width:69px!important;min-height:69px!important}
 .game.is-playing .action-cluster #heavyButton{right:76px!important;bottom:8px!important;width:49px!important;height:49px!important;min-width:49px!important;min-height:49px!important}
 .game.is-playing .action-cluster #dodgeButton{right:77px!important;bottom:68px!important;width:49px!important;height:49px!important;min-width:49px!important;min-height:49px!important}
 .game.is-playing .action-cluster #jumpButton{right:7px!important;bottom:83px!important;width:50px!important;height:50px!important;min-width:50px!important;min-height:50px!important}
 .game.is-playing .action-cluster #triggerButton{display:grid!important;position:absolute!important;right:133px!important;bottom:8px!important;width:48px!important;height:48px!important;min-width:48px!important;min-height:48px!important;place-items:center;z-index:2;pointer-events:auto;touch-action:none;border-radius:50%;border:1px solid rgba(231,188,129,.78);background:rgba(111,67,42,.85);color:#fff1da;font-size:11px!important;font-weight:850;opacity:.95;white-space:nowrap;text-align:center;padding:0}
 .game.is-playing .action-cluster #triggerButton:disabled{opacity:.47!important;filter:saturate(.38)}
 .game.is-playing .action-cluster #mobileMoreButton{right:135px!important;bottom:78px!important;width:46px!important;height:46px!important;min-width:46px!important;min-height:46px!important}
 .game.is-playing .action-cluster .mobile-extra-actions{right:26px!important;bottom:155px!important}
 .game.is-playing .action-cluster .mobile-extra-actions #triggerButton{display:none!important}
 .game.deployment-active .action-cluster,.game.deployment-active .hud-left,.game.deployment-active .topbar,.game.deployment-active .tactical-panel{pointer-events:none!important;opacity:.05!important}
}
/* Tactical-map-only deployment selector; visible only during start/rebirth. */
.deployment-panel[hidden]{display:none!important}
.deployment-panel{position:absolute;inset:0;z-index:70;display:grid;place-items:center;background:rgba(4,14,10,.88);backdrop-filter:blur(6px);padding:12px;pointer-events:auto;touch-action:manipulation}
.deployment-shell{width:min(920px,98vw);max-height:94dvh;display:flex;flex-direction:column;gap:8px;padding:12px;background:#152b23;border:1px solid #7d937c;border-radius:16px;box-shadow:0 12px 38px rgba(0,0,0,.45);color:#f7eaca}
.deployment-heading,.deployment-bottom{display:flex;align-items:center;justify-content:space-between;gap:10px}
.deployment-heading strong{font-size:clamp(14px,2.3vw,21px)}.deployment-heading span{font-size:11px;color:#bed0bd}
#deploymentMap{display:block;width:100%;height:min(57dvh,480px);min-height:150px;aspect-ratio:1.9;background:#142b21;border:1px solid rgba(173,199,163,.28);border-radius:12px;cursor:crosshair;touch-action:manipulation}
.deployment-list{display:flex;gap:6px;max-width:100%;overflow-x:auto;scrollbar-width:thin;min-height:48px}
.deploy-fort-choice{flex:0 0 auto;min-height:44px;padding:5px 12px;background:#244535;border:1px solid #64846a;border-radius:10px;color:#f1efda;font-weight:700;cursor:pointer;font-size:11px}
.deploy-fort-choice.is-selected,.deploy-fort-choice:focus-visible{background:#456b52;border-color:#f6d88f;outline:2px solid #e9c878}
.deployment-bottom span{font-size:12px;color:#d7dabc;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
#deployConfirm{border:1px solid #e4d3a2;flex:0 0 auto;min-width:135px;min-height:48px;padding:8px 15px;border-radius:12px;color:#1a281e;background:#e8cb83;font-weight:900;cursor:pointer}
#deployConfirm:disabled{opacity:.35;filter:grayscale(1);cursor:default}
@media(max-height:450px){.deployment-shell{padding:7px;gap:5px}.deployment-heading span{font-size:9px}#deploymentMap{height:44dvh;min-height:115px}.deployment-list{min-height:40px}.deploy-fort-choice{min-height:40px}.deployment-bottom span{font-size:10px}#deployConfirm{min-height:42px}}

/* V41: map controls render ONLY when the tactical map is expanded; the
   game view keeps the 74px minimap and leaves the center battlefield clear. */
.map-tools{display:none!important}
.game.map-expanded .tactical-panel .map-tools{display:flex!important;align-items:center;gap:6px;flex:0 0 auto}
.game.map-expanded .tactical-panel .map-tools button{display:grid;place-items:center;min-width:44px;min-height:44px;padding:3px 7px;border-radius:9px;border:1px solid rgba(225,213,178,.5);background:rgba(30,62,48,.87);color:#f6e6c8;font-weight:800;font-size:17px;pointer-events:auto;cursor:pointer}
.game.map-expanded .tactical-panel .map-tools button:disabled{opacity:.33;cursor:default}
.game.map-expanded .tactical-panel .map-tools #mapReset{font-size:12px;min-width:50px}
.game.map-expanded .tactical-panel .map-tools output{min-width:38px;text-align:center;color:#f7e6c9;font-size:12px;font-variant-numeric:tabular-nums}
.game.map-expanded .tactical-panel #tacticalMap{touch-action:none;overscroll-behavior:contain;cursor:grab;user-select:none;-webkit-user-select:none}
.game.map-expanded .tactical-panel #tacticalMap:active{cursor:grabbing}
@media (max-width:1050px), (pointer:coarse){
 .game.map-expanded .tactical-panel{width:min(97vw,980px)!important;height:min(94dvh,730px)!important;max-height:94dvh!important;display:flex!important;flex-direction:column!important;gap:5px!important;overflow:hidden!important;padding:6px!important}
 .game.map-expanded .tactical-panel .tactical-heading{display:flex!important;flex:0 0 auto;flex-wrap:nowrap!important;justify-content:space-between!important;min-height:44px;width:100%!important;gap:5px}
 .game.map-expanded .tactical-panel .tactical-heading strong,.game.map-expanded .tactical-panel .tactical-heading span{display:none!important}
 .game.map-expanded .tactical-panel #tacticalMap{display:block!important;flex:1 1 auto!important;width:100%!important;height:auto!important;min-height:110px!important;max-height:none!important;border-radius:8px!important}
 .game.map-expanded .tactical-panel .tactical-legend,.game.map-expanded .tactical-panel .map-orientation,.game.map-expanded .tactical-panel .battle-momentum,.game.map-expanded .tactical-panel .frontline-summary,.game.map-expanded .tactical-panel .map-expanded-details{display:none!important}
 .game.map-expanded .tactical-panel .map-tools{margin-left:auto;gap:4px!important}
 .game.map-expanded .tactical-panel .map-tools button{min-width:44px;min-height:44px}
 .game.map-expanded .tactical-panel .tactical-heading #mapToggle{min-height:44px!important;height:44px!important;font-size:10px!important;padding:2px 8px!important;min-width:52px}
}

/* V45: true pause-to-build controls, no permanent new combat HUD strip. */
.termite-build-trigger{min-height:43px;min-width:60px;padding:5px;border-radius:12px;border:1px solid #c9bd8a;background:#524d35;color:#fff1c4;font-weight:800}
.termite-build-panel{position:absolute;z-index:27;inset:0;display:grid;place-items:center;background:rgba(7,17,14,.86);backdrop-filter:blur(6px);padding:14px;overflow:auto}
.termite-build-panel[hidden],.termite-build-trigger[hidden]{display:none!important}
.termite-build-content{width:min(650px,96vw);max-height:96%;overflow-y:auto;padding:18px 22px;background:#172a23;border:1px solid rgba(222,196,150,.45);border-radius:16px;color:#f3e5d3;box-shadow:0 18px 64px #0009}
.termite-build-header{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}.termite-build-header h2{margin:3px 0;font-size:22px}.termite-build-header small{color:#e2bb84;font-size:10px;letter-spacing:.11em}.termite-build-header p,#termiteBuildBalance{font-size:11px;line-height:1.5;color:#c6d4c3}
#termiteBuildClose{border:1px solid #c5ad88;background:#293b2e;color:#f7e7c8;border-radius:7px;font-size:22px;width:38px;height:38px;cursor:pointer}
.termite-build-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;margin-top:13px}
.termite-build-list button{cursor:pointer;display:flex;flex-direction:column;gap:7px;align-items:flex-start;text-align:left;border:1px solid #77694e;background:#273c31;color:#f8e6d0;border-radius:9px;padding:13px;min-height:115px}
.termite-build-list strong{font-size:14px}.termite-build-list small{font-size:10px;line-height:1.5;color:#c9d5b8}.termite-build-list b{font-size:10px;margin-top:auto;color:#f2be77}.termite-build-list button:disabled{opacity:.48;cursor:not-allowed}
#termiteBuildStatus{font-size:12px;min-height:19px;color:#efd29d} .termite-build-done{border:1px solid #b69b70;border-radius:8px;background:#3c5646;color:#f9ecda;min-height:40px;padding:7px 14px;cursor:pointer}
@media(max-width:620px){.termite-build-content{padding:12px}.termite-build-header h2{font-size:18px}.termite-build-list{grid-template-columns:1fr}.termite-build-list button{min-height:59px;padding:8px}.termite-build-list button small{line-height:1.2}}

/* V50 commanding HQ/outposts and player-controlled original cinematic music. */
.music-toggle{appearance:none;border:1px solid rgba(231,189,130,.42);border-radius:8px;background:rgba(9,22,18,.86);color:#f0d49b;font-size:10px;font-weight:800;padding:7px 9px;white-space:nowrap;cursor:pointer;min-height:35px}
.music-toggle[aria-pressed="false"]{border-color:rgba(218,213,197,.18);color:#aab6ac}
.music-toggle:focus-visible,#managementSite:focus-visible,.management-commands button:focus-visible{outline:2px solid #f3d590;outline-offset:3px}
.management-panel{display:grid;gap:9px;min-height:280px;color:#e7e8d7}
.management-map-wrap{display:grid;gap:4px;padding:7px;background:rgba(4,17,12,.5);border:1px solid rgba(200,218,181,.17);border-radius:10px}
.management-map-wrap canvas{display:block;width:100%;height:clamp(145px,27vh,230px);touch-action:manipulation;cursor:crosshair;border-radius:6px}
.management-map-wrap small{font-size:10px;line-height:1.35;color:#a9b8ad}
.management-select-label{font-size:11px;font-weight:800;color:#e7d6b5}
#managementSite{width:100%;min-height:42px;background:#20382d;color:#e9ebd9;border:1px solid #69775d;border-radius:7px;padding:8px;font:inherit;font-size:12px}
.management-detail{padding:10px 12px;border-radius:9px;background:rgba(11,33,25,.7);border:1px solid rgba(209,197,159,.25);font-size:12px;line-height:1.7}
.management-commands{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.management-commands button{min-height:50px;text-align:left;padding:9px 11px;background:rgba(70,70,42,.48);border:1px solid #8e8466;border-radius:8px;color:#fff0cb;cursor:pointer;font-weight:770;font-size:12px}
.management-commands button small{display:block;margin-top:3px;color:#b6c9bc;font-weight:500;font-size:10px}
.management-commands button[aria-pressed="true"]{border-color:#ead69f;background:rgba(107,90,55,.62)}
.management-commands button:disabled{opacity:.44;cursor:default}
.management-feedback{font-size:11px;color:#e4c68d;min-height:19px;margin:0}
.management-audio-row{display:flex;gap:14px;align-items:center;font-size:11px;color:#c5d6c4;padding:7px 0}
.management-audio-row input{flex:1;accent-color:#d6b47b;min-height:26px}
.management-audio-row output{min-width:42px;text-align:right;color:#f1d49d}
@media(max-width:600px){.management-commands{grid-template-columns:1fr 1fr}.management-commands button{font-size:11px;min-height:48px}.management-map-wrap canvas{height:155px}.music-toggle{font-size:9px;min-height:33px;padding:5px}.management-detail{font-size:11px}}
@media(max-height:600px) and (pointer:coarse){.music-toggle{font-size:8px;padding:4px 6px}}

[data-upgrade-panel][hidden],.management-panel[hidden]{display:none!important}

/* V51: management is visible and clickable even when the left status HUD is collapsed. */
.topbar .music-toggle,.topbar .command-quick{pointer-events:auto!important;touch-action:manipulation}
.command-quick{appearance:none;min-height:35px;cursor:pointer;border:1px solid #ebcc87;border-radius:8px;background:rgba(31,58,43,.93);color:#ffe9b5;padding:7px 12px;font-size:11px;font-weight:800;white-space:nowrap}
.command-quick[hidden]{display:none!important}
.command-quick[aria-expanded="true"]{background:#87673e}
.royal-status{font-size:11px;font-weight:750;color:#eec893;padding:8px;border:1px solid rgba(225,188,117,.28);border-radius:7px;background:rgba(62,48,26,.35);margin:0}
@media(max-width:1050px),(pointer:coarse){.topbar .run-number{gap:5px}.command-quick{font-size:10px;padding:5px 8px;min-height:33px}.run-number>#clock{display:none}}
@media(max-width:430px){.command-quick{font-size:9px;padding:5px}.music-toggle{font-size:9px;padding:5px}}

/* V52: separate escort command and real invested-fort economy, no floating HUD buttons. */
.squad-panel-v52{display:grid;gap:10px;color:#e9e4ce;padding:8px 0;}
.squad-panel-v52 h3{font-size:16px;margin:0;color:#f2d4a5;}
.squad-panel-v52 p{font-size:12px;line-height:1.6;margin:0;color:#bad3c5;}
.squad-panel-v52 .management-commands{grid-template-columns:repeat(3,minmax(0,1fr));}
.squad-panel-v52 .management-commands button strong{display:block;}
@media(max-width:640px){.upgrade-tabs{grid-template-columns:repeat(2,minmax(0,1fr))}.squad-panel-v52 .management-commands{grid-template-columns:1fr}}

/* V55: compact PUBG-style directional compass; true camera bearing, not the actor yaw. */
.compass-v55{position:absolute;z-index:9;left:50%;top:clamp(51px,9vh,76px);transform:translateX(-50%);width:min(350px,36vw);height:39px;border-radius:9px;background:linear-gradient(90deg,rgba(7,23,20,.02),rgba(7,22,20,.72) 15%,rgba(7,22,20,.72) 85%,rgba(7,23,20,.02));color:#e3e7d8;pointer-events:none;overflow:visible;font:600 10px system-ui}
.compass-v55[hidden],.beacon-guide-v55[hidden]{display:none!important}
.compass-ticks-v55{position:absolute;inset:0 0 11px;overflow:hidden;mask-image:linear-gradient(90deg,transparent,black 10%,black 90%,transparent)}
.compass-tick-v55{position:absolute;top:4px;transform:translateX(-50%);display:flex;align-items:center;flex-direction:column;white-space:nowrap;font-variant-numeric:tabular-nums;color:#e2e6d9;font-size:10px;text-shadow:0 1px 4px #05120e}
.compass-tick-v55.major{font-weight:900;font-size:11px;color:#fff4d6}
.compass-tick-v55::after{content:'';height:5px;width:1px;margin-top:2px;background:rgba(224,224,198,.66)}
.compass-center-v55{position:absolute;top:0;left:50%;height:27px;border-left:2px solid #ffd19a;filter:drop-shadow(0 0 3px #e5a866)}
.compass-heading-v55{position:absolute;bottom:0;left:50%;transform:translateX(-50%);font-size:9px;color:#ffdc9e;font-variant-numeric:tabular-nums;letter-spacing:.045em}
.beacon-guide-v55{position:absolute;top:39px;left:50%;transform:translateX(-50%);display:flex;align-items:center;justify-content:center;gap:5px;width:max-content;max-width:260px;padding:3px 7px;background:rgba(24,38,32,.84);border:1px solid rgba(241,198,125,.46);border-radius:15px;color:#ffe1a5;white-space:nowrap;pointer-events:auto;font-size:9px;font-variant-numeric:tabular-nums}
.beacon-guide-v55 span{font-size:12px}.beacon-guide-v55 button{font-size:14px;line-height:1;min-width:26px;min-height:24px;border:0;border-radius:9px;background:rgba(246,196,130,.16);color:#ffe9c2;pointer-events:auto;cursor:pointer}
.game.map-expanded .compass-v55,.game.deployment-active .compass-v55,.game.commander-reveal .compass-v55{display:none!important}
.game.map-expanded .tactical-panel #tacticalMap{cursor:crosshair}
.game.map-expanded .tactical-panel .map-tools #mapClearBeaconV55{font-size:10px;min-width:62px;max-width:82px}
@media(max-width:900px),(pointer:coarse){.compass-v55{top:clamp(42px,10vh,57px);width:min(260px,62vw);height:32px}.compass-tick-v55{font-size:8px}.compass-tick-v55.major{font-size:9px}.compass-heading-v55{font-size:8px}.compass-ticks-v55{bottom:9px}.compass-center-v55{height:23px}.beacon-guide-v55{top:32px;font-size:8px;padding:2px 5px;max-width:180px}.beacon-guide-v55 button{min-width:22px;min-height:22px}}
@media(orientation:landscape) and (max-height:400px){.compass-v55{top:36px;width:min(240px,36vw);height:28px}.compass-tick-v55{font-size:7px}.compass-tick-v55.major{font-size:8px}.compass-center-v55{height:19px}.beacon-guide-v55{top:28px}}

/* V56: contextual combat prompt and compact four one-tap mobile triggers. */
.v56-combat-prompt{position:absolute;left:50%;bottom:27%;transform:translateX(-50%);z-index:15;pointer-events:none;max-width:72vw;padding:.34rem .75rem;border:1px solid rgba(255,221,160,.67);border-radius:999px;background:rgba(15,16,16,.86);color:#ffe9ae;font:700 clamp(11px,1.7vw,16px)/1.25 system-ui,sans-serif;white-space:nowrap;text-align:center;text-shadow:0 1px 3px #111}
.v56-combat-prompt[hidden]{display:none!important}
.v56-mobile-trigger-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:3px;width:min(188px,35vw)}
.v56-mobile-trigger-grid button{appearance:none;color:#fff5d5;border:1px solid rgba(241,190,124,.4);border-radius:9px;background:rgba(46,40,31,.93);font:700 11px/1.15 system-ui,sans-serif;min-height:30px;padding:4px 3px;touch-action:manipulation}
.v56-mobile-trigger-grid button:active,.v56-mobile-trigger-grid button.pressed{background:#b47837;color:#100d09}
@media(hover:hover) and (pointer:fine){.v56-mobile-trigger-grid{display:none}}
@media(max-width:800px){.v56-combat-prompt{bottom:29%;font-size:11px;padding:.3rem .65rem}.v56-mobile-trigger-grid{width:155px}.v56-mobile-trigger-grid button{font-size:10px;min-height:28px}}

/* V62 RED TEAM: keep the battlefield, not the developer telemetry, primary. */
.help-advanced{margin:12px 0 0;border-top:1px solid rgba(216,204,162,.24);padding:7px 2px 0;color:#cbd8cc}
.help-advanced summary{cursor:pointer;min-height:44px;display:flex;align-items:center;padding:6px 10px;border:1px solid rgba(222,204,168,.24);border-radius:8px;color:#f0d7a7;font-size:12px;font-weight:750}
.help-advanced[open] summary{background:rgba(120,105,76,.2)}
.help-advanced p{margin:7px 6px;font-size:11px;line-height:1.5}
@media (pointer:fine) and (min-width:1051px){
 .game.is-playing:not(.map-expanded) .hud-left{top:85px;left:16px;width:175px;padding:9px 10px;background:rgba(10,25,20,.48);backdrop-filter:blur(4px);border-color:rgba(220,207,177,.12)}
 .game.is-playing:not(.map-expanded) .hud-left .hud-stats,
 .game.is-playing:not(.map-expanded) .hud-left .squad-readout,
 .game.is-playing:not(.map-expanded) .hud-left .colony-readout,
 .game.is-playing:not(.map-expanded) .hud-left .reinforcement-info,
 .game.is-playing:not(.map-expanded) .hud-left .outpost-readout,
 .game.is-playing:not(.map-expanded) .hud-left .loot-strip,
 .game.is-playing:not(.map-expanded) .hud-left .logistics-summary,
 .game.is-playing:not(.map-expanded) .hud-left .combo-readout,
 .game.is-playing:not(.map-expanded) .hud-left #alphaSkillsSummary,
 .game.is-playing:not(.map-expanded) .hud-left .evolution-button{display:none!important}
 .game.is-playing:not(.map-expanded) .hud-left .alpha-run-level{margin-top:6px;padding:5px 0}
 .game.is-playing:not(.map-expanded) .tactical-panel{top:86px;right:16px;width:152px;padding:6px;background:rgba(10,25,20,.62);box-shadow:none}
 .game.is-playing:not(.map-expanded) .tactical-panel .tactical-legend,
 .game.is-playing:not(.map-expanded) .tactical-panel .map-orientation,
 .game.is-playing:not(.map-expanded) .tactical-panel .frontline-summary,
 .game.is-playing:not(.map-expanded) .tactical-panel .battle-momentum{display:none!important}
 .game.is-playing:not(.map-expanded) .tactical-panel #tacticalMap{height:130px!important}
 .game.is-playing .mission-status b{max-width:33vw;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:5px auto 0}
}
@media (prefers-reduced-motion:reduce){
 .toast,.attack-feedback,.action-cluster,.alpha-reveal{transition:none!important;animation:none!important}
}

/* V62: the optional controls must remain within a short landscape viewport.
   They are temporary; the primary four action controls remain in place. */
@media (pointer:coarse) and (orientation:landscape) and (max-height:430px){
 .game.is-playing .action-cluster .mobile-extra-actions{
  position:fixed!important;top:max(85px,env(safe-area-inset-top))!important;
  right:max(8px,env(safe-area-inset-right))!important;bottom:auto!important;
  width:min(294px,48vw)!important;max-width:48vw!important;
  max-height:calc(100dvh - 97px)!important;overflow-y:auto!important;
  flex-wrap:wrap!important;justify-content:flex-start!important;align-content:flex-start;
  gap:4px!important;padding:5px!important;
 }
 .game.is-playing .action-cluster .mobile-extra-actions .v56-mobile-trigger-grid{width:100%!important;grid-template-columns:repeat(2,minmax(0,1fr))}
 .game.is-playing .action-cluster .mobile-extra-actions .combat-button{width:44px!important;height:44px!important;min-width:44px!important;min-height:44px!important}
 .game.is-playing .action-cluster .mobile-extra-actions[hidden]{display:none!important}
}

/* V62: never stack combat prompt, capture meter, boss bar and toast over
   the same few square centimeters of a mobile landscape battlefield. */
.game.combat-prompt-active .attack-feedback{bottom:41%!important}
@media (pointer:coarse){
 .game.focus-critical-hud .toast{opacity:0!important;visibility:hidden!important}
 .game.combat-prompt-active .attack-feedback{bottom:43%!important}
}

/* V63 RED TEAM: keep urgent danger readable during a boss or capture.
   Dismiss routine toast, never conceal a live home-raid/predator warning. */
@media (pointer:coarse){
 .game.focus-critical-hud.urgent-notice .toast{opacity:1!important;visibility:visible!important;top:clamp(55px,15vh,84px)!important;max-width:min(42vw,270px)!important;background:rgba(49,20,18,.88)!important;border-color:rgba(242,145,112,.65)!important;color:#fff3da!important}
}

/* V63 accessible splash help belongs to the splash overlay (z20), not
   the permanent HUD header (z5), which is physically behind that overlay. */
#startPanel .intro-help-button{position:absolute;top:max(12px,env(safe-area-inset-top));right:max(12px,env(safe-area-inset-right));z-index:2;display:grid;place-items:center;min-width:62px;min-height:44px;padding:7px 10px;border-radius:20px;border:1px solid rgba(226,209,168,.42);background:rgba(18,39,28,.55);color:#eddec4;font:750 11px system-ui,sans-serif;cursor:pointer}
#startPanel .intro-help-button:focus-visible{outline:2px solid #f3d590;outline-offset:3px}

/* V67: only a verified local checkpoint reveals a second, functional
   action. Keep the first-run splash clean and the phone safe area clear. */
#startPanel .resume-cta{max-width:280px;min-height:42px;margin:8px 0 0!important;
 padding:9px 18px;border-radius:999px;border:1px solid rgba(222,201,151,.66);
 background:rgba(30,54,40,.8)!important;color:#f2e4c5!important;font-size:12px;letter-spacing:.02em}
#startPanel .resume-cta[hidden],#startPanel .resume-status[hidden]{display:none!important}
#startPanel .resume-status{display:block;max-width:min(84vw,330px);
 margin:8px auto 0;color:#f4cda7;text-align:center;font-size:11px;line-height:1.45}

/* V73: real binary choices; only two cards, never a fictitious third option. */
.rogue-choice-panel[data-binary="true"] .rogue-choice-grid{
 grid-template-columns:repeat(2,minmax(0,1fr));max-width:760px;margin-inline:auto
}
.rogue-choice-panel[data-binary="true"] .rogue-skill-card{min-height:165px}
.v56-mobile-trigger-grid button:disabled,.v56-mobile-trigger-grid .organ-locked{
 opacity:.42;filter:grayscale(.6);cursor:not-allowed
}
@media(max-width:650px){
 .rogue-choice-panel[data-binary="true"] .rogue-choice-grid{grid-template-columns:1fr}
 .rogue-choice-panel[data-binary="true"] .rogue-skill-card{min-height:82px}
}


/* V79: touch-first crowd battle. The map, HP/XP, warnings and all four
   primary thumb actions remain accessible; routine admin text is collapsed.
   Desktop and every older standalone V78 build are completely unchanged. */
@media (pointer:coarse) and (orientation:landscape) {
 .game.is-playing.v79-density:not(.map-expanded) .hud-left{
  left:max(5px,env(safe-area-inset-left))!important;
  top:max(48px,env(safe-area-inset-top))!important;
  width:min(145px,24vw)!important;max-height:calc(100dvh - 58px)!important;
  overflow:hidden!important;padding:5px 6px!important;
  border-radius:10px!important;background:rgba(9,24,20,.53)!important;
  box-shadow:none!important;backdrop-filter:none!important
 }
 .game.is-playing.v79-density:not(.map-expanded) .hud-left
 .hud-stats,.game.is-playing.v79-density:not(.map-expanded) .hud-left
 .squad-readout,.game.is-playing.v79-density:not(.map-expanded) .hud-left
 .colony-readout,.game.is-playing.v79-density:not(.map-expanded) .hud-left
 .reinforcement-info,.game.is-playing.v79-density:not(.map-expanded) .hud-left
 .outpost-readout,.game.is-playing.v79-density:not(.map-expanded) .hud-left
 .logistics-summary,.game.is-playing.v79-density:not(.map-expanded) .hud-left
 .combo-readout,.game.is-playing.v79-density:not(.map-expanded) .hud-left
 #alphaSkillsSummary{display:none!important}
 .game.is-playing.v79-density:not(.map-expanded) .hud-left .alpha-run-level{
  margin:4px 0!important;padding:3px 0!important
 }
 .game.is-playing.v79-density:not(.map-expanded) .hud-left .vital-top,
 .game.is-playing.v79-density:not(.map-expanded) .hud-left .alpha-run-title{
  font-size:10px!important;line-height:1.15!important;white-space:nowrap
 }
 .game.is-playing.v79-density:not(.map-expanded) .tactical-panel{
  top:max(47px,env(safe-area-inset-top))!important;
  right:max(6px,env(safe-area-inset-right))!important;
  width:min(112px,20vw)!important;
  max-height:min(132px,38dvh)!important;
  padding:3px!important;border-radius:9px!important;
  background:rgba(9,26,19,.57)!important;box-shadow:none!important;
  backdrop-filter:none!important
 }
 .game.is-playing.v79-density:not(.map-expanded) .tactical-panel #tacticalMap{
  width:100%!important;height:min(94px,27dvh)!important;min-height:60px!important
 }
 .game.is-playing.v79-density:not(.map-expanded) .tactical-panel
 .tactical-legend,.game.is-playing.v79-density:not(.map-expanded)
 .tactical-panel .frontline-summary,.game.is-playing.v79-density:not(.map-expanded)
 .tactical-panel .battle-momentum{display:none!important}
 .game.is-playing.v79-density:not(.map-expanded) .attack-feedback{
  max-width:28vw!important;font-size:11px!important;
  padding:3px 6px!important;bottom:43%!important;pointer-events:none!important
 }
 .game.is-playing.v79-density:not(.map-expanded) .v56-combat-prompt{
  max-width:min(42vw,245px)!important;overflow:hidden;text-overflow:ellipsis;
  padding:3px 7px!important;font-size:10px!important;bottom:50%!important
 }
 /* 44px minimum touch target remains even when the device is very short. */
 .game.is-playing.v79-density .action-cluster #dodgeButton,
 .game.is-playing.v79-density .action-cluster #heavyButton,
 .game.is-playing.v79-density .action-cluster #jumpButton,
 .game.is-playing.v79-density .action-cluster #mobileMoreButton,
 .game.is-playing.v79-density .action-cluster #triggerButton{
  min-width:44px!important;min-height:44px!important
 }
 .game.is-playing.v79-density .action-cluster #attackButton{
  min-width:60px!important;min-height:60px!important
 }
}
@media (pointer:coarse) and (orientation:landscape) and (max-height:370px){
 .game.is-playing.v79-density:not(.map-expanded) .hud-left{
  width:min(132px,22vw)!important
 }
 .game.is-playing.v79-density:not(.map-expanded) .hud-left
 .loot-strip,.game.is-playing.v79-density:not(.map-expanded) .hud-left
 .spirit-bar{display:none!important}
 .game.is-playing.v79-density:not(.map-expanded) .tactical-panel{
  width:min(99px,18vw)!important;max-height:108px!important
 }
 .game.is-playing.v79-density:not(.map-expanded) .tactical-panel #tacticalMap{
  height:74px!important;min-height:62px!important
 }
 .game.is-playing.v79-density:not(.map-expanded) .v56-combat-prompt{
  bottom:57%!important
 }
}

/* V83/V84/V85 local F8 QA monitor. Served by the same-origin external
   stylesheet and embedded in complete offline HTML by the verified builders.
   Never reintroduce runtime <style> injection or widen production CSP. */
#v83QaOpen{min-width:44px;min-height:44px;margin:8px 0 0;padding:9px 14px;border:1px solid #a5c5aa;border-radius:9px;background:#223b32;color:#e8eddd;font-weight:700;touch-action:manipulation;cursor:pointer}
#v83QaPanel[hidden]{display:none!important}
#v83QaPanel{position:fixed;z-index:80;left:50%;top:max(8px,env(safe-area-inset-top));transform:translateX(-50%);width:min(380px,calc(100vw - 24px));max-height:42dvh;overflow:auto;box-sizing:border-box;background:rgba(10,24,20,.96);color:#e9f1e7;border:1px solid #84a58c;border-radius:12px;box-shadow:0 5px 24px #000a;font:12px/1.45 system-ui,-apple-system,sans-serif;padding:10px 12px;pointer-events:auto}
#v83QaPanel *{box-sizing:border-box}#v83QaPanel .v83-head{display:flex;align-items:center;justify-content:space-between;gap:8px}#v83QaPanel h2{margin:0;font-size:13px;font-weight:800;line-height:1.3}
#v83QaPanel button,#v83QaPanel select{font:700 12px system-ui;min-width:44px;min-height:44px;cursor:pointer;border:1px solid #89a38b;border-radius:8px;background:#29473b;color:#fff3de;padding:6px 8px;touch-action:manipulation}
#v83QaPanel .v83-qa-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin:8px 0}#v83QaPanel .v83-qa-stats div{padding:6px 5px;background:#21352c;border-radius:6px;min-width:0}
#v83QaPanel .v83-qa-stats small{display:block;font-size:10px;color:#c2d0c4}#v83QaPanel output{font-size:13px;font-weight:800;font-variant-numeric:tabular-nums}
#v83QaPanel .v83-qa-controls{display:flex;flex-wrap:wrap;gap:6px;align-items:center}#v83QaPanel .v83-qa-controls label{display:flex;gap:6px;align-items:center}#v83QaPanel .v83-qa-note{font-size:10px;margin:5px 0;color:#c1d0c2}
#v83QaPanel #v83QaState{padding:3px 0;font-size:10px;color:#e0d9ad}
@media(pointer:coarse) and (orientation:landscape) and (max-height:520px){#v83QaPanel{top:max(4px,env(safe-area-inset-top));max-height:74dvh;width:min(540px,calc(100vw - 20px));padding:7px}#v83QaPanel .v83-qa-stats{grid-template-columns:repeat(6,minmax(0,1fr))}#v83QaPanel .v83-qa-stats div{padding:3px}#v83QaPanel .v83-qa-stats small{font-size:9px}#v83QaPanel .v83-qa-stats output{font-size:10px}}

#helpPanel .v83-qa-priority-note{font-size:12px;line-height:1.5;max-width:32rem;color:#bad3bd;margin:.4rem 0}

/* V84 compact upgrade presentation -- strictly opt-in, no game-rule changes. */
html[data-akas-v84-play="1"] .rogue-choice-panel[data-compact-v84="true"]{
 padding:max(8px,env(safe-area-inset-top)) max(9px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(9px,env(safe-area-inset-left));
}
html[data-akas-v84-play="1"] .rogue-choice-panel[data-compact-v84="true"] .rogue-choice-content{
 max-width:690px;padding:15px 17px;border-radius:12px;
}
html[data-akas-v84-play="1"] .rogue-choice-panel[data-compact-v84="true"] .eyebrow{display:none}
html[data-akas-v84-play="1"] .rogue-choice-panel[data-compact-v84="true"] h2{
 font-size:clamp(18px,2.5vw,25px);margin:0 0 3px;line-height:1.15;
}
html[data-akas-v84-play="1"] .rogue-choice-panel[data-compact-v84="true"] .rogue-choice-content > p{
 max-width:none;margin:0;font-size:11px;line-height:1.35;
}
html[data-akas-v84-play="1"] .rogue-choice-panel[data-compact-v84="true"] .rogue-choice-content > small{
 margin-top:8px;font-size:10px;
}
html[data-akas-v84-play="1"] .rogue-choice-panel[data-compact-v84="true"] .rogue-choice-grid{
 display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin-top:10px;max-width:none;
}
html[data-akas-v84-play="1"] .rogue-choice-panel[data-compact-v84="true"] .rogue-skill-card{
 display:flex;flex-direction:column;align-items:stretch;gap:4px;min-height:128px;
 padding:11px 12px;border-radius:9px;touch-action:manipulation;
}
html[data-akas-v84-play="1"] .rogue-choice-panel[data-compact-v84="true"] .rogue-skill-card .v84-kicker{
 font-size:10px;letter-spacing:.02em;line-height:1.2;
}
html[data-akas-v84-play="1"] .rogue-choice-panel[data-compact-v84="true"] .rogue-skill-card strong{
 font-size:clamp(17px,2vw,21px);line-height:1.15;
}
html[data-akas-v84-play="1"] .rogue-choice-panel[data-compact-v84="true"] .rogue-skill-card .v84-active{
 font-size:12px;line-height:1.2;color:#ebddc4;
}
html[data-akas-v84-play="1"] .v84-traits{display:flex;flex-wrap:wrap;align-items:center;gap:4px;margin-top:3px}
html[data-akas-v84-play="1"] .rogue-skill-card .v84-trait{
 font-size:10px;letter-spacing:0;text-transform:none;line-height:1.25;
 color:#d7f1d4;border-radius:4px;padding:3px 5px;
 border:1px solid rgba(150,201,157,.28);background:rgba(28,66,48,.55);
}
html[data-akas-v84-play="1"] .upgrade-tabs{margin:7px 0 5px}
html[data-akas-v84-play="1"] .evolution-header h2{margin:2px 0;font-size:21px}
html[data-akas-v84-play="1"] .evolution-header p{font-size:11px}
html[data-akas-v84-play="1"] .evolution-inventory{padding:7px 10px}
html[data-akas-v84-play="1"] .upgrade-grid .evolution-choice{min-height:100px;padding:10px;gap:4px}
html[data-akas-v84-play="1"] .upgrade-grid .evolution-choice small{
 display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2;overflow:hidden;
}
@media(max-width:650px) and (orientation:portrait){
 html[data-akas-v84-play="1"] .rogue-choice-panel[data-compact-v84="true"] .rogue-choice-grid{grid-template-columns:1fr;gap:7px}
 html[data-akas-v84-play="1"] .rogue-choice-panel[data-compact-v84="true"] .rogue-choice-content{padding:12px;max-height:96dvh;overflow:auto}
 html[data-akas-v84-play="1"] .rogue-choice-panel[data-compact-v84="true"] .rogue-skill-card{min-height:98px;gap:3px;padding:9px 11px}
}
@media (max-height:440px) and (orientation:landscape){
 html[data-akas-v84-play="1"] .rogue-choice-panel[data-compact-v84="true"] .rogue-choice-content{padding:7px 11px;max-height:96dvh;overflow:auto}
 html[data-akas-v84-play="1"] .rogue-choice-panel[data-compact-v84="true"] .rogue-choice-content > small{margin-top:4px}
 html[data-akas-v84-play="1"] .rogue-choice-panel[data-compact-v84="true"] .rogue-choice-grid{gap:6px;margin-top:5px;grid-template-columns:repeat(2,minmax(0,1fr))}
 html[data-akas-v84-play="1"] .rogue-choice-panel[data-compact-v84="true"] .rogue-skill-card{padding:7px 9px;min-height:98px}
}


/* V85: anatomy diagram is legible without adding another paragraph or button. */
html[data-akas-v85-play="1"] .rogue-choice-panel[data-compact-v84="true"] .rogue-skill-card.v84-choice{
 position:relative;padding-right:108px;min-height:129px;overflow:visible;
}
html[data-akas-v85-play="1"] .v85-organ-visual{position:absolute;right:7px;top:7px;
 display:flex;flex-direction:column;align-items:center;gap:0;width:90px;height:72px;
 pointer-events:none;color:#e5d8ba;
}
html[data-akas-v85-play="1"] .v85-organ-visual svg{width:88px;height:54px;display:block;flex:none}
html[data-akas-v85-play="1"] .v85-organ-label{max-width:90px;text-align:center;font-size:10px;line-height:1.3;
 font-weight:700;color:#f7c587;white-space:normal}
html[data-akas-v85-play="1"] .v84-choice .v84-traits{margin-right:-98px}
html[data-akas-v85-play="1"] .v84-choice .v84-trait{display:inline-flex;align-items:center;gap:3px;
 min-height:21px;padding:3px 5px;white-space:normal}
html[data-akas-v85-play="1"] .v84-choice .v84-trait svg{width:14px;height:14px;flex:none;stroke:currentColor}
html[data-akas-v85-play="1"] .v85-fort-footnote{font-size:10px;line-height:1.15;color:#e8cc9d}
@media(max-width:650px) and (orientation:portrait){
 html[data-akas-v85-play="1"] .rogue-skill-card.v84-choice{padding-right:96px;min-height:115px}
 html[data-akas-v85-play="1"] .v85-organ-visual{width:74px;right:8px;top:5px;height:61px}
 html[data-akas-v85-play="1"] .v85-organ-visual svg{width:74px;height:45px}
 html[data-akas-v85-play="1"] .v85-organ-label{font-size:9px}
 html[data-akas-v85-play="1"] .v84-choice .v84-traits{margin-right:-88px}
}
@media(max-height:440px) and (orientation:landscape){
 html[data-akas-v85-play="1"] .rogue-skill-card.v84-choice{padding-right:56px;min-height:102px}
 html[data-akas-v85-play="1"] .v85-organ-visual{width:47px;height:48px;right:4px;top:3px}
 html[data-akas-v85-play="1"] .v85-organ-visual svg{width:48px;height:34px}
 html[data-akas-v85-play="1"] .v85-organ-label{font-size:8px}
 html[data-akas-v85-play="1"] .v84-choice .v84-traits{margin-right:-52px}
}

