@charset "UTF-8";
:root{font-family:"Microsoft YaHei UI","PingFang SC",system-ui,sans-serif;color:#3e5747;background:#d6e9be;font-synthesis:none;--ink:#3e5747;--paper:#fff9e8;--line:#b8c49c;--green:#477c63;--gold:#f6cd76}
*{box-sizing:border-box}html,body{width:100%;height:100%;margin:0;overflow:hidden;overscroll-behavior:none}body{display:flex;justify-content:center;background:radial-gradient(ellipse at 25% 25%,#edf1d4,transparent 60%),#c8d9b2}button{font:inherit;color:inherit;cursor:pointer;-webkit-tap-highlight-color:transparent;touch-action:manipulation;user-select:none}button:disabled{cursor:default;filter:saturate(.45);opacity:.55}button:focus-visible,[tabindex]:focus-visible{outline:3px solid #ca7438;outline-offset:-3px}button:not(:disabled):active{transform:translateY(2px);box-shadow:none!important}[hidden]{display:none!important}
.machine{position:relative;isolation:isolate;width:100%;max-width:480px;height:100%;height:100dvh;display:flex;flex-direction:column;background:var(--paper);overflow:hidden;padding-top:env(safe-area-inset-top);padding-bottom:env(safe-area-inset-bottom);padding-left:env(safe-area-inset-left);padding-right:env(safe-area-inset-right);box-shadow:0 0 80px #385b4525}
.hud{flex:0 0 66px;display:flex;align-items:center;gap:14px;padding:8px 12px;background:#fff9e8;z-index:2;border-bottom:1px solid #dce0c3}.wave-stat{min-width:76px}.wave-stat>span,.score-stat>span{display:block;font-size:10px;font-weight:700;letter-spacing:.5px;color:#77826c}.wave-stat>strong{display:block;font-size:25px;line-height:1.15;color:#477861;font-weight:900}.wave-stat i{font-size:12px;font-style:normal;font-weight:600;color:#929a7d}.health-stat{flex:1;min-width:64px}.health-stat>div:first-child{display:flex;align-items:center;justify-content:space-between;gap:4px;margin-bottom:5px}.health-stat span{color:#e58575;font-size:16px}.health-stat b{font-size:11px;white-space:nowrap;font-variant-numeric:tabular-nums}.health-track{height:9px;border-radius:10px;background:#e9e1c8;overflow:hidden}.health-track>div{height:100%;border-radius:10px;background:#f29d8a;transition:width .2s}.score-stat{text-align:right;min-width:48px}.score-stat strong{display:block;font-size:16px;letter-spacing:.3px;font-variant-numeric:tabular-nums;line-height:1.5}.icon-button{width:44px;height:44px;flex-shrink:0;border:1.5px solid #cfceab;border-radius:14px;background:#f3efd7;font-size:23px;box-shadow:0 2px 0 #d8d6b6}
.chapter{height:29px;gap:8px;flex-shrink:0;padding:0 14px;display:flex;align-items:center;justify-content:space-between;font-size:11px;font-weight:700;background:#edf1d7;color:#688366;border-bottom:1px solid #c5d3aa}.edition{font-size:10px;color:#8a987b}.edition b{font-size:9px;font-weight:500;margin-left:5px}.chapter-dots{display:flex;gap:4px;align-items:center}.chapter-dots i{display:block;width:7px;height:7px;border-radius:50%;background:#c5d2ad;border:1px solid #a7bd96}.chapter-dots i:first-child{background:#e9ad5e;border-color:#d59347}.chapter-dots i.done{background:#6c9c79;border-color:#4e7e61}
.stage{position:relative;flex:1;min-height:0;overflow:hidden;background:#c8dd9d;touch-action:none}.stage canvas{position:absolute;inset:0;width:100%;height:100%;display:block;touch-action:none;outline:none}.arena-top{position:absolute;top:9px;left:12px;right:12px;display:flex;justify-content:space-between;pointer-events:none;font-size:10px;font-weight:700;color:#5f7a52}.arena-top span{border-radius:20px;background:#ffffeac7;padding:4px 8px;box-shadow:0 1px 3px #506d4310}.mission-note{position:absolute;bottom:9px;left:50%;transform:translateX(-50%);width:36px;height:36px;border-radius:50%;font-size:0;color:transparent;background:#fffbe9b8;border:2px solid #a9bd8e;pointer-events:none}.mission-note::before{content:"✦";position:absolute;inset:0;display:grid;place-items:center;font-size:19px;color:#799768}.mission-note::after{content:"";position:absolute;inset:-6px;border:1px dashed #aec296;border-radius:50%;animation:orbit 5s linear infinite}@keyframes orbit{to{transform:rotate(360deg)}}.boss-hud{position:absolute;z-index:1;top:38px;left:15%;width:70%;padding:7px 10px;border:1px solid #f9f2d9;border-radius:12px;background:#fff8eae8;box-shadow:0 3px 12px #506d4320}.boss-hud>div:first-child{display:flex;justify-content:space-between;font-size:10px;margin-bottom:5px}.boss-hud b{color:#ab6656}.boss-track{height:6px;border-radius:8px;overflow:hidden;background:#e6d3b7}.boss-track i{display:block;height:100%;background:#ed917e;transition:width .12s}.toast{position:absolute;top:18%;left:50%;width:max-content;max-width:88%;transform:translate(-50%,-6px);padding:10px 16px;opacity:0;border:2px solid #fff8df;background:#4f7d65ed;box-shadow:0 5px 0 #315f4b20;border-radius:20px;font-size:12px;font-weight:700;color:#fffbe6;white-space:pre-line;text-align:center;pointer-events:none;transition:opacity .2s,transform .2s;z-index:3}.toast.visible{opacity:1;transform:translate(-50%,0)}.hit-counter{position:absolute;right:16px;bottom:36px;display:flex;align-items:baseline;gap:5px;opacity:0;transform:scale(.8);transition:opacity .1s,transform .08s;pointer-events:none;color:#fffcdf;text-shadow:2px 2px #947044,-1px -1px #947044}.hit-counter b{font:900 italic 24px system-ui}.hit-counter span{font-size:12px;font-weight:800}.hit-counter.visible{opacity:1;transform:scale(1)}
.control-deck{flex:0 0 auto;background:#fff8e5;padding:0 12px;box-shadow:0 -3px 0 #fff9e8,0 -6px 16px #5c775720;z-index:2;border-radius:20px 20px 0 0}.ammo-bar{display:flex;align-items:center;gap:8px;height:48px;position:relative}.ammo-bar>span{font-size:11px;font-weight:700;white-space:nowrap}.ammo-bar>b{font-size:11px;white-space:nowrap;min-width:32px;text-align:center;font-variant-numeric:tabular-nums}#ammo-pips{display:flex;gap:4px;flex:1;min-width:0}#ammo-pips i{height:10px;min-width:3px;flex:1;max-width:18px;border-radius:5px;background:#f0bc64;box-shadow:inset 0 2px #ffda93,0 1px #c99648}#ammo-pips i.empty{background:#e8e3c9;box-shadow:inset 0 1px 1px #d3cbb0}#reload{height:44px;min-width:58px;background:transparent;border:0;color:#7c8060;font-size:12px;font-weight:700}#reload-track{position:absolute;bottom:0;left:0;right:0;height:2px;overflow:hidden;background:#e8e3cc}#reload-fill{height:100%;display:block;background:#dcad55;width:0}
.control-row{height:116px;display:flex;align-items:center;gap:13px;padding-top:5px}.stick-column{position:relative;flex:0 0 118px;text-align:center;height:110px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px}#joystick{position:relative;width:84px;height:84px;border-radius:50%;border:2px solid #d2d7b4;background:radial-gradient(circle,#f8f5dd 39%,#e4e9cd 40%,#f1f0d9 65%,#d8dfba 66%,#eff1d5 69%);box-shadow:inset 0 3px 5px #61754d0e;touch-action:none;user-select:none;cursor:grab}#joystick.active{border-color:#83a981;background:#e5ebcb}.stick-arrows{position:absolute;inset:0;display:grid;place-items:center;font-size:75px;line-height:1;color:#afbc96;font-weight:200}#stick-knob{position:absolute;left:50%;top:50%;width:48px;height:48px;margin:-24px;border:2px solid #5e9478;border-radius:50%;display:grid;place-items:center;background:linear-gradient(#a8cba1,#88b38c);box-shadow:0 4px 0 #669178,0 7px 10px #5c795333;will-change:transform}#stick-knob i{font-size:24px;font-style:normal;color:#f7f6d4;text-shadow:0 1px #7b9f75}#status{font-size:10px;line-height:15px;white-space:nowrap;color:#8a8f70}.abilities{flex:1;display:grid;grid-template-columns:1fr 1fr;gap:9px;min-width:0}.abilities>button{position:relative;min-width:0;height:89px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;border-radius:19px;border:2px solid;box-shadow:0 4px 0;overflow:hidden}.heavy-button{background:#ffe4a0;border-color:#dab768!important;box-shadow:0 4px 0 #d4ae60!important;color:#86663a}.pulse-button{background:#deeed0;border-color:#a6c3a0!important;box-shadow:0 4px 0 #99b796!important;color:#5a8160}.ability-icon{font-size:25px;line-height:28px}.abilities b{font-size:13px}.abilities small{font-size:10px;line-height:15px;white-space:nowrap}#energy{position:absolute;top:5px;right:7px;font-size:8px;opacity:.8}.utility-bar{height:44px;display:flex;border-top:1px solid #e9e4ce}.utility-bar button{flex:1;min-width:0;border:0;background:transparent;font-size:11px;min-height:44px;color:#8a8f72}.utility-bar button[aria-pressed=true]{color:#477c63;font-weight:700}
.overlay{position:absolute;inset:0;z-index:10;display:flex;align-items:center;justify-content:center;padding:22px 18px;background:#41654350;backdrop-filter:blur(3px);overflow:auto;overscroll-behavior:contain}.story-card{display:flex;align-items:center;gap:12px;margin:-4px 0 17px;padding:10px 12px;text-align:left;border-radius:18px;background:linear-gradient(135deg,#e8f0d9,#fff2c9);border:1px solid #d2ddb8}.story-icon{width:43px;height:43px;display:grid;place-items:center;flex:0 0 43px;border-radius:14px;background:#fffbe7;font-size:26px;box-shadow:0 2px 0 #c8d6b2}.story-card b,.story-card strong,.story-card span{display:block}.story-card b{font-size:9px;letter-spacing:1px;color:#9b9f7b}.story-card strong{font-size:15px;color:#4d765b;line-height:1.5}.story-card span{font-size:10px;color:#748569;line-height:1.5}.modal{width:100%;max-width:372px;max-height:100%;overflow:auto;border:3px solid #fffef0;border-radius:29px;background:#fff9e8;padding:26px 22px 22px;text-align:center;box-shadow:0 8px 0 #536f3923,0 20px 60px #364e3b26}.eyebrow{font-size:10px;font-weight:800;letter-spacing:1.8px;color:#8b9b76}.modal-emblem{margin:18px auto 14px;width:70px;height:70px;background:#e4ecd0;border:2px solid #c7d6ad;border-radius:23px;color:#6b9769;font-size:46px;line-height:66px;transform:rotate(-5deg)}h2{font-size:24px;letter-spacing:-.8px;line-height:1.4;margin:12px 0 10px;color:#47735a}p{font-size:13px;line-height:1.9;color:#839071;margin:0 0 19px}.start-button{width:100%;min-height:52px;padding:12px;border:2px solid #ceac5d;border-radius:16px;background:#f7d581;box-shadow:0 4px 0 #c9ac67;color:#795f31;font-size:16px;font-weight:800}.modal-hint{display:block;margin-top:18px;font-size:10px;line-height:1.9;color:#9a9f81}.touch-guide{display:flex;gap:9px;margin:18px 0}.touch-guide>div{flex:1;padding:12px 4px;border:1px solid #e0e5c6;border-radius:16px;background:#f1f1d9}.touch-guide b{display:block;font-size:26px;color:#84a577}.touch-guide span{font-size:11px;line-height:1.8;font-weight:700;color:#6c805d}.choice{display:flex;align-items:center;gap:12px;text-align:left;width:100%;min-height:102px;margin:10px 0;padding:14px 12px;border:1.5px solid #d4dcb9;border-radius:18px;background:#f2f2db;box-shadow:0 3px 0 #e3e6ca}.choice:nth-of-type(2){background:#fff0ce;border-color:#e3d3a1;box-shadow:0 3px 0 #ede2bd}.choice:nth-of-type(3){background:#e8efe1;border-color:#bed3b8;box-shadow:0 3px 0 #d6e2cd}.choice-icon{width:36px;flex:0 0 36px;height:44px;display:grid;place-items:center;font-size:31px;color:#829766}.choice>span:nth-child(2){flex:1;min-width:0}.choice strong{display:flex;align-items:center;justify-content:space-between;font-size:15px;line-height:1.5;color:#4c7158}.choice-tag{font-size:9px;font-weight:500;padding:1px 5px;border:1px solid #a4b99677;border-radius:6px;color:#8c9b75}.choice small{display:block;margin-top:4px;font-size:12px;line-height:1.65;color:#607a54;font-weight:700}.choice .detail{display:block;font-size:10px;line-height:1.6;color:#949b78;margin-top:2px;font-weight:400}.choice-key{display:none}.upgrade-modal{padding:25px 17px 20px}.upgrade-modal h2{font-size:24px}.upgrade-modal p{font-size:11px;margin-bottom:17px}.result-stats{display:flex;gap:6px;margin:22px 0}.result-stats>div{flex:1;padding:13px 4px;background:#f1f1d9;border-radius:13px}.result-stats b{display:block;color:#759568;font-size:21px}.result-stats small{font-size:10px;color:#8e997c}.pause-build{padding:13px;background:#f0f0d8;border-radius:14px;margin:15px 0;text-align:left}.pause-build b{font-size:11px;color:#7e9069}.build{display:flex;flex-wrap:wrap;gap:5px;margin:8px 0}.build span{font-size:10px;color:#789060;border-radius:7px;padding:4px 6px;background:#ffffec}.pause-build p{font-size:11px;margin:0;color:#8d967b}
@media(min-width:600px){.machine{height:calc(100dvh - 24px);max-height:960px;margin:auto;border:6px solid #f8f3df;border-radius:28px}.overlay{border-radius:22px}body{padding:12px}.machine:fullscreen{height:100dvh;max-height:none;max-width:480px;margin:auto;border-radius:0}.machine:fullscreen::backdrop{background:#d6e9be}}
@media(max-width:350px){.hud{gap:9px;padding:8px 9px}.wave-stat{min-width:68px}.wave-stat>span{font-size:9px}.health-stat b{font-size:10px}.score-stat{min-width:41px}.score-stat strong{font-size:14px}.control-deck{padding:0 9px}.control-row{gap:7px}.stick-column{flex-basis:102px}.abilities{gap:6px}.abilities b{font-size:12px}.abilities small{font-size:9px}#ammo-pips{gap:3px}.ammo-bar{gap:5px}.overlay{padding:15px 12px}.modal{padding:21px 16px}.choice{gap:8px;padding:11px 9px}.choice-icon{flex-basis:29px;width:29px}.choice small{font-size:11px}}
@media(max-height:700px){.hud{flex-basis:56px}.chapter{height:24px}.control-row{height:100px}.stick-column{height:96px}#joystick{width:72px;height:72px}.stick-arrows{font-size:63px}#stick-knob{width:44px;height:44px;margin:-22px}.abilities>button{height:78px}.ammo-bar{height:44px}.modal-emblem{margin:10px auto;width:54px;height:54px;line-height:50px;font-size:36px}.modal{padding-top:18px;padding-bottom:17px}.modal h2{font-size:21px;margin:8px 0}.modal p{margin-bottom:12px}.touch-guide{margin:10px 0}.touch-guide>div{padding:7px}.modal-hint{margin-top:12px}.choice{min-height:88px;margin:8px 0;padding-top:10px;padding-bottom:10px}.upgrade-modal p{margin-bottom:8px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{transition:none!important}.hit-counter{transform:none!important}}

/* v0.6 visual declutter: icons and numbers carry the UI; helper copy remains in ARIA only. */
.mission-note,.arena-top,#status,#ammo-label,.abilities small,#reload-track{display:none!important}.control-deck{padding-top:4px}.ammo-bar{height:42px}.control-row{height:108px}.utility-bar button{font-size:0}.utility-bar button::after{font-size:21px;line-height:1}.utility-bar button:nth-child(1)::after{content:"↻"}.utility-bar button:nth-child(2)::after{content:"♫"}.utility-bar button:nth-child(3)::after{content:"⛶"}.utility-bar button:nth-child(4)::after{content:"↺"}.utility-bar{border-top:1px solid #e9e4ce}.abilities b{font-size:14px}.ability-icon{font-size:30px}.energy{font-size:9px}

.home-modal{padding:24px 18px 18px;max-width:390px}.home-mark{width:68px;height:68px;margin:0 auto 8px;border-radius:24px;display:grid;place-items:center;background:radial-gradient(circle at 35% 30%,#fff6bd,#e8d17e);border:3px solid #fff8da;color:#789866;font-size:42px;transform:rotate(-7deg);box-shadow:0 5px 0 #cdb96f}.home-modal h2{margin:4px 0 18px;font-size:25px;letter-spacing:1px}.level-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-bottom:18px}.level-card{position:relative;min-height:92px;padding:8px 3px 7px;border:2px solid #d4ddba;border-radius:20px;background:#eef1da;box-shadow:0 3px 0 #d8e0c4;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px}.level-card:nth-child(2n){background:#fff0ca;border-color:#e8d19c;box-shadow:0 3px 0 #e4d2a6}.level-card:nth-child(3n){background:#e5efdf;border-color:#c3d9bb;box-shadow:0 3px 0 #cbdcc5}.level-card.selected{border-color:#d58b49;box-shadow:0 0 0 3px #f6d485,0 4px 0 #c69050;transform:translateY(-2px)}.level-card>span{font-size:30px;line-height:34px;filter:drop-shadow(0 2px 0 #879b7022)}.level-card b{font-size:11px;color:#65805d;letter-spacing:1px}.level-card small{font-size:10px;color:#82906d}.mini-legend{display:flex;justify-content:center;gap:18px;margin-top:13px;color:#8c9675;font-size:10px}.mini-legend span{white-space:nowrap}.home-modal .start-button{min-height:50px}.home-modal .modal-hint{display:none}
@media(max-width:350px){.home-modal{padding:18px 13px 14px}.home-mark{width:56px;height:56px;font-size:34px}.home-modal h2{font-size:22px;margin-bottom:13px}.level-grid{gap:7px;margin-bottom:13px}.level-card{min-height:77px;border-radius:16px}.level-card>span{font-size:25px;line-height:28px}.level-card small{font-size:9px}.mini-legend{margin-top:9px;gap:9px}}

/* Keep the playfield visual-first: the progress dots replace repeated captions. */
.chapter{justify-content:center}.chapter #sector,.chapter .edition{display:none!important}.chapter-dots{margin:auto}

/* v0.5 极简操作: 隐藏摇杆与手动技能键(保留DOM供逻辑引用), 技能全自动释放 */
.stick-column,.abilities{display:none!important}
.control-row{display:none!important}
/* v0.7 全屏浮动摇杆: 操作区隐藏后, 摇杆改为按需出现在手指落点 */
#float-stick{display:none;position:fixed;z-index:60;width:84px;height:84px;margin:-42px 0 0 -42px;border-radius:50%;border:2px solid #83a981;background:radial-gradient(circle,#f8f5dd 39%,#e4e9cd 40%,#f1f0d9 65%,#d8dfba 66%,#eff1d5 69%);box-shadow:0 8px 22px #3f5b3f33;pointer-events:none}
#float-stick.on{display:block}
.float-ring{position:absolute;inset:0;display:grid;place-items:center;font-size:75px;line-height:1;color:#afbc96;font-weight:200;opacity:.38}
.float-knob{position:absolute;left:50%;top:50%;width:48px;height:48px;margin:-24px;border:2px solid #5e9478;border-radius:50%;display:grid;place-items:center;background:linear-gradient(#a8cba1,#88b38c);box-shadow:0 4px 0 #669178,0 7px 10px #5c795333;color:#3f6b55;font-size:18px;will-change:transform}

/* v0.6 技能状态条: 图标+环形冷却, 无文字 */
.ammo-bar{height:54px}
.skill-strip{display:flex;gap:9px;align-items:center;margin-left:2px}
.skill{position:relative;width:34px;height:34px;flex:0 0 34px;border-radius:50%;display:grid;place-items:center;border:2px solid #d8cf9f;background:#efebc8}
.skill>i{font-style:normal;font-size:17px;line-height:1;color:#9a9168;transition:color .2s}
#skill-heavy.ready{background:#ffe4a0;border-color:#dab768;box-shadow:0 0 0 3px #f6d48566,0 2px 0 #d4ae60}
#skill-heavy.ready>i{color:#b07f2e}
#skill-pulse{--p:0;background:#eef2da}
#skill-pulse::before{content:"";position:absolute;inset:-4px;border-radius:50%;background:conic-gradient(#8fbf7d calc(var(--p)*1%),#e3dfc4 0);z-index:-1}
#skill-pulse.ready{border-color:#8fbf7d}
#skill-pulse.ready>i{color:#5a8160}
#skill-pulse.ready::before{animation:skillPulse 1s ease-in-out infinite}
@keyframes skillPulse{50%{transform:scale(1.12);opacity:.75}}

/* 花园养成: 波间种花卡 */
.plant-row{display:flex;gap:8px;justify-content:center;margin-top:12px}
.plant-card{width:64px;height:56px;border:2px solid #c3d9bb;border-radius:16px;background:#eef4e2;display:flex;flex-direction:column;align-items:center;justify-content:center;box-shadow:0 3px 0 #cbdcc5}
.plant-card span{font-size:22px;line-height:1.2}
.plant-card b{font-size:11px;color:#b5823b}
.plant-card:disabled{filter:saturate(.4);opacity:.55}
