@import url('https://fonts.googleapis.com/css2?family=Black+Han+Sans&family=Gowun+Dodum&family=Nunito:wght@600;700;800;900&display=swap');
:root{--ink:#e9eee9;--muted:#91a099;--panel:#202928;--panel-2:#283331;--line:#3b4744;--gold:#e4b951;--green:#63a66f;--red:#d65c50;--shadow:0 18px 48px rgba(0,0,0,.34)}
*{box-sizing:border-box}[hidden]{display:none!important}html,body{width:100%;height:100%;margin:0;overflow:hidden}body{background:#121817;color:var(--ink);font-family:"Nunito","Gowun Dodum",sans-serif}button{font:inherit;color:inherit}button:focus-visible{outline:2px solid #f0cf70;outline-offset:2px}.game-shell{height:100%;display:grid;grid-template-rows:70px 1fr 34px;background:#18201f}
.topbar{z-index:10;display:flex;align-items:center;padding:0 18px;border-bottom:1px solid #34403d;background:linear-gradient(180deg,#222c2b,#182120);box-shadow:0 5px 22px rgba(0,0,0,.3)}.brand{width:250px;display:flex;align-items:center;gap:12px}.brand-mark{width:42px;height:42px;display:grid;place-items:center;border:1px solid #6e896f;border-radius:9px;background:linear-gradient(145deg,#4d7458,#263c30);color:#f0d271;font-size:22px;box-shadow:inset 0 0 0 2px rgba(255,255,255,.05)}.brand>span:last-child{display:flex;flex-direction:column}.brand strong{font-size:14px;letter-spacing:.08em}.brand small{margin-top:2px;color:#6f8a7c;font-size:7px;letter-spacing:.2em}.hud-resources{flex:1;height:100%;display:flex;justify-content:center}.hud-item{position:relative;min-width:125px;padding:13px 20px 9px 45px;border-inline-start:1px solid #34403d}.hud-item:last-child{border-inline-end:1px solid #34403d}.hud-item>span{position:absolute;left:17px;top:24px;color:#82948b;font-size:17px}.hud-item.gold>span{color:var(--gold)}.hud-item.lives>span{color:#d7675e}.hud-item small,.hud-item b{display:block}.hud-item small{color:#708078;font-size:7px;letter-spacing:.15em}.hud-item b{margin-top:3px;font-size:15px}.header-actions{width:190px;display:flex;align-items:center;justify-content:flex-end;gap:7px}.header-actions button{width:34px;height:34px;border:1px solid #3b4744;border-radius:8px;background:#26302f;cursor:pointer}.header-actions button:hover{background:#34403e}.save-state{margin-right:5px;color:#71827a;font-size:8px}
.workspace{min-height:0;display:grid;grid-template-columns:244px minmax(0,1fr) 282px}.build-panel,.command-panel{z-index:5;min-height:0;background:linear-gradient(180deg,#222b2a,#192120)}.build-panel{padding:19px 14px;border-right:1px solid #394440;overflow:auto}.panel-kicker,.section-title>span,.eyebrow{color:#719078;font-size:7px;font-weight:900;letter-spacing:.18em}.build-panel h1{margin:5px 0 3px;font-size:20px}.build-panel>p{margin:0;color:#788780;font:9px "Gowun Dodum",sans-serif}.build-list{display:grid;gap:8px;margin-top:16px}.build-card{position:relative;min-height:68px;display:grid;grid-template-columns:42px 1fr auto;align-items:center;gap:9px;padding:9px 10px;border:1px solid #394542;border-radius:10px;background:#27312f;cursor:pointer;text-align:left;transition:.16s}.build-card:hover{border-color:#66866e;background:#2e3b38;transform:translateX(2px)}.build-card.active{border-color:#d8ba61;background:linear-gradient(90deg,#3a4438,#2a342f);box-shadow:inset 3px 0 #e1bc55}.build-card.unaffordable:not(.active){opacity:.55}.build-card>kbd{position:absolute;left:4px;top:4px;width:14px;height:14px;display:grid;place-items:center;border:0;border-radius:3px;background:#151c1b;color:#728078;font:6px Nunito}.build-icon{width:40px;height:40px;display:grid;place-items:center;border-radius:8px;background:var(--tower-color);color:white;font-size:19px;box-shadow:inset 0 0 0 2px rgba(255,255,255,.08)}.build-copy{min-width:0}.build-copy strong,.build-copy small{display:block}.build-copy strong{font-size:10px}.build-copy small{margin-top:3px;overflow:hidden;color:#87948e;font:7px "Gowun Dodum";white-space:nowrap;text-overflow:ellipsis}.build-card>b{color:#e8c66a;font-size:11px}.build-card>b i{margin-left:2px;color:#8b7b4e;font-size:7px;font-style:normal}.shortcut-note{margin-top:13px;padding-top:11px;border-top:1px solid #34403d;color:#6f7d77;font-size:7px}.shortcut-note kbd,.statusbar kbd{margin:0 3px;padding:2px 4px;border:1px solid #45514e;border-radius:4px;background:#111817;color:#a7b2ad;font:7px Nunito}
.battlefield{position:relative;min-width:0;overflow:hidden;background:#344240}#gameCanvas{display:block;width:100%;height:100%;cursor:crosshair}.map-label{position:absolute;padding:7px 10px;border:1px solid rgba(255,255,255,.13);border-radius:7px;background:rgba(19,25,24,.73);pointer-events:none;backdrop-filter:blur(5px)}.map-label small,.map-label strong{display:block}.map-label small{font-size:6px;letter-spacing:.14em}.map-label strong{margin-top:2px;font-size:8px}.map-label.enemy{right:14px;top:14px;color:#e27a70}.map-label.castle{left:14px;bottom:14px;color:#91c89b}.wave-state{position:absolute;left:50%;top:13px;height:29px;display:flex;align-items:center;gap:7px;padding:0 12px;border:1px solid rgba(255,255,255,.11);border-radius:7px;background:rgba(21,28,27,.78);transform:translateX(-50%);font-size:8px;font-weight:900;letter-spacing:.12em;backdrop-filter:blur(6px)}.wave-state i{width:6px;height:6px;border-radius:50%;background:#62a970;box-shadow:0 0 0 4px rgba(98,169,112,.12)}.wave-state .combat{color:#f17a68}.wave-state:has(.combat) i{background:#e96354;animation:pulse .55s infinite alternate}.wave-banner{position:absolute;z-index:8;left:50%;top:42%;padding:14px 26px;border-block:1px solid rgba(250,205,102,.5);background:rgba(24,30,29,.88);color:#f0cd70;font-size:19px;font-weight:900;letter-spacing:.08em;opacity:0;transform:translate(-50%,-50%) scale(.92);pointer-events:none;transition:.25s}.wave-banner.show{opacity:1;transform:translate(-50%,-50%) scale(1)}.toast{position:absolute;z-index:9;left:50%;top:51px;padding:8px 13px;border:1px solid rgba(255,255,255,.13);border-radius:7px;background:rgba(32,47,38,.92);font-size:9px;opacity:0;transform:translate(-50%,-7px);pointer-events:none;transition:.2s}.toast.show{opacity:1;transform:translate(-50%,0)}.toast.danger{background:rgba(111,42,38,.94)}.camera-controls{position:absolute;right:13px;bottom:13px;display:flex;flex-direction:column;overflow:hidden;border:1px solid #47524e;border-radius:8px}.camera-controls button{width:32px;height:29px;border:0;border-bottom:1px solid #44504c;background:rgba(27,36,34,.88);cursor:pointer}.camera-controls button:last-child{border:0}.battle-controls{position:absolute;left:50%;bottom:13px;display:flex;padding:4px;border:1px solid #46524e;border-radius:9px;background:rgba(22,29,28,.88);transform:translateX(-50%)}.battle-controls button{height:28px;min-width:35px;border:0;border-radius:6px;background:transparent;color:#91a099;cursor:pointer;font-size:8px}.battle-controls button:hover,.battle-controls button.active{background:#46544d;color:#f0d277}.battle-controls button:disabled{opacity:.35;cursor:not-allowed}
.command-panel{padding:18px 15px 14px;border-left:1px solid #394440;display:flex;flex-direction:column;overflow:auto}.wave-card,.story-card,.tower-panel{padding-bottom:15px;border-bottom:1px solid #37413f}.section-title{display:flex;align-items:center;justify-content:space-between}.section-title>b{padding:4px 7px;border-radius:5px;background:#342b29;color:#c47b6d;font-size:7px}.section-title>b strong{font-size:9px}.wave-card h2{margin:7px 0 9px;font-size:16px}.enemy-preview{display:grid;gap:5px}.enemy-preview>div{height:29px;display:grid;grid-template-columns:16px 1fr auto;align-items:center;padding:0 8px;border:1px solid #37423f;border-radius:7px;background:#252f2d}.enemy-preview>div>span{width:8px;height:8px;border-radius:50%;background:var(--enemy);box-shadow:0 0 0 3px color-mix(in srgb,var(--enemy),transparent 78%)}.enemy-preview strong{font-size:8px}.enemy-preview b{color:#b8c0bc;font-size:8px}.progress-track{height:4px;margin-top:9px;border-radius:3px;background:#101716;overflow:hidden}.progress-track i{display:block;width:0;height:100%;background:linear-gradient(90deg,#d4ab4d,#d65b50);transition:width .2s}.story-card{margin-top:13px}.story-card .section-title>b{background:#243941;color:#8ab7c1}.story-card p{margin:8px 0 0;padding-left:10px;border-left:2px solid #5d9baa;color:#a2afaa;font:8px/1.65 "Gowun Dodum",sans-serif}.tower-panel{min-height:235px;margin-top:15px}.empty-selection{min-height:185px;display:flex;flex-direction:column;align-items:center;justify-content:center;color:#687772;text-align:center}.empty-selection>b{font-size:28px}.empty-selection strong{margin-top:8px;color:#89968f;font-size:9px}.empty-selection small{margin-top:4px;font:7px "Gowun Dodum"}.tower-heading{display:flex;align-items:center;gap:10px;margin-top:12px}.tower-heading>span{width:43px;height:43px;display:grid;place-items:center;border-radius:9px;font-size:20px}.tower-heading strong,.tower-heading small{display:block}.tower-heading strong{font-size:12px}.tower-heading small{margin-top:3px;color:#e4bc57;font-size:7px;letter-spacing:.12em}.stat-grid{display:grid;grid-template-columns:repeat(3,1fr);margin:13px 0 10px;border-block:1px solid #394441}.stat-grid>div{padding:10px 3px;text-align:center;border-right:1px solid #394441}.stat-grid>div:last-child{border:0}.stat-grid small,.stat-grid b{display:block}.stat-grid small{color:#708079;font-size:6px}.stat-grid b{margin-top:3px;font-size:11px}.upgrade-button{width:100%;height:36px;display:flex;align-items:center;justify-content:space-between;padding:0 11px;border:0;border-radius:7px;background:linear-gradient(135deg,#9b7b32,#c69d3e);color:#171b18;cursor:pointer;font-size:9px;font-weight:900}.upgrade-button:disabled{background:#39413e;color:#717c77;cursor:not-allowed}.sell-button{width:100%;height:28px;margin-top:5px;border:1px solid #4c3c39;border-radius:7px;background:#302827;color:#b77b70;cursor:pointer;font-size:7px}.start-wave{width:100%;height:53px;margin-top:auto;display:flex;align-items:center;justify-content:space-between;padding:0 15px;border:1px solid #789369;border-radius:9px;background:linear-gradient(135deg,#4f8059,#31523b);cursor:pointer;box-shadow:0 8px 20px rgba(32,83,46,.25)}.start-wave span{text-align:left}.start-wave small,.start-wave strong{display:block}.start-wave small{color:#b8ceb9;font-size:6px;letter-spacing:.15em}.start-wave strong{margin-top:3px;font-size:11px}.start-wave>b{font-size:18px}.start-wave:disabled{border-color:#46504d;background:#343d3a;color:#7c8882;box-shadow:none;cursor:not-allowed}
.statusbar{display:flex;align-items:center;justify-content:flex-end;gap:15px;padding:0 15px;border-top:1px solid #323c39;background:#121817;color:#6d7974;font-size:7px}.statusbar>span:first-child{margin-right:auto;color:#9aa69f}.modal-backdrop{position:fixed;z-index:30;inset:0;display:grid;place-items:center;padding:20px;background:rgba(7,11,10,.77);backdrop-filter:blur(5px);transition:.22s}.modal-backdrop.hidden{opacity:0;pointer-events:none}.modal{position:relative;border:1px solid #4b5955;border-radius:14px;background:#202927;box-shadow:0 35px 90px rgba(0,0,0,.55);overflow:hidden}.welcome-modal{width:min(760px,95vw);display:grid;grid-template-columns:42% 58%;min-height:470px}.welcome-art{position:relative;overflow:hidden;background:linear-gradient(#384d4d 0 45%,#6f7858 45%)}.welcome-art:after{content:"";position:absolute;inset:0;background:linear-gradient(110deg,transparent 35%,rgba(224,85,53,.16))}.fortress{position:absolute;z-index:3;left:45px;bottom:70px;color:#d5c390;font-size:115px;text-shadow:0 10px 0 #445548}.road{position:absolute;width:390px;height:90px;right:-110px;bottom:72px;background:#8e826d;transform:rotate(-27deg);box-shadow:0 0 0 2px rgba(40,48,40,.15)}.enemy-unit{position:absolute;z-index:4;color:#6e3031;font-size:43px}.enemy-unit.e1{right:45px;top:120px}.enemy-unit.e2{right:105px;top:176px;font-size:34px}.blast{position:absolute;z-index:5;right:75px;top:87px;color:#ef9b45;font-size:58px;text-shadow:0 0 22px #e55737}.welcome-copy{padding:45px 42px 35px}.welcome-copy h2,.modal h2{margin:9px 0 10px;font:400 29px/1.25 "Black Han Sans","Gowun Dodum",sans-serif;letter-spacing:.01em}.welcome-copy p,.modal p{margin:0;color:#94a19b;font:10px/1.7 "Gowun Dodum",sans-serif}.rules{display:grid;gap:8px;margin-top:19px}.rules>div{display:flex;align-items:center;gap:10px}.rules>div>b{width:28px;height:28px;display:grid;place-items:center;border:1px solid #405348;border-radius:6px;background:#26342e;color:#d7b757;font-size:8px}.rules span strong,.rules span small{display:block}.rules span strong{font-size:9px}.rules span small{margin-top:2px;color:#77847e;font:7px "Gowun Dodum"}.primary-button{width:100%;height:44px;margin-top:21px;display:flex;align-items:center;justify-content:center;gap:15px;border:0;border-radius:8px;background:linear-gradient(135deg,#c29a3e,#e1ba5a);color:#172019;cursor:pointer;font-size:10px;font-weight:900;box-shadow:0 9px 22px rgba(193,151,55,.2)}.modal-close{position:absolute;right:12px;top:12px;width:28px;height:28px;border:1px solid #495552;border-radius:50%;background:#28312f;cursor:pointer}.result-modal,.help-modal{width:min(510px,94vw);padding:38px;text-align:center}.result-icon{width:54px;height:54px;margin:0 auto 10px;display:grid;place-items:center;border-radius:50%;background:#34483a;color:#e1bd59;font-size:24px}.result-stats{display:grid;grid-template-columns:repeat(3,1fr);margin-top:20px;border-block:1px solid #394441}.result-stats>div{padding:14px 5px;border-right:1px solid #394441}.result-stats>div:last-child{border:0}.result-stats small,.result-stats b{display:block}.result-stats small{color:#718079;font-size:6px;letter-spacing:.13em}.result-stats b{margin-top:4px;font-size:18px}.help-grid{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-top:18px;text-align:left}.help-grid>div{padding:12px;border:1px solid #394441;border-radius:8px;background:#26302e}.help-grid b{font-size:19px;color:#dbb85c}.help-grid strong{display:block;margin:6px 0 3px;font-size:9px}.help-grid p{font-size:7px;line-height:1.5}
@keyframes pulse{to{opacity:.3}}
@media(max-width:1100px){.workspace{grid-template-columns:210px minmax(0,1fr) 245px}.brand{width:205px}.header-actions{width:130px}.hud-item{min-width:95px;padding-left:37px}.hud-item>span{left:12px}.build-panel{padding-inline:10px}.command-panel{padding-inline:11px}}
@media(max-width:820px){html,body{overflow:auto}.game-shell{height:auto;min-height:100vh;grid-template-rows:60px auto 30px}.brand{width:auto}.brand small{display:none}.hud-item{min-width:52px;padding:12px 8px;text-align:center}.hud-item>span,.hud-item small,.header-actions .save-state{display:none}.header-actions{width:auto}.workspace{grid-template-columns:78px 1fr;grid-template-rows:62vh auto}.build-panel{grid-row:1;padding:10px 7px}.build-panel h1,.build-panel>p,.panel-kicker,.build-copy,.build-card>b,.shortcut-note{display:none}.build-list{margin:0}.build-card{min-height:51px;display:grid;grid-template-columns:1fr;padding:5px}.build-icon{margin:auto}.battlefield{grid-column:2}.command-panel{grid-column:1/3;grid-row:2;min-height:410px}.map-label{display:none}.statusbar>span:not(:first-child){display:none}.welcome-modal{grid-template-columns:1fr}.welcome-art{display:none}.welcome-copy{padding:35px 27px}.help-grid{grid-template-columns:1fr}.wave-state{top:8px}.toast{top:43px}}

/* Tactical command interface */
:root{--ink:#edf4fa;--muted:#a2b2c1;--panel:#151f2c;--panel-2:#1d2b3b;--line:#344557;--gold:#ffc463;--green:#64d8df;--red:#ff7468}
body{background:#0c131d;font-family:Arial,"Malgun Gothic",sans-serif}.game-shell{background:#101722;grid-template-rows:88px 1fr 36px}.topbar{padding:0 22px;background:linear-gradient(180deg,#1b2939,#111b28);border-bottom:2px solid #415365}.brand{width:258px;gap:12px;flex-shrink:0}.brand-mark{border-radius:2px;width:44px;height:48px;background:#26394a;border:1px solid #6b8799;color:#ffc463;clip-path:polygon(0 0,100% 0,100% 78%,50% 100%,0 78%)}.brand strong{font-size:16px;letter-spacing:.04em}.brand small{color:#a2b6c7;font-size:9px;letter-spacing:.14em}.hud-item{min-width:128px;padding:14px 16px 12px 41px;border-color:#344557}.hud-item:last-child{border-color:#344557}.hud-item>span{left:13px;top:33px;font-size:20px;color:#70cbdc}.hud-item small{font-size:10px;color:#a3b5c6;letter-spacing:.05em}.hud-item b{font-size:27px;line-height:1.2;font-variant-numeric:tabular-nums}.hud-item.gold b{color:#ffd07b}.hud-item.lives b{color:#ff8b7b}.integrity-track{height:3px;background:#412d36;margin-top:5px}.integrity-track i{display:block;height:100%;background:#ff8475;transition:width .2s}.header-actions{width:auto;margin-left:auto;padding-left:12px}.header-actions button{background:#1b2a3a;border-color:#425569;border-radius:3px;width:36px;height:36px}.save-state{font-size:10px;color:#9bb0c1}
.workspace{grid-template-columns:264px minmax(0,1fr) 294px}.build-panel,.command-panel{background:linear-gradient(150deg,#1a2838,#111b28 75%);border-color:#394d60}.build-panel{padding:23px 16px}.panel-kicker,.section-title>span,.eyebrow{font-size:10px;color:#70cfde;letter-spacing:.12em}.build-panel h1{font-size:25px;margin:7px 0}.build-panel>p{font:11px/1.7 Arial,"Malgun Gothic",sans-serif;color:#a4b6c4}.build-list{gap:10px;margin-top:22px}.build-card{min-height:89px;border-radius:3px;border-color:#3b5063;background:linear-gradient(110deg,#26394b,#192837);padding:12px 9px;grid-template-columns:38px 1fr auto;gap:8px}.build-card:hover{border-color:#78dce6;background:#2b4053}.build-card.active{border-color:#74e0eb;background:linear-gradient(100deg,#204652,#1b2d3d);box-shadow:inset 3px 0 #74e0eb,0 0 18px #5bdaeb12}.build-icon{width:36px;height:42px;border-radius:2px;background:linear-gradient(150deg,var(--tower-color),#1b304b);font-size:24px;border:1px solid #789bb766}.build-card>kbd{font-size:9px;color:#afc3d5;background:#101b28}.build-copy strong{font-size:12px}.build-copy small{font:10px/1.4 Arial,"Malgun Gothic",sans-serif;color:#acbecb;margin-top:5px}.build-copy em{display:block;margin-top:7px;color:#7fdae7;font-size:9px;font-style:normal}.build-copy em span{color:#a9b8c5;margin-left:5px}.build-card>b{font-size:15px;color:#ffd183}.build-card>b i{font-size:9px;color:#d3ad6a}.shortcut-note{font-size:10px;color:#a5b5c4;border-color:#354b5c}.shortcut-note kbd,.statusbar kbd{font-size:9px;border-radius:2px;border-color:#44596b;background:#111d29;color:#d0dce5}.mission-objective{margin-top:28px;padding:17px 12px;border-left:2px solid #ffc463;background:linear-gradient(90deg,#ffc4630b,transparent)}.mission-objective small{color:#ffc463;font-size:9px;letter-spacing:.12em}.mission-objective strong{display:block;margin-top:9px;font-size:13px}.mission-objective p{font-size:11px;line-height:1.8;color:#a4b5c4}.mission-objective>span{display:block;border-top:1px solid #354454;padding-top:12px;font-size:10px;color:#71dbe8}.mission-objective i{color:#ffc463;font-style:normal;margin-left:10px}
.battlefield{background:#14232e}.battlefield:after{content:"";position:absolute;inset:0;pointer-events:none;box-shadow:inset 0 0 90px #060e1a80,inset 0 0 0 1px #69889d30}.sector-label{position:absolute;left:22px;top:66px;color:#bdcdd9;font-size:11px;font-weight:bold;letter-spacing:.17em;pointer-events:none}.sector-label span{display:block;margin-top:7px;font-size:10px;font-weight:normal;letter-spacing:0;color:#8ba3b6}.map-label{border-radius:2px;background:#111c2bea;border-color:#496071;padding:10px 12px}.map-label small{font-size:9px}.map-label strong{font-size:12px;margin-top:5px}.map-label.enemy{top:auto;bottom:75px;right:16px;border-left:3px solid #ff7468;color:#ff9284}.map-label.castle{bottom:20px;left:16px;border-left:3px solid #69deed;color:#83e3ef}.wave-state{top:18px;min-height:34px;border-radius:2px;border-color:#657585;background:#182533eb;font-size:11px;color:#ffce80;white-space:nowrap;padding:0 17px}.wave-state i{background:#ffc463;box-shadow:0 0 0 4px #ffc46318}.wave-banner{font-size:30px;border-color:#ffb85d;background:#151c2af2;color:#ffd291;white-space:nowrap}.toast{top:114px;border-radius:3px;font-size:12px;max-width:90%;text-align:center;background:#1a3749f2}.battle-controls{bottom:20px;border-radius:3px;background:#111e2bed;border-color:#52677a}.battle-controls button{font-size:12px;min-width:38px;height:32px;border-radius:2px}.battle-controls button:hover,.battle-controls button.active{background:#325165;color:#91eeff}.camera-controls{bottom:20px;border-radius:3px;border-color:#52677a}.camera-controls button{background:#182938;height:32px;font-size:16px}.combat-alert{position:absolute;top:155px;left:50%;transform:translateX(-50%);font-size:12px;white-space:nowrap;color:#ffd3cd;background:#852f2ce8;border:1px solid #ff7968;padding:10px 16px;pointer-events:none}.combat-alert:empty{display:none}
.command-panel{padding:23px 17px 17px;gap:0}.section-title>b{font-size:11px;border-radius:2px;background:#522e33;color:#ffaaa0;padding:5px 8px}.section-title>b strong{font-size:14px}.wave-card h2{font-size:19px;margin:13px 0}.wave-card,.story-card,.tower-panel{border-color:#35495b}.enemy-preview>div{height:35px;background:#222d3c;border-radius:2px;border-color:#445060}.enemy-preview strong,.enemy-preview b{font-size:11px}.enemy-preview b{color:#d7e0e8}.progress-track{height:6px;margin-top:13px;border-radius:0;background:#0b1421}.wave-milestones{display:flex;gap:4px;margin-top:12px}.wave-milestones span{flex:1;padding:5px 0;border:1px solid #3b4e60;color:#8c9dac;font-size:9px;text-align:center;background:#142230}.wave-milestones .cleared{background:#254a50;color:#91e9e6;border-color:#508e96}.wave-milestones .current{color:#ffd194;border-color:#ffa464;background:#5b3d28}.story-card{margin-top:18px}.story-card .section-title>b{font-size:10px;background:#243e50;color:#a5dbe6}.story-card p{font:11px/1.8 Arial,"Malgun Gothic",sans-serif;color:#b0c1ce;border-color:#6dbaca;margin-top:12px}.tower-panel{min-height:205px;margin:18px 0}.empty-selection{min-height:155px}.empty-selection>b{font-size:42px;color:#63859a}.empty-selection strong{font-size:12px;color:#b4c7d5}.empty-selection small{font:10px/1.7 Arial,"Malgun Gothic",sans-serif;color:#90a7b9}.tower-heading strong{font-size:15px}.tower-heading small{font-size:10px}.stat-grid small{font-size:10px;color:#a0b7c8}.stat-grid b{font-size:16px}.upgrade-button{font-size:12px;height:40px;border-radius:2px;background:linear-gradient(120deg,#efac48,#ffd189)}.sell-button{font-size:11px;height:32px;border-radius:2px}.start-wave{flex-shrink:0;height:68px;border-radius:3px;border:1px solid #ffb371;background:linear-gradient(120deg,#f28c3d,#c8552c);color:#fff7ed;box-shadow:0 5px 0 #70351f,0 8px 30px #e874302b;position:relative;overflow:hidden}.start-wave:before{content:"";position:absolute;right:0;top:0;width:65px;height:100%;background:repeating-linear-gradient(-55deg,transparent 0 9px,#54221122 9px 18px)}.start-wave small{font-size:9px;color:#ffe0bb}.start-wave strong{font-size:17px;margin-top:6px}.start-wave>b{font-size:25px;z-index:1}.start-wave:hover:not(:disabled){filter:brightness(1.13)}.start-wave:disabled{background:#243342;border-color:#43566a;color:#9db1c3;box-shadow:none}.statusbar{background:#0e1722;border-color:#32495c;font-size:10px;color:#99afc0}.statusbar>span:first-child{color:#b8ccd9}
.game-shell[data-phase="combat"] .wave-state{border-color:#f07960;color:#ffab8c;background:#3c2429}.game-shell[data-phase="combat"] .battlefield:after{box-shadow:inset 0 0 65px #bb49331c,inset 0 3px #ed7857}.game-shell[data-phase="combat"] .wave-card{border-top:2px solid #f08263;padding-top:12px}.game-shell.critical .hud-item.lives{background:#74343155}.game-shell.critical .integrity-track i{background:#ff5d4f}.game-shell[data-phase="paused"] .wave-state{color:#d2dce7;border-color:#92a8be}
.modal{background:linear-gradient(145deg,#223348,#111c2a);border-radius:4px;border-color:#60788d}.welcome-modal{width:min(880px,95vw)}.welcome-copy{padding:38px 34px}.welcome-copy h2{font-size:35px;color:#ffd08a}.welcome-copy p,.modal p{font:12px/1.85 Arial,"Malgun Gothic",sans-serif;color:#b3c4d2}.welcome-art{background:radial-gradient(ellipse at 75% 30%,#a44b3344,transparent 65%),repeating-linear-gradient(0deg,transparent 0 35px,#7699ad0d 35px 36px),linear-gradient(145deg,#112435 45%,#35433e 45%)}.welcome-art:before{content:"SECTOR 07 / DEFEND THE CORE";position:absolute;left:22px;top:28px;font-size:10px;letter-spacing:.13em;color:#f5b575}.welcome-art .road{background:#77644d;border-block:2px dashed #c59b61}.welcome-art .blast{color:#ffc16d;text-shadow:0 0 40px #ff682c}.rules span strong{font-size:12px}.rules span small{font:10px/1.6 Arial,"Malgun Gothic",sans-serif;color:#a5b8c7}.rules>div>b{border-radius:2px;background:#263b50;border-color:#4b6479;font-size:11px}.rules{gap:13px}.primary-button{background:linear-gradient(120deg,#f5a04e,#dc7137);border-radius:3px;font-size:14px;height:49px}.help-grid strong{font-size:12px}.help-grid p{font-size:11px}
@media(max-width:1200px){.workspace{grid-template-columns:234px minmax(0,1fr) 260px}.build-panel,.command-panel{padding-inline:12px}.brand{width:230px}.brand strong{font-size:14px}.hud-item{min-width:104px;padding-right:10px}.hud-item b{font-size:24px}.save-state{display:none}.build-card{gap:6px;grid-template-columns:32px 1fr auto}.build-icon{width:30px}.build-copy strong{font-size:11px}.build-copy em{font-size:8px}.section-title>span{font-size:9px}.wave-card h2{font-size:17px}}
@media(max-height:800px) and (min-width:821px){.game-shell{grid-template-rows:76px 1fr 30px}.build-panel,.command-panel{padding-top:16px}.build-list{margin-top:15px;gap:7px}.build-card{min-height:77px;padding-block:9px}.mission-objective{margin-top:18px;padding-block:12px}.tower-panel{min-height:174px;margin-block:12px}.empty-selection{min-height:130px}.story-card{margin-top:12px}.story-card p{line-height:1.6}.start-wave{height:60px}}
@media(max-width:820px){.game-shell{grid-template-rows:auto auto 32px;min-height:100dvh}.topbar{padding:12px;flex-wrap:wrap;gap:12px}.brand{width:auto;flex:1}.brand strong{font-size:14px}.brand small{display:block;font-size:8px}.brand-mark{width:30px;height:35px;font-size:18px}.header-actions{order:1;padding:0}.hud-resources{order:2;width:100%;flex:auto;justify-content:stretch}.hud-item{flex:1;min-width:0;padding:6px 8px;text-align:left}.hud-item small{display:block;font-size:9px}.hud-item b{font-size:21px}.hud-item>span{display:none}.workspace{grid-template-columns:76px minmax(0,1fr);grid-template-rows:60vh auto}.build-panel{padding:10px 6px}.build-list{margin:0;gap:9px}.build-card{display:flex;flex-direction:column;gap:5px;padding:9px 5px;min-height:74px}.build-icon{width:36px;height:32px;font-size:21px}.build-card>b{display:block;font-size:12px}.mission-objective{display:none}.command-panel{padding:20px;min-height:0}.tower-panel{min-height:0}.empty-selection{min-height:120px}.start-wave{margin-top:6px}.sector-label{left:14px;top:62px;font-size:10px}.sector-label span{font-size:9px}.wave-state{font-size:10px;top:14px;padding-inline:10px}.map-label{display:none}.battle-controls{left:44%;bottom:12px}.battle-controls button{min-width:32px}.camera-controls{bottom:12px;right:9px}.wave-banner{font-size:21px}.combat-alert{font-size:10px;white-space:normal;width:90%;text-align:center}.statusbar{padding-inline:10px;font-size:9px}.welcome-copy{padding:28px 22px}.welcome-copy h2{font-size:29px}.modal-backdrop{overflow-y:auto}.modal{max-height:90dvh;overflow-y:auto}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important}}
.build-panel,.command-panel{scrollbar-width:thin;scrollbar-color:#425d70 #14202d}.map-label.enemy{bottom:140px}.mission-objective{margin-top:18px;padding-block:12px}

/* Keep the battlefield and essential controls in focus. */
.game-shell{grid-template-rows:88px minmax(0,1fr)}
.workspace{grid-template-columns:224px minmax(0,1fr) 248px}
.build-panel h1{font-size:18px;margin:0 0 16px}.build-list{margin-top:0}.build-card{min-height:68px;grid-template-columns:36px 1fr auto}.build-copy strong{font-size:12px}.build-icon{height:36px}
.tower-panel.empty{display:none}.tower-panel{min-height:0;border-bottom:0}.start-wave{height:56px}.start-wave strong{margin-top:0;font-size:16px}.wave-card{padding-bottom:16px}.enemy-preview{margin-top:12px}.wave-milestones{display:none}
.wave-state{min-height:30px}.toast{top:60px}.combat-alert{top:108px}.save-state{display:none}.welcome-art:before{content:none}.welcome-modal{min-height:350px}.welcome-copy{align-self:center}
@media(max-height:800px) and (min-width:821px){.game-shell{grid-template-rows:76px minmax(0,1fr)}}
@media(max-width:1100px) and (min-width:821px){.workspace{grid-template-columns:206px minmax(0,1fr) 224px}}
@media(max-width:820px){
 .game-shell{height:100svh;min-height:640px;grid-template-rows:auto minmax(0,1fr)}
 .topbar{padding:8px 12px;gap:7px}.brand-mark{height:28px;width:27px}.header-actions button{height:30px;width:32px}.hud-item{padding:4px 8px}.hud-item b{font-size:20px}.integrity-track{margin-top:3px}
 .workspace{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(230px,1fr) 84px auto}
 .battlefield{grid-column:1;grid-row:1}.build-panel{grid-column:1;grid-row:2;padding:6px 8px;border-top:1px solid #394d60;border-right:0;overflow:hidden}
 .build-list{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:5px}.build-card{min-height:70px;padding:5px 2px;gap:3px;position:relative}.build-icon{width:26px;height:23px;font-size:17px}.build-copy{display:block;width:100%;text-align:center}.build-copy strong{font-size:9px;white-space:nowrap}.build-card>b{font-size:11px;line-height:1}.build-card>kbd{display:none}
 .command-panel{grid-column:1;grid-row:3;min-height:0;padding:10px 12px;display:grid;grid-template-columns:minmax(0,1fr) 124px;gap:10px;overflow:auto;max-height:42svh;border-left:0;border-top:1px solid #394d60;align-items:center}
 .wave-card{padding:0;border:0}.section-title>span{font-size:10px}.section-title>b{font-size:10px;padding:3px 6px}.section-title>b strong{font-size:12px}.enemy-preview{margin-top:5px;display:flex;flex-wrap:wrap;gap:4px}.enemy-preview>div{height:24px;padding:0 5px;gap:4px;grid-template-columns:8px 1fr auto}.enemy-preview strong,.enemy-preview b{font-size:9px}.enemy-preview>div>span{width:5px;height:5px}.progress-track{height:3px;margin-top:6px}
 .start-wave{grid-column:2;grid-row:1;height:48px;margin:0;padding:0 10px}.start-wave strong{font-size:13px}.start-wave>b{font-size:17px}.tower-panel{grid-column:1/-1;grid-row:2;margin:0;padding:0;border-top:1px solid #35495b}.tower-details{display:grid;grid-template-columns:1fr 1fr;gap:6px 12px;align-items:center}.tower-heading{margin-top:7px;gap:7px}.tower-heading>span{width:28px;height:28px;font-size:16px}.tower-heading strong{font-size:12px}.tower-heading small{font-size:9px}.stat-grid{margin:6px 0}.stat-grid>div{padding:5px 2px}.stat-grid small{font-size:9px}.stat-grid b{font-size:12px}.upgrade-button,.sell-button{height:34px;margin:0;font-size:11px}
 .battle-controls{left:50%}.camera-controls button{height:28px}.wave-state{top:10px}.toast{font-size:11px;top:49px}.welcome-copy{padding:25px 22px}
}
/* Shared, recognizable unit portraits. */
.build-icon{width:46px;height:46px;background:#122230;border:1px solid var(--tower-color)}.build-icon img{width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 2px 2px #0008)}.build-card{grid-template-columns:46px 1fr auto;min-height:76px}.tower-heading>span{background:#142535}.tower-heading img{width:100%;height:100%;object-fit:contain}.enemy-preview>div{grid-template-columns:32px auto;justify-content:start;gap:8px}.enemy-preview img{width:30px;height:30px}.enemy-preview{display:flex;flex-wrap:wrap}.enemy-preview>div{min-width:67px}.start-wave:disabled{opacity:.65}.game-shell[data-phase="combat"] .start-wave{background:linear-gradient(120deg,#30566b,#234156);border-color:#6897b0;box-shadow:none}.game-shell[data-phase="paused"] .start-wave{background:linear-gradient(120deg,#f5a04e,#dc7137)}
@media(max-width:820px){.build-card{grid-template-columns:none;min-height:70px;gap:2px}.build-icon{width:36px;height:33px}.build-copy strong{font-size:9px}.enemy-preview img{width:24px;height:24px}.enemy-preview>div{height:28px;grid-template-columns:24px auto;min-width:49px;gap:3px}.enemy-preview{max-height:64px;overflow:auto}.tower-heading>span{width:36px;height:36px}.hud-item b{font-variant-numeric:tabular-nums}}
.build-copy strong{word-break:keep-all;line-height:1.4}.build-card{gap:6px}.build-card>b{font-size:13px}

/* Story introduction: keep the complete artwork visible on every screen. */
.story-modal{width:min(1120px,96vw);max-height:94dvh;overflow-y:auto;background:#102338;border-radius:12px}
.story-header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 18px}
.story-header h2{font:700 16px/1.4 Arial,"Malgun Gothic",sans-serif;margin:0;color:#fff0d8}
.story-modal button{min-height:44px;padding:8px 18px;border:1px solid #546a7e;border-radius:7px;background:#1d354b;color:#f4ecd9;font-size:14px;cursor:pointer}
.story-modal button:disabled{opacity:.35;cursor:default}
.story-modal button:focus-visible{outline:3px solid #7deaff;outline-offset:2px}
#storyImage{display:block;width:100%;height:auto;max-height:calc(94dvh - 162px);object-fit:contain;background:#102338}
.story-controls{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:12px 18px}
.story-controls .primary-button{width:auto;min-width:120px;margin:0;background:#efa453;color:#172019}
#storyProgress{font-size:15px;color:#d2e1ed;font-variant-numeric:tabular-nums}
.story-modal .story-guide{text-align:center;margin:0;padding:0 12px 12px;font-size:12px;color:#c0d0dc}
#welcomeModal.hidden{visibility:hidden}
@media(max-width:520px){.story-header,.story-controls{padding:10px}.story-header h2{font-size:14px}.story-modal button{padding:8px 12px}.story-controls{gap:8px}.story-modal .story-guide{font-size:11px}}
