:root {
  /* 专业金融风：中性浅灰底 + 藏蓝主色，克制、沉稳、高信息密度 */
  --bg: #eef1f5;
  --bg-2: #f5f7fa;
  --card: #ffffff;
  --card-2: #f0f3f7;
  --line: #dbe1ea;
  --line-2: #c6d1e0;
  --text: #141a24;
  --text-2: #4a5568;
  --text-3: #7b8698;

  --brand: #1b4d8f;
  --brand-2: #2b6cb0;
  --brand-dim: rgba(27, 77, 143, .08);
  --brand-line: rgba(27, 77, 143, .3);

  --gold: #a9741f;
  --gold-dim: rgba(169, 116, 31, .1);

  --up: #d6402f;
  --down: #0e9361;

  --shadow-sm: 0 1px 2px rgba(20, 30, 50, .05);
  --shadow: 0 1px 2px rgba(20, 30, 50, .06), 0 4px 14px -6px rgba(20, 30, 50, .1);
  --radius: 8px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background:
    var(--bg);
  color: var(--text);
  font-family: "PingFang SC", "Microsoft YaHei", -apple-system, "Segoe UI", sans-serif;
  font-size: 14px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

/* ---------- 顶栏 ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 26px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(160%) blur(14px);
  position: sticky; top: 0; z-index: 20;
  box-shadow: 0 1px 0 rgba(16, 32, 56, .02);
}
.brand { display: flex; align-items: center; gap: 14px; }
.logo {
  width: 46px; height: 46px; border-radius: 13px;
  background: linear-gradient(135deg, #1f5ba3, #123a6d);
  color: #fff; font-weight: 800; font-size: 23px;
  display: grid; place-items: center;
  box-shadow: 0 6px 16px -4px rgba(27, 77, 143, .45);
}
.brand h1 { font-size: 21px; font-weight: 700; letter-spacing: .3px; color: var(--text); }
.brand p { font-size: 12.5px; color: var(--text-3); margin-top: 3px; }

.topbar-right { display: flex; align-items: center; gap: 18px; }
.live { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--text-2); }
.live i {
  width: 7px; height: 7px; border-radius: 50%; background: var(--down);
  box-shadow: 0 0 0 0 rgba(15, 157, 104, .5);
  animation: pulse 2s infinite;
}
.live.err i { background: var(--up); animation: none; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(14, 147, 97, .45); }
  70% { box-shadow: 0 0 0 7px rgba(15, 157, 104, 0); }
  100% { box-shadow: 0 0 0 0 rgba(15, 157, 104, 0); }
}
/* ---------- 行情心跳（每 3 秒）---------- */
.live.pulse i { animation: liveTick .5s ease-out; }
@keyframes liveTick {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(14, 147, 97, .55); }
  45% { transform: scale(1.6); }
  100% { transform: scale(1); box-shadow: 0 0 0 6px rgba(14, 147, 97, 0); }
}
@keyframes tkUp { 0% { background: rgba(214, 64, 47, .32); } 100% { background: transparent; } }
@keyframes tkDn { 0% { background: rgba(14, 147, 97, .32); } 100% { background: transparent; } }
.tk-up { animation: tkUp .8s ease-out; border-radius: 4px; }
.tk-dn { animation: tkDn .8s ease-out; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) {
  .live.pulse i, .tk-up, .tk-dn { animation: none; }
}

.fx { font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; }

/* ---------- 主导航 ---------- */
.topnav {
  display: flex; gap: 4px; background: var(--card-2);
  border: 1px solid var(--line); border-radius: 12px; padding: 4px;
}
.topnav button {
  padding: 9px 24px; border-radius: 8px; border: none; background: transparent;
  color: var(--text-2); font-size: 15.5px; cursor: pointer; font-family: inherit;
  transition: .16s; font-weight: 500;
}
.topnav button:hover { color: var(--text); }
.topnav button.active {
  background: var(--card); color: var(--brand);
  font-weight: 500; box-shadow: var(--shadow-sm);
}

/* ---------- 布局 ---------- */
.layout { display: flex; flex: 1; min-height: 0; }

.sidebar {
  width: 262px; flex-shrink: 0;
  border-right: 1px solid var(--line);
  padding: 16px 12px;
  display: flex; flex-direction: column;
  background: #fbfcfe;
}
.side-title {
  font-size: 11px; letter-spacing: 2px; color: var(--text-3);
  padding: 0 8px 10px; text-transform: uppercase;
}
.side-title span { color: var(--brand); }
.pair-list { list-style: none; overflow-y: auto; flex: 1; }
.pair-list li {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 10px; border-radius: 9px; cursor: pointer;
  margin-bottom: 3px; transition: background .15s;
  border: 1px solid transparent;
}
.pair-list li:hover { background: var(--card-2); }
.pair-list li.active {
  background: var(--brand-dim);
  border-color: var(--brand-line);
}
.pair-name { display: flex; align-items: center; gap: 8px; }
.pair-name b { font-weight: 500; font-size: 13.5px; color: var(--text); }
.pair-name small { color: var(--text-3); font-size: 10px; letter-spacing: .5px; }
.pair-quote { text-align: right; font-variant-numeric: tabular-nums; }
.pair-quote .p { font-size: 13px; color: var(--text); }
.pair-quote .c { font-size: 11px; }
.tag-no {
  font-size: 9px; color: var(--text-3); border: 1px solid var(--line);
  padding: 1px 4px; border-radius: 3px;
}
.side-note {
  border-top: 1px solid var(--line); padding: 10px 8px 0; margin-top: 8px;
  font-size: 10.5px; color: var(--text-3); line-height: 1.75;
}

.main { flex: 1; padding: 18px 24px 40px; overflow-y: auto; min-width: 0; }

/* ---------- 概览卡 ---------- */
.summary {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
  margin-bottom: 16px;
}
.sum-item {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px 16px;
  display: flex; flex-direction: column; gap: 6px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .18s, transform .18s;
}
.sum-item:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.sum-item label { font-size: 11px; color: var(--text-3); letter-spacing: .3px; }
.sum-item strong {
  font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums;
  letter-spacing: -.4px; color: var(--text);
}
.sum-item .hint { font-size: 10.5px; color: var(--text-3); }
.chg { font-size: 12.5px; font-variant-numeric: tabular-nums; }
.up { color: var(--up); }
.down { color: var(--down); }
.flat { color: var(--text-2); }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }
.tabs button {
  padding: 8px 18px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--card);
  color: var(--text-2); font-size: 13px; cursor: pointer; transition: .16s;
  font-family: inherit; box-shadow: var(--shadow-sm);
}
.tabs button:hover { color: var(--text); border-color: var(--line-2); }
.tabs button.active {
  background: var(--brand); border-color: var(--brand);
  color: #fff; box-shadow: 0 6px 14px -6px rgba(27, 77, 143, .5);
}

