:root {
  --bg: #090b14;
  --bg-2: #0f1222;
  --surface: rgba(255, 255, 255, .045);
  --surface-2: rgba(255, 255, 255, .08);
  --border: rgba(255, 255, 255, .09);
  --border-strong: rgba(255, 255, 255, .18);
  --text: #eceef6;
  --muted: #8d92ab;
  --accent: #8b7cff;
  --accent-2: #2fd5f0;
  --grad: linear-gradient(120deg, #8b7cff 0%, #5a8dff 50%, #2fd5f0 100%);
  --good: #5ee6a0;
  --warn: #ffb067;
  --bad: #ff7a8a;

  /* 五个侧重方向各一种颜色 */
  --c-cpu: #a78bfa;
  --c-gpu: #4ade80;
  --c-battery: #fbbf24;
  --c-price: #22d3ee;
  --c-weight: #f472b6;

  --title-grad: linear-gradient(90deg, #fff, #c9c5ff);
  --inset: rgba(0, 0, 0, .25);
  --placeholder: #5f6480;
  --node-bg: rgba(18, 21, 38, .88);
  --node-center: rgba(16, 18, 36, .95);
  --modal-bg: rgba(17, 20, 36, .96);
  --overlay: rgba(4, 5, 12, .6);
  --shadow: rgba(0, 0, 0, .5);
  --space-bg: #070912;
  --glow: rgba(91, 92, 255, .2);
  --star: rgba(255, 255, 255, .5);
  --star-2: rgba(255, 255, 255, .35);
  --vignette: rgba(0, 0, 0, .55);
  --foot: #5a5f78;
  --aurora-op: .22;

  --radius: 16px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: dark;
}

/* 浅色模式：由页顶开关切换，写在 <html data-theme="light"> 上 */
:root[data-theme="light"] {
  --bg: #f3f4fa;
  --bg-2: #ffffff;
  --surface: rgba(255, 255, 255, .75);
  --surface-2: rgba(24, 28, 70, .07);
  --border: rgba(24, 28, 70, .1);
  --border-strong: rgba(24, 28, 70, .24);
  --text: #1b1e2e;
  --muted: #646a85;
  --accent: #6a5cff;
  --accent-2: #0b93b3;
  --good: #128a55;
  --warn: #c05f08;
  --bad: #d23a4f;

  --c-cpu: #7c5cf0;
  --c-gpu: #16a34a;
  --c-battery: #d38d00;
  --c-price: #0891b2;
  --c-weight: #db2777;

  --title-grad: linear-gradient(90deg, #1b1e2e, #5b4fe0);
  --inset: rgba(24, 28, 70, .05);
  --placeholder: #9aa0b8;
  --node-bg: rgba(255, 255, 255, .94);
  --node-center: #ffffff;
  --modal-bg: rgba(255, 255, 255, .98);
  --overlay: rgba(24, 28, 70, .3);
  --shadow: rgba(30, 35, 90, .12);
  --space-bg: #f8f9fe;
  --glow: rgba(106, 92, 255, .12);
  --star: rgba(80, 90, 170, .22);
  --star-2: rgba(80, 90, 170, .14);
  --vignette: rgba(24, 28, 70, .05);
  --foot: #9096ad;
  --aurora-op: .14;
  color-scheme: light;
}

/* 主题切换开关 */
.theme-toggle {
  margin-left: auto; flex: none; display: flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 999px;
  padding: 4px; cursor: pointer;
}
.theme-toggle span {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 15px;
  color: var(--muted); transition: background .3s var(--ease), color .3s;
}
:root:not([data-theme="light"]) .theme-toggle .t-dark,
:root[data-theme="light"] .theme-toggle .t-light { background: var(--grad); color: #fff; }
/* 切换时颜色平滑过渡 */
.theming, .theming * { transition: background-color .35s, border-color .35s, color .35s !important; }

* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: "PingFang SC", "HarmonyOS Sans SC", "MiSans", "Microsoft YaHei", -apple-system, "Segoe UI", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
button { font: inherit; color: inherit; }

/* 背景里缓慢漂移的极光 */
.aurora { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.aurora i {
  position: absolute; width: 60vmax; height: 60vmax; border-radius: 50%;
  filter: blur(90px); opacity: var(--aurora-op); animation: drift 26s ease-in-out infinite alternate;
}
.aurora i:nth-child(1) { background: #6d5cff; top: -25vmax; left: -15vmax; }
.aurora i:nth-child(2) { background: #00b4d8; bottom: -30vmax; right: -20vmax; animation-delay: -8s; }
.aurora i:nth-child(3) { background: #d946ef; top: 30%; left: 45%; width: 35vmax; height: 35vmax; opacity: .1; animation-delay: -16s; }
@keyframes drift {
  to { transform: translate(8vmax, 6vmax) scale(1.15); }
}

.top, .wrap { max-width: 820px; margin: 0 auto; padding-left: 16px; padding-right: 16px; }
.wrap.wide { max-width: 1180px; }
.top { padding-top: 36px; display: flex; gap: 14px; align-items: center; }
.logo {
  width: 44px; height: 44px; flex: none; border-radius: 12px; display: grid; place-items: center;
  background: var(--grad); color: #fff; font-size: 20px; box-shadow: 0 8px 30px rgba(139, 124, 255, .35);
}
.top h1 {
  margin: 0; font-size: 24px; letter-spacing: .5px;
  background: var(--title-grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.top p { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.wrap { padding-top: 20px; padding-bottom: 16px; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 26px;
  margin-bottom: 16px;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.card h2 { margin: 0 0 4px; font-size: 22px; font-weight: 650; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.h-sub { font-size: 15px; font-weight: 400; color: var(--muted); }
.hint { margin: 0 0 18px; color: var(--muted); font-size: 13px; }
.empty { color: var(--muted); text-align: center; padding: 60px 10px; }

/* 进度 */
.progress-line { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.progress { flex: 1; height: 6px; background: var(--surface-2); border-radius: 3px; overflow: hidden; }
.progress i {
  display: block; height: 100%; background: var(--grad); border-radius: 3px;
  box-shadow: 0 0 12px rgba(90, 141, 255, .7); transition: width .5s var(--ease);
}
#progress-text { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* 步骤切换动画 */
.step-card { min-height: 380px; }
.step-card.enter-fwd { animation: in-fwd .45s var(--ease); }
.step-card.enter-back { animation: in-back .45s var(--ease); }
@keyframes in-fwd { from { opacity: 0; transform: translateX(40px); } }
@keyframes in-back { from { opacity: 0; transform: translateX(-40px); } }
.step-card.enter-fwd .tile, .step-card.enter-back .tile,
.step-card.enter-fwd .purpose, .step-card.enter-back .purpose {
  animation: rise .5s var(--ease) both; animation-delay: calc(var(--i, 0) * 25ms + 80ms);
}
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }

/* 用途卡片 */
.purposes { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.purposes.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 520px) { .purposes.three { grid-template-columns: minmax(0, 1fr); } }
.purpose {
  display: flex; align-items: center; gap: 12px; text-align: left;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 14px 16px; cursor: pointer;
  transition: transform .25s var(--ease), border-color .25s, background .25s, box-shadow .25s;
}
.purpose:hover { transform: translateY(-2px); border-color: var(--border-strong); }
.purpose.on {
  border-color: transparent; background: linear-gradient(var(--bg-2), var(--bg-2)) padding-box, var(--grad) border-box;
  border: 1px solid transparent; box-shadow: 0 8px 28px rgba(108, 117, 255, .25);
}
.purpose-icon {
  width: 38px; height: 38px; flex: none; border-radius: 10px; display: grid; place-items: center;
  background: var(--surface-2); font-size: 19px; transition: transform .3s var(--ease);
}
.purpose.on .purpose-icon { transform: scale(1.1) rotate(-6deg); background: rgba(139, 124, 255, .22); }

/* 通用选项 */
.options { display: flex; flex-wrap: wrap; gap: 10px; }
.option {
  border: 1px solid var(--border); background: var(--surface); border-radius: 999px;
  padding: 8px 18px; cursor: pointer; transition: all .2s var(--ease);
}
.option:hover { border-color: var(--border-strong); }
.option.on { background: var(--grad); border-color: transparent; color: #fff; box-shadow: 0 6px 20px rgba(90, 141, 255, .35); }
.field { margin-top: 22px; }
.field > span { display: block; margin-bottom: 10px; font-weight: 600; }
.field-note { font-weight: 400; color: var(--muted); font-size: 12px; margin-left: 8px; }
.option small { margin-left: 6px; font-size: 11px; opacity: .65; }

/* 软件选择 */
.search-wrap { position: relative; margin-bottom: 16px; }
.search-wrap::before {
  content: "⌕"; position: absolute; left: 14px; top: 50%; transform: translateY(-52%);
  color: var(--muted); font-size: 18px;
}
.search {
  width: 100%; font: inherit; color: var(--text); background: var(--inset);
  border: 1px solid var(--border); border-radius: 12px; padding: 11px 14px 11px 40px;
  transition: border-color .2s, box-shadow .2s;
}
.search::placeholder { color: var(--placeholder); }
.search:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(139, 124, 255, .18); }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.tile {
  border: 1px solid var(--border); border-radius: 12px; background: var(--surface);
  transition: border-color .2s, background .2s, transform .2s var(--ease);
}
.tile:hover { border-color: var(--border-strong); transform: translateY(-1px); }
.tile.on {
  grid-column: span 2; background: rgba(139, 124, 255, .1); border-color: rgba(139, 124, 255, .55);
}
@media (max-width: 480px) { .tile.on { grid-column: auto; } }
.tile.fresh { animation: pop .4s var(--ease); }
.tile.fresh .hours { animation: open .35s var(--ease); }
@keyframes pop { 40% { transform: scale(1.03); } }
@keyframes open { from { opacity: 0; transform: translateY(-6px); } }
.tile-name {
  width: 100%; text-align: left; background: transparent; border: none;
  padding: 11px 12px; cursor: pointer; display: flex; align-items: center; gap: 8px;
}
.tile-name small { flex: none; }
.check {
  width: 16px; height: 16px; border-radius: 5px; border: 1.5px solid var(--border-strong); flex: none;
  display: grid; place-items: center; transition: all .2s var(--ease);
}
.tile.on .check { background: var(--grad); border-color: transparent; }
.tile.on .check::after { content: "✓"; font-size: 11px; color: #fff; font-weight: 700; }
.tile small { font-size: 11px; border-radius: 5px; padding: 0 6px; }
.os { background: rgba(255, 176, 103, .14); color: var(--warn); }
.tag { background: var(--surface-2); color: var(--muted); }
.hours { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 12px 12px 36px; }
.hours button {
  border: 1px solid var(--border); background: var(--inset); border-radius: 999px;
  padding: 3px 12px; font-size: 13px; cursor: pointer; transition: all .2s var(--ease);
}
.hours button:hover { border-color: var(--border-strong); }
.hours button.on { background: var(--grad); border-color: transparent; color: #fff; }
.more { margin-top: 14px; background: transparent; border: none; color: var(--accent-2); cursor: pointer; padding: 4px 0; }
.custom { margin-top: 8px; }
.custom p { margin: 0 0 12px; }

/* 底部导航 */
.nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.picked { color: var(--muted); font-size: 14px; }
.btn {
  background: var(--grad); color: #fff; border: none; border-radius: 12px; padding: 11px 24px; cursor: pointer;
  font-weight: 600; box-shadow: 0 8px 24px rgba(90, 141, 255, .3);
  transition: transform .2s var(--ease), box-shadow .2s;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 10px 30px rgba(90, 141, 255, .45); }
.btn:active { transform: scale(.97); }
.btn.ghost { background: var(--surface); border: 1px solid var(--border); box-shadow: none; font-weight: 400; color: var(--text); }

/* 页面切换 */
.leaving { animation: leave .26s ease forwards; }
@keyframes leave { to { opacity: 0; transform: translateY(-14px) scale(.985); } }
.arriving { animation: arrive .6s var(--ease); }
@keyframes arrive { from { opacity: 0; transform: translateY(18px); } }

/* 结果页：需求画像 */
.result-head { display: flex; gap: 16px; align-items: flex-start; justify-content: space-between; }
.profile { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; flex: 1; }
@media (max-width: 860px) {
  .result-head { flex-direction: column-reverse; }
  .profile { grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; }
}
@media (max-width: 480px) { .profile { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.profile div {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 8px 12px;
  animation: rise .5s var(--ease) both; animation-delay: calc(var(--i) * 50ms + 150ms);
}
.profile b { display: block; font-size: 15px; }
.profile span { font-size: 12px; color: var(--muted); }
.alert { margin-top: 12px; padding: 10px 14px; border-radius: 12px; font-size: 14px; background: rgba(255, 176, 103, .1); color: var(--warn); border: 1px solid rgba(255, 176, 103, .3); }

.crumbs { margin-top: 16px; font-size: 14px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; color: var(--muted); min-height: 22px; }
.crumbs button { background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 1px 10px; color: var(--text); cursor: pointer; }
.crumbs button:hover { border-color: var(--border-strong); }
.crumbs b { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sep { opacity: .5; }

.legend { display: flex; flex-wrap: wrap; gap: 14px; margin: 10px 0 0; font-size: 12px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend span::before { content: ""; width: 14px; height: 3px; border-radius: 2px; background: var(--c); box-shadow: 0 0 8px var(--c); }

/* 立体空间 */
.stage { margin: 10px 0 18px; }
.space {
  position: relative; overflow: hidden; border-radius: 22px; border: 1px solid var(--border);
  user-select: none; perspective: 1600px;
  background:
    radial-gradient(1px 1px at 20% 30%, var(--star), transparent 60%) 0 0 / 140px 140px,
    radial-gradient(1.5px 1.5px at 70% 60%, var(--star-2), transparent 60%) 0 0 / 230px 230px,
    radial-gradient(ellipse at 50% 50%, var(--glow), transparent 65%), var(--space-bg);
  background-repeat: repeat, repeat, no-repeat;
  animation: arrive .8s var(--ease);
}
.plane {
  position: absolute; inset: 0; transform-style: preserve-3d;
  transform: rotateX(10deg); transform-origin: 50% 55%;
  transition: transform .6s var(--ease);
}
.space::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at 50% 50%, transparent 55%, var(--vignette));
}
.space-edges { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.edge { stroke-width: 2; stroke-linecap: round; stroke-dasharray: 6 8; animation: flow 1.6s linear infinite; transition: stroke-width .2s; }
.edge.l2 { stroke-width: 1.2; stroke-dasharray: 3 7; }
@keyframes flow { to { stroke-dashoffset: -28; } }
.space-hint { position: absolute; left: 16px; bottom: 12px; font-size: 12px; color: var(--muted); z-index: 5; pointer-events: none; }

/* 悬停某台机型时，只突出它和相连的机型 */
.space .node { transition: filter .25s, box-shadow .25s, border-color .25s; }
.space.focusing .node:not(.lit) { filter: brightness(.45) saturate(.6); }
.space.focusing .edge:not(.lit) { stroke-opacity: .2; }
.space.focusing .edge.lit { stroke-width: 3; }

.node {
  --c: var(--accent);
  position: absolute; left: 0; top: 0; will-change: transform, opacity;
  display: flex; flex-direction: column; gap: 2px; text-align: left; cursor: pointer;
  background: var(--node-bg); border: 1px solid color-mix(in srgb, var(--c) 40%, transparent);
  border-radius: 14px; padding: 10px 13px;
  box-shadow: 0 10px 30px var(--shadow), 0 0 0 0 var(--c);
  transition: box-shadow .25s, border-color .25s, background .25s;
}
.node:hover { border-color: var(--c); box-shadow: 0 12px 34px var(--shadow), 0 0 22px -4px var(--c); }
.node.l1 { width: 196px; }
.node.l1::before {
  content: ""; position: absolute; left: 12px; right: 12px; top: -1px; height: 2px; border-radius: 2px;
  background: var(--c); box-shadow: 0 0 10px var(--c);
}
.node-dir { font-size: 12px; font-weight: 600; color: var(--c); margin-bottom: 2px; }
.node-dir em { font-style: normal; font-weight: 400; color: var(--muted); margin-left: 6px; }
.node-tag { font-size: 11px; color: var(--muted); letter-spacing: 1px; }
.node.l0 {
  width: 240px; padding: 14px 18px;
  border: 1px solid transparent;
  background: linear-gradient(var(--node-center), var(--node-center)) padding-box, var(--grad) border-box;
  box-shadow: 0 0 60px -10px rgba(108, 117, 255, .7), 0 14px 40px var(--shadow);
  animation: breathe 3.5s ease-in-out infinite;
}
@keyframes breathe { 50% { box-shadow: 0 0 80px -6px rgba(108, 117, 255, .85), 0 14px 40px var(--shadow); } }
.node.l2 {
  flex-direction: row; align-items: baseline; gap: 8px; white-space: nowrap;
  padding: 5px 12px; border-radius: 999px; background: var(--node-bg);
}
.node.l2 .node-name { font-size: 12px; font-weight: 500; }
.node.l2 .node-meta { font-size: 11px; }
/* 精简推荐树（520–720px）：只有第一层，卡片收窄 */
.space.compact .node.l1 { width: 150px; padding: 9px 11px; }
.space.compact .node.l0 { width: 178px; padding: 12px 14px; }
.space.compact .node.l0 .node-name { font-size: 16px; }
.space.compact .node-name { font-size: 13px; }
.node.leaving { pointer-events: none; }
.node-name { font-weight: 600; line-height: 1.35; font-size: 14px; }
.node.l0 .node-name { font-size: 18px; }
.node-meta { font-size: 12px; color: var(--muted); }
.node-meta i { color: var(--warn); font-style: normal; }
.node-vs { font-size: 11px; color: var(--muted); margin-top: 4px; }
.node-score { font-size: 13px; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; font-weight: 600; }
.trade { display: flex; flex-direction: column; font-size: 12px; margin-top: 4px; }
.gain { color: var(--good); }
.loss { color: var(--warn); }

/* 窄屏列表 */
.list { display: flex; flex-direction: column; gap: 10px; }
.list .node { position: static; width: auto; }
.list-center { border-radius: 16px; }
.list-row {
  display: flex; flex-direction: column; gap: 2px; text-align: left; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--c);
  border-radius: 14px; padding: 12px 14px; animation: rise .5s var(--ease) both; animation-delay: calc(var(--i) * 60ms);
}
.list-dir { font-size: 13px; color: var(--c); font-weight: 600; }
.list-dir em { font-style: normal; font-weight: 400; color: var(--muted); margin-left: 8px; }
.list-row .node-meta i { color: var(--warn); font-style: normal; }

/* 详情弹窗 */
.modal {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px;
  background: var(--overlay); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  animation: fade .25s ease;
}
.modal[hidden] { display: none; }
.modal-card {
  position: relative; width: min(860px, 100%); max-height: calc(100vh - 32px); overflow-y: auto;
  background: var(--modal-bg); border: 1px solid var(--border-strong); border-radius: 20px;
  padding: 26px 28px; box-shadow: 0 30px 80px var(--shadow), 0 0 60px -20px rgba(108, 117, 255, .6);
  animation: zoom-in .35s var(--ease);
}
.modal.closing { animation: fade .2s ease reverse forwards; }
.modal.closing .modal-card { animation: zoom-in .2s ease reverse forwards; }
@keyframes fade { from { opacity: 0; } }
@keyframes zoom-in { from { opacity: 0; transform: translateY(16px) scale(.96); } }
.modal-x {
  position: absolute; right: 14px; top: 12px; width: 34px; height: 34px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--border); cursor: pointer; font-size: 20px; line-height: 1;
}
.modal-x:hover { border-color: var(--border-strong); }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.detail-price { font-size: 18px; font-weight: 600; margin-top: 2px; }
.detail-price i { font-style: normal; font-size: 12px; font-weight: 400; color: var(--warn); margin-left: 10px; }
.versus { margin: 0 0 20px; padding: 12px 14px; border-radius: 12px; background: var(--inset); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.chip { font-size: 13px; padding: 2px 10px; border-radius: 999px; background: var(--surface); }
.chip.gain { background: rgba(94, 230, 160, .1); }
.chip.loss { background: rgba(255, 176, 103, .1); }
/* 可能缺货 / 买不到反馈 */
i.stock { display: inline-block; margin-left: 6px; padding: 0 7px; border-radius: 999px; font-size: 11px; font-style: normal; line-height: 18px;
  color: var(--warn); border: 1px solid currentColor; vertical-align: 1px; white-space: nowrap; }
.detail-price i.stock { font-size: 12px; }
.stock-note { margin: 6px 0 0; font-size: 12px; color: var(--warn); max-width: 46ch; }
.feedback { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px;
  margin: 18px 0 0; padding: 12px 14px; border-radius: 12px; border: 1px dashed var(--border-strong); font-size: 13px; color: var(--muted); }
.feedback-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.btn.small { padding: 6px 12px; font-size: 13px; }
.gone-list { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; font-size: 13px; color: var(--muted); }
.gone-list .chip { border: 1px solid var(--border); color: var(--text); font: inherit; font-size: 13px; cursor: pointer; text-decoration: line-through; text-decoration-color: var(--muted); }
.gone-list .chip:hover { text-decoration: none; }
.gone-list .chip small { color: var(--muted); }
.toast { position: fixed; left: 50%; bottom: 28px; z-index: 60; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  padding: 10px 16px; border-radius: 12px; background: var(--modal-bg); color: var(--text); border: 1px solid var(--border-strong);
  box-shadow: 0 10px 30px var(--shadow); font-size: 14px; transition: opacity .25s var(--ease), transform .25s var(--ease); max-width: calc(100vw - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.siblings { margin: 18px 0 0; padding: 12px 14px; border-radius: 12px; background: var(--inset); }
.chip.sib { border: 1px solid var(--line, transparent); color: var(--text); font: inherit; font-size: 13px; cursor: pointer; transition: background .15s; }
.chip.sib:hover { background: var(--inset); }
.chip.sib small { margin-left: 6px; color: var(--muted); }
.detail-head { display: flex; justify-content: space-between; gap: 16px; align-items: center; margin: 0 40px 18px 0; }
.detail-head h2 { margin: 2px 0 0; font-size: 20px; }
.eyebrow { font-size: 12px; color: var(--muted); letter-spacing: 1px; }
.score-ring {
  --p: 0; width: 72px; height: 72px; flex: none; border-radius: 50%; display: grid; place-content: center; text-align: center;
  background: radial-gradient(closest-side, var(--bg-2) 80%, transparent 81%), conic-gradient(#8b7cff, #2fd5f0 calc(var(--p) * 1%), var(--surface-2) 0);
}
.score-ring b { font-size: 20px; line-height: 1; }
.score-ring span { font-size: 10px; color: var(--muted); }
.detail-grid { display: grid; grid-template-columns: 1.1fr 1fr 1fr; gap: 26px; }
@media (max-width: 900px) { .detail-grid { grid-template-columns: minmax(0, 1fr); } }
.bars { display: flex; flex-direction: column; gap: 10px; }
.bar-row { display: grid; grid-template-columns: 64px 1fr 96px; gap: 10px; align-items: center; font-size: 13px; }
.bars-note { margin: 4px 0 0; font-size: 11px; color: var(--muted); }
.bar-row em { font-style: normal; color: var(--muted); font-size: 12px; text-align: right; }
.bar { height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.bar i {
  display: block; height: 100%; width: calc(var(--w) * 100%); border-radius: 4px;
  background: var(--c); box-shadow: 0 0 10px var(--c); animation: grow .9s var(--ease) both;
}
@keyframes grow { from { width: 0; } }
.reasons { list-style: none; padding: 0; margin: 0; font-size: 14px; }
.reasons li { padding: 3px 0 3px 22px; position: relative; }
.reasons li::before { position: absolute; left: 0; }
.reasons .pro::before { content: "✓"; color: var(--good); }
.reasons .con::before { content: "!"; color: var(--warn); font-weight: 700; left: 4px; }
.specs { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; font-size: 14px; }
.specs dt { color: var(--muted); }
.specs dd { margin: 0; }
.src { font-size: 12px; color: var(--muted); margin: 18px 0 0; word-break: break-all; }
.src a { color: var(--muted); }

details summary { cursor: pointer; color: var(--muted); }
.excluded { list-style: none; padding: 0; margin: 10px 0 0; font-size: 14px; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.excluded li { padding: 8px 12px; border-radius: 10px; background: var(--inset); }
.excluded span { display: block; color: var(--bad); font-size: 12px; }

.foot { text-align: center; color: var(--foot); font-size: 12px; padding: 12px 16px 36px; }

/* 数据可信度标识：实测 / 同模具推算 / 估算 */
i.trust { display: inline-block; margin-left: 6px; padding: 0 7px; border-radius: 999px; font-size: 11px; font-style: normal; line-height: 18px;
  border: 1px solid currentColor; vertical-align: 1px; white-space: nowrap; cursor: help; }
i.trust.measured { color: var(--good); }
i.trust.derived { color: var(--accent-2); }
i.trust.estimated { color: var(--muted); border-style: dashed; }
.detail-price i.trust { font-size: 12px; }
.node-meta i.trust.measured, .list-row .node-meta i.trust.measured { color: var(--good); }
.node-meta i.trust.derived, .list-row .node-meta i.trust.derived { color: var(--accent-2); }
.node-meta i.trust.estimated, .list-row .node-meta i.trust.estimated { color: var(--muted); }

/* 对比栏 */
body.has-tray { padding-bottom: 84px; }
body.has-tray .toast { bottom: 96px; }
.compare-tray {
  position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 50;
  width: min(860px, calc(100vw - 32px)); display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 10px 12px 10px 16px; border-radius: 16px; background: var(--modal-bg); border: 1px solid var(--border-strong);
  box-shadow: 0 16px 40px var(--shadow); animation: tray-in .3s var(--ease);
}
.compare-tray[hidden] { display: none; }
@keyframes tray-in { from { opacity: 0; transform: translate(-50%, 16px); } }
.tray-label { font-size: 12px; color: var(--muted); letter-spacing: 1px; }
.tray-items { display: flex; flex-wrap: wrap; gap: 8px; flex: 1 1 280px; min-width: 0; align-items: center; }
.tray-item { display: inline-flex; align-items: center; max-width: 100%; border-radius: 999px; background: var(--surface-2); font-size: 13px; }
.tray-name { background: none; border: 0; color: var(--text); font: inherit; padding: 4px 4px 4px 12px; cursor: pointer;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }
.tray-x { background: none; border: 0; color: var(--muted); font-size: 16px; line-height: 1; padding: 4px 10px 4px 4px; cursor: pointer; }
.tray-x:hover { color: var(--text); }
.tray-hint { font-size: 12px; color: var(--muted); }
.tray-btns { display: flex; gap: 8px; margin-left: auto; }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.btn.ghost.on { border-color: var(--good); color: var(--good); }

/* 对比表 */
.modal-card.wide { width: min(1100px, 100%); }
.cmp-hint { margin: 4px 0 14px; }
.cmp-scroll { overflow-x: auto; margin: 0 -4px; padding: 0 4px; }
.cmp { width: 100%; min-width: calc(110px + var(--n) * 190px); border-collapse: separate; border-spacing: 0; font-size: 14px; }
.cmp th, .cmp td { padding: 9px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); }
.cmp td { width: calc((100% - 110px) / var(--n)); }
.cmp tbody th { width: 110px; color: var(--muted); font-weight: 400; font-size: 13px; white-space: nowrap;
  position: sticky; left: 0; background: var(--modal-bg); z-index: 1; }
.cmp thead th { border-bottom: 1px solid var(--border-strong); }
.cmp thead th:first-child { position: sticky; left: 0; background: var(--modal-bg); z-index: 1; }
.cmp-name { display: block; font-weight: 600; line-height: 1.35; }
.cmp-config { display: block; font-size: 12px; color: var(--muted); font-weight: 400; margin-top: 2px; }
.cmp-actions { display: flex; gap: 12px; margin-top: 6px; }
.cmp small { display: block; font-size: 12px; color: var(--muted); }
.cmp td.best { background: rgba(94, 230, 160, .1); box-shadow: inset 3px 0 0 var(--good); }
.cmp-score { font-size: 18px; }
.cmp-list { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.cmp-list li { padding: 2px 0 2px 16px; position: relative; }
.cmp-list li::before { position: absolute; left: 0; }
.cmp-list.pro li::before { content: "✓"; color: var(--good); }
.cmp-list.con li::before { content: "!"; color: var(--warn); font-weight: 700; left: 3px; }
button.link { background: none; border: 0; padding: 0; font: inherit; font-size: 12px; font-weight: 400; color: var(--accent-2); cursor: pointer; }
button.link:hover { text-decoration: underline; }
.cmp-swipe { display: none; }
@media (max-width: 600px) {
  .modal-card.wide { padding: 22px 16px; }
  .cmp { min-width: calc(76px + var(--n) * 136px); font-size: 13px; }
  .cmp th, .cmp td { padding: 8px 8px; }
  .cmp tbody th { width: 76px; white-space: normal; font-size: 12px; }
  .cmp td { width: calc((100% - 76px) / var(--n)); }
  .cmp-swipe { display: inline; }
}
@media (max-width: 520px) {
  .compare-tray { padding: 10px 12px; }
  .tray-btns { width: 100%; justify-content: flex-end; }
  .tray-name { max-width: 150px; }
}

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