/* ==========================================================================
   WARDOGS 工具箱 —— 暗色碳黑主调 / 金副调
   自研样式表：导航、首页、数据库、四类计算器
   ========================================================================== */

:root {
  --bg: #0a0b0c;
  --carbon: #141517;
  --panel: #191b1d;
  --panel2: #202225;
  --panel3: #26292c;
  --line: #2a2c2e;
  --line2: #3a3d40;
  --text: #e9e9e4;
  --dim: #9a9c98;
  --mute: #6a6c68;
  --gold: #e7b324;
  --gold-dim: #b38a1a;
  --gold-soft: rgba(231, 179, 36, .14);
  --danger: #d1424a;
  --danger-dim: #e07d7f;
  --ok: #6fbf73;
  --radius: 3px;
  --cell-gap: 2px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Noto Sans", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100%;
}

a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img { display: block; max-width: 100%; }

.num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- 顶部导航 ---------- */
.site-nav {
  display: flex; align-items: center; gap: 8px;
  padding: 0 20px; height: 56px;
  border-bottom: 1px solid var(--line);
  background: var(--carbon);
  position: sticky; top: 0; z-index: 50;
}
.nav-brand {
  font-weight: 800; font-size: 18px; letter-spacing: .06em;
  color: var(--text); margin-right: 12px; white-space: nowrap;
}
.nav-brand:hover { text-decoration: none; }
.nav-brand em { color: var(--gold); font-style: normal; font-weight: 700; }
.brand-word {
  font-family: "Saira Condensed", "Noto Sans", sans-serif;
  letter-spacing: .04em; font-weight: 700;
}
.nav-links { display: flex; align-items: center; gap: 2px; flex: 1; min-width: 0; }
.nav-link {
  color: var(--dim); font-size: 14px; padding: 6px 10px; border-radius: var(--radius);
  white-space: nowrap; position: relative;
}
.nav-link:hover { color: var(--text); background: var(--panel2); text-decoration: none; }
.nav-link.active { color: var(--gold); background: var(--gold-soft); font-weight: 700; }
.nav-right { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.lang-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--panel2); border: 1px solid var(--line2); color: var(--dim);
  padding: 6px 10px; border-radius: var(--radius); font-size: 13px; font-weight: 700;
  letter-spacing: .04em;
}
.lang-btn:hover { color: var(--gold); border-color: var(--gold-dim); }
.lang-btn .lb-on { color: var(--gold); }
.lang-btn .lb-sep { color: var(--line2); }
.nav-burger {
  display: none; background: none; border: 1px solid var(--line2); border-radius: var(--radius);
  width: 38px; height: 32px; padding: 7px 8px; flex-direction: column; justify-content: space-between;
}
.nav-burger span { display: block; height: 2px; background: var(--dim); }

.nav-overlay {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 60;
}
.nav-drawer {
  position: fixed; top: 0; right: -300px; width: 280px; height: 100%;
  background: var(--carbon); border-left: 1px solid var(--line);
  z-index: 70; transition: right .22s ease; display: flex; flex-direction: column;
}
body.nav-open .nav-overlay { display: block; }
body.nav-open .nav-drawer { right: 0; }
.nav-drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-bottom: 1px solid var(--line);
}
.nd-title { font-weight: 700; color: var(--gold); letter-spacing: .1em; }
.nav-drawer-close {
  background: none; border: none; color: var(--dim); font-size: 17px; line-height: 1;
}
.nav-drawer-close:hover { color: var(--danger); }
.nav-drawer-links { padding: 10px; display: flex; flex-direction: column; gap: 4px; overflow-y: auto; }
.nav-drawer-link {
  color: var(--dim); padding: 10px 12px; border-radius: var(--radius); font-size: 15px;
}
.nav-drawer-link:hover, .nav-drawer-link.active {
  background: var(--panel2); color: var(--gold); text-decoration: none;
}
.nav-drawer-foot { margin-top: auto; padding: 16px; border-top: 1px solid var(--line); }

/* ---------- 通用容器 ---------- */
.container { max-width: 1220px; margin: 0 auto; padding: 26px 20px 60px; }
.page-head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 6px; }
.page-head h1 { font-size: 26px; font-weight: 800; letter-spacing: .02em; }
.page-head h1 em { font-style: normal; color: var(--gold); }
.page-head .ph-en { color: var(--mute); font-size: 14px; letter-spacing: .12em; text-transform: uppercase; }
.source-note { color: var(--mute); font-size: 13px; margin-bottom: 18px; }
.source-note a { color: var(--dim); border-bottom: 1px dotted var(--line2); }
.source-note a:hover { color: var(--gold); text-decoration: none; }

/* ---------- 页脚 ---------- */
.site-footer {
  border-top: 1px solid var(--line); margin-top: 40px;
  padding: 22px 20px 34px; text-align: center;
  color: var(--mute); font-size: 12.5px; line-height: 1.9;
}
.site-footer a { color: var(--dim); }
.site-footer a:hover { color: var(--gold); }
.site-footer .f-brand { color: var(--mute); }

/* ==========================================================================
   首页
   ========================================================================== */
