:root {
  color-scheme: dark;
  --bg: #080d0c;
  --bg-soft: #0d1513;
  --panel: rgba(15, 24, 22, 0.88);
  --panel-solid: #101a17;
  --panel-light: #17231f;
  --line: rgba(224, 242, 231, 0.12);
  --line-strong: rgba(224, 242, 231, 0.22);
  --text: #eef5f0;
  --muted: #91a098;
  --acid: #d8ff45;
  --acid-soft: rgba(216, 255, 69, 0.13);
  --mint: #6ce7b0;
  --orange: #ff8a4c;
  --danger: #ff6868;
  --radius: 18px;
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.36);
  font-family: Inter, "SF Pro Display", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  background:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    var(--bg);
  background-size: 42px 42px;
  color: var(--text);
}

button,
input,
select {
  font: inherit;
}

button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
}

button,
a {
  color: inherit;
}

button {
  border: 0;
}

a {
  text-decoration: none;
}

.ambient {
  position: fixed;
  z-index: -1;
  width: 520px;
  height: 520px;
  border-radius: 999px;
  filter: blur(150px);
  opacity: 0.16;
  pointer-events: none;
}

.ambient-a {
  top: -260px;
  right: -80px;
  background: var(--acid);
}

.ambient-b {
  top: 50%;
  left: -380px;
  background: #278d68;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 36px;
  min-height: 76px;
  padding: 0 4vw;
  border-bottom: 1px solid var(--line);
  background: rgba(8, 13, 12, 0.82);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
}

.brand-mark {
  display: grid;
  width: 39px;
  height: 39px;
  place-items: center;
  background: var(--acid);
  color: #11160c;
  font-size: 13px;
  font-weight: 950;
  letter-spacing: -0.5px;
  clip-path: polygon(0 0, 82% 0, 100% 18%, 100% 100%, 18% 100%, 0 82%);
}

.brand strong,
.brand small {
  display: block;
  line-height: 1;
}

.brand strong {
  font-size: 16px;
  letter-spacing: 0.18em;
}

.brand small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0.2em;
}

.top-nav {
  display: flex;
  gap: 26px;
  margin-left: auto;
}

.top-nav a {
  color: var(--muted);
  font-size: 13px;
  transition: 160ms ease;
}

.top-nav a:hover {
  color: var(--text);
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #afbbb4;
  font-size: 11px;
}

.status-chip i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--acid);
  box-shadow: 0 0 12px var(--acid);
}

main {
  width: min(1480px, 100%);
  margin: 0 auto;
  padding: 0 4vw;
}

.hero {
  display: grid;
  min-height: 600px;
  grid-template-columns: minmax(0, 0.92fr) minmax(430px, 1.08fr);
  align-items: center;
  gap: 7vw;
  padding: 78px 0 92px;
}

.hero > * {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--acid);
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.2em;
}

.hero h1,
.method-section h2 {
  margin: 0;
  font-size: clamp(46px, 6vw, 88px);
  font-weight: 840;
  letter-spacing: -0.065em;
  line-height: 0.98;
}

.hero h1 em {
  color: var(--acid);
  font-style: normal;
}

.hero-description {
  max-width: 590px;
  margin: 28px 0 0;
  color: #aebbb4;
  font-size: 16px;
  line-height: 1.85;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 0 18px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 720;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.button:hover,
.icon-button:hover,
.optimize-button:hover {
  transform: translateY(-1px);
}

.button-primary {
  background: var(--acid);
  color: #0e1409;
}

.button-primary span {
  font-size: 18px;
}

.button-ghost {
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.025);
}

.hero-visual {
  position: relative;
  display: grid;
  min-height: 400px;
  place-items: center;
}

.scope-ring {
  position: absolute;
  border: 1px solid rgba(216, 255, 69, 0.2);
  border-radius: 50%;
}

.scope-ring::before,
.scope-ring::after {
  position: absolute;
  top: 50%;
  left: 50%;
  background: rgba(216, 255, 69, 0.18);
  content: "";
  transform: translate(-50%, -50%);
}

.scope-ring::before {
  width: 120%;
  height: 1px;
}

.scope-ring::after {
  width: 1px;
  height: 120%;
}

.scope-ring-a {
  width: 370px;
  height: 370px;
}

