@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Thai:wght@400;500;600;700&family=Rajdhani:wght@500;600;700&display=swap');
:root{color-scheme:dark;--bg:#101b20;--panel:#152127;--line:#2d3d42;--blue:#82d4f8;--muted:#93a5ab;--gold:#edb96c;--white:#e9eeee;--font:'IBM Plex Sans Thai',Tahoma,sans-serif}
*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;overflow:hidden;background:var(--bg);color:var(--white);font:16px var(--font)}button,a{-webkit-tap-highlight-color:transparent}button{font:inherit;color:inherit;cursor:pointer;border:1px solid var(--line);background:#1c2b32;border-radius:3px;transition:background .15s,border-color .15s}button:hover{background:#2a3c44;border-color:#6a929f}button:focus-visible,a:focus-visible{outline:2px solid var(--blue);outline-offset:3px}button:disabled{opacity:.45;cursor:not-allowed}button.active{border-color:var(--blue);color:var(--blue);background:#214252}button:active{transform:translateY(1px)}.eyebrow{font:600 12px 'Rajdhani',sans-serif;letter-spacing:2px;color:var(--muted)}#app{height:100dvh;display:flex;flex-direction:column}.topbar{height:76px;flex-shrink:0;border-bottom:1px solid #34464e;display:flex;align-items:center;justify-content:space-between;gap:20px;padding:0 24px;background:#111d23;z-index:2}.brand{display:flex;align-items:center;gap:11px;text-decoration:none;color:var(--white);font:700 25px/1 'Rajdhani',sans-serif;letter-spacing:1px;white-space:nowrap}.brand svg{width:35px;height:39px;fill:none;stroke:var(--blue);stroke-width:1.5}.brand svg path+path{fill:var(--blue);stroke:none}.brand-light{font-weight:500;color:#a9bdc7;margin-left:5px}.brand small{display:block;font:500 10px 'Rajdhani',sans-serif;letter-spacing:3.7px;margin-top:6px;color:#758f9e}.resources{display:flex;align-items:center;gap:32px}.resources>span{display:grid;grid-template-columns:auto auto;column-gap:9px;align-items:center;min-width:74px}.resources i{grid-row:span 2;font-size:27px;font-style:normal;color:#799aa8}.resources b{font:600 23px/1.1 'Rajdhani',sans-serif;letter-spacing:.5px}.resources small{font-size:11px;color:var(--muted)}.resources .credits i,.resources .credits b{color:var(--gold)}.top-actions{display:flex;gap:8px;align-items:center}.top-actions #clock{font:500 17px 'Rajdhani',sans-serif;color:var(--muted);margin-right:12px}.top-actions button{height:35px;width:35px;font-family:system-ui}.battle-layout{display:grid;grid-template-columns:minmax(0,1fr) 304px;flex:1;min-height:0}#viewport{position:relative;min-height:0;min-width:0;background:#273c30;overflow:hidden}#battle{display:block;width:100%;height:100%;touch-action:none;user-select:none;cursor:crosshair}.mission-tag{position:absolute;top:24px;left:26px;display:flex;flex-direction:column;gap:4px;pointer-events:none;text-shadow:0 1px 5px #000;background:linear-gradient(90deg,#101d20dc,transparent);padding:13px 45px 13px 16px;border-left:2px solid var(--gold)}.mission-tag .eyebrow{color:var(--gold)}.mission-tag strong{font-size:19px;font-weight:500}.mission-tag>span:last-child{font-size:12px;color:#bccac7}.map-tools{position:absolute;right:18px;top:24px;display:flex;flex-direction:column;gap:6px}.map-tools button{width:38px;height:38px;background:#16252be8;font:22px system-ui}.map-tools button:hover{background:#284552}.map-tools button.active{background:#28607a}.battle-hint{position:absolute;bottom:119px;left:26px;font-size:12px;color:#d2dcd5;text-shadow:0 1px 2px #000;pointer-events:none;padding:5px 9px;background:#152422b3;border-radius:2px}#toast{position:absolute;top:151px;left:50%;transform:translateX(-50%) translateY(-8px);border:1px solid #5a777b;background:#14272cf2;border-radius:3px;padding:10px 18px;font-size:14px;pointer-events:none;opacity:0;transition:.15s;max-width:85%;text-align:center;z-index:3}#toast.show{opacity:1;transform:translateX(-50%) translateY(0)}#selection-box{position:absolute;border:1px solid #8cd3ea;background:#75c9ee20;pointer-events:none;display:none}.selection-bar{position:absolute;bottom:20px;left:24px;right:24px;background:#122126ed;border:1px solid #435350;box-shadow:0 10px 30px #0003;padding:15px 18px;display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:83px;border-radius:3px}.selected-info{display:flex;flex-direction:column;gap:2px}.selected-info .eyebrow{font-size:10px;color:var(--blue)}.selected-info strong{font-size:15px;font-weight:500}.selected-info small{font-size:11px;color:var(--muted)}.orders{display:flex;gap:6px}.orders button{min-width:70px;height:51px;display:flex;flex-direction:column;align-items:center;justify-content:center;font-size:11px;background:#1a2d34}.orders button>span{font:20px/1.2 system-ui;color:var(--blue)}.command-panel{display:flex;flex-direction:column;background:linear-gradient(125deg,#1b2b32,#122026);border-left:1px solid #46544f;min-height:0;padding:18px 16px 0;overflow-y:auto;scrollbar-width:thin}.panel-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:13px}.panel-heading .eyebrow{color:var(--blue)}.live-label{font:600 10px 'Rajdhani',sans-serif;letter-spacing:1px;color:#96b29e}.live-label:before{content:'';display:inline-block;width:5px;height:5px;margin-right:6px;border-radius:50%;background:#90b89a}.radar{height:172px;border:1px solid #52605a;position:relative;background:#24332a;overflow:hidden;flex-shrink:0}.radar canvas{width:100%;height:100%;display:block;cursor:crosshair}.radar-label,.radar-coord{position:absolute;font:500 10px 'Rajdhani',sans-serif;letter-spacing:1px;pointer-events:none;text-shadow:0 1px 2px #000}.radar-label{left:9px;top:8px;color:#c1cdb7}.radar-coord{right:8px;bottom:7px;color:#adbba7}.base-status{padding:13px 0 17px;display:grid;grid-template-columns:1fr auto;gap:6px;font-size:12px;color:#b0bec0}.base-status b{font:600 14px 'Rajdhani';color:var(--blue)}.base-status>div{grid-column:span 2;height:3px;background:#344047}.base-status i{height:3px;background:#80b6cc;display:block}.tabbar{display:flex;border-bottom:1px solid var(--line);margin:0 -1px 13px}.tabbar button{border:0;border-bottom:2px solid transparent;border-radius:0;flex:1;padding:10px 3px;font-size:13px;background:transparent;color:var(--muted)}.tabbar button.active{color:var(--blue);border-color:var(--blue)}.production-panel{display:flex;flex-direction:column;gap:8px;min-height:250px}.unit-card{display:grid;grid-template-columns:72px 1fr auto;gap:11px;align-items:center;width:100%;min-height:78px;padding:7px;text-align:left;background:#192a31;border-color:#36464b;position:relative;overflow:hidden}.unit-card:hover{background:#223840;border-color:#76acbb}.unit-card .portrait{height:62px;width:72px;background:#2e392f;border:1px solid #4b574e;overflow:hidden;display:grid;place-items:center}.unit-card img{width:100%;height:100%;object-fit:cover;filter:saturate(.8)}.unit-card .portrait.sprite img{width:340%;height:290%;max-width:none;object-fit:cover;object-position:center top;align-self:start;transform:translateY(-5px)}.unit-card .card-copy{display:flex;flex-direction:column;gap:3px}.unit-card strong{font:600 18px 'Rajdhani',var(--font);letter-spacing:.5px}.unit-card small{color:var(--muted);font-size:11px}.unit-card .cost{font:600 16px 'Rajdhani';color:var(--gold);align-self:start;white-space:nowrap;padding-top:2px}.unit-card .card-symbol{font:38px 'Rajdhani';color:var(--blue)}.unit-card .progress{position:absolute;bottom:0;left:0;height:3px;background:var(--gold)}.queue-section{margin-top:18px}.section-label{font-size:12px;display:flex;align-items:center;justify-content:space-between;color:#b3c2c4}.section-label b{font:500 13px 'Rajdhani';color:#7a939b}#queue-list{display:flex;flex-direction:column;gap:6px;margin-top:8px;min-height:42px}.empty-queue{font-size:11px;color:#7f9599;border:1px dashed #3b4a4c;padding:12px;text-align:center}.queue-item{position:relative;overflow:hidden;text-align:left;height:31px;font-size:11px;padding:5px 9px;display:flex;justify-content:space-between;isolation:isolate}.queue-item i{position:absolute;left:0;top:0;bottom:0;background:#30596a;z-index:-1}.queue-item span:last-child{color:#b6cad0}.objectives{border-top:1px solid #354347;margin-top:18px;padding:14px 0}.objectives p{display:flex;align-items:center;gap:8px;font-size:11px;color:#a9bdbf;margin:8px 0}.objective-dot{width:5px;height:5px;border:1px solid var(--blue);display:inline-block;transform:rotate(45deg)}.objective-dot.amber{border-color:var(--gold)}.objectives small{font-size:10px;color:#7c969b;display:block;margin-top:9px}.panel-footer{margin-top:auto;display:flex;justify-content:space-between;align-items:center;padding:12px 0;border-top:1px solid #344248;gap:8px}.panel-footer span{font:500 10px 'Rajdhani';letter-spacing:1px;color:#6b858e}.panel-footer button{font-size:11px;padding:3px 9px}dialog{width:min(460px,calc(100% - 30px));padding:36px;border:1px solid #54717a;background:linear-gradient(145deg,#1c3039,#111e24);color:var(--white);border-radius:5px;box-shadow:0 25px 100px #0008;text-align:center;max-height:calc(100dvh - 30px);overflow-y:auto}dialog::backdrop{background:#050e12b8;backdrop-filter:blur(5px)}dialog h1{font:700 39px/1 'Rajdhani';letter-spacing:2px;margin:14px 0 7px}dialog h2{font-size:24px;font-weight:500;margin:12px 0}dialog p{font-size:14px;line-height:1.9;color:#bdcdd1}dialog .eyebrow{color:var(--blue)}.modal-insignia{width:64px;height:68px;clip-path:polygon(50% 0,100% 22%,100% 75%,50% 100%,0 75%,0 22%);background:#2a5467;color:#9adbf9;display:grid;place-items:center;margin:0 auto 22px;font:600 22px 'Rajdhani'}.modal-subtitle{font:500 12px 'Rajdhani';letter-spacing:2px;color:var(--gold);margin:0 0 24px}.brief-grid{display:flex;justify-content:space-between;border-top:1px solid var(--line);border-bottom:1px solid var(--line);padding:18px 0;gap:8px}.brief-grid span{display:flex;flex-direction:column;font-size:12px;color:#b8c6cc;gap:5px}.brief-grid b{color:var(--gold);font:500 22px 'Rajdhani'}.intro-controls{font-size:11px;color:#90a8b2;margin:19px 0}dialog .primary,dialog .secondary{display:block;width:100%;padding:11px 16px;margin-top:10px;font-size:14px}.primary{background:#79cbec;border-color:#8dd7f3;color:#0e2732;font-weight:600}.primary:hover{background:#a3e0f8;color:#0e2732}.secondary{background:transparent}dialog small{display:block;color:#8ca4ad;font-size:11px;margin-top:15px;line-height:1.7}.help-copy{text-align:left;max-height:55dvh;overflow-y:auto}.help-copy p{font-size:13px}.help-copy b{color:var(--blue)}
@media(min-width:1500px){.battle-layout{grid-template-columns:minmax(0,1fr) 330px}.command-panel{padding:20px 20px 0}.radar{height:190px}.unit-card{min-height:88px}.production-panel{min-height:285px}}
@media(max-height:820px) and (min-width:761px){.radar{height:135px}.production-panel{min-height:220px}.unit-card{min-height:67px}.unit-card .portrait{height:51px}.command-panel{padding-top:12px}.objectives{margin-top:12px;padding:9px 0}.queue-section{margin-top:12px}.base-status{padding:10px 0}.panel-heading{margin-bottom:9px}.panel-footer{padding:8px 0}}
@media(max-width:1000px) and (min-width:761px){.brand{font-size:20px}.brand small{font-size:8px;letter-spacing:2.6px}.topbar{padding:0 16px;gap:12px}.resources{gap:16px}.resources b{font-size:20px}.battle-layout{grid-template-columns:minmax(0,1fr) 275px}.selection-bar{left:12px;right:12px;padding:12px}.orders button{min-width:53px}.selected-info strong{font-size:13px}.mission-tag{left:17px;top:17px}.mission-tag strong{font-size:16px}.mission-tag>span:last-child{display:none}}
@media(max-width:760px){.topbar{height:61px;padding:0 12px;gap:8px}.brand{font-size:20px;gap:7px;letter-spacing:.4px}.brand svg{width:26px;height:31px}.brand-light,.brand small{display:none}.resources{gap:14px}.resources>span{min-width:0;gap:5px}.resources b{font-size:18px}.resources i{font-size:19px}.resources small{display:none}.top-actions{gap:5px}.top-actions #clock{display:none}.top-actions button{width:30px;height:32px}.top-actions #sound{display:none}.battle-layout{display:flex;flex-direction:column}.command-panel{height:230px;flex-shrink:0;border-left:0;border-top:1px solid #526264;padding:0 12px;overflow:visible;display:block;position:relative;padding-bottom:env(safe-area-inset-bottom)}#viewport{flex:1}.panel-heading,.base-status,.objectives,.panel-footer{display:none}.radar{position:absolute;top:-108px;left:12px;width:116px;height:84px;border-color:#728076;z-index:1;box-shadow:0 2px 12px #0005}.radar-label{font-size:8px;top:4px;left:5px;letter-spacing:.4px}.radar-coord{display:none}.tabbar{margin:0 0 9px;height:41px}.tabbar button{font-size:13px}.production-panel{min-height:0;height:104px;display:flex;flex-direction:row;gap:8px;overflow-x:auto;scrollbar-width:thin;padding-bottom:6px}.unit-card{min-width:154px;width:154px;height:92px;min-height:0;grid-template-columns:49px 1fr;gap:8px;padding:7px;flex-shrink:0}.unit-card .portrait{width:49px;height:55px}.unit-card strong{font-size:16px;letter-spacing:0}.unit-card small{font-size:10px}.unit-card .cost{grid-column:2;font-size:14px;position:absolute;left:64px;bottom:5px}.unit-card .card-copy{align-self:start;margin-top:5px;gap:0}.unit-card .card-symbol{font-size:27px}.queue-section{margin-top:1px}.section-label{font-size:11px}#queue-list{flex-direction:row;min-height:31px;margin-top:5px;overflow-x:auto;gap:6px}.empty-queue{width:100%;padding:6px}.queue-item{flex-shrink:0;width:150px;font-size:10px;height:29px}.mission-tag{left:12px;top:12px;padding:8px 13px;gap:1px}.mission-tag .eyebrow{font-size:9px;letter-spacing:1px}.mission-tag strong{font-size:13px}.mission-tag>span:last-child{display:none}.map-tools{top:12px;right:12px;gap:5px}.map-tools button{width:34px;height:34px;font-size:20px}.selection-bar{left:12px;right:12px;bottom:9px;min-height:61px;padding:7px 10px;gap:7px}.selected-info .eyebrow{font-size:8px;letter-spacing:1px}.selected-info strong{font-size:12px}.selected-info small{font-size:9px}.orders{gap:4px}.orders button{height:43px;min-width:49px;padding:2px 5px;font-size:9px}.orders button>span{font-size:17px}.battle-hint{bottom:78px;left:138px;right:12px;font-size:10px;padding:4px 6px}#toast{top:85px;font-size:12px;padding:8px 12px}.top-actions #help{display:none}dialog{padding:25px}dialog h1{font-size:32px}}
@media(max-width:380px){.resources{gap:8px}.resources b{font-size:16px}.resources i{font-size:16px}.brand{font-size:17px}.brand svg{width:22px}.topbar{padding:0 9px}.orders button{min-width:43px;font-size:8px}.selected-info strong{font-size:11px}}
@media(max-height:600px) and (max-width:760px){.command-panel{height:195px}.production-panel{height:84px}.unit-card{height:76px}.unit-card .portrait{height:46px}.tabbar{height:34px}.topbar{height:49px}.radar{height:64px;top:-88px}.mission-tag strong{font-size:11px}.selection-bar{bottom:6px;min-height:52px}.battle-hint{display:none}}

[hidden]{display:none!important}.unit-card .portrait.sprite img{width:100%;height:100%;object-fit:cover;object-position:center;transform:none;align-self:auto}
@media(max-width:760px){.radar{top:-166px}.production-panel{overflow-y:hidden}.unit-card .cost{grid-area:auto;left:64px}}
@media(max-height:600px) and (max-width:760px){.radar{top:-145px}}

.mobile-status{display:none}@media(max-width:760px){.mobile-status{display:flex;justify-content:space-between;font-size:10px;color:#90aeb8;margin-top:7px}.orders button{font-size:10px}.selected-info small{font-size:10px}}
@media(max-width:760px){.command-panel{height:246px}}
@media(max-height:600px) and (max-width:760px){.command-panel{height:216px}}
