/* ═══════════════════════════════════════════════════════
   攒机实验室 · 样式表
   深色科技风：深蓝黑底 + 薄荷绿主色 + 紫罗兰辅助
   ═══════════════════════════════════════════════════════ */

:root {
  --bg: #070a10;
  --bg-soft: #0b1018;
  --surface: #0e141d;
  --surface-2: #131b26;
  --surface-3: #182130;
  --line: rgba(255, 255, 255, 0.07);
  --line-strong: rgba(255, 255, 255, 0.14);
  --text: #e9eef7;
  --text-dim: #b3c0d4;
  --muted: #7d8ba3;
  --accent: #2ee6c5;
  --accent-soft: rgba(46, 230, 197, 0.12);
  --violet: #8b7cf6;
  --violet-soft: rgba(139, 124, 246, 0.14);
  --warn: #f7b955;
  --warn-soft: rgba(247, 185, 85, 0.12);
  --danger: #ff5f6d;
  --danger-soft: rgba(255, 95, 109, 0.12);
  --ok: #4ade80;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 18px 50px -22px rgba(0, 0, 0, 0.9);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mono: "SF Mono", "JetBrains Mono", ui-monospace, "Cascadia Code", Consolas, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body { min-height: 100vh; overflow-x: hidden; }

.ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(760px 460px at 12% -8%, rgba(46, 230, 197, 0.10), transparent 62%),
    radial-gradient(680px 420px at 88% 4%, rgba(139, 124, 246, 0.12), transparent 60%),
    radial-gradient(900px 600px at 50% 108%, rgba(46, 230, 197, 0.05), transparent 65%);
}

h1, h2, h3, h4 { margin: 0; font-weight: 650; letter-spacing: -0.02em; line-height: 1.25; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
input, select { font: inherit; color: inherit; }

/* ─────────── 顶栏 ─────────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 14px clamp(16px, 4vw, 48px);
  background: rgba(7, 10, 16, 0.82);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}

.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  border-radius: 10px;
  color: #04110e;
  background: linear-gradient(140deg, #4ff0d2, #1fc9ae);
  box-shadow: 0 0 22px rgba(46, 230, 197, 0.35);
}
.brand-mark svg { width: 20px; height: 20px; }
.brand-text { display: flex; flex-direction: column; font-weight: 700; font-size: 15px; letter-spacing: 0.01em; }
.brand-text em { font-style: normal; font-size: 10px; letter-spacing: 0.16em; color: var(--muted); font-weight: 500; text-transform: uppercase; }

.tabs { display: flex; gap: 4px; padding: 4px; border-radius: 12px; background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line); }
.tab {
  border: 0; background: transparent; color: var(--muted);
  padding: 7px 15px; border-radius: 9px; font-size: 13.5px; font-weight: 550;
  transition: color 0.15s, background 0.15s;
}
.tab:hover { color: var(--text-dim); }
.tab.is-active { color: #04110e; background: linear-gradient(140deg, #4ff0d2, #22cdb1); font-weight: 650; }

.topbar-right { margin-left: auto; }
.sync { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.sync .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); animation: pulse 2.4s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

main { position: relative; z-index: 1; padding: 0 clamp(16px, 4vw, 48px) 80px; max-width: 1440px; margin: 0 auto; }

.view { display: none; animation: fade 0.35s ease; }
.view.is-active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ─────────── Hero ─────────── */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  gap: 40px;
  align-items: center;
  padding: 56px 0 40px;
}
.eyebrow {
  display: inline-block;
  font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent); background: var(--accent-soft);
  border: 1px solid rgba(46, 230, 197, 0.22);
  padding: 5px 12px; border-radius: 999px; margin-bottom: 20px; font-weight: 600;
}
.hero h1 { font-size: clamp(30px, 4.2vw, 50px); line-height: 1.14; letter-spacing: -0.035em; }
.hero-copy p { margin-top: 18px; max-width: 560px; color: var(--text-dim); font-size: 15.5px; }
.hero-stats { display: flex; gap: 34px; margin-top: 30px; }
.hero-stats div { display: flex; flex-direction: column; }
.hero-stats b { font-size: 24px; font-weight: 700; font-family: var(--mono); color: var(--text); letter-spacing: -0.02em; }
.hero-stats span { font-size: 12px; color: var(--muted); }