.scope-ring-b {
  width: 260px;
  height: 260px;
  border-style: dashed;
  animation: spin 30s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.weapon-line {
  position: relative;
  z-index: 2;
  width: min(510px, 82%);
  height: 150px;
  filter: drop-shadow(0 22px 28px rgba(0, 0, 0, 0.55));
  transform: rotate(-2deg);
}

.weapon-line span {
  position: absolute;
  display: block;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: linear-gradient(160deg, #29332f, #111815);
}

.weapon-stock {
  top: 48px;
  left: 0;
  width: 120px;
  height: 52px;
  clip-path: polygon(0 20%, 88% 0, 100% 35%, 78% 100%, 18% 88%);
}

.weapon-body {
  top: 35px;
  left: 105px;
  width: 190px;
  height: 70px;
  clip-path: polygon(0 4%, 95% 0, 100% 72%, 72% 100%, 0 82%);
}

.weapon-mag {
  top: 92px;
  left: 210px;
  width: 48px;
  height: 66px;
  clip-path: polygon(0 0, 100% 0, 76% 100%, 28% 92%);
}

.weapon-grip {
  top: 92px;
  left: 155px;
  width: 32px;
  height: 55px;
  transform: skew(-9deg);
}

.weapon-barrel {
  top: 49px;
  left: 284px;
  width: 160px;
  height: 25px;
}

.weapon-muzzle {
  top: 43px;
  right: 0;
  width: 78px;
  height: 37px;
  clip-path: polygon(0 18%, 100% 0, 100% 100%, 0 82%);
}

.weapon-optic {
  top: 4px;
  left: 190px;
  width: 70px;
  height: 34px;
  clip-path: polygon(10% 0, 90% 0, 100% 70%, 80% 100%, 20% 100%, 0 70%);
  background: linear-gradient(160deg, #35433d, #17201c) !important;
}

.scan-card {
  position: absolute;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 13px;
  border: 1px solid rgba(216, 255, 69, 0.2);
  border-radius: 8px;
  background: rgba(9, 15, 13, 0.86);
  backdrop-filter: blur(10px);
  font-family: ui-monospace, monospace;
  font-size: 10px;
}

.scan-card strong {
  color: var(--acid);
  font-size: 15px;
}

.scan-card-one { top: 78px; left: 4%; }
.scan-card-two { right: 2%; bottom: 68px; }

.visual-label {
  position: absolute;
  right: 20px;
  bottom: 0;
  margin: 0;
  color: rgba(255, 255, 255, 0.28);
  font-family: ui-monospace, monospace;
  font-size: 9px;
  letter-spacing: 0.26em;
  writing-mode: vertical-rl;
}

.optimizer-shell {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(9, 15, 13, 0.78);
  box-shadow: var(--shadow);
}

.control-panel {
  padding: 28px;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.017);
}

.panel-heading,
.section-title-row > div:first-child {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.panel-heading > span,
.section-index {
  color: var(--acid);
  font-family: ui-monospace, monospace;
  font-size: 10px;
  font-weight: 800;
}

.panel-heading p,
.panel-heading h2,
.section-title-row p,
.section-title-row h3 {
  margin: 0;
}

.panel-heading p,
.section-title-row p {
  color: var(--muted);
  font-family: ui-monospace, monospace;
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.panel-heading h2,
.section-title-row h3 {
  margin-top: 4px;
  font-size: 18px;
}

.panel-heading.compact h2 {
  font-size: 16px;
}

.search-box {
  display: flex;
  height: 44px;
  align-items: center;
  gap: 9px;
  margin-top: 22px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.14);
}

.search-box span {
  color: var(--acid);
  font-size: 20px;
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 12px;
}

.search-box input::placeholder {
  color: #66716b;
}

.category-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  margin-top: 15px;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.category-tabs::-webkit-scrollbar { display: none; }

.category-tab {
  flex: 0 0 auto;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 10px;
}

.category-tab.active {
  border-color: rgba(216, 255, 69, 0.4);
  background: var(--acid-soft);
  color: var(--acid);
}

.weapon-list {
  display: grid;
  gap: 8px;
  max-height: 356px;
  margin-top: 12px;
  overflow-y: auto;
  padding-right: 3px;
  scrollbar-color: #334139 transparent;
  scrollbar-width: thin;
}

.weapon-card {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.025);
  cursor: pointer;
  text-align: left;
  transition: 150ms ease;
}

.weapon-card:hover {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.045);
}

.weapon-card.active {
  border-color: rgba(216, 255, 69, 0.42);
  background: var(--acid-soft);
}

.weapon-glyph {
  display: grid;
  width: 42px;
  height: 34px;
  place-items: center;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--acid);
  font-family: ui-monospace, monospace;
  font-size: 9px;
  font-weight: 900;
}

