*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --bg: #08080f;
  --panel: rgba(14,14,24,0.90);
  --border: rgba(255,255,255,0.07);
  --accent: #0A84FF;
  --green: #30D158;
  --red: #FF453A;
  --t1: rgba(255,255,255,0.92);
  --t2: rgba(255,255,255,0.45);
  --t3: rgba(255,255,255,0.20);
  --blur: blur(5px) saturate(200%);
  --r: 14px;
  --shadow: 0 8px 40px rgba(0,0,0,0.6), 0 2px 8px rgba(0,0,0,0.4);
}
html, body { width:100%; height:100%; overflow:hidden; background:var(--bg);
  font-family:-apple-system,'SF Pro Display','Helvetica Neue',Arial,sans-serif;
  color:var(--t1); -webkit-font-smoothing:antialiased;
  overscroll-behavior:none; touch-action:none; -webkit-text-size-adjust:100%; }
#map { position:fixed; inset:0; z-index:0; touch-action:none; }

/* ── 等待数据默认页 ── */
.data-waiting-overlay {
  position:fixed; inset:0; z-index:1200;
  display:flex; align-items:center; justify-content:center;
  background:radial-gradient(ellipse at 50% 42%, rgba(20,28,50,0.92) 0%, rgba(8,8,15,0.94) 68%);
  opacity:0; visibility:hidden; pointer-events:none;
  transition:opacity .24s ease, visibility .24s ease;
}
.data-waiting-overlay.show {
  opacity:1; visibility:visible; pointer-events:auto;
}
.data-waiting-card {
  display:flex; flex-direction:column; align-items:center; gap:18px;
  padding:34px 42px; border-radius:22px;
  background:rgba(16,16,30,0.78);
  backdrop-filter:blur(28px) saturate(180%);
  -webkit-backdrop-filter:blur(28px) saturate(180%);
  border:1px solid rgba(255,255,255,0.08);
  box-shadow:0 24px 76px rgba(0,0,0,0.55), 0 0 0 1px rgba(255,255,255,0.035) inset;
}
.data-waiting-spinner {
  width:38px; height:38px; border-radius:50%;
  border:3px solid rgba(255,255,255,0.12);
  border-top-color:var(--accent);
  box-shadow:0 0 18px rgba(10,132,255,0.28);
  animation:dataSpin .9s linear infinite;
}
.data-waiting-title {
  font-size:20px; font-weight:800; letter-spacing:1.2px; color:#fff;
  text-shadow:0 2px 12px rgba(0,0,0,0.5);
}
@keyframes dataSpin { to { transform:rotate(360deg); } }

