/* 异动志 · 量价异动与预期差监控 · 样式
   亮色为默认，[data-theme="eye"] 为护眼（暗色）主题。
   涨=红、跌=绿（A 股习惯）。 */

:root {
  --bg: #f4f6f9;
  --panel: #ffffff;
  --panel-2: #fbfcfe;
  --text: #1f2430;
  --muted: #7c8698;
  --line: #e9edf4;
  --brand: #2563eb;
  --brand-soft: #eaf1ff;
  --up: #e5484d;
  --down: #12a05c;
  --warn: #f59e0b;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 8px 24px rgba(16, 24, 40, .04);
  --radius: 12px;
  --side: 196px;
}

html[data-theme="eye"] {
  --bg: #f1e9d7;
  --panel: #f8f1e2;
  --panel-2: #ece1c9;
  --text: #463c2f;
  --muted: #8a7b63;
  --line: #e1d5bc;
  --brand: #a06a36;
  --brand-soft: #ecdfc5;
  --up: #b8452f;
  --down: #3f7a4e;
  --warn: #c4862a;
  --shadow: 0 1px 3px rgba(120,95,55,.12);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.6 -apple-system, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

.layout { display: flex; min-height: 100vh; }

/* ---------------- 侧边栏 ---------------- */
.side {
  width: var(--side);
  flex: 0 0 var(--side);
  padding: 12px 10px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.brand-card,
.user-card,
.nav-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.brand-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 10px;
}

.logo-mark {
  width: 26px; height: 26px; flex: none;
  display: block; border-radius: 8px;
}

.brand-text { min-width: 0; }
.brand-text strong { display: block; font-size: 13px; letter-spacing: .2px; white-space: nowrap; }
.brand-text span { display: block; font-size: 11px; color: var(--muted); }

.theme-toggle {
  margin-left: auto;
  display: flex; align-items: center; gap: 4px; flex: 0 0 auto;
  font-size: 10.5px; color: var(--muted); white-space: nowrap;
  cursor: pointer; user-select: none;
}

.switch {
  width: 28px; height: 16px; border-radius: 999px;
  background: var(--line); position: relative; transition: .18s;
}
.switch::after {
  content: ""; position: absolute; top: 2px; left: 2px;
  width: 12px; height: 12px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: .18s;
}
html[data-theme="eye"] .switch { background: var(--brand); }
html[data-theme="eye"] .switch::after { left: 14px; }

/* 护眼模式切换图标：浅色显示眼睛，护眼模式显示太阳 */
.theme-toggle { cursor: pointer; background: none; border: 0; padding: 0; color: var(--muted); }
.theme-toggle:hover { color: var(--text); }
.theme-toggle svg { width: 17px; height: 17px; display: block; }
.theme-toggle .ico-sun { display: none; }
html[data-theme="eye"] .theme-toggle .ico-eye { display: none; }
html[data-theme="eye"] .theme-toggle .ico-sun { display: inline-block; }

.user-card { padding: 10px; display: flex; gap: 8px; align-items: center; }
.avatar {
  width: 26px; height: 26px; border-radius: 8px;
  background: var(--brand-soft); color: var(--brand);
  display: grid; place-items: center; font-size: 12px; font-weight: 600;
}
.user-meta strong { display: block; font-size: 12.5px; }
.user-meta span { display: block; font-size: 11px; color: var(--muted); }

.nav-card { padding: 8px 6px; flex: 1; }
.nav-group { margin-bottom: 2px; }

.nav-item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 8px; border-radius: 9px;
  color: var(--text); font-size: 13px;
}
.nav-item:hover { background: var(--panel-2); text-decoration: none; }
.nav-item.active { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.nav-ico {
  width: 18px; height: 18px; border-radius: 6px;
  display: grid; place-items: center; font-size: 11px;
  background: var(--panel-2); color: var(--muted); flex: 0 0 18px;
}
.nav-item.active .nav-ico { background: #fff; color: var(--brand); }
.nav-badge {
  margin-left: auto; min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 999px; background: var(--up); color: #fff;
  font-size: 10px; display: grid; place-items: center;
}

.subnav { margin: 2px 0 6px 26px; display: flex; flex-direction: column; gap: 1px; }
.subnav a {
  color: var(--muted); font-size: 12.5px; padding: 3px 6px;
  border-radius: 6px; position: relative;
}
.subnav a::before {
  content: ""; width: 4px; height: 4px; border-radius: 50%;
  background: currentColor; position: absolute; left: -4px; top: 10px; opacity: .5;
}
.subnav a:hover, .subnav a.active { color: var(--brand); background: var(--brand-soft); text-decoration: none; }

.side-foot { display: flex; flex-direction: column; gap: 8px; }
.side-foot .btn { width: 100%; }

/* ---------------- 主区域 ---------------- */
.main { flex: 1; min-width: 0; padding: 14px 18px 40px; }

.topbar { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
/* 自动刷新开关 */
.ar { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ar-btn {
  height: 28px; padding: 0 10px; border-radius: 8px; cursor: pointer;
  border: 1px solid var(--line); background: var(--panel); color: var(--muted);
  font-size: 12px; white-space: nowrap; transition: .15s;
}
.ar-btn:hover { color: var(--text); border-color: var(--brand); }
.ar-btn.on { color: var(--brand); border-color: var(--brand); background: color-mix(in srgb, var(--brand) 8%, var(--panel)); }
.ar-tip { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
/* 个人中心的自动刷新档位 */
.ar-set { display: flex; flex-wrap: wrap; gap: 8px; }
.ar-set button {
  height: 32px; padding: 0 14px; border-radius: 8px; cursor: pointer;
  border: 1px solid var(--line); background: var(--panel); color: var(--muted);
  font-size: 12.5px; white-space: nowrap; transition: .15s;
}
.ar-set button:hover { color: var(--text); border-color: var(--brand); }
.ar-set button.on {
  color: var(--brand); border-color: var(--brand);
  background: color-mix(in srgb, var(--brand) 8%, var(--panel));
}
/* 每日金句语料库（个人中心 · 管理员） */
.quote-list { display: flex; flex-direction: column; gap: 10px; }
.quote-item { border: 1px solid var(--line); border-radius: 10px; padding: 10px; background: var(--panel-2); }
.quote-text {
  width: 100%; resize: vertical; border: 1px solid var(--line); border-radius: 8px;
  background: var(--panel); color: var(--text); font-size: 13px; line-height: 1.6; padding: 8px 10px; outline: none;
}
.quote-text:focus { border-color: var(--brand); }
.quote-ops { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 8px; }
.quote-on { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--muted); cursor: pointer; }
.quote-order { border: 1px solid var(--line); border-radius: 7px; background: var(--panel); color: var(--text); padding: 4px 6px; font-size: 12.5px; }
.quote-msg { display: block; margin-top: 4px; }
.quote-new { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; }
.quote-new textarea {
  flex: 1 1 320px; resize: vertical; border: 1px solid var(--line); border-radius: 8px;
  background: var(--panel); color: var(--text); font-size: 13px; line-height: 1.6; padding: 8px 10px; outline: none;
}
.quote-new textarea:focus { border-color: var(--brand); }
/* 公告解码规则库（管理员） */
.rule-preview { border: 1px dashed var(--line); border-radius: 9px; padding: 10px; background: var(--panel-2); }
.rule-test-result { display: block; margin-top: 8px; line-height: 1.7; }
.rule-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rule-list { display: flex; flex-direction: column; gap: 10px; }
.rule-item { border: 1px solid var(--line); border-radius: 10px; padding: 10px; background: var(--panel-2); }
.rule-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.rule-head select, .rule-new select, .rule-item input:not([type=checkbox]), .rule-new input:not([type=checkbox]),
.rule-note, .rule-preview input {
  border: 1px solid var(--line); border-radius: 7px; background: var(--panel); color: var(--text);
  font-size: 12.5px; padding: 5px 7px; outline: none;
}
.rule-head select:focus, .rule-item input:focus, .rule-note:focus { border-color: var(--brand); }
.rule-on { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; color: var(--muted); }
.rule-pattern { width: 100%; margin-top: 8px; font-family: ui-monospace, Menlo, Consolas, monospace; }
.rule-note { width: 100%; margin-top: 6px; resize: vertical; line-height: 1.6; }
.rule-msg { display: block; margin-top: 4px; }
.rule-new { border-top: 1px solid var(--line); padding-top: 12px; }
.rule-new #rn-pattern { font-family: ui-monospace, Menlo, Consolas, monospace; }
.rule-new textarea {
  border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--text);
  font-size: 12.5px; padding: 7px 9px; outline: none; resize: vertical;
}
.rule-new textarea:focus { border-color: var(--brand); }
.search-wrap { position: relative; margin-left: auto; width: 280px; }
.search-wrap input {
  width: 100%; height: 34px; border-radius: 9px;
  border: 1px solid var(--line); background: var(--panel);
  padding: 0 32px 0 12px; color: var(--text); font-size: 13px; outline: none;
}
.search-wrap input:focus { border-color: var(--brand); }
.search-btn {
  position: absolute; right: 4px; top: 4px; width: 26px; height: 26px;
  border: 0; border-radius: 7px; background: var(--brand); color: #fff; cursor: pointer;
}
.search-pop {
  position: absolute; top: 40px; left: 0; right: 0; z-index: 40;
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 12px 30px rgba(16,24,40,.12); padding: 6px; display: none;
}
.search-pop.show { display: block; }
.search-row { display: block; padding: 6px 8px; border-radius: 7px; color: var(--text); }
.search-row:hover { background: var(--brand-soft); text-decoration: none; }
.search-row .t { font-size: 13px; }
.search-row .s { font-size: 11px; color: var(--muted); margin-left: 6px; }

.card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px;
  margin-bottom: 14px;
}

.page-head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 4px; }
.page-head h1 { font-size: 21px; margin: 0 0 4px; letter-spacing: .2px; }
.page-head p { margin: 0; color: var(--muted); font-size: 12.5px; }
/* 左侧文案列允许收缩换行，右侧工具条永不被挤窄——
   否则窄屏下按钮会被压到 40px 内，中文逐字竖排。 */
.page-head > :first-child { min-width: 0; flex: 0 1 auto; }
.head-tools { margin-left: auto; display: flex; gap: 8px; align-items: center; flex: 0 0 auto; }
.head-tools > * { flex: 0 0 auto; }
.head-tools select,
.head-tools input { flex: 0 0 auto; }

.meta-line { color: var(--muted); font-size: 12.5px; display: flex; flex-wrap: wrap; gap: 10px; }
.meta-line b { color: var(--text); font-weight: 600; }

/* 按钮 / 标签 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 32px; padding: 0 12px; border-radius: 9px; cursor: pointer;
  border: 1px solid var(--line); background: var(--panel); color: var(--text); font-size: 13px;
  white-space: nowrap; flex: 0 0 auto;
}
.btn:hover { border-color: var(--brand); color: var(--brand); text-decoration: none; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { color: #fff; opacity: .92; }
.btn-ghost { background: transparent; }
.btn-sm { height: 26px; padding: 0 9px; font-size: 12px; border-radius: 7px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 28px; padding: 0 10px; border-radius: 8px;
  background: var(--panel-2); border: 1px solid var(--line);
  color: var(--text); font-size: 12.5px; cursor: pointer;
}
.chip:hover { text-decoration: none; border-color: var(--brand); }
.chip.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.chip .n { font-size: 11px; opacity: .7; }

.tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.tab {
  padding: 6px 12px; border-radius: 9px; font-size: 13px;
  border: 1px solid var(--line); background: var(--panel); color: var(--text); cursor: pointer;
}
.tab.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.tab:hover { text-decoration: none; }

.tag { display: inline-block; padding: 0 6px; border-radius: 5px; font-size: 11px; line-height: 17px; }
.tag-up { background: rgba(229,72,77,.1); color: var(--up); }
.tag-down { background: rgba(18,160,92,.1); color: var(--down); }
.tag-flat { background: var(--panel-2); color: var(--muted); }
.tag-new { background: var(--up); color: #fff; }
.tag-src { background: var(--brand-soft); color: var(--brand); }

/* 表格 */
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th {
  text-align: left; font-weight: 600; color: var(--muted); font-size: 12px;
  padding: 8px 8px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.table td { padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--panel-2); }
.num { font-variant-numeric: tabular-nums; }
.table th.num { text-align: right; }
/* 近10日累计榜：固定列宽让三列数字等宽、间隙一致；数字格右对齐与表头同一竖线 */
.table.bf-rank { table-layout: fixed; }
.table.bf-rank th:nth-child(2), .table.bf-rank th:nth-child(3), .table.bf-rank th:nth-child(4) { width: 18.66%; }
.table.bf-rank td.num { text-align: right; }

/* 列多的表（复盘 8 列、炸板 10 列）在手机上必然超过视口：
   表头是 nowrap，表格最小宽度就有 500px 以上，会连带把整页撑宽、
   逼用户左右拖动整个页面。交给容器横向滚动，只滚表格不动布局。
   桌面端内容不超宽时不会出现滚动条，无副作用。
   注意 .card 里可能需要 min-width:0，否则 flex/grid 祖先仍会被撑开。 */
.tbl-scroll { width: 100%; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tbl-scroll > .table { min-width: max-content; }

/* 快讯 */
.brief { border-bottom: 1px solid var(--line); padding: 14px 2px 12px; }
.brief:last-child { border-bottom: 0; }
.brief-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.brief-head .src { font-size: 12px; color: var(--muted); }
.brief-body {
  white-space: pre-wrap; word-break: break-word; font-size: 13.6px; line-height: 1.75;
  max-height: 168px; overflow: hidden; position: relative;
}
.brief-body.open { max-height: none; }
/* 展开按钮默认隐藏，由 JS 在「正文实际溢出截断高度」时才显示，不再按字符数判断 */
.js-expand { display: none; }
.brief-actions { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
/* A1：卡片不再重复免责声明，只剩按需出现的「展开」；没按钮时不留 8px 空行 */
.brief-actions.no-note { margin-top: 0; }
.brief-actions.no-note .js-expand { margin-top: 8px; }
.brief-note { color: var(--muted); font-size: 11.5px; }

/* ---------- 快讯机器解读 ----------
   方向只用「偏多/偏空关联」，配色沿 A 股习惯（多=红、空=绿）。
   个股做成可点的 chip，点进去是站内 K 线页，不在快讯里直接给结论。 */
.brief-ai {
  margin: 8px 0 2px; padding: 9px 11px;
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--panel-2);
}
.bai-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.bai-dir { font-size: 11.5px; font-weight: 700; padding: 1px 8px; border-radius: 999px; }
.bai-dir.up { background: rgba(229, 72, 77, .12); color: var(--up); }
.bai-dir.down { background: rgba(18, 160, 92, .12); color: var(--down); }
.bai-dir.flat { background: var(--panel); color: var(--muted); border: 1px solid var(--line); }
.bai-k {
  font-size: 11.5px; color: var(--text); background: var(--panel);
  border: 1px solid var(--line); padding: 1px 7px; border-radius: 6px;
}
a.bai-k { text-decoration: none; }
a.bai-k:hover { border-color: var(--up); color: var(--up); }
/* 今日概览：当日方向分布 + 热门概念，点概念即筛选当日快讯 */
.daily-overview {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 10px 16px; margin-top: 12px; padding: 10px 14px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
}
.ov-stats { display: flex; flex-wrap: wrap; align-items: baseline; gap: 5px 18px; }
.ov-stat { display: inline-flex; align-items: baseline; gap: 5px; font-size: 11.5px; color: var(--muted); }
.ov-stat b { font-size: 17px; color: var(--text); font-variant-numeric: tabular-nums; }
.ov-stat.up b { color: var(--up); }
.ov-stat.down b { color: var(--down); }
.ov-concepts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ov-label { font-size: 11.5px; color: var(--muted); margin-right: 2px; }
.ov-c {
  display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px;
  color: var(--text); text-decoration: none; background: var(--panel-2);
  border: 1px solid var(--line); border-radius: 999px; padding: 2px 9px;
}
.ov-c:hover { border-color: var(--up); color: var(--up); }
.ov-c i { font-style: normal; font-size: 10.5px; color: var(--muted); }
.ov-filter { color: var(--up); font-size: 12px; }
.ov-filter a { margin-left: 4px; color: var(--muted); }
@media (max-width: 620px) {
  .daily-overview { padding: 9px 11px; }
  .ov-stats { gap: 4px 12px; }
}
.bai-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.bai-chip {
  display: inline-flex; align-items: baseline; gap: 5px; min-width: 0;
  padding: 2px 8px; border-radius: 7px; font-size: 12px;
  background: var(--panel); border: 1px solid var(--line);
  color: var(--text); text-decoration: none;
}
.bai-chip:hover { border-color: var(--up); }
.bai-chip b { font-weight: 600; }
.bai-num { color: var(--muted); font-size: 11px; white-space: nowrap; }
.bai-foot { margin-top: 7px; color: var(--muted); font-size: 11px; line-height: 1.55; }
.bai-why { margin-left: 6px; opacity: .85; }
/* 「语义补位」标记：这条不是关键词撞上的，是模型读出来的。谁得出的结论要标清楚。 */
.bai-src {
  display: inline-block; margin-right: 4px; padding: 0 5px; border-radius: 3px;
  border: 1px solid var(--line); color: var(--muted); font-size: 10.5px;
}
@media (max-width: 560px) {
  .bai-foot .bai-why { display: block; margin-left: 0; }
}
/* 知识星球图片帖：直接引用星球 CDN，靠 referrerpolicy="no-referrer" 绕过防盗链 */
.tag-img { background: var(--brand-soft); color: var(--brand); }
.brief-media { margin: 4px 0 6px; position: relative; }
.brief-media a { display: inline-block; line-height: 0; }
.brief-img {
  display: block; max-width: 100%; max-height: 420px; width: auto; height: auto;
  border-radius: 10px; border: 1px solid var(--line); background: var(--panel-2);
  cursor: zoom-in;
}
.brief-media:hover .brief-img { border-color: var(--brand); }
.img-fallback { display: none; font-size: 12.5px; color: var(--muted); line-height: 1.7; }
.img-fallback.show, .brief-media.img-fail .img-fallback { display: block; }
/* 图片没下完之前必须占住位置：img 没有固有尺寸时会塌成 0 高，
   在慢网络上整条快讯看起来就只剩时间 + 一句免责声明，像内容丢了。
   占位块只在「还没加载成功」时出现，加载完由 onload 打上 .img-ok 撤掉。 */
.img-loading { display: none; }
.brief-media:not(.img-ok) .img-loading {
  display: flex; align-items: center; min-height: 96px; padding: 0 12px;
  border-radius: 10px; border: 1px dashed var(--line); background: var(--panel-2);
  font-size: 12.5px; color: var(--muted);
}
.brief-media.img-fail .img-loading { display: none; }
.brief-media.img-ok .img-loading { display: none; }
/* 只藏掉加载失败的那张，别让一张坏图拖累整组 */
.img-broken { display: none !important; }
/* 多图网格：缩略图完整显示不裁字，点击进灯箱看原图 */
.brief-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px; }
.brief-gallery .brief-img {
  width: 100%; max-width: 100%; max-height: none; height: 170px;
  object-fit: contain; border-radius: 8px;
}
.img-count { margin-top: 6px; font-size: 11.5px; color: var(--muted); }

/* 图片放大灯箱：点击快讯图片全屏查看，星球 CDN 防盗链靠 no-referrer */
.lightbox {
  position: fixed; inset: 0; z-index: 1000; display: none;
  flex-direction: column; background: rgba(8, 10, 14, .92);
  padding: 24px; box-sizing: border-box;
}
.lightbox.show { display: flex; }
.lb-stage {
  flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center;
  cursor: zoom-out; overflow: auto;
}
.lb-img {
  max-width: 92vw; max-height: 86vh; object-fit: contain;
  border-radius: 8px; box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
  animation: lb-in .16s ease;
}
/* 放大到原始尺寸：取消尺寸限制，并改为块级 + 自动外边距。
   这样舞台 overflow:auto 提供上下左右双向滚动，避免 flex 居中把顶部推出屏幕且无法滚回 */
.lb-stage.zoomed { display: block; }
.lb-img.zoomed { max-width: none; max-height: none; margin: 0 auto; display: block; }
@keyframes lb-in { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: none; } }
.lb-close {
  position: fixed; top: 14px; right: 18px; z-index: 2;
  width: 38px; height: 38px; border-radius: 50%; border: 0;
  background: rgba(255, 255, 255, .12); color: #fff; font-size: 24px; line-height: 1; cursor: pointer;
}
.lb-close:hover { background: rgba(255, 255, 255, .24); }
.lb-bar { position: fixed; bottom: 12px; left: 0; right: 0; text-align: center; pointer-events: none; }
.lb-count { color: rgba(255, 255, 255, .85); font-size: 12px; margin-right: 14px; }
.lb-tip { color: rgba(255, 255, 255, .6); font-size: 12px; }
/* 多图翻页箭头：默认不显示，灯箱里有多张时由 JS 写成 flex */
.lb-arrow {
  position: fixed; top: 50%; transform: translateY(-50%);
  z-index: 1002; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .25); background: rgba(255, 255, 255, .12);
  color: #fff; font-size: 28px; line-height: 1; cursor: pointer;
  display: none; align-items: center; justify-content: center; padding: 0 0 4px;
}
.lb-arrow:hover { background: rgba(255, 255, 255, .24); }
.lb-prev { left: 24px; }
.lb-next { right: 24px; }
@media (prefers-reduced-motion: reduce) { .lb-img { animation: none; } }
.ai-box {
  margin-top: 8px; padding: 9px 11px; border-radius: 9px;
  background: var(--brand-soft); color: var(--text); font-size: 12.5px;
  white-space: pre-wrap; display: none;
}
.ai-box.show { display: block; }