.weapon-card strong,
.weapon-card small {
  display: block;
}

.weapon-card strong { font-size: 12px; }
.weapon-card small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.weapon-card > span:last-child { color: #68736d; font-size: 16px; }
.weapon-card.active > span:last-child { color: var(--acid); }

.panel-divider {
  height: 1px;
  margin: 24px 0;
  background: var(--line);
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 17px;
}

.field span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 10px;
}

.field select {
  width: 100%;
  height: 38px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
  background: #111b18;
  color: var(--text);
  font-size: 11px;
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  cursor: pointer;
}

.toggle-row strong,
.toggle-row small {
  display: block;
}

.toggle-row strong { font-size: 11px; }
.toggle-row small { margin-top: 3px; color: #6f7b75; font-size: 9px; }
.toggle-row input { position: absolute; opacity: 0; pointer-events: none; }

.toggle-row i {
  position: relative;
  width: 36px;
  height: 20px;
  flex: 0 0 auto;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #0c1210;
  transition: 160ms ease;
}

.toggle-row i::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #77837d;
  content: "";
  transition: 160ms ease;
}

.toggle-row input:checked + i {
  border-color: var(--acid);
  background: var(--acid-soft);
}

.toggle-row input:checked + i::after {
  left: 19px;
  background: var(--acid);
}

.workspace {
  min-width: 0;
  padding: 30px;
}

.workspace-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.workspace-toolbar h2,
.workspace-toolbar p {
  margin: 0;
}

.workspace-toolbar h2 {
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: -0.035em;
}

.workspace-toolbar #active-weapon-meta {
  margin-top: 7px;
  color: var(--muted);
  font-size: 11px;
}

.toolbar-actions {
  display: flex;
  gap: 8px;
}

.icon-button {
  min-width: 52px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
  cursor: pointer;
  font-size: 11px;
  transition: 150ms ease;
}

.target-card {
  padding-top: 26px;
}

.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.preset-group {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.preset-button {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 10px;
}

.preset-button.active {
  border-color: rgba(216, 255, 69, 0.38);
  background: var(--acid-soft);
  color: var(--acid);
}

.target-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(126px, 1fr));
  gap: 9px;
  margin-top: 20px;
}

.target-control {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.018);
}

.target-control-head,
.range-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.target-control-head span {
  color: #aebbb4;
  font-size: 10px;
}

.target-control-head strong {
  color: var(--acid);
  font-family: ui-monospace, monospace;
  font-size: 18px;
}

.range-label {
  display: block;
  margin-top: 12px;
  color: #6f7c75;
  font-size: 8px;
  letter-spacing: 0.08em;
}