.hero-visual { position: relative; display: grid; place-items: center; min-height: 240px; }
.gpu-card {
  position: relative;
  width: min(100%, 380px);
  aspect-ratio: 16 / 8.4;
  border-radius: 18px;
  background: linear-gradient(150deg, #1b2431, #0d131c 55%, #151d29);
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 1), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transform: perspective(900px) rotateY(-13deg) rotateX(6deg);
  padding: 22px;
  display: flex; flex-direction: column; justify-content: space-between;
  overflow: hidden;
}
.gpu-card::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(70% 60% at 22% 18%, rgba(46, 230, 197, 0.20), transparent 70%);
  pointer-events: none;
}
.gpu-fans { display: flex; gap: 12px; }
.gpu-fans i {
  flex: 1; aspect-ratio: 1; border-radius: 50%;
  border: 1px dashed rgba(255, 255, 255, 0.14);
  background: radial-gradient(circle at 50% 50%, rgba(46, 230, 197, 0.20), rgba(0, 0, 0, 0.45) 62%);
  animation: spin 9s linear infinite;
}
.gpu-fans i:nth-child(2) { animation-duration: 12s; animation-direction: reverse; }
@keyframes spin { to { transform: rotate(360deg); } }
.gpu-bar { height: 8px; border-radius: 999px; background: linear-gradient(90deg, var(--accent), transparent 78%); opacity: 0.75; }
.gpu-label { font-family: var(--mono); font-size: 11px; letter-spacing: 0.24em; color: var(--muted); }
.chips-float { position: absolute; bottom: -4px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.chips-float span {
  font-size: 11.5px; padding: 5px 11px; border-radius: 999px;
  background: rgba(14, 20, 29, 0.92); border: 1px solid var(--line-strong); color: var(--text-dim);
  backdrop-filter: blur(6px); white-space: nowrap;
}

/* ─────────── 通用卡片 ─────────── */
.card {
  background: linear-gradient(180deg, rgba(19, 27, 38, 0.9), rgba(11, 16, 24, 0.92));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
}

.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; padding: 44px 0 22px; flex-wrap: wrap; }
.section-head h2 { font-size: 26px; }
.section-head p { color: var(--muted); font-size: 13.5px; margin-top: 6px; }
.head-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.probe-note { font-size: 11.5px; color: var(--muted); line-height: 1.6; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.probe-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; font-size: 12px; }
.probe-row .name { flex: 1; display: flex; align-items: center; gap: 6px; min-width: 0; }
.driver-tag {
  flex: none;
  padding: 1px 6px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-2, rgba(255, 255, 255, 0.04));
  font-size: 10.5px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.2px;
}
.probe-row .sample { font-family: var(--mono); font-size: 11px; color: var(--text-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 330px; }

/* ─────────── 向导 ─────────── */
.wizard { margin-bottom: 34px; }
.wizard-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.wizard-head h2 { font-size: 18px; }
.presets { display: flex; gap: 8px; flex-wrap: wrap; }
.preset {
  border: 1px solid var(--line-strong); background: rgba(255, 255, 255, 0.03);
  color: var(--text-dim); font-size: 12.5px; padding: 6px 12px; border-radius: 999px;
  transition: 0.15s;
}
.preset:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

.wizard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 22px 28px;
}
.field { display: flex; flex-direction: column; gap: 10px; }
.field-budget {
  grid-column: span 2;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 20px 16px;
  gap: 12px;
}
.field-label { font-size: 12.5px; color: var(--muted); font-weight: 600; letter-spacing: 0.02em; display: flex; align-items: center; gap: 8px; }
.field-label b { color: var(--accent); font-family: var(--mono); font-size: 17px; font-weight: 700; }

.budget-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.budget-value {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1;
  text-shadow: 0 0 24px rgba(46, 230, 197, 0.35);
}

