:root {
  --bg: #0b0f17;
  --bg2: #111827;
  --card: #151c2b;
  --line: #243049;
  --text: #e6ebf5;
  --muted: #8b97ad;
  --accent: #4f8cff;
  --accent2: #7c5cff;
  --good: #2ed3a0;
  --bad: #ff7a7a;
  --gold: #f5c451;
  --radius: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body {
  font: 14px/1.55 -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: radial-gradient(1200px 600px at 10% -10%, #18264a 0%, transparent 60%), radial-gradient(900px 500px at 100% 0%, #251a4a 0%, transparent 55%), var(--bg);
  min-height: 100vh;
}
a { color: var(--accent); }
code { background: #1d2740; padding: 1px 6px; border-radius: 6px; font-size: 12px; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.nowrap { white-space: nowrap; }

/* 顶栏 */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 24px; flex-wrap: wrap;
  padding: 12px 28px; background: rgba(11, 15, 23, 0.82); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; }
.logo { font-size: 26px; background: linear-gradient(135deg, var(--accent), var(--accent2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand-title { font-weight: 700; font-size: 17px; }
.brand-sub { font-size: 11.5px; color: var(--muted); }
.brand-sub a { color: #7aaeff; text-decoration: none; }
.brand-sub a:hover { text-decoration: underline; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.tabs button {
  background: transparent; border: 1px solid transparent; color: var(--muted);
  padding: 7px 14px; border-radius: 999px; cursor: pointer; font-size: 14px;
}
.tabs button:hover { color: var(--text); background: #1a2338; }
.tabs button.active { color: #fff; background: linear-gradient(135deg, #2a4fb8, #4a36b0); border-color: #4a63c9; }
.pill { display: inline-block; min-width: 18px; padding: 0 6px; border-radius: 9px; background: #ffffff22; font-size: 11px; text-align: center; }
.meta-wrap { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.meta { color: var(--muted); font-size: 12px; }

/* 加密锁屏 */
.lock-screen {
  min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px;
}
.lock-card {
  width: min(420px, 100%); background: var(--card); border: 1px solid var(--line);
  border-radius: 18px; padding: 32px 28px; text-align: center;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  display: flex; flex-direction: column; gap: 12px;
}
.lock-card.shake { animation: shake 0.35s ease; }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-8px); }
  75% { transform: translateX(8px); }
}
.lock-icon { font-size: 38px; line-height: 1; }
.lock-card h1 { margin: 2px 0 0; font-size: 22px; }
.lock-card p { margin: 0; font-size: 13px; }
.lock-meta { font-size: 12px; color: var(--muted); }
.lock-input-wrap { position: relative; display: flex; align-items: center; margin-top: 6px; }
.lock-input-wrap input {
  width: 100%; background: var(--bg2); border: 1px solid var(--line); color: var(--text);
  border-radius: 10px; padding: 11px 40px 11px 14px; font-size: 15px; outline: none;
}
.lock-input-wrap input:focus { border-color: var(--accent); box-shadow: 0 0 0 2px #4f8cff33; }
.lock-input-wrap .eye {
  position: absolute; right: 8px; background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 16px; padding: 4px;
}
.lock-remember { justify-content: center; font-size: 12px; }
.lock-err { color: var(--bad); font-size: 13px; background: #3b1720; border: 1px solid #6b2434; padding: 8px 12px; border-radius: 8px; }
.lock-btn { justify-content: center; padding: 11px 16px; font-size: 15px; font-weight: 600; border-radius: 10px; }
.lock-btn:disabled { opacity: 0.6; cursor: wait; }
.lock-hint { text-align: left; font-size: 12px; color: #ffe2a3; background: #3a2b0c; border: 1px solid #7a5a12; padding: 10px 12px; border-radius: 10px; line-height: 1.6; }

.banner { margin: 14px 28px 0; padding: 10px 16px; border-radius: 10px; background: #3a2b0c; border: 1px solid #7a5a12; color: #ffe2a3; }

main { padding: 8px 28px 40px; max-width: 1440px; margin: 0 auto; }
.view { display: none; animation: fade 0.25s ease; }
.view.active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.view-title { margin: 22px 0 4px; font-size: 22px; }
.view-desc { margin: 0 0 16px; color: var(--muted); }
.sub-title { margin: 26px 0 10px; font-size: 16px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.empty { padding: 40px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: var(--radius); }
.quick { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 16px; }

.btn {
  background: var(--accent); color: #fff; border: 0; border-radius: 8px; padding: 7px 14px; cursor: pointer; font-size: 13px; text-decoration: none; display: inline-flex; align-items: center; gap: 4px;
}
.btn.ghost { background: transparent; border: 1px solid var(--line); color: var(--text); }
.btn.ghost:hover { border-color: var(--accent); }
.btn.small { padding: 4px 10px; font-size: 12px; background: #22304d; color: var(--text); }
.btn.small.on { background: #1c4d3e; color: #9ff0d3; }
.btn.small.ghost { background: transparent; }

.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.toolbar.top-gap { margin-top: 18px; }
.scenario-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 18px 0 14px; }

/* 智能 / 成本 / 速度 分段切换 */
.seg-tabs {
  display: inline-flex; background: #0e1424; border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 3px;
}
.seg-tabs button {
  background: transparent; border: 0; color: var(--muted); padding: 6px 14px; border-radius: 7px;
  cursor: pointer; font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px;
}
.seg-tabs button:hover { color: var(--text); }
.seg-tabs button.active { background: #1e2e57; color: #fff; box-shadow: 0 1px 4px rgba(0,0,0,0.3); }
.seg-dot { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }

/* 表格内主指标可视化条 */
.rank-bar {
  position: relative; height: 24px; min-width: 116px; background: #0e1424; border-radius: 6px; overflow: hidden;
}
.rank-bar span { display: block; height: 100%; border-radius: 6px; opacity: 0.85; }
.rank-bar.k-intelligence span { background: linear-gradient(90deg, #5b45d6, #818cf8); }
.rank-bar.k-costPerTask span, .rank-bar.k-price span { background: linear-gradient(90deg, #c2511a, #fb923c); }
.rank-bar.k-speed span { background: linear-gradient(90deg, #136f56, #2ed3a0); }
.rank-bar em {
  position: absolute; right: 8px; top: 3px; font-style: normal; font-size: 12.5px; font-weight: 700; color: #fff; text-shadow: 0 1px 2px #000;
}
input[type='search'], select {
  background: var(--bg2); border: 1px solid var(--line); color: var(--text); border-radius: 8px; padding: 8px 12px; font-size: 13px; outline: none;
}
input[type='search'] { min-width: 300px; }
input[type='search']:focus, select:focus { border-color: var(--accent); }
label { color: var(--muted); display: inline-flex; align-items: center; gap: 8px; }
label.check { cursor: pointer; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  background: var(--bg2); border: 1px solid var(--line); color: var(--muted); border-radius: 999px; padding: 4px 12px; cursor: pointer; font-size: 12px; display: inline-flex; align-items: center;
}
.chip.on { color: var(--text); border-color: #4a63c9; background: #1b2747; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; flex: none; }
.tag { display: inline-block; font-size: 11px; padding: 0 7px; border-radius: 6px; background: #22304d; color: #b8c4dc; margin-left: 4px; white-space: nowrap; }
.tag.hl { background: #173f35; color: #8ff0cf; }

/* 场景（精简 3 大板块） */
.scenario {
  text-align: left; background: var(--card); border: 1px solid var(--line); color: var(--text); border-radius: 14px; padding: 16px 18px; cursor: pointer;
  display: flex; flex-direction: column; gap: 4px; transition: 0.15s; text-decoration: none;
}
.scenario.scenario-ext { border-style: dashed; border-color: #364b7a; }
.scenario.scenario-ext:hover { border-style: solid; border-color: var(--accent); }
.scenario:hover { border-color: #3d5287; transform: translateY(-2px); }
.scenario.active { border-color: var(--accent); background: linear-gradient(155deg, #1c2e5e, #1d1a45); box-shadow: 0 0 0 1px var(--accent) inset; }
.sc-icon { font-size: 26px; }
.sc-name { font-weight: 700; font-size: 16px; }
.sc-desc { font-size: 12px; color: var(--muted); }
.constraints { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-bottom: 16px; padding: 12px 16px; }

/* 完整排名表（相邻同厂商折叠/逐一展开） */
.rank-cell { white-space: nowrap; display: flex; align-items: center; gap: 6px; }
.row-exp {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; padding: 0; border-radius: 6px;
  background: #1a2744; border: 1px solid #30477a; color: #9ec0ff;
  font-size: 12px; cursor: pointer; flex: none;
}
.row-exp:hover, .row-exp.open { background: #263b69; border-color: var(--accent); color: #fff; }
.row-exp-sp { display: inline-block; width: 22px; flex: none; }
.run-badge {
  font-size: 11px; padding: 1px 6px; border-radius: 999px;
  background: #1a2744; color: #93c5fd; margin-left: 6px; white-space: nowrap;
}
tr.sub-row { background: #101727; }
tr.sub-row td:nth-child(2) { padding-left: 26px; position: relative; }
tr.sub-row td:nth-child(2)::before {
  content: '└'; position: absolute; left: 10px; color: #4a5a80; font-family: monospace;
}
.global-rank {
  display: inline-block; min-width: 28px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.global-rank.top-1 { color: var(--gold); }
.global-rank.top-2 { color: #cbd5e1; }
.global-rank.top-3 { color: #e5895b; }
.aa-iframe { width: 100%; height: 760px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; margin-top: 12px; }

/* 场景提示条 & 官网同款三维度（性能 / 时间 / 成本） */
.scene-notice {
  margin: 0 0 14px; padding: 10px 14px; border-radius: 10px;
  background: #13203b; border: 1px solid #2b4578; color: #c7d9fa; font-size: 13px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.tri-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 18px; }
.tri-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 15px 16px; }
.tri-head { display: flex; align-items: center; gap: 8px; margin-bottom: 2px; }
.tri-dot { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.tri-head h3 { margin: 0; font-size: 15px; }
.tri-sub { font-size: 11.5px; color: var(--muted); margin-bottom: 10px; }
.tri-row {
  display: grid; grid-template-columns: 22px 1fr 120px; gap: 8px; align-items: center;
  padding: 6px 0; border-top: 1px solid #1d273c; font-size: 12.5px;
}
.tri-row:first-of-type { border-top: 0; }
.tri-rank { color: var(--muted); font-weight: 700; text-align: center; }
.tri-row.top-1 .tri-rank { color: var(--gold); }
.tri-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tri-bar { position: relative; height: 22px; background: #0e1424; border-radius: 6px; overflow: hidden; }
.tri-bar span { display: block; height: 100%; border-radius: 6px; opacity: 0.85; }
.tri-bar.perf span { background: linear-gradient(90deg, #5b45d6, #818cf8); }
.tri-bar.time span { background: linear-gradient(90deg, #b48212, #f5c451); }
.tri-bar.cost span { background: linear-gradient(90deg, #c2511a, #fb923c); }
.tri-bar em { position: absolute; right: 7px; top: 2px; font-style: normal; font-size: 12px; font-weight: 700; color: #fff; text-shadow: 0 1px 2px #000; }

/* 多模态（图像 / 语音 / 视频）榜单 */
.media-tabs { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.media-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.media-grid.single { grid-template-columns: 1fr; max-width: 780px; }
.media-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.media-card h3 { margin: 0 0 4px; font-size: 16px; display: flex; align-items: center; justify-content: space-between; }
.media-sub { font-size: 12px; color: var(--muted); margin-bottom: 12px; }
.media-row {
  display: grid; grid-template-columns: 28px 1fr auto; gap: 10px; align-items: center;
  padding: 9px 0; border-top: 1px solid #1d273c;
}
.media-row:first-of-type { border-top: 0; }
.media-rank { font-weight: 700; font-size: 14px; color: var(--muted); text-align: center; }
.media-row.top-1 .media-rank { color: var(--gold); font-size: 16px; }
.media-row.top-2 .media-rank { color: #cbd5e1; }
.media-row.top-3 .media-rank { color: #e5895b; }
.media-name { font-weight: 600; font-size: 14px; line-height: 1.3; }
.media-creator { font-size: 12px; color: var(--muted); margin-top: 2px; display: flex; align-items: center; }
.media-elo { text-align: right; font-variant-numeric: tabular-nums; }
.media-elo b { font-size: 15px; color: var(--good); }
.media-elo small { display: block; font-size: 11px; color: var(--muted); }
.chips-wrap { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.chips-label { color: var(--muted); }
.weights { color: var(--text); margin: 6px 0 12px; font-size: 13px; }
.weights .muted { margin-left: 6px; font-size: 12px; }

.rec-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px; }
.rec-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 8px; position: relative; }
.rec-card.rank-1 { border-color: #a8862e; background: linear-gradient(170deg, #2a2412 0%, var(--card) 45%); }
.rec-card.saver { border-color: #1f7a5f; background: linear-gradient(170deg, #0f2c25 0%, var(--card) 45%); }
.rec-badge { font-size: 13px; font-weight: 600; color: var(--gold); }
.rec-card.saver .rec-badge { color: var(--good); }
.rec-name { font-size: 18px; font-weight: 700; }
.rec-creator { color: var(--muted); font-size: 12px; display: flex; align-items: center; flex-wrap: wrap; }
.rec-note { font-size: 13px; color: #bff3e0; }
.rec-score { display: flex; align-items: center; gap: 8px; }
.rec-score .bar { flex: 1; }
.rec-score b { font-size: 18px; }
.rec-score small { color: var(--muted); }
.bar { height: 7px; background: #0e1424; border-radius: 4px; overflow: hidden; }
.bar > span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent2)); border-radius: 4px; }
.bar.inline { display: inline-block; width: 70px; vertical-align: middle; }
.mini-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.mini-metrics > div { background: #0f1626; border-radius: 8px; padding: 5px 8px; display: flex; flex-direction: column; }
.mini-metrics span { font-size: 11px; color: var(--muted); }
.mini-metrics b { font-size: 13px; border-radius: 4px; padding: 0 4px; margin-left: -4px; width: fit-content; }
.reasons { list-style: none; margin: 0; padding: 0; font-size: 12px; display: flex; flex-direction: column; gap: 3px; flex: 1; }
.good { color: var(--good); }
.bad { color: var(--bad); }
.rec-card .btn.small { align-self: flex-start; }

/* 表格 */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
table.board { width: 100%; border-collapse: collapse; font-size: 13px; }
.board th, .board td { padding: 8px 10px; border-bottom: 1px solid #1d273c; text-align: left; }
.board th { position: sticky; top: 0; background: #182136; color: var(--muted); font-weight: 600; white-space: nowrap; }
.board th.sortable { cursor: pointer; user-select: none; }
.board th.sortable:hover, .board th.sorted { color: var(--text); }
.board tbody tr:hover { background: #1a2338; }
.board td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.name-cell { min-width: 200px; }
.mlink { color: var(--text); cursor: pointer; text-decoration: none; border-bottom: 1px dashed #4a5a80; }
.mlink:hover { color: var(--accent); border-color: var(--accent); }

/* 名字解码：极简强→弱英文原名排序条 + 全量同家族对比 */
.fam-topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 18px 0 12px; }
.fam-topbar .view-title { margin: 0; }
.suffix-pill {
  font-size: 12px; color: var(--muted); background: #121a2d; border: 1px solid var(--line);
  padding: 5px 12px; border-radius: 999px;
}

.brand-section { margin-bottom: 22px; }
.brand-guide {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; margin-bottom: 10px;
  border-left: 4px solid var(--accent); display: flex; flex-direction: column; gap: 8px;
}
.bg-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.bg-metaphor { font-size: 16px; font-weight: 800; color: var(--text); }
.bg-head h3 { margin: 0; font-size: 13.5px; color: var(--muted); font-weight: 600; }
.bg-ver { font-size: 12px; color: #a5b4fc; background: #182342; padding: 2px 10px; border-radius: 999px; }
.tier-strip { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tier-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 8px;
  background: #0f1626; border: 1px solid #22304f; font-size: 13px;
}
.tier-rank-num {
  display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px;
  border-radius: 50%; background: #1e2d52; color: #93c5fd; font-size: 11px; font-weight: 800;
}
.tier-chip b { color: var(--text); }
.tier-chip small { color: var(--muted); font-size: 11.5px; }
.tier-arrow { color: var(--accent); font-weight: 800; font-size: 14px; }

.no-api-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px 24px; max-width: 760px; display: flex; flex-direction: column; gap: 12px;
}
.no-api-card h3 { margin: 0; font-size: 18px; }
.no-api-card p { margin: 0; color: var(--muted); line-height: 1.7; }
.no-api-card .actions { margin-top: 4px; }

.family-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(560px, 1fr)); gap: 12px; }
.fam-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.fam-head b { font-size: 16px; }
.fam-head .btn { margin-left: auto; }
.fam-cols, .fam-row { display: grid; grid-template-columns: 74px 1fr 110px 110px 110px; gap: 10px; align-items: center; }
.fam-cols { font-size: 11px; color: var(--muted); padding: 2px 0 6px; border-bottom: 1px solid #1d273c; }
.fam-row { padding: 10px 0; border-bottom: 1px solid #1d273c; }
.fam-row:last-child { border-bottom: 0; }
.fam-name { min-width: 0; }
.fam-name .mlink { font-weight: 600; }
.fam-sum { font-size: 12px; color: var(--muted); margin-top: 2px; }
.equiv { font-size: 12px; color: #c6b6ff; margin-top: 2px; }
.badges .tag { margin-left: 4px; }
.tier { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 6px; text-align: center; white-space: nowrap; }
.tier.mini { font-size: 10px; padding: 0 5px; margin-right: 4px; }
.tier-top { background: #3a2d0c; color: var(--gold); }
.tier-mid { background: #16294f; color: #8fb6ff; }
.tier-fast { background: #10352c; color: #7fe6c4; }
.tier-lite { background: #0f3a3a; color: #67e8f9; }
.tier-think { background: #2c1f4a; color: #c6b6ff; }
.fam-bars { display: contents; }
.mbar { position: relative; height: 22px; background: #0e1424; border-radius: 6px; overflow: hidden; }
.mbar span { display: block; height: 100%; border-radius: 6px; opacity: 0.85; }
.mbar.int span { background: linear-gradient(90deg, #2a4fb8, #4f8cff); }
.mbar.price span { background: linear-gradient(90deg, #6b3a12, #e5895b); }
.mbar.speed span { background: linear-gradient(90deg, #135c48, #2ed3a0); }
.mbar em { position: absolute; left: 8px; top: 2px; font-style: normal; font-size: 12px; font-weight: 600; text-shadow: 0 1px 2px #000; }

/* 四象限性价比图 */
.chart-card { padding: 12px; }
.chart-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.chart-svg { width: 100%; height: auto; display: block; }
.chart-svg .grid { stroke: #1f2a42; stroke-width: 1; }
.chart-svg .q-line { stroke: #64748b; stroke-width: 1.5; stroke-dasharray: 6 5; opacity: 0.85; }
.chart-svg .q-best { fill: rgba(46, 211, 160, 0.08); }
.chart-svg .q-flagship { fill: rgba(79, 140, 255, 0.06); }
.chart-svg .q-budget { fill: rgba(56, 189, 248, 0.05); }
.chart-svg .q-avoid { fill: rgba(255, 122, 122, 0.06); }
.chart-svg .q-title { font-size: 13px; font-weight: 700; opacity: 0.92; }
.chart-svg .q-sub { font-size: 11px; fill: #94a3b8; opacity: 0.85; }
.chart-svg .tick { fill: var(--muted); font-size: 12px; }
.chart-svg .axis-label { fill: #aab5cc; font-size: 13px; }
.chart-svg .frontier { fill: none; stroke: #2ed3a0; stroke-width: 2.5; stroke-dasharray: 6 4; opacity: 0.9; }
.chart-svg .pt { cursor: pointer; }
.chart-svg .pt circle { stroke: #0b0f17; stroke-width: 1.5; opacity: 0.85; }
.chart-svg .pt.is-fr circle { stroke: #fff; stroke-width: 2.2; opacity: 1; }
.chart-svg .pt:hover circle { stroke: #fff; stroke-width: 2.8; }
.chart-svg .pt-label { fill: #e6ebf5; font-size: 11.5px; font-weight: 500; paint-order: stroke; stroke: #0b0f17; stroke-width: 3.5px; }
.legend { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 6px 2px; }
.legend > span { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }

/* 对比 */
.cmp-layout { display: grid; grid-template-columns: 420px 1fr; gap: 14px; margin-bottom: 14px; }
.radar { width: 100%; max-width: 380px; display: block; margin: 0 auto; }
.radar .rgrid { fill: none; stroke: #263250; }
.radar .rlabel { fill: #aab5cc; font-size: 12px; }
.swatch { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.concl { padding-left: 18px; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.concl .verdict { list-style: none; margin-left: -18px; margin-top: 6px; padding: 10px 12px; background: #13233f; border-radius: 10px; }
.cmp-table td.best { color: var(--good); font-weight: 700; background: #12302a; }
.cmp-table .rank { color: var(--muted); font-size: 11px; margin-left: 6px; font-weight: 400; }
.cmp-table th .btn { margin-top: 4px; }

/* 弹窗 */
.modal { position: fixed; inset: 0; background: rgba(3, 6, 12, 0.7); z-index: 50; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal-card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 22px 24px; width: min(640px, 100%); max-height: 88vh; overflow: auto; position: relative; }
.modal-card h3 { margin: 0 0 2px; font-size: 20px; display: flex; align-items: center; }
.modal-card h4 { margin: 16px 0 6px; }
.close { position: absolute; right: 14px; top: 10px; background: none; border: 0; color: var(--muted); font-size: 26px; cursor: pointer; }
.pc { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 10px 0; font-size: 12px; }
.d-grid { display: flex; flex-direction: column; gap: 6px; margin: 10px 0; }
.d-row { display: grid; grid-template-columns: 80px 90px 1fr 80px; gap: 10px; align-items: center; font-size: 13px; }
.d-row b { text-align: right; font-variant-numeric: tabular-nums; }
.d-row small { color: var(--muted); }
.bench { display: flex; flex-wrap: wrap; gap: 8px; font-size: 12px; }
.sib { display: flex; flex-wrap: wrap; gap: 8px; }
.sib .mlink.cur { color: var(--accent); }
.actions { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }

.tooltip { position: fixed; z-index: 60; pointer-events: none; background: #0f1626ee; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; font-size: 12px; min-width: 160px; }
.toast { position: fixed; left: 50%; bottom: 30px; transform: translate(-50%, 20px); background: #22304d; padding: 10px 18px; border-radius: 10px; opacity: 0; transition: 0.25s; z-index: 70; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

footer { text-align: center; color: var(--muted); font-size: 12px; padding: 20px 28px 30px; border-top: 1px solid var(--line); }

@media (hover: none) {
  .tooltip { display: none !important; }
}

@media (max-width: 1100px) {
  .topbar { gap: 12px; padding: 10px 18px; }
  .scenario-grid-3 { grid-template-columns: repeat(3, 1fr); }
  .tri-grid, .media-grid, .cmp-layout { grid-template-columns: 1fr; }
  .family-list { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  body { font-size: 13.5px; -webkit-tap-highlight-color: transparent; }

  /* 移动端顶栏：第 1 行标题+更新，第 2 行横向滑动 Tab 栏 */
  .topbar {
    padding: 10px 12px 8px; gap: 8px;
    display: grid; grid-template-columns: 1fr auto; align-items: center;
  }
  .brand { min-width: 0; gap: 8px; }
  .logo { font-size: 22px; }
  .brand-title { font-size: 15px; line-height: 1.25; }
  .brand-sub { font-size: 11px; }
  .meta-wrap { margin-left: 0; gap: 6px; }
  .meta { font-size: 11px; }
  .tabs {
    grid-column: 1 / -1; flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch;
    scrollbar-width: none; gap: 6px; padding: 2px 0; margin: 0 -2px;
  }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs button { flex: 0 0 auto; padding: 6px 12px; font-size: 13px; white-space: nowrap; }

  main { padding: 4px 12px 28px; }
  footer { padding: 16px 12px calc(20px + env(safe-area-inset-bottom)); }
  .card { padding: 12px; border-radius: 12px; }

  /* Tab 1：3 大场景紧凑并排，不占满首屏 */
  .scenario-grid-3 { grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0 10px; }
  .scenario { padding: 10px 8px; border-radius: 12px; align-items: center; text-align: center; gap: 3px; }
  .sc-icon { font-size: 20px; }
  .sc-name { font-size: 12.5px; line-height: 1.25; }
  .sc-desc { display: none; }

  /* 筛选条与横向滑动 Chip 栏（避免芯片占满半屏） */
  .constraints { padding: 10px 12px; gap: 8px 10px; margin-bottom: 10px; }
  .seg-tabs { width: 100%; }
  .seg-tabs button { flex: 1; justify-content: center; padding: 7px 8px; font-size: 13px; }
  .chips-wrap { width: 100%; overflow: hidden; }
  #cCreators, #brandTabs, .media-tabs {
    width: 100%; flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch;
    scrollbar-width: none; padding-bottom: 2px;
  }
  #cCreators::-webkit-scrollbar, #brandTabs::-webkit-scrollbar, .media-tabs::-webkit-scrollbar { display: none; }
  #cCreators .chip, #brandTabs .chip, .media-tabs .chip { flex: 0 0 auto; white-space: nowrap; }

  .toolbar { gap: 8px; margin-bottom: 10px; }
  .toolbar.top-gap { margin-top: 12px; }
  input[type='search'], select { font-size: 16px; padding: 7px 10px; }
  input[type='search'] { min-width: 0; width: 100%; }
  #boardCreator, #cmpAdd { width: 100%; }
  .suffix-pill { font-size: 11px; padding: 4px 9px; border-radius: 8px; line-height: 1.5; }

  /* 表格：手机端首屏直接看 # + 模型 + 主指标条 */
  .board { font-size: 12.5px; }
  .board th, .board td { padding: 7px 6px; }
  .pick-board th.col-creator, .pick-board td.col-creator { display: none; }
  .name-cell { min-width: 155px; max-width: 210px; }
  .rank-bar { min-width: 88px; height: 22px; }
  .rank-bar em { font-size: 11.5px; right: 6px; top: 2px; }
  .row-exp { width: 24px; height: 24px; }
  .global-rank { min-width: 24px; font-size: 12px; }
  .run-badge { font-size: 10px; padding: 1px 5px; margin-left: 4px; }

  /* 名字解码：保留全部 3 个条形指标（智能/价格/速度）作为下方三列 */
  .brand-guide { padding: 10px 12px; }
  .bg-metaphor { font-size: 14.5px; }
  .tier-chip { padding: 4px 8px; font-size: 12px; }
  .tier-arrow { display: inline; font-size: 12px; }
  .fam-cols { display: none; }
  .fam-row { grid-template-columns: 56px 1fr; gap: 6px 8px; padding: 10px 0; align-items: start; }
  .fam-bars { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 2px; }
  .fam-bars .mbar { height: 22px; }
  .fam-bars .mbar em { font-size: 11px; left: 6px; top: 3px; }
  .fam-bars .mbar.int::after, .fam-bars .mbar.price::after, .fam-bars .mbar.speed::after {
    position: absolute; right: 5px; top: 4px; font-size: 9.5px; color: #cbd5e199;
  }
  .fam-bars .mbar.int::after { content: '智能'; }
  .fam-bars .mbar.price::after { content: '价格'; }
  .fam-bars .mbar.speed::after { content: 't/s'; }

  /* 四象限图：可顺滑左右滑动，保持字体清晰可读 */
  .chart-card { padding: 8px; }
  .chart-svg { min-width: 640px; }
  .legend { gap: 6px; }

  /* 对比页 */
  .radar { max-width: 290px; }

  /* 弹窗改为底部抽屉风格（单手拇指易操作） */
  .modal { align-items: flex-end; padding: 0; }
  .modal-card {
    width: 100%; border-radius: 18px 18px 0 0; max-height: 86vh;
    padding: 18px 16px calc(18px + env(safe-area-inset-bottom));
    border-left: 0; border-right: 0; border-bottom: 0;
  }
  .modal-card h3 { font-size: 17px; padding-right: 28px; }
  .d-row { grid-template-columns: 64px 66px 1fr 56px; gap: 6px; font-size: 12px; }
  .toast { width: calc(100% - 28px); text-align: center; bottom: calc(16px + env(safe-area-inset-bottom)); }
}