input[type="range"] {
  width: 100%;
  height: 3px;
  margin: 8px 0 0;
  appearance: none;
  border-radius: 99px;
  outline: 0;
  background: linear-gradient(90deg, var(--acid) var(--value, 50%), #27312d var(--value, 50%));
}

input[type="range"]::-webkit-slider-thumb {
  width: 12px;
  height: 12px;
  appearance: none;
  border: 2px solid #101510;
  border-radius: 50%;
  background: var(--acid);
  box-shadow: 0 0 0 1px rgba(216, 255, 69, 0.4);
  cursor: pointer;
}

input.priority-range {
  background: linear-gradient(90deg, var(--orange) var(--value, 50%), #27312d var(--value, 50%));
}

input.priority-range::-webkit-slider-thumb {
  background: var(--orange);
  box-shadow: 0 0 0 1px rgba(255, 138, 76, 0.4);
}

.range-meta {
  margin-top: 3px;
  color: #647069;
  font-family: ui-monospace, monospace;
  font-size: 8px;
}

.target-hint {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 9px;
}

.target-hint > span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.target-hint small { margin-left: auto; color: #657069; }
.legend-dot { width: 6px; height: 6px; border-radius: 50%; }
.target-dot { background: var(--acid); }
.priority-dot { background: var(--orange); }

.optimize-button {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 14px;
  margin-top: 22px;
  padding: 16px 18px;
  border-radius: 12px;
  background: var(--acid);
  color: #10150b;
  cursor: pointer;
  text-align: left;
  transition: 160ms ease;
}

.optimize-button:active { transform: translateY(1px); }
.optimize-icon { font-size: 22px; }
.optimize-button strong,
.optimize-button small { display: block; }
.optimize-button strong { font-size: 14px; }
.optimize-button small { margin-top: 3px; opacity: 0.64; font-size: 9px; }
.optimize-arrow { margin-left: auto; font-size: 22px; }
.optimize-button.loading .optimize-icon { animation: spin 0.8s linear infinite; }

.results-section {
  margin-top: 30px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}

.result-count {
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-family: ui-monospace, monospace;
  font-size: 9px;
}

.result-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.empty-result {
  grid-column: 1 / -1;
  display: grid;
  min-height: 130px;
  place-items: center;
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  color: #6f7b75;
  font-size: 11px;
}

.result-card {
  position: relative;
  overflow: hidden;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.022);
  cursor: pointer;
  text-align: left;
  transition: 160ms ease;
}

.result-card::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: transparent;
  content: "";
}

.result-card:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.result-card.active { border-color: rgba(216, 255, 69, 0.38); background: var(--acid-soft); }
.result-card.active::before { background: var(--acid); }

.result-card-top,
.result-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.result-rank {
  color: var(--acid);
  font-family: ui-monospace, monospace;
  font-size: 10px;
}

.match-score {
  font-family: ui-monospace, monospace;
  font-size: 20px;
  font-weight: 800;
}

.match-score small { color: var(--muted); font-size: 9px; }
.result-card h4 { margin: 14px 0 5px; font-size: 14px; }
.result-card > p { min-height: 32px; margin: 0; color: var(--muted); font-size: 9px; line-height: 1.65; }
.result-card-foot { margin-top: 14px; color: #738079; font-size: 9px; }

.build-detail {
  margin-top: 16px;
  padding: 22px;
  border: 1px solid rgba(216, 255, 69, 0.2);
  border-radius: 14px;
  background: rgba(216, 255, 69, 0.035);
}

.build-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.build-detail-head p,
.build-detail-head h3 { margin: 0; }
.build-detail-head p { color: var(--acid); font-family: ui-monospace, monospace; font-size: 8px; letter-spacing: 0.16em; }
.build-detail-head h3 { margin-top: 5px; font-size: 19px; }
.button-copy { border: 1px solid rgba(216, 255, 69, 0.3); background: var(--acid-soft); color: var(--acid); }

.build-layout {
  display: grid;
  grid-template-columns: minmax(240px, 0.82fr) minmax(300px, 1.18fr);
  gap: 18px;
  margin-top: 20px;
}

.stats-board,
.attachment-board {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(0, 0, 0, 0.13);
}

.stat-row + .stat-row { margin-top: 13px; }

.stat-line {
  display: grid;
  grid-template-columns: 64px 1fr 34px 42px;
  align-items: center;
  gap: 8px;
  font-size: 9px;
}

.stat-line > span:first-child { color: #aebbb4; }
.stat-line strong { font-family: ui-monospace, monospace; font-size: 12px; text-align: right; }
.stat-delta { color: var(--mint); font-family: ui-monospace, monospace; text-align: right; }
.stat-delta.negative { color: var(--danger); }

.stat-track {
  position: relative;
  height: 5px;
  overflow: hidden;
  border-radius: 99px;
  background: #26302c;
}

.stat-track i {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--width);
  border-radius: inherit;
  background: linear-gradient(90deg, #7aa928, var(--acid));
}

.attachment-head,
.attachment-row,
.build-total {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
}

.attachment-head {
  padding-bottom: 9px;
  border-bottom: 1px solid var(--line);
  color: #67736d;
  font-family: ui-monospace, monospace;
  font-size: 8px;
  text-transform: uppercase;
}

.attachment-row {
  min-height: 41px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.055);
}

.attachment-row > div span,
.attachment-row > div small { display: block; }
.attachment-row > div span { font-size: 10px; }
.attachment-row > div small { margin-top: 3px; color: #67736d; font-size: 8px; }
.effect-pills { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; }
.effect-pill { padding: 3px 5px; border-radius: 4px; background: rgba(108, 231, 176, 0.1); color: var(--mint); font-family: ui-monospace, monospace; font-size: 8px; }
.effect-pill.negative { background: rgba(255, 104, 104, 0.1); color: var(--danger); }

.build-total { padding-top: 13px; font-size: 10px; }
.build-total span { color: var(--muted); }
.build-total strong { color: var(--acid); font-family: ui-monospace, monospace; font-size: 14px; }

.share-code {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
}

.share-code span,
.share-code code { display: block; }
.share-code span { color: var(--muted); font-size: 8px; }
.share-code code { margin-top: 5px; color: var(--text); font-size: 11px; }
.share-code button { padding: 7px 10px; border: 1px solid var(--line); border-radius: 7px; background: transparent; cursor: pointer; font-size: 9px; }

.method-section {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 7vw;
  padding: 120px 0;
}

.method-section h2 {
  font-size: clamp(38px, 4.5vw, 62px);
}

.method-grid {
  display: grid;
  gap: 0;
}

.method-grid article {
  display: grid;
  grid-template-columns: 42px 150px 1fr;
  align-items: start;
  gap: 12px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
}

.method-grid article:last-child { border-bottom: 1px solid var(--line); }
.method-grid span { color: var(--acid); font-family: ui-monospace, monospace; font-size: 10px; }
.method-grid h3,
.method-grid p { margin: 0; }
.method-grid h3 { font-size: 14px; }
.method-grid p { color: var(--muted); font-size: 11px; line-height: 1.75; }

.notice-section {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 20px;
  padding: 24px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.notice-section span { color: var(--orange); font-family: ui-monospace, monospace; font-size: 9px; letter-spacing: 0.18em; }
.notice-section p { max-width: 840px; margin: 0; color: var(--muted); font-size: 10px; line-height: 1.8; }

footer {
  display: flex;
  width: min(1480px, 100%);
  min-height: 88px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 0 auto;
  padding: 0 4vw;
  color: #58625d;
  font-family: ui-monospace, monospace;
  font-size: 9px;
}

.toast {
  position: fixed;
  z-index: 40;
  right: 24px;
  bottom: 24px;
  padding: 11px 15px;
  border: 1px solid rgba(216, 255, 69, 0.3);
  border-radius: 9px;
  background: #172019;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.38);
  color: var(--acid);
  font-size: 11px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: 180ms ease;
}

.toast.show { opacity: 1; transform: translateY(0); }

@media (max-width: 1120px) {
  .hero { grid-template-columns: 1fr 0.9fr; gap: 3vw; }
  .target-grid { grid-template-columns: repeat(3, 1fr); }
  .result-list { grid-template-columns: 1fr; }
  .result-card > p { min-height: 0; }
}

@media (max-width: 900px) {
  .top-nav { display: none; }
  .status-chip { margin-left: auto; }
  .hero { grid-template-columns: 1fr; min-height: 0; padding-top: 70px; }
  .hero-visual { min-height: 330px; }
  .optimizer-shell { grid-template-columns: 1fr; }
  .control-panel { border-right: 0; border-bottom: 1px solid var(--line); }
  .weapon-list { grid-template-columns: repeat(2, minmax(0, 1fr)); max-height: 270px; }
  .method-section { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .site-header { min-height: 64px; padding: 0 18px; }
  .status-chip { display: none; }
  main { padding: 0 12px; }
  .hero { padding: 58px 8px 70px; }
  .hero-copy { min-width: 0; overflow-wrap: anywhere; }
  .hero h1 { font-size: 48px; }
  .hero-description { font-size: 14px; }
  .hero-visual { min-width: 0; min-height: 250px; overflow: hidden; }
  .scope-ring-a { width: 260px; height: 260px; }
  .scope-ring-b { width: 180px; height: 180px; }
  .weapon-line { transform: scale(0.78) rotate(-2deg); }
  .scan-card-one { top: 28px; }
  .scan-card-two { bottom: 28px; }
  .optimizer-shell { border-radius: 16px; }
  .control-panel,
  .workspace { padding: 20px 16px; }
  .weapon-list { grid-template-columns: 1fr; }
  .section-title-row { align-items: flex-start; flex-direction: column; }
  .preset-group { justify-content: flex-start; }
  .target-grid { grid-template-columns: 1fr 1fr; }
  .target-hint { align-items: flex-start; flex-wrap: wrap; }
  .target-hint small { width: 100%; margin-left: 0; }
  .build-layout { grid-template-columns: 1fr; }
  .method-section { padding: 84px 8px; }
  .method-grid article { grid-template-columns: 36px 100px 1fr; }
  .notice-section { grid-template-columns: 1fr; }
  footer { min-height: 80px; padding: 0 18px; }
}

@media (max-width: 420px) {
  .target-grid { grid-template-columns: 1fr; }
  .field-grid { grid-template-columns: 1fr; }
  .workspace-toolbar { align-items: flex-start; }
  .build-detail-head { align-items: flex-start; flex-direction: column; }
  .method-grid article { grid-template-columns: 32px 1fr; }
  .method-grid article p { grid-column: 2; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

/* Real official-scheme edition */
.truth-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: 28px;
  color: var(--muted);
  font-size: 10px;
}

.truth-strip strong {
  margin-right: 3px;
  color: var(--acid);
  font-family: ui-monospace, monospace;
  font-size: 14px;
}

.mode-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 18px;
}

.mode-toggle button {
  padding: 12px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.022);
  cursor: pointer;
  text-align: left;
  transition: 150ms ease;
}

.mode-toggle button:hover { border-color: var(--line-strong); }
.mode-toggle button.active { border-color: rgba(216, 255, 69, 0.42); background: var(--acid-soft); }
.mode-toggle strong,
.mode-toggle small { display: block; }
.mode-toggle strong { font-size: 11px; }
.mode-toggle small { margin-top: 5px; color: var(--muted); font-size: 8px; }
.mode-toggle button.active strong { color: var(--acid); }

.source-summary,
.constraint-note {
  margin: 10px 0 0;
  color: #718078;
  font-size: 9px;
  line-height: 1.6;
}

.budget-field { display: block; margin-top: 16px; }
.budget-field select:disabled { cursor: not-allowed; opacity: 0.45; }

.weapon-card.unavailable { opacity: 0.58; }
.weapon-card.unavailable:hover { opacity: 0.82; }
.weapon-card .scheme-count-badge {
  min-width: 36px;
  color: #77857d;
  font-family: ui-monospace, monospace;
  font-size: 8px;
  text-align: right;
}
.weapon-card.active .scheme-count-badge { color: var(--acid); }

.preference-control p {
  min-height: 31px;
  margin: 7px 0 15px;
  color: #6f7c75;
  font-size: 8px;
  line-height: 1.55;
}

.preference-control input[type="range"] { margin-top: 2px; }
.real-hint { justify-content: space-between; }
.real-hint small { margin-left: 12px; text-align: right; }

.scheme-card { padding-top: 13px; }
.scheme-card .scheme-thumb {
  height: 112px;
  margin: 12px -4px 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: #090e0c;
}
.scheme-card .scheme-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 220ms ease;
}
.scheme-card:hover .scheme-thumb img { transform: scale(1.025); }
.scheme-card h4 {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.honest-empty {
  align-content: center;
  padding: 28px;
  text-align: center;
}
.honest-empty span { color: var(--orange); font-weight: 700; }
.honest-empty p { max-width: 520px; margin: 8px auto 0; color: var(--muted); line-height: 1.7; }

.scheme-layout {
  display: grid;
  grid-template-columns: minmax(280px, 1.1fr) minmax(260px, .9fr);
  gap: 18px;
  margin-top: 20px;
}

.scheme-preview {
  overflow: hidden;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(0, 0, 0, .18);
}
.scheme-preview img {
  display: block;
  width: 100%;
  min-height: 220px;
  max-height: 340px;
  object-fit: contain;
  background: #080d0c;
}
.scheme-preview figcaption {
  padding: 8px 11px;
  border-top: 1px solid var(--line);
  color: #66736c;
  font-size: 8px;
}

.scheme-info {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(0, 0, 0, .13);
}
.scheme-tags { display: flex; flex-wrap: wrap; gap: 7px; }
.scheme-tags > span {
  padding: 7px 9px;
  border: 1px solid color-mix(in srgb, var(--tag-color, var(--acid)) 48%, transparent);
  border-radius: 7px;
  background: color-mix(in srgb, var(--tag-color, var(--acid)) 10%, transparent);
  color: var(--text);
  font-size: 10px;
}
.scheme-tags small { display: block; margin-top: 3px; color: var(--muted); font-size: 7px; }
.scheme-metrics { margin: 16px 0 0; }
.scheme-metrics > div {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid rgba(255,255,255,.065);
}
.scheme-metrics dt { color: var(--muted); font-size: 9px; }
.scheme-metrics dd { margin: 0; font-family: ui-monospace, monospace; font-size: 9px; text-align: right; }
.scheme-metrics > div:first-child dd { color: var(--acid); font-size: 12px; font-weight: 800; }
.scheme-disclaimer { margin: 15px 0 0; color: #6d7973; font-size: 8px; line-height: 1.7; }

.official-code { border-color: rgba(216, 255, 69, .32); background: rgba(216, 255, 69, .025); }
.official-code code { color: var(--acid); font-size: 14px; font-weight: 800; letter-spacing: .04em; }
.full-code { margin-top: 8px; }
.share-code > div { min-width: 0; }
.share-code code { overflow-wrap: anywhere; }

@media (max-width: 760px) {
  .scheme-layout { grid-template-columns: 1fr; }
  .scheme-preview img { min-height: 180px; }
  .truth-strip { gap: 7px 13px; }
}

@media (max-width: 520px) {
  .mode-toggle { grid-template-columns: 1fr; }
  .scheme-card .scheme-thumb { height: 130px; }
  .scheme-metrics > div { grid-template-columns: 1fr; gap: 5px; }
  .scheme-metrics dd { text-align: left; }
  .share-code { align-items: flex-start; flex-direction: column; }
  .share-code button { align-self: stretch; }
}

/* Numeric target solver */
.numeric-hero { min-height: 570px; }
.numeric-hero h1 em { font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; }
.numeric-visual .scan-card-one strong,
.numeric-visual .scan-card-two strong { font-size: 31px; }

.numeric-shell {
  display: grid;
  grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(11, 18, 16, 0.82);
  box-shadow: var(--shadow);
}

.numeric-controls {
  padding: 28px;
  border-right: 1px solid var(--line);
  background: rgba(10, 16, 15, 0.88);
}

.numeric-workspace { min-width: 0; padding: 34px; }
.numeric-field { display: block; margin-top: 19px; }

.numeric-field > span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 9px;
}

.numeric-field select {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #111b18;
  color: var(--text);
  outline: 0;
}

.weapon-base-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 11px;
}

.weapon-base-card > div {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.02);
}

.weapon-base-card small,
.weapon-base-card strong { display: block; }
.weapon-base-card small { color: var(--muted); font-size: 8px; }
.weapon-base-card strong { margin-top: 6px; color: var(--acid); font-family: ui-monospace, monospace; font-size: 19px; }

.target-number {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  padding: 12px 13px;
  border: 1px solid rgba(216, 255, 69, 0.26);
  border-radius: 10px;
  background: var(--acid-soft);
}

.target-number span { color: #cbd6ce; font-size: 11px; }
.target-number input {
  width: 82px;
  border: 0;
  background: transparent;
  color: var(--acid);
  font-family: ui-monospace, monospace;
  font-size: 28px;
  font-weight: 850;
  text-align: right;
  outline: 0;
}

.numeric-range {
  width: 100%;
  height: 4px;
  margin: 22px 0 0;
  appearance: none;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--acid) var(--value, 0%), rgba(255, 255, 255, 0.12) var(--value, 0%));
  cursor: pointer;
}

.numeric-range::-webkit-slider-thumb {
  width: 18px;
  height: 18px;
  appearance: none;
  border: 3px solid #111912;
  border-radius: 50%;
  background: var(--acid);
  box-shadow: 0 0 0 1px var(--acid), 0 0 18px rgba(216, 255, 69, 0.28);
}

.numeric-range::-moz-range-thumb {
  width: 13px;
  height: 13px;
  border: 3px solid #111912;
  border-radius: 50%;
  background: var(--acid);
}

.compact-optimize { margin-top: 24px; }

.result-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding-bottom: 25px;
  border-bottom: 1px solid var(--line);
}

