/* ═════════════════════════════════════════════════════════════════════════════
   justspeedai · AI 大模型榜单 — 亮色精密观测台主题（Light Observatory）
   设计理念：
   · 明亮通透的冰瓷微蓝白底（#F6F8FC）+ 晨曦青靛极光 + 44px 精密网格底纹
   · 纯白卡片层级 + 克制微阴影 + 高对比石板墨蓝文字（#0F172A）
   · 零外链、零 color-mix()、渐变字全配 @supports 兜底、tabular-nums 等宽对齐
   · 桌面端高精度数据表 / 移动端（≤720px）零裁切 Bento 卡片重排
   ═════════════════════════════════════════════════════════════════════════════ */

:root {
  --bg: #F6F8FC;
  --bg-soft: #EEF2F8;
  --surface: #FFFFFF;
  --surface-2: #F8FAFC;
  --surface-hover: #F1F7FE;
  --fg: #0F172A;
  --fg-2: #1E293B;
  --dim: #475569;
  --dim2: #64748B;

  /* 主强调色：深天青 → 靛蓝（亮色背景下高对比且高级） */
  --c1: #0284C7;
  --c2: #4F46E5;
  --c1-lite: #38BDF8;
  --c1-text: #0369A1;
  --c1-soft: rgba(2, 132, 199, .095);
  --c2-soft: rgba(79, 70, 229, .085);
  --c1-line: rgba(2, 132, 199, .30);
  --glow: rgba(2, 132, 199, .24);
  --glow2: rgba(79, 70, 229, .18);

  /* 四类语义维度色 */
  --sem-cap: #0284C7;     /* 通用智力 */
  --sem-cap-2: #2563EB;
  --sem-eng: #6366F1;     /* 编码 / 智能体 / 视觉 */
  --sem-eng-2: #7C3AED;
  --sem-ops: #059669;     /* 长上下文 / 性价比 / 可用性 */
  --sem-ops-2: #10B981;
  --sem-eco: #D97706;     /* 社区口碑 / 真实用量 / 开源生态 */
  --sem-eco-2: #F59E0B;

  /* 语义状态色 */
  --ok: #059669;
  --ok-bg: rgba(5, 150, 105, .09);
  --ok-line: rgba(5, 150, 105, .26);
  --warn: #B45309;
  --warn-bg: rgba(217, 119, 6, .095);
  --warn-line: rgba(217, 119, 6, .28);
  --bad: #DC2626;
  --bad-bg: rgba(220, 38, 38, .085);
  --bad-line: rgba(220, 38, 38, .25);

  --line: rgba(15, 23, 42, .085);
  --line2: rgba(15, 23, 42, .15);
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 18px;
  --r-xl: 22px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .04), 0 4px 14px -8px rgba(15, 23, 42, .08);
  --shadow-card: 0 1px 3px rgba(15, 23, 42, .04), 0 14px 36px -20px rgba(15, 23, 42, .12);
  --shadow-float: 0 20px 50px -16px rgba(15, 23, 42, .18), 0 4px 14px -6px rgba(15, 23, 42, .08);
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font: 14px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", system-ui, "PingFang SC", "Hiragino Sans", "Yu Gothic UI", "Malgun Gothic", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}

button, input, select { font: inherit; color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--c1);
  outline-offset: 2px;
}
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--dim2); }

/* ────────── 亮色晨曦极光 + 精密坐标网格背景 ────────── */
.aurora {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(62vw 42vw at 12% -6%, rgba(56, 189, 248, .17), transparent 64%),
    radial-gradient(54vw 38vw at 90% 2%, rgba(99, 102, 241, .13), transparent 62%),
    radial-gradient(64vw 42vw at 55% 104%, rgba(16, 185, 129, .08), transparent 68%);
}

.grid-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(15, 23, 42, .032) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, .032) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask: radial-gradient(115% 74% at 50% 18%, #000 0%, transparent 78%);
  mask: radial-gradient(115% 74% at 50% 18%, #000 0%, transparent 78%);
}

.wrap {
  position: relative;
  z-index: 1;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 22px 88px;
}

/* ────────── 顶栏 ────────── */
.top {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 13px 0;
  position: sticky;
  top: 0;
  z-index: 25;
  background: rgba(246, 248, 252, .86);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: var(--fg);
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--c1), var(--c2));
  color: #fff;
  box-shadow: 0 6px 16px -6px rgba(2, 132, 199, .55), inset 0 1px 0 rgba(255, 255, 255, .35);
}
.brand-name { font-weight: 750; letter-spacing: -.01em; font-size: 15px; }
.brand-sub {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .10em;
  color: var(--dim2);
  border-left: 1px solid var(--line2);
  padding-left: 9px;
  margin-left: 1px;
}

.tabs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  padding: 3px;
  border-radius: 999px;
  background: rgba(15, 23, 42, .045);
  border: 1px solid var(--line);
}
.tabs button {
  background: transparent;
  border: 0;
  padding: 6px 14px;
  border-radius: 999px;
  color: var(--dim);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background .16s ease, color .16s ease, box-shadow .16s ease;
  white-space: nowrap;
}
.tabs button:hover { color: var(--fg); background: rgba(255, 255, 255, .6); }
.tabs button.active {
  color: var(--fg);
  font-weight: 650;
  background: var(--surface);
  box-shadow: 0 1px 3px rgba(15, 23, 42, .10), 0 0 0 1px rgba(15, 23, 42, .05);
}

.top-right {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: none;
}

.api-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--line2);
  background: var(--surface);
  color: var(--fg-2);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
  transition: border-color .15s ease, color .15s ease, background .15s ease, transform .14s ease;
}
.api-pill-btn:hover {
  border-color: var(--c1-line);
  color: var(--c1-text);
  background: var(--surface-hover);
  transform: translateY(-1px);
}
.api-pill-btn .api-btn-state {
  font: 650 10.5px/1 var(--mono);
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--bg-soft);
  color: var(--dim2);
  border: 1px solid var(--line);
}
.api-pill-btn.is-configured {
  border-color: var(--ok-line);
}
.api-pill-btn.is-configured .api-btn-state {
  background: var(--ok-bg);
  color: var(--ok);
  border-color: var(--ok-line);
}
.api-pill-btn.is-configured .api-btn-state::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ok);
  margin-right: 4px;
  vertical-align: middle;
}

.cta-accel {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 650;
  font-size: 13px;
  color: #fff;
  background: linear-gradient(135deg, var(--c1) 0%, #2563EB 52%, var(--c2) 100%);
  box-shadow: 0 8px 20px -8px rgba(37, 99, 235, .52), inset 0 1px 0 rgba(255, 255, 255, .28);
  transition: transform .14s ease, box-shadow .18s ease, filter .18s ease;
  white-space: nowrap;
}
.cta-accel:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
  box-shadow: 0 12px 26px -8px rgba(37, 99, 235, .58), inset 0 1px 0 rgba(255, 255, 255, .36);
}
.cta-accel:active { transform: translateY(0); }

/* ────────── 紧凑首屏头条（一眼直达上新与主榜）────────── */
.top { padding: 10px 0; }