input[type="range"] {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 6px; border-radius: 999px;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent) var(--fill, 30%), rgba(255, 255, 255, 0.09) var(--fill, 30%));
  outline: none;
}
.field-budget input[type="range"] { height: 8px; }
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%;
  background: #0b1018; border: 2px solid var(--accent);
  box-shadow: 0 0 0 5px rgba(46, 230, 197, 0.14), 0 0 18px rgba(46, 230, 197, 0.4);
  cursor: grab;
}
input[type="range"]::-moz-range-thumb {
  width: 18px; height: 18px; border-radius: 50%; background: #0b1018; border: 2px solid var(--accent); cursor: grab;
}
.field-budget input[type="range"]::-webkit-slider-thumb { width: 24px; height: 24px; box-shadow: 0 0 0 6px rgba(46, 230, 197, 0.14), 0 0 22px rgba(46, 230, 197, 0.45); }
.field-budget input[type="range"]::-moz-range-thumb { width: 22px; height: 22px; }
.range-scale { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); font-family: var(--mono); }
.quick-budgets { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 2px; }
.quick-budgets button {
  border: 1px solid var(--line); background: rgba(255, 255, 255, 0.02);
  color: var(--muted); font-size: 12.5px; padding: 6px 16px; border-radius: 999px;
  font-family: var(--mono); transition: 0.15s;
}
.quick-budgets button:hover { color: var(--text); border-color: var(--line-strong); }
.quick-budgets button.is-active { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }

.chip-row { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.025);
  color: var(--text-dim);
  padding: 8px 13px; border-radius: 10px; font-size: 13px;
  transition: 0.15s; text-align: left; display: flex; flex-direction: column; gap: 1px;
}
.chip:hover { border-color: rgba(46, 230, 197, 0.45); color: var(--text); }
.chip small { font-size: 10.5px; color: var(--muted); }
.chip.is-active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.chip.is-active small { color: rgba(46, 230, 197, 0.7); }
.chip-row-sm .chip { padding: 6px 12px; font-size: 12.5px; }

.select-row { display: flex; gap: 10px; }
.select-row label { flex: 1; display: flex; flex-direction: column; gap: 5px; font-size: 11.5px; color: var(--muted); }
select, input[type="search"] {
  background: var(--surface-2); border: 1px solid var(--line-strong);
  border-radius: 9px; padding: 8px 10px; font-size: 13px; color: var(--text); outline: none;
}
select:focus, input[type="search"]:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(46, 230, 197, 0.12); }

