:root {
  --bg: #070b10;
  --panel: rgba(11, 17, 23, 0.86);
  --panel-2: rgba(15, 22, 30, 0.92);
  --line: rgba(110, 170, 205, 0.18);
  --line-strong: rgba(120, 200, 235, 0.42);
  --text: #dbe7f0;
  --muted: #7f95a6;
  --fire: #ff8a3d;
  --cmd: #5ad1ff;
  --sup: #7dffb2;
  --logi: #ffd76a;
  --bad: #ff5a5a;
  --good: #7dffb2;
  --accent: var(--fire);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  user-select: none;
  -webkit-font-smoothing: antialiased;
}

#game { position: fixed; inset: 0; display: block; width: 100%; height: 100%; }
body.combat-aim #game { cursor: none; }

#hud { position: fixed; inset: 0; pointer-events: none; z-index: 10; }

kbd {
  display: inline-block;
  min-width: 18px;
  padding: 1px 5px;
  margin: 0 2px;
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  border-radius: 3px;
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 11px;
  color: #cfe6f5;
  background: rgba(40, 60, 75, 0.5);
}

/* ---------------- 顶栏 ---------------- */
.topbar {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 58px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 18px;
  background: linear-gradient(180deg, rgba(7, 12, 17, 0.96), rgba(7, 12, 17, 0.72));
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
  pointer-events: auto;
}

.brand {
  font-weight: 800;
  font-size: 17px;
  letter-spacing: 2px;
  color: #eef7ff;
  white-space: nowrap;
}
.brand span { color: var(--accent); }
.brand em {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 6px;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  font-style: normal;
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--muted);
  vertical-align: 3px;
}

.stat { display: flex; align-items: center; gap: 7px; min-width: 74px; }
.stat.wide { min-width: 158px; }
.stat label, .compute label, .resitem label {
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--muted);
  text-transform: uppercase;
}
.stat b {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 15px;
  color: #fff;
  letter-spacing: 0.5px;
}
.stat i {
  font-style: normal;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 10px;
  color: var(--muted);
}