.home-hero { text-align: center; padding: 44px 0 30px; }
.home-hero h1 { font-size: 42px; font-weight: 800; letter-spacing: .04em; }
.home-hero h1 em { font-style: normal; color: var(--gold); }
.home-tag { color: var(--dim); margin-top: 10px; font-size: 15px; }
.home-ver {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 14px;
  color: var(--mute); font-size: 12.5px; letter-spacing: .06em;
  border: 1px solid var(--line); border-radius: 999px; padding: 4px 14px;
}
.ver-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--gold);
  box-shadow: 0 0 8px var(--gold); animation: pulse 2s infinite;
}
@keyframes pulse { 0%,100% { opacity: 1 } 50% { opacity: .35 } }

.category-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 26px;
}
.category-card {
  position: relative; display: block; padding: 22px 20px 20px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  color: var(--text); transition: border-color .16s, transform .16s, background .16s;
  overflow: hidden;
}
.category-card::after {
  content: ''; position: absolute; left: 0; top: 0; width: 3px; height: 100%;
  background: var(--gold); opacity: 0; transition: opacity .16s;
}
.category-card:hover {
  text-decoration: none; border-color: var(--line2); background: var(--panel2);
  transform: translateY(-2px);
}
.category-card:hover::after { opacity: 1; }
.card-no {
  font-size: 12px; letter-spacing: .22em; color: var(--gold-dim); font-weight: 700;
}
.category-card h3 { font-size: 19px; font-weight: 800; margin: 8px 0 8px; color: var(--gold); }
.category-card p { color: var(--dim); font-size: 13.5px; line-height: 1.75; }
.card-arrow {
  position: absolute; right: 16px; top: 16px; color: var(--line2); font-size: 18px;
  transition: color .16s, transform .16s;
}
.category-card:hover .card-arrow { color: var(--gold); transform: translateX(3px); }
.home-note {
  margin-top: 22px; padding: 14px 16px; border: 1px dashed var(--line2); border-radius: var(--radius);
  color: var(--mute); font-size: 13px; line-height: 1.8;
}

/* ==========================================================================
   数据库（武器 / 皮肤）
   ========================================================================== */
.db-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 12px; }
.db-search-wrap { flex: 1 1 260px; min-width: 200px; }
.db-search-wrap input {
  width: 100%; background: var(--panel); border: 1px solid var(--line2); border-radius: var(--radius);
  padding: 9px 12px; color: var(--text); outline: none;
}
.db-search-wrap input:focus { border-color: var(--gold-dim); box-shadow: 0 0 0 2px var(--gold-soft); }
.db-search-wrap input::placeholder { color: var(--mute); }
.db-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.db-tab {
  background: var(--panel); border: 1px solid var(--line); color: var(--dim);
  padding: 7px 12px; border-radius: var(--radius); font-size: 13.5px;
}
.db-tab span { color: var(--mute); font-size: 12px; margin-left: 4px; }
.db-tab:hover { border-color: var(--line2); color: var(--text); }
.db-tab.active { border-color: var(--gold-dim); color: var(--gold); background: var(--gold-soft); font-weight: 700; }
.db-tab.active span { color: var(--gold-dim); }
.db-sort-wrap { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.db-sort-wrap select {
  background: var(--panel); border: 1px solid var(--line2); border-radius: var(--radius);
  padding: 8px 10px; color: var(--text); outline: none;
}
.db-sort-wrap select:focus { border-color: var(--gold-dim); }
.db-view { display: flex; border: 1px solid var(--line2); border-radius: var(--radius); overflow: hidden; }
.db-view-btn {
  background: var(--panel); border: none; color: var(--mute); padding: 7px 11px; font-size: 14px;
}
.db-view-btn.active { background: var(--gold-soft); color: var(--gold); }
.db-count { color: var(--mute); font-size: 13px; margin-bottom: 12px; }

.db-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(212px, 1fr)); gap: 12px; }
.db-card {
  display: flex; flex-direction: column; background: var(--panel);
  border: 1px solid var(--line); border-radius: var(--radius); color: var(--text);
  transition: border-color .14s, background .14s;
}
.db-card:hover { text-decoration: none; border-color: var(--gold-dim); background: var(--panel2); }
.db-card-img {
  height: 104px; display: flex; align-items: center; justify-content: center;
  background: var(--carbon); border-bottom: 1px solid var(--line);
  padding: 8px; overflow: hidden;
}
.db-card-img img { max-height: 100%; max-width: 100%; width: auto; height: auto; object-fit: contain; }
.skin-card-img img { max-height: 100%; max-width: 100%; border-radius: 2px; }
.wd-icon-fallback { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }
.wd-icon-fallback svg { width: 78%; height: 78%; max-height: 68px; opacity: .5; }
.db-card-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 2px; }
.db-card-name { font-weight: 700; font-size: 14.5px; line-height: 1.35; }
.db-card-en { color: var(--mute); font-size: 12px; line-height: 1.3; }
.db-card-type { color: var(--dim); font-size: 12.5px; margin-top: 2px; }
.db-card-meta {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin-top: 6px; padding-top: 7px; border-top: 1px solid var(--line);
}
.db-card-cal { color: var(--dim); font-size: 12px; }
.db-card-price { color: var(--gold); font-weight: 700; font-size: 13px; font-variant-numeric: tabular-nums; }
.db-card-free { color: var(--ok); }

