* { box-sizing: border-box; margin: 0; padding: 0; }
.hidden { display: none !important; }

:root {
  --bg: #f0f2f5;
  --card: #ffffff;
  --text: #1f2329;
  --text-2: #4b5563;
  --text-3: #8a9099;
  --border: #e6e8eb;
  --border-light: #f2f5f9;
  --primary: #10b981;
  --primary-dark: #059669;
  --primary-light: #d1fae5;
  --danger: #ef4444;
  --danger-light: #fee2e2;
  --success: #22c55e;
  --success-light: #dcfce7;
  --warning: #f59e0b;
  --info: #3b82f6;
  --info-light: #dbeafe;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.03);
  --shadow: 0 4px 12px rgba(0,0,0,0.06), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 28px rgba(0,0,0,0.08), 0 4px 8px rgba(0,0,0,0.04);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-xs: 6px;
}

html, body { height: 100%; overflow: hidden; }
html.embedded, html.embedded body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  display: flex; flex-direction: column;
  padding-bottom: 40px; /* 给底部固定风险提示栏留位，避免遮挡主页内容 */
}

/* ===== 顶部栏 ===== */
.topbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 16px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
  gap: 16px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  flex-shrink: 0;
}
.brand-icon {
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-radius: 9px;
  font-size: 18px;
  box-shadow: 0 2px 6px rgba(16,185,129,0.25);
}
.brand-title {
  font-size: 15px; font-weight: 700; color: var(--text);
  letter-spacing: -0.2px;
}
.brand-sub {
  font-size: 11px; color: var(--text-3); font-weight: 400;
}

/* 顶部搜索 */
.top-search {
  display: flex; align-items: center; gap: 8px;
  flex: 1; max-width: 480px; min-width: 0;
}
.top-search .search-box {
  flex: 1; position: relative; z-index: 3000; min-width: 0;
}
.top-search input {
  width: 100%;
  padding: 8px 10px 8px 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  font-size: 13px;
  background: #fafbfc;
  transition: all .15s;
}
.top-search input:focus {
  outline: none;
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(16,185,129,0.12);
}
.top-search .search-icon {
  position: absolute; left: 10px; top: 50%;
  transform: translateY(-50%); color: var(--text-3);
  display: flex; pointer-events: none;
}
.top-search button {
  padding: 8px 14px; border: none;
  background: var(--primary); color: #fff;
  border-radius: var(--radius-xs);
  cursor: pointer; font-size: 13px; font-weight: 500;
  transition: all .15s;
  white-space: nowrap; flex-shrink: 0;
}
.top-search button:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(16,185,129,0.25);
}

.top-right {
  display: flex; align-items: center; gap: 12px;
  flex-shrink: 0;
}
.market-tag {
  font-size: 12px; font-weight: 600;
  padding: 4px 10px; border-radius: 20px;
  background: #eef1f5; color: var(--text-3);
  border: 1px solid var(--border);
  transition: all .2s;
}
.market-tag.open {
  background: var(--success-light); color: var(--success);
  border-color: rgba(34,197,94,0.25);
  box-shadow: 0 0 0 3px rgba(34,197,94,0.08);
}
.market-tag.closed {
  background: var(--danger-light); color: var(--danger);
  border-color: rgba(239,68,68,0.2);
}

/* 行情数据源切换 */
.ds-tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600;
  padding: 2px 8px; border-radius: 20px;
  background: #eef1f5; border: 1px solid var(--border);
  white-space: nowrap;
}
.ds-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #cbd5e1; flex-shrink: 0;
  transition: background .2s, box-shadow .2s;
}
.ds-dot.ok { background: var(--success); box-shadow: 0 0 0 3px rgba(34,197,94,.12); }
.ds-dot.err { background: var(--danger); box-shadow: 0 0 0 3px rgba(239,68,68,.12); }
.ds-select {
  border: none; background: transparent; font-size: 12px; font-weight: 600;
  color: var(--text-1); cursor: pointer; outline: none; padding: 2px 0;
  max-width: 120px;
}

/* 会员到期徽标：实色填充 + 白字 + 加粗，充值状态更醒目 */
.vip-tag {
  font-size: 12px; font-weight: 600;
  padding: 4px 10px; border-radius: 20px;
  background: #eef1f5; color: var(--text-3);
  border: 1px solid var(--border);
  white-space: nowrap;
  transition: all .2s;
}
.vip-tag.free { background: #f5f5f4; color: var(--text-3); border-color: var(--border); font-weight: 500; }
/* active 充值有效：深绿实色 + 白字，醒目 */
.vip-tag.active {
  background: var(--success);
  color: #fff;
  border-color: var(--success);
  box-shadow: 0 1px 3px rgba(34,197,94,.35);
}
/* expired 已到期：红色实色 + 白字，醒目警示 */
.vip-tag.expired {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
  box-shadow: 0 1px 3px rgba(239,68,68,.4);
  font-weight: 700;
}

.switch {
  display: flex; align-items: center; gap: 7px;
  cursor: pointer; font-size: 13px; color: var(--text-2);
  user-select: none;
}
.switch input { display: none; }
.slider {
  width: 38px; height: 22px;
  background: #d1d5db; border-radius: 22px;
  position: relative; transition: .2s;
}
.slider::before {
  content: ""; position: absolute;
  width: 18px; height: 18px; left: 2px; top: 2px;
  background: #fff; border-radius: 50%; transition: .2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.switch input:checked + .slider { background: var(--primary); }
.switch input:checked + .slider::before { transform: translateX(16px); }

/* ===== 主布局 ===== */
.layout {
  display: flex; gap: 14px;
  padding: 14px;
  flex: 1;
  min-height: 0;
  max-width: 1600px; margin: 0 auto;
  width: 100%;
}

/* ===== 左侧边栏 ===== */
.side {
  width: 290px;
  background: var(--card);
  border-radius: var(--radius);
  padding: 14px 12px;
  flex-shrink: 0;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-light);
  display: flex; flex-direction: column;
  min-height: 0;
}
.side-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 10px;
  flex-shrink: 0;
}
.side-title {
  font-size: 13px; font-weight: 700; color: var(--text);
}
.stock-count {
  font-size: 11px; font-weight: 600;
  padding: 2px 7px; border-radius: 10px;
  background: var(--border-light); color: var(--text-3);
}
.side-search {
  position: relative;
  margin: 0 0 10px;
  flex-shrink: 0;
}
.side-search input {
  width: 100%;
  padding: 6px 28px 6px 10px;
  font-size: 12px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: #f9fafb;
  color: var(--text);
  outline: none;
  box-sizing: border-box;
  transition: all .15s;
}
.side-search input:focus {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 2px rgba(16,185,129,.12);
}
.side-search input::placeholder { color: var(--text-3); }
.side-search-clear {
  position: absolute;
  right: 4px; top: 50%;
  transform: translateY(-50%);
  width: 20px; height: 20px;
  display: flex; align-items: center; justify-content: center;
  background: transparent;
  border: none;
  color: var(--text-3);
  cursor: pointer;
  padding: 0;
  font-size: 12px;
  line-height: 1;
  border-radius: 4px;
}
.side-search-clear:hover { background: var(--border-light); color: var(--text); }
.side-search-clear[hidden] { display: none; }