.bar {
  position: relative;
  flex: 1;
  height: 7px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.bar span {
  display: block;
  height: 100%;
  width: 100%;
  transition: width 0.2s linear;
}
.bar.core span { background: linear-gradient(90deg, #2c8e6b, #55e6a5); box-shadow: 0 0 10px rgba(85, 230, 165, 0.35); }
.bar.core.low span { background: linear-gradient(90deg, #a33b2b, #ff7b52); box-shadow: 0 0 10px rgba(255, 90, 60, 0.4); }
.bar.ammo span { background: linear-gradient(90deg, #9b6a1f, #ffc45c); box-shadow: 0 0 10px rgba(255, 196, 92, 0.3); }

.res { display: flex; gap: 14px; }
.resitem { display: flex; align-items: center; gap: 6px; }
.resitem b {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 14px;
  color: #fff;
  min-width: 34px;
}
.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.dot.metal { background: #9fb6c8; box-shadow: 0 0 8px rgba(159, 182, 200, 0.6); }
.dot.energy { background: #59d5ff; box-shadow: 0 0 8px rgba(89, 213, 255, 0.6); }

.compute { display: flex; align-items: baseline; gap: 8px; margin-left: auto; white-space: nowrap; }
.compute b {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 20px;
  color: var(--cmd);
  text-shadow: 0 0 16px rgba(90, 209, 255, 0.5);
}

.topActions { display: flex; gap: 8px; }
.topActions button {
  width: 32px; height: 32px;
  border: 1px solid var(--line);
  background: rgba(30, 45, 58, 0.5);
  color: var(--text);
  cursor: pointer;
  font-size: 13px;
  border-radius: 3px;
  transition: 0.15s;
}
.topActions button:hover { border-color: var(--line-strong); background: rgba(60, 90, 115, 0.5); }

/* ---------------- 岗位切换 ---------------- */
.rolebar {
  position: absolute;
  top: 68px; left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  pointer-events: auto;
}
.roleBtn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px 7px 11px;
  border: 1px solid var(--line);
  background: rgba(10, 16, 22, 0.8);
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  letter-spacing: 0.5px;
  border-radius: 3px;
  transition: 0.16s;
  backdrop-filter: blur(6px);
}
.roleBtn .num {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 10px;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 0 4px;
  border-radius: 2px;
}
.roleBtn .aiTag {
  font-size: 9px;
  padding: 1px 4px;
  border-radius: 2px;
  background: rgba(120, 160, 190, 0.15);
  color: #9fb6c8;
  letter-spacing: 1px;
}
.roleBtn:hover { color: var(--text); border-color: var(--line-strong); }
.roleBtn.active {
  color: #08121a;
  background: var(--roleColor, var(--fire));
  border-color: var(--roleColor, var(--fire));
  box-shadow: 0 0 22px -4px var(--roleColor, var(--fire));
  font-weight: 700;
}
.roleBtn.active .num { color: rgba(0, 0, 0, 0.55); border-color: rgba(0, 0, 0, 0.3); }
.roleBtn.active .aiTag { display: none; }

/* ---------------- 面板 ---------------- */
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 4px;
  backdrop-filter: blur(9px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.left {
  position: absolute;
  top: 122px; left: 14px; bottom: 96px;
  width: 316px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: auto;
}
.inbox { flex: 1; min-height: 200px; }
.logPanel { height: 142px; flex: none; }

.right {
  position: absolute;
  top: 122px; right: 14px; bottom: 16px;
  width: 302px;
  display: flex;
  flex-direction: column;
  pointer-events: auto;
}
.rolePanel { padding: 12px; overflow-y: auto; flex: 1; min-height: 0; }

.panelHead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  background: rgba(26, 40, 52, 0.5);
  flex: none;
}
.panelHead h3 {
  font-size: 11px;
  letter-spacing: 2px;
  font-weight: 700;
  color: #b9d3e4;
}
.panelHead .hint { font-size: 10px; color: var(--muted); }
.badge {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--bad);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.badge.zero { background: rgba(120, 160, 190, 0.2); color: var(--muted); }

.inboxList { flex: 1; overflow-y: auto; padding: 8px; display: flex; flex-direction: column; gap: 7px; }
.inbox.collapsed { flex: none; }
.inbox.collapsed .inboxList { display: none; }
.collapseBtn {
  margin-left: 6px;
  padding: 1px 7px;
  font-size: 10px;
  color: #8ea6b7;
  background: rgba(40, 58, 72, 0.5);
  border: 1px solid var(--line);
  border-radius: 2px;
  cursor: pointer;
}
.collapseBtn:hover { color: #dbe7f0; border-color: var(--line-strong); }

.reqCard {
  border: 1px solid var(--line);
  border-left: 3px solid var(--cmd);
  background: rgba(20, 30, 40, 0.72);
  padding: 8px 9px 9px;
  border-radius: 3px;
  animation: slideIn 0.22s ease-out;
}
.reqCard.p3 { border-left-color: var(--bad); background: rgba(48, 20, 22, 0.6); }
.reqCard.p2 { border-left-color: var(--fire); }
.reqCard.p1 { border-left-color: var(--cmd); }
.reqTop { display: flex; align-items: center; gap: 6px; margin-bottom: 3px; }
.reqFrom { font-size: 10px; color: var(--muted); letter-spacing: 0.5px; }
.reqPri { font-size: 9px; padding: 0 4px; border-radius: 2px; border: 1px solid var(--line); color: var(--muted); }
.reqPri.high { color: #ffb88a; border-color: rgba(255, 138, 61, 0.4); }
.reqPri.critical { color: #ff8a8a; border-color: rgba(255, 90, 90, 0.5); }
.reqTime { margin-left: auto; font-family: ui-monospace, Consolas, monospace; font-size: 11px; color: var(--muted); }
.reqTime.urgent { color: var(--bad); animation: blink 0.8s infinite; }
.reqTitle { font-size: 13px; font-weight: 600; color: #e8f4fd; line-height: 1.35; }
.reqDetail { font-size: 11px; color: #94aab9; margin-top: 3px; line-height: 1.45; }
.reqBtns { display: flex; gap: 5px; margin-top: 7px; }
.reqBtns button {
  flex: 1;
  padding: 4px 0;
  font-size: 11px;
  border: 1px solid var(--line);
  background: rgba(40, 58, 72, 0.6);
  color: var(--text);
  cursor: pointer;
  border-radius: 2px;
  transition: 0.14s;
}
.reqBtns button:hover { background: rgba(70, 105, 130, 0.75); border-color: var(--line-strong); }
.reqBtns button.ok { background: rgba(48, 140, 96, 0.35); border-color: rgba(80, 220, 150, 0.4); color: #a8ffd0; }
.reqBtns button.no { background: rgba(140, 50, 50, 0.28); border-color: rgba(255, 100, 100, 0.3); color: #ffb3b3; }

.outHead {
  margin-top: 8px;
  padding-top: 7px;
  border-top: 1px dashed rgba(120, 170, 200, 0.14);
  font-size: 9.5px;
  letter-spacing: 1.5px;
  color: #5f7788;
}
.reqOut {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 10.5px;
  color: #8ea6b7;
  padding: 3px 2px;
}
.reqOut b { font-family: ui-monospace, Consolas, monospace; color: #6f8797; font-weight: 500; }

.empty {
  padding: 22px 12px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.logList { flex: 1; overflow-y: auto; padding: 7px 10px; font-size: 11px; line-height: 1.65; color: #9db3c3; }
.logList div { border-bottom: 1px dashed rgba(120, 170, 200, 0.08); padding: 2px 0; }
.logList .t { color: #5d7d93; font-family: ui-monospace, Consolas, monospace; margin-right: 5px; }
.logList .good { color: #8ff0bb; }
.logList .bad, .logList .warn { color: #ffad8a; }
.logList .fire { color: #ffc08a; }
.logList .request { color: #8fd4ff; }
.logList .wave { color: #ffe08a; font-weight: 600; }

/* ---------------- 右侧岗位面板 ---------------- */
.secTitle {
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  padding-bottom: 5px;
  margin: 2px 0 9px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.secTitle:not(:first-child) { margin-top: 14px; }
.secTitle b { color: #cfe6f5; font-size: 11px; letter-spacing: 0.5px; }

.kv { display: flex; justify-content: space-between; font-size: 12px; padding: 3px 0; color: #a9c0d0; }
.kv b { color: #eaf6ff; font-family: ui-monospace, Consolas, monospace; }
.kv b.good { color: var(--good); }
.kv b.warn { color: var(--fire); }
.kv b.bad { color: var(--bad); }

.sliderRow { margin-bottom: 10px; }
.sliderRow .top { display: flex; justify-content: space-between; font-size: 11px; margin-bottom: 4px; }
.sliderRow .top span { color: #a9c0d0; }
.sliderRow .top b { font-family: ui-monospace, Consolas, monospace; color: var(--roleColor, #fff); }
input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 4px;
  background: rgba(120, 170, 200, 0.16);
  outline: none;
  border-radius: 2px;
  cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--roleColor, #5ad1ff);
  border: 2px solid #0a1218;
  box-shadow: 0 0 10px var(--roleColor, #5ad1ff);
}
.weightNote { font-size: 10px; color: var(--muted); line-height: 1.5; margin-top: 2px; }

/* 九宫格方位盘：上北下南左西右东，和 2.5D 地图朝向一致 */
.nineHint {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 9.5px;
  letter-spacing: 0.5px;
  color: #6f8797;
  margin: 0 0 6px;
}
.northMark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px; height: 15px;
  border-radius: 2px;
  background: rgba(255, 138, 61, 0.22);
  border: 1px solid rgba(255, 138, 61, 0.5);
  color: #ffca9a;
  font-size: 9px;
  font-weight: 700;
}
.nineGrid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 5px;
  margin-bottom: 4px;
}
.nineCell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 42px;
  padding: 4px 0 5px;
  border: 1px solid var(--line);
  background: rgba(30, 44, 56, 0.55);
  color: #b6ccdb;
  cursor: pointer;
  border-radius: 3px;
  font-size: 10px;
  line-height: 1;
  transition: 0.14s;
  -webkit-tap-highlight-color: transparent;
}
.nineCell i {
  font-style: normal;
  font-size: 15px;
  line-height: 1;
  color: #8fb6cd;
  transition: 0.14s;
}
.nineCell span { letter-spacing: 0.5px; }
.nineCell:hover { border-color: var(--line-strong); background: rgba(52, 74, 90, 0.7); }
.nineCell:active { transform: scale(0.96); }
/* 对角格稍微压暗，突出正方向 */
.nineCell:nth-child(1), .nineCell:nth-child(3),
.nineCell:nth-child(7), .nineCell:nth-child(9) { background: rgba(26, 38, 48, 0.55); }

.nineCell.center {
  border-style: dashed;
  background: rgba(18, 28, 36, 0.6);
  color: #8ea6b7;
}
.nineCell.on {
  background: rgba(255, 138, 61, 0.24);
  border-color: rgba(255, 138, 61, 0.66);
  border-style: solid;
  color: #ffca9a;
  box-shadow: inset 0 0 14px rgba(255, 138, 61, 0.18);
}
.nineCell.on i { color: #ffb27a; }
.nineGrid.base .nineCell.on {
  background: rgba(90, 209, 255, 0.22);
  border-color: rgba(90, 209, 255, 0.66);
  color: #c4ecff;
  box-shadow: inset 0 0 14px rgba(90, 209, 255, 0.18);
}
.nineGrid.base .nineCell.on i { color: #9fdcff; }

.buildGrid { display: flex; flex-direction: column; gap: 6px; }
.buildBtn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border: 1px solid var(--line);
  background: rgba(28, 40, 50, 0.66);
  color: var(--text);
  cursor: pointer;
  border-radius: 3px;
  text-align: left;
  transition: 0.14s;
}
.buildBtn:hover:not(:disabled) { border-color: rgba(255, 215, 106, 0.5); background: rgba(58, 48, 28, 0.5); }
.buildBtn:disabled { opacity: 0.42; cursor: not-allowed; }
.buildBtn .k {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 10px;
  color: var(--logi);
  border: 1px solid var(--line);
  padding: 1px 4px;
  border-radius: 2px;
}
.buildBtn .n { font-size: 12px; font-weight: 600; }
.buildBtn .d { font-size: 10px; color: var(--muted); margin-left: auto; text-align: right; line-height: 1.35; }

.queue { margin-top: 8px; display: flex; flex-direction: column; gap: 5px; }
.qItem { font-size: 11px; color: #a9c0d0; }
.priTag {
  display: inline-block;
  margin-left: 5px;
  padding: 0 4px;
  font-style: normal;
  font-size: 9px;
  border-radius: 2px;
  border: 1px solid var(--line);
  vertical-align: 1px;
}
.priTag.p3 { color: #ffca8a; border-color: rgba(255, 138, 61, 0.5); }
.priTag.p2 { color: #9fdcff; border-color: rgba(90, 209, 255, 0.4); }
.priTag.p1 { color: #8fa4b4; }
.qItem .qbar { height: 3px; background: rgba(255, 255, 255, 0.08); margin-top: 3px; }
.qItem .qbar span { display: block; height: 100%; background: var(--logi); }

.btnRow { display: flex; gap: 6px; margin-top: 8px; }
.btnRow button, .miniBtn {
  flex: 1;
  padding: 6px 0;
  font-size: 11px;
  border: 1px solid var(--line);
  background: rgba(40, 58, 72, 0.6);
  color: var(--text);
  cursor: pointer;
  border-radius: 2px;
}
.btnRow button:hover, .miniBtn:hover { border-color: var(--line-strong); background: rgba(70, 105, 130, 0.7); }
.btnRow button.warn { border-color: rgba(255, 138, 61, 0.4); color: #ffc08a; }

.tipBox {
  font-size: 10.5px;
  line-height: 1.6;
  color: #8ea6b7;
  background: rgba(30, 44, 56, 0.4);
  border-left: 2px solid var(--line-strong);
  padding: 6px 8px;
  margin-top: 10px;
}
.tipBox b { color: #cfe6f5; }

/* ---------------- 底部：准星 / 蓄力 ---------------- */
.taskGuide {
  position: absolute;
  top: 116px; left: 50%;
  transform: translateX(-50%);
  display: none;
  align-items: center;
  gap: 9px;
  padding: 5px 13px;
  background: rgba(8, 20, 15, 0.82);
  border: 1px solid rgba(125, 255, 178, 0.35);
  border-radius: 3px;
  color: #b6ffd4;
  font-size: 12px;
  letter-spacing: 0.5px;
  backdrop-filter: blur(6px);
  pointer-events: none;
}
.taskGuide.on { display: flex; }
.tgArrow {
  display: inline-block;
  color: #7dffb2;
  font-size: 12px;
  text-shadow: 0 0 8px rgba(125, 255, 178, 0.8);
  transition: transform 0.08s linear;
}

.bottom {
  position: absolute;
  left: 50%; bottom: 26px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  pointer-events: none;
}

.crosshair {
  position: absolute;
  left: 50%; top: 50%;
  width: 34px; height: 34px;
  margin: -17px 0 0 -17px;
  opacity: 0;
  transition: opacity 0.2s;
  z-index: 4;
}
.crosshair.on { opacity: 1; }
.crosshair i {
  position: absolute;
  background: rgba(230, 245, 255, 0.8);
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.8);
}
.crosshair i:nth-child(1) { left: 16px; top: 0; width: 2px; height: 9px; }
.crosshair i:nth-child(2) { left: 16px; bottom: 0; width: 2px; height: 9px; }
.crosshair i:nth-child(3) { top: 16px; left: 0; height: 2px; width: 9px; }
.crosshair i:nth-child(4) { top: 16px; right: 0; height: 2px; width: 9px; }
.crosshair u {
  position: absolute;
  left: 16px; top: 16px;
  width: 2px; height: 2px;
  background: #fff;
  box-shadow: 0 0 6px #fff;
}
.crosshair.charging i, .crosshair.charging u { background: #ff7a3c; box-shadow: 0 0 10px #ff5a1e; }
.crosshair.stage3 i, .crosshair.stage3 u { background: #ff2f2f; box-shadow: 0 0 14px #ff2020; }

.crosshair.hit::before {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: 20px; height: 20px;
  transform: translate(-50%, -50%) rotate(45deg);
  background:
    linear-gradient(#ffd9a0, #ffd9a0) center / 2px 100% no-repeat,
    linear-gradient(#ffd9a0, #ffd9a0) center / 100% 2px no-repeat;
  filter: drop-shadow(0 0 4px rgba(255, 120, 60, 0.9));
}
.crosshair.hit.kill::before {
  background:
    linear-gradient(#ff5a3c, #ff5a3c) center / 3px 100% no-repeat,
    linear-gradient(#ff5a3c, #ff5a3c) center / 100% 3px no-repeat;
  width: 26px; height: 26px;
}

.damageLayer { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.dmgNum {
  position: absolute;
  transform: translate(-50%, -50%);
  font-family: ui-monospace, Consolas, monospace;
  font-size: 19px;
  font-weight: 800;
  color: #ffe6c2;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.85), 0 0 12px rgba(255, 140, 60, 0.55);
  animation: dmgFloat 0.72s ease-out forwards;
}
.dmgNum.kill { color: #ff7a4a; font-size: 18px; }
@keyframes dmgFloat {
  0% { opacity: 0.25; transform: translate(-50%, -40%) scale(0.85); }
  12% { opacity: 1; transform: translate(-50%, -64%) scale(1.18); }
  70% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -150%) scale(1); }
}

.chargeWrap {
  width: 340px;
  opacity: 0;
  transition: opacity 0.25s;
}
.chargeWrap.on { opacity: 1; }
.chargeLabel {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--muted);
  margin-bottom: 4px;
}
.chargeLabel b {
  font-family: ui-monospace, Consolas, monospace;
  color: var(--fire);
}
.chargeBar {
  position: relative;
  height: 9px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 138, 61, 0.3);
  overflow: hidden;
}
.chargeBar span {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #a8501f, #ffa14a, #ffd9a0);
  box-shadow: 0 0 12px rgba(255, 140, 60, 0.6);
  transition: width 0.05s linear;
}
.chargeBar em {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent 42.8%, rgba(0, 0, 0, 0.8) 42.8%, rgba(0, 0, 0, 0.8) 43.4%, transparent 43.4%),
    linear-gradient(90deg, transparent 71.4%, rgba(0, 0, 0, 0.8) 71.4%, rgba(0, 0, 0, 0.8) 72%, transparent 72%);
  pointer-events: none;
}

.prompt {
  min-height: 16px;
  font-size: 12px;
  letter-spacing: 0.5px;
  color: #cfe6f5;
  text-shadow: 0 1px 4px #000;
  text-align: center;
}
.prompt kbd { vertical-align: 1px; }

/* ---------------- 提示 / 闪屏 ---------------- */
.toasts {
  position: absolute;
  top: 158px; left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  pointer-events: none;
}
.toast {
  padding: 6px 16px;
  font-size: 12.5px;
  letter-spacing: 0.5px;
  background: rgba(9, 15, 21, 0.9);
  border: 1px solid var(--line);
  border-left: 2px solid var(--cmd);
  border-radius: 2px;
  color: #dff0fb;
  animation: toastIn 0.25s ease-out;
  box-shadow: 0 6px 26px rgba(0, 0, 0, 0.55);
  white-space: nowrap;
}
.toast.fire { border-left-color: var(--fire); color: #ffd6b8; }
.toast.warn { border-left-color: var(--fire); }
.toast.bad { border-left-color: var(--bad); color: #ffc4c4; }
.toast.good { border-left-color: var(--good); color: #b6ffd4; }
.toast.wave { border-left-color: #ffe08a; color: #ffe9b0; font-weight: 700; letter-spacing: 2px; }
.toast.logi { border-left-color: var(--logi); color: #ffeaa8; }
.toast.sup { border-left-color: var(--sup); color: #bcffd8; }
.toast.cmd { border-left-color: var(--cmd); color: #c4ecff; }
.toast.out { animation: toastOut 0.3s ease-in forwards; }

.flash {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 55%, rgba(255, 240, 220, 0.95), rgba(255, 190, 120, 0.55) 35%, transparent 72%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.42s ease-out;
}
.flash.hit { opacity: 0.82; transition: opacity 0.04s; }

.damage {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(ellipse at center, transparent 42%, rgba(200, 30, 20, 0.55) 100%);
  transition: opacity 0.35s ease-out;
}
.damage.on { opacity: 1; transition: opacity 0.08s; }

/* ---------------- 覆盖层 ---------------- */
.overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 40%, rgba(8, 15, 22, 0.55), rgba(3, 6, 9, 0.86));
  backdrop-filter: blur(6px);
  pointer-events: auto;
  z-index: 30;
}
.overlay.hidden { display: none; }

.startCard {
  width: 620px;
  max-width: 92vw;
  padding: 34px 38px 30px;
  border: 1px solid rgba(120, 200, 235, 0.28);
  background: linear-gradient(160deg, rgba(14, 22, 30, 0.96), rgba(8, 13, 18, 0.98));
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  position: relative;
}
.startCard::before {
  content: "";
  position: absolute;
  left: 0; top: 0;
  width: 90px; height: 2px;
  background: var(--accent);
  box-shadow: 0 0 16px var(--accent);
}
.startCard.small { width: 460px; text-align: center; }
.title {
  font-size: 40px;
  font-weight: 900;
  letter-spacing: 6px;
  color: #f2f9ff;
  line-height: 1.05;
}
.title span { color: var(--accent); }
.title.sm { font-size: 24px; letter-spacing: 4px; }
.subtitle {
  margin-top: 8px;
  font-size: 12px;
  letter-spacing: 4px;
  color: var(--muted);
}
.lead {
  margin-top: 18px;
  font-size: 13px;
  line-height: 1.9;
  color: #a8c0d1;
}
.roleIntro {
  margin-top: 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.roleIntro div {
  font-size: 11.5px;
  color: #95adbd;
  border: 1px solid var(--line);
  padding: 8px 10px;
  background: rgba(30, 44, 56, 0.35);
}
.roleIntro b { display: block; color: #d9ecf9; font-size: 12.5px; margin-bottom: 3px; }
.loadState {
  margin-top: 18px;
  font-size: 11px;
  letter-spacing: 1px;
  color: #6f8797;
  min-height: 16px;
}
.startActions { display: flex; gap: 10px; margin-top: 14px; }
button.primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: grayscale(0.4);
  box-shadow: none;
}
button.primary, button.ghost {
  padding: 10px 22px;
  font-size: 13px;
  letter-spacing: 1.5px;
  cursor: pointer;
  border-radius: 2px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #120a04;
  font-weight: 700;
  transition: 0.15s;
}
button.primary:hover { filter: brightness(1.12); box-shadow: 0 0 22px -4px var(--accent); }
button.ghost {
  background: transparent;
  color: #c6dcea;
  border-color: var(--line-strong);
  font-weight: 500;
}
button.ghost:hover { background: rgba(90, 140, 175, 0.18); }
button.ghost.danger { border-color: rgba(255, 90, 90, 0.35); color: #ffb0b0; }
.footnote { margin-top: 16px; font-size: 10.5px; color: #6f8797; letter-spacing: 0.5px; }
.row { display: flex; gap: 10px; justify-content: center; margin-top: 20px; }
.settings { margin-top: 18px; display: flex; flex-direction: column; gap: 12px; text-align: left; }
.settings label { font-size: 12px; color: #a8c0d1; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.settings input[type="range"] { flex: 1; }
.help { width: 760px; }
.helpGrid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 26px; margin: 22px 0 8px; }
.helpGrid h4 { font-size: 11px; letter-spacing: 2px; color: var(--cmd); margin-bottom: 8px; }
.helpGrid p { font-size: 12px; color: #a8c0d1; line-height: 1.9; }
.endStats { display: flex; gap: 26px; margin-top: 20px; }
.endStats div { font-size: 11px; color: var(--muted); }
.endStats b { display: block; font-size: 22px; color: #fff; font-family: ui-monospace, Consolas, monospace; }

@keyframes slideIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@keyframes toastIn { from { opacity: 0; transform: translateY(-8px) scale(0.97); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-6px); } }
@keyframes blink { 50% { opacity: 0.35; } }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: rgba(120, 170, 200, 0.24); border-radius: 3px; }
::-webkit-scrollbar-track { background: transparent; }

@media (max-width: 1360px) {
  .left { width: 280px; }
  .right { width: 272px; }
  .stat.wide { min-width: 118px; }
  .brand em { display: none; }
}

/* ============================================================
   触屏操作层（竖屏优先，横屏同样可用）
   目标：微信内置浏览器常常无法横屏 → 竖屏必须能完整玩
   ============================================================ */
.inputMode {
  margin-top: 14px;
  font-size: 12px;
  color: #7fa6bd;
  letter-spacing: 0.4px;
  line-height: 1.6;
}

/* 兜底：老缓存里的 touch.js 可能还会创建这层横屏遮罩，直接压掉（新版已不再生成） */
.rotate-hint { display: none !important; }

body.touch { overscroll-behavior: none; -webkit-touch-callout: none; }
body.touch #game { touch-action: none; }
html { overscroll-behavior: none; }
body.touch button, body.touch .mtab { touch-action: manipulation; }

.touch-ui { position: fixed; inset: 0; pointer-events: none; z-index: 32; }
.touch-ui .hidden { display: none !important; }

/* ---- 左下摇杆 ---- */
.tstick {
  position: absolute;
  left: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  width: 124px; height: 124px; border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, rgba(16, 26, 34, 0.28), rgba(12, 20, 28, 0.5));
  border: 1px solid rgba(120, 220, 255, 0.3);
  pointer-events: auto; touch-action: none;
  box-shadow: inset 0 0 22px rgba(90, 209, 255, 0.12);
}
.tstick::after {
  content: "";
  position: absolute; inset: 20px;
  border-radius: 50%;
  border: 1px dashed rgba(120, 220, 255, 0.16);
}
.tknob {
  position: absolute; left: 50%; top: 50%; width: 54px; height: 54px; margin: -27px 0 0 -27px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(190, 240, 255, 0.55), rgba(90, 209, 255, 0.22));
  border: 1px solid rgba(180, 240, 255, 0.65);
  will-change: transform;
}
.tknob:not(.on) { transition: transform 0.12s ease-out; }

/* ---- 右下动作区 ---- */
.tactions {
  position: absolute;
  right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  display: grid; grid-template-columns: repeat(3, 58px); gap: 10px;
  pointer-events: none;
}
.tbtn {
  height: 58px; border-radius: 14px;
  font-size: 13px; font-weight: 600; letter-spacing: 1px;
  color: #d6f2ff;
  background: rgba(18, 30, 40, 0.55);
  border: 1px solid rgba(120, 220, 255, 0.35);
  touch-action: none;
  pointer-events: auto;
  -webkit-tap-highlight-color: transparent;
  backdrop-filter: blur(4px);
}
.tbtn.on { background: rgba(90, 209, 255, 0.32); border-color: rgba(190, 245, 255, 0.9); color: #fff; transform: scale(0.97); }
.tbtn.fire {
  grid-column: span 2; height: 74px; font-size: 16px;
  background: rgba(255, 138, 61, 0.26); border-color: rgba(255, 168, 96, 0.6); color: #ffd9bd;
}
.tbtn.fire.on { background: rgba(255, 138, 61, 0.52); box-shadow: 0 0 22px rgba(255, 138, 61, 0.35); }
.tbtn.charge { background: rgba(255, 215, 106, 0.16); border-color: rgba(255, 215, 106, 0.45); color: #ffe9a8; }
.tbtn.charge.on { background: rgba(255, 215, 106, 0.4); }
.tbtn.small { height: 52px; font-size: 12px; }
.tbtn.tiny { width: 46px; height: 46px; font-size: 18px; border-radius: 50%; }

.tzoom {
  position: absolute; right: 14px; top: 46%;
  display: flex; flex-direction: column; gap: 10px;
  pointer-events: auto;
}

/* ---- 边缘抽屉标签 ---- */
.mtab {
  position: absolute; top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  width: 30px; padding: 12px 0;
  border: 1px solid rgba(120, 220, 255, 0.26);
  background: rgba(10, 18, 26, 0.66);
  color: #a9c8da; font-size: 11px; letter-spacing: 2px;
  writing-mode: vertical-rl;
  pointer-events: auto; border-radius: 7px;
  backdrop-filter: blur(6px);
  -webkit-tap-highlight-color: transparent;
}
.mtab-left { left: 0; border-left: none; border-radius: 0 7px 7px 0; }
.mtab-right { right: 0; border-right: none; border-radius: 7px 0 0 7px; }
.mtab.on { background: rgba(90, 209, 255, 0.3); color: #fff; border-color: rgba(190, 245, 255, 0.75); }
.mbadge {
  writing-mode: horizontal-tb;
  min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 8px; background: var(--bad); color: #fff;
  font-size: 10px; font-style: normal; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}
.mbadge.zero { background: rgba(120, 160, 190, 0.22); color: #8fa6b6; }

.msheet-mask {
  position: absolute; left: 0; right: 0; top: 0;
  height: calc(100% - 54vh - env(safe-area-inset-bottom, 0px));
  pointer-events: none;
  background: rgba(4, 8, 12, 0.45);
  opacity: 0; transition: opacity 0.2s;
}
.msheet-mask.on { pointer-events: auto; opacity: 1; }

.mclose {
  position: absolute; right: 10px;
  bottom: calc(54vh + 8px + env(safe-area-inset-bottom, 0px));
  width: 34px; height: 34px; border-radius: 50%;
  display: none; align-items: center; justify-content: center;
  background: rgba(14, 24, 32, 0.9);
  border: 1px solid rgba(120, 220, 255, 0.4);
  color: #cfe6f5; font-size: 14px;
  pointer-events: auto;
}
body.m-sheet-open .mclose { display: flex; }

/* ---- 首次进入的转向提示 ---- */
.tlook-hint {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, 60px);
  padding: 7px 16px;
  background: rgba(8, 14, 20, 0.72);
  border: 1px solid rgba(120, 220, 255, 0.28);
  border-radius: 20px;
  color: #cfe6f5; font-size: 12px; letter-spacing: 0.5px;
  white-space: nowrap;
  pointer-events: none;
  animation: hintPulse 2.4s ease-in-out infinite;
  transition: opacity 0.4s;
}
.tlook-hint b { color: #7de0ff; }
.tlook-hint.hidden,
.tlook-hint.fade { opacity: 0; pointer-events: none; }
@keyframes hintPulse { 0%, 100% { opacity: 0.92; } 50% { opacity: 0.55; } }

/* 抽屉拉开时，摇杆 / 开火键 / 蓄力条 / 准星先让位，别压在面板上 */
body.m-sheet-open .tstick,
body.m-sheet-open .tactions,
body.m-sheet-open .tzoom,
body.m-sheet-open .tlook-hint,
body.m-sheet-open .mtab { display: none !important; }
body.m-sheet-open .bottom { display: none; }
body.m-sheet-open .crosshair { opacity: 0 !important; }

/* 覆盖层（开始 / 暂停 / 帮助 / 结算）出现时，别让摇杆浮在上面 */
body.overlay-open .touch-ui { display: none; }

/* ============================================================
   触屏 + 窄屏：左右面板改成从底部拉起的抽屉
   ============================================================ */
@media (max-width: 980px) {
  body.touch .left,
  body.touch .right {
    position: fixed;
    top: auto; left: 8px; right: 8px;
    bottom: calc(8px + env(safe-area-inset-bottom, 0px));
    width: auto; height: 54vh;
    display: flex; flex-direction: column;
    gap: 8px;
    background: #0a1118;
    border: 1px solid rgba(120, 200, 235, 0.28);
    border-radius: 10px;
    padding: 8px;
    transform: translateY(calc(100% + 20px));
    opacity: 0;
    pointer-events: none;
    transition: transform 0.24s cubic-bezier(0.2, 0.7, 0.3, 1), opacity 0.18s;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.55);
  }
  body.touch .left.m-open,
  body.touch .right.m-open {
    transform: none;
    opacity: 1;
    pointer-events: auto;
  }
  body.touch .left .panel,
  body.touch .right .panel { background: transparent; border: none; backdrop-filter: none; }
  body.touch .left .inbox { flex: 1; min-height: 0; }
  body.touch .left .logPanel { flex: 0 0 34%; height: auto; min-height: 0; }
  body.touch .right { padding: 8px 10px; }
  body.touch .right .rolePanel { padding: 4px 2px; background: transparent; overflow-y: auto; -webkit-overflow-scrolling: touch; }
  body.touch .inboxList,
  body.touch .logList { touch-action: pan-y; -webkit-overflow-scrolling: touch; }
  body.touch .collapseBtn { display: none; }
  /* 抽屉里的按钮做大一点，手指点得准 */
  body.touch .reqBtns button { padding: 9px 0; font-size: 12px; }
  body.touch .buildBtn { padding: 11px 10px; }
  body.touch .sectorGrid button,
  body.touch .nineCell { min-height: 52px; font-size: 11px; }
  body.touch .nineCell i { font-size: 17px; }
  body.touch .btnRow button { padding: 11px 0; font-size: 12px; }
  body.touch .sliderRow input[type="range"] { height: 6px; }
  body.touch input[type="range"]::-webkit-slider-thumb { width: 20px; height: 20px; }
}

/* ============================================================
   竖屏专属排版
   ============================================================ */
body.touch.is-portrait .topbar {
  height: auto;
  flex-wrap: wrap;
  gap: 2px 10px;
  padding: 7px 10px 6px;
  align-items: center;
}
body.touch.is-portrait .brand { display: none; }

body.touch.is-portrait .stat { flex: 1 1 92px; min-width: 92px; gap: 5px; }
body.touch.is-portrait .stat.wide { flex: 1 1 116px; min-width: 116px; }
body.touch.is-portrait .stat label { display: none; }
body.touch.is-portrait .stat b { font-size: 13px; }
body.touch.is-portrait .stat i { font-size: 9px; letter-spacing: 0; white-space: nowrap; }
body.touch.is-portrait .bar { height: 6px; }

body.touch.is-portrait .res { order: 5; flex: 0 0 auto; gap: 10px; }
body.touch.is-portrait .resitem label { display: none; }
body.touch.is-portrait .resitem b { font-size: 12px; min-width: 0; }
body.touch.is-portrait .dot { width: 6px; height: 6px; }

body.touch.is-portrait .compute { order: 6; margin-left: auto; gap: 4px; }
body.touch.is-portrait .compute label { display: none; }
body.touch.is-portrait .compute b { font-size: 14px; }

body.touch.is-portrait .topActions { order: 7; gap: 6px; }
body.touch.is-portrait .topActions button { width: 30px; height: 30px; font-size: 12px; }

/* 岗位栏：顶栏下面一排 */
body.touch.is-portrait .rolebar {
  top: calc(var(--topbar-h, 62px) + 8px);
  gap: 6px;
  width: calc(100% - 24px);
  justify-content: center;
}
body.touch.is-portrait .roleBtn {
  flex: 1 1 0;
  justify-content: center;
  padding: 7px 4px;
  font-size: 12px;
  gap: 5px;
}
body.touch.is-portrait .roleBtn .num { font-size: 9px; padding: 0 3px; }
body.touch.is-portrait .roleBtn .aiTag { display: none; }

/* 任务指引 / 提示条 */
body.touch.is-portrait .taskGuide {
  top: calc(var(--topbar-h, 62px) + 56px);
  font-size: 11.5px;
  max-width: 92vw;
  white-space: nowrap;
}
body.touch.is-portrait .toasts {
  top: calc(var(--topbar-h, 62px) + 96px);
  width: 90vw;
}
body.touch.is-portrait .toast { white-space: normal; text-align: center; font-size: 12px; padding: 6px 12px; }

/* 蓄力条 + 提示：挪到动作按钮上方，横向铺满 */
body.touch.is-portrait .bottom {
  left: 0; right: 0; bottom: calc(178px + env(safe-area-inset-bottom, 0px));
  transform: none;
  padding: 0 16px;
  gap: 6px;
  flex-direction: column-reverse;
}
body.touch.is-portrait .chargeWrap { width: 100%; }
body.touch.is-portrait .chargeLabel { font-size: 9px; }
body.touch.is-portrait .prompt { font-size: 11px; line-height: 1.45; max-width: 100%; }

/* 竖屏动作区：两排圆形按钮，拇指够得到 */
body.touch.is-portrait .tactions {
  display: flex;
  flex-wrap: wrap-reverse;
  justify-content: flex-end;
  align-items: flex-end;
  gap: 10px;
  width: 190px;
  right: 14px;
  bottom: calc(14px + env(safe-area-inset-bottom, 0px));
}
body.touch.is-portrait .tbtn.fire {
  width: 92px; height: 92px; border-radius: 50%;
  font-size: 16px; grid-column: auto;
}
body.touch.is-portrait .tbtn.charge { width: 66px; height: 66px; border-radius: 50%; font-size: 12px; }
body.touch.is-portrait .tbtn.small { width: 54px; height: 54px; border-radius: 50%; font-size: 11px; padding: 0; }

body.touch.is-portrait .tzoom { right: 12px; top: 30%; gap: 8px; }
body.touch.is-portrait .tbtn.tiny { width: 40px; height: 40px; font-size: 16px; }

/* 准星稍微放大一点，竖屏手指挡得多 */
body.touch.is-portrait .crosshair { width: 40px; height: 40px; margin: -20px 0 0 -20px; }

/* 覆盖层在竖屏要能滚 */
body.touch.is-portrait .startCard {
  width: 100%;
  max-width: calc(100vw - 24px);
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
  padding: 24px 18px 22px;
}
body.touch.is-portrait .title { font-size: 27px; letter-spacing: 3px; }
body.touch.is-portrait .title.sm { font-size: 20px; letter-spacing: 2px; }
body.touch.is-portrait .subtitle { font-size: 11px; letter-spacing: 2px; margin-top: 6px; }
body.touch.is-portrait .lead { font-size: 12px; line-height: 1.8; margin-top: 12px; }
body.touch.is-portrait .roleIntro { grid-template-columns: 1fr; gap: 6px; margin-top: 14px; }
body.touch.is-portrait .roleIntro div { padding: 7px 9px; }
body.touch.is-portrait .startActions { gap: 8px; }
body.touch.is-portrait button.primary,
body.touch.is-portrait button.ghost { flex: 1; padding: 12px 10px; font-size: 13px; }
body.touch.is-portrait .row { flex-wrap: wrap; gap: 8px; }
body.touch.is-portrait .row button { flex: 1 1 40%; }
body.touch.is-portrait .helpGrid { grid-template-columns: 1fr; gap: 14px; margin: 16px 0 6px; }
body.touch.is-portrait .helpGrid p { line-height: 1.75; }
body.touch.is-portrait .endStats { gap: 16px; flex-wrap: wrap; margin-top: 14px; }
body.touch.is-portrait .endStats b { font-size: 19px; }
body.touch.is-portrait .footnote { font-size: 10px; margin-top: 12px; }

/* 小屏手机（≤380px）：顶栏继续压，保证还是两行不折成三行 */
@media (max-width: 380px) {
  body.touch.is-portrait .topbar { padding: 6px 8px 5px; gap: 2px 7px; }
  body.touch.is-portrait .stat { flex: 0 0 88px; min-width: 88px; gap: 4px; white-space: nowrap; }
  body.touch.is-portrait .stat.wide { flex: 1 1 90px; min-width: 90px; }
  body.touch.is-portrait .stat b { font-size: 12px; }
  body.touch.is-portrait .stat i { font-size: 8.5px; }
  body.touch.is-portrait .res { gap: 7px; }
  body.touch.is-portrait .resitem b { font-size: 11px; }
  body.touch.is-portrait .compute b { font-size: 13px; }
  body.touch.is-portrait .topActions button { width: 26px; height: 26px; font-size: 11px; }
  body.touch.is-portrait .mtab { width: 33px; font-size: 10.5px; letter-spacing: 1px; }
}

/* 横屏手机：把 HUD 压紧，别挡战场 */
@media (orientation: landscape) and (max-height: 500px) {
  body.touch .topbar { height: 44px; gap: 10px; padding: 0 8px; }
  body.touch .brand { display: none; }
  body.touch .stat label, body.touch .resitem label { font-size: 9px; }
  body.touch .stat.wide { min-width: 92px; }
  body.touch .res { gap: 8px; }
  body.touch .compute b { font-size: 15px; }
  body.touch .rolebar { top: 50px; transform: scale(0.84); transform-origin: center top; }
  body.touch .tstick { width: 108px; height: 108px; left: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
  body.touch .tknob { width: 46px; height: 46px; margin: -23px 0 0 -23px; }
  body.touch .tactions { right: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); grid-template-columns: repeat(3, 52px); gap: 8px; }
  body.touch .tbtn { height: 52px; font-size: 12px; }
  body.touch .tbtn.fire { height: 64px; font-size: 14px; }
  body.touch .crosshair { width: 30px; height: 30px; margin: -15px 0 0 -15px; }
  /* 蓄力条挪到底部中间：夹在摇杆和开火键之间，别再压着提示条 */
  body.touch .bottom {
    left: 0; right: 0; bottom: calc(6px + env(safe-area-inset-bottom, 0px));
    transform: none; padding: 0 12px; gap: 4px;
  }
  body.touch .chargeWrap { width: 46vw; }
  body.touch .chargeLabel { font-size: 9px; }
  body.touch .prompt { font-size: 10.5px; }
  /* 提示条挪到右上角竖排，不占视野中心 */
  body.touch .toasts { top: 50px; left: auto; right: 10px; transform: none; align-items: flex-end; max-width: 54vw; }
  body.touch .toast { font-size: 11px; padding: 4px 10px; }
  body.touch .tlook-hint { transform: translate(-50%, 0); top: 92px; }
}