.db-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.db-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.db-table th {
  text-align: left; padding: 10px 12px; background: var(--carbon); color: var(--dim);
  border-bottom: 1px solid var(--line2); font-size: 12.5px; letter-spacing: .06em; white-space: nowrap;
}
.db-table th.num { text-align: right; }
.db-table td { padding: 8px 12px; border-bottom: 1px solid var(--line); }
.db-table tbody tr:hover { background: var(--panel); }
.db-table tbody tr:last-child td { border-bottom: none; }
.db-t-name a { color: var(--text); font-weight: 600; }
.db-t-name a:hover { color: var(--gold); text-decoration: none; }
.db-t-en { color: var(--mute); font-size: 12px; display: block; line-height: 1.3; }
.db-t-cal { color: var(--dim); font-size: 13px; }
.db-t-price { color: var(--gold); }
.db-empty {
  padding: 44px 16px; text-align: center; color: var(--mute);
  border: 1px dashed var(--line2); border-radius: var(--radius);
}

/* ==========================================================================
   计算器通用控件
   ========================================================================== */
.calc-panel {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; margin-bottom: 16px;
}
.panel-label {
  color: var(--mute); font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
  margin-bottom: 8px; font-weight: 700;
}
.field-grid { display: grid; gap: 14px; }
.field-grid.c2 { grid-template-columns: repeat(2, 1fr); }
.field-grid.c3 { grid-template-columns: repeat(3, 1fr); }
.field-grid.c4 { grid-template-columns: repeat(4, 1fr); }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label { color: var(--dim); font-size: 13px; font-weight: 600; }
.field > label .fv { color: var(--gold); font-variant-numeric: tabular-nums; }
select.calc-select, input.calc-input {
  width: 100%; background: var(--panel2); border: 1px solid var(--line2); border-radius: var(--radius);
  padding: 8px 10px; outline: none; color: var(--text);
}
select.calc-select:focus, input.calc-input:focus { border-color: var(--gold-dim); }
select.calc-select option { background: var(--panel2); color: var(--text); }
.hint { color: var(--mute); font-size: 12.5px; line-height: 1.65; }

.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  background: var(--panel2); border: 1px solid var(--line); color: var(--dim);
  padding: 6px 12px; border-radius: var(--radius); font-size: 13px;
}
.chip:hover { border-color: var(--line2); color: var(--text); }
.chip.active { border-color: var(--gold-dim); color: var(--gold); background: var(--gold-soft); font-weight: 700; }

input[type="range"].calc-range {
  -webkit-appearance: none; appearance: none; width: 100%; height: 4px; border-radius: 2px;
  background: var(--line2); outline: none; margin: 10px 0 4px;
}
input[type="range"].calc-range::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 16px; height: 16px; border-radius: 50%;
  background: var(--gold); border: 2px solid var(--carbon); cursor: pointer;
}
input[type="range"].calc-range::-moz-range-thumb {
  width: 14px; height: 14px; border-radius: 50%; background: var(--gold);
  border: 2px solid var(--carbon); cursor: pointer;
}

.stat-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.stat-chip {
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  font-size: 13px;
}
.stat-chip .sl { color: var(--mute); font-size: 12px; }
.stat-chip .sv { color: var(--text); font-weight: 700; font-variant-numeric: tabular-nums; }
.stat-chip.gold .sv { color: var(--gold); }