/* ---------- 面板 ---------- */
.panel {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px 20px;
  box-shadow: var(--shadow);
}
.panel.hidden { display: none; }
.panel-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px; gap: 12px; flex-wrap: wrap;
}
.panel-head h2 { font-size: 14px; font-weight: 600; color: var(--text); }
.range { display: flex; gap: 4px; }
.range button {
  padding: 4px 11px; font-size: 11.5px; border-radius: 6px;
  border: 1px solid var(--line); background: var(--card);
  color: var(--text-3); cursor: pointer; font-family: inherit;
}
.range button.active { color: #fff; border-color: var(--brand); background: var(--brand); }

.chart { width: 100%; height: 430px; }
.chart-tip { font-size: 11px; color: var(--text-3); margin-top: 8px; }

/* ---------- 表格 ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { padding: 11px 12px; text-align: right; border-bottom: 1px solid var(--line); font-size: 13px; }
th {
  text-align: right; font-size: 11px; font-weight: 500;
  color: var(--text-3); letter-spacing: .3px;
  background: var(--bg-2); border-bottom-color: var(--line);
}
th:first-child, td:first-child { text-align: left; }
td.mono { font-family: "JetBrains Mono", Consolas, monospace; font-size: 12.5px; }
tr:last-child td { border-bottom: none; }

.formula {
  margin-top: 16px; padding: 14px 16px;
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: 10px; font-size: 12px; color: var(--text-2); line-height: 1.9;
}
.formula code {
  color: var(--brand); background: var(--brand-dim);
  padding: 2px 6px; border-radius: 4px; font-size: 11.5px;
}

/* ---------- AI 简报 ---------- */
.badge {
  font-size: 10px; padding: 3px 8px; border-radius: 20px;
  background: rgba(27, 77, 143, .08); color: var(--brand-2);
  border: 1px solid rgba(27, 77, 143, .25); letter-spacing: .3px;
}
.ai-box {
  min-height: 260px; padding: 6px 2px; font-size: 13.5px; line-height: 2;
  color: var(--text-2);
}
.ai-box h3 {
  font-size: 13px; color: var(--brand); margin: 18px 0 8px;
  font-weight: 600; letter-spacing: .3px;
}
.ai-box h3:first-child { margin-top: 0; }
.ai-box p { margin-bottom: 4px; }
.ai-box b { color: var(--text); font-weight: 600; }
.ai-box .up { color: var(--up); }
.ai-box .down { color: var(--down); }
.ai-empty { color: var(--text-3); }
.ai-actions { display: flex; align-items: center; gap: 14px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.btn-ghost {
  padding: 6px 14px; border-radius: 8px; font-size: 12.5px;
  border: 1px solid var(--line); background: var(--card);
  color: var(--text-2); cursor: pointer; font-family: inherit; transition: .16s;
  box-shadow: var(--shadow-sm);
}
.btn-ghost:hover { color: var(--brand); border-color: var(--brand-line); background: var(--brand-dim); }

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--line); padding: 18px 26px 26px;
  font-size: 11px; color: var(--text-3); line-height: 1.9;
  background: rgba(255, 255, 255, .88);
}
.footer strong { color: var(--text-2); }
.footer .sign { color: var(--text-3); margin-top: 6px; letter-spacing: 1px; }

/* ---------- 品种筛选 ---------- */
.side-search { padding: 0 4px 10px; }
.side-search input {
  width: 100%; padding: 8px 11px; border-radius: 9px;
  border: 1px solid var(--line); background: var(--card);
  color: var(--text); font-size: 12.5px; outline: none;
  font-family: inherit; transition: .16s;
}
.side-search input::placeholder { color: var(--text-3); }
.side-search input:focus { border-color: var(--brand-line); box-shadow: 0 0 0 3px var(--brand-dim); }

.side-chips { display: flex; flex-wrap: wrap; gap: 5px; padding: 0 4px 10px; }
.chip {
  padding: 3px 9px; border-radius: 20px; font-size: 11px; cursor: pointer;
  border: 1px solid var(--line); background: var(--card); color: var(--text-3);
  transition: .15s; white-space: nowrap; font-family: inherit;
}
.chip:hover { color: var(--text-2); border-color: var(--line-2); }
.chip.active { color: #fff; border-color: var(--brand); background: var(--brand); }

/* 分组标题 */
.pair-list .group-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 10px 6px; cursor: pointer; border: none;
  margin-bottom: 0; background: transparent;
}
.pair-list .group-head:hover { background: transparent; }
.gh-name {
  font-size: 10.5px; letter-spacing: 1.2px; color: var(--text-3);
  display: flex; align-items: center; gap: 6px;
}
.gh-name i { font-style: normal; color: var(--text-3); font-size: 10px; }
.gh-avg { font-size: 10.5px; font-variant-numeric: tabular-nums; }

.pair-list li { padding: 7px 10px; margin-bottom: 2px; }
.pair-name b { font-size: 13px; }
.pair-quote .p { font-size: 12.5px; }
.pair-quote .c { font-size: 10.5px; }
.pair-list li.dead { opacity: .45; }

.tag-ovs, .tag-idx, .tag-ref {
  font-size: 9px; padding: 1px 4px; border-radius: 3px; letter-spacing: .3px;
}
.tag-ovs { color: var(--brand-2); border: 1px solid rgba(27, 77, 143, .25); background: rgba(27, 77, 143, .05); }
.tag-idx { color: #7c5cd6; border: 1px solid rgba(124, 92, 214, .26); background: rgba(124, 92, 214, .06); }
.tag-ref { color: var(--gold); border: 1px solid rgba(192, 131, 39, .28); background: var(--gold-dim); }
.empty-tip { color: var(--text-3); font-size: 12px; padding: 16px 10px; display: block; }

/* ---------- 全市场概览条 ---------- */
.market-strip {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 11px 16px; margin-bottom: 14px; flex-wrap: wrap;
  box-shadow: var(--shadow-sm);
}
.ms-count { font-size: 12.5px; color: var(--text-2); }
.ms-count b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.ms-count b.up { color: var(--up); }
.ms-count b.down { color: var(--down); }
.ms-count span {
  margin-left: 10px; font-size: 11px; color: var(--brand);
  background: var(--brand-dim); border: 1px solid var(--brand-line);
  padding: 1px 8px; border-radius: 20px;
}
.ms-sectors { display: flex; gap: 6px; flex-wrap: wrap; }
.heat {
  font-size: 11px; padding: 2px 8px; border-radius: 20px;
  background: var(--bg-2); border: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
}
.heat.up { color: var(--up); border-color: rgba(214, 64, 47, .22); background: rgba(214, 64, 47, .05); }
.heat.down { color: var(--down); border-color: rgba(14, 147, 97, .22); background: rgba(14, 147, 97, .05); }
.heat.flat { color: var(--text-2); }

.chart-empty {
  display: grid; place-items: center; height: 100%;
  color: var(--text-3); font-size: 13px; text-align: center; line-height: 2;
}
.chart-empty span { font-size: 11.5px; }
td.dim { color: var(--text-3); font-size: 12px; text-align: left; }
.dim { color: var(--text-3); }

/* ---------- 方向观点卡 ---------- */
.outlook {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; background: var(--bg-2);
}
.outlook.up { border-color: rgba(214, 64, 47, .22); background: rgba(224, 72, 62, .035); }
.outlook.down { border-color: rgba(14, 147, 97, .22); background: rgba(15, 157, 104, .035); }

.oc-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.oc-kind {
  font-size: 10px; letter-spacing: 1.2px; color: var(--text-3);
  border: 1px solid var(--line); background: var(--card);
  padding: 2px 8px; border-radius: 20px;
}
.oc-label { font-size: 26px; font-weight: 700; letter-spacing: .5px; color: var(--text-2); }
.outlook.up .oc-label { color: var(--up); }
.outlook.down .oc-label { color: var(--down); }
.oc-score {
  font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums;
  padding: 2px 10px; border-radius: 8px; background: var(--card);
  border: 1px solid var(--line);
}
.oc-meta { font-size: 11px; color: var(--text-3); margin-left: auto; }
.oc-sum { font-size: 13px; line-height: 1.95; color: var(--text-2); margin-bottom: 12px; }

.oc-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.oc-table th {
  font-size: 10.5px; color: var(--text-3); text-align: left;
  padding: 6px 8px; border-bottom: 1px solid var(--line); letter-spacing: .3px;
  background: transparent;
}
.oc-table th:last-child, .oc-table td:last-child { text-align: right; width: 56px; }
.oc-table td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.oc-table tr:last-child td { border-bottom: none; }
.f-name { color: var(--text); width: 74px; white-space: nowrap; font-weight: 500; }
.f-read { color: var(--text-2); font-variant-numeric: tabular-nums; line-height: 1.7; text-align: left; }
.f-note { display: block; color: var(--text-3); font-size: 11px; margin-top: 2px; }
.f-score { font-variant-numeric: tabular-nums; font-weight: 600; }

.oc-warn { font-size: 11.5px; color: var(--text-3); line-height: 1.85; margin-top: 9px; }
.oc-warn b { color: var(--text-2); font-weight: 500; }
.dim-note { font-size: 12px; color: var(--text-3); }
.warn-note { color: var(--gold); }
.ai-disclaim {
  color: var(--text-3); font-size: 11px; line-height: 1.85;
  margin-top: 16px; border-top: 1px solid var(--line); padding-top: 12px;
}

.hidden { display: none !important; }

/* ---------- 资讯中心 ---------- */
.news-view { flex: 1; padding: 18px 24px 40px; min-width: 0; }

.news-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.nt-tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.nt-tabs button {
  padding: 6px 14px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--card); color: var(--text-3); font-size: 12.5px;
  cursor: pointer; font-family: inherit; transition: .15s;
}
.nt-tabs button:hover { color: var(--text-2); border-color: var(--line-2); }
.nt-tabs button.active { color: #fff; border-color: var(--brand); background: var(--brand); }
#newsVariety, #newsSearch {
  padding: 7px 11px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--card); color: var(--text); font-size: 12.5px; outline: none; font-family: inherit;
  transition: .16s;
}
#newsSearch { width: 180px; }
#newsSearch::placeholder { color: var(--text-3); }
#newsVariety:focus, #newsSearch:focus { border-color: var(--brand-line); box-shadow: 0 0 0 3px var(--brand-dim); }
.nt-count { margin-left: auto; font-size: 11.5px; color: var(--text-3); }