.board-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  flex-wrap: wrap;
  padding: 11px 0 9px;
}
.intro-left {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
}
.board-intro h1 {
  margin: 0;
  font-size: clamp(19px, 2.1vw, 23px);
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--fg);
}
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .board-intro h1 {
    background: linear-gradient(125deg, #0F172A 10%, #1E3A8A 62%, #0284C7 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
}
.intro-sub {
  font-size: 12px;
  color: var(--dim2);
  white-space: nowrap;
}
.intro-kpis {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.intro-pill {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .90);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  font-size: 11px;
  color: var(--dim2);
}
.intro-pill b {
  font: 750 12.5px/1 var(--mono);
  font-variant-numeric: tabular-nums;
  color: var(--fg);
}

/* ────────── 今日 & 近7天统一模型上新展台（单行横向精密轨道）────────── */
@keyframes todayRadarRipple {
  0% { transform: scale(1); opacity: .68; }
  75%, 100% { transform: scale(2.35); opacity: 0; }
}
@keyframes todaySpin {
  to { transform: rotate(360deg); }
}

.release-dock {
  margin: 0 0 10px;
  padding: 10px 14px 11px;
  border-radius: var(--r-lg);
  background: linear-gradient(135deg, rgba(255, 255, 255, .98) 0%, rgba(248, 250, 252, .94) 100%);
  border: 1px solid rgba(2, 132, 199, .20);
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}
.release-dock::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 2.5px;
  background: linear-gradient(90deg, #10B981 0%, #0284C7 55%, #4F46E5 100%);
}
.release-dock.is-collapsed .rd-rail { display: none; }
.release-dock.is-collapsed { padding-bottom: 9px; }
.release-dock:not(.is-collapsed) .rd-head { margin-bottom: 9px; }

.rd-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  flex-wrap: wrap;
}
.rd-title-wrap {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  min-width: 0;
}
.today-radar {
  position: relative;
  width: 9px;
  height: 9px;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.today-radar i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #059669;
  display: block;
}
.today-radar::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(5, 150, 105, .42);
  animation: todayRadarRipple 2.2s cubic-bezier(0, 0, .2, 1) infinite;
}
.rd-head h2 {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -.01em;
  color: var(--fg);
}
.today-count-pill {
  font: 700 10.5px/1 var(--mono);
  padding: 3.5px 8px;
  border-radius: 999px;
  color: #047857;
  background: #ECFDF5;
  border: 1px solid rgba(5, 150, 105, .30);
}
.today-count-pill.has-today {
  color: #FFFFFF;
  background: linear-gradient(135deg, #059669, #0284C7);
  border-color: transparent;
  box-shadow: 0 3px 10px -3px rgba(5, 150, 105, .52);
}
.fresh-count {
  font: 650 10.5px/1 var(--mono);
  padding: 3.5px 8px;
  border-radius: 999px;
  color: #0369A1;
  background: #F0F9FF;
  border: 1px solid rgba(2, 132, 199, .24);
}
.today-date-pill {
  font: 650 10.5px/1 var(--mono);
  padding: 3.5px 8px;
  border-radius: 999px;
  color: var(--dim);
  background: #FFFFFF;
  border: 1px solid var(--line);
}
.rd-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.today-sync-meta {
  font-size: 11px;
  color: var(--dim2);
  font-variant-numeric: tabular-nums;
}
.today-accel-link,
.fresh-filter-btn,
.fresh-toggle-btn,
.today-refresh-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 9px;
  border-radius: 7px;
  font-size: 11.5px;
  font-weight: 650;
  cursor: pointer;
  transition: .14s ease;
  text-decoration: none;
  white-space: nowrap;
}
.today-accel-link {
  background: rgba(255, 255, 255, .92);
  border: 1px solid rgba(2, 132, 199, .22);
  color: #0369A1;
}
.today-accel-link:hover { background: #E0F2FE; border-color: rgba(2, 132, 199, .45); }
.fresh-filter-btn, .fresh-toggle-btn {
  border: 1px solid var(--line2);
  background: var(--surface);
  color: var(--dim);
}
.fresh-filter-btn:hover, .fresh-toggle-btn:hover { border-color: var(--c1-line); color: var(--c1-text); }
.fresh-filter-btn[aria-pressed="true"] {
  background: linear-gradient(135deg, #059669, #0284C7);
  border-color: transparent;
  color: #FFFFFF;
  box-shadow: 0 3px 10px -3px rgba(2, 132, 199, .45);
}
.today-refresh-btn {
  border: 1px solid rgba(5, 150, 105, .32);
  background: #FFFFFF;
  color: #047857;
}
.today-refresh-btn:hover:not(:disabled) {
  background: #ECFDF5;
  border-color: rgba(5, 150, 105, .55);
}
.today-refresh-btn:disabled { opacity: .65; cursor: wait; }
.today-refresh-btn.is-busy .today-refresh-ico { animation: todaySpin .85s linear infinite; }

.today-loading { font-size: 12px; color: var(--dim); padding: 4px 0; }

/* 免横滑全览网格：按卡片数自适应列数（如 8 款→4×2、10 款→5×2），中屏/移动自然收拢 */
.rd-rail {
  display: grid;
  grid-template-columns: repeat(var(--rd-cols, 4), minmax(0, 1fr));
  gap: 8px;
  overflow: visible;
  padding: 2px 0 0;
}

.rd-watch-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 4px;
  padding: 7px 10px 7px 11px;
  border-radius: 12px;
  background: linear-gradient(135deg, #F0FDF4 0%, #ECFDF5 58%, #FFFFFF 100%);
  border: 1.5px dashed rgba(5, 150, 105, .36);
  box-shadow: inset 3px 0 0 #10B981;
  cursor: pointer;
  text-align: left;
  min-width: 0;
  height: 100%;
  transition: transform .14s ease, border-color .14s ease, box-shadow .14s ease;
}
.rd-watch-card:hover {
  transform: translateY(-2px);
  border-color: rgba(5, 150, 105, .58);
  box-shadow: inset 3px 0 0 #059669, 0 8px 16px -12px rgba(5, 150, 105, .38);
}
.rd-watch-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.rd-watch-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font: 700 10.5px/1 var(--mono);
  color: #047857;
}
.rd-watch-badge i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10B981;
  display: inline-block;
}
.rd-watch-date {
  font: 650 10px/1 var(--mono);
  color: #047857;
  background: #D1FAE5;
  padding: 2px 6px;
  border-radius: 5px;
}
.rd-watch-msg {
  font-size: 11.5px;
  font-weight: 600;
  color: #1E293B;
  line-height: 1.3;
}
.rd-watch-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 10.5px;
  color: var(--dim2);
  padding-top: 4px;
  border-top: 1px solid rgba(5, 150, 105, .14);
}
.rd-watch-foot b { color: #0369A1; font-weight: 650; }
.rd-watch-foot em { font-style: normal; font-family: var(--mono); color: #047857; }

.rd-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 4px;
  padding: 7px 10px;
  border-radius: 12px;
  cursor: pointer;
  text-align: left;
  min-width: 0;
  height: 100%;
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.rd-card.is-today {
  padding-left: 11px;
  background: linear-gradient(135deg, #ECFDF5 0%, #F0FDF4 54%, #E0F2FE 100%);
  border: 1.5px solid rgba(5, 150, 105, .48);
  box-shadow: inset 3.5px 0 0 #059669, 0 8px 18px -13px rgba(5, 150, 105, .42);
}
.rd-card.is-today:hover {
  transform: translateY(-2px);
  border-color: rgba(5, 150, 105, .70);
  box-shadow: inset 3px 0 0 #059669, 0 12px 22px -12px rgba(5, 150, 105, .46);
}
.rd-card.is-week {
  background: #FFFFFF;
  border: 1px solid rgba(15, 23, 42, .10);
  box-shadow: var(--shadow-sm);
}
.rd-card.is-week:hover {
  transform: translateY(-2px);
  border-color: var(--c1-line);
  box-shadow: 0 10px 20px -14px rgba(2, 132, 199, .32);
}
.rd-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.rd-card-id {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  flex: 1;
}
.rd-card-id .vendor-emblem {
  width: 24px;
  height: 24px;
  border-radius: 6px;
}
.rd-card-titles { min-width: 0; flex: 1; }
.rd-card-name {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--fg);
  line-height: 1.25;
  min-width: 0;
}
.rd-card-name > span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rd-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  margin-top: 1px;
  min-width: 0;
}
.rd-card-vendor {
  font: 10px/1.2 var(--mono);
  color: var(--dim2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rd-age-sm { display: none; }
.rd-age-lg { display: inline-flex; align-items: center; }
.rd-age {
  font: 650 10px/1 var(--mono);
  padding: 3px 6px;
  border-radius: 5px;
  color: var(--c1-text);
  background: var(--c1-soft);
  border: 1px solid rgba(2, 132, 199, .18);
  white-space: nowrap;
  flex: none;
}
.rd-age.is-today {
  color: #047857;
  background: #D1FAE5;
  border-color: rgba(5, 150, 105, .32);
}
.rd-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding-top: 5px;
  border-top: 1px solid rgba(15, 23, 42, .055);
}
.rd-stat {
  font: 650 10.5px/1 var(--mono);
  padding: 3px 6px;
  border-radius: 5px;
  white-space: nowrap;
}
.rd-stat.ranked { color: #0369A1; background: #E0F2FE; border: 1px solid rgba(2, 132, 199, .24); }
.rd-stat.live-comm { color: #047857; background: #ECFDF5; border: 1px solid rgba(5, 150, 105, .30); }
.rd-stat.unranked { color: #92400E; background: #FEF3C7; border: 1px solid rgba(217, 119, 6, .26); }
.rd-stat.pending { color: #4338CA; background: #EEF2FF; border: 1px solid rgba(79, 70, 229, .22); }
.rd-specs {
  display: flex;
  align-items: center;
  gap: 3px;
  font: 10px/1.1 var(--mono);
  color: var(--dim2);
  min-width: 0;
  overflow: hidden;
}
.rd-specs > span {
  white-space: nowrap;
  padding: 2px 4px;
  border-radius: 4px;
  background: rgba(248, 250, 252, .9);
  border: 1px solid rgba(15, 23, 42, .08);
}
.rd-specs .spec-open {
  color: var(--ok);
  border-color: var(--ok-line);
  background: var(--ok-bg);
  font-weight: 600;
}

.today-badge {
  font: 750 9.5px/1.1 var(--mono);
  padding: 2px 5px;
  border-radius: 4px;
  color: #FFFFFF;
  background: linear-gradient(135deg, #059669, #0284C7);
  flex: none;
}
.live-badge {
  font: 700 9.5px/1.1 var(--mono);
  padding: 2px 5px;
  border-radius: 4px;
  color: #0369A1;
  background: #E0F2FE;
  border: 1px solid rgba(2, 132, 199, .26);
  flex: none;
}
.spec-open {
  color: var(--ok);
  border-color: var(--ok-line);
  background: var(--ok-bg);
  font-weight: 600;
}
tr.live-today-head td {
  padding: 8px 14px;
  background: linear-gradient(90deg, #ECFDF5 0%, #EFF6FF 100%);
  border-bottom: 1px solid rgba(5, 150, 105, .20);
  font-size: 12px;
  color: #065F46;
}
tr.live-today-row {
  background: rgba(236, 253, 245, .52);
}

.rd-kind-pill {
  flex: none;
  white-space: nowrap;
  font: 700 10px/1.1 sans-serif;
  padding: 2.5px 5.5px;
  border-radius: 5px;
  letter-spacing: .01em;
}
.rd-card-name > span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.rd-kind-pill.kind-image {
  color: #BE185D;
  background: #FDF2F8;
  border: 1px solid rgba(219, 39, 119, .26);
}
.rd-kind-pill.kind-video {
  color: #6D28D9;
  background: #F5F3FF;
  border: 1px solid rgba(124, 58, 237, .26);
}

/* ────────── 工具条 & 赛道切换 ────────── */
.toolbar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 8px;
}
.track-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  flex-wrap: wrap;
}
.track-bar {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .86);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.track-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--dim);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: .16s ease;
  white-space: nowrap;
}
.track-btn:hover { color: var(--fg); background: rgba(15, 23, 42, .04); }
.track-btn svg { width: 14px; height: 14px; flex: none; opacity: .78; }
.track-btn.active svg { opacity: 1; }
.track-btn.active[data-track="llm"] {
  background: linear-gradient(135deg, #EFF6FF 0%, #E0F2FE 100%);
  border-color: rgba(2, 132, 199, .30);
  color: #0369A1;
  box-shadow: 0 2px 8px -3px rgba(2, 132, 199, .28);
}
.track-btn.active[data-track="image"] {
  background: linear-gradient(135deg, #FDF2F8 0%, #FCE7F3 100%);
  border-color: rgba(219, 39, 119, .28);
  color: #BE185D;
  box-shadow: 0 2px 8px -3px rgba(219, 39, 119, .25);
}
.track-btn.active[data-track="video"] {
  background: linear-gradient(135deg, #F5F3FF 0%, #EDE9FE 100%);
  border-color: rgba(124, 58, 237, .28);
  color: #6D28D9;
  box-shadow: 0 2px 8px -3px rgba(124, 58, 237, .25);
}
.track-cnt {
  font: 700 10.5px/1 var(--mono);
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(15, 23, 42, .06);
  color: inherit;
}
.track-btn.active .track-cnt { background: rgba(255, 255, 255, .86); }
.track-subhint {
  font-size: 12px;
  color: var(--dim2);
  font-variant-numeric: tabular-nums;
}
.cap-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--fg-2);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  white-space: nowrap;
}
.toolbar-top {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chips button {
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--dim);
  padding: 7px 14px;
  border-radius: var(--r-sm);
  font-weight: 500;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: .15s ease;
}
.chips button:hover { border-color: var(--line2); color: var(--fg); background: var(--surface-2); }
.chips button.active {
  background: var(--c1-soft);
  border-color: var(--c1-line);
  color: var(--c1-text);
  font-weight: 650;
  box-shadow: 0 2px 8px -4px var(--glow);
}

.profile-banner {
  padding: 6px 12px;
  border-radius: var(--r-sm);
  background: rgba(255, 255, 255, .72);
  border: 1px solid var(--line);
  font-size: 12px;
  color: var(--dim);
  line-height: 1.6;
}
.profile-banner b { color: var(--fg); font-weight: 650; }

.studio-btn {
  padding: 6px 11px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--fg-2);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: .14s ease;
  white-space: nowrap;
}
.studio-btn:hover { background: var(--surface-hover); border-color: var(--c1-line); color: var(--c1-text); }

/* 筛选条 */
.filters {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.search-box {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1 1 220px;
  max-width: 300px;
}
.search-ico {
  position: absolute;
  left: 11px;
  color: var(--dim2);
  pointer-events: none;
}
.search-box input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 7px 30px 7px 32px;
  font-size: 13px;
  box-shadow: var(--shadow-sm);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.search-box input:focus {
  border-color: var(--c1);
  box-shadow: 0 0 0 3px var(--c1-soft);
}
.search-box input::-webkit-search-cancel-button { display: none; }
.search-clear {
  position: absolute;
  right: 7px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 0;
  background: var(--bg-soft);
  color: var(--dim);
  font-size: 11px;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.search-clear:hover { background: var(--line2); color: var(--fg); }

.select-wrap { position: relative; }
.select-wrap select {
  -webkit-appearance: none;
  appearance: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 7px 30px 7px 11px;
  font-size: 13px;
  color: var(--fg-2);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: border-color .15s;
}
.select-wrap select:hover { border-color: var(--line2); }
.select-wrap::after {
  content: "";
  position: absolute;
  right: 11px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-right: 1.8px solid var(--dim);
  border-bottom: 1.8px solid var(--dim);
  transform: translateY(-65%) rotate(45deg);
  pointer-events: none;
}

.filter-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.pill-chk {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  border-radius: var(--r-sm);
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--dim);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: .14s ease;
  user-select: none;
}
.pill-chk:hover { border-color: var(--line2); color: var(--fg); }
.pill-chk input {
  -webkit-appearance: none;
  appearance: none;
  width: 15px;
  height: 15px;
  border-radius: 4px;
  border: 1.5px solid var(--line2);
  background: var(--surface);
  margin: 0;
  cursor: pointer;
  display: inline-grid;
  place-items: center;
  transition: .14s ease;
}
.pill-chk input:checked {
  background: var(--c1);
  border-color: var(--c1);
}
.pill-chk input:checked::after {
  content: "";
  width: 4px;
  height: 8px;
  border: solid #fff;
  border-width: 0 1.8px 1.8px 0;
  transform: rotate(42deg) translate(-1px, -1px);
}
.pill-chk:has(input:checked) {
  background: var(--c1-soft);
  border-color: var(--c1-line);
  color: var(--c1-text);
  font-weight: 600;
}

.legend {
  margin: 0 0 8px;
  padding: 7px 12px;
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  font-size: 12px;
  color: var(--dim2);
  line-height: 1.55;
}
.legend b { color: var(--fg-2); font-weight: 650; }
.legend-groups {
  display: inline-flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-left: 6px;
}
.lg-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  margin-right: 4px;
  vertical-align: middle;
}

/* ────────── 榜单主表（桌面高精度表）────────── */
.table-wrap {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow-card);
}
table { width: 100%; border-collapse: collapse; table-layout: auto; }
thead th {
  text-align: left;
  font-size: 11px;
  letter-spacing: .06em;
  color: var(--dim2);
  font-weight: 650;
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  white-space: nowrap;
}
thead th.sortable { cursor: pointer; user-select: none; transition: color .14s; }
thead th.sortable:hover { color: var(--c1-text); }
thead th.sort-active { color: var(--c1-text); }
thead th.sort-active::after { content: " ↓"; font-size: 10px; }
thead th.sort-active[data-sort="cost"]::after { content: " ↑"; }

tbody td {
  padding: 9px 11px;
  border-bottom: 1px solid rgba(15, 23, 42, .055);
  vertical-align: middle;
}
tbody tr.model-row { cursor: pointer; transition: background .12s ease; }
tbody tr.model-row:hover { background: var(--surface-hover); }
tbody tr.model-row.is-compared { background: rgba(2, 132, 199, .055); }
tbody tr:last-child td { border-bottom: none; }

.c-cmp { width: 46px; text-align: center; }
.c-rank { width: 122px; }
.c-model { min-width: 245px; }
.c-score { width: 132px; }
.c-dims { min-width: 280px; }
.c-cost, .c-ctx, .c-cov { width: 88px; white-space: nowrap; }

.cmp-btn {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  border: 1px solid var(--line2);
  background: var(--surface);
  color: var(--dim2);
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  display: inline-grid;
  place-items: center;
  transition: .14s ease;
}
.cmp-btn:hover { border-color: var(--c1); color: var(--c1-text); background: var(--c1-soft); }
.cmp-btn.active {
  background: var(--c1);
  border-color: var(--c1);
  color: #fff;
  box-shadow: 0 2px 8px -2px rgba(2, 132, 199, .5);
}

/* 名次 + 区间须线 */
.rank-cell { display: flex; align-items: baseline; gap: 6px; flex-wrap: nowrap; }
.rank-num { font: 750 16px/1 var(--mono); color: var(--fg); }
.rank-num.top1 { color: #B45309; }
.rank-num.top2 { color: #334155; }
.rank-num.top3 { color: #C2410C; }
.rank-range { font: 500 11px/1 var(--mono); color: var(--dim2); }
.rank-tie {
  font: 600 10.5px/1 var(--mono);
  color: var(--dim2);
  padding: 1px 4px;
  border-radius: 4px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  cursor: help;
}
.rank-sub { display: flex; align-items: center; gap: 6px; margin-top: 5px; }
.tier {
  display: inline-block;
  font: 700 10px/1 var(--mono);
  padding: 3px 6px;
  border-radius: 5px;
  border: 1px solid;
}
.tier.S { color: #92400E; border-color: rgba(217, 119, 6, .36); background: #FEF3C7; }
.tier.A { color: #0369A1; border-color: rgba(2, 132, 199, .30); background: #E0F2FE; }
.tier.B { color: #4338CA; border-color: rgba(79, 70, 229, .26); background: #EEF2FF; }
.tier.C { color: var(--dim); border-color: var(--line2); background: var(--bg-soft); }
.tier.D, .tier.E { color: var(--dim2); border-color: var(--line); background: var(--surface-2); }

.rank-whisker { display: block; flex: 1; min-width: 44px; max-width: 68px; height: 10px; }

/* 模型列 + 厂商图标 */
.model-head { display: flex; align-items: center; gap: 10px; }
.vendor-emblem {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  flex: none;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background: var(--surface-2);
}
.model-titles { min-width: 0; }
.model-name {
  font-weight: 680;
  font-size: 13.8px;
  color: var(--fg);
  line-height: 1.35;
}
.model-vendor {
  font: 11px/1.3 var(--mono);
  color: var(--dim2);
  margin-top: 1px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.badges { display: flex; gap: 4px; margin-top: 6px; flex-wrap: wrap; }
.badge {
  font: 500 10px/1 var(--mono);
  padding: 3px 6px;
  border-radius: 5px;
  background: var(--surface-2);
  color: var(--dim);
  border: 1px solid var(--line);
}
.badge.open { color: var(--ok); border-color: var(--ok-line); background: var(--ok-bg); font-weight: 600; }
.badge.effort { color: var(--c1-text); border-color: var(--c1-line); background: var(--c1-soft); }
.badge.soft-note { color: var(--dim2); border-color: var(--line); background: transparent; }
.badge.calibrated { color: #92400E; border-color: rgba(217, 119, 6, .35); background: #FEF3C7; font-weight: 600; }
.drawer-audit-banner {
  margin: 14px 0 6px;
  padding: 11px 14px;
  border-radius: var(--r-md);
  border: 1px solid rgba(217, 119, 6, .36);
  background: #FFFBEB;
  color: #78350F;
  font-size: 12.5px;
  line-height: 1.65;
}
.drawer-audit-banner b { color: #92400E; font-weight: 700; }
.new-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 6px;
  border-radius: 5px;
  font: 700 10px/1.15 -apple-system, BlinkMacSystemFont, "PingFang SC", system-ui, sans-serif;
  letter-spacing: .03em;
  color: #fff;
  background: linear-gradient(135deg, #059669, #0284C7);
  box-shadow: 0 2px 6px -2px rgba(5, 150, 105, .45);
  vertical-align: middle;
  flex: none;
}
.model-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.spot-name {
  display: flex;
  align-items: center;
  gap: 5px;
}
.dh-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.pill-chk.pill-new:has(input:checked) {
  background: #ECFDF5;
  border-color: rgba(5, 150, 105, .36);
  color: #047857;
}
.pill-chk.pill-new input:checked {
  background: #059669;
  border-color: #059669;
}

/* 综合分 */
.score-bar { display: flex; align-items: center; gap: 8px; }
.score-val { font: 750 15px/1 var(--mono); color: var(--fg); min-width: 38px; }
.bar { flex: 1; height: 6px; border-radius: 99px; background: var(--bg-soft); overflow: hidden; }
.bar > i {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--c1), var(--c2));
}

/* 十维能力谱 */
.dims-wrap { position: relative; }
.dims {
  display: flex;
  gap: 3px;
  align-items: flex-end;
  height: 28px;
  position: relative;
}
.dims::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  border-top: 1px dashed rgba(15, 23, 42, .08);
  pointer-events: none;
}
.dim {
  flex: 1;
  min-width: 16px;
  height: 100%;
  position: relative;
  background: rgba(15, 23, 42, .045);
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  cursor: crosshair;
  transition: transform .1s ease;
}
.dim:hover { transform: scaleY(1.06); }
.dim > i { display: block; width: 100%; border-radius: 3px 3px 0 0; }
.dim.sem-cap > i { background: linear-gradient(180deg, var(--sem-cap), var(--sem-cap-2)); }
.dim.sem-eng > i { background: linear-gradient(180deg, var(--sem-eng), var(--sem-eng-2)); }
.dim.sem-ops > i { background: linear-gradient(180deg, var(--sem-ops), var(--sem-ops-2)); }
.dim.sem-eco > i { background: linear-gradient(180deg, var(--sem-eco), var(--sem-eco-2)); }
.dim.missing {
  background: repeating-linear-gradient(
    -45deg,
    rgba(15, 23, 42, .055),
    rgba(15, 23, 42, .055) 3px,
    rgba(15, 23, 42, .015) 3px,
    rgba(15, 23, 42, .015) 6px
  );
}
.dim-labels { display: flex; gap: 3px; margin-top: 3px; }
.dim-labels span {
  flex: 1;
  min-width: 16px;
  font-size: 9px;
  text-align: center;
  color: var(--dim2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dim-labels span.w-active { color: var(--fg-2); font-weight: 600; }

/* 覆盖率胶囊 */
.cov-pill {
  display: inline-block;
  font: 600 11px/1 var(--mono);
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid;
}
.cov-high { color: var(--ok); border-color: var(--ok-line); background: var(--ok-bg); }
.cov-mid { color: var(--warn); border-color: var(--warn-line); background: var(--warn-bg); }
.cov-low { color: var(--bad); border-color: var(--bad-line); background: var(--bad-bg); }

.unranked-head td {
  background: #FFFBEB;
  border-top: 2px solid rgba(217, 119, 6, .35);
  border-bottom: 1px solid rgba(217, 119, 6, .18);
  color: #92400E;
  font-size: 12px;
  line-height: 1.7;
  padding: 11px 14px;
}
.unranked-head b { color: #78350F; }
.unranked-row { opacity: .82; background: rgba(254, 243, 199, .22); }
.unranked-row:hover { opacity: 1; background: rgba(254, 243, 199, .45); }

.foot { color: var(--dim2); font-size: 12px; margin-top: 14px; line-height: 1.85; }
.empty-state { padding: 42px 16px; text-align: center; color: var(--dim2); font-size: 13.5px; }

/* ────────── 悬浮维度 Tooltip ────────── */
.dim-tooltip {
  position: fixed;
  z-index: 90;
  pointer-events: none;
  padding: 8px 11px;
  border-radius: var(--r-sm);
  background: rgba(15, 23, 42, .94);
  color: #F8FAFC;
  font-size: 12px;
  line-height: 1.5;
  box-shadow: 0 12px 30px -10px rgba(15, 23, 42, .45);
  max-width: 240px;
}
.dim-tooltip b { display: block; font-size: 12.5px; margin-bottom: 2px; }
.dim-tooltip .dt-val { font: 700 13px/1 var(--mono); color: #38BDF8; }

/* ────────── 底部对比托盘 & 模态对比窗口 ────────── */
.compare-tray {
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  z-index: 45;
  width: min(94vw, 760px);
  padding: 10px 14px;
  border-radius: var(--r-lg);
  background: rgba(255, 255, 255, .94);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border: 1px solid var(--c1-line);
  box-shadow: var(--shadow-float);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.compare-tray-items { display: flex; gap: 6px; flex-wrap: wrap; flex: 1; min-width: 0; }
.cmp-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border-radius: 8px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: 12px;
  font-weight: 600;
  color: var(--fg);
}
.cmp-chip button {
  border: 0;
  background: transparent;
  color: var(--dim2);
  cursor: pointer;
  padding: 0 2px;
  font-size: 12px;
}
.cmp-chip button:hover { color: var(--bad); }
.compare-tray-actions { display: flex; gap: 8px; flex: none; }
.btn-compare-go {
  padding: 7px 14px;
  border-radius: 9px;
  border: 0;
  background: linear-gradient(135deg, var(--c1), var(--c2));
  color: #fff;
  font-weight: 650;
  font-size: 12.5px;
  cursor: pointer;
  box-shadow: 0 6px 16px -6px rgba(37, 99, 235, .55);
}
.btn-compare-go:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }

.btn-chat-go {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: 9px;
  border: 0;
  background: linear-gradient(135deg, #0D9488 0%, #0284C7 100%);
  color: #fff;
  font-weight: 650;
  font-size: 12.5px;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 6px 16px -6px rgba(13, 148, 136, .52);
  transition: transform .14s ease, filter .15s ease, box-shadow .16s ease;
}
.btn-chat-go:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
  box-shadow: 0 10px 22px -8px rgba(13, 148, 136, .6);
}
.btn-chat-go:active { transform: translateY(0); }

.modal-head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
}

.row-test-btn {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--dim);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
  opacity: .62;
  transition: opacity .14s ease, background .14s ease, color .14s ease, border-color .14s ease, transform .12s ease;
  flex: none;
}
tr.model-row:hover .row-test-btn,
.row-test-btn:focus-visible {
  opacity: 1;
  background: var(--c1-soft);
  border-color: var(--c1-line);
  color: var(--c1-text);
}
.row-test-btn:hover {
  background: linear-gradient(135deg, #0D9488, #0284C7);
  border-color: transparent;
  color: #fff;
  transform: translateY(-0.5px);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(15, 23, 42, .42);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.modal-card {
  width: min(980px, 100%);
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  border-radius: var(--r-xl);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-float);
  overflow: hidden;
  animation: fadeSlideDown .18s ease-out;
}
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 18px 22px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}
.modal-head h2 { margin: 0 0 3px; font-size: 17px; color: var(--fg); }
.modal-sub { margin: 0; font-size: 12px; color: var(--dim2); }
.modal-body { padding: 18px 22px 24px; overflow-y: auto; }
.compare-top {
  display: grid;
  grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
  gap: 20px;
  align-items: center;
  margin-bottom: 18px;
}
.cmp-legend { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 8px; }
.cmp-legend-item { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; }
.cmp-swatch { width: 10px; height: 10px; border-radius: 3px; }
.win-matrix { width: 100%; border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; }
.win-matrix th, .win-matrix td { padding: 8px 10px; font-size: 12px; text-align: center; border-bottom: 1px solid var(--line); }
.win-matrix th { background: var(--surface-2); font-weight: 650; }
.win-cell-hi { background: var(--ok-bg); color: var(--ok); font-weight: 700; }
.win-cell-lo { color: var(--dim2); }
.cmp-table { width: 100%; border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; margin-top: 14px; }
.cmp-table th, .cmp-table td { padding: 8px 11px; font-size: 12.5px; border-bottom: 1px solid var(--line); }
.cmp-table th { background: var(--surface-2); color: var(--dim); font-weight: 600; width: 130px; }
.cmp-best { font-weight: 750; color: var(--c1-text); background: var(--c1-soft); border-radius: 5px; padding: 2px 6px; }

/* ────────── 详情抽屉 ────────── */
.drawer {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  justify-content: flex-end;
  background: rgba(15, 23, 42, .38);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.drawer-inner {
  width: min(760px, 100%);
  height: 100%;
  overflow-y: auto;
  background: var(--surface);
  border-left: 1px solid var(--line);
  box-shadow: -20px 0 60px -20px rgba(15, 23, 42, .22);
  padding: 20px 26px 72px;
  position: relative;
  animation: slideIn .2s ease-out;
}
@keyframes slideIn { from { transform: translateX(26px); opacity: .4; } to { transform: none; opacity: 1; } }

.drawer-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.drawer-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.drawer-close {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-size: 15px;
  color: var(--dim);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: .14s ease;
}
.drawer-close:hover { background: var(--bg-soft); color: var(--fg); }

.drawer-hero { display: flex; align-items: center; gap: 12px; }
.dh { margin: 0 0 3px; font-size: 20px; line-height: 1.28; color: var(--fg); }
.dsub { color: var(--dim2); font: 11.5px/1.4 var(--mono); margin-bottom: 16px; word-break: break-all; }

.radar-card {
  display: grid;
  grid-template-columns: minmax(220px, 265px) minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 14px 16px;
  border-radius: var(--r-md);
  background: var(--surface-2);
  border: 1px solid var(--line);
  margin-bottom: 16px;
}
.radar-note { font-size: 12px; color: var(--dim); line-height: 1.75; }
.radar-note b { color: var(--fg); }
.radar-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; font-size: 11px; color: var(--dim2); }

.kv {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 8px 14px;
  font-size: 12.5px;
  padding: 14px 16px;
  border-radius: var(--r-md);
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.kv dt { color: var(--dim2); font-weight: 500; }
.kv dd { margin: 0; font-family: var(--mono); color: var(--fg-2); word-break: break-word; }

.drawer-desc {
  color: var(--dim);
  font-size: 12.5px;
  line-height: 1.78;
  margin-top: 14px;
  padding: 11px 14px;
  border-radius: var(--r-sm);
  background: var(--bg-soft);
}

.extra-bench-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(135px, 1fr));
  gap: 8px;
}
.extra-chip {
  padding: 8px 10px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: var(--surface-2);
}
.extra-chip span { display: block; font-size: 11px; color: var(--dim2); }
.extra-chip b { display: block; font: 700 14px/1.2 var(--mono); color: var(--fg); margin-top: 3px; }

.ev-section { margin-top: 22px; }
.ev-section h4 {
  font-size: 11.5px;
  letter-spacing: .06em;
  color: var(--dim);
  margin: 0 0 9px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.ev {
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  margin-bottom: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.ev-head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.ev-metric { font-weight: 650; font-size: 13px; color: var(--fg); }
.ev-raw { font: 700 13px/1 var(--mono); color: var(--c1-text); }
.ev-note { font-size: 11.5px; color: var(--dim2); margin-top: 5px; line-height: 1.7; }
.ev a { color: var(--c1-text); text-decoration: none; font-size: 11.5px; font-weight: 500; }
.ev a:hover { text-decoration: underline; }
.ev-story { font-size: 11.5px; color: var(--dim); margin-top: 5px; }
.ev-story a { font-size: 11.5px; }

.callout {
  border-left: 3px solid var(--c1);
  background: var(--c1-soft);
  padding: 12px 15px;
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  margin: 14px 0;
  font-size: 12.8px;
  color: var(--fg-2);
  line-height: 1.8;
}
.callout.warn { border-left-color: var(--warn); background: var(--warn-bg); }
.callout b { color: var(--fg); }
.callout code {
  background: rgba(255, 255, 255, .85);
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--c1-text);
}

.foot-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 40px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--dim2);
}
.foot-links { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.foot-copy {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 12px;
  color: var(--dim);
  cursor: pointer;
}
.foot-copy:hover { border-color: var(--c1-line); color: var(--c1-text); }
.foot-link { color: var(--c1-text); text-decoration: none; font-weight: 600; }
.foot-link:hover { text-decoration: underline; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(10px);
  z-index: 95;
  padding: 9px 16px;
  border-radius: 999px;
  background: var(--fg);
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  box-shadow: 0 14px 30px -12px rgba(15, 23, 42, .45);
}
.toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }

.view { display: none; }
.view.active { display: block; }

/* ────────── 响应式布局 ────────── */
@media (max-width: 1259px) {
  .rd-rail { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 1120px) {
  .c-dims { min-width: 220px; }
  .intro-sub { display: none; }
}

@media (max-width: 959px) {
  .rd-rail { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .top { gap: 10px; }
  .brand-sub { display: none; }
  .cta-accel { margin-left: auto; }
  .c-cost, .c-ctx { display: none; }
  thead th.c-cost, thead th.c-ctx { display: none; }
  tbody td.c-cost, tbody td.c-ctx { display: none; }
}

/* ── 全网口碑专有极简得分卡（黑盒护城河：仅展综合得分）── */
.comm-score-card {
  padding: 13px 15px 12px;
  border-radius: var(--r-md);
  background: linear-gradient(180deg, #FFFFFF 0%, #F8FAFC 100%);
  border: 1px solid rgba(5, 150, 105, .20);
  box-shadow: 0 2px 10px -6px rgba(15, 23, 42, .07);
}
.comm-score-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 9px;
}
.comm-score-title {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}
.comm-score-title h4 {
  margin: 0;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--fg);
}
.comm-score-tag {
  font-size: 10.5px;
  font-weight: 600;
  color: #047857;
  background: #ECFDF5;
  border: 1px solid rgba(5, 150, 105, .24);
  padding: 1.5px 7px;
  border-radius: 999px;
}
.comm-score-val {
  display: flex;
  align-items: baseline;
  gap: 3px;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}
.comm-score-val b {
  font-size: 20px;
  font-weight: 750;
  color: #047857;
  line-height: 1;
}
.comm-score-val span {
  font-size: 11px;
  color: var(--dim2);
}
.comm-score-bar {
  height: 7px;
  border-radius: 999px;
  background: #E2E8F0;
  overflow: hidden;
  margin-bottom: 8px;
}
.comm-score-bar i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #10B981, #059669);
}
.comm-score-note {
  margin: 0;
  font-size: 11.5px;
  line-height: 1.55;
  color: var(--dim);
}

/* 移动端（≤720px）：彻底放弃窄屏强塞表格，优雅重排为零截断 Bento 模型卡片 */
@media (max-width: 720px) {
  .wrap { padding: 0 12px 84px; }
  .top { padding: 8px 0; gap: 8px; }
  .tabs { order: 3; width: 100%; }
  .tabs button { flex: 1; text-align: center; padding: 5px 10px; font-size: 12.5px; }
  .board-intro { padding: 7px 0 6px; gap: 5px; }
  .board-intro h1 { font-size: 17px; }
  .intro-kpis { width: 100%; flex-wrap: wrap; gap: 5px; }
  .intro-pill { flex: none; padding: 3px 7px; font-size: 10.5px; }
  .intro-pill b { font-size: 11.5px; }
  .release-dock { padding: 8px 10px 9px; margin-bottom: 8px; }
  .rd-head { gap: 5px; }
  .rd-actions { width: 100%; justify-content: flex-end; gap: 5px; }
  .today-sync-meta, .today-date-pill { display: none; }
  .rd-rail {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }
  .rd-card, .rd-watch-card { padding: 6px 8px; gap: 4px; border-radius: 10px; }
  .rd-card-id { gap: 5px; }
  .rd-card-id .vendor-emblem { width: 20px; height: 20px; border-radius: 5px; }
  .rd-card-name { font-size: 11.5px; }
  .rd-card-vendor { font-size: 9.5px; }
  .rd-age { font-size: 9px; padding: 1.5px 4px; }
  .rd-age-lg { display: none; }
  .rd-age-sm { display: inline-flex; align-items: center; }
  .rd-card-foot { padding-top: 4px; gap: 4px; }
  .rd-stat { font-size: 9.5px; padding: 2px 5px; }
  .rd-specs > span { font-size: 9.5px; padding: 1px 4px; }
  .rd-specs > span:nth-child(n+2) { display: none; }
  .toolbar { gap: 6px; margin-bottom: 6px; }
  .chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; max-width: 100%; }
  .chips button { flex: none; padding: 5px 10px; font-size: 12px; }
  .profile-banner {
    padding: 5px 10px;
    font-size: 11px;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .filters { gap: 6px; }
  .search-box { max-width: none; flex: 1 1 100%; }
  .filters .select-wrap { flex: 1 1 calc(50% - 4px); }
  .filters .select-wrap select { width: 100%; }
  .filter-pills { width: 100%; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; }
  .filter-pills .pill-chk { flex: none; }
  .legend { display: none; }
  .radar-card, .compare-top { grid-template-columns: 1fr; }

  .table-wrap {
    background: transparent;
    border: 0;
    box-shadow: none;
    overflow: visible;
  }
  table, tbody, tr, td { display: block; width: 100%; }
  thead { display: none; }

  tbody tr.model-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas:
      "rank score cov"
      "model model model"
      "dims dims dims"
      "meta meta cmp";
    gap: 8px 10px;
    padding: 13px 14px;
    margin-bottom: 10px;
    border-radius: var(--r-md);
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
  }
  tbody tr.model-row.unranked-row { background: #FFFBEB; border-color: rgba(217, 119, 6, .25); }
  tbody td { padding: 0; border: 0; width: auto !important; min-width: 0 !important; display: block !important; }

  td.c-rank { grid-area: rank; }
  td.c-score { grid-area: score; align-self: center; }
  td.c-cov { grid-area: cov; align-self: start; text-align: right; }
  td.c-model { grid-area: model; }
  td.c-dims { grid-area: dims; }
  td.c-cost, td.c-ctx { display: inline-block !important; width: auto !important; font-size: 11.5px; color: var(--dim); align-self: center; }
  td.c-cost { grid-area: meta; }
  td.c-cost::before { content: "均价 "; color: var(--dim2); font-family: inherit; }
  body[data-track="image"] td.c-cost::before { content: "千图 "; }
  body[data-track="video"] td.c-cost::before { content: "分钟 "; }
  td.c-ctx { grid-area: meta; justify-self: end; padding-right: 4px; }
  td.c-ctx::before { content: "上下文 "; color: var(--dim2); font-family: inherit; }
  body[data-track="image"] td.c-ctx::before,
  body[data-track="video"] td.c-ctx::before { content: ""; }
  .track-bar { width: 100%; max-width: 100%; box-sizing: border-box; }
  .track-btn { flex: 1; justify-content: center; padding: 6px 4px; font-size: 12px; gap: 4px; min-width: 0; }
  .track-btn svg { display: none; }
  .track-cnt { padding: 2px 5px; font-size: 10px; }
  td.c-cmp { grid-area: cmp; text-align: right; }

  .score-bar { max-width: 145px; }
  .drawer-inner { padding: 16px 16px 64px; }
  .kv { grid-template-columns: 98px 1fr; }
  tr.unranked-head td {
    padding: 12px;
    margin: 12px 0 10px;
    border-radius: var(--r-md);
    border: 1px solid rgba(217, 119, 6, .28);
  }
}

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

/* ═════════════════════════════════════════════════════════════════════════════
   模型实测对话工坊（#playgroundModal）& API 供应商配置中心（#apiSettingsModal）
   ═════════════════════════════════════════════════════════════════════════════ */
.pg-overlay { z-index: 75; padding: 14px; }
.api-overlay { z-index: 82; padding: 14px; }

.pg-shell {
  width: min(1320px, 100%);
  height: min(90vh, 880px);
  display: flex;
  flex-direction: column;
  border-radius: var(--r-xl);
  background: var(--bg);
  border: 1px solid var(--line2);
  box-shadow: var(--shadow-float);
  overflow: hidden;
  animation: fadeSlideDown .18s ease-out;
}

.pg-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 18px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  flex: none;
}
.pg-head-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.pg-head h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 750;
  color: var(--fg);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.pg-mode-pill {
  font-size: 11px;
  font-weight: 650;
  padding: 2.5px 9px;
  border-radius: 999px;
  background: var(--c1-soft);
  color: var(--c1-text);
  border: 1px solid var(--c1-line);
}
.pg-head-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.pg-head-right .studio-btn.is-on {
  background: var(--c1-soft);
  border-color: var(--c1-line);
  color: var(--c1-text);
}

.pg-slots-strip {
  display: flex;
  align-items: stretch;
  gap: 8px;
  padding: 10px 18px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  flex: none;
  flex-wrap: wrap;
}
.pg-slots-list {
  display: flex;
  gap: 8px;
  flex: 1;
  flex-wrap: wrap;
  min-width: 0;
}
.pg-slot-pill {
  flex: 1 1 220px;
  max-width: 340px;
  padding: 7px 10px;
  border-radius: var(--r-sm);
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--slot-color, var(--c1));
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}
.pg-slot-pill.is-missing {
  border-color: var(--warn-line);
  border-left-color: var(--warn);
  background: #FFFDF7;
}
.pg-slot-top {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.pg-col-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: none;
}
.pg-slot-name {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--fg);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}
.pg-slot-rank {
  font: 700 10.5px/1 var(--mono);
  color: var(--dim2);
  background: var(--bg-soft);
  padding: 2px 5px;
  border-radius: 5px;
  flex: none;
}
.pg-slot-rm {
  border: 0;
  background: transparent;
  color: var(--dim2);
  cursor: pointer;
  padding: 0 3px;
  font-size: 12px;
  flex: none;
}
.pg-slot-rm:hover { color: var(--bad); }

.pg-slot-route {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.pg-slot-prov {
  font-size: 11px;
  padding: 2.5px 6px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--fg-2);
  max-width: 135px;
  cursor: pointer;
}
.pg-slot-needkey {
  font-size: 11px;
  font-weight: 600;
  padding: 2.5px 7px;
  border-radius: 6px;
  border: 1px solid var(--warn-line);
  background: var(--warn-bg);
  color: var(--warn);
  cursor: pointer;
  white-space: nowrap;
}
.pg-slot-needkey:hover { filter: brightness(.96); }
.pg-slot-mid {
  border: 0;
  background: transparent;
  color: var(--dim2);
  font-size: 10.5px;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  text-align: left;
  min-width: 0;
}
.pg-slot-mid:hover { background: var(--bg-soft); color: var(--c1-text); }
.pg-slot-mid-input {
  flex: 1;
  min-width: 80px;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 5px;
  border: 1px solid var(--c1);
  background: var(--surface);
  color: var(--fg);
}

.pg-add-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.pg-add-btn {
  padding: 7px 12px;
  border-radius: var(--r-sm);
  border: 1px dashed var(--c1-line);
  background: var(--surface);
  color: var(--c1-text);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  height: 100%;
}
.pg-add-btn:hover { background: var(--c1-soft); }
.pg-picker-pop {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 30;
  width: min(330px, 86vw);
  padding: 10px;
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px solid var(--line2);
  box-shadow: var(--shadow-float);
}
.pg-picker-pop input {
  width: 100%;
  padding: 7px 10px;
  border-radius: 8px;
  border: 1px solid var(--line2);
  background: var(--surface-2);
  font-size: 12.5px;
  margin-bottom: 6px;
}
.pg-picker-list {
  max-height: 260px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.pg-pick-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  text-align: left;
  padding: 7px 8px;
  border-radius: 7px;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 12px;
}
.pg-pick-item:hover { background: var(--surface-hover); }
.pg-pick-item b { font-weight: 650; color: var(--fg); }
.pg-pick-item small { display: block; font-size: 10.5px; }

.pg-params-bar {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 18px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  flex: none;
}
.pg-param-sys {
  flex: 1 1 300px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.pg-param-sys span, .pg-param-num span {
  font-size: 11px;
  font-weight: 600;
  color: var(--dim);
}
.pg-param-sys input, .pg-param-num select {
  padding: 6px 9px;
  border-radius: 8px;
  border: 1px solid var(--line2);
  background: var(--surface-2);
  font-size: 12px;
}
.pg-param-num {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pg-mobile-tabs {
  display: none;
  gap: 6px;
  padding: 8px 12px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  flex: none;
}
.pg-mtab {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  font-size: 12px;
  font-weight: 600;
  color: var(--dim);
  white-space: nowrap;
  cursor: pointer;
  flex: none;
}
.pg-mtab.active {
  background: var(--c1-soft);
  border-color: var(--c1-line);
  color: var(--c1-text);
}

.pg-arena {
  flex: 1;
  overflow-y: auto;
  padding: 18px 20px 24px;
}

.pg-empty {
  max-width: 860px;
  margin: 12px auto 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.pg-nokey-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 15px 18px;
  border-radius: var(--r-md);
  background: linear-gradient(135deg, rgba(2, 132, 199, .08), rgba(13, 148, 136, .08));
  border: 1px solid var(--c1-line);
}
.pg-nokey-icon { font-size: 24px; flex: none; }
.pg-nokey-hero > div { flex: 1 1 280px; min-width: 0; }
.pg-nokey-hero b { display: block; font-size: 14px; color: var(--fg); margin-bottom: 3px; }
.pg-nokey-hero p { margin: 0; font-size: 12px; color: var(--dim); line-height: 1.6; }

.pg-empty-head { text-align: center; }
.pg-empty-head h3 { margin: 0 0 5px; font-size: 18px; font-weight: 750; color: var(--fg); }
.pg-empty-head p { margin: 0; font-size: 13px; color: var(--dim); }

.pg-preset-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.pg-preset-card {
  text-align: left;
  padding: 13px 15px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: border-color .15s ease, transform .14s ease, box-shadow .16s ease;
}
.pg-preset-card:hover {
  border-color: var(--c1-line);
  transform: translateY(-1px);
  box-shadow: var(--shadow-card);
}
.pg-preset-tag {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 650;
  color: var(--c1-text);
  background: var(--c1-soft);
  padding: 2px 7px;
  border-radius: 999px;
  margin-bottom: 6px;
}
.pg-preset-card b { display: block; font-size: 13.5px; color: var(--fg); margin-bottom: 4px; }
.pg-preset-card p { margin: 0; font-size: 12px; color: var(--dim); line-height: 1.55; }

.pg-turns {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.pg-turn-single {
  max-width: 840px;
  width: 100%;
  margin: 0 auto;
}
.pg-user-row {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 12px;
}
.pg-user-bubble {
  max-width: min(760px, 92%);
  padding: 10px 14px;
  border-radius: 14px 14px 4px 14px;
  background: linear-gradient(135deg, #0F172A, #1E293B);
  color: #F8FAFC;
  font-size: 13.5px;
  line-height: 1.65;
  box-shadow: var(--shadow-sm);
}
.pg-turn-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 650;
  color: #38BDF8;
  margin-bottom: 3px;
  letter-spacing: .04em;
}
.pg-user-text { word-break: break-word; }

.pg-grid {
  display: grid;
  gap: 12px;
  align-items: start;
}
.pg-grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pg-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pg-grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1180px) {
  .pg-grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .pg-grid.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.pg-ans-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 3px solid var(--slot-color, var(--c1));
  border-radius: var(--r-md);
  padding: 13px 15px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.pg-ans-card.is-winner {
  border-color: var(--ok-line);
  box-shadow: 0 0 0 1px var(--ok-line), var(--shadow-card);
}
.pg-ans-head {
  display: flex;
  align-items: center;
  gap: 7px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  min-width: 0;
}
.pg-ans-head b {
  font-size: 13px;
  color: var(--fg);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pg-ans-rank {
  margin-left: auto;
  font: 700 11px/1 var(--mono);
  color: var(--dim2);
  background: var(--bg-soft);
  padding: 2.5px 6px;
  border-radius: 5px;
  flex: none;
}
.pg-ans-prov {
  margin-left: auto;
  font-size: 11px;
  color: var(--dim2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pg-ans-prov code {
  font-family: var(--mono);
  font-size: 10.5px;
  background: var(--bg-soft);
  padding: 1px 5px;
  border-radius: 4px;
}

.pg-think {
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface-2);
  padding: 7px 10px;
  font-size: 12px;
}
.pg-think summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--dim);
  user-select: none;
}
.pg-think-body {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--line2);
  color: var(--dim);
  font-size: 12px;
  line-height: 1.65;
  max-height: 240px;
  overflow-y: auto;
}

.pg-md {
  font-size: 13.5px;
  line-height: 1.72;
  color: var(--fg-2);
  word-break: break-word;
  overflow-wrap: anywhere;
}
.pg-md .pg-p { margin: 0 0 8px; }
.pg-md .pg-p:last-child { margin-bottom: 0; }
.pg-md .pg-h { margin: 12px 0 6px; font-size: 14px; font-weight: 750; color: var(--fg); }
.pg-md .pg-list { margin: 4px 0 9px; padding-left: 20px; }
.pg-md .pg-list li { margin-bottom: 3px; }
.pg-md .pg-hr { border: 0; border-top: 1px solid var(--line); margin: 10px 0; }
.pg-md .pg-quote {
  margin: 6px 0 9px;
  padding: 6px 10px;
  border-left: 3px solid var(--c1);
  background: var(--c1-soft);
  border-radius: 0 6px 6px 0;
  color: var(--dim);
  font-size: 12.5px;
}
.pg-md .pg-inline-code {
  font-family: var(--mono);
  font-size: 12px;
  background: var(--bg-soft);
  color: var(--c1-text);
  padding: 1px 5px;
  border-radius: 4px;
  border: 1px solid var(--line);
}
.pg-code-block {
  margin: 8px 0;
  border-radius: var(--r-sm);
  overflow: hidden;
  background: #0F172A;
  color: #E2E8F0;
  border: 1px solid rgba(15, 23, 42, .25);
}
.pg-code-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 10px;
  background: #1E293B;
  font: 600 11px/1 var(--mono);
  color: #94A3B8;
}
.pg-code-copy {
  border: 1px solid rgba(148, 163, 184, .3);
  background: transparent;
  color: #E2E8F0;
  border-radius: 5px;
  padding: 2px 7px;
  font-size: 11px;
  cursor: pointer;
}
.pg-code-copy:hover { background: rgba(255, 255, 255, .1); }
.pg-code-block pre {
  margin: 0;
  padding: 10px 12px;
  overflow-x: auto;
  font: 12px/1.55 var(--mono);
}
.pg-table-wrap { overflow-x: auto; margin: 8px 0; }
.pg-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  border: 1px solid var(--line);
}
.pg-table th, .pg-table td {
  padding: 6px 9px;
  border: 1px solid var(--line);
  text-align: left;
}
.pg-table th { background: var(--surface-2); font-weight: 650; }

.pg-cursor {
  display: inline-block;
  width: 7px;
  height: 15px;
  margin-left: 3px;
  vertical-align: -2px;
  background: var(--c1);
  border-radius: 2px;
  animation: pgBlink .9s steps(1) infinite;
}
@keyframes pgBlink { 50% { opacity: 0; } }

.pg-waiting {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--dim);
  font-size: 12.5px;
  padding: 8px 0;
}
.pg-spin {
  width: 14px;
  height: 14px;
  border: 2px solid var(--c1-line);
  border-top-color: var(--c1);
  border-radius: 50%;
  animation: pgSpin .7s linear infinite;
}
@keyframes pgSpin { to { transform: rotate(360deg); } }

.pg-unconf-box {
  padding: 12px;
  border-radius: var(--r-sm);
  background: var(--warn-bg);
  border: 1px solid var(--warn-line);
  color: #78350F;
  font-size: 12px;
  line-height: 1.6;
}
.pg-unconf-box p { margin: 0 0 8px; }
.pg-err-box {
  padding: 10px 12px;
  border-radius: var(--r-sm);
  background: var(--bad-bg);
  border: 1px solid var(--bad-line);
  color: var(--bad);
  font-size: 12px;
  line-height: 1.6;
  word-break: break-word;
}
.pg-idle-hint { font-size: 12px; color: var(--dim2); }

.pg-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  margin-top: auto;
}
.pg-metrics {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 10.5px;
  color: var(--dim2);
}
.pg-metrics span {
  background: var(--surface-2);
  border: 1px solid var(--line);
  padding: 1.5px 6px;
  border-radius: 5px;
}
.pg-metrics .pg-metric-cost { color: var(--ok); border-color: var(--ok-line); background: var(--ok-bg); }
.pg-metrics .pg-metric-via { color: var(--c1-text); border-color: var(--c1-line); background: var(--c1-soft); }

.pg-card-actions { display: flex; gap: 5px; flex-wrap: wrap; }
.pg-mini-btn {
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--dim);
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}
.pg-mini-btn:hover { border-color: var(--c1-line); color: var(--c1-text); background: var(--c1-soft); }
.pg-vote-btn.active {
  border-color: var(--ok-line);
  background: var(--ok-bg);
  color: var(--ok);
}

.pg-composer {
  padding: 12px 18px 13px;
  background: var(--surface);
  border-top: 1px solid var(--line);
  flex: none;
}
.pg-input-wrap {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding: 8px 10px 8px 14px;
  border-radius: var(--r-md);
  border: 1px solid var(--line2);
  background: var(--surface-2);
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.pg-input-wrap:focus-within {
  border-color: var(--c1);
  background: var(--surface);
  box-shadow: 0 0 0 3px var(--c1-soft);
}
.pg-input-wrap textarea {
  flex: 1;
  border: 0;
  outline: none;
  background: transparent;
  resize: none;
  font: 14px/1.55 inherit;
  color: var(--fg);
  min-height: 24px;
  max-height: 160px;
  padding: 3px 0;
}
.pg-stop-btn {
  padding: 7px 14px;
  border-radius: 9px;
  border: 1px solid var(--bad-line);
  background: var(--bad);
  color: #fff;
  font-weight: 650;
  font-size: 12.5px;
  cursor: pointer;
  white-space: nowrap;
}
.pg-composer-foot {
  margin-top: 6px;
  font-size: 11px;
  color: var(--dim2);
  text-align: center;
}

/* ── API 供应商配置中心 ── */
.api-card { width: min(960px, 100%); max-height: 88vh; }
.api-modal-body { padding: 16px 20px 20px; }

.api-privacy-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 11px 14px;
  border-radius: var(--r-md);
  background: linear-gradient(135deg, rgba(16, 185, 129, .08), rgba(2, 132, 199, .06));
  border: 1px solid rgba(5, 150, 105, .24);
  margin-bottom: 14px;
}
.api-privacy-left {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: #065F46;
  flex: 1 1 320px;
}
.api-privacy-left svg { flex: none; margin-top: 2px; color: var(--ok); }
.api-privacy-left b { display: block; font-size: 12.5px; color: #064E3B; }
.api-privacy-left span { font-size: 11.5px; color: #047857; line-height: 1.5; }
.api-privacy-left code {
  font-family: var(--mono);
  background: rgba(255, 255, 255, .75);
  padding: 0 5px;
  border-radius: 4px;
}
.api-privacy-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.api-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--fg-2);
  cursor: pointer;
}
.api-clear-all { color: var(--bad); border-color: var(--bad-line); }
.api-clear-all:hover { background: var(--bad-bg); }

.api-layout {
  display: grid;
  grid-template-columns: 245px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.api-sidebar {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface-2);
  padding: 10px 8px;
  max-height: 54vh;
  overflow-y: auto;
}
.api-nav-group { margin-bottom: 10px; }
.api-nav-group:last-child { margin-bottom: 0; }
.api-nav-label {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--dim2);
  padding: 4px 8px;
  letter-spacing: .03em;
}
.api-nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
  border-radius: 8px;
  border: 0;
  background: transparent;
  text-align: left;
  font-size: 12.5px;
  font-weight: 550;
  color: var(--fg-2);
  cursor: pointer;
  transition: background .12s ease, color .12s ease;
}
.api-nav-item:hover { background: rgba(15, 23, 42, .04); }
.api-nav-item.active {
  background: var(--surface);
  color: var(--c1-text);
  font-weight: 700;
  box-shadow: var(--shadow-sm), inset 2px 0 0 var(--c1);
}
.api-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #CBD5E1;
  flex: none;
}
.api-dot.on { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-bg); }
.api-nav-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.api-nav-tag {
  font-size: 10px;
  font-weight: 700;
  padding: 1.5px 6px;
  border-radius: 999px;
  background: var(--c1-soft);
  color: var(--c1-text);
  flex: none;
}
.api-nav-tag.ok { background: var(--ok-bg); color: var(--ok); }
.api-add-custom {
  width: 100%;
  margin-top: 6px;
  padding: 7px 9px;
  border-radius: 8px;
  border: 1px dashed var(--c1-line);
  background: var(--surface);
  color: var(--c1-text);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.api-add-custom:hover { background: var(--c1-soft); }

.api-detail {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  padding: 16px 18px;
}
.api-detail-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.api-detail-head > div:first-child { flex: 1 1 260px; min-width: 0; }
.api-detail-head h3 { margin: 0 0 3px; font-size: 16px; color: var(--fg); }
.api-detail-note { margin: 0; font-size: 12px; color: var(--dim); line-height: 1.55; }
.api-detail-links { display: flex; gap: 8px; align-items: center; }
.api-key-link {
  font-size: 12px;
  font-weight: 650;
  color: var(--c1-text);
  text-decoration: none;
  padding: 5px 10px;
  border-radius: 8px;
  background: var(--c1-soft);
  border: 1px solid var(--c1-line);
  white-space: nowrap;
}
.api-key-link:hover { filter: brightness(.96); }
.api-del-custom { color: var(--bad); border-color: var(--bad-line); }

.api-form { display: flex; flex-direction: column; gap: 12px; }
.api-form-row { display: flex; gap: 10px; flex-wrap: wrap; }
.api-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 0 0 auto;
}
.api-form-row > .api-field { flex: 1 1 200px; }
.api-form-row > .api-field-grow { flex: 2 1 280px; }
.api-field-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.api-field > span, .api-field-head > span { font-size: 12px; font-weight: 650; color: var(--fg-2); }
.api-field input, .api-field select, .api-overrides {
  width: 100%;
  padding: 8px 11px;
  border-radius: 9px;
  border: 1px solid var(--line2);
  background: var(--surface-2);
  font-size: 12.5px;
  color: var(--fg);
}
.api-field input:focus, .api-field select:focus, .api-overrides:focus {
  border-color: var(--c1);
  background: var(--surface);
  box-shadow: 0 0 0 3px var(--c1-soft);
  outline: none;
}
.api-inline-reset {
  border: 0;
  background: transparent;
  color: var(--c1-text);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}