.btn {
  background: var(--panel2); border: 1px solid var(--line2); color: var(--text);
  padding: 8px 14px; border-radius: var(--radius); font-size: 13.5px; font-weight: 600;
}
.btn:hover { border-color: var(--gold-dim); color: var(--gold); }
.btn.gold { background: var(--gold); border-color: var(--gold); color: #141517; }
.btn.gold:hover { background: var(--gold-dim); border-color: var(--gold-dim); color: #141517; }
.btn.small { padding: 5px 10px; font-size: 12.5px; }
.btn.ghost { background: transparent; color: var(--dim); }
.btn:disabled { opacity: .45; cursor: not-allowed; }

/* ==========================================================================
   伤害计算器
   ========================================================================== */
.dc-target {
  display: grid; grid-template-columns: 240px 1fr; gap: 20px; align-items: start;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; margin-bottom: 16px;
}
.dc-figure-wrap { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.dc-figure { width: 168px; }
.dc-zone {
  fill: var(--zone-fill, #2a3039); stroke: #0a0b0c; stroke-width: 2; cursor: crosshair;
  transition: fill .12s;
}
.dc-zone:hover { stroke: var(--gold); }
.dc-zone-hatch { fill: url(#dc-hatch); pointer-events: none; }
.dc-figure-note { color: var(--mute); font-size: 12px; }

.dc-readout { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.dc-readout-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.dc-readout-title { font-weight: 700; color: var(--dim); font-size: 14px; letter-spacing: .04em; }
.dc-total-row { display: flex; align-items: baseline; gap: 10px; }
.dc-total { font-size: 34px; font-weight: 800; color: var(--gold); font-variant-numeric: tabular-nums; line-height: 1.1; }
.dc-shots { color: var(--mute); font-size: 13px; }
.dc-zones { display: flex; flex-direction: column; gap: 4px; max-height: 210px; overflow-y: auto; }
.dc-zones.empty { display: none; }
.dc-hit-row {
  display: flex; justify-content: space-between; gap: 12px; padding: 5px 10px;
  background: var(--panel2); border-radius: var(--radius); font-size: 13px;
}
.dc-hit-zone { color: var(--dim); }
.dc-hit-dmg { color: var(--gold); font-weight: 700; font-variant-numeric: tabular-nums; }

.dc-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.dc-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.dc-table th {
  text-align: left; padding: 9px 12px; background: var(--carbon); color: var(--dim);
  border-bottom: 1px solid var(--line2); font-size: 12px; letter-spacing: .06em; white-space: nowrap;
}
.dc-table th.num { text-align: right; }
.dc-table td { padding: 7px 12px; border-bottom: 1px solid var(--line); }
.dc-table tbody tr:hover { background: var(--panel); }
.dc-table tbody tr:last-child td { border-bottom: none; }
.dc-zone-en { color: var(--mute); font-size: 11.5px; margin-left: 5px; }
.dc-dmg { color: var(--gold); font-weight: 700; }
.dc-prot { color: var(--mute); font-size: 12.5px; }
.dc-prot-yes { color: var(--dim); }

/* ==========================================================================
   枪匠计算器
   ========================================================================== */
.gs-weapon-bar {
  display: grid; grid-template-columns: minmax(240px, 340px) 1fr; gap: 16px;
  align-items: stretch; margin-bottom: 16px;
}
.gs-weapon-info {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; display: flex; align-items: center; gap: 14px; min-height: 92px;
}
.gs-wicon, .gs-wicon-ph img { max-width: 118px; max-height: 68px; width: auto; height: auto; object-fit: contain; }
.gs-wicon-ph { width: 122px; height: 70px; flex: none; display: flex; align-items: center; justify-content: center; }
.gs-wicon-ph svg { width: 96px; height: 60px; opacity: .5; }
.gs-wmeta { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.gs-wtype { color: var(--gold); font-weight: 700; font-size: 14px; }
.gs-wmodel { color: var(--mute); font-size: 12px; }
.gs-wrow { color: var(--dim); font-size: 13px; }
.gs-wrow b { color: var(--text); font-variant-numeric: tabular-nums; }

.gs-summary {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; margin-bottom: 16px;
}
.gs-sum-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.gs-sum-chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 13px;
  background: var(--panel2); border: 1px solid var(--line); border-radius: var(--radius);
}
.gs-sum-label { color: var(--mute); font-size: 12px; }
.gs-sum-val { color: var(--gold); font-weight: 700; font-variant-numeric: tabular-nums; }
.gs-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 8px; }
.gs-stat {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  background: var(--panel2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 7px 11px; font-size: 13px;
}
.gs-stat-label { color: var(--dim); }
.gs-stat-val { color: var(--text); font-weight: 700; font-variant-numeric: tabular-nums; }
.gs-delta { font-style: normal; font-size: 12px; margin-left: 5px; color: var(--mute); }
.gs-delta.up { color: var(--ok); }
.gs-delta.down { color: var(--danger-dim); }

.gs-slots { display: flex; flex-direction: column; gap: 16px; }
.gs-slot { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.gs-slot-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 11px 14px; border-bottom: 1px solid var(--line); background: var(--carbon);
}
.gs-slot-name { font-weight: 700; color: var(--gold); font-size: 14px; }
.gs-slot-chosen { color: var(--mute); font-size: 12.5px; }
.gs-slot-chosen.on { color: var(--dim); }
.gs-slot-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(178px, 1fr));
  gap: 10px; padding: 14px;
}

.part-card {
  display: flex; flex-direction: column; gap: 6px; text-align: left;
  background: var(--panel2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 10px; color: var(--text);
}
.part-card:hover { border-color: var(--line2); }
.part-card.selected { border-color: var(--gold); background: var(--gold-soft); }
.part-card-img {
  height: 54px; display: flex; align-items: center; justify-content: center; background: var(--carbon);
  border-radius: 2px;
}
.part-card-img svg { width: 62px; height: 42px; opacity: .5; }
.part-card-img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.part-card-name { font-size: 13px; font-weight: 600; line-height: 1.35; }
.part-card-en { color: var(--mute); font-size: 11.5px; line-height: 1.3; }
.part-card-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  margin-top: auto; padding-top: 5px; border-top: 1px solid var(--line);
  color: var(--dim); font-size: 12px;
}
.part-card-price { color: var(--gold); font-weight: 700; font-variant-numeric: tabular-nums; }
.part-card-mods { display: flex; flex-wrap: wrap; gap: 4px; }
.mod-tag {
  font-size: 11px; padding: 1px 6px; border-radius: 2px;
  background: var(--panel3); color: var(--dim); font-variant-numeric: tabular-nums;
}
.mod-tag.good { color: var(--ok); }
.mod-tag.bad { color: var(--danger-dim); }
.gs-none {
  padding: 26px 14px; text-align: center; color: var(--mute); font-size: 13px;
}

/* ==========================================================================
   配装计算器
   ========================================================================== */
.lo-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 16px;
}
.lo-stat {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px 14px; display: flex; flex-direction: column; gap: 2px;
}
.lo-stat-label { color: var(--mute); font-size: 12px; }
.lo-stat-val { font-size: 20px; font-weight: 800; color: var(--gold); font-variant-numeric: tabular-nums; }
.lo-stat-sub { color: var(--dim); font-size: 12px; }
.lo-stat-reset { align-items: flex-start; justify-content: center; }

.lo-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.lo-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.lo-group {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px;
}
.lo-group-title {
  color: var(--mute); font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
  font-weight: 700; margin-bottom: 10px;
}
.lo-slots { display: flex; flex-direction: column; gap: 8px; }
.lo-weapon-row { display: grid; grid-template-columns: 1fr 92px; gap: 8px; align-items: stretch; }

.lo-slot {
  display: grid; grid-template-columns: 78px 1fr auto; grid-template-areas: 'label name meta' 'img name meta';
  gap: 2px 10px; align-items: center; text-align: left;
  background: var(--panel2); border: 1px dashed var(--line2); border-radius: var(--radius);
  padding: 8px 11px; color: var(--dim); min-height: 60px;
}
.lo-slot:hover { border-color: var(--gold-dim); }
.lo-slot.filled { border-style: solid; border-color: var(--line); color: var(--text); }
.lo-slot-label { grid-area: label; color: var(--mute); font-size: 11px; letter-spacing: .06em; }
.lo-slot-img { grid-area: img; height: 34px; display: flex; align-items: center; }
.lo-slot-img img { max-height: 34px; max-width: 100%; width: auto; object-fit: contain; }
.lo-slot-img svg { width: 44px; height: 30px; opacity: .5; }
.lo-slot-name { grid-area: name; font-size: 13.5px; font-weight: 600; }
.lo-slot-name em { display: block; font-style: normal; color: var(--mute); font-size: 11.5px; font-weight: 400; }
.lo-slot-meta { grid-area: meta; color: var(--dim); font-size: 12px; text-align: right; font-variant-numeric: tabular-nums; }
.lo-amt { color: var(--mute); font-size: 11.5px; }
.lo-empty { color: var(--mute); font-size: 12px; }

.lo-modgrid { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 4px; }
.lo-modcell {
  display: flex; align-items: center; justify-content: center; padding: 2px;
  background: var(--panel2); border: 1px dashed var(--line2); border-radius: 2px; min-height: 28px;
}
.lo-modcell:hover { border-color: var(--gold-dim); }
.lo-modcell.filled { border-style: solid; border-color: var(--line); }
.lo-modcell img { max-height: 26px; max-width: 100%; width: auto; object-fit: contain; }
.lo-modcell-empty { color: var(--mute); font-size: 10px; letter-spacing: .04em; }
.lo-modcell .wd-icon-fallback svg { width: 26px; height: 18px; }
.lo-modcell-none { border: none; background: transparent; }

.lo-slings { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
.lo-slings-title { color: var(--mute); font-size: 12px; font-weight: 700; letter-spacing: .1em; margin-bottom: 8px; }
.lo-slots-sling { flex-direction: row; flex-wrap: wrap; }
.lo-slot-sling {
  grid-template-columns: 1fr; grid-template-areas: 'label' 'img' 'name'; width: 128px; text-align: center;
  justify-items: center;
}
.lo-slot-sling .lo-slot-img { justify-content: center; }

.lo-pack-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.lo-pack-info { color: var(--dim); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.lo-pack {
  position: relative; background: var(--carbon); border: 1px solid var(--line);
  border-radius: var(--radius); min-height: 140px; padding: 4px; overflow: hidden;
}
.lo-pack-empty { padding: 40px 10px; text-align: center; color: var(--mute); font-size: 13px; }
.lo-cell {
  position: absolute; background: var(--panel); border-radius: 2px; cursor: crosshair;
}
.lo-cell-off { background: transparent; box-shadow: inset 0 0 0 1px var(--line); opacity: .35; }
.lo-pocket {
  position: absolute; border: 1px solid var(--line2); border-radius: 3px; pointer-events: none;
}
.lo-pack-item {
  position: absolute; background: var(--panel2); border: 1px solid var(--line2); border-radius: 2px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  padding: 3px; cursor: grab; overflow: hidden; z-index: 2;
}
.lo-pack-item:hover { border-color: var(--gold); z-index: 3; }
.lo-pack-item.dragging { opacity: .55; cursor: grabbing; z-index: 5; }
.lo-pack-item img { max-height: 52%; max-width: 92%; object-fit: contain; pointer-events: none; }
.lo-pack-item svg { max-height: 52%; max-width: 92%; pointer-events: none; opacity: .5; }
.lo-pack-item-name {
  font-size: 10px; color: var(--dim); line-height: 1.15; text-align: center;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; pointer-events: none;
}
.lo-pack-qty {
  position: absolute; right: 2px; top: 1px; font-size: 10px; color: var(--gold);
  font-weight: 700; background: rgba(10,11,12,.72); border-radius: 2px; padding: 0 3px;
}
.lo-pack-hint { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 8px; min-height: 26px; }
.lo-hint-text { color: var(--mute); font-size: 12px; }
.lo-pending { color: var(--gold); font-size: 13px; font-weight: 700; }
.lo-warn { color: var(--danger-dim); font-size: 13px; }
.lo-err { color: var(--danger-dim); }

.lo-share { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
.lo-share-out {
  width: 100%; background: var(--carbon); border: 1px solid var(--line2); border-radius: var(--radius);
  padding: 8px 10px; color: var(--dim); font-family: ui-monospace, Consolas, monospace;
  font-size: 12px; resize: vertical; outline: none;
}
.lo-share-actions, .lo-share-in-row { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.lo-share-in {
  flex: 1; background: var(--carbon); border: 1px solid var(--line2); border-radius: var(--radius);
  padding: 8px 10px; outline: none; font-family: ui-monospace, Consolas, monospace; font-size: 12px;
}
.lo-share-in:focus, .lo-share-out:focus { border-color: var(--gold-dim); }
.lo-share-msg { color: var(--dim); font-size: 12.5px; }
.lo-share-msg.err { color: var(--danger-dim); }
.lo-share-msg.ok { color: var(--ok); }

/* 弹层 */
.overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.66); z-index: 90;
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal {
  background: var(--carbon); border: 1px solid var(--line2); border-radius: var(--radius);
  width: 100%; max-width: 780px; max-height: 86vh; display: flex; flex-direction: column;
  box-shadow: 0 18px 50px rgba(0,0,0,.6);
}
.modal-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 13px 16px; border-bottom: 1px solid var(--line);
}
.modal-title { font-weight: 700; color: var(--gold); }
.modal-close { background: none; border: none; color: var(--dim); font-size: 17px; }
.modal-close:hover { color: var(--danger); }
.modal-body { padding: 14px 16px; overflow-y: auto; }
.modal-tools { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.modal-tools input, .modal-tools select {
  background: var(--panel); border: 1px solid var(--line2); border-radius: var(--radius);
  padding: 7px 10px; outline: none; color: var(--text);
}
.modal-tools input { flex: 1 1 180px; }
.modal-tools input:focus, .modal-tools select:focus { border-color: var(--gold-dim); }
.picker-cats { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.picker-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 10px; }
.picker-item {
  display: flex; gap: 9px; align-items: center; text-align: left;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 8px 10px; color: var(--text);
}
.picker-item:hover { border-color: var(--gold-dim); }
.picker-item.cur { border-color: var(--gold); background: var(--gold-soft); }
.picker-item-img {
  width: 46px; height: 34px; flex: none; display: flex; align-items: center; justify-content: center;
  background: var(--carbon); border-radius: 2px;
}
.picker-item-img img { max-height: 32px; max-width: 100%; width: auto; object-fit: contain; }
.picker-item-img svg { width: 38px; height: 28px; opacity: .5; }
.picker-item-body { min-width: 0; flex: 1; }
.picker-item-name { font-size: 13px; font-weight: 600; line-height: 1.3; }
.picker-item-meta { color: var(--mute); font-size: 11.5px; display: flex; gap: 8px; }
.picker-item-price { color: var(--gold); }
.picker-empty { grid-column: 1 / -1; color: var(--mute); text-align: center; padding: 26px; }

.qty-box {
  background: var(--carbon); border: 1px solid var(--line2); border-radius: var(--radius);
  padding: 16px 18px; min-width: 280px; max-width: 400px;
}
.qty-title { font-weight: 700; color: var(--gold); margin-bottom: 10px; }
.qty-row { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.qty-row input {
  width: 90px; background: var(--panel); border: 1px solid var(--line2); border-radius: var(--radius);
  padding: 7px 9px; outline: none; text-align: center;
}
.qty-info { color: var(--dim); font-size: 13px; margin-bottom: 10px; }
.qty-actions { display: flex; justify-content: flex-end; gap: 8px; }

/* ==========================================================================
   炮兵计算器
   ========================================================================== */
.calc-layout { display: grid; grid-template-columns: 1fr 342px; gap: 0; height: calc(100vh - 56px); }
.map-pane { position: relative; background: #08090a; overflow: hidden; }
.map-pane canvas { display: block; width: 100%; height: 100%; cursor: crosshair; }
.map-pane canvas.panning { cursor: grabbing; }
.map-tools {
  position: absolute; left: 12px; top: 12px; display: flex; gap: 6px; flex-wrap: wrap; z-index: 5;
}
.mt-btn {
  background: rgba(20,21,23,.92); border: 1px solid var(--line2); color: var(--dim);
  padding: 6px 12px; border-radius: var(--radius); font-size: 12.5px;
}
.mt-btn:hover { color: var(--text); border-color: var(--gold-dim); }
.mt-btn.active { background: var(--gold); border-color: var(--gold); color: #141517; font-weight: 700; }
.map-hint {
  position: absolute; left: 12px; bottom: 12px; z-index: 5;
  background: rgba(20,21,23,.92); border: 1px solid var(--line); border-radius: var(--radius);
  color: var(--mute); font-size: 12px; padding: 6px 11px; max-width: 70%;
}
.map-coord {
  position: absolute; right: 12px; top: 12px; z-index: 5;
  background: rgba(20,21,23,.92); border: 1px solid var(--line); border-radius: var(--radius);
  color: var(--dim); font-size: 12.5px; padding: 6px 11px; font-variant-numeric: tabular-nums;
}
.map-result {
  position: absolute; right: 12px; bottom: 12px; z-index: 5; min-width: 236px;
  background: rgba(20,21,23,.94); border: 1px solid var(--line2); border-radius: var(--radius);
  padding: 10px 12px; display: none;
}
.map-result.on { display: block; }
.map-result .ms-msg { color: var(--danger-dim); font-size: 12px; margin-top: 6px; }

.side-panel {
  background: var(--carbon); border-left: 1px solid var(--line);
  overflow-y: auto; display: flex; flex-direction: column;
}
.sp-head {
  display: flex; align-items: center; gap: 10px; padding: 13px 16px;
  border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--carbon); z-index: 3;
}
.sp-head h2 { font-size: 15px; font-weight: 700; color: var(--gold); letter-spacing: .06em; flex: 1; }
.sp-section { padding: 13px 16px; border-bottom: 1px solid var(--line); }
.sp-label {
  color: var(--mute); font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase;
  font-weight: 700; margin-bottom: 9px;
}
.map-select, .weapon-select { display: flex; flex-direction: column; gap: 6px; }
.map-opt, .weapon-opt {
  display: flex; align-items: center; gap: 10px; text-align: left;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 9px 11px; color: var(--dim);
}
.map-opt:hover, .weapon-opt:hover { border-color: var(--line2); color: var(--text); }
.map-opt.active, .weapon-opt.active { border-color: var(--gold-dim); background: var(--gold-soft); color: var(--gold); }
.map-opt .mo-name { font-size: 13.5px; font-weight: 700; }
.weapon-opt img { width: 54px; height: 36px; object-fit: contain; }
.weapon-opt .wo-name { font-size: 13.5px; font-weight: 700; }
.weapon-opt .wo-kind { color: var(--mute); font-size: 11.5px; }

.coord-inputs { display: flex; align-items: center; gap: 8px; }
.ci-label { color: var(--gold); font-weight: 800; width: 18px; font-size: 13px; }
.coord-inputs input {
  flex: 1; min-width: 0; background: var(--panel); border: 1px solid var(--line2);
  border-radius: var(--radius); padding: 7px 9px; outline: none; font-variant-numeric: tabular-nums;
}
.coord-inputs input:focus { border-color: var(--gold-dim); }
.ci-note { color: var(--mute); font-size: 11.5px; }
.tool-buttons { display: flex; flex-wrap: wrap; gap: 6px; }

.result-rows { display: flex; flex-direction: column; gap: 5px; }
.result-row {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 7px 11px; font-size: 13.5px;
}
.result-row.primary { border-color: var(--gold-dim); background: var(--gold-soft); }
.result-row .rk { color: var(--dim); }
.result-row .rv { color: var(--text); font-weight: 700; font-variant-numeric: tabular-nums; }
.result-row.primary .rv { color: var(--gold); font-size: 17px; }
.result-row .unit { color: var(--mute); font-size: 11.5px; font-weight: 400; margin-left: 3px; }
.status-msg {
  margin-top: 8px; padding: 8px 11px; border-radius: var(--radius); font-size: 12.5px;
  background: rgba(209,66,74,.12); border: 1px solid rgba(209,66,74,.4); color: var(--danger-dim);
}
.status-msg.ok { background: rgba(111,191,115,.1); border-color: rgba(111,191,115,.35); color: var(--ok); }
.sp-foot { padding: 14px 16px; margin-top: auto; }
.sp-foot a { color: var(--mute); font-size: 12px; }

/* ==========================================================================
   致谢页
   ========================================================================== */
.credits-intro { color: var(--dim); font-size: 14px; line-height: 1.9; margin-bottom: 18px; }
.credits-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.credits-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.credits-table th {
  text-align: left; padding: 10px 13px; background: var(--carbon); color: var(--dim);
  border-bottom: 1px solid var(--line2); font-size: 12px; letter-spacing: .06em;
}
.credits-table td { padding: 10px 13px; border-bottom: 1px solid var(--line); vertical-align: top; }
.credits-table tr:last-child td { border-bottom: none; }
.credits-table .lic { color: var(--dim); white-space: nowrap; }
.credits-foot { color: var(--mute); font-size: 13px; margin-top: 16px; }

/* ==========================================================================
   响应式
   ========================================================================== */
@media (max-width: 1080px) {
  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .lo-layout { grid-template-columns: 1fr; }
  .calc-layout { grid-template-columns: 1fr; height: auto; }
  .map-pane { height: 60vh; }
  .side-panel { border-left: none; border-top: 1px solid var(--line); }
  .field-grid.c4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-burger { display: flex; }
  .gs-weapon-bar { grid-template-columns: 1fr; }
  .dc-target { grid-template-columns: 1fr; }
  .dc-figure { width: 148px; }
  .lo-stats { grid-template-columns: repeat(2, 1fr); }
  .home-hero h1 { font-size: 32px; }
}
@media (max-width: 620px) {
  .category-grid { grid-template-columns: 1fr; }
  .field-grid.c2, .field-grid.c3, .field-grid.c4 { grid-template-columns: 1fr; }
  .container { padding: 18px 13px 44px; }
  .db-grid { grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); }
  .site-nav { padding: 0 12px; }
  .nav-brand { font-size: 16px; }
  .map-hint { max-width: 92%; }
}

/* ==========================================================================
   内容页（关于 / 隐私 / 条款）：正文排版
   ========================================================================== */
.prose { max-width: 900px; }
.prose h2 {
  font-size: 20px; font-weight: 800; color: var(--gold);
  margin: 30px 0 10px; padding-bottom: 7px; border-bottom: 1px solid var(--line);
}
.prose h3 { font-size: 16px; font-weight: 700; margin: 20px 0 6px; }
.prose p { color: var(--dim); font-size: 14.5px; line-height: 1.85; margin-bottom: 10px; }
.prose ul { margin: 6px 0 14px 20px; }
.prose li { color: var(--dim); font-size: 14.5px; line-height: 1.8; margin-bottom: 5px; }
.prose strong { color: var(--text); font-weight: 700; }
.prose .legal-meta {
  display: inline-block; color: var(--mute); font-size: 12.5px;
  border: 1px solid var(--line); border-radius: 999px; padding: 4px 13px; margin-bottom: 8px;
}
.prose .note {
  border-left: 3px solid var(--gold-dim); background: var(--panel);
  padding: 11px 14px; border-radius: 0 var(--radius) var(--radius) 0; margin: 14px 0;
}
.prose .note p { margin: 0; }

/* 工具入口列表（关于页） */
.tool-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; margin: 14px 0 6px; }
.tool-link {
  display: block; background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 12px 14px; color: var(--text);
}
.tool-link:hover { text-decoration: none; border-color: var(--gold-dim); background: var(--panel2); }
.tool-link b { display: block; color: var(--gold); font-size: 14.5px; margin-bottom: 3px; }
.tool-link span { color: var(--mute); font-size: 13px; line-height: 1.6; }

/* FAQ */
.faq-item { border-bottom: 1px solid var(--line); padding: 14px 0; }
.faq-item:last-child { border-bottom: none; }
.faq-q { font-weight: 700; color: var(--text); font-size: 15px; margin-bottom: 6px; }
.faq-a { color: var(--dim); font-size: 14.5px; line-height: 1.85; }

/* 页脚链接行 */
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 16px; justify-content: center; margin-bottom: 10px; }
.footer-links a { color: var(--dim); font-size: 12.5px; }
.footer-links a:hover { color: var(--gold); }

/* ---------- 语言菜单 ---------- */
.lang-menu { position: relative; }
.lang-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--panel2); border: 1px solid var(--line2); color: var(--dim);
  padding: 6px 10px; border-radius: var(--radius); font-size: 13px; font-weight: 700;
  white-space: nowrap;
}
.lang-btn:hover { color: var(--gold); border-color: var(--gold-dim); }
.lang-globe { font-size: 13px; opacity: .8; }
.lang-caret { font-size: 9px; opacity: .7; }
.lang-drop {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 60;
  min-width: 168px; padding: 5px;
  background: var(--carbon); border: 1px solid var(--line2); border-radius: var(--radius);
  box-shadow: 0 12px 30px rgba(0,0,0,.55);
  display: flex; flex-direction: column; gap: 1px;
}
.lang-drop[hidden] { display: none; }
.lang-item {
  display: block; width: 100%; text-align: left;
  background: transparent; border: none; color: var(--dim);
  padding: 8px 10px; border-radius: 2px; font-size: 13.5px;
}
.lang-item:hover { background: var(--panel2); color: var(--text); }
.lang-item.active { color: var(--gold); background: var(--gold-soft); font-weight: 700; }
.lang-item.active::after { content: ' ✓'; }
@media (max-width: 620px) {
  /* 小屏也保留当前语言名——这是最容易被找到的线索，只压缩内边距 */
  .lang-btn { padding: 5px 7px; gap: 4px; font-size: 12px; }
  .lang-drop { min-width: 150px; }
}

/* ---------- 广告位容器（与站点风格一致，避免加载时布局跳动） ---------- */
.ad-slot {
  position: relative;
  margin: 30px 0 10px;
  padding: 18px 14px 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  min-height: 150px;
  overflow: hidden;
}
.ad-slot-label {
  position: absolute; top: 0; left: 14px; transform: translateY(-50%);
  background: var(--carbon); border: 1px solid var(--line);
  color: var(--mute); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase;
  padding: 2px 8px; border-radius: 999px;
}
.ad-slot > div { width: 100%; }
@media (max-width: 620px) {
  .ad-slot { padding: 16px 10px 10px; min-height: 120px; }
}
