/* === 配色皮肤变量（UI 色抽变量，随 [data-theme] 切换；数据语义色涨跌红绿/冰点/恐贪色阶/信号色保持硬编码）=== */
:root {
  --bg-page: #f5f6f8;        /* 页面背景 */
  --bg-card: #fff;           /* 卡片/容器背景 */
  --bg-hover: #f7f8fa;       /* hover/浅底 */
  --bg-active: #f0f5ff;     /* 激活浅底 */
  --border: #e5e6eb;         /* 边框 */
  --border-strong: #d9dce0;  /* 强边框 */
  --text-1: #1f2329;         /* 主文字 */
  --text-2: #4e5969;         /* 次文字 */
  --text-3: #86909c;         /* 弱文字 */
  --text-4: #c9cdd4;        /* 最弱文字 */
  --primary: #165dff;        /* 主色 */
  --primary-hover: #0e42d2;  /* 主色 hover */
  --primary-bg: #f0f5ff;     /* 主色浅底 */
  --shadow: rgba(0,0,0,0.04);/* 卡片阴影 */
  --shadow-strong: rgba(0,0,0,0.12); /* 强阴影 */
  --radius-sm: 6px;             /* 方角切换组圆角 */
  --radius-pill: 999px;         /* 药丸标签圆角 */
}
/* 深色专业（金融终端风）*/
[data-theme="dark"] {
  --bg-page: #0d1117;
  --bg-card: #161b22;
  --bg-hover: #21262d;
  --bg-active: #1c2333;
  --border: #30363d;
  --border-strong: #484f58;
  --text-1: #e6edf3;
  --text-2: #b1bac4;
  --text-3: #7d8590;
  --text-4: #484f58;
  --primary: #58a6ff;
  --primary-hover: #79b8ff;
  --primary-bg: #1c2536;
  --shadow: rgba(0,0,0,0.3);
  --shadow-strong: rgba(0,0,0,0.5);
}
/* 红金中国风 */
[data-theme="redgold"] {
  --bg-page: #1a1d29;
  --bg-card: #252836;
  --bg-hover: #2d3142;
  --bg-active: #3a2e1a;
  --border: #3a3d4d;
  --border-strong: #545767;
  --text-1: #f0e6c4;
  --text-2: #c4b896;
  --text-3: #8a7f5e;
  --text-4: #5c5444;
  --primary: #f0b90b;
  --primary-hover: #ffc933;
  --primary-bg: #2a2410;
  --shadow: rgba(0,0,0,0.3);
  --shadow-strong: rgba(0,0,0,0.5);
}
/* 莫兰迪柔和 */
[data-theme="morandi"] {
  --bg-page: #f5f1ec;
  --bg-card: #fffaf3;
  --bg-hover: #ede7df;
  --bg-active: #e6e9ed;
  --border: #d9d3cb;
  --border-strong: #c2bbb0;
  --text-1: #3d3a35;
  --text-2: #6b665e;
  --text-3: #9a948a;
  --text-4: #b8b2a6;
  --primary: #6b7c93;
  --primary-hover: #5a6b82;
  --primary-bg: #e6e9ed;
  --shadow: rgba(120,110,90,0.06);
  --shadow-strong: rgba(120,110,90,0.14);
}
/* 深色/红金主题：浮动按钮（深灰半透明 bg 在深底不可见，改浅色半透明）*/
[data-theme="dark"] .back-to-top,
[data-theme="redgold"] .back-to-top { background: rgba(255,255,255,0.18); }
[data-theme="dark"] .back-to-top:hover,
[data-theme="redgold"] .back-to-top:hover { background: rgba(255,255,255,0.32); }
[data-theme="dark"] .sim-close,
[data-theme="redgold"] .sim-close { background: rgba(255,255,255,0.22); }
[data-theme="dark"] .sim-close:hover,
[data-theme="redgold"] .sim-close:hover { background: rgba(255,255,255,0.38); }
[data-theme="dark"] .rule-float-btn { background: rgba(88,166,255,0.72); box-shadow: 0 2px 8px rgba(88,166,255,0.25); }
[data-theme="dark"] .rule-float-btn:hover { background: rgba(88,166,255,0.92); }
[data-theme="redgold"] .rule-float-btn { background: rgba(240,185,11,0.72); box-shadow: 0 2px 8px rgba(240,185,11,0.25); }
[data-theme="redgold"] .rule-float-btn:hover { background: rgba(240,185,11,0.92); }
[data-theme="morandi"] .rule-float-btn { background: rgba(107,124,147,0.72); box-shadow: 0 2px 8px rgba(107,124,147,0.25); }
[data-theme="morandi"] .rule-float-btn:hover { background: rgba(107,124,147,0.92); }
/* 深色/红金主题：chart-hint 浅暖底 + 今日行浅橙底在深底刺眼且浅色文字看不清，改主题底 */
[data-theme="dark"] .chart-hint,
[data-theme="redgold"] .chart-hint { background: var(--bg-hover); border-color: var(--border-strong); border-left-color: var(--primary); }
[data-theme="dark"] .sig-day-row.today-row,
[data-theme="redgold"] .sig-day-row.today-row { background: var(--bg-active); }

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg-page);
  color: var(--text-1);
}
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 24px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
}
header h1 { font-size: 18px; margin: 0; }
/* 分享按钮：PC header 右上角 */
.pc-share-btn {
  margin-left: 8px;
  border: 1px solid var(--primary); background: var(--primary); color: #fff;
  border-radius: 16px; padding: 5px 14px; font-size: 13px; cursor: pointer;
  transition: opacity 0.15s;
}
.pc-share-btn:hover { opacity: 0.88; }
/* 导航吸顶开关（分享按钮左侧，PC header 右上角） */
.pc-nav-sticky-toggle {
  margin-left: auto; border:1px solid var(--border-strong); background:var(--bg-card);
  color:var(--text-2); border-radius:16px; padding:5px 12px; font-size:13px;
  cursor:pointer; transition:all .15s; user-select:none;
}
.pc-nav-sticky-toggle.off { border-color:var(--text-4); opacity:.6; }
.pc-nav-sticky-toggle:hover { background:var(--bg-hover); }
/* H5 隐藏 PC 分享按钮（H5 用顶部条内的图标按钮） */
.h5-share-btn { display: none; }
/* 采集时间（分享按钮旁）；PC 显示完整，H5 默认隐藏、@media 显示精简版 */
.pc-collect-time { font-size: 12px; color: var(--text-3); margin-left: 10px; white-space: nowrap; }
.h5-collect-time { display: none; }

/* 分享图 modal */
.share-modal-body { width: min(96vw, 1120px); max-width: 1120px; max-height: 92vh; }
.share-content { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 8px 4px 4px; }
.share-img { width: 100%; max-width: 540px; height: auto; border-radius: 12px; box-shadow: 0 4px 16px var(--shadow-strong); }
.share-download-btn {
  display: inline-block; background: var(--primary); color: #fff; text-decoration: none;
  border-radius: 8px; padding: 10px 28px; font-size: 15px; font-weight: 600;
}
.share-download-btn:hover { opacity: 0.9; }
@media (max-width: 768px) {
  .pc-share-btn { display: none; }
  .pc-nav-sticky-toggle { display: none; }
  .h5-share-btn {
    display: inline-flex; border: 1px solid var(--border-strong); background: var(--bg-card); border-radius: 12px;
    padding: 3px 10px; font-size: 16px; cursor: pointer; color: var(--text-2); line-height: 1;
  }
  .h5-share-btn:active { background: var(--bg-hover); }
  .share-img { max-width: 100%; }
}
.periods button {
  margin-left: 6px;
  padding: 6px 12px;
  border: 1px solid var(--border-strong);
  background: var(--bg-card);
  color: var(--text-2);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 13px;
}
.periods button.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.periods button.ghost { background: transparent; }

