:root {
  --ink-black: #06080c;
  --bg-dark: #0c1018;
  --panel-bg: rgba(12, 16, 26, 0.9);
  --panel-solid: #111725;
  --panel-mid: #1a2234;
  --line-dim: #2a3448;
  --line-mid: #46536d;
  --line-hi: #8c9ab4;
  --paper-white: #e8edf5;
  --ash-muted: #8e9bb2;
  --gold: #d9b46a;
  --gold-hi: #f2d590;
  --gold-dim: rgba(217, 180, 106, 0.35);
  --amber-dim: #c8a25a;
  --hp-sage: #4fae7f;
  --ep-steel: #4e8fd0;
  --exp-gold: #c9a24e;
  --crimson: #a82e34;
  --crimson-hi: #e2545a;
  --font-pixel: "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-title: "STZhongsong", "Songti SC", "SimSun", "Noto Serif SC", serif;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}

html, body {
  position: fixed;
  inset: 0;
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  -webkit-text-size-adjust: 100%;
  background: var(--ink-black);
  color: var(--paper-white);
  font-family: var(--font-pixel);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  touch-action: none;
}

.app-shell, .stage-wrap, #game-canvas,
.touch-controls, .touch-controls *,
.action-bar, .action-bar *,
.party-bar, .party-bar *,
.hud-top button, #clock-dial {
  touch-action: none;
}

.codex-content, .map-grid, .dlg-body, .dlg-choices, .help-content, .debug-content, .overlay-screen {
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
}

#hud-avatar, .slot-avatar, #dlg-portrait, .ending-art, .roster-chip canvas, .dlg-swap-btn, .cs-portrait canvas {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.hidden { display: none !important; }

.app-shell {
  position: relative;
  width: 100vw;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--ink-black);
  overflow: hidden;
}

/* ============ 通用面板 / 按钮 ============ */
.pixel-panel {
  background: linear-gradient(180deg, rgba(20, 26, 40, 0.97), rgba(10, 13, 21, 0.97));
  border: 1px solid var(--gold-dim);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.9), inset 0 0 0 1px rgba(255, 255, 255, 0.04), 0 18px 50px rgba(0, 0, 0, 0.7);
  border-radius: 6px;
}