.news-body { display: flex; gap: 16px; align-items: flex-start; }
.news-side {
  width: 272px; flex-shrink: 0; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px;
  position: sticky; top: 14px; box-shadow: var(--shadow-sm);
}
.news-side h3 { font-size: 11px; letter-spacing: 1.2px; color: var(--text-3); margin-bottom: 10px; }
.side-divider { height: 1px; background: var(--line); margin: 14px 0; }
.side-tip { font-size: 11px; color: var(--text-3); line-height: 1.85; margin-top: 8px; }

.op-summary { display: flex; flex-direction: column; gap: 9px; }
.op-row { cursor: pointer; }
.op-name { font-size: 12px; color: var(--text-2); display: flex; justify-content: space-between; margin-bottom: 4px; }
.op-name i { font-style: normal; color: var(--text-3); font-size: 10px; }
.op-bar { display: flex; height: 5px; border-radius: 3px; overflow: hidden; background: var(--bg-2); }
.ob-bull { background: var(--up); }
.ob-range { background: #c9d2dd; }
.ob-bear { background: var(--down); }
.op-num { font-size: 10.5px; color: var(--text-3); text-align: right; margin-top: 3px; font-variant-numeric: tabular-nums; }

.src-list { list-style: none; font-size: 11.5px; color: var(--text-3); line-height: 2; }
.src-list b { color: var(--text-2); font-weight: 500; margin-right: 6px; }

.news-feed { flex: 1; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.news-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px 17px; transition: .18s;
  box-shadow: var(--shadow-sm);
}
.news-card:hover { border-color: var(--line-2); box-shadow: var(--shadow); }
.news-card.is-opinion { border-left: 3px solid var(--brand); }
.news-feed.compact .news-card { background: var(--bg-2); box-shadow: none; }

.nc-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }
.nc-kind { font-size: 10px; padding: 1px 7px; border-radius: 20px; letter-spacing: .2px; }
.k-flash { color: var(--brand-2); border: 1px solid rgba(27, 77, 143, .25); background: rgba(27, 77, 143, .05); }
.k-media { color: var(--brand); border: 1px solid var(--brand-line); background: var(--brand-dim); }
.k-op { color: var(--brand); border: 1px solid var(--brand-line); background: var(--brand-dim); }
.nc-source { font-size: 11.5px; color: var(--text-2); }
.senti { font-size: 10px; padding: 0 6px; border-radius: 20px; border: 1px solid currentColor; }
.senti.up { color: var(--up); }
.senti.down { color: var(--down); }
.senti.flat { color: var(--text-3); }
.nc-time { margin-left: auto; font-size: 11px; color: var(--text-3); font-variant-numeric: tabular-nums; }

.nc-title { font-size: 14px; font-weight: 600; line-height: 1.6; color: var(--text); margin-bottom: 6px; }
.nc-sum { font-size: 12.5px; color: var(--text-2); line-height: 1.88; }
.nc-points { margin: 9px 0 0 18px; font-size: 12.5px; color: var(--text-2); line-height: 1.95; }
.nc-points li { list-style: disc; }
.nc-target { margin-top: 9px; font-size: 12.5px; color: var(--gold); }
.nc-foot { display: flex; align-items: center; gap: 10px; margin-top: 9px; font-size: 11px; color: var(--text-3); flex-wrap: wrap; }
.nc-link { color: var(--text-3); text-decoration: none; border-bottom: 1px dashed var(--line-2); }
.nc-link:hover { color: var(--brand); border-color: var(--brand-line); }
.nc-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.vtag {
  font-size: 11px; padding: 1px 9px; border-radius: 20px;
  border: 1px solid var(--line); background: var(--bg-2);
  color: var(--text-2); cursor: pointer; transition: .15s;
}
.vtag:hover { color: var(--brand); border-color: var(--brand-line); background: var(--brand-dim); }
.demo-tag {
  color: #7c5cd6; border: 1px solid rgba(124, 92, 214, .26); background: rgba(124, 92, 214, .06);
  padding: 0 6px; border-radius: 20px; font-size: 10px;
}

/* ==================== 驱动追踪 ==================== */
.drv-actions { display: flex; gap: 8px; flex-wrap: wrap; }

#drvBox { padding: 2px 0 4px; }

