/* ==========================================================================
   手机参数库 · 样式表
   浅色高级视觉体系 / 零外部依赖
   ========================================================================== */

:root {
  --brand: #2f6bff;
  --brand-dark: #1d4ed8;
  --brand-soft: #eaf0ff;
  --accent: #7c5cff;
  --teal: #06b6d4;
  --ink: #0f1729;
  --ink-2: #3d4a63;
  --ink-3: #6b7893;
  --ink-4: #9aa5ba;
  --line: #e6ebf4;
  --line-2: #eef2f9;
  --bg: #f5f7fc;
  --card: #ffffff;
  --ok: #10b981;
  --warn: #f59e0b;
  --danger: #ef4444;
  --radius-l: 22px;
  --radius: 16px;
  --radius-s: 11px;
  --sh-1: 0 1px 2px rgba(16, 30, 68, .04), 0 2px 8px rgba(16, 30, 68, .04);
  --sh-2: 0 4px 12px rgba(16, 30, 68, .06), 0 12px 32px rgba(16, 30, 68, .08);
  --sh-3: 0 12px 28px rgba(16, 30, 68, .12), 0 32px 64px rgba(16, 30, 68, .12);
  --font: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Hiragino Sans GB",
          system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "SF Mono", "JetBrains Mono", Consolas, "Courier New", monospace;
}

* { box-sizing: border-box; }

/* 关键：class 上声明的 display 会覆盖 [hidden] 的 display:none，
   这里强制兜底，避免全屏层（对比视图 / 弹窗遮罩）常驻遮挡页面 */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
  overflow-x: hidden;
}

.wrap { width: 100%; max-width: 1320px; margin: 0 auto; padding: 0 26px; }

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
svg { display: block; }

/* ============================ 顶部导航 ============================ */
.topbar {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid var(--line-2);
}
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 66px; }
.logo { display: flex; align-items: center; gap: 11px; font-weight: 800; }
.logo-mark {
  width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center;
  background: linear-gradient(140deg, var(--brand), var(--accent));
  color: #fff; box-shadow: 0 4px 12px rgba(47, 107, 255, .32);
}
.logo-mark svg { width: 21px; height: 21px; }
.logo-text { font-size: 17px; letter-spacing: -.2px; display: flex; flex-direction: column; line-height: 1.15; }
.logo-text em {
  font-style: normal; font-size: 10px; font-weight: 600; letter-spacing: 1.4px;
  color: var(--ink-4); text-transform: uppercase;
}
.topnav { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; }
.topnav a { padding: 7px 14px; border-radius: 999px; color: var(--ink-3); transition: .18s; }
.topnav a:hover { color: var(--brand); background: var(--brand-soft); }
.topnav a.active { color: var(--brand); background: var(--brand-soft); }
.nav-pill {
  padding: 6px 13px; border-radius: 999px; font-size: 12.5px; font-weight: 700;
  color: var(--brand); background: var(--brand-soft); border: 1px solid #d8e3ff;
}