.search-suggest {
  position: absolute; top: 100%; left: 0;
  min-width: 100%; width: max-content;
  margin-top: 6px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  list-style: none; max-height: 260px; overflow-y: auto;
  z-index: 10000; pointer-events: auto;
}
.search-suggest.hidden { display: none; }
.search-suggest li {
  display: flex; justify-content: space-between; align-items: center;
  padding: 9px 11px; cursor: pointer; font-size: 13px;
  border-bottom: 1px solid var(--border-light); white-space: nowrap; min-width: 230px;
  transition: background .1s;
}
.search-suggest li:last-child { border-bottom: none; }
.search-suggest li:hover, .search-suggest li.active {
  background: #f4f6f8;
}
.search-suggest li > * { pointer-events: none; }
.search-suggest .sg-left { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.search-suggest .sg-name { color: var(--text); font-weight: 600; }
.search-suggest .sg-code { color: var(--text-3); font-size: 12px; }
.search-suggest .sg-type {
  font-size: 11px; padding: 2px 6px; border-radius: 8px;
  background: var(--primary-light); color: var(--primary-dark); margin-left: 6px; flex-shrink: 0;
}
/* 已添加标记 */
.search-suggest li.sg-added { opacity: .7; }
.search-suggest li.sg-added .sg-name,
.search-suggest li.sg-added .sg-code { color: var(--text-3); }
.search-suggest .sg-added-tag {
  font-size: 11px; padding: 1px 7px; border-radius: 8px;
  background: #dcfce7; color: #16a34a; margin-left: 6px; flex-shrink: 0;
  font-weight: 600; white-space: nowrap;
}
.search-suggest .sg-hl { background: #fef08a; color: var(--text); border-radius: 2px; padding: 0 1px; font-weight: 700; }
.search-suggest .sg-loading, .search-suggest .sg-empty { color: var(--text-3); padding: 12px; text-align: center; justify-content: center; }
.search-suggest .sg-toast { color: var(--primary); padding: 12px; text-align: center; justify-content: center; font-weight: 600; }

.toast {
  position: fixed; top: 56px; left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: rgba(31,35,41,.9); color: #fff;
  padding: 9px 18px; border-radius: 24px;
  font-size: 13px; opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
  z-index: 2000;
  box-shadow: var(--shadow-lg);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.err { background: rgba(208,48,80,.92); }

.stock-list { list-style: none; overflow-y: auto; flex: 1; min-height: 0; }
.stock-list::-webkit-scrollbar { width: 4px; }
.stock-list::-webkit-scrollbar-track { background: transparent; }
.stock-list::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 3px; }
.stock-list li {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 8px;
  border-radius: var(--radius-xs);
  cursor: pointer; margin-bottom: 4px;
  position: relative;
  transition: all .12s;
  border: 1px solid transparent;
}
.stock-list li:hover { background: #f4f6f8; }
.stock-list li.active {
  background: var(--primary-light);
  border-color: rgba(16,185,129,0.25);
}
.stock-list li.active::before {
  content: ""; position: absolute; left: 0; top: 6px; bottom: 6px;
  width: 3px; background: var(--primary); border-radius: 0 2px 2px 0;
}
.stock-list .s-left { display: flex; flex-direction: column; min-width: 0; flex: 1; overflow: hidden; }
.stock-list .s-code {
  font-size: 12px; font-weight: 700; color: var(--text); white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
  font-family: "JetBrains Mono", "SF Mono", Consolas, monospace;
  letter-spacing: -0.2px;
}
.stock-list .s-name { font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stock-list .s-right { display: flex; align-items: center; gap: 4px; flex-shrink: 0; margin-left: 6px; }
.stock-list .s-state {
  font-size: 10px; font-weight: 600;
  padding: 1px 6px; border-radius: 9px;
  background: var(--border-light); color: var(--text-3);
  white-space: nowrap; flex-shrink: 0;
}
/* 与头部 curState 配色一致：
   待回补（SOLD_WAIT_BUY, 卖出后等买回）→ 绿（下一步是买入）
   待了结（BOUGHT_WAIT_SELL, 买入后等卖出）→ 红（下一步是卖出） */
.stock-list .s-state.wait-buy  { background: var(--success-light); color: var(--success); }
.stock-list .s-state.wait-sell { background: var(--danger-light);  color: var(--danger); }
.stock-list .s-daily {
  font-size: 11px; color: var(--text-3);
  min-width: 22px; text-align: center;
  font-variant-numeric: tabular-nums;
}
.stock-list .s-del {
  width: 20px; height: 20px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--danger); border: none; background: transparent;
  cursor: pointer; font-size: 12px; border-radius: 5px;
  opacity: 0; transition: all .15s; margin-left: 3px;
}
.stock-list li:hover .s-del { opacity: 1; }
.stock-list .s-del:hover { background: var(--danger-light); }
/* 置顶按钮：默认淡显（与删除按钮一致），钉住态常亮 */
.stock-list .s-pin {
  width: 20px; height: 20px;
  display: inline-flex; align-items: center; justify-content: center;
  border: none; background: transparent; cursor: pointer; font-size: 13px;
  border-radius: 5px; opacity: 0; transition: all .15s; margin-left: 3px;
  filter: grayscale(1); color: var(--text-3);
}
.stock-list li:hover .s-pin { opacity: 1; }
.stock-list .s-pin.pinned { opacity: 1; filter: none; }
.stock-list .s-pin:hover { background: var(--primary-light); }
/* 编辑个股参数按钮 */
.stock-list .s-edit {
  width: 20px; height: 20px;
  display: inline-flex; align-items: center; justify-content: center;
  border: none; background: transparent; cursor: pointer; font-size: 12px;
  border-radius: 5px; opacity: 0; transition: all .15s; margin-left: 3px;
  color: var(--text-3);
}
.stock-list li:hover .s-edit { opacity: 1; }
.stock-list .s-edit:hover { background: var(--primary-light); }
/* 个股已设置自定义参数的指示点 */
.stock-list .s-custom {
  color: var(--accent, #1f6feb); font-size: 9px; margin-left: 4px;
  flex-shrink: 0; line-height: 1;
}
/* 钉住行：轻微暖色底 + 左侧琥珀竖条，与「选中」的绿色竖条区分 */
.stock-list li.pinned { background: #fff8ec; box-shadow: inset 3px 0 0 0 #f59e0b; }
/* 拖拽排序：左边那个 ⠿ 抓手 + 行级视觉提示 */
.stock-list li { cursor: grab; }
.stock-list li:active { cursor: grabbing; }
.stock-list li .s-grip {
  color: var(--text-3); margin-right: 6px; font-size: 12px; line-height: 1;
  cursor: grab; letter-spacing: -1px; flex-shrink: 0;
}
.stock-list li.dragging { opacity: .4; }
.stock-list li.drag-over-before { box-shadow: inset 0 3px 0 0 var(--accent, #1f6feb); border-radius: 5px; }
.stock-list li.drag-over-after  { box-shadow: inset 0 -3px 0 0 var(--accent, #1f6feb); border-radius: 5px; }
.hint { font-size: 10px; color: var(--text-3); margin-top: 8px; text-align: center; flex-shrink: 0; }

/* ===== 右侧主图区 ===== */
.main {
  flex: 1;
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px;
  min-width: 0;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-light);
  display: flex; flex-direction: column;
  min-height: 0;
}

.chart-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  flex-wrap: wrap; gap: 12px;
  margin-bottom: 10px;
  flex-shrink: 0;
}
.chart-actions {
  display: flex; flex-direction: column; align-items: flex-end; gap: 6px;
}
.history-tag {
  font-size: 11px; font-weight: 700;
  padding: 2px 8px; border-radius: 10px;
  background: #fff7ed; color: #b45309;
  border: 1px solid rgba(245,158,11,0.25);
}
.back-live {
  padding: 4px 10px; border: 1px solid var(--border);
  background: #fff; color: var(--text-2);
  border-radius: 10px; font-size: 12px; font-weight: 600;
  cursor: pointer; transition: all .15s;
}
.back-live:hover {
  background: var(--primary-light); color: var(--primary-dark);
  border-color: rgba(16,185,129,0.3);
}
.cur-name-row {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.cur-name {
  font-size: 20px; font-weight: 800; color: var(--text);
  letter-spacing: -0.3px;
}
.cur-code {
  font-size: 12px; color: var(--text-3);
  background: var(--border-light); padding: 2px 7px; border-radius: 10px;
  font-family: "JetBrains Mono", "SF Mono", Consolas, monospace;
}
.cur-state {
  font-size: 11px; font-weight: 600;
  padding: 2px 8px; border-radius: 12px;
  background: var(--border-light); color: var(--text-3);
}
.cur-state.wait-buy { background: var(--success-light); color: var(--success); }
.cur-state.wait-sell { background: var(--danger-light); color: var(--danger); }
.cur-tags {
  display: flex; gap: 8px; flex-wrap: wrap;
}
.meta-tag {
  font-size: 11px; color: var(--text-3);
  background: #f7f9fc;
  padding: 3px 9px; border-radius: 10px;
  border: 1px solid var(--border-light);
}
.meta-tag b { color: var(--text-2); margin-left: 4px; font-weight: 600; }

.cur-price-box {
  text-align: right;
  display: flex; flex-direction: column; align-items: flex-end;
}
.cur-price-box .price {
  font-size: 30px; font-weight: 800;
  font-family: "JetBrains Mono", "SF Mono", Consolas, monospace;
  line-height: 1.1;
  letter-spacing: -0.5px;
}
.cur-price-box .pct {
  font-size: 14px; font-weight: 700;
  margin-top: 3px;
  padding: 2px 9px; border-radius: 10px;
}
.up { color: var(--danger); }
.down { color: var(--success); }
.cur-price-box .pct.up { background: var(--danger-light); }
.cur-price-box .pct.down { background: var(--success-light); }

.canvas-wrap {
  flex: 1;
  min-height: 260px;
  background: linear-gradient(180deg, #fbfcfe 0%, #f7f9fc 100%);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  position: relative;
  /* 不用 overflow:hidden，否则内部的 chartTooltip 靠右时会被裁剪 */
}
#chart { width: 100%; height: 100%; display: block; cursor: crosshair; }
#chart.zoomed { cursor: grab; }
#chart.dragging { cursor: grabbing; }
.chart-tooltip {
  position: absolute; top: 0; left: 0;
  background: rgba(31,35,41,.72);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  padding: 9px 13px; border-radius: var(--radius-sm);
  font-size: 12px; line-height: 1.55;
  pointer-events: none; z-index: 20;
  box-shadow: 0 4px 16px rgba(0,0,0,.18), 0 1px 3px rgba(0,0,0,.1);
  white-space: nowrap; transform: translate(-50%, -105%);
  transition: opacity .15s;
  border: 1px solid rgba(255,255,255,0.12);
}
.chart-tooltip.hidden { opacity: 0; }
.chart-tooltip .tt-time { color: #c5cad0; margin-bottom: 3px; font-size: 11px; }
.chart-tooltip .tt-row { display: flex; gap: 14px; }
.chart-tooltip .tt-row b {
  text-shadow: 0 1px 2px rgba(0,0,0,.4);
  font-weight: 700;
}
.chart-tooltip .tt-buy { color: #6ee7b7; }
.chart-tooltip .tt-sell { color: #fca5a5; }

/* ── 底部信息区（图例 | 参数 分区）── */
.chart-foot {
  margin-top: 10px;
  flex-shrink: 0;
  padding-top: 10px;
  border-top: 1px dashed var(--border-light);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.legend {
  display: flex; gap: 14px; flex-wrap: wrap;
  font-size: 11px; color: var(--text-2);
  padding-bottom: 6px;
  border-bottom: 1px dotted var(--border-light);
}
.lg {
  display: inline-flex; align-items: center; gap: 4px;
  cursor: default;
}
.lg i {
  width: 12px; height: 3px; border-radius: 2px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 9px; font-style: normal; line-height: 0;
}
.lg-price i { background: linear-gradient(90deg, #d03050 0 50%, #18a058 50% 100%); }
.lg-avg i { background: repeating-linear-gradient(90deg, #d48806 0 4px, transparent 4px 7px); }
.lg-zero i { background: transparent; border-top: 2px dashed #909399; height: 0; }
.lg-buy i { width: auto; height: auto; color: var(--success); background: transparent; font-size: 10px; }
.lg-sell i { width: auto; height: auto; color: var(--danger); background: transparent; font-size: 10px; }

.params {
  display: flex; gap: 7px; flex-wrap: wrap;
  /* 参数区视觉降级：比图例更轻，形成层级 */
}
.param-chip {
  font-size: 10.5px; color: var(--text-3);
  background: #f7f9fc;
  padding: 3px 8px; border-radius: 10px;
  border: 1px solid var(--border-light);
  transition: all .15s;
}
.param-chip:hover { background: #eef1f5; }
.param-chip b { color: var(--text-2); margin-left: 3px; font-weight: 600; }
.param-chip.be { background: #fff7ed; border-color: rgba(245,158,11,0.2); color: #b45309; }
.param-chip.be b { color: #d97706; }

/* ===== 历史记录（右侧边栏） ===== */
.history {
  width: 300px;
  background: var(--card);
  border-radius: var(--radius);
  padding: 14px 12px;
  flex-shrink: 0;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-light);
  display: flex; flex-direction: column;
  min-height: 0;
}
.history-head {
  display: flex; justify-content: space-between; align-items: center;
  font-weight: 700; font-size: 13px;
  margin-bottom: 10px;
  flex-shrink: 0;
}
.history-sub { font-size: 11px; color: var(--text-3); font-weight: 400; }
.alert-risk-line {
  font-size: 11px; color: var(--text-3); line-height: 1.4;
  background: var(--warn-bg, #fff8e6); border: 1px solid var(--warn-border, #f0d9a0);
  border-radius: 6px; padding: 6px 8px; margin-bottom: 8px; flex-shrink: 0;
}
.alert-risk-line b { color: var(--danger, #a32d2d); }
.alert-log { overflow-y: auto; font-size: 12px; flex: 1; min-height: 0; }
.alert-log::-webkit-scrollbar { width: 4px; }
.alert-log::-webkit-scrollbar-track { background: transparent; }
.alert-log::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 3px; }
.alert-row {
  display: flex; flex-direction: column;
  gap: 5px; padding: 10px;
  margin-bottom: 7px;
  border-radius: var(--radius-xs);
  transition: all .12s;
  cursor: pointer;
  background: #f9fafb;
  border: 1px solid var(--border-light);
}
.alert-row:hover { background: #f1f5f9; border-color: rgba(16,185,129,0.25); transform: translateX(2px); }
.alert-row:last-child { margin-bottom: 0; }
.alert-row .a-head {
  display: flex; align-items: center; gap: 8px;
}
.alert-row .a-date { color: var(--text-3); font-size: 11px; }
.alert-row .a-time { color: var(--text-3); font-family: "JetBrains Mono", monospace; font-size: 11px; }
.alert-row .a-type {
  font-weight: 700; font-size: 12px;
  padding: 1px 7px; border-radius: 8px;
}
.alert-row .a-type.buy { color: var(--success); background: var(--success-light); }
.alert-row .a-type.sell { color: var(--danger); background: var(--danger-light); }
.alert-row .a-reason { color: var(--text-2); font-size: 12px; line-height: 1.5; }
.alert-row .a-foot {
  display: flex; gap: 10px; font-size: 11px; color: var(--text-3);
}
.alert-row .a-foot b { color: var(--text-2); font-weight: 600; margin-left: 3px; }

/* ===== 弹窗 ===== */
.popup-mask { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: flex; align-items: center; justify-content: center; z-index: 100; }
.popup-mask.hidden { display: none; }
.popup {
  background: var(--card); border-radius: var(--radius); padding: 28px 32px;
  width: 360px; text-align: center;
  box-shadow: var(--shadow-lg);
  animation: pop .25s ease;
}
@keyframes pop { from { transform: scale(.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.popup-icon { font-size: 44px; margin-bottom: 4px; }
.popup-type { font-size: 22px; font-weight: 800; margin-bottom: 16px; }
.popup-type.buy { color: var(--success); }
.popup-type.sell { color: var(--danger); }
.popup-row { display: flex; justify-content: space-between; padding: 7px 4px; font-size: 14px; border-bottom: 1px dashed var(--border-light); }
.popup-row span { color: var(--text-3); }
.popup-row b { color: var(--text); }
.popup-reason {
  margin: 16px 0; font-size: 13px; color: var(--text-2);
  background: #f7f9fc; padding: 12px; border-radius: var(--radius-sm);
  text-align: left; line-height: 1.6;
}
.popup-close {
  margin-top: 8px; width: 100%; padding: 11px;
  border: none; background: var(--primary); color: #fff;
  border-radius: var(--radius-sm); font-size: 15px; font-weight: 600;
  cursor: pointer; transition: all .15s;
}
.popup-close:hover { background: var(--primary-dark); transform: translateY(-1px); }

/* ===== iframe 嵌入模式：隐藏顶部栏，让每日工作台做T提醒页更紧凑 ===== */
html.embedded .topbar { display: none; }
html.embedded .layout { padding: 0; gap: 0; }
html.embedded .side,
html.embedded .main,
html.embedded .history { border-radius: 0; border: none; box-shadow: none; }

/* ===== 响应式 ===== */
@media (max-width: 1100px) {
  .history { width: 260px; }
}
@media (max-width: 1024px) {
  .top-search { display: none; }
  /* 竖排时由 .layout 自己滚动（body 是 height:100% + overflow:hidden） */
  .layout { flex-direction: column; overflow-y: auto; }
  .side { width: 100%; max-height: 220px; }
  .stock-list { max-height: 160px; }
  /* 关键：竖排下 .main 若保留 flex:1，flex-basis:0 会把高度压到最小内容高度，
     而 .canvas-wrap 有 min-height:260px → 分时图溢出卡片、盖住下方「提醒记录」面板。
     改为按内容高度排布，各卡片互不重叠。 */
  .main { flex: none; }
  .history { width: 100%; max-height: 240px; flex: none; }
}
@media (max-width: 640px) {
  .topbar { padding: 8px 12px; flex-wrap: wrap; gap: 8px; row-gap: 8px; }
  .brand { flex: 1 1 auto; min-width: 0; }
  .brand-title { font-size: 14px; }
  .brand-sub { display: none; }
  .top-right { flex: 1 1 100%; flex-wrap: wrap; gap: 6px; justify-content: flex-start; }
  .icon-btn { padding: 5px 9px; font-size: 12px; }
  .vip-tag, .market-tag { font-size: 11px; padding: 3px 8px; }
  .switch { font-size: 12px; }
  .layout { padding: 10px; gap: 10px; }
  .main { padding: 12px; }
  .chart-head { flex-direction: column; align-items: flex-start; }
  .cur-price-box { align-items: flex-start; text-align: left; }
  .cur-price-box .price { font-size: 24px; }
  /* 竖排下不要用卡片级 max-height 挤压内容（说明条+风险条会把日志区压到几十像素），
     改为日志区自身限高、内部滚动，卡片高度随内容走。 */
  .history { max-height: none; }
  .alert-log { max-height: 340px; }
}
/* 极窄屏（如 360/375px）进一步收紧，杜绝横向溢出 */
@media (max-width: 420px) {
  .topbar { padding: 8px 10px; gap: 6px; }
  .brand-icon { width: 30px; height: 30px; font-size: 16px; }
  .top-right { gap: 5px; }
  .icon-btn { padding: 4px 7px; font-size: 11px; }
  .vip-tag, .market-tag { font-size: 10px; padding: 2px 6px; }
}

/* ===== K线弹窗 ===== */
.kline-tag {
  display: inline-flex; align-items: center;
  padding: 3px 10px; border-radius: 20px;
  font-size: 12px; cursor: pointer;
  background: var(--info-light); color: var(--info);
  transition: all 0.15s;
}
.kline-tag:hover { background: #c7d8f5; }

.kline-modal {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,0.45);
  display: flex; align-items: center; justify-content: center;
}
.kline-modal.hidden { display: none; }
.kline-box {
  width: 900px; max-width: 95vw;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.kline-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}
.kline-title { font-size: 15px; font-weight: 600; }
.kline-close {
  width: 28px; height: 28px; border-radius: 50%;
  border: none; background: var(--border-light);
  color: var(--text-3); font-size: 16px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.kline-close:hover { background: var(--danger-light); color: var(--danger); }
.kline-body {
  padding: 12px 16px;
  background: #fafbfc;
}
.kline-body canvas { width: 100%; height: auto; display: block; }
.kline-foot {
  display: flex; gap: 16px; padding: 10px 18px;
  border-top: 1px solid var(--border-light);
  font-size: 11px; color: var(--text-3);
}
.lg-kline-up i { display:inline-block;width:10px;height:14px;background:#d03050;margin-right:4px;border-radius:1px;position:relative;}
.lg-kline-up i::before{content:'';position:absolute;top:2px;left:2px;width:6px;height:2px;background:#d03050;}
.lg-kline-down i { display:inline-block;width:10px;height:14px;background:#18a058;margin-right:4px;border-radius:1px;position:relative;}
.lg-kline-down i::before{content:'';position:absolute;bottom:2px;left:2px;width:6px;height:2px;background:#18a058;}
.lg-kline-ma5 i, .lg-kline-ma20 i { display:inline-block;width:16px;height:3px;margin-right:4px;border-radius:1px;vertical-align:middle;}
.lg-kline-ma5 i { background:#f59e0b; }
.lg-kline-ma20 i { background:#3b82f6; }
.lg-kline-vol i { display:inline-block;width:10px;height:10px;background:#8a9099;margin-right:4px;border-radius:1px;}

/* ===== 参数设置弹窗 ===== */
.icon-btn {
  padding: 6px 12px; border: 1px solid var(--border);
  background: var(--card); color: var(--text-2);
  border-radius: var(--radius-sm); font-size: 13px; cursor: pointer;
  transition: all .15s;
}
.icon-btn:hover { border-color: var(--primary); color: var(--primary); }

.settings-modal {
  position: fixed; inset: 0; z-index: 1100;
  background: rgba(0,0,0,0.45);
  display: flex; align-items: center; justify-content: center;
}
.settings-modal.hidden { display: none; }
.settings-box {
  width: 460px; max-width: 94vw; max-height: 90vh; overflow-y: auto;
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); animation: pop .25s ease;
}
.settings-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 20px; border-bottom: 1px solid var(--border);
  font-size: 16px; font-weight: 700;
}
.settings-close {
  width: 28px; height: 28px; border-radius: 50%; border: none;
  background: var(--border-light); color: var(--text-3); font-size: 16px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.settings-close:hover { background: var(--danger-light); color: var(--danger); }
.settings-body { padding: 8px 20px 4px; }
.set-row {
  display: grid; grid-template-columns: 130px 90px 1fr;
  align-items: center; gap: 10px; padding: 11px 0;
  border-bottom: 1px dashed var(--border-light);
}
.set-row label { font-size: 13px; color: var(--text-2); }
.set-row input[type="number"] {
  width: 90px; padding: 7px 8px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); font-size: 14px; text-align: right;
}
.set-row input[type="checkbox"] { width: 18px; height: 18px; justify-self: start; }
.set-hint { font-size: 11.5px; color: var(--text-3); line-height: 1.4; }
.set-hint b { color: var(--text); }
.set-divider { height: 1px; background: var(--border); margin: 12px 0; }
/* 解锁模式：模式2 勾选框与参数盒 */
.set-row-check { grid-template-columns: 1fr; gap: 4px; }
.cb-inline { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--text); cursor: pointer; }
.cb-inline input[type="checkbox"] { width: 18px; height: 18px; }
.retrace-box { transition: opacity .2s; }
.retrace-box.disabled { opacity: .45; pointer-events: none; }

/* ===== 微信推送设置（PushPlus）2026-08-27 ===== */
.push-row {
  display: grid; grid-template-columns: 130px 1fr auto;
  align-items: center; gap: 10px; padding: 11px 0;
  border-bottom: 1px dashed var(--border-light);
}
.push-row label { font-size: 13px; color: var(--text-2); }
.push-row input[type="text"] {
  width: 100%; padding: 7px 8px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); font-size: 13px;
}
.push-row .btn-ghost { white-space: nowrap; padding: 7px 10px; }
.push-hint { grid-template-columns: 1fr; padding: 6px 0; }
.push-msg { display: block; font-size: 12px; padding: 4px 0 8px; color: var(--text-3); min-height: 14px; }
.push-msg.ok { color: var(--ok, #3b6d11); }
.push-msg.err { color: var(--danger, #a32d2d); }


/* ===== 核心参数卡片（P1~P4）===== */
.set-section-title {
  font-size: 13px; font-weight: 700; color: var(--text);
  padding: 6px 0 8px; letter-spacing: 0.3px;
}
.set-param-card {
  background: var(--bg, #f8f9fa);
  border: 1px solid var(--border-light, #e8eaed);
  border-radius: var(--radius);
  padding: 12px 14px; margin-bottom: 10px;
  transition: border-color .2s, box-shadow .2s;
}
.set-param-card:hover {
  border-color: var(--primary-light, #93c5fd);
  box-shadow: 0 1px 6px rgba(59,130,246,0.08);
}
.spc-head {
  display: flex; align-items: center; gap: 8px; margin-bottom: 8px;
}
.spc-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 6px;
  font-size: 11.5px; font-weight: 800; color: #fff;
  flex-shrink: 0; line-height: 1;
}
.spc-p1 { background: linear-gradient(135deg, #ef4444, #dc2626); }
.spc-p2 { background: linear-gradient(135deg, #f97316, #ea580c); }
.spc-p3 { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.spc-p4 { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }
.spc-head label {
  font-size: 13.5px; font-weight: 600; color: var(--text);
  flex: 1; min-width: 0;
}
.spc-unit {
  font-size: 11.5px; color: var(--text-3); background: var(--border-light);
  padding: 1px 7px; border-radius: 10px; flex-shrink: 0;
}
.spc-body {
  display: flex; align-items: flex-start; gap: 12px;
}
.spc-body input[type="number"] {
  width: 80px; padding: 8px 10px; border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); font-size: 16px; font-weight: 700;
  text-align: center; flex-shrink: 0;
  transition: border-color .2s, box-shadow .2s;
  outline: none;
}
.spc-body input[type="number"]:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.15);
}
.spc-desc {
  font-size: 12px; color: var(--text-3); line-height: 1.55; flex: 1;
}
.spc-desc b { color: var(--text); font-weight: 700; }
.spc-desc small { color: var(--text-3, #9aa0a6); opacity: .8; }

.settings-foot {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 20px; border-top: 1px solid var(--border);
}
.settings-msg { flex: 1; font-size: 12.5px; color: var(--success); }
.btn-ghost, .btn-primary {
  padding: 9px 18px; border-radius: var(--radius-sm); font-size: 14px;
  font-weight: 600; cursor: pointer; transition: all .15s; border: 1px solid transparent;
}
.btn-ghost { background: var(--card); border-color: var(--border); color: var(--text-2); }
.btn-ghost:hover { border-color: var(--text-3); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); }
.btn-ghost:disabled, .btn-primary:disabled { opacity: .45; cursor: not-allowed; transform: none; }

/* ===== 编辑股票弹窗（个股独立参数） ===== */
.se-code { color: var(--text-3); font-weight: normal; font-size: 12px; margin-left: 6px; }
.se-mode-hint { font-size: 12px; color: var(--text-2); margin: 2px 0 10px; }
.se-mode-hint.off { color: var(--danger); font-weight: 600; }
.se-mode-hint.on { color: var(--success); font-weight: 600; }

/* ===== 资金情况：按钮 + 状态卡片 ===== */
.capital-status {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  padding: 6px 0;
}
.cs-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: var(--radius-sm);
  cursor: pointer;
  white-space: nowrap;
  transition: all .2s;
  flex-shrink: 0;
}
.cs-btn:hover { background: #e0f2fe; border-color: #7dd3fc; }
.cs-btn:active { transform: scale(0.97); }
.cs-btn:disabled { opacity: .45; cursor: not-allowed; background: #f1f5f9; border-color: #e2e8f0; color: #94a3b8; }
.cs-btn .cs-spin { 
  display: inline-block; width: 12px; height: 12px; 
  border: 2px solid #93c5fd; border-top-color: var(--primary);
  border-radius: 50%; animation: csSpin .6s linear infinite;
  vertical-align: -2px;
}
@keyframes csSpin { to { transform: rotate(360deg); } }

.cs-card {
  flex: 1;
  min-width: 0;
  padding: 8px 12px;
  border-radius: 6px;
  border-left: 4px solid #ccc;
  background: #f9fafb;
  transition: all .25s;
  animation: csFadeIn .3s ease;
}
@keyframes csFadeIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
.cs-title { font-size: 13px; font-weight: 700; margin-bottom: 2px; }
.cs-cond { font-size: 11px; color: var(--text-3); margin-bottom: 2px; font-family: monospace; }
.cs-desc { font-size: 11.5px; color: var(--text-2); line-height: 1.4; }
.cs-warn { font-size: 11px; margin-top: 3px; opacity: .85; }
.cs-warn::before { content: '⚠ '; }

/* 四种状态配色 */
/* ① 启动介入 — 绿色（温和放量） */
.capital-status[data-cs="start"] .cs-card {
  border-left-color: #10b981; background: linear-gradient(135deg, #ecfdf5 0%, #f0fdf4 100%);
}
.capital-status[data-cs="start"] .cs-title { color: #059669; }

/* ② 资金加速 — 绿色偏深（主力进场） */
.capital-status[data-cs="accel"] .cs-card {
  border-left-color: #059669; background: linear-gradient(135deg, #d1fae5 0%, #ecfdf5 100%);
}
.capital-status[data-cs="accel"] .cs-title { color: #047857; }

/* ③ 极端放量 — 橙色（高位警惕） */
.capital-status[data-cs="extreme"] .cs-card {
  border-left-color: #f59e0b; background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
}
.capital-status[data-cs="extreme"] .cs-title { color: #d97706; }
.capital-status[data-cs="extreme"] .cs-warn { color: #dc2626; }

/* ④ 资金撤离 — 红色（减仓避险） */
.capital-status[data-cs="exit"] .cs-card {
  border-left-color: #ef4444; background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
}
.capital-status[data-cs="exit"] .cs-title { color: #dc2626; }
.capital-status[data-cs="exit"] .cs-warn { color: #dc2626; }

/* 无数据/未匹配 */
.capital-status[data-cs="none"] .cs-card {
  border-left-color: #d1d5db; background: #f9fafb;
}
.capital-status[data-cs="none"] .cs-title { color: var(--text-3); }

@media (max-width: 600px) {
  .capital-status { flex-direction: column; gap: 4px; align-items: stretch; }
  .cs-card { padding: 6px 10px; }
}

/* ===== 触发规则说明弹窗 ===== */
.rules-modal {
  position: fixed; inset: 0; z-index 1100;
  background: rgba(0,0,0,0.45);
  display: flex; align-items: center; justify-content: center;
}
.rules-modal.hidden { display: none; }
.rules-box {
  width: 680px; max-width: 94vw; max-height: 88vh; overflow-y: auto;
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); animation: pop .25s ease;
}
.rules-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 20px; border-bottom: 1px solid var(--border);
  font-size: 16px; font-weight: 700;
}
.rules-close {
  width: 28px; height: 28px; border-radius: 50%; border: none;
  background: var(--border-light); color: var(--text-3); font-size: 16px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.rules-close:hover { background: var(--danger-light); color: var(--danger); }
.rules-body { padding: 16px 20px 20px; }
.rules-intro {
  margin-bottom: 14px; padding: 10px 14px;
  background: #f0f7ff; border-left: 3px solid var(--primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 13px; color: var(--text-2); line-height: 1.55;
}
.rules-intro p { margin: 0; }
.rules-section { margin-top: 18px; }
.rules-section h4 { font-size: 14px; font-weight: 700; margin: 0 0 8px; color: var(--text); }
.rules-section p { font-size: 12.5px; color: var(--text-2); line-height: 1.5; margin: 4px 0 0; }

/* 规则表格 */
.rules-table {
  width: 100%; border-collapse: collapse; font-size: 13px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  overflow: hidden;
}
.rules-table th {
  background: #f7f9fc; padding: 10px 12px; text-align: left;
  font-weight: 600; font-size: 12.5px; color: var(--text-2);
  border-bottom: 2px solid var(--border);
}
.rules-table td {
  padding: 10px 12px; border-bottom: 1px solid var(--border-light);
  vertical-align: top; line-height: 1.5; color: var(--text);
}
.rules-table tbody tr:last-child td { border-bottom: none; }
.rules-table tbody tr:hover { background: #fafbfc; }
.rule-pri {
  font-weight: 800; font-size: 15px; text-align: center;
  width: 50px; color: var(--text-3);
}
.rule-result { font-weight: 700; white-space: nowrap; }
.rule-result.noop { color: var(--text-3); }
.rule-result.sell { color: #d03050; }
.rule-result.buy { color: #18a058; }
.rule-noop td:first-child { background: #fafafa; }
.rule-sell td:first-child { background: #fef2f2; }
.rule-buy td:first-child { background: #ecfdf5; }

/* 状态机小表格 */
.rules-table.sm th { padding: 8px 10px; font-size: 12px; }
.rules-table.sm td { padding: 8px 10px; font-size: 12.5px; }
.rules-table.sm td small { color: var(--text-3); }

/* 响应式：窄屏缩小弹框 */
@media (max-width: 640px) {
  .rules-box { width: 96vw; max-height: 92vh; }
  .rules-table { font-size: 12px; }
  .rules-table th, .rules-table td { padding: 7px 8px; }
  .rule-pri { width: 36px; font-size: 13px; }
}

/* ===== 账号登录 / 注册 浮层 ===== */
.auth-mask {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(15, 23, 42, 0.5);
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
.auth-mask.hidden { display: none; }
.auth-card {
  width: 340px; max-width: 92vw;
  background: var(--card); border-radius: var(--radius);
  padding: 30px 28px 24px; text-align: center;
  box-shadow: var(--shadow-lg); animation: pop .25s ease;
}
.auth-brand { font-size: 19px; font-weight: 800; color: var(--text); }
.auth-sub { font-size: 12px; color: var(--text-3); margin-top: 3px; margin-bottom: 18px; }
.auth-tabs {
  display: flex; background: var(--border-light);
  border-radius: var(--radius-sm); padding: 4px; margin-bottom: 16px;
}
.auth-tab {
  flex: 1; padding: 8px 0; border: none; background: transparent;
  border-radius: 6px; cursor: pointer; font-size: 14px; font-weight: 600;
  color: var(--text-3); transition: all .15s;
}
.auth-tab.active { background: var(--card); color: var(--primary); box-shadow: var(--shadow-sm); }
.auth-input {
  width: 100%; padding: 11px 13px; margin-bottom: 12px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 14px; background: #fafbfc; transition: all .15s;
}
.auth-input:focus {
  outline: none; border-color: var(--primary); background: #fff;
  box-shadow: 0 0 0 3px rgba(16,185,129,0.12);
}
.auth-submit {
  width: 100%; padding: 12px; margin-top: 4px;
  border: none; background: var(--primary); color: #fff;
  border-radius: var(--radius-sm); font-size: 15px; font-weight: 600;
  cursor: pointer; transition: all .15s;
}
.auth-submit:hover { background: var(--primary-dark); transform: translateY(-1px); }
.auth-msg {
  min-height: 18px; margin-top: 10px; font-size: 12.5px;
  color: var(--danger); font-weight: 500;
}
.auth-hint {
  margin-top: 12px; font-size: 11.5px; color: var(--text-3);
  line-height: 1.6; background: var(--border-light);
  padding: 10px 12px; border-radius: var(--radius-sm);
}
/* 记住密码 */
.auth-remember {
  display: flex; align-items: center; gap: 7px;
  margin-top: -2px; margin-bottom: 4px;
  cursor: pointer; user-select: none;
  justify-content: flex-start; font-size: 13px; color: var(--text-2);
}
.auth-remember input[type="checkbox"] {
  width: 16px; height: 16px; accent-color: var(--primary); cursor: pointer;
}

/* ===== 全局固定风险提示栏（登录页与主页共用，常驻底部） ===== */
.risk-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 3000; /* 高于登录遮罩(2000)与所有弹窗，确保两页均常驻可见 */
  display: flex; align-items: center; justify-content: center; gap: 4px;
  padding: 7px 16px;
  background: linear-gradient(180deg, #fffbeb 0%, #fef3c7 100%);
  border-top: 1px solid #fde68a;
  color: #92400e;
  font-size: 12px; line-height: 1.4; text-align: center;
  letter-spacing: 0.2px;
  box-shadow: 0 -2px 10px rgba(146, 64, 14, 0.08);
  backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px);
  pointer-events: none; /* 不拦截点击，避免挡住底部交互 */
}
.risk-bar .rb-ico { font-weight: 700; flex-shrink: 0; }
@media (max-width: 640px) {
  .risk-bar { font-size: 11px; padding: 6px 12px; }
}
