/* ==========================================================================
   创金A — v19 决策动线落地层（2026-11-22）
   在 styles.css / fundflow-v8.css / theme-v14.css / theme-v18.css 之后加载。
   只做增量：新组件 + 徽标 + 密度对齐，不破坏 v18 双主题令牌。

   页面结构对应 market.js / stocks.js / sectors.js / fundflow.js 的 v19 改造：
   - 首页：.v19-pulse（行情脉搏条）+ .v19-subidx（次级指数带）
           + .v19-themes（今日主线三视角）+ .v19-boards（三榜）
   - 榜单：.v19-context（全市场语境带）+ 表格前三徽标（.v19-badge-*）
   - 板块行情：.v19-ends（领涨 / 领跌两端带）
   - 资金流：.v19-kpi（结论条）+ .ffv8-bf-*（蝶形 v19 化）
   ========================================================================== */

/* ==========================================================================
   1. 全局密度与徽标
   ========================================================================== */

/* 表格行密度对齐 v19（34px），面板头 44px */
.data-table td { height: 34px; }
.panel-head { min-height: 44px; }

/* 涨跌幅胶囊：统一 22px 高度与字重 */
.pct-chip { height: 22px; }

/* 前三名徽标（v19）：18×18 内嵌小徽标，不是整格底色。
   rankCell 输出 td.rank.top 且文本即名次，用负缩进 + ::before 叠出徽标。 */
td.rank.top {
  position: relative;
  background: transparent;
  color: transparent;
  font-size: 0;
}
td.rank.top::before {
  content: attr(data-n);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 5px;
  background: var(--panel-3);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}
/* 容器类决定徽标颜色：涨红 / 跌绿 / 中性墨 */
.v19-badge-up td.rank.top::before {
  background: var(--up);
  color: #fff;
}
:root[data-theme="dark"] .v19-badge-up td.rank.top::before { color: #171208; }
.v19-badge-down td.rank.top::before {
  background: var(--down);
  color: #fff;
}
.v19-badge-neutral td.rank.top::before {
  background: var(--text);
  color: var(--bg);
}

/* ==========================================================================
   2. 语境带（涨跌榜 / 个股榜单）：全市场快照一屏读完
   ========================================================================== */
.v19-context {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr)) minmax(0, 1.4fr);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  margin-bottom: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.v19-context .cx-cell {
  padding: 12px 16px;
  border-right: 1px solid var(--hairline);
  display: flex; flex-direction: column; gap: 3px;
  min-width: 0;
}
.v19-context .cx-cell:last-child { border-right: 0; }
.v19-context .cx-cell span { font-size: 12px; color: var(--muted); }
.v19-context .cx-cell b {
  font-family: var(--font-mono); font-variant-numeric: tabular-nums;
  font-size: 19px; font-weight: 650; letter-spacing: -0.01em;
}
.v19-context .cx-cell b.up { color: var(--up-text, var(--up)); }
.v19-context .cx-cell b.down { color: var(--down-text, var(--down)); }
.v19-context .cx-bar { gap: 8px; justify-content: center; }
.v19-context .cx-bar span { font-size: 12px; color: var(--muted); }
.v19-context .cx-bar .breadth-bar { width: 100%; }
@media (max-width: 1023px) {
  .v19-context { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .v19-context .cx-cell:nth-child(3) { border-right: 0; }
  .v19-context .cx-cell { border-bottom: 1px solid var(--hairline); }
  .v19-context .cx-cell:nth-child(n + 4) { border-bottom: 0; }
  .v19-context .cx-bar { grid-column: 1 / -1; flex-direction: row; align-items: center; padding: 10px 16px; }
}

/* ==========================================================================
   3. 首页行情脉搏条
   ========================================================================== */
.v19-pulse { overflow: hidden; }
.v19-pulse .vp-scroll { display: contents; }
.v19-pulse .vp-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) 264px;
}
.v19-pulse .vp-idx {
  display: flex; flex-direction: column; gap: 6px;
  padding: 16px 18px 14px;
  transition: background var(--dur, 150ms) ease;
  min-width: 0;
}
.vp-idx:hover { background: var(--panel-2); }
.vp-idx + .vp-idx { border-left: 1px solid var(--hairline); }
.vp-idx .hi-name { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); letter-spacing: 0.02em; }
.vp-idx .hi-name .hi-code { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.vp-idx .hi-price {
  font-family: var(--font-mono); font-variant-numeric: tabular-nums;
  font-size: 26px; font-weight: 650; letter-spacing: -0.01em; line-height: 1.05;
}
.vp-idx .hi-meta { display: flex; align-items: center; gap: 8px; }
.vp-idx .hi-amt { font-size: 12px; color: var(--muted); white-space: nowrap; }
.vp-idx .hi-amt-label { color: var(--muted); }
.vp-idx .idx-spark { width: 100%; height: 34px; }

/* 市场温度块 */
.vp-temp {
  border-left: 1px solid var(--hairline);
  padding: 14px 16px 12px;
  background: var(--panel-2);
  display: flex; flex-direction: column; gap: 8px;
  min-width: 0;
}
.vp-temp .ht-head { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 650; letter-spacing: 0.02em; }
.vp-temp .ht-head .mood-label { margin-left: auto; }
.vp-temp .ht-body { display: flex; align-items: center; gap: 12px; }
.vp-temp .ht-gauge { width: 104px; flex: 0 0 auto; }
.vp-temp .ht-gauge .mood-gauge { width: 104px; }
.vp-temp .ht-score-line { display: flex; align-items: baseline; gap: 4px; margin-top: 2px; justify-content: center; }
.vp-temp .ht-score { font-family: var(--font-mono); font-size: 22px; font-weight: 650; line-height: 1; }
.vp-temp .ht-score-unit { font-size: 12px; color: var(--muted); }
.vp-temp .ht-facts { display: flex; flex-direction: column; gap: 5px; min-width: 0; flex: 1 1 auto; }
.vp-temp .ht-fact { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--muted); }
.vp-temp .ht-fact b { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 12.5px; font-weight: 600; color: var(--text); }
.vp-temp .ht-fact b.up { color: var(--up-text, var(--up)); }
.vp-temp .ht-fact b.down { color: var(--down-text, var(--down)); }