.switch { display: inline-flex; align-items: center; gap: 9px; font-size: 12.5px; color: var(--text-dim); cursor: pointer; }
.switch input { appearance: none; width: 38px; height: 21px; border-radius: 999px; background: rgba(255, 255, 255, 0.1); position: relative; transition: 0.2s; outline: none; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 15px; height: 15px; border-radius: 50%; background: #fff; transition: 0.2s; }
.switch input:checked { background: rgba(46, 230, 197, 0.35); }
.switch input:checked::after { transform: translateX(17px); background: var(--accent); }

.wizard-foot { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.hint { font-size: 12.5px; color: var(--muted); max-width: 620px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--line-strong); background: rgba(255, 255, 255, 0.04);
  color: var(--text); padding: 9px 16px; border-radius: 10px; font-size: 13.5px; font-weight: 600;
  transition: 0.16s; white-space: nowrap;
}
.btn:hover { background: rgba(255, 255, 255, 0.08); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-primary {
  background: linear-gradient(140deg, #4ff0d2, #1dc4a9);
  color: #04110e; border-color: transparent;
  box-shadow: 0 10px 30px -12px rgba(46, 230, 197, 0.75);
}
.btn-primary:hover { filter: brightness(1.06); }
.btn-lg { padding: 13px 24px; font-size: 14.5px; }
.btn-ghost { background: transparent; }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn svg { width: 16px; height: 16px; }
.btn-sm { padding: 6px 11px; font-size: 12px; border-radius: 8px; }

/* ─────────── 结果区 ─────────── */
.results { display: flex; flex-direction: column; gap: 22px; }
.results-note { font-size: 12.5px; color: var(--warn); background: var(--warn-soft); border: 1px solid rgba(247, 185, 85, 0.25); padding: 10px 14px; border-radius: 10px; }

.tiers { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.tier-card {
  position: relative;
  background: linear-gradient(180deg, rgba(19, 27, 38, 0.94), rgba(10, 14, 21, 0.96));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  display: flex; flex-direction: column; gap: 14px;
  transition: 0.18s;
}
.tier-card:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.tier-card.is-selected { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 24px 50px -30px rgba(46, 230, 197, 0.5); }
.tier-badge {
  position: absolute; top: -10px; left: 18px;
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.06em;
  padding: 3px 10px; border-radius: 999px;
  background: linear-gradient(140deg, #4ff0d2, #1dc4a9); color: #04110e;
}
.tier-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.tier-name { font-size: 15px; font-weight: 650; }
.tier-blurb { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.tier-price { font-family: var(--mono); font-size: 25px; font-weight: 700; letter-spacing: -0.03em; }
.tier-price em { font-style: normal; font-size: 12px; color: var(--muted); margin-left: 3px; }
.tier-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 12px 0; border-block: 1px solid var(--line); }
.tier-metrics div { display: flex; flex-direction: column; gap: 1px; }
.tier-metrics span { font-size: 10.5px; color: var(--muted); }
.tier-metrics b { font-family: var(--mono); font-size: 15px; font-weight: 650; }
.tier-parts { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; color: var(--text-dim); flex: 1; }
.tier-parts div { display: flex; justify-content: space-between; gap: 12px; }
.tier-parts span:first-child { color: var(--muted); flex-shrink: 0; }
.tier-parts span:last-child { text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tier-actions { display: flex; gap: 8px; }
.tier-actions .btn { flex: 1; }

/* ─────────── 方案详情 ─────────── */
.detail {
  background: linear-gradient(180deg, rgba(19, 27, 38, 0.94), rgba(9, 13, 20, 0.98));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; display: flex; flex-direction: column; gap: 22px;
}
.detail-head { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; align-items: flex-start; }
.detail-title { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.detail-title h3 { font-size: 20px; }
.detail-total { font-family: var(--mono); font-size: 22px; font-weight: 700; }
.detail-total small { display: block; font-family: var(--font); font-size: 11.5px; color: var(--muted); font-weight: 400; text-align: right; }

.score-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.score {
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px;
  display: flex; flex-direction: column; gap: 4px;
}
.score span { font-size: 11px; color: var(--muted); }
.score b { font-family: var(--mono); font-size: 18px; font-weight: 700; }
.score small { font-size: 11px; color: var(--muted); }
.bar { height: 5px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); overflow: hidden; margin-top: 2px; }
.bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--accent), #6ee7ff); }
.bar.is-warn i { background: linear-gradient(90deg, var(--warn), #ff9f45); }
.bar.is-danger i { background: linear-gradient(90deg, var(--danger), #ff8a5c); }

.parts-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.parts-table th {
  text-align: left; font-size: 11px; font-weight: 600; color: var(--muted);
  letter-spacing: 0.04em; padding: 0 10px 8px; border-bottom: 1px solid var(--line);
}
.parts-table th:last-child, .parts-table td:last-child { text-align: right; }
.parts-table td { padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.parts-table tbody tr:hover { background: rgba(255, 255, 255, 0.025); }
.parts-table tbody tr:last-child td { border-bottom: 0; }
.cat-tag {
  display: inline-block; font-size: 10.5px; padding: 2px 8px; border-radius: 6px;
  background: var(--violet-soft); color: #b7abff; border: 1px solid rgba(139, 124, 246, 0.22); white-space: nowrap;
}
.part-name { font-weight: 550; }
.part-spec { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.price-cell { font-family: var(--mono); font-weight: 650; white-space: nowrap; }
.price-cell small { display: block; font-family: var(--font); font-size: 10.5px; color: var(--muted); font-weight: 400; }
.platform-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 5px; vertical-align: middle; }

.compat-list { display: flex; flex-direction: column; gap: 8px; }
.compat-item {
  display: flex; gap: 10px; padding: 10px 13px; border-radius: 10px; font-size: 12.5px;
  border: 1px solid transparent; align-items: flex-start;
}
.compat-item b { font-weight: 650; }
.compat-item em { font-style: normal; display: block; color: var(--muted); font-size: 11.5px; margin-top: 2px; }
.compat-item .ico { flex-shrink: 0; font-size: 13px; line-height: 1.4; }
.compat-item.is-error { background: var(--danger-soft); border-color: rgba(255, 95, 109, 0.25); color: #ffb3b9; }
.compat-item.is-warn { background: var(--warn-soft); border-color: rgba(247, 185, 85, 0.22); color: #ffd79a; }
.compat-item.is-info { background: rgba(139, 124, 246, 0.09); border-color: rgba(139, 124, 246, 0.22); color: #c4bbff; }
.compat-item.is-ok { background: rgba(74, 222, 128, 0.08); border-color: rgba(74, 222, 128, 0.22); color: #a7f3c0; }

.power-bar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.power-track { flex: 1; min-width: 200px; height: 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.07); overflow: hidden; position: relative; }
.power-fill { position: absolute; inset: 0 auto 0 0; border-radius: 999px; background: linear-gradient(90deg, var(--accent), #7ee8ff); }
.power-fill.is-warn { background: linear-gradient(90deg, var(--warn), #ff9f45); }
.power-legend { display: flex; gap: 14px; font-size: 11.5px; color: var(--muted); flex-wrap: wrap; }
.power-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 5px; }

/* ─────────── 配件库 ─────────── */
.catalog-tools { display: flex; gap: 10px; }
.catalog-tools input { width: 220px; }
.chip-row-lg { margin-bottom: 18px; }
.catalog-body { display: grid; grid-template-columns: repeat(auto-fill, minmax(258px, 1fr)); gap: 14px; }
.part-card {
  background: linear-gradient(180deg, rgba(19, 27, 38, 0.9), rgba(11, 16, 24, 0.94));
  border: 1px solid var(--line); border-radius: 14px; padding: 16px;
  display: flex; flex-direction: column; gap: 10px; cursor: pointer; transition: 0.16s;
}
.part-card:hover { border-color: rgba(46, 230, 197, 0.4); transform: translateY(-2px); }
.part-card-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.part-card h4 { font-size: 13.5px; font-weight: 600; line-height: 1.4; }
.part-brand { font-size: 11px; color: var(--muted); margin-top: 2px; }
.part-price { font-family: var(--mono); font-size: 17px; font-weight: 700; white-space: nowrap; }
.part-price small { font-size: 10.5px; color: var(--muted); display: block; text-align: right; font-weight: 400; }
.part-specs { display: flex; flex-wrap: wrap; gap: 5px; }
.part-specs span { font-size: 10.5px; padding: 2px 7px; border-radius: 6px; background: rgba(255, 255, 255, 0.05); color: var(--text-dim); }
.part-spark { display: flex; align-items: center; gap: 8px; margin-top: auto; }
.trend { font-family: var(--mono); font-size: 11px; padding: 1px 6px; border-radius: 5px; white-space: nowrap; }
.trend.is-down { color: #4ade80; background: rgba(74, 222, 128, 0.1); }
.trend.is-up { color: #ff7b86; background: rgba(255, 95, 109, 0.1); }
.trend.is-flat { color: var(--muted); background: rgba(255, 255, 255, 0.05); }

/* ─────────── 行情 ─────────── */
.market-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 18px; margin-bottom: 18px; }
.card h3 { font-size: 15px; margin-bottom: 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.card h3 .badge { font-size: 10.5px; font-weight: 600; padding: 2px 8px; border-radius: 6px; background: var(--accent-soft); color: var(--accent); }
.source-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 12.5px; }
.source-row:last-child { border-bottom: 0; }
.source-row .name { flex: 1; }
.source-row .kind { font-size: 10px; padding: 1px 7px; border-radius: 5px; border: 1px solid var(--line-strong); color: var(--muted); }
.source-row .state { font-size: 11px; }
.state-ok { color: var(--ok); }
.state-bad { color: var(--danger); }
.job-row { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; font-size: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); color: var(--text-dim); }
.job-row:last-child { border-bottom: 0; }
.job-row .mono { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.pill { font-size: 10.5px; padding: 1px 8px; border-radius: 5px; font-weight: 600; }
.pill-success { background: rgba(74, 222, 128, 0.13); color: #6ee7a0; }
.pill-partial { background: var(--warn-soft); color: #ffcb7a; }
.pill-failed { background: var(--danger-soft); color: #ff9098; }
.pill-running { background: var(--violet-soft); color: #b7abff; }

.drop-row { display: grid; grid-template-columns: 1fr auto auto auto; gap: 14px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 12.5px; cursor: pointer; }
.drop-row:last-child { border-bottom: 0; }
.drop-row:hover { color: var(--accent); }

/* ─────────── 配置单 ─────────── */
.saved-body { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.saved-card { background: linear-gradient(180deg, rgba(19, 27, 38, 0.9), rgba(11, 16, 24, 0.94)); border: 1px solid var(--line); border-radius: 14px; padding: 18px; cursor: pointer; transition: 0.16s; }
.saved-card:hover { border-color: var(--accent); }
.saved-card h4 { font-size: 14.5px; margin-bottom: 4px; }
.saved-card .meta { font-size: 11.5px; color: var(--muted); font-family: var(--mono); }
.saved-card .total { font-family: var(--mono); font-size: 20px; font-weight: 700; margin: 10px 0 8px; }
.empty { text-align: center; color: var(--muted); padding: 60px 20px; font-size: 13.5px; border: 1px dashed var(--line-strong); border-radius: var(--radius); }

/* ─────────── 抽屉 ─────────── */
.drawer { position: fixed; inset: 0; z-index: 60; pointer-events: none; }
.drawer::before {
  content: ""; position: absolute; inset: 0; background: rgba(3, 6, 10, 0.66);
  backdrop-filter: blur(3px); opacity: 0; transition: 0.24s;
}
.drawer.is-open { pointer-events: auto; }
.drawer.is-open::before { opacity: 1; }
.drawer-panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(520px, 94vw);
  background: #0a0f16; border-left: 1px solid var(--line);
  padding: 28px; overflow-y: auto;
  transform: translateX(102%); transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}
.drawer.is-open .drawer-panel { transform: none; }
.drawer-close {
  position: absolute; top: 16px; right: 18px; width: 30px; height: 30px;
  border-radius: 8px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.04); color: var(--muted);
}
.drawer-close:hover { color: var(--text); border-color: var(--line-strong); }
.drawer-head { padding-right: 34px; margin-bottom: 20px; }
.drawer-head h3 { font-size: 18px; line-height: 1.35; }
.drawer-head .sub { font-size: 12px; color: var(--muted); margin-top: 4px; }
.offer-list { display: flex; flex-direction: column; gap: 8px; margin: 16px 0; }
.offer {
  display: flex; align-items: center; gap: 12px; padding: 11px 13px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 11px; font-size: 12.5px;
}
.offer.is-best { border-color: rgba(46, 230, 197, 0.4); background: rgba(46, 230, 197, 0.06); }
.offer .plat { width: 62px; font-weight: 650; display: flex; align-items: center; gap: 6px; }
.offer .note { flex: 1; color: var(--muted); font-size: 11px; }
.offer .price { font-family: var(--mono); font-weight: 700; font-size: 14px; }
.offer a { font-size: 11px; color: var(--accent); }

.chart-wrap { margin-top: 18px; }
.chart-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; font-size: 12px; color: var(--muted); }
.chart-svg { width: 100%; height: auto; display: block; overflow: visible; }

/* ─────────── Toast ─────────── */
.toast-wrap { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 90; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast {
  padding: 10px 18px; border-radius: 10px; font-size: 13px;
  background: rgba(19, 27, 38, 0.97); border: 1px solid var(--line-strong);
  box-shadow: 0 16px 40px -18px rgba(0, 0, 0, 0.9);
  animation: toastIn 0.24s ease;
  max-width: 90vw;
}
.toast.is-error { border-color: rgba(255, 95, 109, 0.45); color: #ffb3b9; }
.toast.is-ok { border-color: rgba(46, 230, 197, 0.45); color: var(--accent); }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ─────────── 骨架屏 ─────────── */
.skeleton { border-radius: 10px; background: linear-gradient(100deg, var(--surface-2) 20%, var(--surface-3) 50%, var(--surface-2) 80%); background-size: 220% 100%; animation: shimmer 1.3s infinite; }
@keyframes shimmer { to { background-position: -220% 0; } }
.sk-card { height: 220px; }

.footer {
  position: relative; z-index: 1; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 22px clamp(16px, 4vw, 48px); border-top: 1px solid var(--line);
  font-size: 11.5px; color: var(--muted);
}

/* ─────────── 响应式 ─────────── */
@media (max-width: 1020px) {
  .hero { grid-template-columns: 1fr; padding-top: 40px; }
  .hero-visual { display: none; }
  .field-budget { grid-column: span 1; }
}
@media (max-width: 760px) {
  .topbar { flex-wrap: wrap; gap: 12px; padding: 12px 16px; }
  .tabs { order: 3; width: 100%; overflow-x: auto; }
  .topbar-right { display: none; }
  .hero h1 { font-size: 27px; }
  .hero-stats { gap: 22px; }
  .wizard, .detail, .card { padding: 16px; }
  .catalog-tools { width: 100%; }
  .catalog-tools input { flex: 1; width: auto; }
  .parts-table th:nth-child(2), .parts-table td:nth-child(2) { display: none; }
  .drawer-panel { padding: 20px; }
}

/* ── 下单清单（模态） ───────────────────────────── */
.modal { position: fixed; inset: 0; z-index: 80; display: none; }
.modal.is-open { display: block; }
.modal-mask { position: absolute; inset: 0; background: rgba(3, 6, 10, 0.72); backdrop-filter: blur(3px); }
.modal-panel {
  position: relative; margin: 5vh auto; width: min(900px, 94vw); max-height: 90vh;
  display: flex; flex-direction: column;
  background: #0a0f16; border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 40px 100px -40px rgba(0, 0, 0, 0.95);
  animation: modalIn 0.22s ease;
}
@keyframes modalIn { from { opacity: 0; transform: translateY(10px) scale(0.99); } to { opacity: 1; transform: none; } }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 20px 24px 14px; border-bottom: 1px solid var(--line); }
.modal-head h3 { font-size: 17px; display: flex; align-items: center; gap: 8px; }
.modal-head .drawer-close { position: static; flex: 0 0 auto; }
.muted-xs { font-size: 11.5px; color: var(--muted); margin-top: 5px; }
.sheet-body { padding: 4px 24px 0; overflow-y: auto; flex: 1; }
.sheet-scroll { overflow-x: auto; }
.sheet-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.sheet-table td { padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.sheet-table tr:last-child td { border-bottom: none; }
.sheet-table .part-name { font-weight: 600; }
.sheet-table .part-spec { font-size: 11px; color: var(--muted); margin-top: 2px; }
.sheet-select {
  background: var(--surface-2); color: var(--text); border: 1px solid var(--line);
  border-radius: 8px; padding: 6px 9px; font-size: 12px; font-family: inherit; min-width: 132px;
}
.sheet-select:focus { outline: none; border-color: var(--accent); }
.sheet-act { text-align: right; white-space: nowrap; }
.sheet-note { margin-top: 12px; font-size: 11.5px; color: var(--muted); line-height: 1.7; }
.sheet-note code { font-family: var(--mono); background: var(--surface-2); padding: 1px 5px; border-radius: 4px; }
.sheet-disclaimer {
  margin: 14px 0 16px; padding: 12px 14px; border-radius: 11px;
  border: 1px solid rgba(255, 190, 90, 0.26); background: rgba(255, 190, 90, 0.06);
  color: #edc48d; font-size: 11.5px; line-height: 1.7;
}
.sheet-disclaimer b { display: block; margin-bottom: 4px; color: #f6d3a0; font-size: 12px; }
.sheet-empty, .skeleton { padding: 40px 0; text-align: center; color: var(--muted); font-size: 13px; }
.modal-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 24px 18px; border-top: 1px solid var(--line);
}
.sheet-total { font-size: 12px; color: var(--muted); }
.sheet-total b { font-family: var(--mono); font-size: 20px; color: var(--text); margin-left: 8px; vertical-align: -1px; }
.sheet-actions { display: flex; gap: 8px; flex-wrap: wrap; }

@media (max-width: 720px) {
  .modal-panel { margin: 0; width: 100%; max-height: 100vh; height: 100vh; border-radius: 0; border: none; }
  .modal-head, .sheet-body, .modal-foot { padding-left: 16px; padding-right: 16px; }
  .sheet-table td:nth-child(1) { display: none; }
  .sheet-table .sheet-select { min-width: 108px; }
  .modal-foot { flex-direction: column; align-items: stretch; }
  .sheet-actions { justify-content: space-between; }
}
