:root {
  --bg: #0a0d11;
  --panel: rgba(18, 21, 27, 0.92);
  --panel-soft: rgba(25, 31, 39, 0.92);
  --line: rgba(214, 184, 120, 0.16);
  --line-strong: rgba(214, 184, 120, 0.32);
  --gold: #d6b878;
  --gold-bright: #f1d89c;
  --ink: #f6f0df;
  --muted: #a9acaa;
  --green: #7dbf87;
  --lime: #a5c96a;
  --amber: #d8a24c;
  --orange: #d57a3a;
  --red: #bb544c;
  --blue: #6f8fb5;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
  --radius: 12px;
  font-size: 16px;
}

* { box-sizing: border-box; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at top right, rgba(214, 184, 120, 0.09), transparent 24%),
    radial-gradient(circle at left 20%, rgba(125, 191, 135, 0.06), transparent 18%),
    linear-gradient(180deg, #0f1318 0%, #090b0e 100%);
}

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

.sim-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 22px 20px 56px;
}

.sim-intro { padding: 6px 2px 18px; }
.sim-intro h1 {
  margin: 0 0 8px;
  font-size: 26px;
  letter-spacing: 0.5px;
  color: var(--gold-bright);
}
.sim-intro p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
  max-width: 900px;
}
.sim-data-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 4px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(214, 184, 120, 0.06);
  color: var(--gold);
  font-size: 12.5px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 20px;
  margin-bottom: 20px;
}
.panel h2 {
  margin: 0 0 14px;
  font-size: 17px;
  color: var(--gold-bright);
  font-weight: 600;
}

.controls-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 22px;
}
@media (max-width: 880px) {
  .controls-grid { grid-template-columns: 1fr; }
}

.field-label {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 7px;
}

.ammo-pick-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 10px;
}
@media (max-width: 560px) {
  .ammo-pick-row { grid-template-columns: 1fr; }
}

input[type="search"], select {
  width: 100%;
  padding: 9px 12px;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  background: rgba(10, 13, 17, 0.85);
  color: var(--ink);
  font-size: 14px;
  font-family: inherit;
  outline: none;
}
input[type="search"]:focus, select:focus { border-color: var(--gold); }
select option, select optgroup { background: #11161d; color: var(--ink); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  background: rgba(214, 184, 120, 0.1);
  color: var(--gold-bright);
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
}
.btn:hover { background: rgba(214, 184, 120, 0.18); }
.btn-primary { background: #8a6a35; border-color: #a5813f; color: #fff8ea; }
.btn-primary:hover { background: #9a773d; }

.chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  min-height: 34px;
}
.chips-empty { color: var(--muted); font-size: 13px; align-self: center; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px 5px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(214, 184, 120, 0.08);
  font-size: 13px;
  color: var(--ink);
}
.chip button {
  border: 0;
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
  width: 20px; height: 20px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 12px;
  line-height: 1;
  padding: 0;
}
.chip button:hover { background: var(--red); color: #fff; }

.preset-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}
.preset-btn {
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-size: 12.5px;
  cursor: pointer;
  font-family: inherit;
}
.preset-btn:hover { color: var(--gold-bright); border-color: var(--gold); }
.preset-btn.is-active {
  color: var(--gold-bright);
  border-color: var(--gold);
  background: rgba(214, 184, 120, 0.12);
}

.seg {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.seg button {
  flex: 1 1 auto;
  min-width: 56px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  background: rgba(10, 13, 17, 0.6);
  color: var(--ink);
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
}
.seg button:hover { border-color: var(--gold); }
.seg button.is-active {
  background: #8a6a35;
  border-color: #a5813f;
  color: #fff8ea;
  font-weight: 600;
}

.dur-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
}
.dur-row input[type="range"] {
  flex: 1;
  accent-color: var(--gold);
}
.dur-value {
  min-width: 52px;
  text-align: center;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--gold-bright);
  font-size: 14px;
}
.dur-row.is-disabled { opacity: 0.45; pointer-events: none; }
.dur-hint { font-size: 12px; color: var(--muted); margin-top: 6px; }

.results-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 2px 2px 12px;
}
.results-head h2 { margin: 0; font-size: 18px; color: var(--gold-bright); }
.results-head .muted { color: var(--muted); font-size: 13px; }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(430px, 100%), 1fr));
  gap: 18px;
}

.sim-card {
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  min-width: 0;
}
.card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.card-head img {
  width: 42px; height: 42px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.3);
  object-fit: contain;
}
.card-title { flex: 1 1 180px; min-width: 0; }
.card-title strong { display: block; font-size: 15.5px; color: var(--ink); }
.card-title span { font-size: 12.5px; color: var(--muted); }
.card-detail-link { font-size: 12.5px; white-space: nowrap; }

.stat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 0;
}
.stat-chips span {
  padding: 3px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 12.5px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.02);
}
.stat-chips b { color: var(--ink); font-weight: 600; }
.stat-chips .sc-pen b { color: var(--gold-bright); }