.drv-overview {
  display: grid;
  grid-template-columns: 168px 1fr 132px;
  gap: 18px; align-items: center;
  padding: 18px 20px; margin-bottom: 14px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(160deg, #f7f9fc 0%, #ffffff 60%);
  box-shadow: var(--shadow-sm);
}
.drv-overview.up { border-color: rgba(214, 64, 47, .22); background: linear-gradient(160deg, #fdf7f6 0%, #ffffff 60%); }
.drv-overview.down { border-color: rgba(14, 147, 97, .22); background: linear-gradient(160deg, #f5faf7 0%, #ffffff 60%); }

.dvo-score { text-align: center; border-right: 1px solid var(--line); padding-right: 14px; }
.dvo-score b { display: block; font-size: 40px; line-height: 1.05; font-variant-numeric: tabular-nums; letter-spacing: -.5px; }
.drv-overview.up .dvo-score b { color: var(--up); }
.drv-overview.down .dvo-score b { color: var(--down); }
.drv-overview.flat .dvo-score b { color: var(--text); }
.dvo-score span { font-size: 12.5px; color: var(--text-2); }

.dvo-sum { font-size: 13.5px; line-height: 1.9; color: var(--text); }
.dvo-note { font-size: 12px; line-height: 1.75; color: var(--text-3); margin-top: 5px; }

.dvo-counts { display: flex; flex-direction: column; gap: 5px; font-size: 11.5px; }
.dvo-counts .c { padding: 2px 9px; border-radius: 20px; background: var(--bg-2); border: 1px solid var(--line); }
.dvo-counts .c.up { color: var(--up); border-color: rgba(214, 64, 47, .22); background: rgba(214, 64, 47, .05); }
.dvo-counts .c.down { color: var(--down); border-color: rgba(14, 147, 97, .22); background: rgba(14, 147, 97, .05); }
.dvo-counts .c.flat, .dvo-counts .c.na { color: var(--text-3); }

.drv-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }

.drv-card {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--card); padding: 13px 15px 14px;
  display: flex; flex-direction: column; gap: 7px;
  box-shadow: var(--shadow-sm); transition: .18s;
}
.drv-card:hover { box-shadow: var(--shadow); }
.drv-card.up { border-color: rgba(214, 64, 47, .18); }
.drv-card.down { border-color: rgba(14, 147, 97, .18); }
.drv-card.na { background: var(--bg-2); border-style: dashed; box-shadow: none; }

.drv-card header { display: flex; align-items: center; gap: 8px; }
.dvc-name { font-size: 13px; font-weight: 600; color: var(--text); }
.dvc-w { font-size: 10.5px; color: var(--text-3); }
.dvc-badge {
  margin-left: auto; font-size: 10.5px; padding: 2px 9px; border-radius: 20px;
  border: 1px solid var(--line); color: var(--text-2); font-variant-numeric: tabular-nums;
}
.dvc-badge.up { color: var(--up); border-color: rgba(214, 64, 47, .26); background: rgba(224, 72, 62, .06); }
.dvc-badge.down { color: var(--down); border-color: rgba(14, 147, 97, .26); background: rgba(15, 157, 104, .06); }
.dvc-badge.na { color: var(--text-3); }

.drv-bar { position: relative; height: 6px; border-radius: 4px; background: var(--bg-2); overflow: hidden; border: 1px solid var(--line); }
.drv-bar .drv-center { position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: var(--line-2); }
.drv-bar i { position: absolute; top: 0; bottom: 0; display: block; border-radius: 4px; }
.drv-bar i.up { background: linear-gradient(90deg, rgba(214, 64, 47, .45), var(--up)); }
.drv-bar i.down { background: linear-gradient(270deg, rgba(14, 147, 97, .45), var(--down)); }

.dvc-reading { font-size: 12.5px; color: var(--text); font-variant-numeric: tabular-nums; }
.dvc-detail { font-size: 11.5px; line-height: 1.75; color: var(--text-3); }

.dvc-metrics { display: flex; flex-wrap: wrap; gap: 6px; }
.dvc-metrics > div {
  display: flex; align-items: baseline; gap: 5px;
  font-size: 10.5px; padding: 2px 8px; border-radius: 20px;
  background: var(--bg-2); border: 1px solid var(--line);
}
.dvc-metrics span { color: var(--text-3); }
.dvc-metrics b { color: var(--text-2); font-weight: 500; font-variant-numeric: tabular-nums; }
.dvc-stale { font-size: 10.5px; color: var(--gold); }

.drv-panel { margin-top: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); padding: 15px 17px; box-shadow: var(--shadow-sm); }
.drv-panel-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.drv-panel-head h3 { font-size: 13px; font-weight: 600; color: var(--text); }
.drv-panel-head .hint { font-size: 11px; color: var(--text-3); }

.factor-list { list-style: none; display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px 18px; }
.factor-list li { display: flex; align-items: baseline; gap: 8px; font-size: 12px; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.factor-list .ft-name { color: var(--text-2); flex: 1; }
.factor-list b { color: var(--text); font-variant-numeric: tabular-nums; }
.factor-list em { font-style: normal; font-size: 10.5px; color: var(--text-3); }
.ft-empty { font-style: normal; color: var(--text-3); font-size: 11px; }
.ft-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--text-3); flex-shrink: 0; }
.ft-dot.bull { background: var(--up); }
.ft-dot.bear { background: var(--down); }
.ft-dot.flat, .ft-dot.na { background: var(--line-2); }

.drv-events { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.drv-event { display: flex; gap: 10px; align-items: flex-start; }
.de-dot { width: 6px; height: 6px; border-radius: 50%; margin-top: 7px; background: var(--line-2); flex-shrink: 0; }
.de-dot.up { background: var(--up); }
.de-dot.down { background: var(--down); }
.de-main { display: flex; flex-direction: column; gap: 2px; }
.de-title { font-size: 12.5px; color: var(--text); text-decoration: none; line-height: 1.6; }
.de-title:hover { color: var(--brand); }
.de-meta { font-size: 10.5px; color: var(--text-3); }

.drv-foot { margin-top: 14px; font-size: 11px; line-height: 1.8; color: var(--text-3); }
.drv-foot b { color: var(--text-2); font-weight: 500; }
.drv-foot.board { padding: 0 4px; }

/* ---------- 驱动雷达 ---------- */
.drv-view { flex: 1; overflow-y: auto; padding: 18px 24px 32px; }
.drv-board-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 12px; flex-wrap: wrap; }
.dbh-left h2 { font-size: 17px; font-weight: 600; color: var(--text); }
.dbh-left p { font-size: 11.5px; color: var(--text-3); margin-top: 5px; }
.dbh-stats { display: flex; gap: 8px; font-size: 12px; flex-wrap: wrap; }
.dbh-stats span { padding: 4px 12px; border-radius: 20px; border: 1px solid var(--line); background: var(--card); box-shadow: var(--shadow-sm); }
.dbh-stats .up { color: var(--up); border-color: rgba(214, 64, 47, .22); background: rgba(214, 64, 47, .05); }
.dbh-stats .down { color: var(--down); border-color: rgba(14, 147, 97, .22); background: rgba(14, 147, 97, .05); }
.dbh-stats .flat { color: var(--text-3); }

.drv-toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.drv-table-wrap { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--card); box-shadow: var(--shadow); }
.drv-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.drv-table thead th {
  text-align: left; font-weight: 500; font-size: 11px; color: var(--text-3);
  padding: 10px 12px; background: var(--bg-2); border-bottom: 1px solid var(--line); white-space: nowrap;
}
.drv-table th.num, .drv-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.drv-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.drv-table tbody tr { cursor: pointer; transition: background .12s; }
.drv-table tbody tr:hover { background: var(--bg-2); }
.drv-table tbody tr:last-child td { border-bottom: none; }
.db-name b { display: block; font-weight: 600; color: var(--text); }
.db-name span { font-size: 10.5px; color: var(--text-3); }
.db-score { display: flex; align-items: center; gap: 9px; min-width: 194px; }
.db-score .drv-bar { flex: 1; }
.db-score b { font-variant-numeric: tabular-nums; min-width: 34px; text-align: right; }
.db-label { font-size: 11px; padding: 2px 9px; border-radius: 20px; border: 1px solid var(--line); white-space: nowrap; }
.db-label.up { color: var(--up); border-color: rgba(214, 64, 47, .24); background: rgba(214, 64, 47, .05); }
.db-label.down { color: var(--down); border-color: rgba(14, 147, 97, .24); background: rgba(14, 147, 97, .05); }
.db-lead { font-size: 11.5px; color: var(--text-2); max-width: 320px; }
.db-lead b { color: var(--text); font-weight: 600; }
.board-loading { padding: 40px 12px !important; text-align: center; color: var(--text-3); font-size: 12.5px; }

/* ---------- 滚动条 ---------- */
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #c9d3e0; border-radius: 6px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: #b0bfd2; background-clip: content-box; }