/* 次级指数带 */
.v19-subidx {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 16px;
  border-top: 1px solid var(--hairline);
  overflow-x: auto; scrollbar-width: none;
}
.v19-subidx::-webkit-scrollbar { display: none; }
.v19-subidx .sub-idx {
  display: inline-flex; align-items: center; gap: 7px;
  height: 26px; padding: 0 10px; flex: 0 0 auto;
  border: 1px solid var(--border); border-radius: 999px;
  background: var(--panel); font-size: 12px; color: var(--text-dim);
  transition: border-color var(--dur, 150ms) ease, background var(--dur, 150ms) ease;
}
.v19-subidx .sub-idx:hover { border-color: var(--border-strong); background: var(--panel-2); }
.v19-subidx .sub-idx b { font-family: var(--font-mono); font-weight: 600; }
.v19-subidx .sub-idx .chg { font-family: var(--font-mono); font-weight: 600; }
.v19-subidx .sub-idx .chg.up { color: var(--up-text, var(--up)); }
.v19-subidx .sub-idx .chg.down { color: var(--down-text, var(--down)); }
.v19-subidx .more-link { margin-left: auto; flex: 0 0 auto; }

/* ==========================================================================
   4. 今日主线（三视角卡）
   ========================================================================== */
.v19-themes .theme-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; padding: 4px 16px 10px; }
.v19-themes .theme-view { display: block; min-width: 0; }
.v19-themes .theme-view[hidden] { display: none; }
.v19-themes .t-row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 10px; align-items: center;
  padding: 8px 0; border-bottom: 1px solid var(--hairline);
  min-width: 0;
}
.v19-themes .t-row:hover { background: var(--panel-2); }
.v19-themes .t-name { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; min-width: 0; }
.v19-themes .t-name .t-index { font-family: var(--font-mono); font-size: 12px; color: var(--muted); width: 16px; flex: 0 0 auto; text-align: right; }
.v19-themes .t-name em { font-style: normal; flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v19-themes .t-leader {
  display: inline-flex; align-items: center; gap: 3px;
  height: 20px; padding: 0 7px; flex: 0 0 auto;
  border-radius: var(--radius-sm);
  background: var(--panel-3); color: var(--text-dim); font-size: 12px;
}
.v19-themes .t-leader b { color: var(--text); font-weight: 600; }
.v19-themes .t-value { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 12.5px; font-weight: 650; white-space: nowrap; }
.v19-themes .t-value.up { color: var(--up-text, var(--up)); }
.v19-themes .t-value.down { color: var(--down-text, var(--down)); }
.v19-themes .t-bar { grid-column: 1 / -1; height: 4px; border-radius: 999px; background: var(--panel-3); overflow: hidden; }
.v19-themes .t-bar i { display: block; height: 100%; border-radius: 999px; }
.v19-themes .t-bar i.up { background: var(--up); }
.v19-themes .t-bar i.down { background: var(--down); }
@media (max-width: 767px) {
  .v19-themes .theme-list { grid-template-columns: minmax(0, 1fr); }
}

/* ==========================================================================
   5. 首页三榜 + 自选
   ========================================================================== */
/* 三榜独占整行（不挤在 home-grid 的列里），三列等宽 */
.v19-boards { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.v19-boards .panel { min-width: 0; }
/* 三榜卡片较窄：表格压紧列宽，去掉横向滚动裁切 */
.v19-boards .panel-body.flush { overflow: hidden; }
.v19-boards .table-wrap { overflow-x: hidden; }
.v19-boards .data-table { table-layout: fixed; width: 100%; }
.v19-boards .data-table th,
.v19-boards .data-table td { padding-left: 8px; padding-right: 8px; }
.v19-boards .data-table .rank { width: 32px; }
.v19-boards .data-table .sym .nm { font-size: 12.5px; }
/* 成交额列在窄卡片里让位给名称与涨跌幅 */
.v19-boards .data-table th:last-child,
.v19-boards .data-table td:last-child { padding-right: 10px; }
.v19-boards .data-table td.num,
.v19-boards .data-table th.num { font-size: 12px; }
/* 列宽：名次与涨跌幅固定，名称自适应 */
.v19-boards .data-table th:nth-child(1),
.v19-boards .data-table td:nth-child(1) { width: 30px; }
.v19-boards .data-table th:nth-child(4),
.v19-boards .data-table td:nth-child(4) { width: 76px; }
.v19-boards .data-table .pct,
.v19-boards .data-table td.num { white-space: nowrap; }
.v19-boards .data-table .sym .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 1279px) {
  .v19-boards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .v19-boards .panel:nth-child(3) { grid-column: 1 / -1; }
}
@media (max-width: 767px) {
  .v19-boards { grid-template-columns: minmax(0, 1fr); }
}

/* 首页布局骨架 */
.v19-home { display: flex; flex-direction: column; gap: 12px; }
.v19-home .home-mid { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: 12px; align-items: start; }
.v19-home .home-mid > .panel { min-width: 0; }
.v19-home .home-watch { min-width: 0; }
@media (max-width: 1279px) {
  .v19-home .home-mid { grid-template-columns: minmax(0, 1fr); }
}

/* ==========================================================================
   6. 移动端脉搏条
   ========================================================================== */
@media (max-width: 767px) {
  .v19-pulse .vp-main { display: block; }
  .v19-pulse .vp-scroll {
    display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  }
  .v19-pulse .vp-scroll::-webkit-scrollbar { display: none; }
  .v19-pulse .vp-idx {
    flex: 0 0 74%; scroll-snap-align: start;
    padding: 14px 16px 12px;
    border-right: 1px solid var(--hairline);
  }
  .v19-pulse .vp-idx + .vp-idx { border-left: 0; }
  .v19-pulse .hi-price { font-size: 24px; }
  .v19-pulse .vp-temp {
    border-left: 0; border-top: 1px solid var(--hairline);
    border-radius: 0;
  }
}

/* 平板：指数三列 + 温度整行 */
@media (min-width: 768px) and (max-width: 1023px) {
  .v19-pulse .vp-main { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .v19-pulse .vp-temp { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--hairline); }
  .v19-pulse .ht-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 18px; flex: 0 1 460px; max-width: 460px; }
  .v19-pulse .hi-price { font-size: 22px; }
  .v19-pulse .hi-amt-label { display: none; }
}