/* ============================ Hero ============================ */
.hero {
  position: relative; padding: 72px 0 54px; overflow: hidden;
  background:
    radial-gradient(1200px 460px at 50% -140px, #e6eeff 0%, rgba(245, 247, 252, 0) 70%),
    linear-gradient(180deg, #fbfcff 0%, var(--bg) 100%);
}
.hero-glow { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .5; pointer-events: none; }
.hero-glow.g1 { width: 380px; height: 380px; background: #b9cdff; top: -150px; left: 6%; animation: float1 15s ease-in-out infinite; }
.hero-glow.g2 { width: 320px; height: 320px; background: #d4c8ff; top: -110px; right: 8%; animation: float2 18s ease-in-out infinite; }
.hero-glow.g3 { width: 260px; height: 260px; background: #b6ecf7; bottom: -150px; left: 46%; animation: float1 21s ease-in-out infinite reverse; }
@keyframes float1 { 0%,100% { transform: translate(0,0) } 50% { transform: translate(28px, 20px) } }
@keyframes float2 { 0%,100% { transform: translate(0,0) } 50% { transform: translate(-32px, 24px) } }

.hero-inner { position: relative; z-index: 2; text-align: center; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 7px; padding: 7px 16px; border-radius: 999px;
  background: rgba(255, 255, 255, .9); border: 1px solid #dfe7f7; color: var(--brand);
  font-size: 12.5px; font-weight: 700; letter-spacing: .2px;
  box-shadow: 0 2px 10px rgba(47, 107, 255, .1); margin-bottom: 22px;
}
.hero-badge::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ok);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, .18);
}
.hero h1 {
  margin: 0 0 14px; font-size: clamp(32px, 5.2vw, 52px); font-weight: 900;
  letter-spacing: -1.6px; line-height: 1.14;
  color: #101a35; /* 兜底：不支持 background-clip:text 时用纯深色 */
}
@supports ((background-clip: text) or (-webkit-background-clip: text)) {
  .hero h1 {
    background: linear-gradient(96deg, #101a35 12%, #2f6bff 52%, #7c5cff 88%);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
  }
}
.hero-sub { margin: 0 0 34px; font-size: 15.5px; color: var(--ink-3); font-weight: 500; }

/* 搜索框 */
.search-box {
  position: relative; display: flex; align-items: center; max-width: 720px; margin: 0 auto;
  background: #fff; border: 1.5px solid #e3eaf8; border-radius: 18px; padding: 0 16px;
  box-shadow: var(--sh-2); transition: .24s cubic-bezier(.4, 0, .2, 1);
}
.search-box:focus-within {
  border-color: var(--brand); transform: translateY(-2px);
  box-shadow: 0 0 0 5px rgba(47, 107, 255, .11), 0 16px 40px rgba(47, 107, 255, .16);
}
.search-icon { width: 20px; height: 20px; color: var(--ink-4); flex-shrink: 0; transition: .2s; }
.search-box:focus-within .search-icon { color: var(--brand); }
#searchInput {
  flex: 1; border: 0; outline: 0; background: transparent; font-family: inherit;
  font-size: 15.5px; padding: 19px 14px; color: var(--ink); font-weight: 500;
}
#searchInput::placeholder { color: var(--ink-4); font-weight: 400; }
#searchInput::-webkit-search-cancel-button { display: none; }
.search-clear {
  width: 26px; height: 26px; border-radius: 50%; border: 0; background: var(--line-2);
  color: var(--ink-3); display: grid; place-items: center; flex-shrink: 0; transition: .16s;
}
.search-clear:hover { background: #e2e8f5; color: var(--ink); }
.search-clear svg { width: 13px; height: 13px; }
.search-kbd {
  font-family: var(--mono); font-size: 11px; color: var(--ink-4); background: #f4f7fd;
  border: 1px solid var(--line); border-radius: 6px; padding: 3px 7px; margin-left: 8px; flex-shrink: 0;
}

.quick-tags { display: flex; flex-wrap: wrap; gap: 9px; justify-content: center; margin-top: 22px; }
.quick-tag {
  padding: 6px 14px; border-radius: 999px; border: 1px solid #e2e9f7; background: rgba(255, 255, 255, .8);
  font-size: 12.5px; font-weight: 600; color: var(--ink-2); transition: .18s;
}
.quick-tag:hover { border-color: var(--brand); color: var(--brand); background: #fff; transform: translateY(-1px); }

/* ============================ 筛选区 ============================ */
.filters { padding: 6px 0 8px; }
.filter-block { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 15px; }
.filter-label {
  flex-shrink: 0; width: 46px; padding-top: 7px; font-size: 13px; font-weight: 700;
  color: var(--ink-3); letter-spacing: .4px;
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; flex: 1; }
.chip {
  padding: 7px 15px; border-radius: 999px; border: 1px solid var(--line);
  background: #fff; font-size: 13px; font-weight: 600; color: var(--ink-2);
  transition: .18s cubic-bezier(.4, 0, .2, 1); display: inline-flex; align-items: center; gap: 7px;
}
.chip:hover { border-color: #c7d6f5; transform: translateY(-1px); box-shadow: var(--sh-1); }
.chip .dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.chip .cnt { font-size: 11px; color: var(--ink-4); font-weight: 600; }
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; box-shadow: 0 6px 16px rgba(15, 23, 41, .2); }
.chip.on .cnt { color: rgba(255, 255, 255, .62); }

.toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 14px 0; margin-top: 6px; border-top: 1px solid var(--line-2); flex-wrap: wrap;
}
.result-info { font-size: 14px; color: var(--ink-3); font-weight: 500; }
.result-info strong { color: var(--brand); font-size: 19px; font-weight: 800; margin: 0 3px; }
.filter-note { color: var(--ink-4); font-size: 13px; margin-left: 6px; }
.toolbar-right { display: flex; align-items: center; gap: 10px; }
.sort-wrap {
  display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-3); font-weight: 600;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-s); padding: 7px 12px;
}
.sort-wrap select {
  border: 0; outline: 0; background: transparent; font-family: inherit; font-size: 13px;
  font-weight: 700; color: var(--ink); cursor: pointer;
}
.btn-ghost {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 15px; border-radius: var(--radius-s);
  border: 1px solid var(--line); background: #fff; font-size: 13px; font-weight: 700; color: var(--ink-2);
  transition: .18s;
}
.btn-ghost svg { width: 14px; height: 14px; }
.btn-ghost:hover { border-color: #c7d6f5; color: var(--brand); background: var(--brand-soft); }

/* ============================ 机型卡片 ============================ */
.card-grid {
  display: grid; gap: 18px; padding: 10px 0 60px;
  grid-template-columns: repeat(auto-fill, minmax(292px, 1fr));
}
.pcard {
  position: relative; background: var(--card); border: 1px solid var(--line-2);
  border-radius: var(--radius-l); padding: 20px 20px 17px; overflow: hidden;
  transition: .26s cubic-bezier(.4, 0, .2, 1); box-shadow: var(--sh-1);
  animation: cardIn .4s cubic-bezier(.2, .8, .3, 1);
}
/* 动画只做位移，不碰 opacity：任何环境下内容都保证可见 */
@keyframes cardIn { from { transform: translateY(15px) } to { transform: none } }
.pcard::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 3.5px;
  background: var(--bc, var(--brand)); opacity: .92;
}
.pcard:hover { transform: translateY(-5px); box-shadow: var(--sh-3); border-color: #dbe4f6; }
.pcard:hover::before { height: 4.5px; }
.pcard.picked { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(47, 107, 255, .13), var(--sh-2); }

.pc-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 3px; }
.pc-brand {
  display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 800;
  letter-spacing: .3px; padding: 4px 10px; border-radius: 999px;
  color: #fff; background: var(--bc, var(--brand));
}
.pc-series {
  font-size: 11px; font-weight: 700; color: var(--ink-3); background: var(--line-2);
  padding: 4px 9px; border-radius: 999px; white-space: nowrap;
}
.pc-pick {
  width: 27px; height: 27px; border-radius: 9px; border: 1.6px solid #d9e2f3; background: #fff;
  display: grid; place-items: center; flex-shrink: 0; transition: .18s; padding: 0;
}
.pc-pick svg { width: 14px; height: 14px; color: transparent; transition: .18s; }
.pc-pick:hover { border-color: var(--brand); background: var(--brand-soft); }
.pc-pick:hover svg { color: var(--brand); }
.pcard.picked .pc-pick { background: var(--brand); border-color: var(--brand); }
.pcard.picked .pc-pick svg { color: #fff; }
.pc-topright { display: flex; align-items: center; gap: 8px; }

.pc-title {
  font-size: 18.5px; font-weight: 800; letter-spacing: -.4px; margin: 12px 0 8px;
  line-height: 1.3; cursor: pointer; transition: .16s;
}
.pcard:hover .pc-title { color: var(--brand); }
.pc-price { display: flex; align-items: baseline; gap: 6px; margin-bottom: 15px; }
.pc-price .cur { font-size: 12.5px; font-weight: 800; color: var(--danger); }
.pc-price .num { font-size: 25px; font-weight: 900; color: var(--danger); letter-spacing: -.8px; }
.pc-price .unit { font-size: 12px; color: var(--ink-4); font-weight: 600; }
.pc-price .date { margin-left: auto; font-size: 11.5px; color: var(--ink-4); font-weight: 600; }

.pc-specs { display: flex; flex-direction: column; gap: 9px; }
.pc-row { display: flex; align-items: flex-start; gap: 9px; font-size: 13px; }
.pc-row .k {
  width: 62px; flex-shrink: 0; color: var(--ink-4); font-weight: 600; font-size: 12.5px;
}
.pc-row .v {
  color: var(--ink-2); font-weight: 600; flex: 1; min-width: 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.pc-row .v.hl { color: var(--ink); }
.pc-hl {
  margin-top: 14px; padding: 10px 12px; border-radius: var(--radius-s); font-size: 12.5px;
  line-height: 1.55; color: var(--ink-2); background: #f7f9fe; border: 1px dashed #dfe7f7;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.pc-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-top: 15px; padding-top: 13px; border-top: 1px solid var(--line-2);
}
.pc-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.pc-tag {
  font-size: 11px; font-weight: 700; padding: 3.5px 9px; border-radius: 6px;
  background: var(--brand-soft); color: var(--brand);
}
.pc-tag.w { background: #e7f8f2; color: #0d9488; }
.pc-detail {
  font-size: 12.5px; font-weight: 700; color: var(--brand); background: 0; border: 0;
  display: inline-flex; align-items: center; gap: 4px; padding: 4px 0; transition: .16s;
}
.pc-detail svg { width: 13px; height: 13px; transition: .16s; }
.pc-detail:hover svg { transform: translateX(3px); }

/* 空状态 */
.empty-state { text-align: center; padding: 70px 20px 90px; }
.empty-icon {
  width: 68px; height: 68px; margin: 0 auto 20px; border-radius: 20px; display: grid;
  place-items: center; background: #fff; border: 1px solid var(--line); color: var(--ink-4);
  box-shadow: var(--sh-1);
}
.empty-icon svg { width: 30px; height: 30px; }
.empty-state h3 { margin: 0 0 8px; font-size: 19px; font-weight: 800; }
.empty-state p { margin: 0; color: var(--ink-3); font-size: 14px; }

/* ============================ 使用说明 ============================ */
.howto { padding: 54px 0 60px; background: #fff; border-top: 1px solid var(--line-2); }
.howto h2 {
  margin: 0 0 30px; font-size: 26px; font-weight: 900; letter-spacing: -.8px; text-align: center;
}
.howto-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.howto-card {
  position: relative; padding: 26px 24px; border-radius: var(--radius); background: #f8fafe;
  border: 1px solid var(--line-2); transition: .22s;
}
.howto-card:hover { background: #fff; box-shadow: var(--sh-2); transform: translateY(-3px); border-color: #dbe4f6; }
.step {
  display: inline-block; font-family: var(--mono); font-size: 12px; font-weight: 700;
  color: var(--brand); background: var(--brand-soft); padding: 4px 10px; border-radius: 7px; margin-bottom: 14px;
}
.howto-card h4 { margin: 0 0 9px; font-size: 16.5px; font-weight: 800; letter-spacing: -.2px; }
.howto-card p { margin: 0; font-size: 13.5px; color: var(--ink-3); line-height: 1.7; }

/* ============================ 页脚 ============================ */
.footer { padding: 30px 0 100px; background: #fff; border-top: 1px solid var(--line-2); }
.footer-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-size: 12.5px; color: var(--ink-4);
}
.footer-inner strong { color: var(--ink-2); margin-right: 8px; font-size: 13.5px; }
.footer-meta { color: var(--ink-4); }

/* ============================ 底部对比栏 ============================ */
.dock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
  background: rgba(255, 255, 255, .93);
  backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-top: 1px solid var(--line); box-shadow: 0 -6px 30px rgba(16, 30, 68, .1);
  animation: dockUp .3s cubic-bezier(.2, .8, .3, 1);
}
@keyframes dockUp { from { transform: translateY(100%) } to { transform: none } }
.dock-inner { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 13px 26px; }
.dock-slots { display: flex; gap: 10px; flex: 1; min-width: 0; overflow-x: auto; padding: 2px 0; }
.dock-slot {
  display: flex; align-items: center; gap: 9px; padding: 8px 11px 8px 12px; border-radius: 13px;
  background: #f6f9ff; border: 1px solid #dfe8fb; flex-shrink: 0; max-width: 230px;
  animation: slotIn .24s cubic-bezier(.2, .8, .3, 1);
}
@keyframes slotIn { from { transform: scale(.94) } to { transform: none } }
.dock-slot .bar { width: 3.5px; height: 30px; border-radius: 3px; background: var(--bc, var(--brand)); flex-shrink: 0; }
.dock-slot .txt { min-width: 0; }
.dock-slot .bn { font-size: 10.5px; font-weight: 800; color: var(--ink-4); letter-spacing: .3px; }
.dock-slot .mn {
  font-size: 13px; font-weight: 700; color: var(--ink); white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.dock-slot .rm {
  width: 20px; height: 20px; border-radius: 6px; border: 0; background: #e7edf9; color: var(--ink-3);
  display: grid; place-items: center; flex-shrink: 0; transition: .16s;
}
.dock-slot .rm:hover { background: #ffdede; color: var(--danger); }
.dock-slot .rm svg { width: 10px; height: 10px; }
.dock-slot.ghost {
  border: 1.6px dashed #d5dff2; background: transparent; color: var(--ink-4);
  font-size: 12.5px; font-weight: 600; padding: 15px 18px; min-width: 112px; justify-content: center;
}
.dock-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.dock-hint { font-size: 12.5px; color: var(--ink-3); font-weight: 600; margin-right: 4px; }
.btn-primary {
  display: inline-flex; align-items: center; gap: 7px; padding: 11px 22px; border-radius: 13px;
  border: 0; color: #fff; font-size: 14px; font-weight: 800; letter-spacing: .2px;
  background: linear-gradient(135deg, var(--brand), #5b7dff); transition: .2s;
  box-shadow: 0 6px 18px rgba(47, 107, 255, .32);
}
.btn-primary svg { width: 15px; height: 15px; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(47, 107, 255, .42); }
.btn-primary:disabled { opacity: .42; cursor: not-allowed; transform: none; box-shadow: none; }

/* ============================ 详情弹窗 ============================ */
.overlay {
  position: fixed; inset: 0; z-index: 90; background: rgba(12, 20, 40, .5);
  backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px);
  display: flex; align-items: center; justify-content: center; padding: 26px;
}
.detail-modal {
  width: 100%; max-width: 880px; max-height: 88vh; overflow-y: auto; background: #fff;
  border-radius: 26px; box-shadow: 0 30px 80px rgba(10, 20, 50, .35);
  animation: popIn .3s cubic-bezier(.2, .9, .3, 1); position: relative;
}
/* 入场动画只用位移/缩放，不含 opacity 起始帧，
   这样在动画被禁用或未播放的环境里内容依然可见 */
@keyframes popIn { from { transform: scale(.955) translateY(16px) } to { transform: none } }

.dm-hero {
  position: relative; padding: 30px 34px 26px; overflow: hidden;
  background: linear-gradient(140deg, var(--bc, var(--brand)) 0%, color-mix(in srgb, var(--bc, var(--brand)) 62%, #101a35) 100%);
  color: #fff;
}
.dm-hero::after {
  content: ""; position: absolute; width: 320px; height: 320px; border-radius: 50%;
  background: rgba(255, 255, 255, .13); top: -160px; right: -80px;
}
.dm-hero-inner { position: relative; z-index: 2; }
.dm-badges { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.dm-badges span {
  font-size: 11.5px; font-weight: 700; padding: 4px 11px; border-radius: 999px;
  background: rgba(255, 255, 255, .22); backdrop-filter: blur(4px);
}
.dm-title { margin: 0 0 10px; font-size: 29px; font-weight: 900; letter-spacing: -.7px; line-height: 1.2; }
.dm-price-row { display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap; }
.dm-price-row .p { font-size: 30px; font-weight: 900; letter-spacing: -1px; }
.dm-price-row .lbl { font-size: 12.5px; opacity: .82; font-weight: 600; }
.dm-close {
  position: absolute; top: 20px; right: 20px; z-index: 5; width: 36px; height: 36px;
  border-radius: 11px; border: 0; background: rgba(255, 255, 255, .2); color: #fff;
  display: grid; place-items: center; transition: .18s; backdrop-filter: blur(6px);
}
.dm-close:hover { background: rgba(255, 255, 255, .34); transform: rotate(90deg); }
.dm-close svg { width: 17px; height: 17px; }

.dm-body { padding: 28px 34px 34px; }
.dm-group { margin-bottom: 26px; }
.dm-group:last-child { margin-bottom: 0; }
.dm-group-title {
  display: flex; align-items: center; gap: 9px; font-size: 13px; font-weight: 800;
  color: var(--ink-3); letter-spacing: .8px; text-transform: uppercase; margin-bottom: 14px;
}
.dm-group-title::after { content: ""; flex: 1; height: 1px; background: var(--line-2); }
.dm-group-title .bar { width: 3px; height: 14px; border-radius: 2px; background: var(--bc, var(--brand)); }
.dm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.dm-item { padding: 13px 15px; border-radius: var(--radius-s); background: #f8fafe; border: 1px solid var(--line-2); }
.dm-item.wide { grid-column: 1 / -1; }
.dm-item .k { font-size: 11.5px; font-weight: 700; color: var(--ink-4); margin-bottom: 5px; letter-spacing: .2px; }
.dm-item .v { font-size: 13.5px; font-weight: 600; color: var(--ink); line-height: 1.6; word-break: break-word; }
.dm-highlight {
  padding: 16px 18px; border-radius: var(--radius); font-size: 14px; line-height: 1.7;
  background: linear-gradient(120deg, #f2f6ff, #f7f4ff); border: 1px solid #e2e9fb;
  color: var(--ink-2); font-weight: 600;
}
.dm-actions { display: flex; gap: 11px; margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line-2); }
.dm-actions .btn-primary { flex: 1; justify-content: center; padding: 13px 22px; }

/* ============================ 对比全屏视图 ============================ */
.compare-full {
  position: fixed; inset: 0; z-index: 95; overflow: hidden;
  background-color: #f5f7fc; /* 显式色值，避免变量继承意外导致底层透出 */
  display: flex; flex-direction: column; animation: viewIn .22s ease;
}
/* 只用位移入场，杜绝"动画未播放 ⇒ 整个视图透明"的白屏风险 */
@keyframes viewIn { from { transform: translateY(12px) } to { transform: none } }
/* 对比视图打开时隐藏底层页面，彻底杜绝层叠干扰
   （浮层类元素要一并放行，否则对比页里弹出的链接框会被一起隐藏） */
body.viewing-compare > *:not(.compare-full):not(.toast):not(.link-overlay) { visibility: hidden !important; }
body.viewing-compare .compare-full,
body.viewing-compare .link-overlay { visibility: visible !important; }
.cf-top {
  background: rgba(255, 255, 255, .92); backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line); padding: 15px 0; flex-shrink: 0;
}
.cf-top-inner { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.cf-title { display: flex; align-items: center; gap: 13px; }
.cf-title h2 { margin: 0; font-size: 20px; font-weight: 900; letter-spacing: -.5px; }
.cf-title .cnt {
  font-size: 12px; font-weight: 700; color: var(--brand); background: var(--brand-soft);
  padding: 4px 11px; border-radius: 999px;
}
.cf-actions { display: flex; align-items: center; gap: 10px; }
.cf-toggle {
  display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700;
  color: var(--ink-2); background: #fff; border: 1px solid var(--line); border-radius: var(--radius-s);
  padding: 8px 14px; transition: .18s;
}
.cf-toggle input { accent-color: var(--brand); width: 15px; height: 15px; cursor: pointer; }
.cf-toggle:hover { border-color: #c7d6f5; }

.cf-body { flex: 1; overflow: auto; padding: 26px; }
.ctable-wrap { max-width: 1400px; margin: 0 auto; }
.ctable {
  width: 100%; border-collapse: separate; border-spacing: 0; background: #fff;
  border-radius: var(--radius-l); overflow: hidden; box-shadow: var(--sh-2);
  border: 1px solid var(--line-2);
}
.ctable th, .ctable td {
  padding: 14px 16px; text-align: left; font-size: 13.5px; vertical-align: top;
  border-bottom: 1px solid var(--line-2); border-right: 1px solid var(--line-2);
}
.ctable tr:last-child th, .ctable tr:last-child td { border-bottom: 0; }
.ctable th:last-child, .ctable td:last-child { border-right: 0; }

.ctable thead th {
  position: sticky; top: 0; z-index: 5; background: #fbfcff; padding: 0;
  border-bottom: 1.5px solid var(--line); vertical-align: top;
}
.ct-head { padding: 18px 16px 16px; position: relative; }
.ct-head::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--bc, var(--brand));
}
.ct-head .bh { display: flex; align-items: center; gap: 7px; margin-bottom: 9px; }
.ct-head .bn {
  font-size: 10.5px; font-weight: 800; color: #fff; background: var(--bc, var(--brand));
  padding: 3px 9px; border-radius: 999px; letter-spacing: .3px;
}
.ct-head .sr { font-size: 10.5px; font-weight: 700; color: var(--ink-3); background: var(--line-2); padding: 3px 8px; border-radius: 999px; }
.ct-head .mn { font-size: 16px; font-weight: 800; letter-spacing: -.3px; line-height: 1.32; margin-bottom: 8px; }
.ct-head .pr { font-size: 15px; font-weight: 900; color: var(--danger); }
.ct-head .pr small { font-size: 11px; font-weight: 700; }
.ct-head .rm {
  position: absolute; top: 14px; right: 12px; width: 24px; height: 24px; border-radius: 7px;
  border: 1px solid var(--line); background: #fff; color: var(--ink-4);
  display: grid; place-items: center; transition: .16s;
}
.ct-head .rm:hover { background: #ffdede; color: var(--danger); border-color: #ffc9c9; }
.ct-head .rm svg { width: 11px; height: 11px; }
.ct-head .empty-slot { color: var(--ink-4); font-size: 13px; font-weight: 600; }

.ctable tbody th.col {
  position: sticky; left: 0; z-index: 3; background: #fbfcff; width: 132px; min-width: 132px;
  font-size: 12.5px; font-weight: 800; color: var(--ink-3); letter-spacing: .2px;
}
.ctable tbody tr.grp th.col {
  background: #f2f5fd; color: var(--brand); font-size: 11.5px; letter-spacing: 1px;
  text-transform: uppercase; padding: 11px 16px;
}
.ctable tbody tr.grp td { background: #f7f9fe; padding: 11px 16px; border-bottom: 1px solid var(--line-2); }

.cell { position: relative; }
.cell.diff { background: #fffcf0; }
.cell.best { background: #f1fdf7; }
.cell .val { color: var(--ink-2); font-weight: 600; line-height: 1.62; }
.cell.best .val { color: #047857; font-weight: 800; }
.cell .tag-best {
  display: inline-flex; align-items: center; gap: 3px; font-size: 10px; font-weight: 800;
  color: #fff; background: var(--ok); padding: 2px 7px; border-radius: 5px;
  margin-left: 7px; vertical-align: middle; white-space: nowrap;
}
.cell .tag-best svg { width: 9px; height: 9px; }
.cell .tag-diff {
  font-size: 10px; font-weight: 800; color: #b45309; background: #fef3c7;
  padding: 2px 7px; border-radius: 5px; margin-left: 7px; vertical-align: middle;
}
.cell .sub { display: block; font-size: 11.5px; color: var(--ink-4); font-weight: 600; margin-top: 3px; }

.cf-legend {
  display: flex; gap: 20px; justify-content: center; padding: 18px 0 6px;
  font-size: 12.5px; color: var(--ink-3); font-weight: 600; flex-wrap: wrap;
}
.cf-legend span { display: inline-flex; align-items: center; gap: 7px; }
.cf-legend i { width: 13px; height: 13px; border-radius: 4px; display: inline-block; border: 1px solid var(--line); }

/* ==================== 复制链接兜底弹窗 ====================
   剪贴板 API 被浏览器/无头环境拒绝时，把链接摆出来让用户手选复制，
   保证任何环境下都拿得到分享链接。 */
.link-overlay {
  position: fixed; inset: 0; z-index: 96; background: rgba(12, 20, 40, .5);
  backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px);
  display: flex; align-items: center; justify-content: center; padding: 26px;
}
.link-modal {
  position: relative; width: 100%; max-width: 520px; background: #fff; color: var(--ink);
  border-radius: 22px; padding: 28px 28px 24px;
  box-shadow: 0 30px 80px rgba(10, 20, 50, .35);
  animation: popIn .3s cubic-bezier(.2, .9, .3, 1);
}
.lk-close {
  position: absolute; top: 16px; right: 16px; width: 32px; height: 32px; border-radius: 10px;
  border: 0; background: #f1f4fa; color: var(--ink-2); display: grid; place-items: center;
  transition: .18s;
}
.lk-close:hover { background: #e6ebf5; transform: rotate(90deg); }
.lk-close svg { width: 15px; height: 15px; }
.lk-title { margin: 0 0 6px; font-size: 19px; font-weight: 900; letter-spacing: -.4px; }
.lk-sub { margin: 0 0 16px; font-size: 13px; color: var(--ink-3); line-height: 1.6; font-weight: 600; }
.lk-input {
  width: 100%; box-sizing: border-box; font-family: inherit; font-size: 13px; font-weight: 700;
  color: var(--ink); background: #f6f8fd; border: 1.5px solid var(--line-2, #dde4f0);
  border-radius: 12px; padding: 12px 14px; outline: none; word-break: break-all;
}
.lk-input:focus { border-color: var(--brand); background: #fff; box-shadow: 0 0 0 4px rgba(47, 107, 255, .12); }
.lk-actions { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.lk-hint { margin: 14px 0 0; font-size: 12px; color: var(--ink-3); line-height: 1.65; }

/* ================ 专用对比页引导条（仅 /compare 无参数时出现） ================ */
.cmp-note { padding: 0 0 6px; }
.cmp-note-inner {
  display: flex; align-items: center; gap: 16px;
  background: linear-gradient(120deg, #eef4ff 0%, #f6f1ff 100%);
  border: 1px solid #dbe6ff; border-radius: var(--radius);
  padding: 16px 20px;
}
.cn-ico {
  flex-shrink: 0; width: 40px; height: 40px; border-radius: 12px;
  background: var(--brand); color: #fff; display: grid; place-items: center;
  box-shadow: 0 6px 16px rgba(47, 107, 255, .3);
}
.cn-ico svg { width: 21px; height: 21px; }
.cn-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.cn-txt strong { font-size: 14.5px; font-weight: 900; color: var(--ink); letter-spacing: -.2px; }
.cn-txt span { font-size: 12.8px; color: var(--ink-3); line-height: 1.6; font-weight: 600; }
.cn-btn { flex-shrink: 0; padding: 10px 20px !important; font-size: 13.5px !important; }

/* ============================ Toast ============================ */
.toast {
  position: fixed; left: 50%; bottom: 104px; transform: translateX(-50%); z-index: 99;
  background: rgba(15, 23, 41, .93); color: #fff; padding: 12px 22px; border-radius: 13px;
  font-size: 13.5px; font-weight: 700; box-shadow: 0 12px 34px rgba(10, 20, 50, .3);
  animation: toastIn .26s cubic-bezier(.2, .9, .3, 1); backdrop-filter: blur(8px);
}
@keyframes toastIn { from { transform: translate(-50%, 14px) } to { transform: translate(-50%, 0) } }

/* ============================ 响应式 ============================ */
@media (prefers-reduced-motion: reduce) {
  .hero-glow { animation: none !important; }
  .pcard, .dock, .dock-slot, .detail-modal, .link-modal, .toast { animation: none !important; }
  html { scroll-behavior: auto; }
}
@media (max-width: 900px) {
  .wrap { padding: 0 18px; }
  .hero { padding: 46px 0 38px; }
  .filter-block { flex-direction: column; gap: 8px; }
  .filter-label { padding-top: 0; width: auto; }
  .card-grid { grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); gap: 14px; }
  .dock-inner { flex-direction: column; align-items: stretch; gap: 11px; padding: 12px 18px; }
  .dock-actions { justify-content: space-between; }
  .detail-modal { max-height: 92vh; border-radius: 20px; }
  .dm-hero { padding: 24px 22px 22px; }
  .dm-title { font-size: 23px; }
  .dm-body { padding: 22px; }
  .cf-body { padding: 14px; }
  .ctable tbody th.col { width: 96px; min-width: 96px; font-size: 11.5px; }
  .topnav a { display: none; }
}
@media (max-width: 560px) {
  .card-grid { grid-template-columns: 1fr; }
  .hero h1 { letter-spacing: -1px; }
  .search-kbd { display: none; }
  .dock-actions { flex-wrap: wrap; }
  .link-modal { padding: 22px 20px 20px; border-radius: 18px; }
  .lk-title { font-size: 17px; }
  .cmp-note-inner { flex-direction: column; align-items: flex-start; gap: 12px; padding: 16px; }
  .cn-btn { width: 100%; }
}