.class-strip {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  margin: 14px 0 4px;
}
.class-cell {
  padding: 8px 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  text-align: center;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.02);
}
.class-cell small { display: block; font-size: 11px; color: var(--muted); margin-bottom: 3px; }
.class-cell b { font-size: 14px; font-weight: 700; }
.class-cell:hover { border-color: var(--gold); }
.class-cell.is-current { border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold); }
.class-strip-hint { font-size: 12px; color: var(--muted); margin: 2px 0 12px; }

.s-good b { color: var(--green); }
.s-ok b { color: var(--lime); }
.s-mid b { color: var(--amber); }
.s-low b { color: var(--orange); }
.s-bad b { color: var(--red); }
.s-good { background: rgba(125, 191, 135, 0.08); }
.s-ok { background: rgba(165, 201, 106, 0.07); }
.s-mid { background: rgba(216, 162, 76, 0.08); }
.s-low { background: rgba(213, 122, 58, 0.08); }
.s-bad { background: rgba(187, 84, 76, 0.08); }

.summary-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 12px 0;
}
.summary-cell {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  text-align: center;
  background: rgba(255, 255, 255, 0.02);
}
.summary-cell small { display: block; font-size: 11.5px; color: var(--muted); margin-bottom: 4px; }
.summary-cell b { font-size: 17px; color: var(--gold-bright); font-weight: 700; }
.summary-cell b.u-green { color: var(--green); }
.summary-cell b.u-red { color: var(--red); }

.shot-table-wrap { overflow-x: auto; }
.shot-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  min-width: 420px;
}
.shot-table th, .shot-table td {
  padding: 7px 10px;
  text-align: right;
  border-bottom: 1px solid rgba(214, 184, 120, 0.08);
  white-space: nowrap;
}
.shot-table th:first-child, .shot-table td:first-child { text-align: left; }
.shot-table th {
  color: var(--muted);
  font-weight: 500;
  font-size: 12px;
  border-bottom: 1px solid var(--line-strong);
}
.shot-table td.kb { color: var(--muted); }
.shot-table tr.is-kill td {
  background: rgba(125, 191, 135, 0.1);
  color: var(--ink);
  font-weight: 600;
  border-bottom-color: rgba(125, 191, 135, 0.35);
}
.shot-table tr.is-kill td:first-child { border-radius: 6px 0 0 6px; }
.shot-table tr.is-kill td:last-child { border-radius: 0 6px 6px 0; }
.table-note { font-size: 12px; color: var(--muted); margin-top: 8px; line-height: 1.6; }

.model-note { color: var(--muted); font-size: 13.5px; line-height: 1.9; }
.model-note summary {
  cursor: pointer;
  color: var(--gold-bright);
  font-size: 15px;
  font-weight: 600;
  padding: 2px 0 8px;
}
.model-note ul { margin: 8px 0 0; padding-left: 22px; }
.model-note li { margin-bottom: 6px; }

.seo-copy {
  margin-top: 26px;
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(18, 21, 27, 0.65);
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.9;
}
.seo-copy h2 { color: var(--ink); font-size: 15px; margin: 0 0 8px; }
.seo-copy p { margin: 0 0 8px; }

.sim-footer {
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12.5px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: space-between;
}

.notice {
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid rgba(216, 162, 76, 0.4);
  background: rgba(216, 162, 76, 0.08);
  color: var(--amber);
  font-size: 13px;
  margin-top: 12px;
}
.notice[hidden] { display: none; }

.site-width { max-width: 1640px; margin: 0 auto; padding: 0 20px; }

.site-header { border-bottom: 1px solid var(--line); background: rgba(12, 15, 20, 0.92); }
.site-header-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  padding-top: 12px;
  padding-bottom: 12px;
  flex-wrap: wrap;
}
.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
}
.site-brand:hover { text-decoration: none; }
.site-brand-mark {
  width: 34px; height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  color: var(--gold-bright);
  font-weight: 700;
  font-size: 14px;
  background: rgba(214, 184, 120, 0.08);
}
.site-brand-copy strong { display: block; font-size: 14.5px; }
.site-brand-copy small { display: block; font-size: 11px; color: var(--muted); }
.site-nav { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-left: auto; }
.site-nav a {
  color: var(--muted);
  font-size: 13.5px;
  padding: 4px 2px;
}
.site-nav a:hover { color: var(--gold-bright); text-decoration: none; }
.site-nav a[aria-current="page"] { color: var(--gold-bright); border-bottom: 2px solid var(--gold); }
.site-cta {
  padding: 7px 14px;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  color: var(--gold-bright);
  font-size: 13px;
  white-space: nowrap;
}
.site-cta:hover { text-decoration: none; background: rgba(214, 184, 120, 0.1); }
@media (max-width: 900px) {
  .site-nav { order: 3; width: 100%; margin-left: 0; }
}
.site-subbar { border-top: 1px solid rgba(214, 184, 120, 0.08); background: rgba(10, 13, 17, 0.7); }
.site-subbar-inner { padding-top: 7px; padding-bottom: 7px; }
.breadcrumb-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; font-size: 12.5px; }
.breadcrumb-list a { color: var(--muted); }
.breadcrumb-list a:hover { color: var(--gold-bright); }
.breadcrumb-list span { color: var(--ink); }
.breadcrumb-separator { color: rgba(214, 184, 120, 0.4); }
