/* 股市看板页 —— 双主题随站内 data-theme 切换（与 /token/、/deals/、/money/ 同套路）。
   行情色：红涨绿跌（A 股口径，全页统一）。 */

body.page-stocks {
  --st-card: rgba(255, 255, 255, 0.72);
  --st-ink: #0a1826;
  --st-muted: rgba(10, 24, 38, 0.62);
  --st-line: rgba(43, 123, 187, 0.16);
  --st-chip: rgba(108, 180, 238, 0.12);
  --st-up: #d92d20;
  --st-down: #12805c;
  --st-grid: rgba(10, 24, 38, 0.10);
  --st-shadow: 0 18px 40px rgba(31, 78, 121, 0.10);
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  padding: 96px 0 96px;
  background:
    radial-gradient(1100px 520px at 85% -80px, rgba(45, 212, 191, 0.16), transparent 60%),
    radial-gradient(900px 480px at -10% 0, rgba(108, 180, 238, 0.20), transparent 55%),
    linear-gradient(180deg, #eef6fb 0%, #e9f3f8 55%, #eef6fb 100%);
  color: var(--st-ink);
  font-family: var(--vg-font, system-ui, -apple-system, "Microsoft YaHei", sans-serif);
  -webkit-font-smoothing: antialiased;
}

html[data-theme="dark"] body.page-stocks {
  --st-card: rgba(20, 24, 48, 0.88);
  --st-ink: #e8ebf7;
  --st-muted: rgba(232, 235, 247, 0.62);
  --st-line: rgba(139, 146, 255, 0.22);
  --st-chip: rgba(108, 92, 231, 0.18);
  --st-up: #ff6b6b;
  --st-down: #3ddc97;
  --st-grid: rgba(232, 235, 247, 0.10);
  --st-shadow: 0 18px 44px rgba(0, 0, 0, 0.45);
  background:
    radial-gradient(1100px 520px at 85% -80px, rgba(34, 211, 238, 0.12), transparent 60%),
    radial-gradient(900px 480px at -10% 0, rgba(108, 92, 231, 0.22), transparent 55%),
    linear-gradient(180deg, #0b0e1a 0%, #0d1122 55%, #0b0e1a 100%);
}

body.page-stocks .container { width: min(100% - 32px, 1020px); margin: 0 auto; }

/* ---------- Hero ---------- */
.st-hero { text-align: center; padding: 26px 0 16px; }
.st-badge {
  display: inline-block; margin: 0 0 16px; padding: 5px 14px;
  border: 1px solid var(--st-line); border-radius: 999px;
  font-size: 13px; color: var(--st-muted); background: var(--st-chip);
}
.st-hero h1 { margin: 0 0 12px; font-size: clamp(28px, 5vw, 40px); }
.st-summary {
  margin: 0 auto; max-width: 760px;
  font-size: 15.5px; line-height: 1.75; font-weight: 600;
  background: var(--st-card); border: 1px solid var(--st-line);
  border-radius: 14px; padding: 12px 18px; box-shadow: var(--st-shadow);
}
.st-meta { margin: 12px 0 0; font-size: 13px; color: var(--st-muted); }

/* ---------- Chart ---------- */
.st-chart-card {
  background: var(--st-card); border: 1px solid var(--st-line);
  border-radius: 18px; padding: 16px 16px 10px; box-shadow: var(--st-shadow);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  margin: 18px 0 8px;
}
.st-chart-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.st-chart-title { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.st-chart-title strong { font-size: 19px; }
.st-chart-price { font-size: 19px; font-weight: 700; font-variant-numeric: tabular-nums; }
.st-chart-chg { font-size: 14px; font-variant-numeric: tabular-nums; }
.st-chart-ctrls { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.st-seg { display: inline-flex; border: 1px solid var(--st-line); border-radius: 999px; overflow: hidden; }
.st-seg button {
  appearance: none; border: 0; background: transparent; color: var(--st-muted);
  padding: 5px 12px; font-size: 13px; cursor: pointer;
}
.st-seg button.is-on { background: var(--st-chip); color: var(--st-ink); font-weight: 700; }
.st-readout { margin: 8px 0 4px; font-size: 12.5px; color: var(--st-muted); min-height: 18px; font-variant-numeric: tabular-nums; }
.st-ro-item { white-space: nowrap; }
/* P3-06 移动端 OHLC 读数分两行：日期+开高低收 / 涨跌+量。
   返工：第一组 12.5px 在 390 下仍超宽（约 402px > 326px 内容宽），字号收至 11.5px
   并改半角分隔，第一组即可单行放下；再配 .st-ro-item nowrap，万一超宽也只在两项间断行。 */
@media (max-width: 640px) {
  .st-readout { font-size: 11.5px; }
  .st-readout .st-ro-b { display: block; }
}
.st-canvas-wrap { position: relative; width: 100%; height: 340px; }
@media (max-width: 900px) { .st-canvas-wrap { height: 260px; } }
#st-canvas { width: 100%; height: 100%; display: block; touch-action: pan-y; }
.st-legend { margin: 6px 0 4px; font-size: 12px; color: var(--st-muted); }
.st-legend .lg { display: inline-block; width: 14px; height: 3px; border-radius: 2px; vertical-align: middle; margin: 0 8px 0 2px; }
.lg5 { background: #f0b90b; } .lg10 { background: #c678dd; } .lg20 { background: #4f9cf9; } .lg60 { background: #98a2b3; }
.up { color: var(--st-up); } .down { color: var(--st-down); }

/* ---------- Sections & cards ---------- */
.st-sec { margin-top: 26px; }
.st-sec h2 { font-size: 21px; margin: 0 0 6px; }
.st-sec h3 { font-size: 14px; color: var(--st-muted); margin: 16px 0 8px; font-weight: 600; }
.st-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.st-grid-hot { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .st-grid, .st-grid-hot { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .st-grid, .st-grid-hot { grid-template-columns: repeat(2, 1fr); gap: 9px; } }
.st-card {
  appearance: none; text-align: left; width: 100%;
  background: var(--st-card); border: 1px solid var(--st-line);
  border-radius: 16px; padding: 13px 15px 11px; cursor: pointer;
  box-shadow: var(--st-shadow); color: var(--st-ink);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  display: flex; flex-direction: column; gap: 3px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.st-card:hover { transform: translateY(-1px); }
.st-card.is-sel { border-color: var(--st-up); }
.st-card-name { font-size: 14.5px; font-weight: 600; display: flex; justify-content: space-between; gap: 8px; }
.st-card-sym { font-size: 12px; color: var(--st-muted); font-weight: 400; }
.st-card-price { font-size: 21px; font-weight: 700; font-variant-numeric: tabular-nums; }
.st-grid-hot .st-card-price { font-size: 24px; }
.st-card-chg { font-size: 13.5px; font-variant-numeric: tabular-nums; }
.st-card-date { font-size: 12px; color: var(--st-muted); }

.st-others-toggle {
  appearance: none; width: 100%; text-align: left;
  background: var(--st-card); border: 1px solid var(--st-line); border-radius: 14px;
  padding: 12px 16px; font-size: 15px; font-weight: 600; color: var(--st-ink);
  cursor: pointer; display: flex; justify-content: space-between; align-items: center;
  box-shadow: var(--st-shadow); margin-bottom: 12px;
}

.st-empty {
  text-align: center; color: var(--st-muted); padding: 42px 16px;
  border: 1px dashed var(--st-line); border-radius: 18px; line-height: 1.7; margin-top: 22px;
}
.st-note { margin-top: 30px; text-align: center; }
.st-note p { color: var(--st-muted); font-size: 12.5px; line-height: 1.7; margin: 0 auto; max-width: 700px; }

/* Mobile bottom tabbar clearance: the floating .wb-tabbar is ~72px tall and sits
   10px + safe-area above the viewport bottom; 96px page padding left the last
   cards behind it on notched phones. */
@media (max-width: 980px) {
  body.page-stocks { padding-bottom: calc(120px + env(safe-area-inset-bottom, 0px)); }
}

/* 2026-11-11 PC 体检优化（站主整包点选）： 栏宽 1020→1080 与其他看板页统一。 */
body.page-stocks .container { width: min(100% - 32px, 1080px); }
