:root{color-scheme:light;--ink:#19313a;--muted:#697b7e;--paper:#f5f3ec;--gold:#e4ad50;--blue:#3689b2;--red:#ce6653;--line:#dcded6;font-family:system-ui,-apple-system,"PingFang SC","Microsoft YaHei",sans-serif}*{box-sizing:border-box}body{margin:0;background:#eaece5;color:var(--ink)}button,input,a{-webkit-tap-highlight-color:transparent}button{font:inherit;cursor:pointer;color:inherit}button,a,input{touch-action:manipulation}button{border:0}button:disabled{cursor:not-allowed;opacity:.45}button:active:not(:disabled){transform:translateY(1px)}:focus-visible{outline:3px solid #287fa6;outline-offset:3px}svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}.icons{position:absolute;width:0;height:0}.app{max-width:1420px;margin:0 auto;padding:0 28px 10px}.topbar{height:88px;display:flex;align-items:center;gap:16px}.back{color:var(--ink);text-decoration:none}.brand{display:flex;align-items:center;gap:12px}.brandmark{display:grid;place-items:center;width:44px;height:44px;background:#223c43;border-radius:13px;color:#f0c57e}.brandmark svg{width:27px;height:27px}.brand h1{font-size:23px;letter-spacing:2px;margin:0;font-weight:800}.brand p{margin:3px 0 0;color:var(--muted);font-size:9px;letter-spacing:1.8px}.brand p span{padding:0 5px}.tools{margin-left:auto;display:flex;gap:8px}.iconbtn{width:44px;height:44px;border:1px solid #cdd4cc;border-radius:12px;background:#f7f7f1;display:grid;place-items:center;position:relative}.mute-mark{position:absolute;width:23px;height:2px;background:var(--ink);transform:rotate(-45deg)}#sound[aria-pressed=true] .mute-mark{display:none}.battle{border-radius:22px;overflow:hidden;background:#b8d5d6;border:1px solid #b4c8c6;box-shadow:0 12px 35px #29444812}.battle-hud{display:grid;grid-template-columns:1fr 1fr 1fr;gap:28px;padding:18px 28px 15px;background:#f8fbf2;align-items:center}.team{max-width:270px;display:grid;grid-template-columns:1fr auto;gap:7px;font-size:13px}.team strong{font-variant-numeric:tabular-nums}.team-red{justify-self:end;width:100%;text-align:right}.team-red .team-label{grid-column:2;grid-row:1}.team-red strong{grid-column:1;grid-row:1;text-align:left}.health-track{height:8px;background:#d9e2df;border-radius:8px;grid-column:1/-1;overflow:hidden}.health-track i{height:100%;width:100%;display:block;background:var(--blue);border-radius:8px;transition:width .25s}.team-red .health-track i{background:var(--red);margin-left:auto}.chapter{text-align:center;display:flex;flex-direction:column;gap:3px}.chapter>span:first-child{font-size:10px;letter-spacing:1.8px;color:var(--muted)}.chapter strong{font-size:19px;letter-spacing:2px}.chapter>span:last-child{font-size:10px;color:#788a88}.canvas-wrap{position:relative;height:clamp(280px,46vh,530px)}canvas{width:100%;height:100%;display:block;touch-action:none;user-select:none}.battle-badge{position:absolute;top:14px;left:20px;background:#fffdf0d9;border:1px solid #ffffff9c;border-radius:6px;padding:6px 10px;font-size:10px;letter-spacing:1px;pointer-events:none}.scene-note{position:absolute;bottom:12px;left:50%;transform:translateX(-50%);font-size:11px;background:#203c42d9;color:#fff9e8;border-radius:30px;padding:6px 12px;white-space:nowrap;pointer-events:none}.statusline{min-height:42px;display:flex;align-items:center;gap:8px;background:#203840;color:#fff6dc;padding:10px 22px;font-size:12px}.status-dot{width:6px;height:6px;background:#eac66d;border-radius:50%;flex-shrink:0}#damageText{margin-left:auto;color:#bed1d2;font-size:11px}.command{display:grid;grid-template-columns:1.2fr 1fr 132px;gap:22px;align-items:center;padding:22px 2px 16px}.section-label{font-size:12px;font-weight:700;margin-bottom:10px;display:flex;gap:8px;align-items:center}.section-label>span{color:#97a5a0;font-size:10px;font-weight:500}.section-label small{font-size:10px;color:var(--muted);font-weight:400;margin-left:auto}.weapons{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.weapon{min-height:66px;padding:9px 10px;border:1px solid #d0d6cb;background:#f8f9f2;border-radius:12px;display:flex;align-items:center;gap:8px;text-align:left;position:relative}.weapon svg{width:25px;height:25px;color:#6a807e}.weapon b{display:block;font-size:12px;white-space:nowrap}.weapon small{display:block;font-size:9px;color:var(--muted);margin-top:3px;white-space:nowrap}.weapon em{font-size:10px;font-style:normal;position:absolute;right:6px;top:3px;color:#8a9891}.weapon.selected{background:#fff5d8;border-color:#c99c49;box-shadow:inset 0 0 0 1px #c99c49}.weapon.selected svg{color:#a77a2f}.sliders{display:grid;grid-template-columns:1fr 1fr;gap:18px}.sliders label{display:grid;grid-template-columns:1fr auto;align-items:center;font-size:12px;gap:1px}.sliders output{font-weight:800;font-variant-numeric:tabular-nums;font-size:16px}.sliders input{grid-column:1/-1;width:100%;height:44px;margin:0;accent-color:#345d65;cursor:pointer}.fire{align-self:stretch;min-height:88px;background:#e7b45c;border:1px solid #b8893e;box-shadow:0 4px 0 #b58b43;border-radius:14px;display:flex;justify-content:center;align-items:center;gap:12px}.fire svg{width:30px;height:30px}.fire>span{font-size:21px;font-weight:800;letter-spacing:4px}.fire small{display:block;font-size:9px;letter-spacing:2px;font-weight:600;margin-top:4px;opacity:.7}.fire:active:not(:disabled){box-shadow:0 2px 0 #b58b43;transform:translateY(2px)}.bottomline{display:flex;align-items:center;gap:16px;border-top:1px solid var(--line);min-height:50px;color:#697b76;font-size:10px}.textbtn{display:inline-flex;align-items:center;justify-content:center;gap:7px;background:transparent;min-height:44px;padding:6px 12px;font-size:12px;font-weight:600}.textbtn svg{width:18px;height:18px}.company{margin-left:auto;letter-spacing:1px}.bottomline .textbtn{padding-left:0}dialog{border:1px solid #e5e7dc;background:#fbfaf2;color:var(--ink);padding:32px;max-width:min(440px,calc(100vw - 32px));width:440px;border-radius:24px;text-align:center;box-shadow:0 25px 100px #162b4266;max-height:calc(100dvh - 30px);overflow:auto}dialog::backdrop{background:#162f3e66;backdrop-filter:blur(4px)}dialog h2{font-size:28px;letter-spacing:-.6px;margin:10px 0 14px}.dialog-emblem{background:#e8d8af;color:#75572e;display:grid;place-items:center;width:64px;height:64px;border-radius:20px;margin:0 auto 20px}.dialog-emblem svg{height:34px;width:34px}.eyebrow{font-size:10px;letter-spacing:3px;color:#8f805f;font-weight:700;margin:0}.dialog-desc{font-size:14px;line-height:1.9;color:#647572;margin:12px 0 22px}.intro-points{display:flex;justify-content:center;gap:12px;font-size:10px;color:#667b77;margin:20px 0}.primary,.secondary{width:100%;min-height:48px;padding:12px;border-radius:12px;font-weight:700;font-size:15px}.primary{background:#233f45;color:#fff6dc}.secondary{background:#e9ede4;color:#304b4d;margin-top:10px}.hint{font-size:10px;color:#889289;margin:16px 0 0}.stars{color:#bb8c37;margin:12px 0;display:flex;justify-content:center;gap:8px}.stars svg{height:34px;width:34px;fill:#e4b45d;stroke:#c79643}.stars .off{fill:#dfe3d8;stroke:#c8cec3}.level-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:22px 0}.level-card{min-height:91px;text-align:left;padding:12px;background:#e9eee3;border-radius:12px;border:1px solid #d5ded0}.level-card.current{border-color:#cba550;background:#fff1d0}.level-card b{display:block;font-size:13px;margin:4px 0}.level-card span{font-size:10px;color:#6c7d74}.level-card small{font-size:10px;letter-spacing:1px;color:#a37c35}#fatal{position:fixed;bottom:20px;left:5%;right:5%;padding:20px;background:#fff0d9;border:1px solid #eac28c;border-radius:12px;z-index:99}#fatal[hidden]{display:none}#fatal a{display:flex;align-items:center;justify-content:center;min-height:44px;min-width:44px;margin-top:12px;border-radius:8px;background:#19313a;color:#fff;text-decoration:none}@media(max-width:1000px){.app{padding:0 18px}.command{grid-template-columns:1fr 1fr 100px;gap:14px}.section-label small{display:none}.weapon{padding:9px 8px;gap:5px}.weapon svg{width:20px}.fire>span{font-size:18px}.fire svg{width:24px}.sliders{gap:12px}.battle-hud{padding:14px 20px;gap:20px}}
@media(max-width:600px) and (orientation:portrait){.app{padding:0 12px}.topbar{height:70px;gap:8px}.brand{gap:8px}.brandmark{display:none}.brand h1{font-size:19px;letter-spacing:1px}.brand p{font-size:8px;letter-spacing:1px}.brand p span{padding:0 1px}.tools{gap:4px}.iconbtn{border-radius:10px;width:44px;height:44px}.battle{border-radius:16px}.battle-hud{gap:12px;padding:12px}.team{font-size:10px;gap:6px}.team-label{font-size:9px}.chapter strong{font-size:15px;letter-spacing:1px}.chapter>span:first-child{font-size:8px;letter-spacing:1px}.chapter>span:last-child{font-size:9px}.health-track{height:6px}.canvas-wrap{height:clamp(235px,34dvh,340px)}.battle-badge{left:12px;top:10px;font-size:9px;padding:5px 8px}.scene-note{font-size:9px;bottom:10px}.statusline{padding:10px 12px;font-size:11px;min-height:39px}#damageText{display:none}.command{grid-template-columns:1fr 84px;gap:12px;padding:15px 0}.arsenal{grid-column:1/-1}.section-label{margin-bottom:8px;font-size:11px}.section-label small{display:block;font-size:9px}.weapon{min-height:58px;padding:8px 10px;gap:8px}.weapon b{font-size:12px}.weapon small{font-size:9px}.weapon svg{width:22px}.sliders label{font-size:11px}.sliders output{font-size:15px}.fire{min-height:78px;gap:5px;border-radius:12px}.fire svg{width:22px}.fire>span{font-size:17px;letter-spacing:2px}.fire small{font-size:8px}.bottomline{gap:6px;flex-wrap:wrap;font-size:9px}.bottomline .textbtn{font-size:11px}#saveNote{font-size:9px}.company{font-size:9px;letter-spacing:0}dialog{padding:28px 22px}dialog h2{font-size:26px}.dialog-desc{font-size:13px}.intro-points{gap:8px;font-size:9px}}
@media(max-height:520px) and (orientation:landscape){.app{padding:0 max(12px,env(safe-area-inset-right)) 0 max(12px,env(safe-area-inset-left))}.topbar{height:50px;gap:10px}.brand h1{font-size:17px}.brand p{display:none}.brandmark{width:32px;height:32px;border-radius:9px}.brandmark svg{width:22px;height:22px}.tools{gap:6px}.iconbtn{width:44px;height:44px;border-radius:9px}.battle{border-radius:13px}.battle-hud{padding:7px 18px;gap:30px;height:53px}.chapter{gap:1px}.chapter strong{font-size:13px}.chapter>span:first-child{font-size:8px}.chapter>span:last-child{display:none}.team{font-size:10px;max-width:200px;gap:4px}.health-track{height:5px}.canvas-wrap{height:max(138px,calc(100dvh - 238px))}.battle-badge{top:7px;left:12px;font-size:8px;padding:3px 7px}.scene-note{display:none}.statusline{min-height:26px;padding:5px 14px;font-size:10px}#damageText{font-size:9px}.command{padding:8px 0 6px;gap:12px;grid-template-columns:1.3fr 1fr 92px}.section-label{display:none}.weapon{min-height:48px;padding:6px 8px;gap:6px;border-radius:9px}.weapon b{font-size:10px}.weapon small{display:none}.weapon svg{width:20px}.weapon em{font-size:9px}.sliders{gap:10px}.sliders label{font-size:10px}.sliders output{font-size:12px}.sliders input{height:44px}.fire{min-height:56px;border-radius:9px;gap:7px}.fire svg{width:23px}.fire>span{font-size:17px}.fire small{display:none}.bottomline{min-height:0;border:0;height:0;overflow:hidden}dialog{padding:18px 25px}.dialog-emblem{display:none}dialog h2{font-size:23px;margin:7px 0}.dialog-desc{font-size:12px;line-height:1.6;margin:8px 0 12px}.intro-points{margin:10px 0}.hint{margin-top:9px}.level-grid{grid-template-columns:repeat(3,1fr);margin:12px 0;gap:7px}.level-card{min-height:64px;padding:8px}.level-card b{font-size:11px}.level-card span{font-size:9px}}
.iconbtn{flex-shrink:0}.brand{min-width:0}.landscape-map{display:none}@media(max-height:520px) and (orientation:landscape){.landscape-map{display:grid}.bottomline{display:none}}
@media(prefers-reduced-motion:reduce){*{transition:none!important;scroll-behavior:auto!important}}