/* ==========================================================================
   7. 板块行情：领涨 / 领跌两端带
   ========================================================================== */
.v19-ends {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--panel); margin-bottom: 12px; overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.v19-ends .ends-col { padding: 12px 16px; border-right: 1px solid var(--hairline); min-width: 0; }
.v19-ends .ends-col:last-child { border-right: 0; }
.v19-ends .ends-head { font-size: 12px; font-weight: 650; letter-spacing: 0.02em; margin-bottom: 9px; }
.v19-ends .ends-head.up { color: var(--up-text, var(--up)); }
.v19-ends .ends-head.down { color: var(--down-text, var(--down)); }
.v19-ends .ends-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.v19-ends .end-chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 26px; padding: 0 10px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--panel-2);
  font-size: 12px; color: var(--text-dim);
  transition: border-color var(--dur, 150ms) ease, background var(--dur, 150ms) ease;
}
.v19-ends .end-chip:hover { border-color: var(--border-strong); background: var(--panel-3); }
.v19-ends .end-chip b { font-family: var(--font-mono); font-weight: 600; }
.v19-ends .end-chip.up b { color: var(--up-text, var(--up)); }
.v19-ends .end-chip.down b { color: var(--down-text, var(--down)); }
@media (max-width: 767px) {
  .v19-ends { grid-template-columns: minmax(0, 1fr); }
  .v19-ends .ends-col:first-child { border-right: 0; border-bottom: 1px solid var(--hairline); }
}