/* 个人中心 · 提醒与通知入口（从左侧导航挪进来） */
.alert-links { display: flex; flex-direction: column; gap: 8px; }
.alert-link {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--panel-2); text-decoration: none; color: var(--text);
}
.alert-link:hover { border-color: var(--brand); }
.alert-link b { font-size: 13.5px; }
.alert-link div > span { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.alert-link .btn { flex: 0 0 auto; }

/* 指标卡 */
.metrics { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.metric {
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px;
  border-left: 3px solid var(--line); background: var(--panel);
}
.metric .k { font-size: 12px; color: var(--muted); }
.metric .v { font-size: 22px; font-weight: 700; letter-spacing: .3px; }
.metric .s { font-size: 11px; color: var(--muted); }
.metric.up { border-left-color: var(--up); }
.metric.up .v { color: var(--up); }
.metric.down { border-left-color: var(--down); }
.metric.down .v { color: var(--down); }

/* 板块目录 */
.catalog { display: flex; flex-wrap: wrap; gap: 8px; }
/* 板块墙动辄 500 项，限高滚动，避免把下面的表格顶到几屏之后 */
.catalog.scroll { max-height: 168px; overflow-y: auto; padding-right: 6px; }
.catalog.scroll::-webkit-scrollbar { width: 6px; }
.catalog.scroll::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }
.cat-item {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px;
  border: 1px solid var(--line); border-radius: 8px; font-size: 12.5px; color: var(--text);
}
.cat-item b { color: var(--brand); font-weight: 600; }

/* 题材 */
.theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.theme-card { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.theme-card .n { font-weight: 600; }
.theme-card .p { color: var(--up); font-weight: 700; font-size: 17px; }

/* 图表 */
.chart-box { border: 1px solid var(--line); border-radius: 10px; padding: 8px; background: var(--panel-2); }
.chart-box svg { width: 100%; height: 220px; display: block; }
/* 大宗商品分时曲线：鼠标悬停显示对应时点的时间 + 价格（竖线跟随，浮层贴近曲线） */
.com-chart { position: relative; }
.com-chart svg { cursor: crosshair; }
.com-cross { stroke: var(--brand); stroke-width: 1; stroke-dasharray: 4 4; opacity: .55; display: none; }
.com-dot { fill: var(--panel); stroke: var(--brand); stroke-width: 2; display: none; }
.com-tip {
  position: absolute; z-index: 3; pointer-events: none; display: none;
  left: 0; top: 0; transform: translate(-50%, -100%);
  background: var(--panel); border: 1px solid var(--line); border-radius: 8px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .10); padding: 6px 9px;
  font-size: 12px; line-height: 1.5; white-space: nowrap; text-align: center;
}
.com-tip b { display: block; color: var(--brand); font-size: 15px; font-variant-numeric: tabular-nums; }
.com-tip span { color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }

/* 当日板块资金全景：多线叠加图 + 流入/流出双榜
   右侧标签用淡色底 + 左侧色条 + 彩色金额，不再整块铺红/绿；
   悬停某个标签时只高亮它对应的曲线、引导线与末端圆点。 */
/* 口径说明：把数据源、累计/增量、概念板块重复计算讲清楚，避免把数字误读成全市场 */
.flow-scope {
  font-size: 11.8px; line-height: 1.75; color: var(--muted);
  background: var(--panel-2); border: 1px solid var(--line);
  border-radius: 9px; padding: 9px 11px;
}
.flow-scope > b:first-child { color: var(--text); font-size: 12px; }
.flow-scope > span { display: block; }
.flow-scope > span + span { margin-top: 3px; }
.flow-scope b { color: var(--text); font-weight: 600; }
.flow-scope .scope-warn { color: var(--warn); border-left: 3px solid var(--warn); padding-left: 8px; margin-top: 7px; }
.flow-scope .scope-warn b { color: var(--warn); }
.flow-chart { padding: 10px 10px 6px; }
.flow-chart svg { height: auto; }
.flow-chart text { font-family: inherit; }
.flow-chart .flow-tag { cursor: crosshair; }
/* 标签底必须不透明：原来 fill-opacity .085 让背后的曲线穿过金额，看起来像字被划线。
   用浅色底 + 左侧 3px 方向色条，既能区分红绿，又不遮不住线。 */
.flow-chart .flow-tag-bg { fill: var(--panel); fill-opacity: 1; transition: fill .15s ease; }
.flow-chart .flow-tag.up .flow-tag-bg { fill: var(--panel); fill: color-mix(in srgb, var(--up) 10%, var(--panel)); }
.flow-chart .flow-tag.down .flow-tag-bg { fill: var(--panel); fill: color-mix(in srgb, var(--down) 10%, var(--panel)); }
.flow-chart .flow-tag.flat .flow-tag-bg { fill: var(--panel-2); }
.flow-chart .flow-lead { opacity: .18; transition: opacity .15s ease; }
.flow-chart .flow-line, .flow-chart .flow-dot { transition: opacity .15s ease; }
/* 其余曲线只压到半透明，保留走势上下文，不要整张图突然变空 */
.flow-chart.has-focus .flow-line { opacity: .3; }
.flow-chart.has-focus .flow-dot { opacity: .35; }
.flow-chart.has-focus .flow-lead { opacity: .07; }
.flow-chart.has-focus .flow-tag:not(.is-focus) .flow-tag-bg { fill: var(--panel-2); }
.flow-chart .flow-line.is-focus { opacity: 1; stroke-width: 3.2px; }
.flow-chart .flow-dot.is-focus { opacity: 1; }
.flow-chart .flow-lead.is-focus { opacity: .8; }
.flow-chart .flow-tag.is-focus.up .flow-tag-bg { fill: color-mix(in srgb, var(--up) 20%, var(--panel)); }
.flow-chart .flow-tag.is-focus.down .flow-tag-bg { fill: color-mix(in srgb, var(--down) 20%, var(--panel)); }
.flow-chart .flow-tag.is-focus.flat .flow-tag-bg { fill: var(--hair-2); }

/* 市场情绪顶部：涨跌分布 + 预测量能（同花顺 fuyao） */
.ps-card { margin-top: 12px; }
.ps-summary { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 10px 0 4px; font-size: 13px; color: var(--muted); }
.ps-summary b { font-size: 15px; font-weight: 700; }
.ps-dist { display: grid; grid-template-columns: repeat(11, minmax(0, 1fr)); gap: 5px; align-items: end; margin-top: 10px; }
.ps-col { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
/* 数字贴在各自柱顶正上方（不再固定在顶部一排），字号略小 */
.ps-bar-wrap { width: 100%; height: 132px; padding-top: 16px; box-sizing: border-box; display: flex; align-items: flex-end; justify-content: center; border-bottom: 1px solid var(--line); }
.ps-bar { position: relative; display: block; width: 74%; min-height: 2px; border-radius: 3px 3px 0 0; background: var(--muted); opacity: .8; }
.ps-val { position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); margin-bottom: 3px; font-size: 10.5px; line-height: 1; font-variant-numeric: tabular-nums; color: var(--text); white-space: nowrap; }
.ps-col.up .ps-bar, .ps-col.strong-up .ps-bar { background: var(--up); opacity: .82; }
.ps-col.strong-up .ps-bar { opacity: 1; }
.ps-col.down .ps-bar, .ps-col.strong-down .ps-bar { background: var(--down); opacity: .82; }
.ps-col.strong-down .ps-bar { opacity: 1; }
.ps-col.flat .ps-bar { background: var(--muted); }
.ps-label { font-size: 11px; color: var(--muted); white-space: nowrap; }
.ps-split { display: flex; height: 9px; margin-top: 12px; border-radius: 999px; overflow: hidden; background: var(--panel-2); }
.ps-split .up { background: var(--up); }
.ps-split .down { background: var(--down); }
.ps-split-labels { display: flex; justify-content: space-between; margin-top: 5px; font-size: 12.5px; }
.ps-note { margin: 10px 0 0; font-size: 11.5px; line-height: 1.6; color: var(--muted); }
.ps-vol-head { display: flex; flex-wrap: wrap; gap: 6px 26px; margin: 10px 0 6px; font-size: 13px; }
.ps-vol-item { display: flex; align-items: center; gap: 7px; }
.ps-vol-item b { font-weight: 600; }
.ps-vol-item em { font-style: normal; font-size: 15px; font-weight: 700; }
.ps-dot { display: inline-block; width: 11px; height: 11px; border-radius: 3px; background: var(--muted); }
.ps-dot.up { background: var(--up); }
.ps-dot.down { background: var(--down); }
.ps-dot.filter { background: var(--panel-2); border: 1px solid var(--line); }
.ps-vol-chart { width: 100%; margin-top: 4px; }
.ps-vol-chart svg { width: 100%; height: auto; display: block; }
.ps-grid { stroke: var(--line); stroke-width: 1; stroke-dasharray: 4 4; }
.ps-axis { fill: var(--muted); font-size: 11px; }
.ps-prev-line { stroke: #4a86e8; stroke-width: 2; opacity: .75; }
.ps-line { fill: none; stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.ps-line.up { stroke: var(--up); }
.ps-line.down { stroke: var(--down); }
.ps-line.flat { stroke: var(--muted); }
.ps-vol-legend { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-top: 6px; font-size: 11.5px; color: var(--muted); }
.ps-swatch { display: inline-block; width: 12px; height: 3px; margin-right: 5px; vertical-align: middle; border-radius: 2px; background: var(--muted); }
.ps-swatch.up { background: var(--up); }
.ps-swatch.down { background: var(--down); }
.ps-swatch.prev { background: #4a86e8; }
@media (max-width: 720px) {
  .ps-dist { grid-template-columns: repeat(6, minmax(0, 1fr)); row-gap: 10px; }
  .ps-bar-wrap { height: 88px; }
  .ps-label { font-size: 10px; }
}

.rank-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.rank-grid .card { margin-bottom: 0; }
.rank-card { padding: 14px 16px 12px; }
.rank-head { display: flex; align-items: center; gap: 9px; }
.rank-head h2 { font-size: 15px; margin: 0; }
.rank-mark { width: 4px; height: 15px; border-radius: 3px; background: var(--up); flex: 0 0 auto; }
.rank-card.down .rank-mark { background: var(--down); }
.rank-total { margin-left: auto; font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.rank-total b { color: var(--up); font-size: 13px; font-variant-numeric: tabular-nums; }
.rank-card.down .rank-total b { color: var(--down); }
.rank-sub { font-size: 11.5px; color: var(--muted); margin: 4px 0 8px 13px; }
.rank-list { list-style: none; margin: 0; padding: 0; }
.rank-list li {
  display: grid; grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center; column-gap: 9px; padding: 5px 8px; border-radius: 8px;
}
.rank-list li:hover { background: var(--panel-2); }
.rank-no {
  display: inline-grid; place-items: center; width: 22px; height: 20px; border-radius: 6px;
  background: var(--panel-2); border: 1px solid var(--line);
  font-size: 10.5px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums;
}
.rank-list li:nth-child(-n+3) .rank-no { color: #fff; background: var(--up); border-color: transparent; }
.rank-card.down .rank-list li:nth-child(-n+3) .rank-no { background: var(--down); }
.rank-name { font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-val { font-size: 13px; font-weight: 700; color: var(--up); }
.rank-card.down .rank-val { color: var(--down); }
.rank-track { grid-column: 2 / -1; height: 3px; border-radius: 2px; background: var(--line); overflow: hidden; margin-top: 4px; }
.rank-track i { display: block; height: 100%; border-radius: 2px; background: var(--up); opacity: .8; }
.rank-card.down .rank-track i { background: var(--down); }
.rank-empty { grid-column: 1 / -1; color: var(--muted); font-size: 12.5px; }
/* 普跌日流入榜只有一两行，右侧却有 10 行，补一张宽度说明卡，
   既解释「为什么这么短」，也把左侧留白变成有用的信息。 */
.rank-note {
  margin: 14px 8px 4px; padding: 12px 13px; border-radius: 9px;
  background: var(--panel-2); border: 1px dashed var(--line);
}
.rank-note b { display: block; font-size: 12.5px; margin-bottom: 3px; }
.rank-note > div { font-size: 11.5px; color: var(--muted); }
.rank-breadth { height: 7px; border-radius: 4px; background: var(--down); opacity: .85; margin: 11px 0 7px; overflow: hidden; }
.rank-breadth i { display: block; height: 100%; background: var(--up); }
.rank-note-legend { display: flex; gap: 14px; font-size: 10.5px; }
.rank-note-legend i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 5px; }
.rank-note-legend i.up { background: var(--up); }
.rank-note-legend i.down { background: var(--down); }
@media (max-width: 900px) { .rank-grid { grid-template-columns: 1fr; } }

/* 板块资金（2026-11-12 合并「板块资金1 / 板块资金2」后的一页四段布局）：
   ① 全景曲线 ② 流入流出双榜 ③ 单板块透视 ④ 近 10 日累计。
   分段用带序号的标题，序号与正文左对齐，阅读顺序一眼可见。 */
.sec { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 11px; }
.sec-standalone { margin: 16px 2px 11px; }
.sec-no {
  flex: 0 0 auto; width: 21px; height: 21px; border-radius: 7px; display: grid; place-items: center;
  background: var(--brand); color: #fff; font-size: 11.5px; font-weight: 700;
  letter-spacing: .2px; margin-top: 1px;
}
.sec-txt { min-width: 0; }
.sec-txt h2 { font-size: 15px; margin: 0; line-height: 1.5; }
.sec-txt p { margin: 3px 0 0; font-size: 11.8px; color: var(--muted); line-height: 1.65; }
.sec-txt p b { font-weight: 600; }
.sec-right { margin-left: auto; flex: 0 0 auto; display: flex; align-items: center; gap: 8px; padding-top: 1px; }
.card > .sec:first-child { margin-bottom: 4px; }
/* 口径变更/数据不足的说明条：比 table 轻，比一句 muted 重，放在表格上方 */
.sec-note {
  font-size: 11.8px; line-height: 1.7; color: var(--muted);
  background: var(--panel-2); border: 1px solid var(--line); border-left: 3px solid var(--warn);
  border-radius: 9px; padding: 8px 11px; margin: 0 0 10px 31px;
}
.sec-note b { color: var(--warn); font-weight: 600; display: block; margin-bottom: 2px; }
.sec-note span { display: block; }
/* 普跌日流入榜只剩一两行：卡片等高拉伸，把说明卡贴到底部，中间留白不会显得突兀 */
.rank-card { display: flex; flex-direction: column; }
.rank-list { flex: 1 1 auto; }

/* 榜单行与底部累计表可点击下钻，给出手型与轻微位移反馈 */
.rank-row { cursor: pointer; transition: background .12s ease; }
.table tbody .rank-row:hover { background: var(--panel-2); }

/* ③ 板块透视：左板块列表 + 右曲线，列表独立滚动，不跟着曲线一起变高 */
.drill { display: grid; grid-template-columns: 196px minmax(0, 1fr); gap: 16px; }
.drill-side { border-right: 1px dashed var(--line); padding-right: 14px; min-width: 0; }
.drill-q {
  width: 100%; height: 28px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--panel-2); color: var(--text); padding: 0 9px; font-size: 12px;
}
.drill-q:focus { outline: none; border-color: var(--brand); }
.drill-count { margin: 6px 0 0; font-size: 10.5px; color: var(--muted); letter-spacing: .2px; }
.drill-list {
  margin-top: 7px; max-height: 250px; overflow-y: auto; gap: 6px; padding-right: 4px;
}
/* 只有真的能滚动时才做底部渐隐：被截断看起来是「还有更多」，而不是硬切一刀 */
.drill-list.is-scroll {
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 16px), transparent);
  mask-image: linear-gradient(to bottom, #000 calc(100% - 16px), transparent);
}
.drill-list::-webkit-scrollbar { width: 6px; }
.drill-list::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }
.drill-list::-webkit-scrollbar-track { background: transparent; }
.drill-list .chip { font-size: 11.5px; padding: 2px 8px; }
.drill-main { min-width: 0; }
.drill-top { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.drill-top > b { font-size: 15px; margin-right: 2px; }
.pill {
  font-size: 11.5px; color: var(--muted); background: var(--panel-2);
  border: 1px solid var(--line); border-radius: 999px; padding: 2px 9px; white-space: nowrap;
}
.pill b { font-variant-numeric: tabular-nums; font-weight: 600; }
.pill b.up { color: var(--up); }
.pill b.down { color: var(--down); }
.drill-axis {
  display: flex; justify-content: space-between; padding: 3px 6px 0;
  font-size: 10.5px; color: var(--muted); font-variant-numeric: tabular-nums;
}
@media (max-width: 860px) {
  .drill { grid-template-columns: 1fr; gap: 12px; }
  .drill-side { border-right: 0; border-bottom: 1px dashed var(--line); padding: 0 0 10px; }
  .drill-list { max-height: 116px; }
}

/* 会员门 */
.gate {
  max-width: 720px; margin: 40px auto; text-align: center;
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  padding: 40px 28px; box-shadow: var(--shadow);
}
.gate .lbl { display: inline-block; background: var(--brand-soft); color: var(--brand); font-size: 12px; padding: 2px 10px; border-radius: 999px; }
.gate h1 { font-size: 26px; margin: 14px 0 8px; }
.gate p { color: var(--muted); margin: 0 auto 18px; max-width: 520px; }
.gate .acts { display: flex; gap: 10px; justify-content: center; }

/* 弹窗 */
.modal-mask {
  position: fixed; inset: 0; background: rgba(16,24,40,.42); display: none;
  align-items: center; justify-content: center; z-index: 60; padding: 24px;
}
.modal-mask.show { display: flex; }
.modal {
  background: var(--panel); border-radius: 14px; max-width: 640px; width: 100%;
  max-height: 80vh; overflow: auto; padding: 20px 22px; box-shadow: 0 24px 60px rgba(16,24,40,.28);
}
.modal h3 { margin: 0 0 12px; font-size: 17px; }
.modal dl { margin: 0; }
.modal dt { font-weight: 600; font-size: 13px; margin-top: 10px; }
.modal dd { margin: 2px 0 0; color: var(--muted); font-size: 12.5px; }
.modal hr { border: 0; border-top: 1px dashed var(--line); margin: 14px 0; }

/* 登录 */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth-card {
  width: 100%; max-width: 380px; background: var(--panel); border: 1px solid var(--line);
  border-radius: 14px; box-shadow: var(--shadow); padding: 26px 24px;
}
.auth-card h1 { font-size: 20px; margin: 0 0 6px; }
.auth-card p.hint { color: var(--muted); font-size: 12.5px; margin: 0 0 16px; }
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 4px; }
.field input {
  width: 100%; height: 36px; border-radius: 9px; border: 1px solid var(--line);
  background: var(--panel-2); padding: 0 10px; font-size: 13.5px; color: var(--text); outline: none;
}
.field input:focus { border-color: var(--brand); background: var(--panel); }
.err { color: var(--up); font-size: 12.5px; margin-bottom: 10px; }
.auth-foot { margin-top: 14px; font-size: 12.5px; color: var(--muted); display: flex; gap: 8px; }
/* 登录「记住密码」 */
.remember-row {
  display: flex; align-items: flex-start; gap: 7px;
  margin: -2px 0 14px; font-size: 12.5px; color: var(--text); line-height: 1.55;
}
.remember-row input[type="checkbox"] {
  margin: 2px 0 0; width: 14px; height: 14px; flex: 0 0 auto; cursor: pointer;
  accent-color: var(--brand);
}
.remember-row label { cursor: pointer; user-select: none; }
.remember-row .muted { font-size: 11.5px; }

/* 聊天 */
.chat { display: flex; flex-direction: column; gap: 10px; max-height: 60vh; overflow: auto; padding: 4px; }
.msg { max-width: 76%; padding: 9px 12px; border-radius: 10px; font-size: 13.5px; white-space: pre-wrap; }
.msg.service { background: var(--panel-2); border: 1px solid var(--line); }
.msg.user { background: var(--brand); color: #fff; align-self: flex-end; }
.msg .ts { display: block; font-size: 11px; opacity: .65; margin-top: 4px; }
.chat-input { display: flex; gap: 8px; margin-top: 12px; }
.chat-input input {
  flex: 1; height: 36px; border-radius: 9px; border: 1px solid var(--line);
  background: var(--panel-2); padding: 0 12px; color: var(--text); outline: none;
}

.footer-note { color: var(--muted); font-size: 11.5px; line-height: 1.7; margin-top: 18px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.mt8 { margin-top: 8px; }
.mt14 { margin-top: 14px; }
.muted { color: var(--muted); }
.right { margin-left: auto; }
.pager { display: flex; gap: 8px; align-items: center; justify-content: center; margin-top: 14px; font-size: 12.5px; color: var(--muted); }

@media (max-width: 1180px) {
  .metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  :root { --side: 100%; }
  .layout { flex-direction: column; }
  .side { width: 100%; height: auto; position: relative; flex-direction: row; flex-wrap: wrap; }
  .nav-card { flex: 1 1 100%; }
  .main { padding: 12px; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ================================ 财经日历 ================================ */
.cal-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
/* 未来月份（数据源还没排会议）的说明条，提示不是漏抓 */
.cal-hint {
  margin-top: 10px; font-size: 12px; line-height: 1.7; color: var(--muted);
  background: color-mix(in srgb, var(--warn) 9%, transparent);
  border: 1px solid color-mix(in srgb, var(--warn) 30%, transparent);
  border-left: 3px solid var(--warn); border-radius: 8px; padding: 8px 11px;
}
.cal-hint b { color: var(--warn); margin-right: 8px; font-weight: 600; }
.cal-nav { display: flex; align-items: center; gap: 6px; }
.cal-arrow {
  width: 26px; height: 26px; display: grid; place-items: center; border-radius: 8px;
  border: 1px solid var(--line); background: var(--panel-2); color: var(--muted);
  text-decoration: none; font-size: 15px; line-height: 1;
}
.cal-arrow:hover { color: var(--brand); border-color: #c7d7f7; }
.cal-month { font-size: 15px; font-weight: 600; min-width: 98px; text-align: center; }
.cal-filters { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-left: auto; }
.fchip {
  font-size: 12px; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line);
  color: var(--muted); text-decoration: none; background: var(--panel-2);
}
.fchip:hover { color: var(--brand); }
.fchip.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.fdiv { width: 1px; height: 16px; background: var(--line); margin: 0 4px; }

.cal-shell {
  position: relative; margin-top: 12px; padding: 10px 10px 6px; border-radius: 18px;
  background:
    radial-gradient(900px 320px at 12% -8%, rgba(255, 255, 255, .82), transparent 60%),
    radial-gradient(700px 260px at 88% 0%, rgba(210, 234, 241, .85), transparent 62%),
    linear-gradient(170deg, #dfeef2 0%, #e6f0ea 42%, #dfe8d9 78%, #d6e0cd 100%);
  box-shadow: 0 10px 30px rgba(31, 52, 66, .10), inset 0 1px 0 rgba(255, 255, 255, .7);
  overflow: hidden;
}
.cal-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; padding: 2px 0 6px; }
.cal-wd { text-align: center; font-size: 12px; color: #5d7078; letter-spacing: .5px; }
.cal-wd.wk { color: #2f6f8f; }
.cal-grid {
  display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px;
  background: rgba(255, 255, 255, .35); border-radius: 12px; overflow: hidden;
}
.cal-cell {
  min-height: 104px; min-width: 0; overflow: hidden;
  padding: 6px 6px 8px; background: rgba(255, 255, 255, .60);
  cursor: pointer; transition: background .12s; position: relative;
}
.cal-cell:hover { background: rgba(255, 255, 255, .86); }
.cal-cell.out { background: rgba(255, 255, 255, .28); }
.cal-cell.out .cal-num { color: #a9b6bd; }
.cal-cell.out .cal-lun { color: #b7c2c8; }
.cal-cell.today { background: rgba(126, 148, 166, .28); box-shadow: inset 0 0 0 1px rgba(96, 120, 140, .28); }
.cal-cell.sel { box-shadow: inset 0 0 0 2px var(--brand); }

.cal-top { display: flex; align-items: baseline; justify-content: space-between; gap: 4px; margin-bottom: 4px; min-width: 0; }
.cal-num { font-size: 13.5px; font-weight: 600; color: #20303a; line-height: 1; }
.cal-cell.today .cal-num {
  color: #fff; background: #6f8798; border-radius: 6px; padding: 1px 5px; margin-left: -3px;
}
.cal-lun { font-size: 10.5px; color: #8a9aa2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-lun.fest { color: #c2603f; }
.cal-evs { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
/* 多色块：左侧 4px 分类色条 + 底色按重要度分级（lv1 淡 / lv4 实），
   同一分类在月历格、当日列表、tooltip 里一致；颜色只表分类与重要度，不含涨跌语义。 */
.cal-ev {
  display: block; max-width: 100%; font-size: 11px; line-height: 1.35; padding: 2px 5px 2px 8px;
  border-radius: 5px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  border-left: 4px solid rgba(0,0,0,.28);
  background-color: var(--ev-base, #8f9aa8);
}
.cal-ev.lv1 { background-color: color-mix(in srgb, var(--ev-base, #8f9aa8) 55%, #fff); color: #2b3440; }
.cal-ev.lv2 { background-color: color-mix(in srgb, var(--ev-base, #8f9aa8) 78%, #fff); }
.cal-ev.lv3 { background-color: var(--ev-base, #8f9aa8); }
.cal-ev.lv4 { background-color: var(--ev-base, #8f9aa8); box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.7); font-weight: 600; }
.cal-ev i { font-style: normal; opacity: .85; font-size: 10px; }
.cal-ev.pill { display: inline-block; }
.cal-more { font-size: 10.5px; color: #4d6068; padding-left: 2px; }

.k-macro { --ev-base: #e79a2f; border-left-color: #b9761a; }
.k-cb    { --ev-base: #6a76e8; border-left-color: #4150bd; }
.k-meet  { --ev-base: #2fa897; border-left-color: #1e7d70; }
.k-dlv   { --ev-base: #3a6ea5; border-left-color: #274f7a; }
.k-ipo   { --ev-base: #dc5a52; border-left-color: #b23831; }
.k-fil   { --ev-base: #dd5c92; border-left-color: #b23c6b; }
.k-evt   { --ev-base: #8f9aa8; border-left-color: #626d7b; }
.k-own   { --ev-base: #7a5af8; border-left-color: #5637cf; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 3px; margin-right: 5px; vertical-align: middle; background: var(--ev-base, #8f9aa8); }
.cal-legend {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 8px 4px 2px; font-size: 11.5px; color: #5d7078;
}
.cal-legend .muted { margin-left: auto; color: #6f7d85; font-size: 11px; }

/* grid 的 1fr 等价于 minmax(auto,1fr)：列的最小宽度取内容的 min-content，
   底部「添加日程」表单的 input 会把列顶到 449px，连带整页横向溢出。
   改用 minmax(0,1fr) 让列真正可收缩，再由表单自己 flex-wrap 换行。 */
.cal-bottom { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 12px; margin-top: 12px; }
.cal-bottom > .card { min-width: 0; }
@media (max-width: 1180px) { .cal-bottom { grid-template-columns: minmax(0, 1fr); } }
/* 移动端：月历保持 7 列但允许横向滚动，单元格不被压成一条；底部面板与图例自适应 */
@media (max-width: 760px) {
  .cal-grid-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .cal-grid { min-width: 700px; }
  .cal-cell { min-height: 92px; padding: 5px 4px 6px; }
  .cal-bar { flex-wrap: wrap; gap: 8px; }
  .cal-legend { gap: 8px 12px; }
  .cal-legend .muted { margin-left: 0; width: 100%; }
}
@media (max-width: 480px) {
  .cal-ev { font-size: 10px; padding-left: 6px; }
  .day-item { flex-wrap: wrap; }
  .day-time { width: 100%; flex: 0 0 100%; }
}

.day-list { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; max-height: 430px; overflow: auto; }
.day-item { display: flex; gap: 10px; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.day-item:last-child { border-bottom: 0; }
.day-time {
  font-size: 12px; color: var(--muted); width: 44px; flex: 0 0 44px;
  font-variant-numeric: tabular-nums; padding-top: 2px;
}
.day-main { flex: 1; min-width: 0; }
.day-title { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.day-sub { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.lvl { font-size: 10.5px; padding: 1px 5px; border-radius: 4px; }
.lvl.lv4 { background: #fdeaea; color: #c0392b; }
.lvl.lv3 { background: #fff4e2; color: #a9691a; }
.day-detail { margin-top: 4px; }
.day-detail summary { font-size: 11.5px; color: var(--brand); cursor: pointer; }
.day-detail pre {
  margin: 6px 0 0; font-size: 11px; line-height: 1.5; color: var(--muted); white-space: pre-wrap;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px;
  padding: 8px; max-height: 180px; overflow: auto;
}

.key-list { display: flex; flex-direction: column; gap: 4px; margin-top: 10px; max-height: 430px; overflow: auto; }
.key-item { display: flex; align-items: center; gap: 8px; padding: 4px 0; cursor: pointer; border-bottom: 1px dashed var(--line); }
.key-item:last-child { border-bottom: 0; }
.key-item:hover .cal-ev { filter: brightness(1.08); }
.key-date { font-size: 11.5px; color: var(--muted); width: 40px; flex: 0 0 40px; }
.key-time { font-size: 11px; color: var(--muted); margin-left: auto; }
.key-item .cal-ev { max-width: calc(100% - 130px); }
.empty-note { font-size: 12.5px; color: var(--muted); padding: 16px 0; text-align: center; }

html[data-theme="eye"] .cal-shell {
  background: linear-gradient(170deg, #f4ecdb, #ecdfc6);
  box-shadow: 0 2px 10px rgba(120,95,55,.12);
}
html[data-theme="eye"] .cal-cell { background: rgba(255,255,255,.30); }
html[data-theme="eye"] .cal-cell.out { background: rgba(255,255,255,.10); }
html[data-theme="eye"] .cal-cell.today { background: rgba(160,106,54,.16); }
html[data-theme="eye"] .cal-num { color: #e6ead9; }
html[data-theme="eye"] .cal-lun,
html[data-theme="eye"] .cal-legend,
html[data-theme="eye"] .cal-wd { color: #b6bfa4; }
html[data-theme="eye"] .cal-more { color: #c3cbb2; }

.day-more { margin-top: 6px; }
.day-more > summary {
  font-size: 12px; color: var(--muted); cursor: pointer; padding: 6px 0;
  border-top: 1px dashed var(--line); list-style: none;
}
.day-more > summary::-webkit-details-marker { display: none; }
.day-more > summary::before { content: "▸ "; }
.day-more[open] > summary::before { content: "▾ "; }
.day-more .day-item { padding-left: 4px; }

/* ---------------- 财经日历 · 自建日程 ---------------- */
.cal-add {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  margin: 8px 0 2px; padding: 8px; border-radius: 10px;
  background: var(--panel-2); border: 1px dashed var(--line);
}
.cal-add .cal-in {
  height: 30px; padding: 0 8px; border-radius: 7px;
  border: 1px solid var(--line); background: var(--panel); color: var(--text);
  font: inherit; font-size: 12.5px; outline: none; min-width: 0;
}
.cal-add .cal-in:focus { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft); }
.cal-add .cal-in.t { width: 62px; text-align: center; }
.cal-add .cal-in.grow { flex: 1 1 140px; }
.cal-add select.cal-in { padding-right: 4px; cursor: pointer; }
.add-hint { min-height: 14px; font-size: 12px; color: var(--muted); margin: 2px 0 6px; }

.day-del {
  margin-left: 6px; font-size: 11px; line-height: 1.6; padding: 0 7px;
  border-radius: 6px; border: 1px solid var(--line); background: transparent;
  color: var(--muted); cursor: pointer; font-family: inherit;
}
.day-del:hover { color: #dc5a52; border-color: #dc5a52; background: rgba(220, 90, 82, .06); }

/* ---------------- 财经日历 · 一键加入我的日程 ---------------- */
.day-add, .key-add {
  font-family: inherit; cursor: pointer; color: var(--brand);
  border: 1px solid var(--line);
  background: transparent; border-radius: 6px; white-space: nowrap;
  transition: background .12s, color .12s, border-color .12s;
}
.day-add {
  margin-left: 6px; font-size: 11px; line-height: 1.6; padding: 0 7px;
}
.day-add:hover, .key-add:hover { background: var(--brand); color: #fff; border-color: var(--brand); }
.key-add {
  flex: 0 0 auto; width: 20px; height: 20px; line-height: 1; padding: 0;
  font-size: 13px; display: inline-flex; align-items: center; justify-content: center;
}
.day-added, .day-rule {
  margin-left: 6px; font-size: 11px; color: var(--muted); white-space: nowrap;
  border: 1px dashed var(--line); border-radius: 6px; padding: 0 6px; line-height: 1.6;
}
.key-item > .cal-ev { flex: 1 1 auto; min-width: 0; }

/* ---------------- 财经日历 · 悬浮详情 ---------------- */
.cal-tip {
  position: fixed; z-index: 45; display: none; pointer-events: none;
  max-width: 330px; min-width: 170px; padding: 9px 11px;
  border-radius: 11px; background: var(--panel); border: 1px solid var(--line);
  box-shadow: 0 10px 26px rgba(20, 35, 60, .16);
  font-size: 12px; line-height: 1.5; color: var(--text);
  white-space: normal; word-break: break-word; text-align: left;
}
.cal-tip .tip-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 5px; }
.cal-tip .cal-ev {
  white-space: normal; overflow: visible; text-overflow: clip;
  max-width: 100%; font-size: 12px; line-height: 1.4;
}
.cal-tip .tip-meta { display: flex; flex-wrap: wrap; gap: 4px; font-size: 11.5px; color: var(--muted); }
.cal-tip .tip-meta i { font-style: normal; opacity: .5; }
.cal-tip .tip-detail {
  margin-top: 6px; padding-top: 6px; border-top: 1px dashed var(--line);
  font-size: 11.5px; color: var(--muted); white-space: pre-wrap;
  max-height: 190px; overflow: hidden;
}
.cal-tip .tip-own {
  font-size: 10.5px; padding: 1px 5px; border-radius: 4px;
  background: var(--brand-soft); color: var(--brand);
}
.lvl.lv1, .lvl.lv2 { background: var(--panel-2); color: var(--muted); }

/* ---------------- 用户协议 / 隐私政策 ---------------- */
.legal { padding: 26px 30px 22px; line-height: 1.85; font-size: 13.5px; }
.legal .legal-lead {
  margin: 0 0 20px; padding: 12px 14px; border-radius: 10px;
  background: var(--panel-2); border-left: 3px solid var(--brand);
  color: var(--text); font-size: 13px;
}
.legal h2 {
  font-size: 14.5px; margin: 26px 0 8px; padding-bottom: 6px;
  border-bottom: 1px solid var(--line); color: var(--text);
}
.legal h2:first-of-type { margin-top: 4px; }
.legal p { margin: 0 0 10px; color: var(--text); }
.legal ol, .legal ul { margin: 0 0 12px; padding-left: 22px; }
.legal li { margin-bottom: 6px; }
.legal li ul { margin-top: 6px; }
.legal strong { font-weight: 600; }
.legal code {
  font-size: 12px; padding: 1px 5px; border-radius: 4px;
  background: var(--panel-2); border: 1px solid var(--line);
}
.legal .muted { color: var(--muted); }
.legal-table {
  width: 100%; border-collapse: collapse; margin: 4px 0 14px; font-size: 12.5px;
}
.legal-table th, .legal-table td {
  border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top;
}
.legal-table th { background: var(--panel-2); font-weight: 600; white-space: nowrap; }
.legal-table td:last-child { white-space: nowrap; color: var(--muted); }
.legal-foot {
  margin-top: 26px; padding-top: 14px; border-top: 1px dashed var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}

/* 注册页协议勾选 */
.agree-row {
  display: flex; align-items: flex-start; gap: 7px;
  margin: 4px 0 14px; font-size: 12.5px; color: var(--muted); line-height: 1.55;
}
.agree-row input[type="checkbox"] {
  margin: 2px 0 0; width: 14px; height: 14px; flex: 0 0 auto; cursor: pointer;
  accent-color: var(--brand);
}
.agree-row label { cursor: pointer; }
.agree-row a { color: var(--brand); text-decoration: none; }
.agree-row a:hover { text-decoration: underline; }
.legal-tip {
  margin: 2px 0 0; font-size: 11.5px; line-height: 1.6; color: var(--muted);
  padding: 9px 11px; border-radius: 8px; background: var(--panel-2);
}

@media (max-width: 640px) {
  .legal { padding: 18px 16px; font-size: 13px; }
  .legal-table td:last-child { white-space: normal; }
}
.foot-links {
  display: flex; align-items: center; justify-content: center;
  gap: 8px; margin-top: 8px; font-size: 11.5px;
}
.foot-links a { color: var(--brand); text-decoration: none; }
.foot-links a:hover { text-decoration: underline; }
.foot-links i { font-style: normal; opacity: .4; }
.foot-links span { color: var(--muted); }

/* ---------------------------------------------------------------- 连板天梯 */
.ladder-scope .scope-warn {
  color: var(--warn, #b45309); border-left: 3px solid var(--warn, #b45309);
  padding-left: 9px; margin: 8px 0; font-size: 12.5px; line-height: 1.65;
}
.ladder-scope .scope-warn b { color: var(--warn, #b45309); }
.ladder-form { display: flex; gap: 8px; align-items: center; }
.ladder-form select {
  height: 32px; min-width: 108px; border-radius: 9px; border: 1px solid var(--line);
  background: var(--panel); color: var(--text); padding: 0 8px; white-space: nowrap;
}
.ladder-scroll { overflow-x: auto; margin-top: 10px; padding-bottom: 4px; }
/* 列宽要压得下：日期 + 最多 12 个板高列 + 4 个统计列，否则最右侧
   「当日热点」会被横向滚动裁掉，首屏看不到（1440 宽下实测过）。 */
.ladder-table { border-collapse: separate; border-spacing: 4px; min-width: 1040px; width: 100%; }
.ladder-table th {
  font-size: 11.5px; font-weight: 600; color: var(--muted); text-align: center;
  white-space: nowrap; padding: 2px 4px 4px;
}
.ladder-table td {
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 7px;
  padding: 5px; min-width: 84px; vertical-align: top;
}
.ladder-table tr.cur td { box-shadow: inset 0 0 0 1.5px rgba(37, 99, 235, .35); }
.ladder-table td.ladder-date {
  background: transparent; border: none; box-shadow: none; min-width: 54px;
  text-align: center; font-size: 12px; padding-top: 8px; white-space: nowrap;
}
.ladder-table td.ladder-date a { color: var(--muted); text-decoration: none; }
.ladder-table td.ladder-date a:hover { color: var(--brand); }
.ladder-table tr.cur td.ladder-date a { color: var(--brand); font-weight: 700; }
.ladder-table td.ladder-num { min-width: 58px; }
.ladder-table td.ladder-hot { min-width: 104px; }
.ladder-num, .ladder-hot { font-size: 12px; text-align: center; padding-top: 7px !important; white-space: nowrap; }
.ladder-hot { text-align: left; }
.ladder-topname {
  display: block; font-size: 10.5px; color: var(--muted); max-width: 84px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin: 0 auto;
}
.ladder-chip {
  display: block; font-size: 11.5px; line-height: 17px; padding: 1px 5px;
  border-radius: 4px; margin-bottom: 2px; cursor: pointer; color: var(--text);
  border-left: 3px solid transparent; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; user-select: none;
}
.ladder-chip:hover { filter: brightness(.965); }
.ladder-chip.tracked { outline: 2px solid var(--brand); outline-offset: -2px; font-weight: 700; }
.ladder-chip.picked { outline-color: var(--warn); }
.ladder-more { font-size: 10.5px; color: var(--muted); padding-left: 4px; }
.ladder-legend {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px;
  margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line);
  font-size: 11.5px;
}
.ladder-legend .ladder-chip { display: inline-block; margin: 0; min-width: 52px; text-align: center; }
/* 板高档位：浅底深字，护眼主题下同样可读；与涨跌红绿无关 */
.ladder-chip.lv1, .ladder-level.lv1 { background: #eef2f7; border-left-color: #9aa7b8; }
.ladder-chip.lv2, .ladder-level.lv2 { background: #fff3d6; border-left-color: #d9a228; }
.ladder-chip.lv3, .ladder-level.lv3 { background: #ffe6cc; border-left-color: #dd7b2a; }
.ladder-chip.lv4, .ladder-level.lv4 { background: #ffdcda; border-left-color: var(--up); }
.ladder-chip.lv5, .ladder-level.lv5 { background: #ffcfd2; border-left-color: #c92f45; }
.ladder-chip.lv6, .ladder-level.lv6 { background: #f0d6f4; border-left-color: #933cac; }
html[data-theme="eye"] .ladder-chip.lv1, html[data-theme="eye"] .ladder-level.lv1 { background: #dfe5d2; }
.ladder-level {
  display: inline-block; font-size: 14px; font-weight: 700; padding: 3px 11px;
  border-radius: 7px; border-left: 4px solid transparent;
}
.ladder-rate { font-size: 12.5px; color: var(--text); }
.ladder-rate b { font-size: 14px; color: var(--up); }
.ladder-rank { list-style: none; margin: 10px 0 0; padding: 0; }
.ladder-rank li {
  display: grid; grid-template-columns: 24px minmax(0, 1fr) 84px 28px;
  gap: 8px; align-items: center; padding: 4px 0; font-size: 12.5px;
}
.ladder-rank .rk-no { color: var(--muted); font-size: 11px; }
.ladder-rank li:first-child .rk-no, .ladder-rank li:nth-child(2) .rk-no,
.ladder-rank li:nth-child(3) .rk-no { color: var(--up); font-weight: 700; }
.ladder-rank .rk-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ladder-rank .rk-track { height: 5px; border-radius: 3px; background: var(--line); overflow: hidden; }
.ladder-rank .rk-track i { display: block; height: 100%; border-radius: 3px; background: var(--up); }
.ladder-rank b { text-align: right; font-size: 12px; }
.ladder-stocks {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
  gap: 8px; margin-top: 10px;
}
.ladder-stock {
  border: 1px solid var(--line); border-radius: 9px; padding: 8px 9px;
  background: var(--panel-2); min-width: 0;
}
.ladder-stock.tracked { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft); }
.ls-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ls-top a { font-weight: 600; color: var(--text); text-decoration: none; font-size: 13px; }
.ls-top a:hover { color: var(--brand); }
.ls-top .num { font-size: 11px; }
.ls-meta { font-size: 11px; color: var(--muted); margin: 4px 0 6px; }
.ls-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.rtag {
  font-size: 10.5px; line-height: 16px; padding: 0 5px; border-radius: 4px;
  background: var(--brand-soft); color: var(--brand); max-width: 100%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ladder-temps {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 22px; margin-top: 10px;
}
.temp-row {
  display: grid; grid-template-columns: 44px minmax(0, 1fr) 66px 82px;
  gap: 8px; align-items: center; font-size: 12px; padding: 2px 0;
}
.temp-date { color: var(--muted); font-size: 11.5px; }
.temp-bar { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.temp-bar i { display: block; height: 100%; border-radius: 3px; }
.temp-bar i.up { background: var(--up); }
.temp-bar i.down { background: var(--down); }
.temp-val { text-align: right; font-size: 11.5px; }
.temp-val.up { color: var(--up); }
.temp-val.down { color: var(--down); }
.temp-val.flat { color: var(--muted); font-weight: 400; }
.temp-brk { font-size: 11px; text-align: right; }
.ladder-scope p { font-size: 12.5px; line-height: 1.75; margin: 10px 0 0; color: var(--text); }
.ladder-scope code { font-size: 12px; background: var(--panel-2); padding: 1px 4px; border-radius: 4px; }
@media (max-width: 900px) {
  .grid-2 { grid-template-columns: 1fr; }
  .ladder-temps { grid-template-columns: 1fr; }
  .ladder-scroll { -webkit-overflow-scrolling: touch; }
}

/* 股票统计 · 公告利好利空（2026-11-12 改版）：
   左利好右利空双栏，每只股票一张小卡，卡内最多列 3 条公告，其余折叠。
   左侧 3px 色条区分方向（红=利好 / 绿=利空），与 K 线涨跌色一致。 */
.nt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
@media (max-width: 1000px) { .nt-grid { grid-template-columns: 1fr; } }
.nt-card { display: flex; flex-direction: column; }
.nt-col { display: flex; flex-direction: column; gap: 7px; max-height: 760px; overflow-y: auto; padding-right: 4px; }
.nt-item {
  border: 1px solid var(--line); border-left: 3px solid var(--up);
  border-radius: 9px; padding: 8px 11px 7px; background: var(--panel);
  transition: border-color .12s ease, background .12s ease;
}
.nt-item:hover { background: var(--panel-2); }
.nt-item.down { border-left-color: var(--down); }
.nt-hd { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.nt-hd b { font-size: 13.5px; letter-spacing: .2px; }
.nt-code { font-size: 11px; color: var(--muted); }
.nt-cnt { margin-left: auto; font-size: 11px; color: var(--muted); flex: 0 0 auto; }
.nt-ls { list-style: none; margin: 5px 0 0; padding: 0; display: grid; gap: 3px; }
.nt-ls li { display: flex; gap: 7px; font-size: 12.2px; line-height: 1.55; }
.nt-t { color: var(--muted); font-size: 11px; flex: 0 0 auto; padding-top: 1px; }
.nt-ls a { color: var(--text); text-decoration: none; }
.nt-ls a:hover { color: var(--brand); text-decoration: underline; }
.nt-more { margin-top: 4px; }
.nt-more summary { cursor: pointer; color: var(--brand); font-size: 11.5px; list-style: none; }
.nt-more summary::-webkit-details-marker { display: none; }
.nt-more summary::before { content: "›"; margin-right: 4px; display: inline-block; transition: transform .12s; }
.nt-more[open] summary::before { transform: rotate(90deg); }
.nt-empty { color: var(--muted); font-size: 12.5px; margin: 6px 2px; }

/* 快讯正文里的网盘/网页附件链接（由 app/main.py::linkify 渲染） */
.brief-body a { color: var(--brand); text-decoration: underline; word-break: break-all; }
.brief-body a:hover { opacity: .8; }

/* 附件清单帖（录音/文件列表）默认给足高度，别让一屏只露出两行 */
.brief-body.brief-attach { max-height: 460px; }

/* 每日快讯 · 星球调研录音播放器（2026-11-13）
   默认折叠：一条录音帖常有 6~9 段，全部展开会把快讯流撑得很长。 */
.brief-audio { margin-top: 8px; }
.brief-audio summary { cursor: pointer; color: var(--brand); font-size: 12.5px; list-style: none; }
.brief-audio summary::-webkit-details-marker { display: none; }
.brief-audio summary::before { content: "▶"; font-size: 10px; margin-right: 6px; display: inline-block; transition: transform .12s; }
.brief-audio[open] summary::before { transform: rotate(90deg); }
.audio-list { display: grid; gap: 9px; margin-top: 9px; }
.audio-row { border: 1px solid var(--line); border-radius: 9px; padding: 8px 10px; background: var(--panel-2); }
.audio-meta { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; font-size: 12.5px; margin-bottom: 6px; }
.audio-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.audio-meta .num { font-size: 11px; flex: 0 0 auto; }
.audio-row audio { width: 100%; height: 34px; display: block; }

/* ---------------- 快讯条目右上角：收藏 / 加日程（2026-11-13）
   放在 .brief-head 里靠右，平时半透明，鼠标进条目才显形，避免把时间行挤花。
   移动端没有 hover，直接常显。 */
.brief-head { flex-wrap: wrap; row-gap: 6px; }
.brief-tools { margin-left: auto; display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.brief-tool {
  height: 24px; padding: 0 8px; border: 1px solid transparent; border-radius: 6px;
  background: none; color: var(--muted); font-size: 11.5px; line-height: 1;
  letter-spacing: .02em; cursor: pointer; opacity: .7;
  transition: opacity .14s, color .14s, border-color .14s, background-color .14s;
}
.brief:hover .brief-tool, .brief-tool:focus-visible { opacity: 1; }
.brief-tool:hover { color: var(--text); border-color: var(--line); background: var(--panel-2); }
.brief-tool:disabled { cursor: default; }

/* 星标：实心时用暖金色，和红涨绿跌的语义色区分开 */
.brief-tool.js-fav { font-size: 15px; padding: 0 6px; }
.brief-tool.js-fav.on { color: #c99a2e; opacity: 1; }
.brief-tool.js-cal.on { color: var(--brand); border-color: var(--brand-soft); background: var(--brand-soft); opacity: 1; }

@media (hover: none) {
  .brief-tool { opacity: .85; }
}

/* 空状态 */
.empty-hint { padding: 18px 2px 10px; }
.empty-hint p { margin: 0 0 8px; font-size: 13.5px; }
.empty-hint p.muted { font-size: 12.5px; }

/* 加入日程弹窗：比服务清单窄一些，两列表单 */
.modal-sm { max-width: 520px; }
.modal-sm form { display: grid; gap: 10px; }
.modal-sm label { display: block; font-size: 12px; color: var(--muted); }
.modal-sm label input, .modal-sm label select {
  display: block; width: 100%; margin-top: 4px; height: 34px;
  border: 1px solid var(--line); border-radius: 9px; background: var(--panel-2);
  color: var(--text); font-size: 13px; padding: 0 10px;
}
/* 内容改多行：长标题不再被压成一行看不见尾巴，高度由 JS autoGrow 跟着内容长 */
.modal-sm label textarea {
  display: block; width: 100%; margin-top: 4px; min-height: 64px;
  border: 1px solid var(--line); border-radius: 9px; background: var(--panel-2);
  color: var(--text); font-size: 13px; line-height: 1.62; padding: 8px 10px;
  font-family: inherit; resize: vertical;
}
.modal-sm label input:focus, .modal-sm label select:focus, .modal-sm label textarea:focus {
  outline: none; border-color: var(--brand); background: var(--panel);
  box-shadow: 0 0 0 3px var(--brand-soft);
}
.form-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
/* 注意：日历页已有一个 .cal-hint（黄色说明条），这里必须换名，别串味 */
.cal-form-hint { margin: 0; font-size: 11.5px; line-height: 1.6; min-height: 1em; }
@media (max-width: 520px) {
  .form-2col { grid-template-columns: 1fr; }
}

/* ---------------- 个人复盘（个股复盘表电子化） ---------------- */
.pr-tools { flex-wrap: wrap; }
.pr-date-pick { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.pr-date-pick input {
  height: 28px; padding: 0 8px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--panel); color: var(--text); font: inherit; font-size: 12.5px;
}
.pr-tip {
  margin: 12px 0 0; padding: 10px 12px; border-radius: 9px;
  background: var(--brand-soft); border: 1px solid var(--line);
  font-size: 12.5px; line-height: 1.8; color: var(--text);
}
.pr-history { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 12px; }
.pr-history-label { font-size: 12px; color: var(--muted); margin-right: 2px; }
.pr-date-chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 20px;
  border: 1px solid var(--line); background: var(--panel-2); font-size: 12px; color: var(--text);
}
.pr-date-chip:hover { border-color: var(--brand); text-decoration: none; }
.pr-date-chip.on { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.pr-date-chip i { font-style: normal; font-size: 11px; color: var(--muted); }
.pr-save-state { margin-top: 10px; font-size: 12px; color: var(--muted); min-height: 1.4em; }
.pr-save-state.ok { color: var(--down); }
.pr-save-state.err { color: var(--up); }
.pr-save-state.saving { color: var(--brand); }

.pr-card { padding: 0; overflow: hidden; }
.pr-card-head {
  display: flex; align-items: center; gap: 10px; padding: 12px 18px;
  border-bottom: 1px solid var(--line); background: var(--panel-2);
}
.pr-card-head h2 { margin: 0; font-size: 15px; font-weight: 600; }
.pr-no { color: var(--brand); font-weight: 700; }
.pr-card-tools { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.pr-card-time { font-size: 11.5px; }
.pr-del { color: var(--muted); }
.pr-del:hover { border-color: var(--up); color: var(--up); }

.pr-grid { display: grid; gap: 14px; padding: 14px 18px 0; }
.pr-grid-3 { grid-template-columns: 1fr 1fr 1.35fr; }
.pr-f { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.pr-f > span { font-size: 12px; color: var(--muted); line-height: 1.5; }
.pr-f em { font-style: normal; font-size: 11px; opacity: .85; }
.pr-f input, .pr-f textarea, .pr-plan textarea {
  width: 100%; padding: 7px 9px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--panel); color: var(--text); font: inherit; font-size: 13px;
  line-height: 1.6; resize: vertical; transition: border-color .15s, box-shadow .15s;
}
.pr-f input:focus, .pr-f textarea:focus, .pr-plan textarea:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft);
}
.pr-f input::placeholder, .pr-f textarea::placeholder, .pr-plan textarea::placeholder {
  color: var(--muted); opacity: .62;
}

.pr-row { display: flex; align-items: flex-end; gap: 18px; padding: 14px 18px 0; flex-wrap: wrap; }
.pr-bench { flex: 1 1 220px; }
.pr-choice { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.pr-legend { font-size: 12px; color: var(--muted); margin-right: 4px; white-space: nowrap; }
.pr-pill { position: relative; cursor: pointer; }
.pr-pill input { position: absolute; opacity: 0; width: 0; height: 0; }
.pr-pill span {
  display: inline-block; padding: 4px 11px; border: 1px solid var(--line); border-radius: 20px;
  background: var(--panel); font-size: 12.5px; color: var(--text); white-space: nowrap; transition: .15s;
}
.pr-pill:hover span { border-color: var(--brand); }
.pr-pill input:checked + span { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.pr-pill input:focus-visible + span { box-shadow: 0 0 0 3px var(--brand-soft); }
.pr-row-bottom .pr-f { flex: 1 1 160px; }

.pr-plan { width: calc(100% - 36px); margin: 16px 18px 18px; border-collapse: collapse; table-layout: fixed; }
.pr-plan th, .pr-plan td { border: 1px solid var(--line); padding: 8px 10px; vertical-align: top; }
.pr-plan thead th { background: var(--panel-2); font-size: 12.5px; font-weight: 600; text-align: left; }
.pr-plan thead th:first-child { width: 120px; }
.pr-plan tbody th { background: var(--panel-2); font-size: 12.5px; font-weight: 500; text-align: left; white-space: nowrap; }
.pr-plan textarea { border: 0; padding: 2px 3px; background: transparent; min-height: 44px; }
.pr-plan textarea:focus { box-shadow: none; background: var(--panel-2); }
.pr-empty p { margin: 0 0 8px; }

@media (max-width: 900px) {
  .pr-grid-3 { grid-template-columns: 1fr 1fr; }
  .pr-grid-3 > .pr-f:last-child { grid-column: 1 / -1; }
  .pr-tools { margin-left: 0; }
}
@media (max-width: 620px) {
  .pr-grid-3 { grid-template-columns: 1fr; }
  .pr-grid-3 > .pr-f:last-child { grid-column: auto; }
  .pr-plan { width: calc(100% - 28px); margin: 14px; }
  .pr-plan thead th:first-child { width: 84px; }
  .pr-card-head { padding: 10px 14px; }
  .pr-grid, .pr-row { padding-left: 14px; padding-right: 14px; }
}

/* ---------------- 股市感悟（个人复盘页底部 + 感悟库） ----------------
   和个股复盘卡片视觉上要能区分：卡片是「表格」，感悟是「一页纸」，
   所以这里用大 textarea + 行高放到 1.9，写长句子不挤。 */
.ins-card { margin-top: 14px; }
.ins-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.ins-head h2 { margin: 0 0 3px; font-size: 15px; font-weight: 600; }
.ins-sub { font-size: 12px; line-height: 1.7; }
.ins-n { font-style: normal; font-size: 11px; color: var(--muted); margin-left: 3px; }
.ins-card textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px;
  background: var(--panel-2); color: var(--text); font: inherit; font-size: 13.5px;
  line-height: 1.9; resize: vertical; min-height: 112px;
}
.ins-card textarea:focus { outline: none; border-color: var(--brand); background: var(--panel); }
.ins-foot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.ins-tags { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); flex: 1 1 260px; }
.ins-tags input {
  flex: 1; height: 28px; padding: 0 8px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--panel); color: var(--text); font: inherit; font-size: 12.5px;
}
.ins-foot .pr-save-state { margin-top: 0; }

/* 感悟库 */
.ins-h1-sub { font-size: 12px; font-weight: 400; color: var(--muted); margin-left: 6px; }
.ins-filter { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.ins-filter input[type="search"] {
  flex: 1 1 240px; height: 32px; padding: 0 10px; border: 1px solid var(--line);
  border-radius: 8px; background: var(--panel); color: var(--text); font: inherit; font-size: 13px;
}
.ins-cloud { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 12px; }
.ins-cloud-label { font-size: 12px; color: var(--muted); margin-right: 2px; }
.ins-tag {
  display: inline-flex; align-items: center; gap: 3px; padding: 2px 8px; border-radius: 20px;
  border: 1px solid var(--line); background: var(--panel-2); font-size: 12px; color: var(--muted);
}
.ins-tag:hover { border-color: var(--brand); color: var(--brand); text-decoration: none; }
.ins-tag.on { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.ins-tag i { font-style: normal; font-size: 11px; opacity: .75; }
.ins-result { margin-top: 10px; font-size: 12px; }
.ins-group { margin-top: 14px; }
.ins-month {
  display: flex; align-items: baseline; gap: 8px; font-size: 13px; font-weight: 600;
  padding-bottom: 8px; border-bottom: 1px solid var(--line);
}
.ins-month .muted { font-weight: 400; font-size: 12px; }
.ins-item { padding: 12px 0; border-bottom: 1px dashed var(--line); }
.ins-item:last-child { border-bottom: 0; padding-bottom: 0; }
.ins-item-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.ins-date { font-size: 12.5px; font-weight: 600; color: var(--brand); font-variant-numeric: tabular-nums; }
.ins-item-head .right { display: inline-flex; gap: 10px; align-items: center; }
.ins-edit, .ins-del {
  font: inherit; font-size: 12px; color: var(--muted); background: none; border: 0;
  padding: 0; cursor: pointer;
}
.ins-edit:hover { color: var(--brand); text-decoration: none; }
.ins-del:hover { color: var(--up); }
.ins-body {
  font-size: 13.5px; line-height: 1.95; white-space: pre-wrap;
  word-break: break-word; color: var(--text);
}

@media (max-width: 620px) {
  .ins-head { flex-direction: column; }
  .ins-foot { flex-direction: column; align-items: stretch; }
}

/* ---------------- 操盘纪律（感悟页置顶） ---------------- */
.rule-box {
  margin-top: 14px; padding: 16px 18px 18px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-left: 3px solid var(--brand);
  border-radius: var(--radius);
}
.rule-box-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px; margin-bottom: 14px;
}
.rule-box-head h2 { margin: 0 0 3px; font-size: 15px; font-weight: 600; }
.rule-box-sub { font-size: 12px; color: var(--muted); line-height: 1.6; }
.rule-box-head .pr-save-state { margin-top: 0; white-space: nowrap; }
.rule-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px;
}
.rule-cell { min-width: 0; }
.rule-label {
  display: block; font-size: 12.5px; font-weight: 600;
  color: var(--brand); margin-bottom: 5px;
}
.rule-label::before {
  content: ''; display: inline-block; width: 5px; height: 5px;
  border-radius: 50%; background: var(--brand); opacity: .55;
  margin: 0 6px 2px 0;
}
.rule-input {
  display: block; width: 100%; min-height: 66px; resize: vertical;
  padding: 8px 10px; font: 13px/1.7 inherit;
  color: var(--text); background: var(--panel);
  border: 1px solid var(--line); border-radius: 8px;
}
.rule-input::placeholder { color: var(--muted); opacity: .8; }
.rule-input:focus { outline: none; border-color: var(--brand); }
@media (max-width: 720px) {
  .rule-grid { grid-template-columns: 1fr; }
  .rule-box-head { flex-direction: column; }
}

/* ---------------- 合规声明（备案友好） ---------------- */
/* 首页首屏可见：把「非经营性 / 转载 / 不构成投资建议」写在快讯列表之前，
   避免审核人员只看到转载研报里的「建议重点关注」而误判为证券投资咨询。 */
.compliance-note {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 8px;
  margin: 0 0 14px; padding: 9px 12px; border-radius: 9px;
  border: 1px solid var(--line); background: var(--brand-soft);
  font-size: 12px; line-height: 1.7; color: var(--text);
}
.compliance-note .cn-tag {
  flex: 0 0 auto; padding: 1px 7px; border-radius: 5px;
  background: var(--brand); color: #fff; font-size: 11px; font-weight: 600;
}
.compliance-note strong { font-weight: 600; }
.compliance-note a { margin-left: auto; white-space: nowrap; font-size: 11.5px; }
.footer-nature { margin-bottom: 6px; }
.footer-nature strong { color: var(--text); font-weight: 600; }
/* 备案信息统一居中：页脚一行（ICP + 公安）与法务页的备案号段都用 .filing-line */
.footer-filing { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 8px; font-size: 12px; }
.footer-filing a { color: var(--muted); }
.footer-filing a:hover { color: var(--brand); }
/* 公安联网备案图标：官方要求图标与备案号并排展示，随文字基线微调，避免撑高行距 */
.ghs { width: 20px; height: 20px; vertical-align: -5px; margin-right: 5px; border: 0; }
/* 法务页（/about /privacy /terms）里的备案号段：与页脚一致，单独一行居中 */
.filing-line { text-align: center; margin-top: 4px; }
.filing-line .fi { white-space: nowrap; }   /* 窄屏只在「ICP / 公安」两项之间折行，不把标签和号拆开 */
@media (max-width: 520px) { .filing-line .sep { display: none; } }   /* 已折成两行，分隔点不必留在行尾 */
@media (max-width: 620px) {
  .compliance-note a { margin-left: 0; }
}

/* ---------------- 第三方机构研究观点（备案审核期索引化呈现） ----------------
   命中研报/推介措辞的快讯：加「第三方观点」标签，匿名访客默认折叠正文，
   只保留原文出处说明与一键查看；登录用户正常阅读。库内原文不改动。 */
.tag-third {
  background: var(--panel-2); color: var(--muted);
  border: 1px dashed var(--line);
}
.brief-third {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px;
  margin: 8px 0 6px; padding: 8px 10px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--brand-soft);
  font-size: 12px; line-height: 1.65; color: var(--muted);
}
.brief-third .bt-tag {
  flex: 0 0 auto; padding: 1px 7px; border-radius: 5px;
  background: var(--panel-2); color: var(--text); font-weight: 600; font-size: 11px;
}
.brief-third .bt-text { flex: 1 1 260px; }
.brief-third .btn { flex: 0 0 auto; }
.brief-body.third-hidden { display: none; }
html[data-theme="eye"] .tag-third { background: var(--panel); }

/* ------------------------------------------------------------------ 市场情绪
   曲线用固定 0~5200 的 Y 轴，参考线（5000/3000/600）由服务端算成 y 坐标；
   .mood-chart 高度必须恒为 250px —— 右侧刻度标签用同样的坐标绝对定位，
   改高度会让标签和线错开。窄屏只缩字号，不要改这个高度。 */
.mood-spans { display: flex; gap: 6px; }
.mood-legend {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 16px;
  margin-bottom: 12px; font-size: 13px; font-weight: 600;
}
.mood-legend-title { font-size: 15px; font-weight: 700; color: var(--text); }
.mood-legend-val, .mood-legend-up { color: var(--up); }
.mood-legend-down { color: var(--down); }
.mood-legend-note { margin-left: auto; font-size: 12px; font-weight: 400; color: var(--muted); }

/* 查看缩放：viewport 尺寸固定，stage 只做 transform，既不回流也不动固定刻度坐标。
   SVG、Y 轴标签、X 轴标签都在同一个 stage 内，缩放/平移后仍然严丝合缝。 */
.mood-zoom { margin-top: 4px; }
.mood-zoom-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px;
  margin-bottom: 8px; font-size: 12px;
}
.mood-zoom-btns { display: flex; align-items: center; gap: 5px; }
.mood-zoom-btns .btn { min-width: 34px; padding: 3px 9px; line-height: 1.35; }
.mood-zoom-level {
  min-width: 46px; text-align: center; color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.mood-zoom-tip { color: var(--muted); }
.mood-viewport {
  position: relative; height: 280px; overflow: hidden; border-radius: 9px;
  cursor: grab; user-select: none; touch-action: pan-y;
  outline: 1px solid transparent; outline-offset: 2px;
  transition: outline-color .15s;
}
.mood-zoom.zoomed .mood-viewport { outline-color: var(--brand-soft); }
.mood-viewport.dragging { cursor: grabbing; }
.mood-stage {
  position: absolute; left: 0; top: 0; width: 100%;
  transform-origin: 0 0; will-change: transform;
}
.mood-stage .mood-chart-wrap { margin-top: 0; }

.mood-chart-wrap { margin-top: 2px; }
.mood-chart {
  position: relative; height: 250px; overflow: hidden;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 9px;
}
.mood-chart svg { display: block; width: 100%; height: 250px; }
.mood-cap { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 4 4; opacity: .5; }
.mood-ref-up { stroke: var(--up); stroke-width: 1.2; stroke-dasharray: 6 5; opacity: .85; }
.mood-ref-down { stroke: var(--down); stroke-width: 1.5; }
.mood-line { fill: none; stroke: #0e8b8f; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.mood-line-down { fill: none; stroke: var(--muted); stroke-width: 1.4; stroke-dasharray: 5 5; opacity: .5; }
.mood-dot { fill: #0e8b8f; stroke: var(--panel); stroke-width: 1; }
.mood-ytag {
  position: absolute; right: 8px; padding: 0 3px; pointer-events: none;
  font-size: 11px; color: var(--muted); background: var(--panel-2);
}
.mood-ytag-up { color: var(--up); }
.mood-ytag-down { color: var(--down); }
.mood-xaxis { position: relative; height: 20px; margin-top: 5px; }
.mood-xaxis span {
  position: absolute; top: 0; transform: translateX(-50%);
  font-size: 11px; color: var(--muted); white-space: nowrap;
}
.mood-foot { margin-top: 12px; font-size: 12px; line-height: 1.7; }
.mood-empty {
  padding: 26px 12px; text-align: center; font-size: 13px; color: var(--muted);
  background: var(--panel-2); border: 1px dashed var(--line); border-radius: 9px;
}

.mood-dist { display: flex; flex-wrap: wrap; gap: 10px 18px; margin: 14px 0 10px; font-size: 13px; }
.mood-dist-item b { font-size: 15px; }
.mood-dist-up { color: var(--up); }
.mood-dist-mid { color: var(--warn); }
.mood-dist-down { color: var(--down); }
.mood-dist-avg { color: var(--muted); }
.mood-dist-avg b { color: var(--text); }
.mood-bar { display: flex; height: 9px; border-radius: 5px; overflow: hidden; background: var(--line); }
.mood-bar i { display: block; height: 100%; }
.mood-bar-up { background: var(--up); }
.mood-bar-mid { background: var(--warn); opacity: .8; }
.mood-bar-down { background: var(--down); }

.mood-table-wrap { overflow-x: auto; }
.mood-tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.mood-tbl th, .mood-tbl td {
  padding: 8px 10px; text-align: right; white-space: nowrap;
  border-bottom: 1px solid var(--line);
}
.mood-tbl th:first-child, .mood-tbl td:first-child,
.mood-tbl th:last-child, .mood-tbl td:last-child { text-align: left; }
.mood-tbl th { background: var(--panel-2); color: var(--muted); font-weight: 600; }
.mood-tbl tbody tr:hover { background: var(--panel-2); }
.mood-num-up { color: var(--up); font-weight: 600; }
.mood-num-down { color: var(--down); font-weight: 600; }
.mood-tag {
  display: inline-block; padding: 2px 8px; border-radius: 10px;
  font-size: 11px; font-weight: 600;
  background: var(--brand-soft); color: var(--muted);
}
.mood-tag-up { color: var(--up); }
.mood-tag-down { color: var(--down); }
.mood-tag-flat { color: var(--warn); }

@media (max-width: 720px) {
  .mood-legend-note { margin-left: 0; width: 100%; }
  .mood-ytag { font-size: 10px; right: 4px; }
  .mood-xaxis span { font-size: 10px; }
  .mood-zoom-bar { gap: 6px 10px; }
  .mood-zoom-tip { font-size: 11px; }
}

/* ---------------- 个股 K 线（登录后个人区，日线/周线）---------------- */
.kl-card { margin-top: 12px; }
.kl-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 12px 0 8px; }
.kl-input {
  width: 180px; padding: 8px 10px; border: 1px solid var(--line);
  border-radius: 8px; background: var(--panel-2); color: var(--text); font-size: 13px;
}
.kl-tabs { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.kl-tab { padding: 7px 14px; border: 0; background: var(--panel-2); color: var(--muted); font-size: 12.5px; cursor: pointer; }
.kl-tab.on { background: var(--brand); color: #fff; }
.kl-name { font-weight: 600; color: var(--text); }
.kl-msg { min-height: 18px; font-size: 12px; color: var(--muted); margin: 4px 0; }
.kl-chart-wrap { width: 100%; overflow-x: auto; }
.kl-chart-wrap svg { width: 100%; min-width: 640px; height: auto; display: block; }
.kl-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 8px; font-size: 11.5px; color: var(--muted); }
.kl-legend i { display: inline-block; width: 10px; height: 10px; margin-right: 5px; vertical-align: middle; border-radius: 2px; }
.kl-legend .kl-up { background: var(--up); }
.kl-legend .kl-down { background: transparent; border: 1px solid var(--down); }
@media (max-width: 620px) {
  .kl-input { width: 150px; }
  .kl-tabs { order: 3; width: 100%; }
  .kl-tab { flex: 1; }
}