/* 弹窗内的时间段选择按钮 */
.signal-chart-periods {
  margin-left: 16px;
  display: inline-block;
}
.signal-chart-periods .lab-signal-period-btn {
  margin-left: 6px;
  padding: 4px 10px;
  font-size: 11px;
  border: 1px solid var(--border-strong);
  background: var(--bg-card);
  border-radius: 6px;
  cursor: pointer;
}
.signal-chart-periods .lab-signal-period-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.signal-chart-periods .lab-signal-period-btn:hover {
  background: var(--bg-hover);
}
.tabs {
  display: flex;
  gap: 4px;
  padding: 0 24px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  position: sticky;   /* UX：tab 栏滚动时悬浮顶部（周期选择器 .periods 在右端，随之悬浮）*/
  top: 0;
  z-index: 50;
  box-shadow: 0 1px 3px var(--shadow);
}
/* 关闭导航吸顶：tab 栏 / 规则条 / 行业锚点条回归文档流（方便截图） */
.nav-no-sticky .tabs,
.nav-no-sticky .rule-bar,
.nav-no-sticky .industry-anchor-bar { position: static; }
.tabs > button {   /* 仅直接子（tab 按钮），不影响 .periods 内的周期按钮 */
  padding: 10px 18px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 14px;
  border-bottom: 2px solid transparent;
  color: var(--text-2);
}
.tabs > button.active { color: var(--primary); border-bottom-color: var(--primary); }
/* UX：周期选择器贴 tab 栏右端，随 sticky tab 栏悬浮顶部右上角 */
.tabs .periods {
  margin-left: auto;
  display: flex;
  align-items: center;
}
main { padding: 16px 24px; }
.loading { color: var(--text-3); padding: 40px 20px; text-align: center; }
/* 加载中状态：spinner + 文字，让用户明确看到正在加载而非卡死 */
.loading--active, .loading--error { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.loading__spinner { width: 28px; height: 28px; border: 3px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: sim-spin 0.8s linear infinite; }
.loading__text { font-size: 14px; color: var(--text-3); }
.loading__hint { font-size: 12px; color: var(--text-4); }
.loading__retry { padding: 8px 24px; border: 1px solid var(--primary); border-radius: 6px; background: transparent; color: var(--primary); cursor: pointer; font-size: 14px; transition: background 0.15s, color 0.15s; }
.loading__retry:hover { background: var(--primary); color: var(--bg-card); }

.chart-card {
  background: var(--bg-card);
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px var(--shadow);
  position: relative;
}
.chart-card h3 { margin: 0 0 8px; font-size: 14px; color: var(--text-1); padding-right: 4px; }
/* 盘中标注角标：右下角浮动药丸(absolute 不占位)，半透明毛玻璃背景像贴纸浮于内容之上，区分盘中(绿)/午休(黄)/待收盘(灰)/收盘(主题色) */
/* 角标定位规则（UI-P1-4：评估后保留 absolute，未统一为 flex 标题行）：chart-card 右上 / spark·kpi 右下 / industry 右上 / heatmap 回右下。
   因 spark/kpi 无标准 h3、heatmap 特殊布局，统一为 flex 标题行会波及多个渲染函数，风险高于收益，故保留 absolute 覆盖规则。 */
.card-time-badge {
  position: absolute;
  bottom: 6px;
  right: 8px;
  font-size: 11px;
  line-height: 1.5;
  padding: 1px 7px;
  border-radius: 10px;
  white-space: nowrap;
  z-index: 5;
  pointer-events: auto;
  background: color-mix(in srgb, var(--bg-card) 82%, transparent);
  border: 1px solid var(--border);
  max-width: 60%;
  overflow: hidden;
  text-overflow: ellipsis;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  box-shadow: 0 1px 4px rgba(0,0,0,0.12);
}
.card-time-badge.intraday { color: #2e8b57; border-color: rgba(46,139,87,0.5); background: rgba(46,139,87,0.2); }
.card-time-badge.lunch { color: #e6a23c; border-color: rgba(230,162,60,0.5); background: rgba(230,162,60,0.2); }
.card-time-badge.pending { color: var(--text-3); border-color: var(--border-strong); }
/* 三色语义：绿=最新 / 黄=滞后可接受 / 红=异常 / 灰=停更 */
.card-time-badge.closed { color: #2e8b57; border-color: rgba(46,139,87,0.5); background: rgba(46,139,87,0.2); }
/* T+1正常(已采到最新可得,数据到昨天等明天更新)=灰(待更新,区别于绿=今天最新), 滞后(未到时刻)=黄, 异常(过时刻)=红 */
.card-time-badge.t1 { color: var(--text-3); border-color: var(--border-strong); }
.card-time-badge.t1-stale { color: #e6a23c; border-color: rgba(230,162,60,0.5); background: rgba(230,162,60,0.2); }
.card-time-badge.t1-severe { color: #c62828; border-color: rgba(198,40,40,0.6); background: rgba(198,40,40,0.2); }
/* 数据停更(源端长期停更/公式损坏/半年报,非采集故障)：灰色,区别于滞后(黄)/异常(红) */
.card-time-badge.stale-mark { color: var(--text-3); border-color: var(--border-strong); background: rgba(128,128,128,0.15); }
/* === 数据更新规则弹窗：各数据源实时时效区块（原首页数据时效横幅移入弹窗）=== */
.ur-freshness { margin-top: 4px; }
.ur-fsummary { font-weight: 600; color: var(--text-2); margin-bottom: 8px; }
.ur-fchips { display: flex; flex-wrap: wrap; gap: 6px; }
.ur-fchip {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 2px 8px; border-radius: 10px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg-card) 82%, transparent);
  white-space: nowrap; line-height: 1.5; font-size: 12.5px;
  cursor: help;
}
.ur-fchip .ur-fval { font-size: 11px; }
.ur-fchip.intraday { color: #2e8b57; border-color: rgba(46,139,87,0.5); background: rgba(46,139,87,0.15); }
.ur-fchip.closed { color: #2e8b57; border-color: rgba(46,139,87,0.5); background: rgba(46,139,87,0.15); }
.ur-fchip.t1 { color: var(--text-3); border-color: var(--border-strong); }
.ur-fchip.t1-stale { color: #e6a23c; border-color: rgba(230,162,60,0.6); background: rgba(230,162,60,0.18); }
.ur-fchip.t1-severe { color: #c62828; border-color: rgba(198,40,40,0.7); background: rgba(198,40,40,0.18); }
/* 走势图大卡(.chart-card)右上角空旷，角标放回右上角；基础数据小卡(.card.kpi)保持右下角(右上更盖标题，右下是两害取其轻) */
.chart-card .card-time-badge { top: 6px; right: 8px; bottom: auto; }
/* 热力榜右上被周期按钮占用,角标回退右下 */
.chart-card.hm-badge-bottom .card-time-badge { top: auto; bottom: 6px; right: 8px; }
/* 图表标题"最新数据摘要"高亮（· MM-DD 数值），与标题文字区分便于一眼看到最新值 */
.chart-latest { color: var(--primary); font-weight: 600; background: var(--primary-bg); padding: 1px 6px; border-radius: 8px; white-space: nowrap; }
/* 港股盘中实时标注（快照注入 _snap_intraday=true 时显示在图表标题旁） */
.snap-intraday-tag { color: #e6a23c; font-size: 12px; font-weight: normal; white-space: nowrap; }
/* A：标题旁 ❓ 小问号 hover 提示（专业术语白话，原生 title 属性，无需 JS tooltip） */
.term-tip {
  display: inline-block;
  font-size: 11px;
  color: var(--text-3);
  cursor: help;
  margin-left: 3px;
  vertical-align: middle;
  line-height: 1;
}
.term-tip:hover { color: var(--primary); }
/* ❓ 问号 hover pop 浮层（替代浏览器原生 title，pop 风格：圆角/阴影/主题色边/小箭头）*/
.term-pop {
  position: fixed; z-index: 9999;
  background: var(--bg-card); color: var(--text-1);
  border: 1px solid var(--border-strong); border-left: 3px solid var(--primary);
  border-radius: 8px; padding: 8px 12px;
  box-shadow: 0 4px 14px var(--shadow-strong);
  font-size: 12px; line-height: 1.6; max-width: 320px;
  white-space: pre-line; word-break: break-word;
  animation: termPopIn .12s ease-out;
}
/* 小箭头：默认浮层在元素下方(show 下方优先)，箭头朝上指向元素；.term-pop--up 翻到上方时箭头朝下 */
.term-pop::before {
  content: ""; position: absolute; left: 50%; margin-left: -6px;
  bottom: 100%;
  border: 6px solid transparent;
  border-bottom-color: var(--primary);
  pointer-events: none;
}
.term-pop--up::before {
  bottom: auto; top: 100%;
  border-bottom-color: transparent;
  border-top-color: var(--primary);
}
@keyframes termPopIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}
/* B：卡片底部 muted 白话小字（最晦涩术语常驻解释，区别于橙色 chart-hint） */
.term-plain {
  font-size: 11px;
  color: var(--text-3);
  margin: 6px 4px 4px;
  padding-top: 5px;
  border-top: 1px dashed var(--border);
  line-height: 1.5;
}
/* 情绪分组成因子展开区：折线图卡片下方，默认折叠，散户白话标签（rsi=RSI 等） */
.comp-block { margin: -8px 0 12px; padding: 0 16px; }
.comp-block details { font-size: 12px; color: var(--text-2); }
.comp-block summary { cursor: pointer; color: var(--text-2); user-select: none; line-height: 1.8; }
.comp-block summary:hover { color: var(--primary); }
.comp-list { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px; }
.comp-item { display: inline-flex; align-items: baseline; gap: 4px; }
.comp-k { color: var(--text-3); font-size: 11px; }
.comp-v { color: var(--text-1); font-weight: 600; font-variant-numeric: tabular-nums; }
.comp-date { color: var(--text-4); font-size: 11px; margin-left: 4px; }
/* === 折线图回测 tips（.chart-hint）：散户化多块文案 + 胜率配色梯度 + 凯利折叠详解 === */
.chart-hint {
  font-size: 12px;
  color: var(--text-2);
  background: #fff7e6;            /* 浅暖底，呼应原 #fff2e8 但更柔 */
  border: 1px solid #ffd591;
  border-left: 3px solid #fa8c16; /* 左边框区分，不喧宾夺主 */
  border-radius: 4px;
  padding: 8px 10px;
  margin: 0 0 8px;
  line-height: 1.55;
}
.chart-hint .hint-strategy {
  font-size: 11px;
  color: var(--text-1);
  background: var(--primary-bg);
  border-left: 3px solid var(--primary);
  padding: 4px 8px;
  margin-bottom: 6px;
  border-radius: 2px;
  line-height: 1.5;
}
.chart-hint .hint-header {
  font-size: 11px;
  color: var(--text-3);
  margin-bottom: 4px;
}
.chart-hint .hint-blocks {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.chart-hint .hint-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 3px 10px;
  font-size: 12px;
}
.chart-hint .hint-sig {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 3px;
  font-weight: 600;
  font-size: 11px;
  color: #fff;
  flex-shrink: 0;
}
.chart-hint .hint-sig.buy { background: #e6492e; }
.chart-hint .hint-sig.buy-aux { background: #d63384; }
.chart-hint .hint-sig.sell { background: #2e8b57; }
.chart-hint .hint-stat { color: var(--text-2); font-variant-numeric: tabular-nums; }
.chart-hint .hint-stat b { font-weight: 600; }
.chart-hint .hint-kelly { color: var(--primary); }
.chart-hint .hint-kelly b { font-weight: 700; }
.chart-hint .hint-kelly.warn { color: #d4380d; }
.chart-hint .sim-btn {
  display: inline-block;
  padding: 2px 10px;
  background: linear-gradient(135deg, var(--primary-hover), var(--primary));
  color: #fff;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  text-decoration: none;
  margin-left: 6px;
  transition: all .2s;
  vertical-align: middle;
}
.chart-hint .sim-btn:hover {
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  box-shadow: 0 2px 6px rgba(51,112,255,.3);
  color: #fff;
}
.chart-hint .hint-warn { color: #d4380d; font-weight: 600; }
.chart-hint .hint-note { color: var(--text-3); font-size: 11px; }
.chart-hint .hint-note b { color: #d4380d; font-weight: 600; }

/* 胜率配色梯度：≥60 加粗高亮（越绿越鲜艳）/ 50-59 中性 / <50 警示（越低越红）。
   色盲友好：绿-灰-橙红渐变带亮度差异 + 加粗区分，非纯色相依赖。 */
.chart-hint .wr.wr-excellent { color: #15803d; font-weight: 700; }   /* ≥80 深绿加粗 */
.chart-hint .wr.wr-good { color: #16a34a; font-weight: 700; }        /* 70-79 中绿加粗 */
.chart-hint .wr.wr-fair { color: #65a30d; font-weight: 600; }        /* 60-69 浅绿 */
.chart-hint .wr.wr-neutral { color: var(--text-2); }                       /* 50-59 中性灰（接近随机） */
.chart-hint .wr.wr-weak { color: #d97706; }                          /* 40-49 浅橙 */
.chart-hint .wr.wr-poor { color: #ea580c; font-weight: 600; }        /* 30-39 橙加粗 */
.chart-hint .wr.wr-bad { color: #dc2626; font-weight: 700; }         /* <30 红加粗 */

/* 凯利公式折叠说明（details 原生折叠，散户想看才展开，不占垂直空间） */
.chart-hint .hint-kelly-explain {
  margin-top: 6px;
  font-size: 11px;
}
.chart-hint .hint-kelly-explain > summary {
  cursor: pointer;
  user-select: none;
  color: var(--primary);
  font-size: 11px;
  display: inline-block;
}
.chart-hint .hint-kelly-explain > summary:hover { color: var(--primary-hover); }
.chart-hint .hint-kelly-body {
  margin-top: 4px;
  padding: 6px 8px;
  background: var(--bg-card);
  border: 1px solid #ffe7ba;
  border-radius: 3px;
  font-size: 11px;
  color: var(--text-2);
  line-height: 1.65;
}
.chart-hint .hint-kelly-body > div { margin: 3px 0; }
.chart-hint .hint-kelly-body b { color: var(--text-1); font-weight: 600; }

.chart-hint .hint-disclaimer {
  margin-top: 6px;
  font-size: 11px;
  color: #d4380d;
  font-weight: 600;
}

/* 移动端：hint-row 自然换行后字号略缩，保持可读 */
@media (max-width: 640px) {
  .chart-hint { padding: 6px 8px; }
  .chart-hint .hint-row { font-size: 11px; gap: 2px 8px; }
  .chart-hint .hint-stat,
  .chart-hint .hint-kelly,
  .chart-hint .hint-warn,
  .chart-hint .hint-note { font-size: 11px; }
}

.cards { display: flex; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.card {
  background: var(--bg-card);
  border-radius: 8px;
  padding: 16px 20px;
  min-width: 180px;
  box-shadow: 0 1px 3px var(--shadow);
  position: relative;
}
.card-title { font-size: 13px; color: var(--text-3); padding-right: 4px; }
.card-value { font-size: 32px; font-weight: 600; margin: 4px 0; }
.card-date { font-size: 12px; color: var(--text-4); }
.tag { display: inline-block; padding: 2px 8px; border-radius: var(--radius-pill); font-size: 12px; color: #fff; }
.tag.freeze { background: #e6492e; }
.tag.overheat { background: #2e8b57; }
.tag.fangliang { background: #e6492e; }
.tag.suoliang { background: #2e8b57; }

.sig-list { list-style: none; padding: 0; margin: 0; }
.sig-list li { padding: 6px 0; border-bottom: 1px solid var(--bg-hover); font-size: 13px; }
.sig-list b.buy { color: #e6492e; }
.sig-list b.buy_aux { color: #d63384; }
.sig-list b.sell { color: #2e8b57; }

/* 首页冰点日/买卖点卡片：按日分组、同日4个/行、今日高亮 */
.signal-grid { margin-top: 4px; max-height: 300px; overflow-y: auto; }
.signal-grid::-webkit-scrollbar { width: 6px; }
.signal-grid::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 3px; }
.signal-grid::-webkit-scrollbar-track { background: transparent; }
.sig-day-row { display: flex; align-items: flex-start; gap: 10px; padding: 7px 6px; border-bottom: 1px solid var(--bg-hover); }
.sig-day-row:last-child { border-bottom: none; }
.sig-day-date { flex: 0 0 70px; font-size: 12px; color: var(--text-3); padding-top: 3px; white-space: nowrap; }
.sig-items { flex: 1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px 8px; }
.sig-item { font-size: 13px; line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sig-item b { font-weight: 600; margin-right: 2px; }
.sig-item b.buy { color: #e6492e; }
.sig-item b.buy_aux { color: #d63384; }
.sig-item b.sell { color: #2e8b57; }
.sig-freeze-name { color: var(--text-2); }
.sig-item b.freeze-val { color: #2563eb; }
.sig-day-row.today-row { background: #fff4ec; border-radius: 6px; }
.sig-day-row.today-row .sig-day-date { color: #e6492e; font-weight: 600; }
/* 买卖点卡片可点击：弹窗展示走势图+信号 */
.sig-clickable { cursor: pointer; transition: background 0.12s; border-radius: 4px; padding: 1px 3px; margin: -1px -3px; }
.sig-clickable:hover { background: var(--primary-bg); }
.sig-clickable:active { background: var(--primary-bg); }
/* 通用隐藏类（rule-modal 等复用） */
.hidden { display: none !important; }
.muted { color: var(--text-3); }

.modal { position: fixed; inset: 0; background: rgba(0,0,0,0.4); display: flex; align-items: center; justify-content: center; z-index: 100; }
.modal.hidden { display: none; }
.modal-body {
  background: var(--bg-card);
  border-radius: 8px;
  padding: 20px 24px;
  width: 360px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.modal-body label { display: flex; flex-direction: column; font-size: 13px; gap: 4px; }
.modal-body input, .modal-body select { padding: 6px 8px; border: 1px solid var(--border-strong); border-radius: 4px; }
.modal-body .actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.modal-body button { padding: 6px 16px; border: 1px solid var(--primary); background: var(--primary); color: #fff; border-radius: 4px; cursor: pointer; }
.modal-body button.ghost { background: var(--bg-card); color: var(--text-2); border-color: var(--border-strong); }

/* === 概览美化（G1）=== */
.section-title {
  font-size: 13px;
  color: var(--text-2);
  font-weight: 600;
  margin: 4px 0 8px 2px;
  padding-left: 8px;
  border-left: 3px solid var(--primary);
}
.cards.kpi-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.card.kpi { min-width: 150px; padding: 12px 16px; flex: 1 1 150px; }
.card.kpi .card-value { font-size: 24px; margin: 2px 0; white-space: nowrap; overflow: hidden; display: flex; align-items: baseline; gap: 6px; }
.card.kpi .card-value .cv-val { min-width: 0; }
.card.kpi .card-value .cv-tags { margin-left: auto; flex-shrink: 0; }
.card.kpi .card-value .cv-tags .tag,
.card.kpi .card-value .cv-val .tag { font-size: 10px !important; padding: 1px 6px; white-space: nowrap; }
.card.kpi .card-time-badge { font-size: 10px; padding: 1px 5px; bottom: 4px; right: 6px; max-width: 70%; }
.card-sub { font-size: 12px; color: var(--text-4); white-space: nowrap; overflow: hidden; }
/* 角标浮动在右下角，给 card-sub 预留右侧空间防止文字被角标遮挡 */
.card.kpi.has-time-badge .card-sub { padding-right: 70px; }
.tag.stale { background: #faad14; }

.spark-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.spark-chart {
  width: 100%;
  min-height: 72px;
}
.spark-cell {
  background: var(--bg-card);
  border-radius: 8px;
  padding: 10px 12px;
  box-shadow: 0 1px 3px var(--shadow);
  position: relative;
}
.spark-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 2px;
}
.spark-name { font-size: 13px; color: var(--text-1); font-weight: 500; }
.pct-badge { font-size: 13px; font-weight: 600; }
.spark-cell .card-time-badge { font-size: 10px; padding: 1px 5px; bottom: 4px; right: 6px; max-width: 70%; }
.spark-foot { font-size: 11px; color: var(--text-3); margin-top: 2px; }

/* === 当日分时图（嵌入 spark-cell，腾讯API直拉，盘中3分钟动态刷新）=== */
/* 盘中动态值脉冲标注（阶段2）：badge/横幅/toggle旁绿点呼吸 + 3min 小字 */
.dyn-pulse {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 10px; color: var(--text-3); flex-shrink: 0;
}
.dyn-pulse-dot {
  width: 6px; height: 6px; border-radius: 50%; background: #2e8b57;
  animation: dyn-pulse-anim 1.6s ease-in-out infinite;
}
@keyframes dyn-pulse-anim {
  0%, 100% { opacity: 1; transform: scale(1); box-shadow: 0 0 0 0 rgba(46,139,87,0.45); }
  50% { opacity: 0.45; transform: scale(0.8); box-shadow: 0 0 0 4px rgba(46,139,87,0); }
}
@media (prefers-reduced-motion: reduce) { .dyn-pulse-dot { animation: none; } }
.intraday-toggle {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  width: 100%; padding: 8px 14px; margin-bottom: 10px;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px;
  color: var(--text-1); font-size: 13px; cursor: pointer; text-align: center;
  transition: border-color 0.2s;
}
.intraday-toggle:hover { border-color: var(--border-strong); }
/* 分时图容器：嵌入 spark-cell 内 spark-chart 下方 */
.spark-intraday { width: 100%; height: 100px; margin-top: 4px; }
.spark-intraday.collapsed { display: none; }
.intraday-fail {
  height: 100%; display: flex; align-items: center; justify-content: center;
  font-size: 12px; color: var(--text-3); text-align: center;
}
.intraday-notice {
  padding: 6px 10px; margin-top: 8px; font-size: 12px;
  color: #e6a23c; text-align: center;
}

.ov-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
  align-items: stretch; /* 两列等高，消除矮列底部留白（原 flex-start 致左右列底部不齐） */
}
.ov-2col > * {
  display: flex;
  flex-direction: column;
  gap: 12px; /* 卡片间距用 gap 统一，替代下方 margin-bottom */
}
.ov-2col .chart-card { margin-bottom: 0; flex: 1 0 auto; } /* 卡撑满列高，可拉伸不收缩，消除卡间/列底留白 */
.ov-2col .chart-card:last-child { margin-bottom: 0; }
@media (max-width: 768px) {
  .ov-2col { grid-template-columns: 1fr; }
}
.astock-top-grid {
  display: grid;
  grid-template-columns: 1fr; /* 移动端(≤768px)1列撑满，豁免800 */
  gap: 12px;
  margin-bottom: 16px;
  align-items: stretch;
}
.astock-top-grid > * {
  display: flex;
  flex-direction: column;
}
.astock-top-grid .chart-card { min-height: 200px; margin-bottom: 12px; }
.astock-top-grid .chart-card:last-child { margin-bottom: 0; }
/* 指数折线区网格(A股)：9个指数全部铺开不折叠；移动端1列撑满，PC 每列最小800px */
.indices-grid {
  display: grid;
  grid-template-columns: 1fr; /* 移动端(≤768px)1列撑满，豁免800 */
  gap: 12px;
  margin-bottom: 12px;
  align-items: stretch;
}
/* PC(>768px)：A股指标/指数折线图卡片最小宽度 700px，宽屏每行2图更宽更易读；移动端(≤768px)豁免700维持1列撑满 */
@media (min-width: 769px) {
  .astock-top-grid { grid-template-columns: repeat(auto-fill, minmax(700px, 1fr)); }
  .indices-grid { grid-template-columns: repeat(auto-fill, minmax(700px, 1fr)); }
}
.empty-note { color: var(--text-3); padding: 14px 0; font-size: 13px; }

/* 美股期货预期提示条（全球tab美股指数区上方，亚盘实时期货预估美股当晚方向） */
.us-futures-expect {
  position: relative;
  margin: 0 0 12px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-card);
}
.us-futures-expect .usf-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.us-futures-expect .usf-title { font-weight: 600; font-size: 14px; }
.us-futures-expect .usf-sub { font-size: 11px; opacity: 0.7; }
.us-futures-expect .card-time-badge { top: 8px; right: 10px; bottom: auto; }
.us-futures-expect .usf-items { display: flex; gap: 18px; flex-wrap: wrap; }
.us-futures-expect .usf-item { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.us-futures-expect .usf-name { font-weight: 600; }
.us-futures-expect .usf-fname { font-size: 11px; opacity: 0.6; }
.us-futures-expect .usf-price { font-variant-numeric: tabular-nums; }
.us-futures-expect .usf-chg { font-weight: 600; font-variant-numeric: tabular-nums; }
.us-futures-expect .usf-arrow { opacity: 0.5; }
.us-futures-expect .usf-expect { font-weight: 600; padding: 1px 8px; border-radius: 8px; background: var(--bg-hover); }
.us-futures-expect .up { color: #e6492e; }
.us-futures-expect .down { color: #2e8b57; }
.us-futures-expect .flat { color: #909399; }

.placeholder .placeholder-body {
  color: var(--text-3);
  font-size: 13px;
  padding: 24px 0;
  text-align: center;
  border: 1px dashed var(--border-strong);
  border-radius: 6px;
}

/* === 行业看板（F1）=== */
.industry-grid {
  grid-template-columns: 1fr; /* 移动端(≤768px)1列撑满，豁免800；PC 由下方 @media(min-width:769px) 切 minmax */
  gap: 12px;
  margin-bottom: 16px;
}
/* PC(>768px)：板块轮动行业指数折线图自适应(minmax700px auto-fill)，宽屏每行2图，窄屏PC(如1024)降为1列；移动端1列。
   必须在基类之后定义,确保 PC 规则级联覆盖基类 1fr(否则 PC 屏基类 1fr 覆盖 PC minmax 致 PC 1 列) */
@media (min-width: 769px) {
  .industry-grid { grid-template-columns: repeat(auto-fill, minmax(700px, 1fr)); }
}
.industry-grid .spark-cell .spark-chart { min-height: 120px; }
.industry-grid .spark-name { font-size: 12px; }
/* ETF 代码标注（行业/概念卡片，点击复制） */
.etf-tag {
  display: inline-block;
  margin-left: 5px;
  padding: 1px 5px;
  font-size: 10px;
  font-weight: 500;
  color: var(--primary);
  background: var(--primary-bg);
  border-radius: 3px;
  cursor: pointer;
  user-select: none;
  vertical-align: middle;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  transition: background 0.15s;
}
.etf-tag:hover { background: var(--primary-bg); }
.etf-tag.copied { background: #e8f5e9; color: #2e7d32; }
.etf-tag { position: relative; }
.etf-tag .etf-more { font-size: 9px; opacity: 0.7; margin-left: 1px; }
.etf-popup {
  display: none; position: absolute; z-index: 100; left: 0; top: 100%; margin-top: 3px;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px;
  padding: 4px 0; box-shadow: 0 4px 12px var(--shadow-strong);
  font-size: 11px; white-space: nowrap; max-height: 320px; overflow-y: auto; min-width: 210px;
}
.etf-popup::before {
  content: "";
  position: absolute;
  top: -3px;        /* 覆盖 margin-top:3px 死区，桥接父->子 hit-test */
  left: 0;
  right: 0;
  height: 3px;
}
.freq-popup {
  display: none; position: absolute; z-index: 100; left: 0; top: 100%; margin-top: 2px;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px;
  padding: 8px 12px; box-shadow: 0 4px 12px var(--shadow-strong);
  font-size: 12px; white-space: nowrap;
}
.freq-popup::before {
  content: "";
  position: absolute;
  top: -2px;        /* 覆盖 margin-top:2px 死区，桥接父->子 hit-test */
  left: 0;
  right: 0;
  height: 2px;
}
.etf-pop-title { padding: 2px 10px 4px; color: var(--text-3); font-size: 10px; border-bottom: 1px solid var(--border); margin-bottom: 2px; }
.etf-pop-row { display: flex; gap: 6px; padding: 3px 10px; cursor: pointer; align-items: center; }
.etf-pop-row:hover { background: var(--primary-bg); }
.etf-pop-row.copied { background: #e8f5e9; }
.etf-pop-code { font-family: ui-monospace, "SF Mono", Menlo, monospace; color: var(--primary); min-width: 54px; }
.etf-pop-name { color: var(--text-1); }
.etf-pop-amt { color: var(--text-3); margin-left: auto; }

/* F2：行业资金流 / 成交额 / 换手率 mini sparklines */
.industry-cell { padding: 8px 10px; }
/* 行业卡片角标放右上角(pct-badge已内联到标题,右上空出);覆盖 .spark-cell 默认右下 */
.industry-cell .card-time-badge { top: 6px; right: 8px; bottom: auto; left: auto; }
.spark-cell .chart-hint { font-size: 10px; padding: 4px 6px; margin: 4px 0 6px; }
.spark-cell .chart-hint .hint-strategy { font-size: 9px; padding: 2px 6px; margin-bottom: 3px; }
.spark-cell .chart-hint .hint-row { margin: 1px 0; }
.spark-cell .chart-hint .hint-header { margin-bottom: 2px; font-size: 10px; }
.ind-metrics { margin-top: 4px; }
.ind-metric-empty {
  font-size: 10px;
  color: var(--text-4);
  text-align: center;
  padding: 4px 0;
}
.ind-metric-row {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
}
.ind-metric-label {
  font-size: 10px;
  color: var(--text-3);
  width: 34px;
  flex-shrink: 0;
}
.ind-metric-chart {
  flex: 1;
  height: 32px;
  min-width: 0;
}
.ind-metric-val {
  font-size: 10px;
  color: var(--text-2);
  width: 50px;
  text-align: right;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

/* === 买卖点规则说明条（E3）=== */
.rule-bar {
  background: var(--bg-hover);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 12px;
  margin-bottom: 12px;
  font-size: 12px;
  color: var(--text-2);
  line-height: 1.6;
  position: sticky;   /* UX：ruleBar 悬浮在 tab 栏正下方（top = tab 栏实测高度，由 JS 写入 --tab-h，兜底 41px）*/
  top: var(--tab-h, 41px);
  z-index: 40;
}
.rule-bar .rule-summary {
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 6px;
}
.rule-bar .rule-toggle {
  color: var(--text-3);
  font-size: 10px;
  width: 12px;
  flex-shrink: 0;
}
.rule-bar .rule-text { flex: 1; }
.rule-bar .rule-detail {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px dashed var(--border);
}
.rule-bar .rule-detail.hidden { display: none; }
.rule-bar .rule-detail div { margin: 2px 0; }
.rule-bar b.buy { color: #e6492e; }
.rule-bar b.buy_aux { color: #d63384; }
.rule-bar b.sell { color: #2e8b57; }

/* === UX：右下角回到顶部浮动按钮 === */
.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(31, 35, 41, 0.55);
  color: #fff;
  border: none;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, background 0.2s ease;
  z-index: 90;            /* 浮在内容上、低于 modal(100)；ECharts tooltip 自带高 z-index 不会被遮挡 */
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
.back-to-top.visible { opacity: 1; pointer-events: auto; }
.back-to-top:hover { background: rgba(31, 35, 41, 0.82); }
.back-to-top:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* === UX：右下角浮动"策略说明"按钮（UI-P2-2：与 back-to-top 组成右下角 FAB 组。曾评估移入 header/topbar，
   需改 .visible 滚动显示交互 + PC/H5 双按钮 + theme-btn 样式匹配 + 双版 index.html/app.js/CSS 三处同步，风险中高，暂保留双 fixed 按钮）=== */
.rule-float-btn {
  position: fixed;
  bottom: 76px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(22, 93, 255, 0.72);
  color: #fff;
  border: none;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, background 0.2s ease;
  z-index: 90;
  box-shadow: 0 2px 8px rgba(22, 93, 255, 0.25);
}
.rule-float-btn.visible { opacity: 1; pointer-events: auto; }
.rule-float-btn:hover { background: rgba(22, 93, 255, 0.92); }
.rule-float-btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* === 策略说明 modal === */
.rule-modal {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: flex;
  align-items: center;
  justify-content: center;
}
.rule-modal.hidden { display: none; }
.rule-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}
.rule-modal-body {
  position: relative;
  background: var(--bg-card);
  border-radius: 10px;
  width: min(90vw, 820px);
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 32px var(--shadow-strong);
  z-index: 1;
}
.rule-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.rule-modal-header h3 {
  margin: 0;
  font-size: 16px;
  color: var(--text-1);
}
.rule-modal-close {
  background: none;
  border: none;
  font-size: 26px;
  color: var(--text-3);
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}
.rule-modal-close:hover { color: var(--text-1); }
.rule-modal-content {
  overflow-y: auto;
  padding: 20px 24px;
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.7;
  flex: 1;
}
.rule-modal-content .rule-detail div { margin: 3px 0; }

/* === 数据更新规则 modal（采集时间旁 ℹ️ 入口）=== */
/* ℹ️ 图标：浅色小号，hover/聚焦变主色；随采集时间文字一起渲染 */
.update-rules-btn {
  display: inline-block;
  font-size: 11px;
  color: var(--text-3);
  cursor: pointer;
  margin-left: 4px;
  vertical-align: middle;
  line-height: 1;
  user-select: none;
  transition: color 0.15s;
}
.update-rules-btn:hover,
.update-rules-btn:focus-visible { color: var(--primary); outline: none; }
.update-rules-modal .rule-modal-body { width: min(92vw, 720px); }
.update-rules-modal .rule-section { margin-bottom: 18px; }
.update-rules-modal .rule-section:last-child { margin-bottom: 0; }
.update-rules-modal .rule-section h4 {
  margin: 0 0 10px;
  font-size: 14px;
  color: var(--text-1);
}
.update-rules-modal .ur-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  margin-bottom: 4px;
}
.update-rules-modal .ur-table th,
.update-rules-modal .ur-table td {
  border: 1px solid var(--border);
  padding: 6px 10px;
  text-align: left;
  vertical-align: top;
}
.update-rules-modal .ur-table th {
  background: var(--bg-hover);
  color: var(--text-1);
  font-weight: 600;
}
.update-rules-modal .ur-table td:first-child {
  color: var(--primary);
  font-weight: 600;
  white-space: nowrap;
}
.update-rules-modal .ur-list { margin: 6px 0 0; padding-left: 20px; }
.update-rules-modal .ur-list li { margin: 4px 0; }
.update-rules-modal p { margin: 6px 0; }
.update-rules-modal b { color: var(--text-1); }

/* 买卖点卡片走势图弹窗：比规则说明略宽，承载图表 */
.signal-chart-modal-body { width: min(94vw, 1080px); max-height: 88vh; }
.signal-chart-content { padding: 16px 20px; }
.signal-chart-content .chart-card { margin-bottom: 0; }
.signal-chart-content .chart { height: 380px; }

/* --- 策略说明 modal 新版样式 --- */
.rule-section {
  margin-bottom: 20px;
}
.rule-section-sm {
  margin-bottom: 12px;
}
.rule-section h4 {
  margin: 0 0 10px 0;
  font-size: 14px;
  color: var(--text-1);
  display: flex;
  align-items: center;
  gap: 6px;
}
.rule-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.rule-dot-buy { background: #e6492e; }
.rule-dot-aux { background: #d63384; }
.rule-dot-sell { background: #2e8b57; }
.rule-dot-read { background: #5b8ff9; }
.rule-dot-stat { background: var(--text-3); }

.rule-dot-sm {
  display: inline-block;
  width: 10px; height: 10px;
  border-radius: 50%;
  vertical-align: middle;
  margin-right: 2px;
}
.rule-dot-profit { background: #2e8b57; }
.rule-dot-loss { background: #9e9e9e; }
.rule-dot-noref { background: #ff9800; }

.rule-card {
  background: var(--bg-hover);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 10px;
}
.rule-card-buy { border-left: 3px solid #e6492e; }
.rule-card-aux { border-left: 3px solid #d63384; }
.rule-card-sell { border-left: 3px solid #2e8b57; }

.rule-card-head {
  font-weight: 600;
  font-size: 13px;
  color: var(--text-1);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.rule-card p {
  margin: 0 0 8px 0;
  line-height: 1.65;
}
.rule-card p:last-child { margin-bottom: 0; }

.rule-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 3px;
  line-height: 1.5;
}
.badge-buy { background: #fde8e8; color: #c0392b; }
.badge-aux { background: #fce4ec; color: #c2185b; }
.badge-sell { background: #e8f5e9; color: #2e7d32; }

.rule-table {
  width: 100%;
  border-collapse: collapse;
  margin: 6px 0;
  font-size: 12.5px;
}
.rule-table td {
  padding: 4px 8px;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
  line-height: 1.6;
}
.rule-table tr:last-child td { border-bottom: none; }
.rule-td-label {
  color: var(--text-3);
  font-size: 11px;
  white-space: nowrap;
  width: 52px;
  padding-right: 8px;
  font-weight: 500;
}

.rule-table-color td {
  text-align: center;
  padding: 8px 6px;
  font-size: 12px;
}
.rule-table-color td:first-child { border-right: 1px solid var(--border); }
.rule-table-color td:last-child { border-left: 1px solid var(--border); }

.rule-table-tags td {
  text-align: center;
  padding: 6px 4px;
}
.rule-table-stat td {
  padding: 4px 12px;
  border-bottom: none;
}

.rule-note {
  background: #fff8e1;
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 12px;
  margin: 8px 0 0 0;
  line-height: 1.6;
}

.rule-subtitle {
  font-weight: 600;
  font-size: 12.5px;
  color: var(--text-1);
  margin: 14px 0 4px 0;
}

.rule-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}
.tag-freeze { background: #ffebee; color: #c62828; }
.tag-cool { background: #fff3e0; color: #e65100; }
.tag-neutral { background: #f5f5f5; color: #616161; }
.tag-warm { background: #e8f5e9; color: #2e7d32; }
.tag-hot { background: #c8e6c9; color: #1b5e20; }

.rule-example {
  background: var(--bg-hover);
  border-radius: 4px;
  padding: 5px 10px;
  font-size: 12px;
  font-family: 'SF Mono', 'Menlo', 'Consolas', monospace;
  margin: 3px 0;
  word-break: break-all;
  line-height: 1.6;
  color: var(--text-2);
}

.rule-disclaimer {
  text-align: center;
  font-size: 11px;
  color: var(--text-4);
  margin: 16px 0 4px 0;
}

/* keep old b color classes for backward compat */
.rule-modal-content b.buy { color: #e6492e; }
.rule-modal-content b.buy_aux { color: #d63384; }
.rule-modal-content b.sell { color: #2e8b57; }

/* === BUG-E：筛选/切换控件 === */
/* 指数筛选下拉 / 行业搜索框：看板顶部条，复用 .periods 按钮配色风格 */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 12px;
  margin-bottom: 12px;
  font-size: 13px;
}
.filter-bar > label {
  color: var(--text-2);
  font-size: 12px;
  flex-shrink: 0;
}
.filter-bar select,
.filter-bar input[type="search"] {
  padding: 5px 8px;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  font-size: 13px;
  background: var(--bg-card);
  color: var(--text-1);
  min-width: 180px;
}
.filter-bar select:focus,
.filter-bar input[type="search"]:focus {
  outline: 2px solid var(--primary);
  outline-offset: -1px;
  border-color: var(--primary);
}
/* 热力图卡片标题：左侧文案 + 右侧切换按钮组 */
.chart-card h3.with-toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.heatmap-toggle {
  display: inline-flex;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  overflow: hidden;
  flex-shrink: 0;
}
.heatmap-toggle button {
  padding: 4px 10px;
  border: none;
  background: var(--bg-card);
  color: var(--text-2);
  cursor: pointer;
  font-size: 12px;
  border-right: 1px solid var(--border-strong);
}
.heatmap-toggle button:last-child { border-right: none; }
.heatmap-toggle button.active { background: var(--primary); color: #fff; }
.heatmap-toggle button:hover:not(.active) { background: var(--bg-hover); }

/* === 期货机构持仓 === */
/* 表格卡/说明卡间距对齐 indices-grid gap 12px(图表卡在grid内由gap控制,表格卡全宽需显式设) */
.futures-table-card { margin-bottom: 12px; }
.futures-note {
  font-size: 12px;
  color: var(--text-3);
  margin-bottom: 12px;
  line-height: 1.5;
}
.accuracy-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.accuracy-table th,
.accuracy-table td {
  padding: 6px 8px;
  text-align: center;
  border-bottom: 1px solid var(--bg-hover);
}
.accuracy-table th {
  background: var(--bg-hover);
  color: var(--text-2);
  font-weight: 500;
  font-size: 11px;
}
.accuracy-table td.sym-name {
  font-weight: 600;
  text-align: left;
  color: var(--text-1);
}
.accuracy-table td.acc-good {
  color: #16a34a;
  font-weight: 600;
}
.accuracy-table td.acc-bad {
  color: #dc2626;
  font-weight: 600;
}
.accuracy-table td .acc-warn {
  color: #e67e22;
  font-weight: 600;
}

/* 期货净多空概览表 */
.futures-summary-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.futures-summary-table th,
.futures-summary-table td {
  padding: 6px 8px;
  text-align: right;
  border-bottom: 1px solid var(--bg-hover);
}
.futures-summary-table th {
  background: var(--bg-hover);
  color: var(--text-2);
  font-weight: 500;
  font-size: 11px;
}
.futures-summary-table th:first-child,
.futures-summary-table td:first-child {
  text-align: left;
}
.futures-summary-table td.sym-name {
  font-weight: 600;
  color: var(--text-1);
}
.futures-long {
  color: #16a34a;
  font-weight: 600;
}
.futures-short {
  color: #e6492e;
  font-weight: 600;
}

/* === 大盘Tab 二级 Tab 栏 === */
.subtab-bar {
  display: flex;
  gap: 4px;
  margin-bottom: 14px;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
}
.subtab-bar button {
  padding: 6px 16px;
  border: 1px solid var(--border-strong);
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 13px;
  color: var(--text-2);
}
.subtab-bar button.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.subtab-bar button:hover:not(.active) {
  background: var(--bg-hover);
}

/* === 情绪分文字标签（KPI 卡片内）=== */
.sentiment-label {
  font-size: 14px;
  margin-left: 6px;
  white-space: nowrap;
}

/* === 行业概念Tab锚点导航条 === */
.industry-anchor-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  background: var(--bg-hover);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 12px;
  margin-bottom: 12px;
  font-size: 13px;
  position: sticky;
  top: var(--tab-h, 41px);
  z-index: 39;
}
.industry-anchor-bar .anchor-btn-group {
  display: flex;
  gap: 4px;
}
.industry-anchor-bar button {
  padding: 5px 12px;
  border: 1px solid var(--border-strong);
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 12px;
  color: var(--text-2);
  transition: all 0.15s;
}
.industry-anchor-bar button:hover {
  background: var(--primary-bg);
  border-color: var(--primary);
  color: var(--primary);
}
.industry-anchor-bar button.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
/* 搜索框（与 tab 按钮同一行，吸顶时也可用）：贴着切换按钮右侧，不撑满整行 */
.industry-anchor-bar .anchor-search {
  margin-left: 0;
  flex: 0 1 200px;
  max-width: 360px;
  min-width: 140px;
  padding: 5px 10px;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  font-size: 12px;
  background: var(--bg-card);
  color: var(--text-1);
}
.industry-anchor-bar .anchor-search:focus {
  outline: 2px solid var(--primary);
  outline-offset: -1px;
  border-color: var(--primary);
}
.industry-anchor-bar .anchor-back-top {
  margin-left: auto;
  font-size: 11px;
  color: var(--text-3);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}
.industry-anchor-bar .anchor-back-top:hover {
  color: var(--primary);
}

/* ---- 一句话总结横幅 ---- */
.summary-banner {
  background: var(--primary-bg);
  border: 1px solid var(--border-strong);
  border-left: 3px solid var(--primary);  /* 加重视觉锚点：左侧主题色强调条 */
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 12px;
  font-size: 14px;
  line-height: 1.7;
  box-shadow: 0 2px 8px var(--shadow);  /* 提升层次浮起感 */
}
.summary-top {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.summary-icon { font-size: 18px; flex-shrink: 0; margin-top: 1px; }
.summary-text { flex: 1; color: var(--text-1); }
.summary-title {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-1);
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.summary-title-text { flex: 0 1 auto; min-width: 0; }
.summary-title-tags { display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; }
.summary-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  font-size: 12px;
  color: var(--text-3);
  padding-left: 0;
  margin-left: auto;   /* 始终靠右(含换行时)，使"更多"按钮落在该区域右上角 */
}
.summary-snap-tag { flex-shrink: 0; font-size: 12px; }
.summary-time-label { font-size: 11px; color: var(--text-4); flex-shrink: 0; }
/* 指标 chips 流式排版（横幅 + 历史弹窗共用） */
.summary-tags {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.summary-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  font-size: 12px;
  color: var(--text-2);
  margin-bottom: 6px;
}
.summary-chips:last-child { margin-bottom: 0; }
.summary-chip {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-2);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
  line-height: 1.6;
}
.summary-chips-top { color: var(--text-2); }
.summary-chips-top > span { font-weight: 500; }
.summary-tag {
  flex-shrink: 0;
  background: var(--primary);
  color: #fff;
  padding: 2px 10px;
  border-radius: var(--radius-pill);
  font-size: 12px;
}
.summary-fg-tag {
  flex-shrink: 0;
  background: var(--bg-hover);
  color: var(--text-2);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-size: 12px;
}
.summary-freeze {
  flex-shrink: 0;
  background: color-mix(in srgb, var(--primary) 12%, var(--bg-card));
  color: var(--primary);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
}
.summary-date {
  margin-left: auto;
  font-size: 11px;
  color: var(--text-4);
}
.summary-history-btn {
  flex-shrink: 0;
  margin-left: 8px;
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 2px 10px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  cursor: pointer;
}
.summary-history-btn:hover { background: var(--primary-hover); }

/* ---- 历史收盘分析弹窗（宽度与"买卖点策略说明"弹窗一致） ---- */
.summary-history-body { max-width: 820px; }
.summary-history-list {
  max-height: 65vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.summary-history-item {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 12px;
  background: var(--bg-hover);
}
.sh-date {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-1);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.sh-label { font-weight: 400; color: var(--text-2); }
.sh-fg, .sh-freeze {
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 9px;
}
.sh-fg { background: var(--bg-hover); color: var(--text-2); }
.sh-freeze { background: #ffebee; color: #c62828; font-weight: 600; }
.sh-text { font-size: 13px; color: var(--text-1); line-height: 1.7; margin-bottom: 6px; }
.sh-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 11px;
}
.sh-stats span {
  background: var(--bg-hover);
  color: var(--text-2);
  padding: 1px 7px;
  border-radius: 9px;
}
/* 顶部 info 行：醒目提示"共 N 条 · 第 X/Y 页"让用户立刻知道有更多页 */
.summary-history-info {
  text-align: center;
  font-size: 12.5px;
  color: var(--text-2);
  margin-bottom: 12px;
  padding: 7px 12px;
  background: var(--bg-hover);
  border: 1px solid var(--border);
  border-radius: 6px;
}
.summary-history-info:empty { display: none; }
/* 分页器：上一页/下一页 + 页码按钮（当前页主色高亮），整体居中 */
.summary-history-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}
.summary-history-pager button {
  background: var(--bg-hover);
  color: var(--text-1);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  min-height: 32px;
  transition: background 0.15s, border-color 0.15s;
}
.summary-history-pager button:hover:not(:disabled):not(.active) {
  background: var(--border);
  border-color: var(--primary);
}
.summary-history-pager button:disabled { opacity: 0.4; cursor: not-allowed; }
/* 页码按钮容器（H5 多页时横向滚动） */
.sh-pages {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: center;
}
.sh-page-btn {
  min-width: 32px;
  padding: 6px 10px !important;
}
.sh-page-btn.active {
  background: var(--primary) !important;
  color: #fff !important;
  border-color: var(--primary) !important;
  cursor: default;
}
.sh-ellipsis {
  color: var(--text-3);
  padding: 0 4px;
  font-size: 13px;
}
.summary-history-loading, .summary-history-empty {
  text-align: center;
  color: var(--text-3);
  padding: 30px 0;
  font-size: 13px;
}

/* ---- 大盘位置感卡片 ---- */
.position-card { padding: 16px; }
.position-card h3 { margin: 0 0 12px; font-size: 14px; color: var(--text-1); }
.position-list { display: flex; flex-direction: column; gap: 6px; }
.position-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}
.pos-name { width: 70px; color: var(--text-1); flex-shrink: 0; }
.pos-price { width: 85px; text-align: right; color: var(--text-2); flex-shrink: 0; font-variant-numeric: tabular-nums; }
.pos-bar-bg {
  flex: 1;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
  min-width: 60px;
}
.pos-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s;
}
.pos-pct { width: 36px; text-align: right; color: var(--text-3); font-size: 12px; flex-shrink: 0; }
.pos-label { width: 36px; text-align: right; font-weight: 500; font-size: 12px; flex-shrink: 0; }

/* ---- 新高新低卡片（NH-NL）---- */
.nhnl-card { padding: 16px; }
.nhnl-card h3 { margin: 0 0 8px; font-size: 14px; color: var(--text-1); }
.nhnl-value { font-size: 36px; font-weight: 700; margin: 4px 0; }
.nhnl-sub { font-size: 13px; color: var(--text-2); margin-bottom: 6px; }

/* ---- 均线排列卡片 ---- */
.ma-card { padding: 16px; }
.ma-card h3 { margin: 0 0 8px; font-size: 14px; color: var(--text-1); }
.ma-summary { font-size: 14px; margin-bottom: 10px; display: flex; gap: 8px; flex-wrap: wrap; }
.ma-count { padding: 2px 10px; border-radius: 10px; font-size: 13px; font-weight: 500; }
.ma-count.bullish { background: #e8f5e9; color: #2e7d32; }
.ma-count.bearish { background: #fce4ec; color: #c62828; }
.ma-count.cross { background: var(--bg-hover); color: var(--text-2); }
.ma-table { width: 100%; border-collapse: collapse; font-size: 12px; font-variant-numeric: tabular-nums; }
.ma-table th, .ma-table td { padding: 4px 6px; text-align: right; border-bottom: 1px solid var(--bg-hover); }
.ma-table th { background: var(--bg-hover); color: var(--text-2); font-weight: 500; font-size: 11px; }
.ma-table th:first-child, .ma-table td:first-child { text-align: left; }
.ma-table td.bullish { color: #2e7d32; font-weight: 600; }
.ma-table td.bearish { color: #c62828; font-weight: 600; }
.ma-table td.cross { color: var(--text-2); }

/* 板块轮动速度卡片 */
.rotation-card {
  background: var(--bg-card);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 1px 4px var(--shadow-strong);
}
/* 轮动卡 + 热力图 1:2 合并一行（左轮动卡 / 右热力图），4K 全宽下左≈1/3 右≈2/3 */
.rotation-heatmap-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 16px;
  align-items: stretch;
  margin-bottom: 16px;
}
.rotation-heatmap-grid .rotation-card,
.rotation-heatmap-grid .chart-card { margin-bottom: 0; }
.rotation-heatmap-grid .rotation-card { display: flex; flex-direction: column; }
.rotation-heatmap-grid .rotation-card-body { flex: 1; }
.rotation-heatmap-grid.single-col { grid-template-columns: 1fr; }
@media (max-width: 768px) {
  .rotation-heatmap-grid { grid-template-columns: 1fr; }
}
.rotation-card-header {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-1);
  margin-bottom: 10px;
}
.rotation-card-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.rotation-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.rotation-label {
  font-size: 12px;
  color: var(--text-3);
  min-width: 56px;
}
.rotation-item {
  font-size: 13px;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--bg-hover);
  white-space: nowrap;
}
.rotation-item.fast { background: #fff3e0; color: #e67e22; font-weight: 500; }
.rotation-item.mid { background: #fffde7; color: #f9a825; font-weight: 500; }
.rotation-item.slow { background: #e8f5e9; color: #2e7d32; font-weight: 500; }
.rit-short { display: none; }
.rotation-hint {
  font-size: 12px;
  color: var(--text-3);
  margin-top: 2px;
}
/* 大白话解释折叠（details 原生，想懂才展开） */
.rotation-explain { margin-top: 6px; font-size: 12px; }
.rotation-explain > summary {
  cursor: pointer;
  color: var(--primary);
  user-select: none;
  list-style: none;
}
.rotation-explain > summary::-webkit-details-marker { display: none; }
.rotation-explain > summary:hover { color: var(--primary-hover); }
.rotation-explain-body { padding: 6px 0 0 4px; color: var(--text-2); line-height: 1.7; }
.rotation-explain-body > div { margin: 3px 0; }
.rotation-explain-body b { color: var(--text-1); font-weight: 600; }
.rotation-explain-example {
  background: var(--bg-hover);
  border-left: 3px solid var(--border-strong);
  padding: 5px 8px;
  margin: 4px 0;
  border-radius: 0 4px 4px 0;
}

/* === H5 移动端（方案B：底部导航 + 顶部精简条 + 1/2列切换）=== */
/* @media(max-width:768px) 视口驱动自动切换，PC(>768) 零影响。body.h5 由 JS matchMedia 加（兜底）。 */
/* PC 默认隐藏 H5 专用元素 */
.h5-topbar, .h5-period-bar, .h5-bottomnav { display: none; }

@media (max-width: 768px) {
  /* header 精简：隐藏 PC h1，显示 H5 顶部条（当前 tab 名 + 时效 + 列切换 + 历史）*/
  header { padding: 8px 12px; }
  header h1 { display: none; }
  .h5-topbar { display: flex; justify-content: space-between; align-items: center; width: 100%; gap: 8px; }
  .h5-tab-name { font-size: 15px; font-weight: 600; color: var(--text-1); white-space: nowrap; }
  .h5-meta { display: flex; align-items: center; gap: 6px; }
  .pc-collect-time { display: none; }
  .h5-collect-time { display: inline; font-size: 10px; color: var(--text-3); white-space: nowrap; }

  /* PC tab 栏隐藏（4 tab 移到底部导航）；周期选择器移到 H5 周期条 */
  nav.tabs { display: none; }
  .h5-period-bar {
    display: block; position: sticky; top: 0; z-index: 50;
    background: var(--bg-card); border-bottom: 1px solid var(--border); padding: 8px 12px;
    box-shadow: 0 1px 3px var(--shadow);
  }
  .h5-periods { display: flex; gap: 6px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .h5-periods::-webkit-scrollbar { display: none; }
  .h5-periods button {
    padding: 5px 14px; border: 1px solid var(--border-strong); background: var(--bg-card);
    border-radius: var(--radius-sm); font-size: 13px; cursor: pointer; flex-shrink: 0; color: var(--text-2);
  }
  .h5-periods button.active { background: var(--primary); color: #fff; border-color: var(--primary); }

  /* 内容边距缩 + 底部留空避开底导航 */
  main { padding: 12px; padding-bottom: 76px; }
  .chart-card { padding: 10px 12px; margin-bottom: 12px; }
  .chart-card h3 { font-size: 13px; }
  .chart-latest { padding: 1px 4px; }
  .card { padding: 12px 14px; }

  /* 概览 sparkline 默认 2 列（移动端信息密度合适）；行业卡片内容多，强制 1 列 */
  .spark-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .industry-grid { grid-template-columns: 1fr; gap: 10px; }
  .spark-cell { padding: 8px 10px; }
  .industry-grid .spark-cell .spark-chart { min-height: 100px; }
  /* 分时图嵌入 spark-cell，移动端高度适配 */
  .spark-intraday { height: 80px; }
  /* KPI 卡片 2 列（用 grid 避免 flex+calc 的 subpixel 换行问题）*/
  .cards.kpi-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .card.kpi { min-width: 0; padding: 10px 12px; }
  .card.kpi .card-value { font-size: 20px; }
  /* 盘中标注角标移动端更小，避免遮住 KPI 数值；大卡(走势图)右上角，小卡(KPI)右下角 */
  .card-time-badge { font-size: 10px; padding: 1px 5px; bottom: 5px; right: 6px; }
  .chart-card .card-time-badge { top: 5px; right: 6px; bottom: auto; }
  .chart-card.hm-badge-bottom .card-time-badge { top: auto; bottom: 5px; right: 6px; }
  .card.kpi .card-time-badge { font-size: 9px; padding: 1px 4px; bottom: 3px; right: 4px; }
  .spark-cell .card-time-badge { font-size: 9px; padding: 1px 4px; bottom: 3px; right: 4px; }
  .industry-cell .card-time-badge { top: 4px; right: 5px; bottom: auto; }
  .card.kpi.has-time-badge .card-sub { padding-right: 58px; }
  .ov-2col { grid-template-columns: 1fr; gap: 12px; }
  .ov-2col .chart-card, .astock-top-grid .chart-card { min-height: 280px; }
  .sig-items { grid-template-columns: repeat(2, 1fr); }
  .sig-day-date { flex: 0 0 56px; font-size: 11px; }

  /* 表格横向滚动（display:block + overflow-x:auto，保留表格内对齐）*/
  .accuracy-table, .futures-summary-table, .ma-table {
    display: block; overflow-x: auto; -webkit-overflow-scrolling: touch;
  }
  /* 大盘位置感卡片：缩固定列宽，避免 bar 被挤没 */
  .pos-name { width: 56px; font-size: 12px; }
  .pos-price { width: 68px; font-size: 12px; }
  .pos-bar-bg { min-width: 40px; }

  /* chart-hint 回测数据横向流动填满窄屏（去纵向堆叠，避免每 stat 一行右边空白）*/
  .chart-hint .hint-row { flex-wrap: wrap; gap: 2px 8px; }
  .chart-hint { padding: 6px 8px; font-size: 11px; }
  .chart-hint .hint-stat, .chart-hint .hint-kelly, .chart-hint .hint-note, .chart-hint .hint-sig { font-size: 11px; }

  /* 板块轮动速度卡片：移动端 grid 3列等宽 + 缩文案（快/中/慢），申万/概念两行结构一致 */
  .rotation-card { padding: 10px 12px; }
  .rotation-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px 8px; }
  .rotation-label { grid-column: 1 / -1; min-width: 0; margin-bottom: 2px; }
  .rotation-item { font-size: 11px; padding: 2px 4px; text-align: center; justify-content: center; }
  .rit-full { display: none; }
  .rit-short { display: inline; }

  /* sticky 规则条/锚点条让位 H5 周期条：rule-bar 取消 sticky，anchor-bar 下移到周期条下 */
  .rule-bar { position: static; }
  .industry-anchor-bar { top: 46px; }
  /* H5：tab 按钮+搜索框一行放不下时，搜索框换行占满整行 */
  .industry-anchor-bar .anchor-search { flex-basis: 100%; max-width: none; margin-left: 0; }

  /* 收盘分析横幅 H5:行1=日期(text)+meta(收盘小结/更多,靠右),行2=tags(情绪+恐贪标签,靠左独占) */
  .summary-banner { padding: 10px 12px; font-size: 13px; }
  .summary-top { flex-wrap: wrap; justify-content: flex-start; align-items: flex-start; gap: 4px 10px; }
  .summary-title { flex-wrap: wrap; flex: 0 1 auto; min-width: 0; max-width: calc(100% - 120px); }   /* 可收缩给meta让位,避免"更多"被挤到第三行 */
  .summary-title-text { font-size: 14px; font-weight: 600; }
  .summary-meta { flex-wrap: nowrap; align-self: flex-start; flex-shrink: 0; }   /* margin-left:auto 承自 base 靠右,与title同处第一行 */
  .summary-title-tags { flex: 0 0 100%; }   /* 标签独占 summary-title 内第二行 */
  .summary-time-label { display: none; }

  /* 弹窗近全宽 */
  .rule-modal-body { width: 94vw !important; max-width: 94vw; max-height: 88vh; }
  .modal-body { width: 94vw; }
  .summary-history-body { max-width: 94vw; }
  .summary-history-list { max-height: 70vh; }
  .rule-modal-content { padding: 16px; }
  /* 历史弹窗分页器 H5 触控目标增大（44px touch target）+ 页码多时横向滚动 */
  .summary-history-pager { gap: 6px; }
  .summary-history-pager button {
    min-height: 40px;
    padding: 8px 14px;
    font-size: 14px;
  }
  .sh-page-btn { min-width: 40px; padding: 8px 10px !important; }
  .sh-pages { flex-wrap: nowrap; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  /* 数据更新规则 modal 移动端微调 */
  .update-rules-modal .rule-modal-content { padding: 14px; font-size: 12.5px; }
  .update-rules-modal .ur-table { font-size: 12px; }
  .update-rules-modal .ur-table th,
  .update-rules-modal .ur-table td { padding: 5px 6px; }

  /* 浮动按钮上移避开底部导航 */
  .back-to-top { bottom: 88px; right: 16px; width: 40px; height: 40px; font-size: 20px; }
  .rule-float-btn { bottom: 144px; right: 16px; width: 40px; height: 40px; font-size: 18px; }

  /* 底部固定导航（4 主 tab，复用 data-tab 切换）*/
  .h5-bottomnav {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0;
    background: var(--bg-card); border-top: 1px solid var(--border); padding: 6px 0 8px;
    z-index: 60; box-shadow: 0 -2px 8px var(--shadow-strong);
  }
  .h5-bottomnav button {
    flex: 1; border: none; background: transparent; cursor: pointer;
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    padding: 4px 0; color: var(--text-3); font-size: 11px;
  }
  .h5-bottomnav button.active { color: var(--primary); }
  .h5-bottomnav .bn-icon { font-size: 20px; line-height: 1; }
  .h5-bottomnav .bn-label { font-size: 11px; white-space: nowrap; }
}

/* === 模拟回测 iframe 浮层（遮罩+圆角边框+缩放展开动画，明确是浮层非跳转；关闭后停留原位置）=== */
.sim-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0, 0, 0, 0.55);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}
.sim-overlay.show { opacity: 1; visibility: visible; pointer-events: auto; }
.sim-window {
  position: relative; width: 100%; height: 100%;
  background: var(--bg-card); border-radius: 12px; border: 1px solid var(--border);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  transform: scale(0.92); opacity: 0;
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.3, 1), opacity 0.25s ease;
}
.sim-overlay.show .sim-window { transform: scale(1); opacity: 1; }
.sim-close {
  position: absolute; top: 10px; right: 12px; z-index: 2;
  width: 36px; height: 36px; border-radius: 50%; border: none;
  background: rgba(31, 35, 41, 0.65); color: #fff; font-size: 18px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  transition: background 0.15s, transform 0.15s;
}
.sim-close:hover { background: rgba(31, 35, 41, 0.9); transform: scale(1.08); }
.sim-frame { width: 100%; height: 100%; border: none; display: block; }
.sim-loading {
  position: absolute; inset: 0; z-index: 1;
  display: none; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  background: var(--bg-card); color: var(--text-3); font-size: 14px;
}
.sim-loading.show { display: flex; }
.sim-spinner {
  width: 28px; height: 28px; border: 3px solid var(--border); border-top-color: var(--primary);
  border-radius: 50%; animation: sim-spin 0.8s linear infinite;
}
@keyframes sim-spin { to { transform: rotate(360deg); } }
@media (max-width: 768px) {
  .sim-overlay { padding: 8px; }
  .sim-window { border-radius: 10px; }
  .sim-close { top: 6px; right: 8px; width: 34px; height: 34px; font-size: 16px; }
  .sim-loading { font-size: 13px; }
  .sim-spinner { width: 24px; height: 24px; }
}

/* === 配色皮肤切换按钮 + 弹层 === */
.pc-theme-btn {
  margin-left: 10px; border: 1px solid var(--border-strong); background: var(--bg-card);
  border-radius: 16px; padding: 5px 12px; font-size: 15px; cursor: pointer; color: var(--text-2);
  transition: all 0.15s; line-height: 1;
}
.pc-theme-btn:hover { border-color: var(--primary); color: var(--primary); }
.h5-theme-btn { display: none; }

.theme-modal { z-index: 120; }
.theme-modal .modal-body {
  width: min(92vw, 420px); padding: 20px 22px; position: relative;
  box-shadow: 0 8px 32px var(--shadow-strong);
}
.theme-modal h3 { margin: 0 0 14px; font-size: 16px; color: var(--text-1); }
.theme-options { display: flex; flex-direction: column; gap: 8px; }
.theme-option {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--bg-card); cursor: pointer; text-align: left;
  transition: all 0.15s; font-family: inherit; width: 100%;
}
.theme-option:hover { border-color: var(--primary); background: var(--bg-hover); }
.theme-option.active { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-bg); }
.theme-swatch { display: flex; gap: 3px; flex-shrink: 0; }
.theme-swatch span {
  width: 18px; height: 18px; border-radius: 4px; border: 1px solid var(--border-strong);
}
.theme-info { flex: 1; min-width: 0; }
.theme-info .theme-name { font-size: 14px; font-weight: 600; color: var(--text-1); }
.theme-info .theme-desc { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.theme-check { font-size: 16px; color: var(--primary); opacity: 0; flex-shrink: 0; }
.theme-option.active .theme-check { opacity: 1; }
.theme-modal-close {
  position: absolute; top: 12px; right: 14px;
  background: none; border: none; font-size: 22px; color: var(--text-3); cursor: pointer; line-height: 1; padding: 0 4px;
}
.theme-modal-close:hover { color: var(--text-1); }

@media (max-width: 768px) {
  .pc-theme-btn { display: none; }
  .h5-theme-btn {
    display: inline-flex; border: 1px solid var(--border-strong); background: var(--bg-card); border-radius: 12px;
    padding: 3px 10px; font-size: 15px; cursor: pointer; color: var(--text-2); line-height: 1;
  }
  .h5-theme-btn:active { background: var(--bg-hover); }
  .theme-modal .modal-body { width: 94vw; }
}

/* === 🐶 汪汪队（国家队 ETF 资金动向）=== */
.nt-banner {
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-left: 3px solid var(--primary);
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 16px;
}
.nt-banner h3 { margin: 0 0 6px; font-size: 14px; color: var(--text-1); }
.nt-banner-body { font-size: 12px; color: var(--text-2); line-height: 1.7; }
.nt-banner-body b { color: var(--text-1); }
.nt-selector {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px;
  margin-bottom: 14px; padding: 6px 0;
  border-bottom: 1px solid var(--border);
}
.nt-selector .nt-grp-label {
  font-size: 11px; color: var(--text-3); margin: 0 6px 0 8px; white-space: nowrap;
}
.nt-selector .nt-grp-label:first-child { margin-left: 0; }
.nt-selector button {
  padding: 4px 10px; border: 1px solid var(--border-strong);
  background: var(--bg-card); border-radius: var(--radius-sm); cursor: pointer;
  font-size: 12px; color: var(--text-2); font-variant-numeric: tabular-nums;
}
.nt-selector button.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.nt-selector button:hover:not(.active) { background: var(--bg-hover); }
.nt-kpi {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-bottom: 16px;
}
.nt-kpi-item {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px;
}
.nt-kpi-label { font-size: 11px; color: var(--text-3); margin-bottom: 4px; }
.nt-kpi-val { font-size: 16px; font-weight: 600; color: var(--text-1); font-variant-numeric: tabular-nums; }
.nt-kpi-val.nt-up { color: #e6492e; }
.nt-kpi-val.nt-down { color: #2e8b57; }
.nt-sig-table-wrap { overflow-x: auto; }
.nt-sig-table { width: 100%; border-collapse: collapse; font-size: 12px; margin-top: 4px; }
.nt-sig-table th, .nt-sig-table td {
  padding: 6px 10px; border-bottom: 1px solid var(--border); text-align: left;
  color: var(--text-2); white-space: nowrap;
}
.nt-sig-table th { color: var(--text-1); font-weight: 600; }
/* 备注列：限宽+省略号+title 显示完整内容，避免换行撑高行高 */
.nt-sig-table .nt-note { display: inline-block; max-width: 200px; vertical-align: middle; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 国家队份额 T+1 提示行（解释为何份额停 T-1）*/
.nt-t1-hint {
  font-size: 12px; color: var(--text-3); line-height: 1.55;
  background: var(--bg-2, rgba(255,255,255,0.04)); border: 1px dashed var(--border-strong);
  border-radius: 6px; padding: 7px 11px; margin: 0 0 10px 0;
}
/* 第0层：国家队总盘 KPI 大字（合计市值/今日净增持/近20日累计，3个大字一屏）*/
.nt-total-kpi {
  display: flex; flex-wrap: wrap; gap: 12px;
  background: var(--bg-card); border: 1px solid var(--border-strong);
  border-left: 3px solid var(--primary); border-radius: 8px;
  padding: 14px 16px; margin-bottom: 14px;
}
.nt-tk-item { flex: 1; min-width: 180px; }
.nt-tk-label { font-size: 12px; color: var(--text-3); margin-bottom: 6px; }
.nt-tk-val { font-size: 24px; font-weight: 700; color: var(--text-1); font-variant-numeric: tabular-nums; line-height: 1.2; }
.nt-tk-val.nt-up { color: #e6492e; }
.nt-tk-val.nt-down { color: #2e8b57; }
.nt-tk-unit { font-size: 13px; font-weight: 400; color: var(--text-3); }

/* ── 4层概览看板 ── */
/* 第1层：总览摘要条 */
.nt-summary-bar {
  display: flex; flex-wrap: wrap; gap: 8px;
  background: var(--bg-card); border: 1px solid var(--border-strong);
  border-left: 3px solid var(--primary); border-radius: 8px;
  padding: 10px 14px; margin-bottom: 14px;
}
.nt-sum-item { display: flex; flex-direction: column; min-width: 90px; padding: 0 10px; border-right: 1px solid var(--border); }
.nt-sum-item:last-child { border-right: none; flex: 1; }
.nt-sum-label { font-size: 11px; color: var(--text-3); margin-bottom: 3px; }
.nt-sum-val { font-size: 15px; font-weight: 600; color: var(--text-1); font-variant-numeric: tabular-nums; }

/* 第2层：矩阵热力图 */
.nt-heatmap-card { margin-bottom: 14px; }
.nt-heatmap-wrap { overflow-x: auto; }
.nt-heatmap { width: 100%; border-collapse: collapse; font-size: 12px; }
.nt-heatmap th, .nt-heatmap td {
  padding: 8px 10px; border-bottom: 1px solid var(--border); text-align: left;
  color: var(--text-2); white-space: nowrap;
}
.nt-heatmap th { color: var(--text-1); font-weight: 600; }
.nt-heat-row { cursor: pointer; transition: background 0.12s; }
.nt-heat-row:hover { background: var(--bg-hover); }
.nt-cell-code { color: var(--text-1); font-weight: 600; font-variant-numeric: tabular-nums; }
.nt-cell-name { font-size: 11px; color: var(--text-3); font-weight: 400; }
.nt-cell-num { font-variant-numeric: tabular-nums; text-align: right; }

/* 第3层：卡片墙 */
.nt-wall-card { margin-bottom: 14px; }
.nt-card-wall {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px;
}
.nt-mini-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px;
  padding: 10px 12px; cursor: pointer; transition: all 0.15s;
  display: flex; flex-direction: column; gap: 6px;
}
/* hover 交给 .clickable-card 统一处理（lift+shadow+border），此处不再单独定义 */
.nt-mini-head { display: flex; align-items: baseline; gap: 6px; }
.nt-mini-code { font-size: 13px; font-weight: 600; color: var(--text-1); font-variant-numeric: tabular-nums; }
.nt-mini-name { font-size: 11px; color: var(--text-3); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nt-mini-spark { color: var(--text-2); height: 30px; }
.nt-mini-spark .nt-spark { display: block; }
.nt-mini-foot { display: flex; align-items: center; justify-content: space-between; }
.nt-mini-chg { font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.nt-badge { font-size: 12px; line-height: 1; }
.nt-mini-chg.nt-up { color: #e6492e; }
.nt-mini-chg.nt-down { color: #2e8b57; }

/* === 全局可点击卡片发现性提示（PC hover浮层 + 移动端↗图标） ===
   覆盖元素：.nt-mini-card(汪汪队卡片墙) / .lab-rank-item(策略推荐榜行)
   PC：hover上浮+阴影+边框高亮，右下角浮出"查看详情 ->"小标签（移开消失，不常驻）
   移动端：无hover，右上角常驻↗图标明示可点
   表格行 .nt-heat-row 与 chip .sig-clickable 因布局特殊性单独处理（见下） */
.clickable-card { position: relative; }
.clickable-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 14px var(--shadow-strong);
  border-color: var(--primary);
}
.clickable-card::after {
  content: "查看详情 ->";
  position: absolute; right: 6px; bottom: 4px;
  padding: 1px 7px; border-radius: 10px;
  background: var(--primary); color: #fff;
  font-size: 10px; font-weight: 600; line-height: 1.5; white-space: nowrap;
  opacity: 0; transform: translateY(4px);
  transition: opacity 0.15s ease, transform 0.15s ease;
  pointer-events: none; z-index: 3;
}
.clickable-card:hover::after { opacity: 1; transform: translateY(0); }
.clickable-card::before {
  content: "↗";
  position: absolute; top: 4px; right: 6px;
  font-size: 12px; font-weight: 700; line-height: 1;
  color: var(--primary); opacity: 0.6;
  pointer-events: none; z-index: 3;
  display: none;
}
@media (max-width: 768px) {
  .clickable-card::after { display: none; }      /* 移动端无hover，隐藏浮层 */
  .clickable-card::before { display: block; }    /* 显示↗图标 */
}
@media (min-width: 769px) {
  .clickable-card::before { display: none; }     /* PC不需要常驻图标 */
}

/* 汪汪队矩阵表格行（tr 不支持 transform/absolute，改用首格 ↗ 内联提示） */
.nt-heat-row .nt-cell-code::after {
  content: " ↗";
  font-size: 11px; font-weight: 700;
  color: var(--text-4);
  transition: color 0.15s ease;
}
.nt-heat-row:hover .nt-cell-code::after { color: var(--primary); }
@media (max-width: 768px) {
  .nt-heat-row .nt-cell-code::after { color: var(--primary); opacity: 0.7; }
}

/* 买卖点/冰点 chip（.sig-clickable）：移动端无hover，加底色暗示可点（避免每chip加↗过载） */
@media (max-width: 768px) {
  .sig-clickable { background: var(--bg-active); }
}

/* 返回概览按钮 */
.nt-back-btn {
  margin-bottom: 12px; padding: 6px 14px;
  border: 1px solid var(--border-strong); border-radius: 8px;
  background: var(--bg-card); color: var(--text-2); cursor: pointer;
  font-size: 13px; font-weight: 600; font-family: inherit;
  transition: all 0.15s;
}
.nt-back-btn:hover { border-color: var(--primary); color: var(--primary); }

/* === 汪汪队单只详情 接近全屏弹窗（对齐 sim-window：width/height 100%，overlay padding 留边框；顶部含独立周期切换）=== */
.nt-detail-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0, 0, 0, 0.55);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}
.nt-detail-overlay.show { opacity: 1; visibility: visible; pointer-events: auto; }
.nt-detail-window {
  position: relative; width: 100%; height: 100%;
  background: var(--bg-card); border-radius: 12px; border: 1px solid var(--border);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  transform: scale(0.92); opacity: 0;
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.3, 1), opacity 0.25s ease;
  display: flex; flex-direction: column;
}
.nt-detail-overlay.show .nt-detail-window { transform: scale(1); opacity: 1; }
.nt-detail-body { flex: 1; overflow-y: auto; padding: 16px; }
.nt-detail-close {
  position: absolute; top: 10px; right: 12px; z-index: 3;
  width: 36px; height: 36px; border-radius: 50%; border: none;
  background: rgba(31, 35, 41, 0.65); color: #fff; font-size: 18px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  transition: background 0.15s, transform 0.15s;
}
.nt-detail-close:hover { background: rgba(31, 35, 41, 0.9); transform: scale(1.08); }
[data-theme="dark"] .nt-detail-close,
[data-theme="redgold"] .nt-detail-close { background: rgba(255,255,255,0.22); }
[data-theme="dark"] .nt-detail-close:hover,
[data-theme="redgold"] .nt-detail-close:hover { background: rgba(255,255,255,0.38); }
/* 弹窗内 detail 顶部留出关闭按钮空间 */
.nt-detail-body .nt-back-btn { margin-right: 48px; }

/* 弹窗顶部工具条：时间周期切换按钮（独立 ntDetailRange，只影响弹窗内数据切片，不影响外层 state.range）
   散户白话：弹窗被遮住了页面右上角的周期按钮，这里放一组只管弹窗自己的周期切换，默认继承外部周期 */
.nt-detail-toolbar {
  flex-shrink: 0;
  display: flex; align-items: center; gap: 6px;
  padding: 8px 52px 8px 12px;  /* 右侧留出关闭按钮空间 */
  border-bottom: 1px solid var(--border);
  background: var(--bg-card);
}
.nt-detail-rng { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.nt-detail-rng-label { font-size: 12px; color: var(--text-3); margin-right: 2px; display: inline-flex; align-items: center; white-space: nowrap; }
.nt-detail-rng button {
  margin-left: 4px;
  padding: 5px 11px;
  border: 1px solid var(--border-strong);
  background: var(--bg-card);
  color: var(--text-2);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 12px;
  font-family: inherit;
  transition: all 0.15s;
}
.nt-detail-rng button:hover { border-color: var(--primary); color: var(--primary); }
.nt-detail-rng button.active { background: var(--primary); color: #fff; border-color: var(--primary); }

@media (max-width: 768px) {
  .nt-kpi { grid-template-columns: repeat(2, 1fr); }
  .nt-card-wall { grid-template-columns: repeat(2, 1fr); }
  .nt-heatmap { font-size: 11px; }
  .nt-heatmap th, .nt-heatmap td { padding: 6px 8px; }
  .nt-sum-item { min-width: 70px; padding: 0 6px; }
  .nt-sum-val { font-size: 14px; }
  .nt-tk-val { font-size: 20px; }
  .nt-tk-item { min-width: 140px; }
  .nt-detail-overlay { padding: 8px; }
  .nt-detail-window { border-radius: 10px; }
  .nt-detail-close { top: 6px; right: 8px; width: 34px; height: 34px; font-size: 16px; }
  .nt-detail-body { padding: 10px; }
  .nt-detail-toolbar { padding: 6px 44px 6px 8px; }
  .nt-detail-rng button { padding: 4px 9px; font-size: 11px; }
  .nt-sig-table .nt-note { max-width: 120px; }
}

/* tab 级副标题：灰字小号 + 虚线下边框，跟随主题色 */
.tab-subtitle { color: var(--text-2); font-size: 13px; padding: 6px 2px 10px; margin: 0 0 8px; border-bottom: 1px dashed var(--border); }

/* === 策略实验室融合信号样式 === */
.lab-tag { display: inline-block; padding: 2px 8px; border-radius: var(--radius-pill); font-size: 11px; font-weight: 600; line-height: 1.3; }
.lab-tag-live { background: #52c41a; color: #fff; }
.lab-tag-partial { background: #1890ff; color: #fff; }
.lab-tag-exp { background: #faad14; color: #fff; }
.lab-tag-dev { background: #8c8c8c; color: #fff; }
.lab-tag-excluded { background: #d9d9d9; color: #8c8c8c; }
.lab-tag-pending { background: #f0f0f0; color: #8c8c8c; border: 1px dashed #d9d9d9; }
[data-theme="dark"] .lab-tag-pending,
[data-theme="redgold"] .lab-tag-pending { background: #262626; color: #8c8c8c; border-color: #434343; }
.lab-strategy-list { display: flex; flex-direction: column; gap: 10px; }
.lab-strategy-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; padding: 12px; }
.lab-card-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.lab-card-name { font-size: 14px; font-weight: 700; color: var(--text-1); }
.lab-fusion-conditions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 8px; }
.lab-fusion-cond-label { font-size: 11px; color: var(--text-3); }
.lab-fusion-cond { font-size: 11px; padding: 2px 8px; background: var(--bg-hover); color: var(--text-2); border-radius: 999px; }
.lab-card-trigger { font-size: 12px; color: var(--text-3); margin-bottom: 4px; }
.lab-card-conclusion { font-size: 12px; color: var(--text-2); }
.lab-fusion-pending { opacity: 0.85; }
.lab-fusion-empty { text-align: center; padding: 24px; color: var(--text-4); font-size: 13px; }
.lab-fusion-phase-note { margin-top: 12px; padding: 10px 12px; background: var(--primary-bg); border-radius: 8px; font-size: 12px; color: var(--text-2); }
.lab-zone-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.lab-zone-tab { padding: 6px 12px; border: 1px solid var(--border-strong); border-radius: 999px; background: var(--bg-card); color: var(--text-2); cursor: pointer; font-size: 12px; font-family: inherit; transition: all 0.15s; }
.lab-zone-tab:hover { border-color: var(--primary); color: var(--primary); }
.lab-zone-tab.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.lab-zone-count { font-size: 11px; opacity: 0.8; margin-left: 4px; }
.lab-zone-desc { font-size: 12px; color: var(--text-3); margin-bottom: 12px; }
.lab-warning { background: #fff7e6; border: 1px solid #ffd591; border-radius: 8px; padding: 10px 12px; margin-bottom: 12px; font-size: 12px; color: #8a5f2a; }
[data-theme="dark"] .lab-warning,
[data-theme="redgold"] .lab-warning { background: #2b2111; border-color: #4a351a; color: #d4b88a; }