.result-hero h2 { margin: 0; font-size: clamp(30px, 4vw, 53px); letter-spacing: -0.045em; }
.result-hero p:last-child { margin: 10px 0 0; color: var(--muted); font-size: 12px; }

.equation-card {
  display: flex;
  overflow-x: auto;
  align-items: center;
  gap: 9px;
  margin-top: 22px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(0, 0, 0, 0.14);
}

.equation-piece {
  min-width: 64px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.025);
  text-align: center;
}

.equation-piece small,
.equation-piece strong { display: block; }
.equation-piece small { min-height: 22px; color: var(--muted); font-size: 8px; }
.equation-piece strong { margin-top: 3px; font-family: ui-monospace, monospace; font-size: 22px; }
.equation-piece.base strong { color: #aebcb4; }
.equation-piece.total { border-color: rgba(216, 255, 69, 0.45); background: var(--acid-soft); }
.equation-piece.total strong { color: var(--acid); }
.equation-sign { color: #77847c; font-family: ui-monospace, monospace; font-size: 18px; }

.final-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.stat-tile {
  position: relative;
  padding: 14px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.018);
}

.stat-tile small,
.stat-tile strong,
.stat-tile span { display: block; }
.stat-tile small { color: var(--muted); font-size: 8px; }
.stat-tile strong { margin-top: 8px; font-family: ui-monospace, monospace; font-size: 21px; }
.stat-tile span { margin-top: 5px; font-size: 8px; }
.stat-tile .up { color: var(--mint); }
.stat-tile .down { color: var(--orange); }
.stat-tile.target-stat { border-color: rgba(216, 255, 69, 0.38); background: rgba(216, 255, 69, 0.06); }
.stat-tile.target-stat strong { color: var(--acid); }

.attachment-section { margin-top: 30px; }
.attachment-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-top: 16px;
}