/* ==========================================================================
   8. 资金流 KPI 结论条（v8 kpiGrid v19 化）
   ========================================================================== */
.ffv8-kpis {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--panel); margin-bottom: 12px; overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.ffv8-kpis .kpi-cell {
  padding: 13px 16px; border-right: 1px solid var(--hairline);
  display: flex; flex-direction: column; gap: 3px; min-width: 0;
}
.ffv8-kpis .kpi-cell:last-child { border-right: 0; }
.ffv8-kpis .kpi-cell span { font-size: 12px; color: var(--muted); }
.ffv8-kpis .kpi-cell b {
  font-family: var(--font-mono); font-variant-numeric: tabular-nums;
  font-size: 20px; font-weight: 650; letter-spacing: -0.01em; overflow-wrap: anywhere;
}
.ffv8-kpis .kpi-cell b.up { color: var(--up-text, var(--up)); }
.ffv8-kpis .kpi-cell b.down { color: var(--down-text, var(--down)); }
.ffv8-kpis .kpi-cell small { font-size: 12px; color: var(--muted); }
@media (max-width: 767px) {
  .ffv8-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ffv8-kpis .kpi-cell:nth-child(2n) { border-right: 0; }
  .ffv8-kpis .kpi-cell:nth-child(-n + 2) { border-bottom: 1px solid var(--hairline); }
}

/* ==========================================================================
   9. 蝶形双极 v19 化（对齐 ffv8-bf-* 现有类）
   ========================================================================== */