.pixel-btn {
  font-family: var(--font-pixel);
  font-weight: 600;
  font-size: 13px;
  color: var(--paper-white);
  background: linear-gradient(180deg, #212a3d, #161c2a);
  border: 1px solid var(--line-mid);
  border-radius: 4px;
  padding: 7px 14px;
  cursor: pointer;
  transition: border-color 0.1s, background 0.1s, transform 0.05s;
}
.pixel-btn:hover { border-color: var(--gold); background: linear-gradient(180deg, #2a3550, #1b2335); }
.pixel-btn:active { transform: translateY(1px); }
.pixel-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.primary-btn { color: var(--gold-hi); border-color: var(--gold); background: linear-gradient(180deg, #3a3220, #241f15); }
.primary-btn:hover { background: linear-gradient(180deg, #4a3f27, #2e2719); }
.danger-btn { color: #f0a0a4; border-color: var(--crimson); background: linear-gradient(180deg, #2c1416, #1c0d0f); }
.small-btn { padding: 4px 10px; font-size: 12px; }

/* ============ 游戏内 HUD ============ */
.hud-top {
  position: absolute;
  inset: 0 0 auto 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  padding: max(10px, env(safe-area-inset-top)) 12px 0;
  z-index: 25;
  pointer-events: none;
}
.hud-top > * { pointer-events: auto; }

.hud-left { display: flex; flex-direction: column; gap: 8px; width: 300px; }

.player-frame {
  display: flex;
  gap: 10px;
  padding: 8px 10px 8px 8px;
  background: linear-gradient(135deg, rgba(14, 19, 31, 0.92), rgba(9, 12, 20, 0.86));
  border: 1px solid var(--gold-dim);
  border-left: 3px solid var(--gold);
  border-radius: 6px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.55);
}

.pf-portrait { position: relative; flex-shrink: 0; }
#hud-avatar {
  width: 64px;
  height: 64px;
  display: block;
  background: radial-gradient(circle at 50% 35%, #2a3550, #0d111b);
  border: 2px solid var(--gold);
  border-radius: 6px;
}
.lv-badge {
  position: absolute;
  left: 50%;
  bottom: -8px;
  transform: translateX(-50%);
  font-size: 11px;
  font-weight: 700;
  padding: 0 7px;
  background: #0b0e16;
  border: 1px solid var(--gold);
  color: var(--gold-hi);
  border-radius: 10px;
  white-space: nowrap;
}

.pf-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.pf-name-row { display: flex; align-items: baseline; gap: 7px; }
.pf-name { font-size: 16px; font-weight: 700; color: #fff; text-shadow: 0 1px 3px #000; }
.pf-tag { font-size: 11px; color: var(--ash-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.bar {
  position: relative;
  width: 100%;
  height: 14px;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 3px;
  overflow: hidden;
}
.bar-fill { height: 100%; width: 100%; transition: width 0.15s; }
.hp-bar .bar-fill { background: linear-gradient(180deg, #6fd39f, #3a8d63); }
.ep-bar .bar-fill { background: linear-gradient(180deg, #78b4ef, #3a6fae); }
.exp-bar { height: 5px; }
.exp-bar .bar-fill { background: linear-gradient(90deg, #8a6c2c, var(--gold-hi)); }
.bar span {
  position: absolute;
  inset: 0;
  font-size: 11px;
  font-weight: 700;
  line-height: 13px;
  text-align: center;
  color: #fff;
  text-shadow: 0 1px 2px #000, 0 0 3px #000;
}

.pf-stats { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; margin-top: 2px; }
.dom-badge, .coin-pill, .status-chip {
  font-size: 11px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 10px;
  white-space: nowrap;
}
.dom-badge { background: rgba(120, 30, 36, 0.55); border: 1px solid var(--crimson-hi); color: #ffc0c3; }
.coin-pill { background: rgba(90, 72, 30, 0.5); border: 1px solid var(--gold); color: var(--gold-hi); }
.status-chips { display: contents; }
.status-chip { background: rgba(40, 70, 110, 0.5); border: 1px solid #5e8fc4; color: #cfe3fa; }
.status-chip.warn { background: rgba(110, 40, 40, 0.5); border-color: var(--crimson-hi); color: #ffd0d2; }
.status-chip.good { background: rgba(40, 100, 70, 0.5); border-color: #5fbf8f; color: #d2f5e2; }

.quest-tracker {
  padding: 8px 11px;
  background: linear-gradient(90deg, rgba(10, 13, 21, 0.86), rgba(10, 13, 21, 0.25));
  border-left: 3px solid var(--crimson-hi);
  border-radius: 0 6px 6px 0;
}
.qt-head { display: flex; justify-content: space-between; font-size: 11px; font-weight: 700; color: var(--crimson-hi); letter-spacing: 1px; }
.qt-key { color: var(--ash-muted); font-weight: 400; letter-spacing: 0; }
.qt-title { margin-top: 3px; font-size: 14px; font-weight: 700; color: #fff; text-shadow: 0 1px 3px #000; }
.qt-desc { margin-top: 2px; font-size: 12px; color: #c6cfdd; line-height: 1.5; text-shadow: 0 1px 2px #000; }
.qt-hint { margin-top: 4px; font-size: 11.5px; color: var(--gold-hi); line-height: 1.45; text-shadow: 0 1px 2px #000; }
.qt-hint:empty { display: none; }
.qt-nav {
  margin-top: 5px;
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 700;
  color: #ffe3a0;
  background: rgba(90, 70, 25, 0.45);
  border: 1px solid rgba(255, 211, 106, 0.55);
  border-radius: 4px;
  text-shadow: 0 1px 2px #000;
}
.qt-nav:empty { display: none; }
.map-guide {
  padding: 7px 12px;
  font-size: 13px;
  color: #e8edf5;
  background: linear-gradient(90deg, rgba(90, 70, 25, 0.55), rgba(20, 24, 34, 0.3));
  border: 1px solid rgba(255, 211, 106, 0.5);
  border-left: 3px solid #ffd36a;
  border-radius: 4px;
}
.map-guide b { color: #ffe3a0; }
.goal-badge, .next-badge {
  font-size: 11px;
  font-weight: 800;
  padding: 0 6px;
  border-radius: 8px;
  margin-left: 4px;
}
.goal-badge { background: #ffd36a; color: #2a1f08; }
.next-badge { background: rgba(255, 211, 106, 0.18); color: #ffe3a0; border: 1px solid rgba(255, 211, 106, 0.6); }

.hud-center { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.loc-plate {
  text-align: center;
  padding: 5px 28px 6px;
  background: radial-gradient(ellipse at center, rgba(10, 13, 21, 0.8), rgba(10, 13, 21, 0) 75%);
}
.loc-zone { font-size: 11px; letter-spacing: 4px; color: var(--gold); font-weight: 700; }
.loc-banner { font-size: 17px; font-weight: 700; color: #fff; letter-spacing: 2px; text-shadow: 0 2px 6px #000; white-space: nowrap; }
.loc-clock { font-size: 11px; color: var(--ash-muted); }
.loc-clock b { color: var(--crimson-hi); font-variant-numeric: tabular-nums; }

.focus-warn {
  padding: 3px 10px;
  font-size: 12px;
  color: #ffd0d2;
  background: rgba(100, 24, 30, 0.85);
  border: 1px solid var(--crimson-hi);
  border-radius: 4px;
  cursor: pointer;
}

.hud-right { position: relative; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.hud-btn-row { display: flex; gap: 4px; }
.hud-icon-btn.isekai-pill {
  border-color: #b584ff;
  color: #ead6ff;
  background: linear-gradient(180deg, rgba(64, 34, 98, 0.94), rgba(26, 15, 44, 0.94));
}
.hud-icon-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 44px;
  font-family: var(--font-pixel);
  font-size: 13px;
  font-weight: 700;
  color: var(--paper-white);
  background: linear-gradient(180deg, rgba(30, 38, 56, 0.92), rgba(15, 19, 30, 0.92));
  border: 1px solid var(--line-mid);
  border-radius: 4px;
  padding: 3px 7px 2px;
  cursor: pointer;
  line-height: 1.15;
}
.hud-icon-btn small { font-size: 9.5px; color: var(--ash-muted); font-weight: 600; }
.hud-icon-btn:hover { border-color: var(--gold); }
.hud-icon-btn.accent-btn { border-color: var(--gold); color: var(--gold-hi); }
.hud-icon-btn.debug-pill { border-color: var(--crimson-hi); }

.minimap-wrap {
  position: relative;
  padding: 4px;
  background: rgba(8, 11, 18, 0.88);
  border: 1px solid var(--gold-dim);
  border-radius: 6px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
}
#minimap { display: block; width: 220px; height: 150px; border-radius: 3px; }
.minimap-label {
  position: absolute;
  left: 50%;
  bottom: -9px;
  transform: translateX(-50%);
  font-size: 11px;
  padding: 0 8px;
  background: #0b0e16;
  border: 1px solid var(--gold-dim);
  border-radius: 8px;
  color: var(--gold-hi);
  white-space: nowrap;
}

/* ============ 主舞台 ============ */
.stage-wrap {
  position: relative;
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  background: #030406;
  overflow: hidden;
}
.stage-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0) 55%, rgba(0, 0, 0, 0.55) 100%);
  z-index: 8;
}
#game-canvas { display: block; width: 100%; height: 100%; outline: none; }

/* 首领血条 */
.boss-hud {
  position: absolute;
  top: 118px;
  left: 50%;
  transform: translateX(-50%);
  width: min(560px, 70%);
  padding: 6px 12px 8px;
  background: linear-gradient(180deg, rgba(30, 8, 10, 0.92), rgba(12, 4, 5, 0.9));
  border: 1px solid var(--crimson-hi);
  border-radius: 5px;
  z-index: 15;
  pointer-events: none;
}
.boss-title-row { display: flex; justify-content: space-between; font-size: 15px; font-weight: 700; color: #fff; margin-bottom: 4px; letter-spacing: 1px; }
.boss-phase-tag { font-size: 12px; color: #ff9da1; font-weight: 600; }
.boss-hp-track { height: 11px; background: #1a0607; border: 1px solid var(--crimson); border-radius: 2px; overflow: hidden; }
.boss-hp-fill { width: 100%; height: 100%; background: linear-gradient(180deg, #ff6b70, #b0262c); transition: width 0.12s; }

/* 进入区域大字幕 */
.zone-title {
  position: absolute;
  top: 26%;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  z-index: 14;
  pointer-events: none;
  animation: zoneIn 3.2s ease-out forwards;
}
.zone-title-sub { font-size: 13px; letter-spacing: 8px; color: var(--gold); font-weight: 700; }
.zone-title-main {
  margin-top: 6px;
  font-family: var(--font-title);
  font-size: 34px;
  font-weight: 700;
  letter-spacing: 6px;
  color: #fff;
  text-shadow: 0 0 18px rgba(0, 0, 0, 0.95), 0 2px 4px #000;
  padding: 4px 40px;
  border-top: 1px solid var(--gold-dim);
  border-bottom: 1px solid var(--gold-dim);
  background: linear-gradient(90deg, transparent, rgba(6, 8, 12, 0.6), transparent);
}
@keyframes zoneIn {
  0% { opacity: 0; transform: translate(-50%, 8px); }
  15% { opacity: 1; transform: translate(-50%, 0); }
  75% { opacity: 1; }
  100% { opacity: 0; }
}

/* 广播条 */
.broadcast-banner {
  position: absolute;
  top: 150px;
  left: 50%;
  transform: translateX(-50%);
  max-width: min(760px, 80%);
  background: linear-gradient(90deg, rgba(40, 8, 10, 0.95), rgba(14, 10, 14, 0.95));
  border: 1px solid var(--crimson-hi);
  border-left: 4px solid var(--crimson-hi);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.8);
  padding: 8px 16px;
  font-size: 13.5px;
  color: #f5f5fa;
  z-index: 18;
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: none;
  border-radius: 4px;
}
.bc-tag { color: #ff7d82; font-weight: 700; flex-shrink: 0; }

/* 交互提示 */
.interact-prompt {
  position: absolute;
  bottom: 118px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(180deg, rgba(22, 28, 42, 0.96), rgba(12, 15, 24, 0.96));
  border: 1px solid var(--gold);
  border-radius: 20px;
  color: var(--paper-white);
  font-family: var(--font-pixel);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 16px 6px 6px;
  cursor: pointer;
  z-index: 16;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 70%;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.6);
  animation: promptPulse 1.6s ease-in-out infinite;
}
@keyframes promptPulse { 0%, 100% { box-shadow: 0 6px 18px rgba(0,0,0,0.6); } 50% { box-shadow: 0 6px 18px rgba(0,0,0,0.6), 0 0 14px rgba(217,180,106,0.35); } }
#interact-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.key-cap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 5px;
  background: var(--gold);
  color: #15110a;
  font-weight: 800;
  font-size: 12px;
  border-radius: 50%;
}

/* 右侧小队栏 */
.party-bar {
  position: absolute;
  right: 12px;
  top: 222px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  z-index: 21;
}
.party-slot {
  position: relative;
  display: flex;
  align-items: center;
  gap: 7px;
  width: 168px;
  background: linear-gradient(90deg, rgba(10, 13, 21, 0.92), rgba(14, 18, 28, 0.82));
  border: 1px solid var(--line-dim);
  border-radius: 5px;
  padding: 4px 8px 4px 4px;
  cursor: pointer;
  transition: transform 0.1s, border-color 0.1s;
}
.party-slot:hover { border-color: var(--line-hi); }
.party-slot.active { border-color: var(--gold); background: linear-gradient(90deg, rgba(60, 48, 22, 0.9), rgba(20, 18, 14, 0.85)); transform: translateX(-6px); }
.party-slot.dead { opacity: 0.38; filter: grayscale(1); }
.party-slot.ult-ready .slot-avatar { box-shadow: 0 0 0 2px var(--gold-hi), 0 0 10px var(--gold); }
.party-slot.on-field::after {
  content: "AUTO";
  position: absolute;
  right: 6px;
  top: 3px;
  font-size: 9px;
  font-weight: 800;
  color: #8fd6ff;
  letter-spacing: 1px;
}
.slot-key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  font-size: 11px;
  font-weight: 800;
  color: var(--paper-white);
  background: #1c2436;
  border: 1px solid var(--line-mid);
  border-radius: 3px;
}
.party-slot.active .slot-key { background: var(--gold); color: #15110a; border-color: var(--gold-hi); }
.slot-avatar { width: 30px; height: 30px; background: #0b0e16; border: 1px solid var(--line-mid); border-radius: 4px; flex-shrink: 0; }
.slot-info { flex: 1; min-width: 0; }
.slot-name { font-size: 12.5px; font-weight: 700; color: #eef2f8; white-space: nowrap; }
.slot-mini-hp, .slot-mini-ep { width: 100%; background: rgba(0, 0, 0, 0.6); border-radius: 2px; overflow: hidden; }
.slot-mini-hp { height: 4px; margin-top: 2px; }
.slot-mini-ep { height: 3px; margin-top: 1px; }
.slot-mini-hp > i { display: block; height: 100%; background: var(--hp-sage); }
.slot-mini-ep > i { display: block; height: 100%; background: var(--ep-steel); }
.party-strip-portrait { display: none; }

/* ============ PC 技能栏 ============ */
.action-bar {
  position: absolute;
  left: 50%;
  bottom: max(14px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  display: flex;
  align-items: flex-end;
  gap: 6px;
  padding: 8px 12px 8px;
  background: linear-gradient(180deg, rgba(14, 18, 28, 0.88), rgba(7, 9, 14, 0.94));
  border: 1px solid var(--gold-dim);
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  z-index: 20;
}
.ab-sep { width: 1px; align-self: stretch; margin: 4px 4px; background: var(--line-dim); }
.ab-slot {
  position: relative;
  width: 62px;
  height: 66px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 35%, #26304a, #121827);
  border: 1px solid var(--line-mid);
  border-radius: 6px;
  cursor: help;
  overflow: hidden;
}
.ab-slot:hover { border-color: var(--gold); }
.ab-slot.ab-ult { width: 72px; height: 74px; border-color: var(--gold-dim); }
.ab-slot.ready { border-color: var(--gold-hi); box-shadow: inset 0 0 12px rgba(242, 213, 144, 0.35), 0 0 10px rgba(242, 213, 144, 0.35); }
.ab-slot.active-toggle { border-color: #6fc3ff; box-shadow: inset 0 0 12px rgba(111, 195, 255, 0.35); }
.ab-key {
  position: absolute;
  top: 3px;
  left: 4px;
  font-size: 10.5px;
  font-weight: 800;
  padding: 0 4px;
  background: rgba(0, 0, 0, 0.65);
  border: 1px solid var(--line-mid);
  border-radius: 3px;
  color: #fff;
  z-index: 2;
}
.ab-icon { font-size: 22px; line-height: 1; color: var(--elem, var(--gold-hi)); text-shadow: 0 0 8px rgba(0, 0, 0, 0.8); z-index: 1; margin-top: 6px; }
.ab-name { margin-top: 3px; font-size: 11px; font-weight: 700; color: #e8edf5; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; padding: 0 3px; z-index: 1; }
.ab-cd {
  position: absolute;
  inset: 0;
  background: rgba(3, 5, 9, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 800;
  color: #fff;
  z-index: 3;
  pointer-events: none;
  clip-path: inset(var(--cdclip, 100%) 0 0 0);
}
.ab-cd:empty { display: none; }
.ab-energy {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--ep, 0%);
  background: linear-gradient(0deg, rgba(78, 143, 208, 0.45), rgba(78, 143, 208, 0.08));
  z-index: 0;
  pointer-events: none;
  transition: height 0.15s;
}
.ab-tooltip {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  width: 320px;
  padding: 10px 12px;
  background: rgba(8, 11, 18, 0.97);
  border: 1px solid var(--gold);
  border-radius: 6px;
  font-size: 12.5px;
  line-height: 1.6;
  color: #d8dfeb;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.7);
  pointer-events: none;
}
.ab-tooltip h5 { margin: 0 0 4px; font-size: 14px; color: var(--gold-hi); display: flex; justify-content: space-between; gap: 8px; }
.ab-tooltip h5 span { font-size: 11px; color: var(--ash-muted); font-weight: 600; }

/* ============ 触屏 ============ */
.touch-controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 175px;
  pointer-events: none;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 10px 18px max(12px, env(safe-area-inset-bottom));
  z-index: 19;
}
.pad-left, .pad-right { pointer-events: auto; }
.joystick-zone { width: 132px; height: 132px; display: flex; align-items: center; justify-content: center; }
.joystick-base { position: relative; width: 110px; height: 110px; border-radius: 50%; background: rgba(16, 18, 26, 0.7); border: 2px solid rgba(217, 180, 106, 0.45); }
.joystick-stick { position: absolute; width: 44px; height: 44px; left: 50%; top: 50%; transform: translate(-50%, -50%); border-radius: 50%; background: rgba(232, 237, 245, 0.85); border: 2px solid #09090b; }
.pad-right { position: relative; width: 262px; height: 162px; }
.act-btn {
  position: absolute;
  border-radius: 50%;
  font-family: var(--font-pixel);
  color: var(--paper-white);
  border: 2px solid var(--line-mid);
  background: rgba(18, 22, 32, 0.88);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  touch-action: none;
}
.act-btn > span, .ab-slot > span, .ab-slot > div { pointer-events: none; }
.act-up-arrow { position: absolute; top: 1px; font-size: 7px; line-height: 1; opacity: 0.72; color: var(--gold-hi); }
.act-btn:active, .act-btn.pressed { transform: scale(0.94); border-color: var(--gold); }
.btn-main { font-size: 12px; font-weight: 700; }
.btn-sub { font-size: 9px; color: var(--ash-muted); }
.atk-btn { width: 70px; height: 70px; right: 4px; bottom: 4px; border-color: var(--gold); }
.skill-btn { width: 54px; height: 54px; right: 82px; bottom: 8px; }
.ult-btn { width: 56px; height: 56px; right: 68px; bottom: 72px; }
.ult-btn.ready { background: rgba(217, 180, 106, 0.95); color: #15110a; border-color: #fff; }
.ult-btn.ready .btn-sub { color: #222; }
.dash-btn { width: 50px; height: 50px; right: 6px; bottom: 84px; }
.use-btn { width: 48px; height: 48px; right: 144px; bottom: 10px; }
.gang-btn { width: 52px; height: 52px; right: 134px; bottom: 72px; border-color: var(--crimson); color: #f5b2b6; }
.gang-btn.active { background: var(--crimson); color: #fff; border-color: #fff; }
.item-btn { width: 48px; height: 48px; right: 200px; bottom: 12px; border-color: rgba(126, 212, 168, 0.75); color: #b8f5d2; }
.bomb-btn { width: 48px; height: 48px; right: 196px; bottom: 70px; border-color: rgba(242, 166, 90, 0.8); color: #ffd3a0; }

body.pc-mode .touch-controls, body.pc-mode .party-strip-portrait { display: none !important; }
body:not(.pc-mode) .action-bar { display: none !important; }
body:not(.pc-mode) .quest-tracker { display: none; }

@media (max-width: 900px) {
  .hud-left { width: 240px; }
  #minimap { width: 160px; height: 110px; }
  .hud-center .loc-plate { padding: 4px 10px; }
  .loc-banner { font-size: 14px; }
  .party-bar { top: 180px; }
  .party-slot { width: 140px; }
}

@media (orientation: portrait) {
  .hud-center { display: none; }
  .minimap-wrap { display: none; }
  body:not(.pc-mode) .party-bar { display: none !important; }
  body:not(.pc-mode) .party-strip-portrait {
    flex: 0 0 auto;
    display: flex;
    gap: 4px;
    padding: 5px 6px;
    background: #0d1018;
    border-top: 1px solid var(--line-dim);
    border-bottom: 1px solid var(--line-dim);
    overflow-x: auto;
    touch-action: pan-x;
    -webkit-overflow-scrolling: touch;
    z-index: 20;
  }
  body:not(.pc-mode) .party-strip-portrait .party-slot { flex: 1 1 0; min-width: 54px; width: auto; flex-direction: column; gap: 2px; padding: 3px; text-align: center; }
  body:not(.pc-mode) .party-strip-portrait .party-slot.active { transform: translateY(-1px); }
  body:not(.pc-mode) .party-strip-portrait .slot-key { display: none; }
  body:not(.pc-mode) .touch-controls { position: relative; flex: 0 0 180px; height: 180px; background: #0a0c12; }
}

/* ============ 调试面板 ============ */
.debug-content { overflow-y: auto; max-height: 74dvh; display: flex; flex-direction: column; gap: 12px; padding-right: 4px; }
.debug-section { background: #0e1320; border: 1px solid var(--line-dim); border-radius: 5px; padding: 10px; }
.debug-section h4 { margin: 0 0 8px; color: var(--gold); font-size: 13px; border-bottom: 1px solid #232c40; padding-bottom: 4px; }
.debug-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.debug-input, .debug-select {
  background: #080b12;
  color: var(--paper-white);
  border: 1px solid var(--line-mid);
  border-radius: 3px;
  padding: 5px 8px;
  font-family: var(--font-pixel);
  font-size: 12px;
  user-select: text;
  -webkit-user-select: text;
}

/* ============ 主菜单 ============ */
.overlay-screen {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(18, 22, 32, 0.96), rgba(4, 5, 8, 0.99));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 40;
  overflow-y: auto;
}
.title-screen { background: #030406; padding: 0; }
.title-bg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.title-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(3, 4, 6, 0.92) 0%, rgba(3, 4, 6, 0.55) 42%, rgba(3, 4, 6, 0.1) 70%, rgba(3, 4, 6, 0.6) 100%),
    radial-gradient(ellipse at center, transparent 50%, rgba(0, 0, 0, 0.6) 100%);
}
.title-layout {
  position: relative;
  z-index: 2;
  width: min(1180px, 94vw);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 40px;
}
.title-left { max-width: 540px; }
.school-time-tag {
  display: inline-block;
  padding: 4px 14px;
  border: 1px solid var(--crimson-hi);
  background: rgba(60, 10, 14, 0.5);
  color: #ffc8cb;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 3px;
  border-radius: 3px;
}
.game-title {
  margin: 18px 0 2px;
  font-family: var(--font-title);
  font-size: clamp(48px, 8vw, 92px);
  font-weight: 900;
  letter-spacing: 14px;
  color: #f3f5f9;
  text-shadow: 0 0 30px rgba(226, 84, 90, 0.35), 0 4px 0 #000, 0 0 2px #000;
  line-height: 1.05;
}
.game-title-en { font-size: 13px; letter-spacing: 7px; color: var(--gold); font-weight: 700; }
.game-subtitle { margin: 18px 0 26px; font-size: 15px; line-height: 1.8; color: #b8c2d4; }
.title-menu { display: flex; flex-direction: column; gap: 8px; width: 300px; }
.menu-btn {
  text-align: left;
  font-family: var(--font-pixel);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 2px;
  color: #dfe5ef;
  background: linear-gradient(90deg, rgba(20, 26, 40, 0.85), rgba(20, 26, 40, 0));
  border: none;
  border-left: 3px solid var(--line-mid);
  padding: 11px 18px;
  cursor: pointer;
  transition: all 0.15s;
}
.menu-btn:hover { border-left-color: var(--gold); color: #fff; padding-left: 26px; background: linear-gradient(90deg, rgba(70, 56, 26, 0.75), rgba(20, 26, 40, 0)); }
.menu-btn.primary { color: var(--gold-hi); border-left-color: var(--gold); font-size: 19px; }
.menu-btn.danger { color: #e49a9e; font-size: 13px; }
.title-hint { margin-top: 18px; font-size: 12px; color: var(--ash-muted); }
.title-hint b { color: var(--gold-hi); }

.title-right {
  width: 400px;
  padding: 16px;
  background: rgba(8, 11, 18, 0.72);
  border: 1px solid var(--gold-dim);
  border-radius: 8px;
  backdrop-filter: blur(3px);
}
.roster-head { font-size: 12px; letter-spacing: 4px; color: var(--gold); font-weight: 700; margin-bottom: 10px; }
.title-roster-preview { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.roster-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 4px;
  background: linear-gradient(180deg, #172036, #0c111c);
  border: 1px solid var(--line-mid);
  border-radius: 5px;
}
.roster-chip.locked { opacity: 0.45; border-style: dashed; }
.roster-chip canvas { width: 46px; height: 46px; border-radius: 4px; }
.roster-chip span { margin-top: 4px; font-size: 13px; font-weight: 700; }
.roster-chip small { font-size: 10.5px; color: var(--ash-muted); }
.title-feature-list { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: #aeb8ca; line-height: 1.5; }
.title-feature-list b { color: #fff; }
.title-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 12px 0; }

@media (max-width: 900px) {
  .title-layout { flex-direction: column; align-items: stretch; padding: 30px 0; }
  .title-right { width: auto; }
  .title-menu { width: auto; }
  .title-screen { overflow-y: auto; align-items: flex-start; }
}

/* ============ 弹窗 ============ */
.modal-mask {
  position: absolute;
  inset: 0;
  background: rgba(2, 3, 6, 0.78);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  z-index: 65;
}
.dialogue-box { width: min(720px, 100%); padding: 16px 18px 10px; display: flex; flex-direction: column; gap: 10px; border-top: 2px solid var(--gold); }
.dlg-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; border-bottom: 1px solid var(--line-dim); padding-bottom: 10px; }
.dlg-speaker-wrap { display: flex; align-items: center; gap: 12px; }
#dlg-portrait { width: 56px; height: 56px; background: radial-gradient(circle at 50% 35%, #2a3550, #0d111b); border: 2px solid var(--gold); border-radius: 6px; }
.dlg-speaker { font-size: 18px; font-weight: 700; color: #fff; }
.dlg-sub { font-size: 12px; color: var(--ash-muted); }
.dlg-swap-bar { display: flex; align-items: center; gap: 4px; }
.dlg-swap-btn { width: 32px; height: 32px; padding: 2px; background: #0e131f; border: 1px solid var(--line-mid); border-radius: 4px; cursor: pointer; }
.dlg-swap-btn.active { border: 2px solid var(--gold); }
.dlg-body { font-size: 15px; line-height: 1.85; color: #eef1f7; min-height: 70px; white-space: pre-line; }
.dlg-choices { display: flex; flex-direction: column; gap: 6px; max-height: 42dvh; overflow-y: auto; }
.choice-btn {
  text-align: left;
  font-family: var(--font-pixel);
  font-size: 14px;
  color: var(--paper-white);
  background: linear-gradient(90deg, rgba(30, 38, 56, 0.9), rgba(18, 22, 34, 0.6));
  border: 1px solid var(--line-dim);
  border-left: 3px solid var(--line-mid);
  border-radius: 3px;
  padding: 9px 14px;
  cursor: pointer;
}
.choice-btn:hover { border-color: var(--gold-dim); border-left-color: var(--gold); background: linear-gradient(90deg, rgba(64, 52, 26, 0.85), rgba(18, 22, 34, 0.6)); }
.dlg-foot { font-size: 11px; color: var(--ash-muted); text-align: right; }

.codex-box { width: min(820px, 100%); max-height: 90dvh; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.codex-wide { width: min(1100px, 100%); height: min(86dvh, 820px); }
.modal-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; border-bottom: 1px solid var(--line-dim); padding-bottom: 10px; }
.modal-top h2 { margin: 0; font-size: 17px; color: var(--gold-hi); letter-spacing: 2px; }
.tab-row { display: flex; flex-wrap: wrap; gap: 3px; }
.tab-btn {
  font-family: var(--font-pixel);
  font-size: 13px;
  font-weight: 700;
  color: var(--ash-muted);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 6px 10px;
  cursor: pointer;
}
.tab-btn:hover { color: #fff; }
.tab-btn.active { color: var(--gold-hi); border-bottom-color: var(--gold); }

.codex-content {
  flex: 1;
  overflow-y: auto;
  padding-right: 6px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 10px;
  align-content: start;
}
.codex-content.single { display: block; }
.info-card {
  background: linear-gradient(180deg, #121828, #0c111c);
  border: 1px solid var(--line-dim);
  border-radius: 5px;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.6;
  color: #c8d0de;
}
.info-card.unlocked { border-color: var(--line-mid); }
.info-card.hl { border-color: var(--gold); box-shadow: inset 0 0 0 1px rgba(217, 180, 106, 0.2); }
.info-card h4 { margin: 0 0 5px; color: #fff; font-size: 14px; display: flex; justify-content: space-between; gap: 6px; align-items: baseline; }
.info-card h4 small { color: var(--ash-muted); font-weight: 600; font-size: 11px; }
.info-card p { margin: 4px 0; }
.info-card .muted { color: var(--ash-muted); font-size: 12px; }
.info-card .tag {
  display: inline-block;
  font-size: 11px;
  padding: 0 6px;
  border-radius: 8px;
  border: 1px solid var(--line-mid);
  color: #c8d0de;
  margin-right: 4px;
}
.section-title {
  grid-column: 1 / -1;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--gold);
  border-bottom: 1px solid var(--line-dim);
  padding: 6px 0 4px;
  margin-top: 4px;
}

/* 角色详情页 */
.char-sheet {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 16px;
  background: linear-gradient(135deg, #141b2c, #0b0f19);
  border: 1px solid var(--gold-dim);
  border-radius: 6px;
  padding: 14px;
}
.cs-portrait { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.cs-portrait canvas { width: 160px; height: 160px; background: radial-gradient(circle at 50% 35%, #2a3550, #0b0e16); border: 2px solid var(--gold); border-radius: 8px; }
.cs-name { font-size: 22px; font-weight: 800; color: #fff; }
.cs-tag { font-size: 12px; color: var(--gold-hi); text-align: center; }
.cs-elem { font-size: 12px; padding: 1px 10px; border-radius: 10px; border: 1px solid currentColor; }
.cs-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 10px; }
.cs-stat { background: rgba(0, 0, 0, 0.35); border: 1px solid var(--line-dim); border-radius: 4px; padding: 5px 8px; }
.cs-stat b { display: block; font-size: 17px; color: #fff; }
.cs-stat span { font-size: 11px; color: var(--ash-muted); }
.cs-desc { font-size: 13px; color: #c8d0de; line-height: 1.7; margin-bottom: 10px; }
.cs-skill { display: flex; gap: 10px; padding: 8px 10px; margin-bottom: 6px; background: rgba(0, 0, 0, 0.3); border: 1px solid var(--line-dim); border-left: 3px solid var(--elem, var(--gold)); border-radius: 4px; }
.cs-skill .k { flex-shrink: 0; min-width: 46px; height: 26px; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; background: #1c2436; border: 1px solid var(--line-mid); border-radius: 4px; color: #fff; }
.cs-skill h6 { margin: 0 0 2px; font-size: 14px; color: #fff; }
.cs-skill p { margin: 0; font-size: 12.5px; color: #b8c2d4; line-height: 1.6; }
.cs-picker { grid-column: 1 / -1; display: flex; gap: 6px; flex-wrap: wrap; }
.cs-pick { display: flex; align-items: center; gap: 6px; padding: 4px 10px 4px 4px; background: #121828; border: 1px solid var(--line-dim); border-radius: 5px; cursor: pointer; font-size: 13px; font-weight: 700; color: #dfe5ef; }
.cs-pick canvas { width: 28px; height: 28px; image-rendering: pixelated; }
.cs-pick.active { border-color: var(--gold); color: var(--gold-hi); }
.cs-pick.locked { opacity: 0.4; }

.equip-row { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr 2fr; gap: 10px; }
.equip-slot { background: linear-gradient(180deg, #1a2032, #0e131f); border: 1px solid var(--gold-dim); border-radius: 5px; padding: 10px 12px; }
.equip-slot .lbl { font-size: 11px; color: var(--gold); letter-spacing: 2px; font-weight: 700; }
.equip-slot .val { font-size: 15px; color: #fff; font-weight: 700; margin-top: 2px; }
.equip-slot .sub { font-size: 12px; color: var(--ash-muted); margin-top: 2px; }

.quest-card { border-left: 3px solid var(--line-mid); }
.quest-card.main { border-left-color: var(--crimson-hi); }
.quest-card.done { opacity: 0.6; }
.quest-card.current { border-color: var(--gold); border-left-color: var(--gold); box-shadow: 0 0 12px rgba(217, 180, 106, 0.15); }

.help-content { overflow-y: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 20px; font-size: 13.5px; }
.help-group h4 { margin: 0 0 6px; color: var(--gold); font-size: 13px; letter-spacing: 2px; border-bottom: 1px solid var(--line-dim); padding-bottom: 3px; }
.help-row { display: flex; justify-content: space-between; gap: 8px; padding: 3px 0; color: #c8d0de; }
.help-row kbd {
  font-family: var(--font-pixel);
  font-size: 12px;
  font-weight: 800;
  padding: 1px 7px;
  background: #1c2436;
  border: 1px solid var(--line-mid);
  border-bottom-width: 2px;
  border-radius: 4px;
  color: #fff;
  white-space: nowrap;
}

/* 地图 */
.map-box { width: min(1100px, 100%); }
.map-layout { display: grid; grid-template-columns: 1.3fr 1fr; gap: 12px; min-height: 0; overflow: hidden; }
.map-canvas-wrap { display: flex; flex-direction: column; gap: 6px; min-height: 0; }
#map-blueprint { width: 100%; height: auto; max-height: 66dvh; object-fit: contain; background: #0a0e16; border: 1px solid var(--line-dim); border-radius: 5px; }
.map-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: #c8d0de; }
.map-legend i { display: inline-block; width: 10px; height: 10px; margin-right: 4px; border-radius: 2px; vertical-align: middle; }
.map-grid { overflow-y: auto; display: flex; flex-direction: column; gap: 5px; max-height: 70dvh; padding-right: 4px; }
.map-node-btn {
  text-align: left;
  font-family: var(--font-pixel);
  font-size: 13px;
  background: linear-gradient(90deg, #161d2e, #0f1420);
  border: 1px solid var(--line-dim);
  border-left: 3px solid var(--zc, var(--line-mid));
  border-radius: 3px;
  color: var(--paper-white);
  padding: 7px 10px;
  cursor: pointer;
}
.map-node-btn small { color: var(--ash-muted); }
.map-node-btn:hover:not(:disabled) { border-color: var(--gold-dim); }
.map-node-btn.current { border-color: var(--gold); background: linear-gradient(90deg, #3a3020, #141820); }
.map-node-btn:disabled { opacity: 0.38; cursor: not-allowed; }
@media (max-width: 900px) { .map-layout { grid-template-columns: 1fr; } .help-content { grid-template-columns: 1fr; } .char-sheet { grid-template-columns: 1fr; } .cs-stats { grid-template-columns: repeat(2, 1fr); } .equip-row { grid-template-columns: 1fr; } }

/* 结局 */
.ending-card { width: min(660px, 100%); padding: 24px 22px; text-align: center; border-top: 2px solid var(--gold); }
.ending-tag { display: inline-block; padding: 2px 12px; background: rgba(60, 10, 14, 0.6); border: 1px solid var(--crimson-hi); color: #ffc0c3; font-size: 12px; border-radius: 3px; }
.ending-title { margin: 12px 0; font-family: var(--font-title); font-size: 30px; color: #fff; letter-spacing: 3px; }
.ending-art { width: 192px; height: 128px; border: 2px solid var(--gold); background: #0b0e16; margin: 6px auto; border-radius: 5px; }
.ending-desc { font-size: 14px; line-height: 1.85; color: #dfe4ee; text-align: left; background: rgba(0, 0, 0, 0.35); border: 1px solid var(--line-dim); border-radius: 4px; padding: 12px 14px; white-space: pre-line; }
.ending-stats { font-size: 12px; color: var(--ash-muted); margin-bottom: 10px; }

.save-hint { margin: 0; font-size: 12.5px; color: var(--ash-muted); line-height: 1.6; }
.save-textarea {
  width: 100%;
  background: #070a10;
  color: #e0e6f0;
  border: 1px solid var(--line-mid);
  border-radius: 4px;
  padding: 8px;
  font-family: Consolas, monospace;
  font-size: 12px;
  resize: vertical;
  user-select: text;
  -webkit-user-select: text;
}

.toast-container { position: absolute; top: 120px; right: 196px; display: flex; flex-direction: column; gap: 6px; z-index: 85; pointer-events: none; }
.toast-item {
  background: linear-gradient(90deg, rgba(14, 18, 28, 0.97), rgba(10, 13, 21, 0.95));
  border: 1px solid var(--line-mid);
  border-left: 3px solid var(--gold);
  border-radius: 4px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.6);
  padding: 8px 12px;
  font-size: 12.5px;
  color: #dfe5ef;
  max-width: 300px;
  animation: slideIn 0.2s ease-out;
}
.toast-item strong { display: block; color: var(--gold-hi); margin-bottom: 2px; font-size: 13px; }
@keyframes slideIn { from { transform: translateX(28px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #2a3448; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #3c4a66; }


/* ================= GTA式校内通缉星级（悬浮于小地图左侧，绝不顶歪小地图或遮挡角色1！） ================= */
.wanted-hud {
  position: absolute;
  right: 242px;
  top: 46px;
  white-space: nowrap;
  z-index: 26;
  background: linear-gradient(135deg, rgba(36, 12, 16, 0.94), rgba(16, 18, 26, 0.92));
  border: 1px solid rgba(224, 92, 98, 0.78);
  border-radius: 7px;
  padding: 5px 11px;
  margin-bottom: 0;
  text-align: right;
  box-shadow: 0 4px 16px rgba(185, 42, 50, 0.36);
  pointer-events: none;
}
@media (max-width: 900px) {
  .wanted-hud { right: 176px; top: 44px; padding: 4px 8px; }
}
@media (orientation: portrait) {
  .wanted-hud { position: static; margin-top: 2px; }
}
.wanted-stars {
  font-size: 18px;
  letter-spacing: 3px;
  line-height: 1.1;
  color: #ffd36a;
  text-shadow: 0 0 8px rgba(255, 190, 70, 0.75), 0 1px 2px #000;
  font-weight: 800;
}
.wanted-hud.evading {
  border-color: rgba(224, 192, 120, 0.65);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
}
.wanted-hud.evading .wanted-stars {
  animation: wantedBlink 0.75s ease-in-out infinite;
}
.wanted-sub {
  font-size: 11.5px;
  color: #ffb8be;
  margin-top: 2px;
  font-weight: 600;
}
.wanted-hud.evading .wanted-sub {
  color: #ffe3a0;
}
@keyframes wantedBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.28; }
}

.time-fade {
  position: fixed;
  inset: 0;
  z-index: 95;
  background: #04060a;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.34s ease;
  pointer-events: none;
}
.time-fade.active {
  opacity: 1;
  pointer-events: auto;
}
.time-fade-inner {
  text-align: center;
  padding: 20px 32px;
}
.tf-reason {
  font-size: 18px;
  font-weight: 700;
  color: #e8ecf4;
  letter-spacing: 1px;
  margin-bottom: 8px;
}
.tf-clock {
  font-size: 14px;
  color: #d9b46a;
  letter-spacing: 1.5px;
}


/* ================= 原神式传送锚点快捷栏与列表样式 ================= */
.wp-quick-row {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 4px;
}
.wp-quick-pill {
  flex: 1 1 auto;
  background: linear-gradient(135deg, rgba(24, 62, 88, 0.92), rgba(16, 32, 52, 0.94));
  border: 1px solid rgba(95, 212, 255, 0.72);
  color: #e6f8ff;
  border-radius: 6px;
  padding: 7px 10px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  box-shadow: 0 2px 10px rgba(60, 185, 240, 0.22);
}
.wp-quick-pill:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: #9be8ff;
  box-shadow: 0 4px 14px rgba(95, 212, 255, 0.42);
}
.wp-quick-pill:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}
.map-node-btn.wp-anchor-btn {
  border-left: 3px solid #5fd4ff;
  background: linear-gradient(90deg, rgba(22, 50, 74, 0.65), rgba(18, 24, 36, 0.85));
}
.map-node-btn.wp-anchor-btn.locked {
  border-left-color: #556074;
  background: rgba(16, 20, 28, 0.72);
}
#map-blueprint {
  cursor: pointer;
}


/* ================= 原神式拨表盘快捷跳时间面板 ================= */
.loc-clock {
  cursor: pointer;
  pointer-events: auto;
  transition: color 0.15s ease, transform 0.12s ease;
}
.loc-clock:hover {
  color: #ffe3a0;
  transform: scale(1.03);
}
.time-modal-box {
  max-width: 680px;
}
.time-modal-body {
  display: flex;
  gap: 20px;
  align-items: center;
  padding: 6px 4px;
  flex-wrap: wrap;
}
.time-dial-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 0 0 236px;
}
#clock-dial {
  width: 228px;
  height: 228px;
  cursor: grab;
  border-radius: 50%;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.55), inset 0 0 18px rgba(217, 180, 106, 0.16);
}
#clock-dial:active {
  cursor: grabbing;
}
.dial-tip {
  font-size: 11.5px;
  color: #8e9bb2;
  margin-top: 6px;
}
.time-ctrl-col {
  flex: 1 1 320px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.tm-preview {
  background: rgba(14, 20, 32, 0.9);
  border: 1px solid rgba(217, 180, 106, 0.55);
  border-radius: 7px;
  padding: 10px 12px;
  font-size: 13.5px;
  line-height: 1.55;
  color: #e8ecf4;
}
.tm-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.tm-input-row label {
  font-size: 12.5px;
  color: #b7c3d6;
  white-space: nowrap;
}
.tm-time-input {
  background: #101624;
  border: 1px solid #3c4a66;
  border-radius: 5px;
  color: #ffe3a0;
  padding: 4px 8px;
  font-size: 14px;
  font-weight: 700;
}
.tm-slider {
  flex: 1;
  accent-color: #e0c078;
  cursor: pointer;
}
.tm-preset-label {
  font-size: 12px;
  color: #8e9bb2;
}
.tm-presets {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.tm-preset-btn {
  background: rgba(24, 32, 48, 0.9);
  border: 1px solid rgba(110, 130, 165, 0.45);
  border-radius: 5px;
  color: #dce4f2;
  padding: 6px 4px;
  font-size: 12px;
  cursor: pointer;
  transition: border-color 0.12s ease, background 0.12s ease;
}
.tm-preset-btn:hover {
  border-color: #e0c078;
  background: rgba(44, 54, 76, 0.95);
  color: #ffe3a0;
}
.tm-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}


/* ================= 快捷消耗品/炸弹双槽 & PUBG/PUBGM 轮盘菜单样式 ================= */
.ab-slot.ab-item {
  border-color: rgba(126, 212, 168, 0.52);
}
.ab-slot.ab-bomb {
  border-color: rgba(242, 166, 90, 0.56);
}
.ab-slot.ab-item.empty, .ab-slot.ab-bomb.empty {
  opacity: 0.45;
  border-color: rgba(110, 122, 145, 0.35);
}
.ab-cnt {
  position: absolute;
  top: 2px;
  right: 4px;
  font-size: 10.5px;
  font-weight: 800;
  color: #9ef0c0;
  text-shadow: 0 1px 2px #000;
  pointer-events: none;
}
.ab-slot.ab-bomb .ab-cnt {
  color: #ffd39b;
}

/* PUBG 端游屏幕正中轮盘 */
.pubg-wheel {
  position: fixed;
  inset: 0;
  z-index: 65;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, rgba(6, 9, 15, 0.52) 0%, rgba(4, 6, 10, 0.25) 60%, transparent 100%);
  touch-action: none;
}
#pubg-wheel-canvas {
  width: 420px;
  height: 420px;
  max-width: 92vw;
  max-height: 92vw;
  cursor: crosshair;
}
.pubg-wheel-center {
  position: absolute;
  width: 138px;
  text-align: center;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.pw-icon { font-size: 26px; line-height: 1.1; }
.pw-title { font-size: 13px; font-weight: 800; color: #f6e3b4; }
.pw-cnt { font-size: 11.5px; font-weight: 700; color: #9ef0c0; }
.pw-desc { font-size: 10.5px; line-height: 1.35; color: #b8c4d8; max-width: 132px; }
.pw-hint { margin-top: 3px; font-size: 9.5px; color: #8c9ab4; }

/* PUBGM 手游按钮正上方弹出式快捷小菜单 */
.pubgm-popup {
  position: fixed;
  z-index: 68;
  width: 224px;
  background: rgba(10, 14, 22, 0.96);
  border: 1px solid rgba(217, 180, 106, 0.72);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.8);
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  touch-action: pan-y;
}
.pubgm-popup::after {
  content: "";
  position: absolute;
  bottom: -6px;
  left: var(--arrow-x, 50%);
  transform: translateX(-50%) rotate(45deg);
  width: 10px;
  height: 10px;
  background: rgba(10, 14, 22, 0.96);
  border-right: 1px solid rgba(217, 180, 106, 0.72);
  border-bottom: 1px solid rgba(217, 180, 106, 0.72);
}
.pubgm-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2px 4px 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 11.5px;
  font-weight: 800;
  color: var(--gold-hi);
}
.pubgm-close {
  background: transparent;
  border: none;
  color: #9aa8bf;
  font-size: 13px;
  padding: 0 4px;
  cursor: pointer;
}
.pubgm-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
  max-height: 250px;
  overflow-y: auto;
}
.pubgm-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 7px;
  border-radius: 5px;
  background: rgba(24, 31, 46, 0.88);
  border: 1px solid rgba(90, 108, 140, 0.35);
  cursor: pointer;
}
.pubgm-row.active {
  border-color: #7ed4a8;
  background: rgba(32, 54, 48, 0.88);
}
.pubgm-row.empty {
  opacity: 0.42;
}
.pubgm-row-ico { font-size: 18px; flex-shrink: 0; }
.pubgm-row-info { flex: 1; min-width: 0; }
.pubgm-row-name { font-size: 12px; font-weight: 700; color: #eef2f9; display: flex; justify-content: space-between; }
.pubgm-row-cnt { color: #9ef0c0; font-weight: 800; margin-left: 4px; }
.pubgm-row-sub { font-size: 10px; color: #9aa8bf; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pubgm-use-pill {
  flex-shrink: 0;
  background: linear-gradient(180deg, #3c331e, #241e12);
  border: 1px solid var(--gold);
  color: var(--gold-hi);
  border-radius: 4px;
  padding: 3px 7px;
  font-size: 11px;
  font-weight: 700;
}
.wanted-hud.police-mode {
  animation: policeSiren 0.65s ease-in-out infinite;
}
@keyframes policeSiren {
  0%, 100% {
    border-color: #ff4d58;
    box-shadow: 0 4px 18px rgba(255, 58, 72, 0.55);
  }
  50% {
    border-color: #4da6ff;
    box-shadow: 0 4px 18px rgba(70, 155, 255, 0.55);
  }
}