.api-inline-reset:hover { text-decoration: underline; }

.api-toggles {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.api-chk {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  color: var(--fg-2);
  cursor: pointer;
}
.api-chk code { font-family: var(--mono); font-size: 11.5px; color: var(--c1-text); }

.api-adv-toggle {
  border: 0;
  background: transparent;
  color: var(--dim);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 2px 0;
  text-align: left;
}
.api-adv-toggle:hover { color: var(--c1-text); }
.api-overrides { margin-top: 6px; resize: vertical; line-height: 1.5; }

.api-ping-res {
  padding: 9px 12px;
  border-radius: var(--r-sm);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
}
.api-ping-res.is-testing { background: var(--c1-soft); color: var(--c1-text); border: 1px solid var(--c1-line); }
.api-ping-res.is-ok { background: var(--ok-bg); color: var(--ok); border: 1px solid var(--ok-line); }
.api-ping-res.is-err { background: var(--bad-bg); color: var(--bad); border: 1px solid var(--bad-line); }

.api-detail-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

/* ── 顶栏语言切换器（自动跟随系统 + 五语种菜单） ── */
.lang-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--line2);
  background: var(--surface);
  color: var(--fg-2);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
  transition: border-color .15s ease, color .15s ease, background .15s ease;
}
.lang-btn:hover,
.lang-btn[aria-expanded="true"] {
  border-color: var(--c1-line);
  color: var(--c1-text);
  background: var(--c1-soft);
}
.lang-caret {
  opacity: .65;
  transition: transform .15s ease;
}
.lang-btn[aria-expanded="true"] .lang-caret {
  transform: rotate(180deg);
}
.lang-menu {
  position: absolute;
  top: calc(100% + 7px);
  right: 0;
  min-width: 196px;
  padding: 6px;
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px solid var(--line2);
  box-shadow: var(--shadow-float);
  z-index: 60;
}
.lang-menu-head {
  padding: 5px 10px 4px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--dim2);
}
.lang-opt {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--fg-2);
  font-size: 12.5px;
  font-weight: 550;
  cursor: pointer;
  text-align: left;
  transition: background .12s ease, color .12s ease;
}
.lang-opt:hover {
  background: var(--surface-2);
  color: var(--fg);
}
.lang-opt.active {
  background: var(--c1-soft);
  color: var(--c1-text);
  font-weight: 700;
}
.lang-opt-main {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.lang-sys-tag {
  font-size: 10.5px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(15, 23, 42, .06);
  color: var(--dim);
}
.lang-opt.active .lang-sys-tag {
  background: rgba(2, 132, 199, .14);
  color: var(--c1-text);
}
.lang-check {
  font-size: 12px;
  font-weight: 800;
  color: var(--c1);
  flex: none;
}
.lang-divider {
  height: 1px;
  background: var(--line);
  margin: 4px 6px;
}

/* 英文两字母维度缩写微调，保持等宽居中不拥挤 */
html[data-lang="en"] .dim-labels span {
  font-size: 8.5px;
  letter-spacing: -.03em;
  font-weight: 700;
}

@media (max-width: 760px) {
  .top-right { gap: 6px; }
  .lang-btn { padding: 6px 8px; font-size: 11.5px; }
  .lang-menu { right: 0; min-width: 186px; }
  .api-pill-btn { padding: 6px 9px; font-size: 11.5px; }
  .api-pill-btn .api-btn-label { display: none; }
  .row-test-btn { opacity: 1; padding: 2px 7px; font-size: 10.5px; }
  .pg-overlay, .api-overlay { padding: 0; }
  .pg-shell, .api-card {
    width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
    border: 0;
  }
  .pg-head { padding: 9px 12px; flex-wrap: wrap; gap: 7px 8px; }
  .pg-head-left { flex: 1 1 auto; }
  .pg-head h2 { font-size: 14.5px; white-space: nowrap; flex-wrap: nowrap; }
  .pg-mode-pill { font-size: 10px; padding: 2px 7px; white-space: nowrap; }
  .pg-head-right { width: 100%; justify-content: flex-end; gap: 6px; }
  .pg-head-right .studio-btn { padding: 5px 9px; font-size: 11.5px; }
  .pg-head-right .api-pill-btn .api-btn-label { display: inline; }
  .pg-slots-strip { padding: 7px 12px; flex-wrap: nowrap; overflow-x: auto; align-items: stretch; }
  .pg-slots-list { flex-wrap: nowrap; flex: none; }
  .pg-slot-pill { flex: 0 0 210px; max-width: 210px; }
  .pg-add-wrap { flex: none; }
  .pg-add-btn { padding: 6px 10px; font-size: 11.5px; }
  .pg-mobile-tabs { display: flex; }
  .pg-grid.cols-2, .pg-grid.cols-3, .pg-grid.cols-4 { grid-template-columns: 1fr; }
  .pg-mobile-hide { display: none !important; }
  .pg-preset-grid { grid-template-columns: 1fr; }
  .pg-arena { padding: 12px; }
  .pg-composer { padding: 9px 12px 10px; }
  .pg-input-wrap { padding: 7px 8px 7px 11px; gap: 7px; align-items: center; }
  .pg-input-wrap textarea { font-size: 13.5px; line-height: 1.45; min-height: 24px; padding: 2px 0; }
  .pg-send-btn { padding: 7px 11px; font-size: 12px; }
  .api-layout { grid-template-columns: 1fr; }
  .api-sidebar { max-height: 190px; }
  .compare-tray { padding: 8px 10px; }
  .compare-tray-actions { width: 100%; justify-content: flex-end; }
}