.ffv8-bf-head {
  display: grid; grid-template-columns: minmax(0, 1fr) auto 22px minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px; padding: 8px 16px;
  font-size: 12px; color: var(--muted);
  border-bottom: 1px solid var(--hairline);
}
.ffv8-bf-head .l { text-align: left; }
.ffv8-bf-head .r { text-align: right; }
.ffv8-bf-row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto 22px auto minmax(0, 1fr);
  gap: 10px; align-items: center;
  height: 38px; padding: 0 16px;
  border-bottom: 1px solid var(--hairline);
}
.ffv8-bf-row:last-child { border-bottom: 0; }
.ffv8-bf-row:hover { background: var(--panel-2); }
.ffv8-bf-side { display: flex; align-items: center; min-width: 0; height: 100%; }
.ffv8-bf-side.l { flex-direction: row-reverse; }
.ffv8-bf-side .val {
  font-family: var(--font-mono); font-variant-numeric: tabular-nums;
  font-size: 12.5px; font-weight: 650; white-space: nowrap;
}
.ffv8-bf-side .val.up { color: var(--up-text, var(--up)); }
.ffv8-bf-side .val.down { color: var(--down-text, var(--down)); }
.ffv8-bf-side .bar {
  flex: 0 0 auto; height: 8px; border-radius: 999px;
  background: var(--panel-3); position: relative; overflow: hidden;
  width: 40%;
}
.ffv8-bf-side.l .bar.pos { left: 0; background: var(--up); }
.ffv8-bf-side.r .bar.neg { right: 0; background: var(--down); }
.ffv8-bf-name {
  display: flex; flex-direction: column; gap: 1px; min-width: 0;
  border: 0; background: transparent; text-align: left; cursor: pointer;
  padding: 0; font-family: inherit;
}
.ffv8-bf-name .t { font-size: 12.5px; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ffv8-bf-name .m { font-family: var(--font-mono); font-size: 12px; color: var(--muted); white-space: nowrap; }
.ffv8-bf-center {
  width: 22px; height: 18px; line-height: 18px; border-radius: 5px;
  background: var(--panel-3); color: var(--muted);
  font-family: var(--font-mono); font-size: 12px; text-align: center;
}

/* ==========================================================================
   10. 登录页 v19 化
   ========================================================================== */
.lg-brand { background: #0b0e14; color: #e7ecf5; }
.lg-brand .lg-mark { display: inline-flex; width: 34px; height: 34px; align-items: center; justify-content: center; }
.lg-brand .lg-mark img { width: 34px; height: 34px; object-fit: contain; }
.lg-brand .lg-brand-name { font-size: 16px; font-weight: 700; letter-spacing: 0.01em; }
.lg-brand .lg-brand-kind { font-size: 12px; color: #8a94a6; letter-spacing: 0.08em; margin-left: 2px; }
.lg-brand .lg-eyebrow { font-size: 12px; letter-spacing: 0.14em; color: #e8b45c; }
.lg-brand h1 { font-size: clamp(28px, 3.2vw, 40px); font-weight: 650; letter-spacing: -0.02em; line-height: 1.18; margin: 0; }
.lg-brand h1 em { font-style: normal; color: #e8b45c; }
.lg-brand .lg-brand-sub { color: #8a94a6; font-size: 14px; line-height: 1.7; max-width: 46ch; }
.lg-brand .lg-tier { border: 1px solid #1c2432; border-radius: 10px; background: rgba(232, 180, 92, 0.04); padding: 13px 16px; }
.lg-brand .lg-tier.on { border-color: rgba(232, 180, 92, 0.55); background: rgba(232, 180, 92, 0.09); }
.lg-brand .lg-tier-name { font-size: 13.5px; font-weight: 600; }
.lg-brand .lg-tier-name::before {
  content: attr(data-step); display: inline-flex; margin-right: 10px;
  font-family: var(--font-mono); font-size: 12px; color: #e8b45c;
  border: 1px solid rgba(232, 180, 92, 0.4); border-radius: 6px; padding: 2px 7px;
  vertical-align: 2px;
}
.lg-brand .lg-tier-note { font-size: 12px; color: #8a94a6; margin-top: 2px; }

/* ==========================================================================
   11. 轻页面对齐（真实类名：自选 / 账户 / 订阅 / 搜索）
   ========================================================================== */

/* ---------- 我的自选 ---------- */
.watch-toolbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 12px 16px; border-bottom: 1px solid var(--hairline);
}
.watch-toolbar-hint { font-size: 12px; color: var(--muted); }
.watch-hot-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.watch-hot-chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 28px; padding: 0 11px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--panel);
  color: var(--text-dim); font-size: 12px; cursor: pointer;
  transition: border-color 150ms ease, color 150ms ease;
}
.watch-hot-chip:hover { border-color: var(--accent); color: var(--accent); }
.watch-hot-chip svg { width: 12px; height: 12px; }
.watch-row-name b { font-size: 13px; font-weight: 600; }
.watch-row-name span { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.watch-row-main { min-width: 0; }
.watch-row-actions .btn { height: 28px; }
.watch-empty-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; border-radius: 999px;
  background: var(--accent-dim); color: var(--accent);
}

/* ---------- 账户信息 ---------- */
.account-hero-main { min-width: 0; }
.profile-avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; border-radius: 999px;
  background: var(--accent); color: var(--panel); font-size: 18px; font-weight: 650;
}
:root[data-theme="dark"] .profile-avatar { color: #171208; }
.profile-name { font-size: 16px; font-weight: 650; }
.profile-meta { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.account-hero-actions { margin-left: auto; display: flex; gap: 8px; }
.account-kv .kv-row {
  display: flex; align-items: center; justify-content: space-between;
  height: 34px; border-bottom: 1px solid var(--hairline); font-size: 12.5px;
}
.account-kv .kv-row:last-child { border-bottom: 0; }
.account-kv .kv-row .k { color: var(--muted); }
.account-kv .kv-row .v { font-weight: 600; color: var(--text); }
.quick-link {
  display: flex; align-items: center; gap: 10px;
  height: 38px; padding: 0 10px; border-radius: var(--radius-sm);
  color: var(--text-dim); font-size: 13px;
  transition: background 150ms ease;
}
.quick-link:hover { background: var(--panel-2); color: var(--text); }
.quick-link svg:last-child { margin-left: auto; width: 13px; height: 13px; color: var(--faint); }
.card-mini-list { display: flex; gap: 10px; margin-bottom: 12px; }
.card-mini {
  flex: 1 1 0; display: flex; flex-direction: column; gap: 3px;
  padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--panel-2); transition: border-color 150ms ease;
}
.card-mini:hover { border-color: var(--border-strong); }
.card-mini-name { font-size: 12.5px; font-weight: 600; }
.card-mini-list .card-mini > span:nth-child(2),
.card-mini .mono { font-family: var(--font-mono); font-size: 16px; font-weight: 650; }
.card-mini-days { font-size: 12px; color: var(--muted); }

/* ---------- 订阅管理 ---------- */
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.plan-card-top {
  position: relative; padding: 16px;
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--panel-2); cursor: pointer; text-align: left;
  transition: border-color 150ms ease, background 150ms ease;
}
.plan-card-top:hover { border-color: var(--border-strong); }
.plan-selected { border-color: var(--accent); background: var(--accent-dim); }
.plan-name { font-size: 13px; font-weight: 650; }
.plan-price {
  display: block; font-family: var(--font-mono); font-size: 24px;
  font-weight: 650; letter-spacing: -0.01em; margin: 2px 0;
}
.plan-note { font-size: 12px; color: var(--muted); }
.plan-flag {
  position: absolute; top: 12px; right: 12px;
  font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px;
  background: var(--down-dim); color: var(--down-text, var(--down));
}
.benefit-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.benefit {
  padding: 10px 12px; border: 1px solid var(--hairline);
  border-radius: var(--radius); background: var(--panel-2);
}
.benefit b { display: block; font-size: 13px; font-weight: 650; margin-bottom: 3px; }
.benefit span { font-size: 12px; color: var(--muted); line-height: 1.6; }
.buy-dock, .buy-bar {
  border-top: 1px solid var(--border);
  background: var(--panel);
  box-shadow: 0 -2px 12px rgba(16, 24, 40, 0.06);
}
.buy-bar-price { font-family: var(--font-mono); font-size: 18px; font-weight: 650; }
.card-key-wrap {
  display: flex; gap: 8px; align-items: center;
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 4px; background: var(--panel);
}
.card-key-wrap:focus-within { border-color: var(--accent); }
.card-key-wrap input { flex: 1 1 auto; min-width: 0; border: 0; outline: 0; background: transparent; padding: 0 8px; font-family: var(--font-mono); font-size: 14px; }
.card-key-submit { height: 32px; padding: 0 14px; border-radius: var(--radius-sm); font-weight: 650; letter-spacing: 0.02em; }
@media (max-width: 767px) {
  .benefit-list { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- 全局搜索 ---------- */
.search-bar {
  display: flex; align-items: center; gap: 10px;
  height: 50px; padding: 0 16px;
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--panel); margin-bottom: 12px;
  transition: border-color 150ms ease;
}
.search-bar:focus-within { border-color: var(--accent); }
.search-bar-icon { width: 18px; height: 18px; color: var(--muted); flex: 0 0 auto; }
.search-input {
  flex: 1 1 auto; min-width: 0; height: 100%;
  border: 0; outline: 0; background: transparent;
  font-size: 16px; color: var(--text);
}
.search-input::placeholder { color: var(--muted); }
.search-kbd-hint {
  font-family: var(--font-mono); font-size: 12px; color: var(--muted);
  border: 1px solid var(--border); border-radius: 4px; padding: 2px 6px;
  background: var(--panel-2);
}
.search-picks { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.search-pick {
  display: inline-flex; align-items: center; gap: 6px;
  height: 28px; padding: 0 11px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--panel);
  color: var(--text-dim); font-size: 12px; cursor: pointer;
  transition: border-color 150ms ease, color 150ms ease;
}
.search-pick:hover { border-color: var(--accent); color: var(--accent); }
.search-page { max-width: 860px; margin: 0 auto; width: 100%; }
.search-panel { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.search-status { font-size: 12px; color: var(--muted); padding: 0 2px 8px; }
.search-panel .search-row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto;
  gap: 12px; align-items: center; height: 42px; padding: 0 16px;
  border-bottom: 1px solid var(--hairline);
  transition: background 150ms ease;
}
.search-panel .search-row:last-child { border-bottom: 0; }
.search-panel .search-row:hover,
.search-panel .search-row.is-active { background: var(--panel-2); }
.search-row-name b { font-size: 13.5px; font-weight: 600; }
.search-row-name mark { background: var(--accent-dim); color: var(--accent); padding: 0 1px; }
.search-row-ident { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.search-row-quote { font-family: var(--font-mono); font-size: 13px; text-align: right; }
.search-row-board { font-size: 12px; color: var(--muted); }

/* ==========================================================================
   11b. 指数行情：全景侧栏 + 英雄快照（v19）
   ========================================================================== */
.idx-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 12px; align-items: start; }
.idx-main { min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.idx-main > section { margin-bottom: 0; }

/* 英雄快照 */
.idx-hero-v19 {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.5fr);
  gap: 14px 24px; align-items: center;
  padding: 16px 18px 14px;
}
.idx-hero-v19 .ih-name { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 650; }
.idx-hero-v19 .ih-name .hi-code { font-family: var(--font-mono); font-size: 12px; font-weight: 400; color: var(--muted); }
.idx-hero-v19 .ih-row { display: flex; align-items: center; gap: 10px; margin-top: 6px; flex-wrap: wrap; }
.idx-hero-v19 .ih-price {
  font-family: var(--font-mono); font-variant-numeric: tabular-nums;
  font-size: 30px; font-weight: 650; letter-spacing: -0.01em; line-height: 1.05;
}
.idx-hero-v19 .ih-price.up { color: var(--up-text, var(--up)); }
.idx-hero-v19 .ih-price.down { color: var(--down-text, var(--down)); }
.idx-hero-v19 .ih-chg { font-size: 12px; color: var(--muted); }
.idx-hero-v19 .ih-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 18px; }
.idx-hero-v19 .ih-stat {
  display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
  font-size: 12px; color: var(--muted);
  border-bottom: 1px solid var(--hairline); padding-bottom: 6px;
}
.idx-hero-v19 .ih-stat b { font-weight: 600; color: var(--text); font-family: var(--font-mono); }
.idx-hero-v19 .ih-stat b.up { color: var(--up-text, var(--up)); }
.idx-hero-v19 .ih-stat b.down { color: var(--down-text, var(--down)); }

/* 全景侧栏 */
.idx-pano { min-width: 0; }
.idx-pano .panel-body { padding: 0; }
.pano-list { display: flex; flex-direction: column; }
.pano-row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; align-items: center;
  width: 100%; padding: 10px 14px; border: 0; border-bottom: 1px solid var(--hairline);
  background: transparent; text-align: left; cursor: pointer; min-width: 0;
  transition: background 150ms ease;
}
.pano-row:last-of-type { border-bottom: 0; }
.pano-row:hover { background: var(--panel-2); }
.pano-row.active { background: var(--accent-dim); box-shadow: inset 2px 0 0 var(--accent); }
.pano-row .p-name { font-size: 12.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pano-row .p-name i { font-style: normal; font-family: var(--font-mono); font-size: 12px; font-weight: 400; color: var(--muted); margin-left: 5px; }
.pano-row .p-right { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.pano-row .p-right b { font-family: var(--font-mono); font-size: 12.5px; font-weight: 600; }
.pano-spark { width: 100%; height: 22px; }
.pano-spark polyline { fill: none; stroke-width: 1.5; vector-effect: non-scaling-stroke; }
@media (max-width: 1279px) {
  .idx-layout { grid-template-columns: minmax(0, 1fr); }
  .idx-pano { order: -1; }
  .pano-list { flex-direction: row; overflow-x: auto; scrollbar-width: none; }
  .pano-list::-webkit-scrollbar { display: none; }
  .pano-row { flex: 0 0 152px; display: flex; flex-direction: column; align-items: stretch; gap: 6px; border-bottom: 0; border-right: 1px solid var(--hairline); }
  .pano-row.active { box-shadow: inset 0 2px 0 var(--accent); }
}
@media (max-width: 767px) {
  .idx-hero-v19 { grid-template-columns: minmax(0, 1fr); padding: 14px; }
  .idx-hero-v19 .ih-price { font-size: 26px; }
}

/* ==========================================================================
   11c. 大盘异动：KPI 条 + 类型 chips + 事件流（v19 盘口雷达）
   ========================================================================== */
.chg-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 12px; align-items: start; }
.chg-layout > * { min-width: 0; }
.ev-filter {
  display: flex; gap: 6px; flex-wrap: wrap;
  padding: 10px 14px; border-bottom: 1px solid var(--hairline);
}
.ev-chip {
  display: inline-flex; align-items: center; gap: 4px;
  height: 26px; padding: 0 11px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--panel);
  color: var(--text-dim); font-size: 12px; cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease;
}
.ev-chip:hover { border-color: var(--border-strong); background: var(--panel-2); }
.ev-chip.on { background: var(--accent-dim); border-color: var(--accent); color: var(--accent); font-weight: 600; }
.ev-chip b { font-family: var(--font-mono); font-weight: 600; }
.ev-list { display: flex; flex-direction: column; }
.ev-row {
  display: grid; grid-template-columns: 62px auto minmax(0, 1fr) auto auto;
  gap: 10px; align-items: center;
  height: 38px; padding: 0 14px;
  border-bottom: 1px solid var(--hairline);
  transition: background 150ms ease;
}
.ev-row:last-child { border-bottom: 0; }
.ev-row:hover { background: var(--panel-2); }
.ev-time { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.ev-tag {
  display: inline-flex; align-items: center; height: 20px; padding: 0 7px;
  border-radius: var(--radius-sm); font-size: 12px;
  background: var(--panel-3); color: var(--text-dim); white-space: nowrap;
}
.ev-tag.up { background: var(--up-dim); color: var(--up-text, var(--up)); }
.ev-tag.down { background: var(--down-dim); color: var(--down-text, var(--down)); }
.ev-name { font-size: 12.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev-name i { font-style: normal; font-family: var(--font-mono); font-size: 12px; font-weight: 400; color: var(--muted); margin-left: 5px; }
.ev-price { font-family: var(--font-mono); font-size: 12.5px; color: var(--text-dim); text-align: right; }
.ev-pct { font-family: var(--font-mono); font-size: 12.5px; font-weight: 650; min-width: 60px; text-align: right; }
.ev-pct.up { color: var(--up-text, var(--up)); }
.ev-pct.down { color: var(--down-text, var(--down)); }
/* 事件流「加载更多」按钮 */
.ev-list .list-more {
  width: 100%; height: 40px;
  border: 0; border-top: 1px solid var(--hairline);
  background: var(--panel-2); color: var(--text-dim);
  font-size: 12.5px; cursor: pointer;
  transition: background 150ms ease, color 150ms ease;
}
.ev-list .list-more:hover { background: var(--panel-3); color: var(--text); }

/* 板块异动栏 */
.bd-list { display: flex; flex-direction: column; }
.bd-row {
  display: flex; flex-direction: column; gap: 5px;
  padding: 9px 14px; border-bottom: 1px solid var(--hairline);
  transition: background 150ms ease;
}
.bd-row:last-child { border-bottom: 0; }
.bd-row:hover { background: var(--panel-2); }
.bd-line1 { display: flex; align-items: center; gap: 8px; }
.bd-name { font-size: 12.5px; font-weight: 600; flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bd-name i { font-style: normal; font-family: var(--font-mono); font-size: 12px; font-weight: 400; color: var(--muted); margin-left: 4px; }
.bd-line2 { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.bd-line2 b { font-weight: 600; }
@media (max-width: 1279px) {
  .chg-layout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 767px) {
  .ev-row { grid-template-columns: minmax(0, 1fr) auto auto; height: auto; padding: 9px 12px; row-gap: 4px; }
  .ev-time, .ev-price { display: none; }
  .ev-tag { grid-column: 1; justify-self: start; }
  .ev-name { grid-column: 1; }
  .ev-pct { grid-row: span 3; align-self: center; }
}

/* ==========================================================================
   11d. 详情页：tab 页签 + 公众号式密度（个股 / 板块）
   ========================================================================== */
/* tab 页签条：替代旧的 page-tabs 下划线，改为 v19 分段控件观感 */
.sector-detail-page .page-tabs,
.stock-page .page-tabs {
  display: inline-flex; align-items: center; gap: 2px;
  padding: 3px; margin: 0 0 12px;
  border-radius: var(--radius-sm);
  background: var(--panel-3); border: 1px solid var(--hairline);
  flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none;
  max-width: 100%;
}
.sector-detail-page .page-tabs::-webkit-scrollbar,
.stock-page .page-tabs::-webkit-scrollbar { display: none; }
.sector-detail-page .ptab,
.stock-page .ptab {
  display: inline-flex; align-items: center;
  height: 28px; padding: 0 14px; border-radius: 3px;
  font-size: 12.5px; color: var(--muted); white-space: nowrap;
  transition: background 150ms ease, color 150ms ease;
}
.sector-detail-page .ptab:hover,
.stock-page .ptab:hover { color: var(--text); }
.sector-detail-page .ptab.active,
.stock-page .ptab.active {
  background: var(--panel); color: var(--text);
  font-weight: 600; box-shadow: 0 1px 2px rgba(16, 24, 40, 0.08);
}
:root[data-theme="dark"] .sector-detail-page .ptab.active,
:root[data-theme="dark"] .stock-page .ptab.active { background: var(--panel-2); box-shadow: none; }
@media (max-width: 767px) {
  .sector-detail-page .page-tabs,
  .stock-page .page-tabs { width: 100%; }
  .sector-detail-page .ptab,
  .stock-page .ptab { flex: 1 1 0; justify-content: center; padding: 0 6px; }
}
/* 详情页首屏快照紧凑化 */
.sector-detail-content > .panel:first-child .panel-body,
.stocks-content > .panel:first-child .panel-body { padding: 14px 16px; }

/* ==========================================================================
   12. 移动端统一收尾
   ========================================================================== */
@media (max-width: 767px) {
  .v19-context { margin-bottom: 10px; }
  .v19-themes .theme-list { padding: 4px 14px 10px; }
  .v19-ends .ends-col { padding: 12px 14px; }
  .ffv8-bf-row, .ffv8-bf-head { padding-left: 14px; padding-right: 14px; }
}
