:root{color-scheme:dark;--ink:#eef0d9;--muted:#8ea3a0;--accent:#ffca77;--panel:#203c3e;--border:#46615a}*{box-sizing:border-box}body{margin:0;background:#101f24;background-image:radial-gradient(ellipse at 50% 30%,#29453e,transparent 75%);font:14px/1.5 -apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif;color:var(--ink);min-height:100svh}button{font:inherit;color:inherit;cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent}button:disabled{cursor:default;opacity:.5}button:focus-visible,canvas:focus-visible{outline:2px solid var(--accent);outline-offset:2px}[hidden]{display:none!important}h1,h2,h3,p{margin:0}.game-shell{max-width:520px;margin:auto;padding:0 13px 12px}header{height:57px;display:flex;align-items:center;justify-content:space-between}.brand{display:flex;align-items:center;gap:9px}.brand-icon{font-size:36px;line-height:1;color:var(--accent);text-shadow:0 2px 0 #9c693d}.brand h1{font-size:21px;letter-spacing:2px;line-height:1.15}.brand small{font:7px ui-monospace,monospace;letter-spacing:2px;color:#9bb1a0}.top-controls{display:flex;gap:7px}.top-controls button{background:#294244;border:1px solid #617565;border-radius:7px;min-height:31px;padding:3px 10px;font-size:11px}.hud{display:flex;align-items:center;gap:18px;background:#223b3c;border:1px solid var(--border);border-bottom:0;border-radius:12px 12px 0 0;padding:8px 12px}.vitals{flex:1;max-width:250px}.vitals>div{display:flex;align-items:center;gap:7px;height:17px}.vitals span{font-size:9px;color:#b0bba7}.vitals b{font:11px ui-monospace,monospace;width:22px;color:#f6ca8f}.meter{height:5px;background:#14292c;flex:1;border-radius:3px;overflow:hidden}.meter>i{display:block;height:100%;width:100%;background:#e9a36d;border-radius:3px}.shield b{color:#91cad3}.shield .meter>i{background:#7abfc6}.kill-stat,.time-stat{display:flex;flex-direction:column;align-items:center}.kill-stat strong{font:18px ui-monospace,monospace;color:#f0cc89}.time-stat strong{font:14px ui-monospace,monospace}.kill-stat span,.time-stat span{font-size:8px;color:#a7b9a8;margin-top:1px}.battlefield{position:relative;border:2px solid #516459;border-top:1px solid #426058;border-bottom:3px solid #0c171c;overflow:hidden;background:#607967;box-shadow:0 5px 20px #050e1344}canvas{display:block;width:100%;aspect-ratio:540/780;max-height:calc(100svh - 251px);touch-action:none;outline:0}.field-caption{position:absolute;top:9px;left:50%;transform:translateX(-50%);font-size:10px;letter-spacing:.5px;white-space:nowrap;color:#eee4bf;background:#152d34b8;border:1px solid #9eae7f77;border-radius:15px;padding:4px 13px;pointer-events:none}.overlay{position:absolute;inset:0;z-index:4;display:flex;align-items:center;justify-content:center;padding:17px;background:#102a32a8;backdrop-filter:blur(2px)}.start-card,.pause-card,.result-card,.upgrade-panel{width:100%;max-width:315px;text-align:center}.eyebrow{font:9px ui-monospace,monospace;letter-spacing:2px;color:#c9cba0}.hero-emblem{font-size:61px;line-height:1.2;color:#ffce7a;text-shadow:0 4px 0 #8e693e;margin:12px 0 10px}.start-card h2{font-size:31px;line-height:1.4;letter-spacing:2px;color:#fff2c9}.start-card p{font-size:12px;line-height:1.9;color:#c2d0bd;margin:15px 0 24px}.primary{background:#f0bd6f;color:#343c34;border:1px solid #ffd48a;border-bottom:4px solid #ad7a46;min-height:46px;width:100%;border-radius:9px;font-weight:700;padding:10px 17px;font-size:14px}.primary:hover{background:#ffd087}.primary span{margin-left:36px}.start-card>small{display:block;color:#afc1b0;font-size:9px;margin-top:12px}.progress-strip{display:flex;align-items:center;gap:12px;background:#203b3d;border:1px solid var(--border);border-top:0;border-radius:0 0 10px 10px;padding:7px 10px;margin-bottom:9px}.xp-panel{flex:1;min-width:0}.xp-panel>span{display:block;color:#cecfac;font:10px ui-monospace,monospace}.xp-panel b{margin-left:3px;font-size:13px;color:#f3cd85}.xp-panel small{float:right;color:#8ba898;font:8px ui-monospace,monospace}.xp-track{height:5px;border-radius:4px;background:#132a2c;margin-top:5px;overflow:hidden}.xp-track i{display:block;height:100%;width:0;background:#b4d78e}#skill{display:flex;align-items:center;gap:7px;text-align:left;border:1px solid #aa9d65;background:#666344;border-bottom:3px solid #454b35;border-radius:7px;min-width:124px;min-height:36px;padding:3px 10px}#skill>span{font-size:24px;line-height:1;color:#ffdc83}#skill b{font-size:10px;color:#fff0bc;display:block}#skill small{font-size:7px;color:#ddd9a6;display:block}.weapons{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.weapons button{display:flex;align-items:center;gap:8px;border:1px solid #516960;border-bottom:3px solid #152b2e;background:#294145;border-radius:7px;text-align:left;padding:6px 8px;position:relative;min-height:43px}.weapons button.selected{background:#4b5140;border-color:#dab775;border-bottom-color:#a67f49;box-shadow:inset 0 0 0 1px #f1d88d33}.weapons i{font-style:normal;display:grid;place-items:center;width:25px;font-size:25px;line-height:1;color:var(--weapon-color);text-shadow:0 2px #0c1c2255}.weapons b{font-size:11px;font-weight:600;display:block;color:#e5e4c6;white-space:nowrap}.weapons small{display:block;font-size:7px;color:#a7b6a1;white-space:nowrap;margin-top:1px}.weapons em{margin-left:auto;font:7px ui-monospace,monospace;color:#b4ba98;align-self:flex-start;padding-top:2px}footer{margin-top:8px;font-size:8px;color:#99ae9e;display:flex;flex-direction:column;gap:3px}footer>span+span{font-size:7px;color:#697f7a}.pause-card h2,.result-card h2,.upgrade-panel h2{font-size:29px;line-height:1.5;color:#ffe3a7;margin:8px 0}.pause-card p,.result-card p,.upgrade-panel>p{font-size:11px;line-height:1.8;color:#beccbb;margin:10px 0 22px}.upgrade-panel>p{margin:3px 0 18px}.upgrade-panel{max-width:340px}#upgrade-choices{display:flex;flex-direction:column;gap:9px}#upgrade-choices button{display:flex;align-items:center;gap:12px;text-align:left;background:#2d4a4b;border:1px solid #7f9575;border-bottom:3px solid #152d31;border-radius:9px;padding:13px;min-height:64px}#upgrade-choices button:hover{background:#3d5c54}#upgrade-choices i{font:17px ui-monospace,monospace;color:#d5ba7a}#upgrade-choices b{display:block;font-size:13px;color:#ffe3aa}#upgrade-choices small{display:block;font-size:9px;color:#b0c2ae;margin-top:3px}#upgrade-choices em{margin-left:auto;font-style:normal;color:#d8ca95}.report{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;margin:0 0 23px;padding:14px 0;border-top:1px solid #687b5f;border-bottom:1px solid #687b5f}.report strong{display:block;font:24px ui-monospace,monospace;color:#e2c58b}.report small{font-size:8px;color:#9fb5a3;display:block;margin-top:4px}.guide-layer{align-items:flex-start;padding:12px;background:#172f36f5;backdrop-filter:blur(7px)}.guide-panel{width:100%;height:100%;overflow:auto;padding:0 6px 10px;scrollbar-width:thin}.guide-heading{display:flex;justify-content:space-between;align-items:center;margin:3px 0 12px}.guide-heading h2{font-size:20px;color:#f8d897}.guide-heading button{font-size:24px;line-height:1;background:#31504c;border:1px solid #627c67;border-radius:6px;width:32px;height:32px}.guide-panel>p{font-size:10px;color:#b9cbbb;line-height:1.8}.guide-panel h3{font-size:12px;color:#d0cda4;margin:15px 0 7px}.guide-row{display:flex;gap:9px;font-size:10px;border-bottom:1px solid #54706144;padding:6px 0}.guide-row b{min-width:68px;font-weight:500;color:#d5bf92}.guide-row span{font-size:9px;color:#a8beb1;line-height:1.7}.guide-panel>small{font-size:8px;color:#6f8e85;display:block;margin-top:17px}.toast{position:fixed;z-index:9;bottom:18px;left:50%;transform:translateX(-50%);padding:8px 14px;border-radius:7px;border:1px solid #bdac72;background:#eee4b8;color:#3e5648;font-size:11px;pointer-events:none;opacity:0;transition:opacity .15s}.toast.visible{opacity:1}@media(min-width:700px){.game-shell{width:clamp(330px,calc((100svh - 315px)*.6923 + 26px),520px)}.start-card h2{font-size:31px}canvas{max-height:none}}@media(max-width:350px){.game-shell{padding:0 8px 9px}header{height:49px}.brand h1{font-size:18px}.hud{padding:6px 9px;gap:12px}.weapons{gap:5px}.weapons button{gap:4px;padding:5px;min-height:40px}.weapons i{width:20px;font-size:22px}.weapons b{font-size:10px}.weapons small{font-size:6px}.weapons em{font-size:6px}.progress-strip{gap:9px;padding:6px 8px}.start-card h2{font-size:27px}.start-card p{font-size:11px;margin:10px 0 17px}.hero-emblem{font-size:47px;margin:6px 0}.start-card .primary{min-height:42px}canvas{max-height:calc(100svh - 235px)}footer{font-size:7px}#skill{min-width:115px}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{transition:none!important}}
.top-controls #sound{font-size:10px;padding:3px 8px}.top-controls #sound.muted{opacity:.6}
.weapons i svg{width:31px;height:25px;overflow:visible}.result-card .lesson{font-size:9px;color:#a5bda9;text-align:left;line-height:1.8;margin:-5px 0 17px}.result-card .report{margin-bottom:16px}@media(max-width:350px){.weapons i svg{width:24px;height:22px}.result-card .lesson{font-size:8px}}
.enemy-row{align-items:center;gap:7px}.enemy-row canvas{width:37px;height:37px;aspect-ratio:1;max-height:none;flex-shrink:0;border-radius:7px;border:1px solid #82947355;touch-action:auto}.enemy-row b{min-width:60px}.enemy-row span{flex:1}
@media(max-width:350px){footer>span+span{display:none}footer{margin-top:4px;font-size:6px;line-height:1.3}.game-shell{padding-bottom:5px}}
@media(min-width:700px) and (max-height:760px){#world{width:auto;height:max(270px,calc(100svh - 310px));max-width:100%;max-height:none;margin-inline:auto;aspect-ratio:540/780}.start-card .hero-emblem{display:none}.start-card h2{font-size:25px}.start-card p{font-size:10px;margin:10px 0 15px}.start-card>small{margin-top:8px;font-size:8px}.primary{min-height:40px;font-size:12px}.result-card .lesson{display:none}.result-card h2,.upgrade-panel h2{font-size:23px;margin:3px 0}.result-card>p{margin:4px 0 12px;font-size:10px}.result-card .report{padding:8px 0;margin:8px 0 14px}.report strong{font-size:21px}.upgrade-panel>p{margin:3px 0 10px}#upgrade-choices button{min-height:54px;padding:9px}.guide-panel h3{margin-top:10px}}
.guide-heading{position:sticky;top:0;z-index:1;background:#172f36;padding:6px 0;margin:0 0 10px}
.wallet{display:flex;align-items:center;gap:7px;min-width:75px}.wallet>i{font-style:normal;font-size:23px;color:#f5cb77;text-shadow:0 2px #9c7547}.wallet strong{display:block;font:700 22px ui-monospace,monospace;color:#ffdc92;line-height:1.1}.wallet small{font-size:7px;color:#a7b8a5;display:block;margin-top:3px}.rental{flex:1;min-width:0}.rental>b{display:block;font-size:10px;color:#e4d9ac}.rental>span{display:block;font:8px ui-monospace,monospace;color:#a5bdac;margin-top:2px}.rental-track{height:4px;overflow:hidden;background:#13282b;border-radius:4px;margin-top:4px}.rental-track i{height:100%;display:block;background:#e8c279;transition:width .1s linear}.rental.ending>span{color:#ffa18b}.rental.ending .rental-track i{background:#ee9979}.progress-strip{gap:10px}.weapons button{min-height:49px}.weapons button.poor{opacity:.58}.weapons button:disabled{opacity:.7}.weapons button.selected{opacity:1}.weapons em{font-size:8px;color:#edc57f;font-style:normal;white-space:nowrap}.weapons button span{min-width:0}.weapons i svg{width:27px}.weapons i{width:25px;flex-shrink:0}.weapons button{padding:5px 6px;gap:5px}.weapons small{font-size:7px}.weapons em{position:absolute;right:5px;top:4px}.weapons b{margin-top:7px}.weapons small{margin-top:2px}#skill{min-width:96px;padding-inline:7px}#skill small{font-size:7px}.start-card>small{line-height:1.7}@media(max-width:350px){.wallet{min-width:66px;gap:4px}.wallet strong{font-size:19px}.wallet small{font-size:6px}.rental>b{font-size:9px}.rental>span{font-size:6px}#skill{min-width:78px;padding-inline:4px;gap:3px}#skill>span{font-size:20px}#skill small{font-size:6px}.progress-strip{gap:6px}.weapons button{padding:5px 4px;gap:3px;min-height:46px}.weapons i{width:20px}.weapons em{font-size:7px;right:4px}.weapons b{font-size:9px}.weapons small{font-size:6px}#world{max-height:calc(100svh - 255px)}}
.stage-notice{position:absolute;left:50%;top:14%;transform:translateX(-50%);max-width:90%;white-space:nowrap;border:1px solid #e2b66f;background:#223c3be8;color:#ffdb97;border-radius:8px;padding:10px 16px;text-align:center;font-weight:600;font-size:13px;pointer-events:none;box-shadow:0 5px 20px #152a2855;z-index:2}@media(max-width:350px){.stage-notice{font-size:11px;padding:8px 12px}}
.game-shell{padding-bottom:8px}@media(max-width:350px){.game-shell{padding-bottom:4px}}
@media(max-width:350px){#world{max-height:calc(100svh - 275px)}}
@media(min-width:700px){.game-shell{width:clamp(330px,calc((100svh - 350px)*.6923 + 26px),520px)}}
@media(min-width:700px) and (max-height:760px){#world{height:max(270px,calc(100svh - 330px))}}

/* Supply controls and visible renewal state, kept below the battlefield. */
.supply-strip{display:flex;gap:10px;align-items:center;justify-content:space-between;margin:-3px 0 7px;min-height:32px}.supply-strip button{display:flex;gap:6px;align-items:center;border:1px solid #69a2ad;border-radius:6px;background:#29484d;padding:5px 10px;min-height:32px;color:#c6eced}.supply-strip button>span{font-size:19px;line-height:1}.supply-strip b{font-size:10px;font-weight:500}.supply-strip small{font-size:8px;line-height:1.5;text-align:right;color:#a7b9ae}.supply-strip .poor{opacity:.6}.weapons button{touch-action:manipulation;user-select:none;-webkit-user-select:none}.weapons button.auto-renewing{border-color:#89ded2;background:#30544f}.weapons .auto-badge{position:absolute;left:4px;top:2px;font-size:6px;color:#baf4df;font-weight:500}.weapons button.auto-renewing em{color:#baf4df}.rental>span{line-height:1.6;font-family:inherit;font-size:8px}#world{max-height:calc(100svh - 304px)}
@media(max-width:350px){.supply-strip{gap:5px;min-height:30px;margin-bottom:5px}.supply-strip small{font-size:7px}.supply-strip button{padding:4px 7px;min-height:30px}.supply-strip b{font-size:9px}#world{max-height:calc(100svh - 319px)}}
@media(min-width:700px){.game-shell{width:clamp(330px,calc((100svh - 390px)*.6923 + 26px),520px)}#world{max-height:none}}
@media(min-width:700px) and (max-height:760px){#world{height:max(235px,calc(100svh - 370px))}}

.loadout{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;margin:-3px 0 8px}.equipped-card{position:relative;border:1px dashed #526b61;border-radius:6px;min-width:0;background:#1c3436}.equipped-card.occupied{border-style:solid;border-color:var(--slot-color);background:#294247}.equipped-card.renewing{background:#2c5149;box-shadow:inset 0 -2px #83cdbb}.equipped-gun{display:block;width:100%;border:0;background:none;text-align:left;padding:6px 5px;min-height:57px;user-select:none;-webkit-user-select:none;touch-action:manipulation}.equipped-gun:disabled{opacity:1}.equipped-gun>b{display:block;color:var(--slot-color);font-size:10px;padding-right:14px;line-height:1.5}.equipped-gun>span{display:block;font-size:8px;line-height:1.7;color:#e2dfbd;white-space:nowrap}.equipped-gun>small{display:block;font-size:7px;line-height:1.5;color:#91b3a8}.remove-gun{position:absolute;right:2px;top:1px;background:#1a3032;border:0;border-radius:3px;font-size:14px;line-height:1;min-width:21px;min-height:23px;color:#b0c5b8;padding:2px}#world{max-height:calc(100svh - 370px)}
@media(max-width:350px){.loadout{gap:4px;margin-bottom:6px}.equipped-gun{padding:5px 4px;min-height:53px}.equipped-gun>b{font-size:9px}.equipped-gun>span{font-size:7px}.equipped-gun>small{font-size:6px}#world{max-height:calc(100svh - 383px)}}
@media(min-width:700px){.game-shell{width:clamp(330px,calc((100svh - 450px)*.6923 + 26px),520px)}#world{max-height:none}}
@media(min-width:700px) and (max-height:760px){#world{height:max(220px,calc(100svh - 430px))}.start-card .hero-emblem{display:none}.start-card h2{font-size:23px}.start-card p{margin:7px 0 10px}.start-card>small{margin-top:5px}}

@media(min-width:351px) and (max-width:699px){#world{max-height:calc(100svh - 425px)}}
@media(max-width:350px){.start-card .hero-emblem{display:none}.start-card h2{font-size:24px}.start-card p{font-size:10px;margin:8px 0 12px}.start-card>small{font-size:8px;margin-top:7px}}

#skill.poor:not(:disabled){background:#3a4942;border-color:#6c7760}#skill small{white-space:nowrap}

/* Two persistent control rows; weapon purchasing lives in the paused armory. */
.combat-bar{display:grid;grid-template-columns:minmax(56px,.7fr) minmax(0,1fr) minmax(0,1.1fr);gap:6px;align-items:center;border:1px solid var(--border);border-top:0;background:#203b3d;border-radius:0 0 9px 9px;padding:7px 8px;margin-bottom:7px;min-height:51px}.combat-bar .wallet{min-width:0;gap:5px}.combat-bar .wallet strong{font-size:22px}.combat-bar .wallet i{font-size:19px}.combat-bar button{border:1px solid #70948a;border-radius:6px;background:#2c4949;min-height:35px;padding:4px;color:#c7e4d6}.combat-bar #buy-shield b{font-size:9px;white-space:nowrap;font-weight:500}.combat-bar #skill{display:block;min-width:0;text-align:center;border:1px solid #a99d64;background:#636344;min-height:35px;padding:3px 4px}.combat-bar #skill b{font-size:10px}.combat-bar #skill small{font-size:7px}.combat-bar .poor{opacity:.65}.combat-bar #skill.poor:not(:disabled){background:#3a4942;border-color:#6c7760}.loadout{margin:0;gap:5px}.equipped-gun{min-height:57px}.game-shell{padding-bottom:8px}.top-controls{gap:4px}.top-controls button{padding:3px 7px;font-size:10px;min-height:31px}.brand h1{font-size:19px}.brand-icon{font-size:32px}.shop-layer{padding:10px;background:#172f36f5;align-items:stretch;backdrop-filter:blur(5px)}.shop-panel{width:100%;overflow:auto;scrollbar-width:thin}.shop-panel .guide-heading{margin-bottom:7px}.shop-panel h2{font-size:20px;color:#f8d897}.shop-panel .guide-heading small{font-size:8px;color:#a7b9a5}.shop-help{font-size:9px;color:#c7d4bb;line-height:1.8;margin-bottom:10px}.shop-panel .weapons{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.shop-panel .weapons button{min-height:54px}.shop-panel .weapons b{font-size:11px}.shop-panel #weapon-hint{font-size:9px;line-height:1.7;color:#d7cb9d;margin:9px 0}.shop-specs>div{display:flex;gap:8px;border-top:1px solid #52706144;padding:6px 0;font-size:9px;line-height:1.7}.shop-specs b{min-width:43px;font-weight:500}.shop-specs span{color:#adc1b3}.game-shell #world{height:auto;max-height:calc(100svh - 254px);width:100%}
@media(max-width:350px){header{height:49px}.brand h1{font-size:17px}.brand-icon{font-size:29px}.brand{gap:5px}.top-controls{gap:3px}.top-controls button{padding:3px 5px;font-size:9px}.top-controls #sound{padding:3px 5px;font-size:9px}.combat-bar{gap:4px;padding:6px;min-height:47px;margin-bottom:6px}.combat-bar .wallet strong{font-size:19px}.combat-bar #buy-shield b{font-size:8px}.equipped-gun{min-height:53px}.game-shell #world{max-height:calc(100svh - 232px)}.start-card .hero-emblem{display:block}}
@media(min-width:700px){.game-shell{width:clamp(330px,calc((100svh - 270px)*.6923 + 26px),520px)}.game-shell #world{max-height:calc(100svh - 254px)}}