/* ---------- 响应式 ---------- */
@media (max-width: 1180px) {
  .drv-grid { grid-template-columns: repeat(2, 1fr); }
  .drv-overview { grid-template-columns: 140px 1fr; }
  .dvo-counts { flex-direction: row; grid-column: 1 / -1; }
}

@media (max-width: 1000px) {
  .layout { flex-direction: column; }
  .sidebar { width: 100%; border-right: none; border-bottom: 1px solid var(--line); max-height: 46vh; }
  .pair-list { overflow-y: auto; }
  .summary { grid-template-columns: repeat(2, 1fr); }
  .side-note { display: none; }
  .market-strip { flex-direction: column; align-items: flex-start; gap: 8px; }
  .chart { height: 340px; }
  .topnav { order: 3; width: 100%; margin-top: 8px; }
  .topbar { flex-wrap: wrap; }
  .news-body { flex-direction: column; }
  .news-side { width: 100%; position: static; }
  #newsSearch { width: 100%; }
  .nt-count { margin-left: 0; }
  .drv-grid { grid-template-columns: 1fr; }
  .factor-list { grid-template-columns: 1fr; }
}

/* ---------- 急涨急跌异动播报 ---------- */
.alert-strip {
  display: flex; align-items: center; gap: 12px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 8px 14px; margin-bottom: 14px; box-shadow: var(--shadow-sm);
}
.as-label {
  display: flex; align-items: center; gap: 5px; flex-shrink: 0;
  font-size: 12px; font-weight: 600; color: var(--brand);
}
.as-label i { font-style: normal; }
.as-items { display: flex; gap: 8px; flex-wrap: wrap; min-width: 0; overflow: hidden; }
.as-item {
  display: flex; align-items: baseline; gap: 7px;
  padding: 4px 11px; border-radius: 20px; cursor: pointer;
  border: 1px solid var(--line); background: var(--bg-2); font-family: inherit;
  transition: .15s; white-space: nowrap;
}
.as-item b { font-size: 12.5px; color: var(--text); font-weight: 600; }
.as-item span { font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.as-item i { font-style: normal; font-size: 10.5px; color: var(--text-3); }
.as-item.up { border-color: rgba(214, 64, 47, .25); background: rgba(214, 64, 47, .05); }
.as-item.up span { color: var(--up); }
.as-item.down { border-color: rgba(14, 147, 97, .25); background: rgba(14, 147, 97, .05); }
.as-item.down span { color: var(--down); }
.as-item:hover { border-color: var(--brand-line); background: var(--brand-dim); }

#toastBox { position: fixed; right: 18px; bottom: 18px; z-index: 99; display: flex; flex-direction: column; gap: 9px; }
.alert-toast {
  display: flex; align-items: baseline; gap: 9px;
  background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  padding: 11px 16px; cursor: pointer; box-shadow: 0 10px 30px -8px rgba(20, 30, 50, .28);
  animation: toastIn .3s ease;
  border-left: 3px solid var(--text-3);
}
.alert-toast b { font-size: 14px; color: var(--text); }
.alert-toast span { font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.alert-toast i { font-style: normal; font-size: 11px; color: var(--text-3); }
.alert-toast.up { border-left-color: var(--up); }
.alert-toast.up span { color: var(--up); }
.alert-toast.down { border-left-color: var(--down); }
.alert-toast.down span { color: var(--down); }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- 图表控件 ---------- */
.chart-ctrls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
#overlaySel {
  padding: 6px 10px; border-radius: 7px; border: 1px solid var(--line);
  background: var(--card); color: var(--text-2); font-size: 12.5px; outline: none;
  font-family: inherit; max-width: 210px; cursor: pointer;
}
#overlaySel:focus { border-color: var(--brand-line); }

/* ---------- 品种研报 ---------- */
.rep-list { display: flex; flex-direction: column; gap: 10px; }
.rep-item {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--card); padding: 12px 16px; box-shadow: var(--shadow-sm);
  transition: .18s;
}
.rep-item:hover { box-shadow: var(--shadow); }
.rep-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.rep-type {
  font-size: 10.5px; padding: 2px 9px; border-radius: 20px;
  color: #fff; background: var(--brand); flex-shrink: 0;
}
.rep-head b { font-size: 13.5px; color: var(--text); }
.rep-date { margin-left: auto; font-size: 11.5px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.rep-links { display: flex; gap: 9px; margin-top: 9px; }
.rep-link {
  font-size: 12px; padding: 4px 14px; border-radius: 7px; text-decoration: none; transition: .15s;
  border: 1px solid var(--line); color: var(--text-2); background: var(--bg-2);
}
.rep-link.read:hover { color: var(--brand); border-color: var(--brand-line); background: var(--brand-dim); }
.rep-link.pdf { color: #fff; background: var(--brand); border-color: var(--brand); }
.rep-link.pdf:hover { opacity: .88; }

/* ---------- 主力持仓龙虎榜 ---------- */
.pos-totals { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 14px; }
.pt-item {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 10px 14px; display: flex; flex-direction: column; gap: 3px;
}
.pt-item label { font-size: 11px; color: var(--text-3); }
.pt-item b { font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.pt-item span { font-size: 11px; }
.pt-item .dim { color: var(--text-3); }

.pos-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.pos-table { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--card); }
.pos-table h4 { font-size: 12.5px; color: var(--brand); padding: 9px 12px; background: var(--bg-2); border-bottom: 1px solid var(--line); }
.pos-table table { font-size: 12px; }
.pos-table th { padding: 6px 10px; background: transparent; }
.pos-table td { padding: 6px 10px; }
.pos-table td.l i {
  font-style: normal; display: inline-block; width: 16px; text-align: center;
  font-size: 10px; color: var(--text-3); margin-right: 6px;
}
.pos-table td.l i:nth-of-type(1) { color: var(--up); }

@media (max-width: 1180px) { .pos-grid { grid-template-columns: 1fr; } .pos-totals { grid-template-columns: repeat(2, 1fr); } }

/* ---------- 期权 Gamma 敞口 ---------- */
.opt-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin-bottom: 4px;
}
.opt-cards .pt-item {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.pt-item .warn { color: var(--gold); }
.chart-ctrls .sel {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  font-size: 13px;
  color: var(--text-1);
  max-width: 260px;
}
.opt-table-wrap { overflow-x: auto; }
.opt-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  min-width: 760px;
}
.opt-table th, .opt-table td { padding: 4px 6px; border-bottom: 1px solid var(--line); }
.opt-table thead tr:first-child th {
  font-size: 12px;
  padding: 6px;
  color: #fff;
}
.opt-table .c-h { background: #d6402f; border-radius: 6px 0 0 0; }
.opt-table .k-h { background: #1b4d8f; }
.opt-table .p-h { background: #0e9361; border-radius: 0 6px 0 0; }
.opt-table thead tr:nth-child(2) th { color: var(--text-3); font-weight: 500; background: #f4f6f9; }
.opt-table .k {
  background: #f4f6f9;
  font-weight: 700;
  color: var(--brand);
  font-variant-numeric: tabular-nums;
}
.opt-table td.c { color: #8a3025; }
.opt-table td.p { color: #23614a; }
.opt-table td.c b, .opt-table td.p b { font-weight: 700; color: inherit; }
.opt-table tr.atm td { background: rgba(27, 77, 143, 0.06); }
.opt-table tr.atm td.k { background: rgba(27, 77, 143, 0.14); }
.opt-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.opt-table th.num { text-align: right; }

/* ---------- 速评指标：价格分位 + 月度胜率 ---------- */
.pct-tag { display: inline-block; min-width: 38px; padding: 1px 7px; border-radius: 10px; background: #f0f3f8; font-weight: 600; font-size: 12px; }
.pct-tag.pct-high { background: rgba(214, 64, 47, 0.12); color: #d6402f; }
.pct-tag.pct-low { background: rgba(14, 147, 97, 0.12); color: #0e9361; }
.drv-stat-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 10px;
  margin: 12px 0;
}
.dss-item {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}
.dss-item label { font-size: 11px; color: var(--text-3); white-space: nowrap; }
.dss-item b { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.dss-bar {
  flex: 1;
  height: 8px;
  background: #eef1f5;
  border-radius: 4px;
  overflow: hidden;
  min-width: 80px;
}
.dss-bar i { display: block; height: 100%; background: var(--brand); border-radius: 4px; }
.dss-bar i.up { background: var(--up); }
.dss-bar i.down { background: var(--down); }

/* ---------- 研报中心 ---------- */
.rc-batch {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 16px;
  margin: 10px 0;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
}
.rcb-bar { flex: 0 0 220px; height: 8px; background: #eef1f5; border-radius: 4px; overflow: hidden; }
.rcb-bar i { display: block; height: 100%; background: var(--brand); transition: width .4s; }
.rc-date { margin-bottom: 18px; }
.rc-date h3 { font-size: 15px; margin: 0 0 8px; color: var(--text-1); }
.rc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 8px;
}
.rc-item {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
}
.rci-head { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; flex-wrap: wrap; }
.rci-head b { font-size: 13.5px; }
.rc-type {
  font-size: 10.5px;
  padding: 1px 7px;
  border-radius: 8px;
  color: #fff;
  flex-shrink: 0;
}
.rc-type.midweek { background: #1b4d8f; }
.rc-type.weekly { background: #a9741f; }
.rci-links { display: flex; gap: 12px; font-size: 12.5px; }
.rci-links a { color: var(--brand); text-decoration: none; font-weight: 600; }
.rci-links a:hover { text-decoration: underline; }
.rci-links .dim { color: var(--text-3); }

/* ---------- 内外盘多对标价差 ---------- */
.panel-head.sub-head { margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--line); }
.panel-head.sub-head h3 { font-size: 14.5px; font-weight: 600; color: var(--text-1); margin: 0; }
.panel-head.sub-head .hint { font-size: 11.5px; color: var(--text-3); }

.tag-spot {
  font-size: 10.5px; padding: 1px 6px; border-radius: 4px;
  background: #eef6ff; color: #1b4d8f; border: 1px solid #d3e4f8; white-space: nowrap;
}

.multi-ref th { background: var(--bg-2); }
.multi-ref td { vertical-align: middle; }
.multi-ref td:first-child { font-size: 13px; }
.multi-ref tr:hover td { background: #fafbfd; }

.sp-tag {
  display: inline-block; font-size: 11.5px; padding: 2px 8px; border-radius: 11px;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.sp-tag.sp-prem { background: #fdecea; color: #c0392b; }
.sp-tag.sp-disc { background: #e8f6ef; color: #0e9361; }

.sp-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 12px; }
.sp-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 16px; cursor: pointer;
  border: 1px solid var(--line); background: #fff;
  font-size: 12.5px; color: var(--text-2); font-family: inherit;
  transition: .16s;
}
.sp-chip i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; opacity: .35; }
.sp-chip.on { border-color: var(--brand-line); background: #fff7ef; color: var(--text-1); font-weight: 600; }
.sp-chip.on i { opacity: 1; }
.sp-chip em { font-style: normal; font-size: 10.5px; color: var(--text-3); }
.sp-chip[disabled] { opacity: .45; cursor: not-allowed; }

#spreadChart { height: 340px; margin-bottom: 12px; }

.sp-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px; margin-bottom: 8px; }
.sps-item {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px 14px; background: #fff;
}
.sps-head { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-2); margin-bottom: 6px; }
.sps-head i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.sps-main { font-size: 21px; font-weight: 650; font-variant-numeric: tabular-nums; color: var(--text-1); letter-spacing: -.3px; }
.sps-main .dim { font-size: 11.5px; font-weight: 400; }
.sps-bar { position: relative; height: 5px; background: linear-gradient(90deg, #e8f6ef 0%, #eef1f5 50%, #fdecea 100%); border-radius: 3px; margin: 9px 0; }
.sps-bar b { position: absolute; top: -3px; width: 2px; height: 11px; background: var(--text-1); border-radius: 1px; transform: translateX(-1px); }
.sps-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 11.5px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.sps-meta .sp-high { color: #c0392b; font-weight: 600; }
.sps-meta .sp-low { color: #0e9361; font-weight: 600; }

@media (max-width: 720px) {
  #spreadChart { height: 280px; }
  .sps-stats { grid-template-columns: 1fr; }
  .multi-ref th, .multi-ref td { padding: 9px 8px; font-size: 12px; }
}

/* ---------- AI 盯盘 ---------- */
.sig-switch {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; color: var(--text-2); cursor: pointer; user-select: none;
  padding: 5px 10px; border: 1px solid var(--line); border-radius: 16px; background: #fff;
}
.sig-switch input { accent-color: var(--brand); cursor: pointer; margin: 0; }

.sig-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 18px; align-items: start; }
.sig-panel-main, .sig-panel-side { min-width: 0; }
.sig-sec-head { display: flex; align-items: baseline; gap: 10px; margin: 0 0 10px; }
.sig-sec-head h3 { font-size: 14.5px; font-weight: 600; margin: 0; color: var(--text-1); }
.sig-sec-head .dim { font-size: 11.5px; color: var(--text-3); }

.sig-feed { display: flex; flex-direction: column; gap: 8px; }
.sf-item {
  position: relative; display: flex; align-items: center; gap: 12px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 11px 14px 11px 18px; cursor: pointer; overflow: hidden;
  transition: .16s; animation: sfIn .32s ease both;
}
@keyframes sfIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.sf-item:hover { border-color: var(--brand-line); box-shadow: var(--shadow-sm); transform: translateX(2px); }
.sf-rail { position: absolute; left: 0; top: 0; bottom: 0; width: 4px; }
.sf-item.long .sf-rail { background: #d6402f; }
.sf-item.short .sf-rail { background: #0e9361; }
.sf-body { flex: 1; min-width: 0; }
.sf-top { display: flex; align-items: center; gap: 8px; margin-bottom: 3px; flex-wrap: wrap; }
.sf-name { font-size: 14px; color: var(--text-1); }
.sf-type { font-size: 10.5px; padding: 1px 7px; border-radius: 4px; }
.sf-type.long { background: #fdecea; color: #c0392b; }
.sf-type.short { background: #e8f6ef; color: #0e9361; }
.sf-strong { font-size: 10.5px; padding: 1px 6px; border-radius: 4px; background: #1b1f26; color: #fff; font-weight: 600; }
.sf-star { color: #d4a017; font-size: 12px; }
.sf-time { margin-left: auto; font-size: 11px; color: var(--text-3); font-variant-numeric: tabular-nums; display: inline-flex; align-items: center; gap: 5px; }
.sf-time i { font-style: normal; font-size: 9.5px; background: var(--brand); color: #fff; padding: 0 4px; border-radius: 3px; }
.sf-title { font-size: 13.5px; font-weight: 600; margin-bottom: 2px; }
.sf-title.long { color: #c0392b; }
.sf-title.short { color: #0e9361; }
.sf-detail { font-size: 12px; color: var(--text-3); line-height: 1.6; }
.sf-price { text-align: right; flex-shrink: 0; font-variant-numeric: tabular-nums; }
.sf-price b { display: block; font-size: 14.5px; color: var(--text-1); }
.sf-price .chg { font-size: 11.5px; }

.sig-rank { display: flex; flex-direction: column; gap: 7px; }
.sr-item {
  display: flex; align-items: center; gap: 8px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 9px 11px; cursor: pointer; transition: .16s;
}
.sr-item:hover { border-color: var(--brand-line); box-shadow: var(--shadow-sm); }
.sr-star {
  border: none; background: none; cursor: pointer; font-size: 15px;
  color: #c8cfda; padding: 0; line-height: 1; flex-shrink: 0;
}
.sr-star.on { color: #d4a017; }
.sr-main { flex: 1; min-width: 0; }
.sr-line1 { display: flex; align-items: baseline; gap: 6px; }
.sr-line1 b { font-size: 13.5px; color: var(--text-1); }
.sr-sector { font-size: 10.5px; color: var(--text-3); }
.sr-line2 { display: flex; align-items: baseline; gap: 6px; font-size: 11px; }
.sr-line2 .dim { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 190px; }
.sr-score {
  font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums;
  flex-shrink: 0; min-width: 32px; text-align: right;
}
.sr-score.long { color: #d6402f; }
.sr-score.short { color: #0e9361; }
.sr-score.flat { color: var(--text-3); }

@media (max-width: 980px) {
  .sig-layout { grid-template-columns: 1fr; }
  .sr-line2 .dim { max-width: none; }
}

/* ---------- 自选功能 ---------- */
.pv-star {
  border: none; background: none; cursor: pointer;
  font-size: 15px; line-height: 1; padding: 0 2px;
  color: #c9d1dd; flex-shrink: 0; transition: .15s;
  font-family: inherit;
}
.pv-star:hover { color: #e8a820; transform: scale(1.25); }
.pv-star.on { color: #f5b921; text-shadow: 0 0 6px rgba(245,185,33,.35); }
.group-head.watch-head {
  background: linear-gradient(90deg, #fff8e6, transparent);
  border-left: 3px solid #f5b921;
  margin-top: 4px;
}
.group-head.watch-head .gh-name { color: #9a6b00; }
/* AI 盯盘排行星标加大加醒目 */
.sr-star { font-size: 19px; color: #b9c3d2; width: 24px; text-align: center; }
.sr-star:hover { color: #e8a820; transform: scale(1.2); }
.sr-star.on { color: #f5b921; text-shadow: 0 0 6px rgba(245,185,33,.4); }
.sr-item:hover .sr-star { color: #d0a030; }
.sr-item:hover .sr-star.on { color: #f5b921; }

/* ---------- 行情驱动归因 ---------- */
.attr-card {
  border: 1px solid var(--brand-line); border-left: 4px solid var(--brand);
  border-radius: var(--radius); background: #fff;
  padding: 16px 20px; margin-bottom: 16px; box-shadow: var(--shadow-sm);
}
.attr-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.attr-head h3 { margin: 0; font-size: 15.5px; color: var(--text-1); display: flex; align-items: center; gap: 8px; }
.attr-icon { font-size: 17px; }
.attr-conf { font-size: 11.5px; padding: 3px 10px; border-radius: 12px; font-weight: 600; }
.conf-high { background: #fdecea; color: #c0392b; }
.conf-mid { background: #fff4e0; color: #a9741f; }
.conf-low { background: #eef1f5; color: var(--text-3); }
.attr-window { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; font-variant-numeric: tabular-nums; }
.aw-days { font-size: 12.5px; color: var(--text-3); }
.attr-window b { font-size: 17px; font-weight: 700; }
.attr-window b.up { color: #d6402f; }
.attr-window b.down { color: #0e9361; }
.attr-window b.flat { color: var(--text-3); }
.aw-range { font-size: 12px; color: var(--text-3); }
.aw-price { font-size: 12px; color: var(--text-2); }
.attr-verdict { font-size: 14px; margin: 0 0 8px; color: var(--text-2); }
.attr-verdict .attr-type { font-size: 16.5px; color: var(--brand); font-weight: 700; }
.attr-story { font-size: 13.5px; line-height: 1.85; color: var(--text-1); background: var(--bg-2); border-radius: 9px; padding: 12px 14px; margin: 0 0 12px; }
.attr-dims { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 12px; }
.attr-dim { display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
.ad-name { font-size: 12px; color: var(--text-2); flex-shrink: 0; }
.attr-dim .drv-bar { flex: 1; }
.attr-dim b { font-size: 13px; min-width: 30px; text-align: right; font-variant-numeric: tabular-nums; }
.attr-dim.up b { color: #d6402f; }
.attr-dim.down b { color: #0e9361; }
.attr-dim.flat b { color: var(--text-3); }
.attr-evidence { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.attr-ev { display: flex; align-items: baseline; gap: 8px; font-size: 12.5px; line-height: 1.7; }
.ev-dim { flex-shrink: 0; font-size: 10.5px; color: var(--text-2); background: var(--bg-2); padding: 1px 7px; border-radius: 4px; }
.ev-dot { flex-shrink: 0; width: 7px; height: 7px; border-radius: 50%; align-self: center; }
.ev-dot.ev-align { background: #d6402f; }
.ev-dot.ev-against { background: #b0b9c6; }
.ev-text { color: var(--text-2); }
.attr-foot { font-size: 11px; color: var(--text-3); margin: 0; line-height: 1.7; }

@media (max-width: 720px) {
  .attr-dims { grid-template-columns: 1fr; }
}

/* ---------- 手机端适配（≤760px）---------- */
@media (max-width: 760px) {
  html, body { overflow-x: hidden; }

  /* 关键：解除 flex 子项 min-content 撑宽，否则侧栏被撑到 700+ px，价格被挤出屏幕 */
  .layout, .main, .sidebar, .pair-list, .news-view, .drv-view {
    min-width: 0 !important; width: 100% !important; max-width: 100vw !important;
  }

  /* 顶栏：品牌 + 横向可滑导航 */
  .topbar { padding: 10px 12px; gap: 8px; }
  .brand h1 { font-size: 15px; }
  .brand p { display: none; }
  .topbar-right { gap: 10px; width: 100%; order: 2; }
  .live, .fx { font-size: 11px; }
  .topnav {
    order: 3; width: 100%; overflow-x: auto; gap: 4px;
    -webkit-overflow-scrolling: touch; scrollbar-width: none;
  }
  .topnav::-webkit-scrollbar { display: none; }
  .topnav { gap: 2px; }
  .topnav button { flex: 0 0 auto; white-space: nowrap; padding: 7px 9px; font-size: 12.5px; letter-spacing: -.2px; }

  /* 板块筛选：单行横滑，不再挤压截断 */
  .side-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 8px; }
  .side-chips::-webkit-scrollbar { display: none; }
  .chip { flex: 0 0 auto; }

  /* 品种列表行：名称占据剩余空间，报价固定贴右 */
  .sidebar { padding: 12px 10px; max-height: 58vh; }
  .pair-list li { gap: 8px; padding: 9px 8px; }
  .pair-name { flex: 1 1 auto; min-width: 0; overflow: hidden; }
  .pair-name b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .pair-name small { flex: 0 0 auto; }
  .pair-quote { flex: 0 0 auto; min-width: 74px; }
  .pair-quote .p { font-size: 13px; }
  .pair-quote .c { font-size: 11px; }
  .side-note { display: none; }

  /* 概览卡与图表 */
  .summary { grid-template-columns: repeat(2, 1fr); gap: 9px; }
  .sum-item { padding: 11px 12px; }
  .main { padding: 12px 12px 32px; }
  .chart { height: 300px; }
  .market-strip { padding: 10px 12px; }
  .ms-sectors { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  .ms-sectors::-webkit-scrollbar { display: none; }
  .alert-strip { padding: 8px 10px; }
  .as-items { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .as-items::-webkit-scrollbar { display: none; }

  /* 驱动/信号/研报列表在手机上单列 */
  .sig-layout, .drv-grid, .factor-list, .pos-grid { grid-template-columns: 1fr; }
  .sub-tabs { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  .sub-tabs::-webkit-scrollbar { display: none; }
  .sub-tabs button { flex: 0 0 auto; white-space: nowrap; }
  .multi-ref { font-size: 12px; }
  #toastBox { right: 10px; left: 10px; bottom: 10px; }
  .alert-toast { width: 100%; }
}

/* ==================== 短线共振（一米先生实战打法）==================== */
.res-legend {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  font-size: 11.5px; color: var(--text-3); margin: 0 0 12px; padding: 0 2px;
}
.rl-item { display: inline-flex; align-items: center; gap: 5px; }
.rl-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.rl-dot.long { background: var(--up); }
.rl-dot.short { background: var(--down); }
.rl-dot.flat { background: #c2cad6; }
.rl-tip { color: var(--text-3); }

.res-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }

.res-card {
  position: relative; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 13px 15px 12px 18px; cursor: pointer;
  box-shadow: var(--shadow-sm); transition: .16s; overflow: hidden;
}
.res-card::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: #c2cad6;
}
.res-card.long::before { background: var(--up); }
.res-card.short::before { background: var(--down); }
.res-card:hover { border-color: var(--brand-line); box-shadow: var(--shadow); transform: translateY(-1px); }

.rc-head { display: flex; align-items: center; gap: 8px; }
.rc-star {
  border: none; background: none; cursor: pointer; font-size: 15px; line-height: 1;
  color: #c9d1dd; padding: 0; flex-shrink: 0; transition: .15s; font-family: inherit;
}
.rc-star:hover { color: #e8a820; transform: scale(1.25); }
.rc-star.on { color: #f5b921; }
.rc-name { display: flex; align-items: baseline; gap: 7px; flex: 1; min-width: 0; }
.rc-name b { font-size: 15px; font-weight: 600; color: var(--text); white-space: nowrap; }
.rc-name small { font-size: 10.5px; color: var(--text-3); letter-spacing: .4px; }
.rc-exch {
  font-size: 9.5px; color: var(--text-3); border: 1px solid var(--line);
  padding: 1px 5px; border-radius: 3px; white-space: nowrap;
}
.rc-quote { text-align: right; font-variant-numeric: tabular-nums; flex-shrink: 0; }
.rc-quote b { display: block; font-size: 15px; color: var(--text); }
.rc-quote .chg { font-size: 11.5px; }

.rc-verdict {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin: 10px 0 9px; font-size: 11.5px; color: var(--text-2);
}
.rc-dir {
  font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 5px;
}
.rc-dir.long { background: #fdecea; color: #c0392b; }
.rc-dir.short { background: #e8f6ef; color: #0e9361; }
.rc-badge { font-size: 10px; padding: 2px 7px; border-radius: 4px; border: 1px solid var(--line); color: var(--text-3); }
.rc-badge.trade { color: #1b4d8f; border-color: rgba(27,77,143,.28); background: rgba(27,77,143,.06); font-weight: 600; }
.rc-badge.near { color: #a9741f; border-color: rgba(169,116,31,.3); background: rgba(169,116,31,.07); }
.rc-strength { color: var(--text-3); }
.rc-strength b { font-size: 13px; color: var(--text); font-variant-numeric: tabular-nums; }
.rc-since { margin-left: auto; color: var(--text-3); font-size: 10.5px; }

.rc-lights { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.rl-cell {
  display: flex; align-items: center; justify-content: center; gap: 4px;
  padding: 6px 4px; border-radius: 6px; background: var(--bg-2);
  border: 1px solid var(--line); font-variant-numeric: tabular-nums;
}
.rl-cell.long { background: rgba(214,64,47,.08); border-color: rgba(214,64,47,.25); }
.rl-cell.short { background: rgba(14,147,97,.08); border-color: rgba(14,147,97,.25); }
.rl-tf { font-size: 10.5px; color: var(--text-3); }
.rl-cell.long .rl-tf, .rl-cell.short .rl-tf { color: var(--text-2); }
.rl-arrow { font-size: 10px; }
.rl-cell.long .rl-arrow, .rl-cell.long .rl-sc { color: var(--up); }
.rl-cell.short .rl-arrow, .rl-cell.short .rl-sc { color: var(--down); }
.rl-cell.flat .rl-arrow, .rl-cell.flat .rl-sc { color: var(--text-3); }
.rl-sc { font-size: 11px; font-weight: 600; }

.rc-bar { height: 3px; border-radius: 2px; background: var(--bg-2); margin: 9px 0 7px; overflow: hidden; }
.rc-bar i { display: block; height: 100%; border-radius: 2px; }
.rc-bar i.long { background: linear-gradient(90deg, #e8877a, var(--up)); }
.rc-bar i.short { background: linear-gradient(90deg, #6ec6a3, var(--down)); }
.rc-note { font-size: 11.5px; color: var(--text-2); line-height: 1.65; }

@media (max-width: 1100px) {
  .res-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .res-card { padding: 11px 12px 10px 15px; }
  .rc-name b { font-size: 14px; }
  .rc-quote b { font-size: 14px; }
  .rl-cell { gap: 2px; padding: 5px 2px; }
  .rl-tf { font-size: 9.5px; }
  .rl-sc { font-size: 10px; }
  .res-legend { gap: 10px; font-size: 11px; }
  .rl-tip { display: none; }
}

/* 四周期 K 线对照 */
.rc-foot { margin-top: 9px; display: flex; justify-content: flex-end; }
.rc-expand {
  font-family: inherit; font-size: 11.5px; color: var(--brand);
  background: var(--brand-dim); border: 1px solid var(--brand-line);
  padding: 4px 12px; border-radius: 14px; cursor: pointer; transition: .15s;
}
.rc-expand:hover { background: rgba(27,77,143,.14); }
.rc-expand:disabled { opacity: .6; cursor: default; }

.rc-charts {
  margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line);
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px;
}
.rc-chart {
  border: 1px solid var(--line); border-radius: 7px; background: #fcfdff; padding: 6px 6px 2px;
}
.rc-chart-t { font-size: 11px; color: var(--text-3); padding: 0 2px 3px; letter-spacing: .3px; }
.rc-chart-box { width: 100%; height: 262px; }

/* 展开 K 线时卡片横跨整行，图表才放得开 */
.res-card.expanded { grid-column: 1 / -1; }
.res-card.expanded .rc-charts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.res-card.expanded .rc-chart-box { height: 300px; }
.rc-chart-empty {
  grid-column: 1 / -1; font-size: 12px; color: var(--text-3);
  padding: 18px 6px; text-align: center;
}

@media (max-width: 760px) {
  .rc-charts { grid-template-columns: 1fr; gap: 8px; }
  .rc-chart-box { height: 220px; }
  .res-card.expanded .rc-charts { grid-template-columns: 1fr; }
  .res-card.expanded .rc-chart-box { height: 230px; }
}

/* 提示音状态 */
.sound-state {
  font-size: 11px; padding: 3px 9px; border-radius: 12px; white-space: nowrap;
}
.sound-state.ok { color: #0e9361; background: rgba(14,147,97,.08); border: 1px solid rgba(14,147,97,.25); }
.sound-state.warn { color: #a9741f; background: rgba(169,116,31,.08); border: 1px solid rgba(169,116,31,.28); }
