/* ==========================================================================
   A股智能看盘 · 网页版  —— 深色主题 / 移动优先 / 无外部依赖
   ========================================================================== */
:root {
  --bg: #0e1117;
  --panel: #161b22;
  --panel2: #1b2129;
  --line: #232a34;
  --text: #c9d1d9;
  --dim: #7d8590;
  --up: #ef4444;
  --down: #22c55e;
  --flat: #9ca3af;
  --accent: #1f6feb;
  --price: #4fa3ff;
  --avg: #ffcc44;
  --radius: 10px;
  --topbar-h: 88px;
  --nav-h: 56px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0; padding: 0; height: 100%;
  background: var(--bg); color: var(--text);
  font-family: "Microsoft YaHei UI", "PingFang SC", "Noto Sans SC", system-ui, sans-serif;
  font-size: 14px; line-height: 1.5;
  overscroll-behavior-y: none;
}

a { color: var(--accent); text-decoration: none; }
code { background: #21262d; padding: 1px 5px; border-radius: 4px; font-size: 12px; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #30363d; border-radius: 4px; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------------------------------------------------------------- 登录页 */
.login-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 20px; }
.login-card {
  width: 100%; max-width: 360px; background: var(--panel);
  border: 1px solid var(--line); border-radius: 16px; padding: 28px 24px 20px;
  text-align: center; box-shadow: 0 18px 50px rgba(0,0,0,.45);
}
.login-logo { font-size: 40px; line-height: 1; }
.login-card h1 { font-size: 20px; margin: 10px 0 4px; color: #e6edf3; }
.login-sub { color: var(--dim); font-size: 12px; margin: 0 0 22px; }
.login-label { display: block; text-align: left; font-size: 12px; color: var(--dim); margin-bottom: 6px; }
.login-input {
  width: 100%; padding: 12px 14px; font-size: 18px; letter-spacing: 4px; text-align: center;
  background: #0d1117; color: var(--text); border: 1px solid #30363d; border-radius: 10px;
  outline: none; transition: border-color .15s;
}
.login-input:focus { border-color: var(--accent); }
.login-btn { width: 100%; margin-top: 16px; padding: 12px; font-size: 15px; }
.login-msg { min-height: 20px; margin: 12px 0 0; font-size: 13px; color: #f85149; }
.login-msg.ok { color: var(--down); }
.login-hint { font-size: 11px; color: var(--dim); margin: 14px 0 0; line-height: 1.6; }

/* ---------------------------------------------------------------- 通用控件 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  padding: 7px 12px; font-size: 13px; color: var(--text); background: #21262d;
  border: 1px solid transparent; border-radius: 8px; cursor: pointer; white-space: nowrap;
  transition: background .12s, color .12s;
}
.btn:hover { background: #30363d; }
.btn:active { background: #3c444d; }
.btn.primary { background: var(--accent); color: #fff; }
.btn.primary:hover { background: #388bfd; }
.btn.ghost { background: transparent; border-color: #30363d; }
.btn.sm { padding: 4px 9px; font-size: 12px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

input[type=text], input[type=search], input[type=date], select {
  padding: 7px 10px; font-size: 13px; color: var(--text); background: #0d1117;
  border: 1px solid #30363d; border-radius: 8px; outline: none; font-family: inherit;
}
input:focus, select:focus { border-color: var(--accent); }
select { appearance: none; padding-right: 26px; background-image: linear-gradient(45deg, transparent 50%, #7d8590 50%), linear-gradient(135deg, #7d8590 50%, transparent 50%); background-position: calc(100% - 14px) 50%, calc(100% - 9px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }

/* ---------------------------------------------------------------- 布局 */
#app { display: flex; flex-direction: column; min-height: 100vh; }

.topbar {
  position: sticky; top: 0; z-index: 30; background: rgba(14,17,23,.96);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
  padding: env(safe-area-inset-top) 12px 0;
}
.topbar-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 9px 0; }
.brand { font-size: 16px; font-weight: 700; color: #e6edf3; white-space: nowrap; }
.brand small { font-weight: 400; font-size: 11px; color: var(--dim); margin-left: 6px; }
.spacer { flex: 1 1 auto; }
.searchbox { display: flex; gap: 6px; align-items: center; flex: 1 1 240px; max-width: 420px; }
.searchbox input { flex: 1 1 auto; min-width: 0; }
.statusline { display: flex; gap: 12px; flex-wrap: wrap; font-size: 11px; color: var(--dim); padding-bottom: 7px; }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--down); margin-right: 5px; vertical-align: middle; }
.dot.off { background: var(--dim); }
.dot.err { background: #f85149; }

nav.tabs {
  display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none;
  border-top: 1px solid var(--line); padding: 5px 0;
}
nav.tabs::-webkit-scrollbar { display: none; }
nav.tabs button {
  flex: 0 0 auto; padding: 6px 13px; font-size: 13px; color: var(--dim);
  background: transparent; border: 1px solid transparent; border-radius: 999px;
  cursor: pointer; white-space: nowrap; font-family: inherit;
}
nav.tabs button:hover { color: var(--text); background: #1b2129; }
nav.tabs button.active { color: #fff; background: #21262d; border-color: #30363d; }

main { flex: 1 1 auto; padding: 12px; padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
.view { display: none; }
.view.active { display: block; animation: fade .18s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }

/* ---------------------------------------------------------------- 卡片 / 网格 */
.grid { display: grid; gap: 10px; }
.grid.idx { grid-template-columns: repeat(auto-fit, minmax(154px, 1fr)); }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 10px 12px; overflow: hidden;
}
.card h3 {
  margin: 0 0 8px; font-size: 12px; font-weight: 700; color: #e6edf3;
  display: flex; align-items: center; gap: 6px;
}
.card h3 .sub { font-weight: 400; color: var(--dim); font-size: 11px; }
.idxcard { display: flex; flex-direction: column; gap: 2px; }
.idxcard .nm { font-size: 12px; color: var(--dim); }
.idxcard .pv { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.idxcard .sb { font-size: 11px; color: var(--dim); font-variant-numeric: tabular-nums; }

.up { color: var(--up); }
.down { color: var(--down); }
.flat { color: var(--flat); }
.num { font-variant-numeric: tabular-nums; }

.breadth div { display: flex; justify-content: space-between; font-size: 13px; padding: 2px 0; }
.breadth .k { color: var(--dim); }
.breadth .v { font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- 表格 */
.tablewrap { overflow: auto; max-height: 62vh; border-radius: 8px; }
table { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 13px; }
thead th {
  position: sticky; top: 0; z-index: 2; background: #21262d; color: #e6edf3;
  font-weight: 700; font-size: 12px; text-align: right; padding: 7px 9px;
  white-space: nowrap; cursor: pointer; border-bottom: 1px solid var(--line);
}
thead th:first-child, tbody td:first-child { text-align: left; padding-left: 10px; }
thead th.l, tbody td.l { text-align: left; }
thead th.sorted::after { content: " ▾"; color: var(--accent); }
thead th.sorted.asc::after { content: " ▴"; }
tbody td {
  text-align: right; padding: 6px 9px; white-space: nowrap;
  border-bottom: 1px solid #1b2129; font-variant-numeric: tabular-nums;
}
tbody tr { background: #0f141b; }
tbody tr:nth-child(even) { background: #121821; }
tbody tr:hover { background: #1b2635; }
tbody tr.sel { background: #1f6feb33; }
td.name { text-align: left; }
td.code { text-align: left; color: var(--dim); font-family: ui-monospace, Consolas, monospace; font-size: 12px; }
.pager { display: flex; align-items: center; gap: 8px; padding: 9px 2px 2px; font-size: 12px; color: var(--dim); flex-wrap: wrap; }

/* ---------------------------------------------------------------- 个股页 */
.stockhead { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.stockhead .nm { font-size: 20px; font-weight: 700; color: #e6edf3; }
.stockhead .cd { color: var(--dim); font-size: 13px; }
.stockhead .pv { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.stockhead .stage { font-size: 13px; color: var(--dim); font-variant-numeric: tabular-nums; }
.periods { display: flex; gap: 4px; flex-wrap: wrap; }
.periods button { padding: 4px 10px; font-size: 12px; border-radius: 6px; background: #21262d; color: var(--dim); border: 1px solid transparent; cursor: pointer; font-family: inherit; }
.periods button.active { background: #1f6feb; color: #fff; }
.chartbox { position: relative; background: #0f141b; border: 1px solid var(--line); border-radius: 8px; }
.chartbox canvas { display: block; width: 100%; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; font-size: 12px; }
.kv .k { color: var(--dim); }
.kv .v { text-align: right; font-variant-numeric: tabular-nums; }
.book { font-size: 12px; font-variant-numeric: tabular-nums; }
.book .row { display: flex; justify-content: space-between; padding: 2px 0; }
.book .sep { border-top: 1px dashed #30363d; margin: 5px 0; }

/* ---------------------------------------------------------------- 杂项 */
.msg { padding: 14px; text-align: center; color: var(--dim); font-size: 13px; }
.msg.err { color: #f85149; }
.bar { height: 6px; border-radius: 3px; background: #21262d; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--accent); }
.badge { display: inline-block; padding: 1px 7px; border-radius: 999px; background: #21262d; color: var(--dim); font-size: 11px; }
.badge.up { background: #ef444422; color: var(--up); }
.badge.down { background: #22c55e22; color: var(--down); }
.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  background: #21262d; color: #e6edf3; padding: 9px 16px; border-radius: 999px;
  border: 1px solid #30363d; font-size: 13px; z-index: 99; opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s; box-shadow: 0 10px 30px rgba(0,0,0,.5);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(-4px); }

.mobileOnly { display: none; }
@media (max-width: 700px) {
  body { font-size: 13px; }
  .topbar-row { gap: 6px; padding: 7px 0; }
  .brand { font-size: 15px; }
  .brand small { display: none; }
  .searchbox { order: 3; flex-basis: 100%; max-width: none; }
  main { padding: 8px; }
  .grid { gap: 8px; }
  .grid.idx { grid-template-columns: repeat(2, 1fr); }
  .idxcard .pv { font-size: 17px; }
  thead th, tbody td { padding: 6px 6px; font-size: 12px; }
  .tablewrap { max-height: 58vh; }
  .mobileOnly { display: inline-flex; }
}

/* ==========================================================================
   行情表格的"标题栏切换"（涨幅榜 / 跌幅榜 / 成交额榜 ……）
   参考同花顺电脑版：一个表格 + 一排标签，切标签只换排序，不换页面。
   ========================================================================== */
.subtabs {
  display: flex; gap: 6px; flex-wrap: wrap;
  padding-bottom: 9px; margin-bottom: 9px;
  border-bottom: 1px solid var(--line);
}
.sbtn {
  padding: 5px 13px; border-radius: 6px;
  border: 1px solid transparent; background: transparent;
  color: var(--dim); font-size: 13px; font-family: inherit;
  cursor: pointer; transition: background .12s, color .12s, border-color .12s;
}
.sbtn:hover { background: var(--panel2); color: var(--text); }
.sbtn.active {
  background: rgba(31, 111, 235, .14);
  border-color: var(--accent);
  color: var(--price);
  font-weight: 600;
}
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

@media (max-width: 640px) {
  .sbtn { padding: 6px 11px; font-size: 12.5px; }
  .subtabs { gap: 5px; }
}

/* 图表的缩放控件 */
.zoomctl { display: inline-flex; align-items: center; gap: 4px; margin-left: 8px; }
.zbtn {
  min-width: 26px; padding: 2px 7px; border-radius: 5px;
  border: 1px solid var(--line); background: var(--panel2);
  color: var(--text); font-size: 12px; font-family: inherit; cursor: pointer;
}
.zbtn:hover { border-color: var(--accent); color: var(--price); }
.zbtn:active { transform: translateY(1px); }
.zinfo {
  margin-left: 4px; font-family: ui-monospace, Consolas, monospace;
  font-size: 11.5px; color: var(--dim);
}
@media (max-width: 640px) {
  .zoomctl { margin-left: 2px; }
  .zbtn { min-width: 24px; padding: 3px 6px; }
}

/* ==================== 信号卡片 ==================== */
.siglist { display: flex; flex-direction: column; gap: 10px; }
.sigcard {
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px;
  background: rgba(255,255,255,.02); border-left: 3px solid var(--line);
}
.sigcard.buy { border-left-color: #ef4444; }
.sigcard.sell { border-left-color: #22c55e; }
.sigcard.done { opacity: .55; }
.sighead { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; }
.sigcode { cursor: pointer; text-decoration: underline dotted; }
.sigprice { margin-left: auto; font-variant-numeric: tabular-nums; font-weight: 600; }
.sigstatus { font-size: 12px; padding: 1px 6px; border-radius: 6px; background: var(--line); }
.sigmeta { margin-top: 6px; font-size: 12.5px; color: var(--dim); }
.sigreason { margin-top: 5px; font-size: 12.5px; line-height: 1.5; }
.sigfoot { margin-top: 8px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sigfoot .sbtn { margin-left: auto; }
.sigfoot .sbtn + .sbtn { margin-left: 0; }
.kv { display: flex; flex-direction: column; gap: 4px; }
.kvrow { display: flex; justify-content: space-between; font-size: 13px; }
.kvrow span { color: var(--dim); }
table.mini { width: 100%; border-collapse: collapse; font-size: 13px; }
table.mini th, table.mini td { padding: 5px 6px; text-align: left; border-bottom: 1px solid var(--line); }
.up { color: #ef4444; }
.down { color: #22c55e; }

/* ==================== 交割单汇总条（横排） ==================== */
.fillstats {
  display: flex; flex-wrap: wrap; gap: 8px 22px; margin-bottom: 10px;
  padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px;
}
.fillstat { display: flex; flex-direction: column; gap: 2px; min-width: 92px; }
.fillstat > span { font-size: 12px; color: var(--dim); }
.fillstat > b { font-size: 15px; font-variant-numeric: tabular-nums; }

/* ==================== 弱转强：版本徽章 + 漏斗 ==================== */
.versionbadge {
  display: inline-block; margin-left: 8px; padding: 1px 8px;
  border-radius: 10px; font-size: 12px; font-weight: 600;
  color: #58a6ff; border: 1px solid #58a6ff55; background: #58a6ff11;
  vertical-align: middle;
}
.frow {
  display: flex; align-items: center; gap: 8px; margin: 4px 0;
  font-size: 13px;
}
.frow .flabel { width: 110px; flex: none; color: var(--dim); }
.frow .fbarwrap {
  flex: 1; height: 16px; background: #ffffff0d; border-radius: 3px;
  overflow: hidden;
}
.frow .fbar {
  height: 100%; border-radius: 3px;
  background: linear-gradient(90deg, #2ea04399, #2ea043);
}
.frow .fnum {
  width: 44px; text-align: right; flex: none;
  font-variant-numeric: tabular-nums;
}
.frow .fdrop {
  width: 44px; text-align: right; flex: none; font-size: 12px; color: #f8514999;
}

/* ==================== 日期选择器（自绘图标 + 实心蓝底，绝不靠系统主题） ==================== */
.datepick {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px 6px 12px; border-radius: 8px;
  background: #12386b;                      /* 实心深蓝底，和页面灰底强对比 */
  border: 2px solid #58a6ff;                /* 亮蓝粗边 */
  box-shadow: 0 0 0 3px #58a6ff22, 0 2px 8px #00000066;   /* 外发光 */
  color: #ffffff;
  font-size: 15px; font-weight: 700;
  cursor: pointer;
  transition: all .15s;
}
.datepick:hover { background: #1a4a86; border-color: #79c0ff; }
.datepick:active { transform: translateY(1px); }

/* 自绘的日历图标（22px 亮蓝，任何主题下都清楚） */
.datepick .dp-ico {
  width: 22px; height: 22px; flex: none;
  background: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2358a6ff' stroke-width='2' stroke-linecap='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='3'/%3E%3Cpath d='M8 3v4M16 3v4M3 11h18'/%3E%3Ccircle cx='8.5' cy='15.5' r='1.3' fill='%2358a6ff' stroke='none'/%3E%3Ccircle cx='12.5' cy='15.5' r='1.3' fill='%2358a6ff' stroke='none'/%3E%3C/svg%3E") center/22px 22px no-repeat;
}
.datepick .dp-text { color: #ffffff; font-size: 13px; opacity: .95; letter-spacing: .5px; }

.datepick input[type="date"] {
  background: transparent; border: none; outline: none;
  color: #ffffff !important;                 /* 白字，压住 UA 默认色 */
  -webkit-text-fill-color: #ffffff;
  font-size: 16px; font-weight: 700;
  font-variant-numeric: tabular-nums;
  color-scheme: dark;
  cursor: pointer;
  min-width: 140px;
  padding: 0;
}
/* 原生小日历图标：直接画成亮蓝 SVG，尺寸放大，不用 filter 反色 */
.datepick input[type="date"]::-webkit-calendar-picker-indicator {
  background: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2358a6ff' stroke-width='2' stroke-linecap='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='3'/%3E%3Cpath d='M8 3v4M16 3v4M3 11h18'/%3E%3Ccircle cx='8.5' cy='15.5' r='1.3' fill='%2358a6ff' stroke='none'/%3E%3Ccircle cx='12.5' cy='15.5' r='1.3' fill='%2358a6ff' stroke='none'/%3E%3C/svg%3E") center/20px 20px no-repeat;
  width: 20px; height: 20px;
  opacity: 1; filter: none;
  margin-left: 4px;
  cursor: pointer;
}
.datepick input[type="date"]::-webkit-datetime-edit { color: #ffffff; }
.datepick input[type="date"]::-webkit-datetime-edit-fields-wrapper { color: #ffffff; }

/* ==================== 弱转强的两张表：不切列、可横向滚动 ==================== */
.tablewrap.w2swrap {
  overflow-x: auto; overflow-y: visible;
  max-height: none;                 /* 规则表最多 10 行，不需要 62vh 限制 */
  padding-bottom: 4px;
}
.tablewrap.w2swrap::-webkit-scrollbar { height: 8px; }
.tablewrap.w2swrap::-webkit-scrollbar-thumb {
  background: #30363d; border-radius: 4px;
}
.tablewrap.w2swrap::-webkit-scrollbar-thumb:hover { background: #484f58; }
table.mini.w2stable { width: 100%; min-width: 720px; table-layout: auto; }
table.mini.w2stable th, table.mini.w2stable td {
  white-space: normal;              /* 该换行就换行，不要截断 */
  word-break: break-word;
  vertical-align: top;
}
table.mini.w2stable td.reason,
table.mini.w2stable td:nth-child(5) {
  max-width: 420px;                 /* 「为什么」那一列放宽 */
  white-space: normal;
}

/* ==================== 代码框（手机长按可全选复制） ==================== */
.codebox {
  width: 100%; box-sizing: border-box;
  margin: 6px 0 0;
  padding: 8px 10px;
  border-radius: 8px;
  background: #0d1117;
  border: 1px solid #30363d;
  color: #e6edf3;
  font: 16px/1.6 ui-monospace, Consolas, "SF Mono", monospace;   /* 16px 防 iOS 聚焦放大 */
  letter-spacing: .5px;
  resize: vertical;
  white-space: pre;
  overflow-x: auto;
  -webkit-user-select: text; user-select: text;   /* 允许长按选择 */
}
.codebox:focus { border-color: #58a6ff; outline: none; }
/* 个股页：左图右资料，中缝可拖 */
.stockgrid { display: grid; grid-template-columns: var(--stock-left, 68%) 6px 1fr;
  gap: 0; align-items: start; margin-top: 10px; }
.stockgrid .stockmain { min-width: 0; }
.stockgrid .stockside { min-width: 0; padding-left: 10px; }
.stockgrid .gutter { cursor: col-resize; align-self: stretch; min-height: 300px;
  background: transparent; position: relative; }
.stockgrid .gutter::after { content: ''; position: absolute; left: 2px; top: 0;
  bottom: 0; width: 2px; background: var(--line); border-radius: 2px; }
.stockgrid .gutter:hover::after { background: #58a6ff; }
@media (max-width: 900px) {
  .stockgrid { grid-template-columns: 1fr; }
  .stockgrid .gutter { display: none; }
  .stockgrid .stockside { padding-left: 0; margin-top: 10px; }
}
/* 量 / 额 切换 */
.volswitch { display: flex; align-items: center; gap: 6px; margin: 6px 0 2px 4px; }
.volswitch .vbtn { background: var(--panel2); border: 1px solid var(--line);
  color: var(--dim); border-radius: 5px; font-size: 11.5px; padding: 2px 10px; cursor: pointer; }
.volswitch .vbtn.active { color: #fff; background: #1f6feb; border-color: #1f6feb; }

/* ==================== 个股页：上一只/下一只（图表右下角）==================== */
.chartbox { position: relative; }
.stocknav {
  position: absolute; right: 10px; bottom: 8px;
  display: flex; gap: 6px; z-index: 3;
}
.stocknav .navbtn {
  padding: 4px 10px; font-size: 12px; border-radius: 6px;
  background: #161b22cc; border: 1px solid #30363d; color: #c9d1d9;
  cursor: pointer;
}
.stocknav .navbtn:hover { background: #1f6feb33; border-color: #58a6ff; }
.stocknav .navbtn:disabled { opacity: .4; cursor: not-allowed; }
/* 策略页：说明 + 规则 + 漏斗 合成一块（左图右表，字号收紧） */
.stratcols { display: grid; grid-template-columns: 300px 1fr; gap: 14px; align-items: start; }
.stratcols .funnelmini { font-size: 11.5px; }
.funnelmini .frow { display: grid; grid-template-columns: 92px 1fr 38px; gap: 6px;
  align-items: center; height: 18px; }
.funnelmini .flabel { color: var(--dim); font-size: 11px; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; }
.funnelmini .fbarwrap { background: var(--panel2); height: 8px; border-radius: 4px;
  overflow: hidden; }
.funnelmini .fbar { background: linear-gradient(90deg,#1f6feb,#3fb950); height: 100%; }
.funnelmini .fnum { text-align: right; font-size: 11px; color: var(--text); }
.rulesmini { max-height: 260px; overflow: auto; }
.rulesmini table { width: 100%; border-collapse: collapse; font-size: 11.5px; }
.rulesmini th, .rulesmini td { padding: 3px 6px; border-bottom: 1px solid var(--line);
  text-align: left; vertical-align: top; }
.rulesmini th { color: var(--dim); font-weight: 500; }
.paramsrow { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 8px;
  font-size: 11.5px; color: var(--dim); }
.paramsrow b { color: var(--text); font-weight: 500; }
@media (max-width: 900px) {
  .stratcols { grid-template-columns: 1fr; }
  .rulesmini { max-height: none; }
}
/* 策略页第一步：只列策略步骤，不做漏斗/表格 */
.stratsteps { counter-reset: step; font-size: 12.5px; line-height: 1.85; }
.stratsteps .st { display: flex; gap: 8px; align-items: baseline;
  padding: 3px 0; border-bottom: 1px dashed rgba(255,255,255,0.05); }
.stratsteps .st:last-child { border-bottom: none; }
.stratsteps .no { flex: 0 0 18px; color: #58a6ff; font-size: 11.5px; text-align: right; }
.stratsteps .nm { flex: 0 0 96px; color: var(--text); font-weight: 500; }
.stratsteps .rl { flex: 1 1 auto; color: var(--text); }
.stratsteps .wy { flex: 0 1 320px; color: var(--dim); font-size: 11.5px; }
@media (max-width: 900px) {
  .stratsteps .st { flex-wrap: wrap; }
  .stratsteps .wy { flex: 1 1 100%; padding-left: 122px; }
}
/* 策略页标题：标题+说明在左，按钮固定靠右（三个策略一致） */
.card h3.strathead { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.card h3.strathead .stratbtns { margin-left: auto; display: flex; gap: 6px; }
.card h3.strathead .sub { font-weight: 400; }

/* ==================== 策略说明：三段式表格 ==================== */
.sec-table td.secno {
  text-align: center; font-weight: 700; color: #58a6ff;
  font-size: 13px; vertical-align: top;
}
.sec-table td.secnm {
  font-weight: 600; color: #c9d1d9; vertical-align: top; white-space: nowrap;
}
.sec-table td.seclines { vertical-align: top; line-height: 1.75; }
.sec-table .condline {
  padding: 1px 0; color: #b9c2cf;
}
.sec-table .condline::before {
  content: "·"; color: #3b82f6; margin-right: 6px;
}
@media (max-width: 720px) {
  .sec-table td.secnm { white-space: normal; }
}

/* ==================== 策略页合并表（信号 + 持仓）==================== */
/* 成本价/占用/持有天数 这三列属于持仓，没有持仓时显示 —，颜色弱化 */
.mini td:nth-child(6), .mini td:nth-child(7), .mini td:nth-child(8) {
  font-variant-numeric: tabular-nums;
}
.mini th:nth-child(6), .mini th:nth-child(7), .mini th:nth-child(8) {
  color: #8b949e;
}
@media (max-width: 720px) {
  .mini th:nth-child(8), .mini td:nth-child(8) { display: none; }  /* 手机上先隐藏"持有天数" */
}
