:root{--bg: #1b2330;--panel: #222c3b;--line: rgba(255, 255, 255, .12);--text: #f4f6fa;--dim: rgba(244, 246, 250, .65);--blue: #3b82f6;--blue-light: #93c5fd;--rare: #a78bfa;--legendary: #fbbf24;font-family:system-ui,-apple-system,PingFang SC,Microsoft YaHei,sans-serif;color:var(--text)}*{box-sizing:border-box}html,body{margin:0;height:100%;overflow:hidden;background:var(--bg);overscroll-behavior:none;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}#game{position:fixed;top:0;right:0;bottom:0;left:0;touch-action:none}#hud{position:fixed;top:0;right:0;bottom:0;left:0;pointer-events:none}#hud .top{position:absolute;top:env(safe-area-inset-top,0);left:0;right:0;display:flex;justify-content:space-between;gap:8px;padding:14px 16px 22px;font-size:14px;font-weight:600;text-shadow:0 1px 2px rgba(0,0,0,.6);background:linear-gradient(#101620c7,#10162000)}.battle{position:relative;pointer-events:auto;cursor:pointer}.battle .tip{min-width:200px;white-space:normal;line-height:1.6;font-weight:500}.battle .tip b{color:#fde68a}.morale{position:relative;display:flex;align-items:center;gap:6px;min-width:130px;margin:-10px 0;pointer-events:auto;cursor:pointer}.morale .face{width:52px;height:52px;flex:none}.morale .info{display:flex;flex-direction:column;gap:3px;min-width:72px}#hud-morale-lv{font-size:13px;white-space:nowrap}.morale .tip{position:absolute;top:calc(100% + 4px);left:0;padding:5px 10px;border:1px solid var(--line);border-radius:9px;background:#222c3bf0;font-size:12px;white-space:nowrap;box-shadow:0 4px 12px #0006}.morale .tip[hidden]{display:none}.morale .bar{height:6px;min-width:60px;border-radius:5px;background:#00000073;border:1px solid var(--line);overflow:hidden}#hud-morale-fill{height:100%;width:0;background:#94a3b8;transition:width .25s linear,background .3s}.morale[data-level="1"] #hud-morale-fill{background:#60a5fa}.morale[data-level="2"] #hud-morale-fill{background:#34d399}.morale[data-level="3"] #hud-morale-fill{background:#fbbf24}.morale[data-level="4"] #hud-morale-fill{background:#fb923c}.morale[data-level="5"] #hud-morale-fill{background:linear-gradient(90deg,#f97316,#ef4444)}.morale[data-level="4"] #hud-morale-lv,.morale[data-level="5"] #hud-morale-lv{color:#fdba74}#building-menu{position:fixed;z-index:5;width:0;height:0;animation:menu-in .14s ease-out}@keyframes menu-in{0%{transform:scale(.6);opacity:0}}#building-menu button{position:absolute;width:62px;height:62px;margin:-31px 0 0 -31px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:0;border:2px solid #f2c14e;border-radius:50%;background:radial-gradient(circle at 35% 30%,#3b4a62,#1f2938);color:var(--text);box-shadow:0 4px 12px #00000073;line-height:1.05}#building-menu button:disabled{border-color:#fff3;opacity:.55;filter:grayscale(.8)}#building-menu .icon{width:30px;height:30px;margin-bottom:-2px;pointer-events:none}#building-menu .label{font-size:10px;font-weight:700}#building-menu .cost{font-size:11px;font-weight:800;color:#fde047}#building-menu .cost:after{content:" 兵";font-size:9px}#building-menu .card{position:absolute;left:0;transform:translate(-50%);display:flex;flex-direction:column;align-items:center;gap:2px;padding:6px 12px;border:1px solid var(--line);border-radius:10px;background:#181f2beb;white-space:nowrap;font-size:12px;pointer-events:none}#building-menu .detail{color:var(--dim);font-size:11px}.mute{pointer-events:auto;border:0;background:#ffffff1a;border-radius:8px;font-size:16px;line-height:1;padding:4px 8px;margin:-4px 0}.skills{position:absolute;left:12px;bottom:calc(env(safe-area-inset-bottom,0px) + 10px);display:flex;align-items:flex-end;gap:10px;pointer-events:auto}.skills button{--p: 0;display:flex;flex-direction:column;align-items:center;gap:3px;padding:0;border:0;background:none;color:var(--dim);font:inherit}.skills .disc{position:relative;display:grid;place-items:center;width:54px;height:54px;border-radius:50%;background:conic-gradient(#f2c14e calc(var(--p) * 1%),#ffffff24 0);box-shadow:0 3px 10px #0006}.skills .disc:before{content:"";position:absolute;top:4px;right:4px;bottom:4px;left:4px;border-radius:50%;background:radial-gradient(circle at 35% 30%,#3b4a62,#1f2938)}.skills .icon{position:relative;width:36px;height:36px;pointer-events:none;filter:grayscale(1) brightness(.85);opacity:.6}.skills .cd{position:absolute;font-size:15px;font-weight:800;color:#fff;text-shadow:0 1px 2px #000}.skills .name{font-size:11px;font-weight:700;text-shadow:0 1px 2px rgba(0,0,0,.8)}.skills button.ready{color:var(--text)}.skills button.ready .icon{filter:none;opacity:1}.skills button.ready .disc{box-shadow:0 0 0 2px #f2c14e59,0 0 14px #f2c14e8c}.skills button.cooling .icon{opacity:.25}.skills button.active .disc:before{background:radial-gradient(circle at 35% 30%,#d97706,#92400e)}.energy-num{margin:0 0 22px 2px;font-size:13px;font-weight:800;color:#fde047;text-shadow:0 1px 2px rgba(0,0,0,.8)}.percents{position:absolute;right:6px;bottom:calc(env(safe-area-inset-bottom,0px) + 96px);display:flex;flex-direction:column;gap:4px;padding:4px;border-radius:14px;background:#10162073;pointer-events:auto}.percents button{width:42px;height:38px;padding:0;border:0;border-radius:10px;background:transparent;color:#f4f6fab3;font-size:14px;font-weight:800}.percents button small{font-size:9px}.percents button.active{background:var(--blue);color:#fff;box-shadow:0 0 10px #3b82f699}#overlay{position:fixed;top:0;right:0;bottom:0;left:0;display:flex;align-items:center;justify-content:center;padding:16px;background:#0a0e14b8}#overlay[hidden]{display:none}.panel{width:100%;max-width:440px;max-height:100%;overflow-y:auto;padding:24px 20px;border:1px solid var(--line);border-radius:16px;background:var(--panel)}.panel h1,.panel h2{margin:0 0 8px}.panel .sub{color:var(--dim);margin:0 0 16px}.howto{padding-left:20px;line-height:1.6;font-size:15px}.blue{color:var(--blue-light)}button.primary{width:100%;min-height:48px;margin-top:8px;border:0;border-radius:12px;background:var(--blue);color:#fff;font-size:17px;font-weight:700}.cards{display:grid;gap:10px}.card{display:grid;gap:4px;text-align:left;padding:14px;border:1px solid var(--line);border-radius:12px;background:#ffffff0a;color:var(--text);font-size:14px}.card strong{font-size:17px}.card .rarity{font-size:12px;color:var(--dim)}.card.rare{border-color:var(--rare)}.card.legendary{border-color:var(--legendary)}
