html,body{touch-action:none;overscroll-behavior:none;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;-webkit-tap-highlight-color:transparent;color:#eef3f8;--sl:env(safe-area-inset-left);--sr:env(safe-area-inset-right);--st:env(safe-area-inset-top);--sb:env(safe-area-inset-bottom);--panel:#161e2ce6;--edge:#3d4d66;--accent:#4b9cf0;--gold:#ffd25e;background:#1b2614;width:100%;height:100%;margin:0;padding:0;font-family:system-ui,-apple-system,PingFang SC,Microsoft YaHei,sans-serif;position:fixed;inset:0;overflow:hidden}body.f-red{--accent:#e0463a;--edge:#5a3a3a;--panel:#221818e6}#app,#game{touch-action:none;display:block;position:fixed;inset:0}button{font:inherit;color:inherit;touch-action:none;-webkit-touch-callout:none;cursor:pointer;background:0 0;border:none;padding:0}.hidden{display:none!important}.panel{background:var(--panel);border:2px solid var(--edge);border-radius:12px;box-shadow:0 3px 10px #00000073}button.pressed{filter:brightness(1.35);transform:scale(.95)}#hud>*{transition:opacity .15s}body.targeting #hud>*{opacity:.25;pointer-events:none!important}#hud-top{top:calc(var(--st) + 6px);left:calc(var(--sl) + 6px);pointer-events:none;align-items:flex-start;gap:6px;display:flex;position:fixed}#mm-wrap{pointer-events:auto;width:100px;height:100px;padding:3px;position:relative}#minimap{touch-action:none;background:#000;border-radius:7px;width:100px;height:100px;display:block}#mm-off{color:#9fb08f;text-align:center;pointer-events:none;flex-direction:column;justify-content:center;align-items:center;font-size:13px;font-weight:700;display:flex;position:absolute;inset:3px}#mm-off small{opacity:.7;margin-top:2px;font-size:9px;font-weight:400}#res-panel{min-width:150px;padding:5px 10px 6px}.res-row{white-space:nowrap;align-items:center;gap:5px;display:flex}.coin{color:#6b4a00;background:radial-gradient(circle at 35% 35%,#fff2a8,#e8b82a 60%,#a67a10);border-radius:50%;justify-content:center;align-items:center;width:20px;height:20px;font-size:12px;font-weight:900;display:inline-flex}#credits{color:#fff;font-variant-numeric:tabular-nums;min-width:52px;font-size:20px;font-weight:800}.res-lbl{opacity:.7;font-size:11px}.power-row{margin-top:2px;font-size:13px}.bolt{color:#6fd2ff;font-size:14px}#power-num{font-variant-numeric:tabular-nums}#power-tag{border-radius:5px;margin-left:2px;padding:0 5px;font-size:11px;font-weight:800}#power-tag.tense{color:#3a2600;background:#f2b632}#power-tag.low{color:#fff;background:#ff4a3a;animation:.6s steps(2,end) infinite blink}#power-bar{background:#0d1218;border-radius:4px;height:7px;margin-top:4px;overflow:hidden}#power-fill{background:#4fd2ff;width:0;height:100%;transition:width .2s,background .2s}#power-bar.tense #power-fill{background:#f2b632}#power-bar.low #power-fill{background:#ff4a3a}#clock{opacity:.55;font-variant-numeric:tabular-nums;margin-top:2px;font-size:10px}@keyframes blink{50%{opacity:.35}}#build-panel{top:calc(var(--st) + 6px);bottom:calc(var(--sb) + 6px);right:calc(var(--sr) + 6px);box-sizing:border-box;flex-direction:column;width:164px;padding:5px;display:flex;position:fixed}#tabs{gap:4px;margin-bottom:5px;display:flex}.tab{color:#b8c4d4;background:#ffffff0f;border-radius:8px;flex:1;height:32px;font-size:13px;font-weight:700;position:relative}.tab.active{background:var(--accent);color:#fff;box-shadow:inset 0 -3px #00000040}.tab .badge:not(:empty){color:#fff;background:#2fd27a;border-radius:8px;min-width:16px;height:16px;font-size:10px;line-height:16px;position:absolute;top:-5px;right:-3px}#build-grid{touch-action:pan-y;-webkit-overflow-scrolling:touch;scrollbar-width:none;flex:1;grid-template-columns:1fr 1fr;grid-auto-rows:74px;gap:5px;display:grid;overflow-y:auto}#build-grid::-webkit-scrollbar{display:none}.item{touch-action:pan-y;background:linear-gradient(#33435c,#222d3d);border:2px solid #44587a;border-radius:9px;flex-direction:column;justify-content:flex-start;align-items:center;padding-top:5px;display:flex;position:relative;overflow:hidden}body.f-red .item{background:linear-gradient(#4a3434,#2a1e1e);border-color:#6a4040}.item .ic{color:#fff;background:var(--accent);text-shadow:0 1px 2px #0009;border-radius:8px;justify-content:center;align-items:center;width:32px;height:32px;font-size:17px;font-weight:900;display:flex;box-shadow:inset 0 -3px #0000004d}.item .ic.inf{border-radius:50%}.item .nm{white-space:nowrap;margin-top:2px;font-size:11px}.item .ct{color:var(--gold);font-variant-numeric:tabular-nums;font-size:11px;font-weight:700}.item .prog{pointer-events:none;background:#78c8ff47;width:100%;height:0;position:absolute;bottom:0;left:0}.item .pct{text-shadow:0 2px 3px #000;pointer-events:none;justify-content:center;align-items:center;font-size:20px;font-weight:900;display:none;position:absolute;inset:0}.item .q{color:#8fe8ff;font-size:12px;font-weight:800;position:absolute;top:2px;right:4px}.item .tag{text-align:center;padding:2px 0;font-size:12px;font-weight:800;display:none;position:absolute;bottom:0;left:0;right:0}.item.st-building .pct{display:flex}.item.st-building .ic,.item.st-building .nm{opacity:.45}.item.st-ready{border-color:#3dff8a;animation:1s ease-in-out infinite readyPulse;box-shadow:0 0 10px #3dff8a99,inset 0 0 12px #3dff8a40}.item.st-ready .tag{color:#fff;background:#1fae5a;display:block}.item.st-ready .ct{visibility:hidden}@keyframes readyPulse{50%{box-shadow:0 0 3px #3dff8a4d,inset 0 0 6px #3dff8a26}}.item.st-nomoney .ct{color:#ff5a4a}.item.st-nomoney .ic{filter:grayscale(.6)brightness(.8)}.item.st-locked{opacity:.55}.item.st-locked .ic{background:#555!important}.item.st-locked .tag{white-space:nowrap;text-overflow:ellipsis;color:#ccc;background:#0000008c;font-size:9px;font-weight:400;display:block;overflow:hidden}.item.st-locked .ct{visibility:hidden}.item.st-busy,.item.st-full{opacity:.6}#bottom-left{left:calc(var(--sl) + 6px);bottom:calc(var(--sb) + 6px);gap:5px;display:flex;position:fixed}.round{background:radial-gradient(circle at 50% 35%,#3a4a62,#1c2534);border:2px solid #5a6e8e;border-radius:50%;flex-direction:column;justify-content:center;align-items:center;width:50px;height:50px;font-size:10px;font-weight:700;display:flex;position:relative;box-shadow:0 2px 6px #00000080}.round .ico{font-size:17px;line-height:18px}.round.grp b{font-size:19px;line-height:19px}.round.grp{background:radial-gradient(circle at 50% 35%,#3b5fa0,#1e3360);border-color:#6a8ed0}body.f-red .round.grp{background:radial-gradient(circle at 50% 35%,#a03b3b,#5a1e1e);border-color:#d06a6a}.round .cnt:not(:empty){background:#2a6ae0;border:2px solid #fff;border-radius:9px;min-width:17px;height:17px;font-size:10px;font-style:normal;line-height:13px;position:absolute;top:-4px;right:-4px}#unit-info{left:calc(var(--sl) + 284px);right:calc(var(--sr) + 180px);bottom:calc(var(--sb) + 6px);box-sizing:border-box;align-items:center;gap:6px;max-width:420px;height:54px;margin:0 auto;padding:0 6px;display:flex;position:fixed}#unit-info.empty{visibility:hidden}#ui-icon{background:var(--accent);border-radius:8px;flex:none;justify-content:center;align-items:center;width:42px;height:42px;font-size:20px;font-weight:900;display:flex;position:relative}#ui-count{text-shadow:0 1px 2px #000;font-size:12px;font-weight:900;position:absolute;bottom:-4px;right:-2px}#ui-main{flex:1;min-width:0}#ui-name{white-space:nowrap;text-overflow:ellipsis;font-size:14px;font-weight:800;overflow:hidden}#ui-name small{color:#8fe8ff;margin-left:4px;font-size:11px;font-weight:600}#ui-hpbar{background:#0d1218;border-radius:3px;height:6px;margin:3px 0 2px;overflow:hidden}#ui-hpfill{background:#4fe06a;width:100%;height:100%}#ui-sub{opacity:.75;white-space:nowrap;text-overflow:ellipsis;font-size:10px;overflow:hidden}.ui-btn{background:#33435c;border:2px solid #56709a;border-radius:9px;flex-direction:column;flex:none;justify-content:center;align-items:center;width:44px;height:44px;font-size:16px;line-height:17px;display:flex}.ui-btn span{font-size:9px;line-height:11px}.ui-btn.on{background:#d8662a;border-color:#ffb07a;box-shadow:0 0 8px #ff8c3cb3}.ui-btn.stop{background:#c8322a;border-color:#ff8a7a}#super-btn{right:calc(var(--sr) + 178px);bottom:calc(var(--sb) + 66px);background:radial-gradient(circle,#2a3a52,#121a26);border-radius:50%;width:64px;height:64px;position:fixed;box-shadow:0 2px 10px #0009}#super-btn svg{position:absolute;inset:0;transform:rotate(-90deg)}#super-btn .track{fill:none;stroke:#ffffff26;stroke-width:5px}#super-btn .arc{fill:none;stroke:#4fd2ff;stroke-width:5px;stroke-linecap:round;stroke-dasharray:176;stroke-dashoffset:176px}body.f-red #super-btn .arc{stroke:#ff7a3a}#super-ico{opacity:.6;justify-content:center;align-items:center;font-size:26px;display:flex;position:absolute;inset:0}#super-label{white-space:nowrap;text-shadow:0 1px 3px #000;font-size:11px;font-weight:800;position:absolute;bottom:-14px;left:50%;transform:translate(-50%)}#super-btn.ready{animation:.9s ease-in-out infinite superReady}#super-btn.ready #super-ico{opacity:1}@keyframes superReady{50%{box-shadow:0 0 22px #ffdc5af2}}#place-bar,#target-hint{top:calc(var(--st) + 8px);left:calc(var(--sl) + 300px + (100vw - var(--sl) - var(--sr) - 476px) / 2);white-space:nowrap;z-index:20;background:#0a0e14e0;border:2px solid #3dff8a;border-radius:24px;align-items:center;gap:8px;padding:6px 8px 6px 14px;font-size:13px;font-weight:700;display:flex;position:fixed;transform:translate(-50%)}#target-hint{border-color:#ff4a3a;font-size:15px}#place-bar button,#target-hint button{background:#1fae5a;border-radius:17px;height:34px;padding:0 16px;font-weight:800}#target-hint #btn-fire{background:#e0302a}#target-hint #btn-fire:disabled{opacity:.4}#place-bar button.ghost,#target-hint button.ghost{background:#ffffff24}#place-tip{opacity:.85;font-size:11px}#toast{top:calc(var(--st) + 56px);opacity:0;pointer-events:none;white-space:nowrap;z-index:30;background:#0a0e08d9;border:1px solid #6dff8e;border-radius:16px;padding:6px 14px;font-size:14px;transition:opacity .15s,transform .15s;position:fixed;left:50%;transform:translate(-50%)translateY(-6px)}#toast.show{opacity:1;transform:translate(-50%)translateY(0)}#debug{left:calc(var(--sl) + 112px);top:calc(var(--st) + 92px);opacity:.45;pointer-events:none;white-space:nowrap;font-variant-numeric:tabular-nums;font-size:9px;position:fixed}.overlay{z-index:50;box-sizing:border-box;background:radial-gradient(#1c281ef5,#080c08fa);flex-direction:column;justify-content:center;align-items:center;padding:10px;display:flex;position:fixed;inset:0}.overlay h1{letter-spacing:6px;text-shadow:0 3px 8px #000;margin:0;font-size:30px}.overlay .sub{opacity:.75;margin:4px 0 12px}.overlay .hint{opacity:.5;margin:10px 0 0;font-size:12px}.cards{gap:16px;display:flex}.card{text-align:left;border:3px solid;border-radius:14px;width:240px;padding:14px 16px;box-shadow:0 6px 18px #00000080}.card.blue{background:linear-gradient(160deg,#2f6fc0,#13294d);border-color:#cfe4ff}.card.red{background:linear-gradient(160deg,#a8261e,#1a1414);border-color:#2a2a2a}.card-title{font-size:22px;font-weight:900}.card-desc{opacity:.85;margin:2px 0 6px;font-size:13px}.card ul{opacity:.9;margin:0;padding-left:18px;font-size:12px;line-height:1.6}.result-box{text-align:center;background:#141c28eb;border:2px solid #4b6a9a;border-radius:16px;padding:18px 40px}#result.win h1{color:#ffd25e}#result.lose h1{color:#ff6a5a}.stats{justify-content:center;gap:26px;margin:14px 0 16px;display:flex}.stats div{opacity:.9;flex-direction:column;font-size:12px;display:flex}.stats b{font-variant-numeric:tabular-nums;font-size:24px}#btn-again{background:#1fae5a;border-radius:21px;height:42px;padding:0 30px;font-size:16px;font-weight:800}#rotate-hint{display:none}@media (orientation:portrait) and (width<=900px){#rotate-hint{z-index:100;background:#0d130c;flex-direction:column;justify-content:center;align-items:center;font-size:20px;font-weight:800;display:flex;position:fixed;inset:0}#rotate-hint .phone{border:4px solid #e8efe4;border-radius:9px;width:46px;height:80px;animation:1.8s ease-in-out infinite rot}@keyframes rot{0%,20%{transform:rotate(0)}60%,to{transform:rotate(-90deg)}}}@media (height<=380px){#build-grid{grid-auto-rows:66px}.item .ic{width:28px;height:28px;font-size:15px}.round{width:46px;height:46px}#unit-info{left:calc(var(--sl) + 262px)}}