.attachment-card {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 12px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.018);
}

.attachment-card.control-part { border-color: rgba(108, 231, 176, 0.22); }
.attachment-index { color: #46534c; font-family: ui-monospace, monospace; font-size: 10px; }
.attachment-main { min-width: 0; }
.attachment-main small { color: var(--acid); font-size: 8px; text-transform: uppercase; }
.attachment-main h4 { margin: 5px 0 0; font-size: 13px; line-height: 1.35; }
.attachment-main p { margin: 8px 0 0; color: #718078; font-size: 8px; line-height: 1.55; }

.delta-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.delta-chips span {
  padding: 4px 6px;
  border: 1px solid var(--line);
  border-radius: 5px;
  font-family: ui-monospace, monospace;
  font-size: 7px;
}
.delta-chips .positive { border-color: rgba(108, 231, 176, 0.25); color: var(--mint); }
.delta-chips .negative { border-color: rgba(255, 138, 76, 0.25); color: var(--orange); }
.delta-chips .neutral { color: #77847c; }

.result-note {
  margin-top: 16px;
  padding: 16px 18px;
  border-left: 2px solid var(--orange);
  background: rgba(255, 138, 76, 0.055);
}
.result-note strong { font-size: 10px; }
.result-note p { margin: 7px 0 0; color: #8e9a93; font-size: 9px; line-height: 1.7; }

.source-links { display: flex; flex-wrap: wrap; gap: 8px; }
.source-links a {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: #acb8b1;
  font-size: 9px;
}
.source-links a:hover { border-color: var(--line-strong); color: var(--acid); }

@media (max-width: 980px) {
  .numeric-shell { grid-template-columns: 1fr; }
  .numeric-controls { border-right: 0; border-bottom: 1px solid var(--line); }
  .final-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  .numeric-workspace,
  .numeric-controls { padding: 20px 16px; }
  .result-hero { align-items: flex-start; flex-direction: column; }
  .result-hero .button { width: 100%; }
  .final-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .attachment-list { grid-template-columns: 1fr; }
  .equation-card { margin-right: -16px; border-radius: 11px 0 0 11px; }
}

@media (max-width: 420px) {
  .weapon-base-card { grid-template-columns: 1fr; }
  .numeric-hero h1 { font-size: 43px; }
}