/* ── Top Bar ── */
.topbar {
  position:fixed; top:0; left:0; right:0; height:46px;
  background:transparent; backdrop-filter:none; -webkit-backdrop-filter:none;
  border-bottom:none; border-radius:0;
  box-shadow:none; z-index:1000;
  display:flex; align-items:center; gap:6px; padding:0 14px;
}
.topbar-logo {
  display:flex; align-items:center; gap:7px;
  font-size:13px; font-weight:700; white-space:nowrap; margin-right:2px;
}
.logo-mark {
  width:24px; height:24px; border-radius:7px; flex-shrink:0;
  overflow:hidden;
}
.logo-mark img { width:100%; height:100%; object-fit:cover; }
.topbar-sep { width:1px; height:22px; background:var(--border); margin:0 2px; flex-shrink:0; }
.map-tabs { display:flex; gap:2px; flex:1; overflow-x:auto; overflow-y:visible; scrollbar-width:none; }
.map-tabs::-webkit-scrollbar { display:none; }
.map-tab {
  padding:5px 11px; border-radius:8px; font-size:11px; font-weight:500;
  color:var(--t2); cursor:pointer; border:none; background:transparent;
  transition:all .15s; white-space:nowrap; font-family:inherit;
}
.map-tab:hover { color:var(--t1); background:rgba(255,255,255,0.07); }
.map-tab.active { color:var(--accent); background:rgba(10,132,255,0.15); }
.topbar-pill {
  display:flex; align-items:center; gap:5px;
  padding:5px 10px; border-radius:20px; cursor:pointer;
  background:rgba(255,255,255,0.05); border:1px solid var(--border);
  font-size:11px; font-weight:500; color:var(--t2);
  transition:all .15s; white-space:nowrap; font-family:inherit;
}
.topbar-pill:hover { background:rgba(255,255,255,0.1); color:var(--t1); }
.topbar-pill.active { color:var(--accent); border-color:rgba(10,132,255,0.3); background:rgba(10,132,255,0.1); }
.conn-dot { width:6px; height:6px; border-radius:50%; background:#636366; transition:background .3s; flex-shrink:0; }
.conn-dot.ok  { background:var(--green); box-shadow:0 0 7px var(--green); }
.conn-dot.err { background:var(--red); }

/* ── Sidebar ── */
.sidebar {
  position:fixed; top:56px; right:10px; bottom:10px; width:224px;
  display:flex; flex-direction:column; gap:0;
  z-index:999; overflow-y:auto; overflow-x:hidden; scrollbar-width:none;
  transition:transform .3s cubic-bezier(.4,0,.2,1);
  background:var(--panel); backdrop-filter:var(--blur); -webkit-backdrop-filter:var(--blur);
  border:1px solid var(--border); border-radius:0 var(--r) var(--r) 0;
  box-shadow:var(--shadow);
}
.sidebar::-webkit-scrollbar { display:none; }
.sidebar.collapsed { transform:translateX(calc(100% + 10px)); }
.topbar-pill.settings-open {
  color:#fff; border-color:rgba(10,132,255,0.48);
  background:rgba(10,132,255,0.22);
  box-shadow:0 0 18px rgba(10,132,255,0.22);
}
.sidebar-toggle {
  position:fixed; top:56px; right:233px; left:auto;
  width:22px; height:48px;
  background:linear-gradient(to right, var(--panel) 0%, rgba(10,132,255,0.22) 100%);
  border:1px solid rgba(10,132,255,0.35); border-right:none;
  border-radius:11px 0 0 11px;
  cursor:pointer; z-index:1000;
  color:var(--accent); font-size:14px; font-family:inherit;
  display:flex; align-items:center; justify-content:center;
  transition:left .3s cubic-bezier(.4,0,.2,1), box-shadow .2s, background .2s;
  box-shadow:4px 0 18px rgba(10,132,255,0.35), 2px 0 6px rgba(0,0,0,0.5);
  outline:none; user-select:none;
}
.sidebar-toggle:hover {
  background:linear-gradient(to right, var(--panel) 0%, rgba(10,132,255,0.38) 100%);
  box-shadow:4px 0 24px rgba(10,132,255,0.55), 2px 0 8px rgba(0,0,0,0.5);
}
.sidebar-toggle.collapsed { right:10px; left:auto; }

/* ── 浮动当局统计（收缩侧边栏时，收缩按钮下方，两列布局） ── */
.float-stats {
  position:fixed; top:110px; left:10px; z-index:998;
  display:none;
  flex-wrap:wrap; gap:1px 10px;
  width:150px;
  padding:6px 8px;
  background:transparent;
  pointer-events:none;
  user-select:none;
}
.float-stats.show { display:flex; }
.fs-title {
  width:100%;
  font-size:10px; font-weight:700; color:rgba(255,255,255,0.45);
  letter-spacing:1px; margin-bottom:2px;
  text-shadow:0 1px 3px rgba(0,0,0,0.8);
}
.fs-row {
  display:flex; align-items:center; gap:4px;
  width:calc(50% - 5px);
  font-size:11px; line-height:1.7;
}
.fs-dot {
  width:5px; height:5px; border-radius:50%; flex-shrink:0;
}
.fs-val {
  font-weight:700; font-size:12px; min-width:14px;
  color:#fff; text-shadow:0 1px 4px rgba(0,0,0,0.9);
}
.fs-lbl {
  color:rgba(255,255,255,0.5); font-size:10px;
  text-shadow:0 1px 3px rgba(0,0,0,0.8);
}

/* ── 浮动队伍面板（左下角）── */
.team-float {
  position:fixed; bottom:14px; left:14px; z-index:998;
  display:none; flex-direction:column; gap:3px;
  min-width:200px; max-width:240px;
}
.team-float.show { display:flex; }
.team-card {
  background:rgba(14,14,24,0.92);
  border:1px solid rgba(255,255,255,0.08); border-radius:6px;
  padding:6px 8px; cursor:pointer; transition:all .15s;
}
.team-card:hover { background:rgba(0,0,0,0.8); border-color:rgba(255,255,255,0.15); }
.team-card.active { border-color:rgba(10,132,255,0.5); background:rgba(10,132,255,0.12); }
.team-card .tc-top { display:flex; align-items:center; justify-content:space-between; margin-bottom:3px; }
.team-card .tc-name { font-size:12px; font-weight:600; color:#e6edf3; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:120px; }
.team-card .tc-gear { display:flex; gap:4px; align-items:center; font-size:10px; color:#8b949e; }
.team-card .tc-gear span { display:flex; align-items:center; gap:1px; }
.team-card .tc-bar { height:4px; border-radius:2px; background:rgba(255,255,255,0.1); overflow:hidden; }
.team-card .tc-bar-fill { height:100%; border-radius:2px; transition:width .3s; }

/* ── 右下角：对局信息 ── */
.team-info-panel {
  position:fixed;
  right:66px;
  bottom:14px;
  z-index:997;
  width:min(640px, 56vw);
  max-height:min(36vh, 286px);
  display:flex;
  flex-direction:column;
  background:linear-gradient(180deg, rgba(16,18,30,0.82), rgba(6,7,12,0.68));
  backdrop-filter:blur(16px) saturate(190%);
  -webkit-backdrop-filter:blur(16px) saturate(190%);
  border:1px solid rgba(255,255,255,0.105);
  border-radius:14px;
  box-shadow:0 14px 42px rgba(0,0,0,0.46), inset 0 1px 0 rgba(255,255,255,0.055);
  overflow:hidden;
  pointer-events:auto;
  transition:opacity .18s ease, transform .18s ease, visibility .18s ease;
}
.team-info-panel.hidden {
  opacity:0; visibility:hidden; pointer-events:none; transform:translateX(8px) scale(.98);
}
.team-info-title {
  display:flex; align-items:center; justify-content:space-between;
  gap:10px;
  padding:8px 10px 7px;
  font-size:10px; font-weight:700; letter-spacing:1px;
  color:rgba(255,255,255,0.58);
  text-shadow:0 1px 3px rgba(0,0,0,0.7);
  border-bottom:1px solid rgba(255,255,255,0.06);
}
.team-info-heading { display:flex; align-items:center; gap:7px; min-width:0; }
.team-info-heading > span:first-child { color:rgba(255,255,255,0.74); flex:0 0 auto; }
.team-info-count {
  display:inline-flex; align-items:center; justify-content:center;
  min-width:58px; height:20px; padding:0 8px;
  border-radius:999px;
  background:linear-gradient(135deg, rgba(48,209,88,0.22), rgba(10,132,255,0.16));
  border:1px solid rgba(48,209,88,0.28);
  color:#9EF7B2;
  font-size:10px; font-weight:900; letter-spacing:.3px;
  box-shadow:0 0 14px rgba(48,209,88,0.12);
}
.team-info-count.muted {
  min-width:38px;
  background:rgba(255,255,255,0.055);
  border-color:rgba(255,255,255,0.09);
  color:rgba(255,255,255,0.48);
  box-shadow:none;
}
.team-info-title button {
  width:18px; height:18px; border:0; border-radius:6px;
  background:rgba(255,255,255,0.07); color:rgba(255,255,255,0.55);
  cursor:pointer; font-size:13px; line-height:18px;
}
.match-info-content {
  min-height:0;
  display:grid;
  grid-template-columns:minmax(290px, 1.55fr) minmax(190px, .9fr);
  overflow:auto;
  scrollbar-width:none;
}
.match-info-content::-webkit-scrollbar { display:none; }
.match-info-section { min-width:0; min-height:0; }
.nearby-value-section { border-left:1px solid rgba(255,255,255,0.07); }
.match-info-section-title {
  min-height:28px;
  display:flex;
  align-items:center;
  gap:6px;
  padding:6px 8px 3px;
  color:rgba(255,255,255,0.56);
  font-size:9px;
  font-weight:800;
  letter-spacing:.5px;
  white-space:nowrap;
}
.match-info-meta { color:rgba(255,255,255,0.32); font-weight:600; letter-spacing:0; margin-left:auto; }
.match-info-badge { color:#FFD60A; letter-spacing:0; }
.team-info-list, .nearby-value-list {
  overflow:auto;
  padding:7px 8px 8px;
  scrollbar-width:none;
}
.team-info-list::-webkit-scrollbar, .nearby-value-list::-webkit-scrollbar { display:none; }
.team-info-empty {
  padding:4px 2px;
  text-align:right;
  font-size:11px;
  color:rgba(255,255,255,0.3);
}
.tig-dot { width:6px; height:6px; border-radius:50%; display:inline-block; flex-shrink:0; }
.tip-row {
  display:flex;
  justify-content:flex-start;
  gap:5px;
  align-items:center;
  padding:3px 7px 3px 8px;
  margin:2px 0;
  border-left:2px solid var(--team-color);
  border-radius:7px;
  background:linear-gradient(90deg, color-mix(in srgb, var(--team-color) 22%, transparent), rgba(255,255,255,0.045) 48%, rgba(255,255,255,0.018));
  border-top:none;
  font-size:10.5px;
  line-height:1.25;
  text-shadow:0 1px 3px rgba(0,0,0,0.8);
  white-space:nowrap;
}
.tip-team, .tip-hero, .tip-name, .tip-hp, .tip-weapon {
  overflow:hidden; white-space:nowrap; text-overflow:ellipsis;
}
.tip-team { display:flex; align-items:center; gap:3px; color:var(--team-color); font-weight:800; flex:0 0 auto; }
.tip-hero { color:rgba(255,255,255,0.92); font-weight:800; flex:0 1 auto; max-width:62px; }
.tip-name { color:rgba(255,255,255,0.52); font-size:10px; max-width:86px; }
.tip-gear {
  display:flex; align-items:center; gap:2px;
  font-weight:800; flex:0 0 auto;
}
.tip-hp {
  position:relative; width:48px; height:5px; flex:0 0 48px;
  border-radius:999px; overflow:hidden;
  background:linear-gradient(90deg, var(--hp-col) 0 var(--hp,0%), rgba(255,255,255,0.12) var(--hp,0%) 100%);
  box-shadow:inset 0 0 0 1px rgba(255,255,255,0.12), 0 0 5px color-mix(in srgb, var(--hp-col) 35%, transparent);
}
.tip-hp-empty {
  background:rgba(255,255,255,0.12);
  box-shadow:inset 0 0 0 1px rgba(255,255,255,0.12);
}
.gear-dot { width:6px; height:6px; border-radius:50%; display:inline-block; flex-shrink:0; }
.tip-weapon { color:rgba(255,255,255,0.7); max-width:96px; margin-left:auto; }
.nearby-item-row {
  display:grid;
  grid-template-columns:7px minmax(0,1fr) auto auto;
  align-items:center;
  gap:5px;
  min-height:24px;
  padding:3px 5px;
  margin:2px 0;
  border-radius:6px;
  background:rgba(255,255,255,0.035);
  font-size:10px;
  white-space:nowrap;
}
.nearby-item-dot { width:6px; height:6px; border-radius:50%; background:var(--item-color); box-shadow:0 0 6px var(--item-color); }
.nearby-item-name { overflow:hidden; text-overflow:ellipsis; color:rgba(255,255,255,0.82); font-weight:700; }
.nearby-item-value { color:#FFD60A; font-weight:800; }
.nearby-item-distance { color:rgba(255,255,255,0.38); font-variant-numeric:tabular-nums; }
.nearby-item-location { display:flex; align-items:center; justify-content:flex-end; gap:4px; font-variant-numeric:tabular-nums; }
.nearby-item-height { min-width:30px; font-weight:800; text-align:right; }
.nearby-item-height.above { color:#FF5A74; }
.nearby-item-height.below { color:#39D9FF; }
.nearby-item-height.same { color:rgba(255,255,255,0.34); }

.mock-view-switch {
  position:fixed;
  top:58px;
  left:50%;
  transform:translateX(-50%);
  z-index:1000;
  height:32px;
  display:flex;
  align-items:center;
  gap:2px;
  padding:3px;
  border:1px solid rgba(255,255,255,0.11);
  border-radius:7px;
  background:rgba(12,17,29,0.9);
  box-shadow:0 5px 18px rgba(0,0,0,0.38);
}
.mock-view-switch > span { padding:0 7px; color:rgba(255,255,255,0.48); font-size:10px; font-weight:800; white-space:nowrap; }
.mock-view-switch button {
  height:24px;
  padding:0 8px;
  border:0;
  border-radius:5px;
  background:transparent;
  color:rgba(255,255,255,0.58);
  font:700 10px sans-serif;
  cursor:pointer;
  white-space:nowrap;
}
.mock-view-switch button.active { background:rgba(10,132,255,0.3); color:#fff; }

.team-overview-toggle {
  position:fixed; right:14px; bottom:14px; z-index:998;
  width:42px; height:42px; border-radius:14px;
  border:1px solid rgba(255,255,255,0.12);
  background:rgba(14,14,24,0.92); color:#fff;
  font-size:11px; font-weight:900; line-height:1;
  box-shadow:0 6px 22px rgba(0,0,0,0.45);
  cursor:pointer; font-family:inherit;
}
.team-overview-toggle.active {
  background:rgba(10,132,255,0.34); border-color:rgba(10,132,255,0.45);
}

/* ── Panel card ── */
.panel {
  background:transparent;
  border:none; border-radius:0;
  box-shadow:none; padding:13px; flex-shrink:0;
  position:relative; overflow:hidden;
}
.panel + .panel {
  border-top:1px solid var(--border);
}
.panel-title {
  font-size:9.5px; font-weight:600; text-transform:uppercase;
  letter-spacing:0.9px; color:var(--t2); margin-bottom:11px;
  display:flex; align-items:center; gap:7px;
}
.panel-title::before {
  content:''; width:3px; height:10px; border-radius:2px;
  background:var(--accent); flex-shrink:0;
  box-shadow:0 0 6px rgba(10,132,255,0.6);
}

/* Stats */
.stats-grid { display:grid; grid-template-columns:1fr 1fr; gap:2px 8px; }
.stat-row {
  display:flex; align-items:center; gap:8px;
  padding:6px 8px; border-radius:8px; transition:background .12s;
}
.stat-row:hover { background:rgba(255,255,255,0.05); }
.stat-dot { width:8px; height:8px; border-radius:50%; flex-shrink:0; }
.stat-val { font-size:18px; font-weight:700; letter-spacing:-0.3px; line-height:1; min-width:20px; }
.stat-lbl { font-size:10px; font-weight:500; color:var(--t2); white-space:nowrap; }

/* Layer rows - 2 column grid */
.layer-grid { display:grid; grid-template-columns:1fr 1fr; gap:3px; }
.layer-row {
  display:flex; align-items:center; justify-content:space-between;
  padding:6px 7px; cursor:pointer; border-radius:8px;
  border:1px solid transparent; transition:background .12s, border-color .12s;
}
.layer-row:hover { background:rgba(255,255,255,0.07); border-color:var(--border); }
.layer-row:active { background:rgba(255,255,255,0.10); }
.layer-lbl { display:flex; align-items:center; gap:6px; font-size:11px; font-weight:500; }
.ldot { width:8px; height:8px; border-radius:50%; flex-shrink:0; }
.ltog {
  width:30px; height:17px; border-radius:9px;
  background:rgba(255,255,255,0.10); position:relative; flex-shrink:0; transition:background .2s;
}
.ltog::after {
  content:''; position:absolute; top:2.5px; left:2.5px;
  width:12px; height:12px; border-radius:50%;
  background:rgba(255,255,255,0.45); transition:all .2s cubic-bezier(.34,1.56,.64,1);
}
.ltog.on { background:var(--accent); }
.ltog.on::after { background:#fff; left:calc(100% - 14.5px); box-shadow:0 1px 4px rgba(0,0,0,0.35); }

/* Inputs */
select, input[type=text] {
  width:100%; background:rgba(255,255,255,0.05);
  border:1px solid var(--border); border-radius:8px;
  color:var(--t1); font-size:12px; padding:7px 10px;
  outline:none; transition:border-color .15s; font-family:inherit;
  -webkit-appearance:none; appearance:none;
}
button, input, select, .layer-row, .map-tab, .topbar-pill, .sidebar-toggle {
  touch-action:manipulation;
}
select:focus, input[type=text]:focus { border-color:rgba(10,132,255,0.5); }
select option { background:var(--panel); color:var(--t1); }
select option:checked { background:rgba(10,132,255,0.3); }
.cfg-row { display:flex; align-items:center; gap:8px; margin-top:7px; }
.cfg-lbl { font-size:11px; color:var(--t2); white-space:nowrap; width:28px; flex-shrink:0; }
.btn-row { display:flex; gap:6px; margin-top:9px; }
.btn {
  flex:1; padding:8px; border-radius:8px; font-size:11px; font-weight:600;
  cursor:pointer; border:1px solid var(--border);
  background:rgba(255,255,255,0.06); color:var(--t1);
  transition:all .15s; font-family:inherit;
}
.btn:hover { background:rgba(255,255,255,0.13); }
.btn-accent { background:var(--accent); border-color:var(--accent); color:#fff; }
.btn-accent:hover { background:#2898FF; border-color:#2898FF; }
.hint { font-size:10px; color:var(--t3); margin-top:6px; line-height:1.4; }
.calib-title {
  margin-top:9px; margin-bottom:5px;
  font-size:10px; font-weight:700; color:rgba(255,255,255,0.48);
}
.calib-grid {
  display:grid; grid-template-columns:1fr 1fr; gap:5px;
}
.calib-btn {
  padding:7px 6px; border-radius:8px;
  border:1px solid var(--border);
  background:rgba(255,255,255,0.06);
  color:var(--t1); font-size:11px; font-weight:700;
  cursor:pointer; font-family:inherit;
}
.calib-btn:hover { background:rgba(10,132,255,0.16); border-color:rgba(10,132,255,0.32); }
.calib-readout {
  margin-top:8px; padding:6px 7px; border-radius:7px;
  background:rgba(0,0,0,0.22);
  color:rgba(255,255,255,0.62);
  font-size:10px; line-height:1.35; word-break:break-all;
}

/* Toast */
#toast {
  position:fixed; bottom:20px; left:50%; transform:translateX(-50%) translateY(16px);
  background:rgba(28,28,42,0.96);
  border:1px solid var(--border); border-radius:20px;
  padding:9px 20px; font-size:12px; font-weight:500; color:var(--t1);
  opacity:0; transition:all .22s ease; pointer-events:none; z-index:9999;
  box-shadow:var(--shadow);
}
#toast.show { opacity:1; transform:translateX(-50%) translateY(0); }

/* Slider */
.scale-row { display:flex; align-items:center; gap:8px; margin-top:8px; }
.scale-row .cfg-lbl { width:auto; }
.scale-slider {
  flex:1; -webkit-appearance:none; appearance:none; height:4px;
  background:rgba(255,255,255,0.12); border-radius:2px; outline:none;
}
.scale-slider::-webkit-slider-thumb {
  -webkit-appearance:none; width:14px; height:14px; border-radius:50%;
  background:var(--accent); cursor:pointer; border:2px solid rgba(255,255,255,0.3);
}
.scale-val { font-size:11px; color:var(--t2); min-width:28px; text-align:right; }
.scale-val-input {
  width:42px !important; min-width:42px; max-width:42px; padding:2px 4px !important;
  font-size:11px; text-align:center; color:var(--t2);
  background:rgba(255,255,255,0.06); border:1px solid transparent !important;
  border-radius:5px; outline:none; transition:border-color .15s;
}
.scale-val-input:hover { border-color:var(--border) !important; }
.scale-val-input:focus { border-color:rgba(10,132,255,0.5) !important; color:var(--t1); background:rgba(255,255,255,0.10); }
.quick-filter-row {
  display:flex; gap:5px; margin-top:7px; padding-left:34px;
}
.quick-filter {
  flex:1; height:22px; border-radius:7px; border:1px solid var(--border);
  background:rgba(255,255,255,0.045); color:var(--t2);
  font-size:10.5px; font-weight:700; cursor:pointer; font-family:inherit;
  transition:background .15s, color .15s, border-color .15s, box-shadow .15s;
}
.quick-filter:hover { background:rgba(255,255,255,0.09); color:var(--t1); }
.quick-filter.active {
  color:#fff; border-color:rgba(255,214,10,0.45);
  background:linear-gradient(135deg, rgba(255,214,10,0.22), rgba(191,90,242,0.18));
  box-shadow:0 0 12px rgba(255,214,10,0.16) inset;
}

/* Box config dropdown */
.box-cfg-btn {
  font-size:12px; cursor:pointer; color:var(--t2); padding:0 4px;
  border-radius:4px; transition:color .15s, background .15s; line-height:1; user-select:none;
}
.box-cfg-btn:hover { color:var(--t1); background:rgba(255,255,255,0.08); }
.box-cfg-pop {
  display:none; position:absolute; top:100%; left:0; right:0; z-index:100;
  background:rgba(20,20,34,0.97);
  border:1px solid var(--border); border-radius:8px;
  padding:6px 8px; margin-top:2px;
}
.box-cfg-pop.open { display:block; }
.box-chk-row {
  display:flex; align-items:center; gap:6px; padding:4px 2px;
  font-size:11px; font-weight:500; cursor:pointer; border-radius:4px;
}
.box-chk-row:hover { background:rgba(255,255,255,0.06); }
.box-chk-row input[type=checkbox] {
  accent-color:var(--accent); width:14px; height:14px; cursor:pointer;
}

/* Leaflet overrides */
.leaflet-container { background:#0a0a16; }
.leaflet-control-zoom { display:none; }

.mobile-zoom {
  position:fixed; right:12px; bottom:calc(18px + env(safe-area-inset-bottom));
  z-index:1001; display:none; flex-direction:column; gap:8px;
}
.mobile-zoom button {
  width:46px; height:46px; border-radius:14px;
  border:1px solid rgba(255,255,255,0.12);
  background:rgba(14,14,24,0.92); color:#fff;
  font-size:24px; font-weight:800; line-height:1;
  box-shadow:0 6px 22px rgba(0,0,0,0.45);
  touch-action:manipulation; user-select:none; -webkit-user-select:none;
}
.mobile-zoom button:active {
  transform:scale(0.96); background:rgba(10,132,255,0.35);
}
.mobile-zoom .mobile-tips-button { font-size:10px; font-weight:900; }

/* Region labels on map */
.map-region-name {
  overflow:visible !important; background:none !important; border:none !important;
  pointer-events:none !important;
}
.map-region-name span {
  display:inline-block; transform:translate(-50%,-50%);
  white-space:nowrap; font-size:12px; font-weight:600;
  color:rgba(255,255,255,0.82); font-family:-apple-system,'SF Pro Display',sans-serif;
  text-shadow:0 1px 4px rgba(0,0,0,0.95),0 0 8px rgba(0,0,0,0.8);
  letter-spacing:0.3px; pointer-events:none;
}

/* ── Landing Page ── */
.landing-overlay {
  position:fixed; inset:0; z-index:9999;
  display:flex; align-items:center; justify-content:center;
  background:radial-gradient(ellipse at 50% 40%, #0f1528 0%, #080810 70%);
  transition:opacity .4s, visibility .4s;
}
.landing-overlay.hidden { opacity:0; visibility:hidden; pointer-events:none; }
.landing-card {
  display:flex; flex-direction:column; align-items:center;
  padding:48px 44px 40px; border-radius:24px;
  background:rgba(16,16,30,0.85);
  backdrop-filter:blur(40px) saturate(180%); -webkit-backdrop-filter:blur(40px) saturate(180%);
  border:1px solid rgba(255,255,255,0.08);
  box-shadow:0 24px 80px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.04) inset;
  min-width:340px; max-width:400px;
  animation:landingIn .6s ease-out;
}
@keyframes landingIn {
  from { opacity:0; transform:translateY(24px) scale(0.96); }
  to   { opacity:1; transform:translateY(0) scale(1); }
}
.landing-icon {
  width:64px; height:64px; border-radius:18px; overflow:hidden;
  box-shadow:0 4px 20px rgba(10,132,255,0.3);
  margin-bottom:20px;
}
.landing-icon img { width:100%; height:100%; object-fit:cover; }
.landing-title {
  font-size:22px; font-weight:700; color:#fff;
  letter-spacing:1px; margin:0 0 6px;
}
.landing-desc {
  font-size:13px; color:rgba(255,255,255,0.45); margin:0 0 28px;
}
.landing-input-wrap {
  display:flex; gap:8px; width:100%;
}
.landing-input {
  flex:1; height:44px; border-radius:12px; border:1px solid rgba(255,255,255,0.12);
  background:rgba(255,255,255,0.06); color:#fff; padding:0 16px;
  font-size:15px; font-family:inherit; outline:none;
  transition:border-color .2s, box-shadow .2s;
}
.landing-input::placeholder { color:rgba(255,255,255,0.25); }
.landing-input:focus {
  border-color:rgba(10,132,255,0.6);
  box-shadow:0 0 0 3px rgba(10,132,255,0.15);
}
.landing-btn {
  height:44px; padding:0 24px; border-radius:12px; border:none;
  background:linear-gradient(135deg, #0A84FF, #0066d6);
  color:#fff; font-size:15px; font-weight:600; cursor:pointer;
  font-family:inherit; transition:transform .15s, box-shadow .15s;
}
.landing-btn:hover { transform:translateY(-1px); box-shadow:0 4px 16px rgba(10,132,255,0.4); }
.landing-btn:active { transform:translateY(0); }
.landing-hint {
  font-size:11px; color:rgba(255,255,255,0.22); margin:16px 0 0;
}

/* 移动端竖屏：隐藏logo，地名靠左，全屏+状态靠右 */
@media (max-width: 600px) and (orientation: portrait) {
  .topbar-logo { display:none; }
  .topbar-sep { display:none; }
  #btnRegion { margin-left:0 !important; }
  #btnFullscreen { margin-left:auto; }
}

@media (pointer: coarse), (max-width: 820px) {
  .mobile-zoom { display:flex; }
  .team-overview-toggle { display:none; }
  .topbar {
    height:48px; padding:0 calc(8px + env(safe-area-inset-right)) 0 calc(8px + env(safe-area-inset-left));
    gap:5px;
  }
  .topbar-pill { min-height:34px; padding:7px 10px; font-size:12px; }
  .map-tab { padding:8px 11px; font-size:12px; }
  .sidebar {
    top:58px; right:8px; left:auto; bottom:calc(8px + env(safe-area-inset-bottom));
    width:min(284px, calc(100vw - 72px)); border-radius:14px 0 0 14px;
  }
  .sidebar-toggle {
    top:58px; right:calc(min(284px, calc(100vw - 72px)) + 8px); left:auto;
    width:28px; height:58px; font-size:18px;
  }
  .sidebar-toggle.collapsed { right:8px; left:auto; }
  .layer-row { min-height:38px; padding:8px 9px; }
  .layer-lbl { font-size:12px; }
  .ltog { width:34px; height:20px; border-radius:10px; }
  .ltog::after { width:15px; height:15px; top:2.5px; left:2.5px; }
  .ltog.on::after { left:calc(100% - 17.5px); }
  .scale-row { gap:10px; margin-top:11px; }
  .scale-slider { height:7px; }
  .scale-slider::-webkit-slider-thumb { width:22px; height:22px; }
  .quick-filter { height:30px; font-size:12px; }
  .scale-val-input { width:54px !important; min-width:54px; max-width:54px; height:28px; font-size:12px; }
  .team-float { left:10px; bottom:calc(10px + env(safe-area-inset-bottom)); max-width:calc(100vw - 76px); }
  .team-card { padding:8px 10px; }
  .team-info-panel {
    right:calc(58px + env(safe-area-inset-right));
    bottom:calc(10px + env(safe-area-inset-bottom));
    width:min(540px, calc(100vw - 78px - env(safe-area-inset-left) - env(safe-area-inset-right)));
    max-height:32vh;
    border-radius:12px;
  }
  .team-info-title {
    padding:6px 8px 6px;
    gap:6px;
  }
  .team-info-heading { gap:5px; }
  .team-info-count {
    min-width:52px;
    height:18px;
    padding:0 6px;
    font-size:9px;
  }
  .team-info-count.muted { min-width:32px; }
  .team-info-title button {
    width:24px;
    height:24px;
    line-height:24px;
    border-radius:8px;
    flex:0 0 auto;
  }
  .team-info-list {
    padding:5px 6px 6px;
  }
  .nearby-value-list { padding:5px 6px 6px; }
  .tip-row {
    gap:4px;
    padding:3px 5px 3px 6px;
    margin:2px 0;
    font-size:9.5px;
    border-left-width:2px;
  }
  .tip-name { max-width:62px; }
  .tip-hero { max-width:48px; }
  .tip-weapon { max-width:62px; }
  .tip-hp {
    width:38px;
    flex-basis:38px;
    height:5px;
  }
  .tip-gear { gap:1px; font-size:9px; }
  .gear-dot, .tig-dot { width:5px; height:5px; }
}

@media (pointer: coarse) and (orientation: landscape) {
  .sidebar { width:236px; top:52px; right:8px; left:auto; }
  .sidebar-toggle { top:52px; right:252px; left:auto; }
  .sidebar-toggle.collapsed { right:8px; left:auto; }
  .mobile-zoom { right:10px; bottom:10px; }
  .mobile-zoom button { width:42px; height:42px; border-radius:13px; }
  .team-info-panel {
    right:calc(60px + env(safe-area-inset-right));
    bottom:calc(10px + env(safe-area-inset-bottom));
    width:min(540px, calc(100vw - 80px - env(safe-area-inset-left) - env(safe-area-inset-right)));
    max-height:42vh;
  }
}

@media (max-width: 520px) {
  .match-info-content { grid-template-columns:1fr; }
  .nearby-value-section { border-left:0; border-top:1px solid rgba(255,255,255,0.07); }
  .mock-view-switch { top:54px; }
}

@media (pointer: coarse) and (orientation: portrait) {
  .team-info-panel {
    max-height:30vh;
  }
}

@media (max-width: 380px) {
  .team-info-panel {
    right:calc(54px + env(safe-area-inset-right));
    width:calc(100vw - 68px - env(safe-area-inset-left) - env(safe-area-inset-right));
  }
  .team-info-heading > span:first-child { font-size:9px; letter-spacing:.4px; }
  .team-info-count {
    min-width:48px;
    padding:0 5px;
  }
  .team-info-count.muted { min-width:30px; }
  .tip-row { gap:3px; font-size:9px; }
  .tip-team { gap:2px; }
  .tip-hero { max-width:42px; }
  .tip-weapon { max-width:48px; }
  .tip-hp {
    width:32px;
    flex-basis:32px;
  }
}

/* 全屏模式：确保所有内容铺满屏幕 */
:fullscreen, :-webkit-full-screen {
  background:var(--bg);
  width:100vw !important; height:100vh !important;
  overflow:hidden;
}
::backdrop, ::-webkit-backdrop { background:var(--bg); }
:fullscreen #map, :-webkit-full-screen #map {
  position:fixed !important; inset:0 !important;
  width:100vw !important; height:100vh !important;
}
