/* ============================================================================
   v15.css —— 12 版组件层（2026-09-28；锚 docs/迭代/2026-09-28-12版整体需求/，画布 docs/前端参考/2026-09-28-12版整体需求/）
   A · 头部行归位：主区头部行放品牌（左上），对话栏头部行只留右侧四控件（定时任务胶囊 → 积分 → 我的报告 → 头像）。
   B · 行情速览：看板第 6 格速览卡（§3）+ 模块页 ?page=quotes（§4，沿用 v14 §10 .mp-* 版式）+ 编辑速览弹窗（§5）。
   不做横跨整页的顶栏：两行同高 56、都无底边线、与各自底色一致，对话栏左分割线自 y=0 到底不断（用户 09-28 拍板第 1 条）。
   ≤720 规则在 mobile.css 尾段（12 版），暗色差异在 theme-dark.css 尾部。
   注意：注释内禁止出现星杠闭合序列（坑①）；生成 HTML 禁写 style 属性（坑⓪）——动态几何走 data-* + util.applyDataStyles。
   ========================================================================== */

/* ============ 1 · 主区头部行（56；在 #board-scroll 之外，不随看板滚动；与页面同底色、无底边线） ============
   品牌沿用 11 版对话栏品牌的实测值（components.css .brand / .logo：间距 8、logo 28×28；名称 17 / 800 / 字距 −.02em），只换位置。
   看板 margin-top 16 不变 → 看板顶 y = 56 + 16 = 72，资讯流列头随之下移 56（UI 规格 A1 / A2） */
.main-head { flex: none; height: 56px; padding: 0 16px; display: flex; align-items: center; min-width: 0; }
.main-head .name { font-size: var(--fs-xl); }
.ws.is-page .main-head { display: none; }   /* 模块页内模式有自己的页头（标题 + ✕ + Tab） */

/* ============ 2 · 对话栏头部行：只留右侧控件（品牌节点已移走） ============
   v2.css 为「品牌左 / 用户区右」设的 space-between 改为整组靠右；v13 胶囊的 margin-left:auto 在靠右行里等效，保留。
   间距：行 gap 8（v14）= 用户区内 gap 8（v2）→ 四控件等距。覆盖层态关闭钮 order:99 仍在最右（v14 §1） */
.chat-aside .sidebar-brand { justify-content: flex-end; }
.cr-unit { flex: none; }

/* ============ 3 · 行情速览卡（看板第 6 格，替代 11 版「更多模块」占位；无脚，体 196 = 表头 18 + 7 行 × 25） ============
   列：名称 60 / 最新 64 / 1D · 1W · YTD 三列均分余量（实装按实测字宽定，见 UI 规格实装记录 B）：卡内宽随看板列数在 278（视口 1052 两列档）
   到 458 之间变化，固定 56 / 58 / 余量会在最窄处把 YTD 压到 40；均分后最窄处每列 51 = 两位数涨跌幅「+61.02%」47 + 左内边距 4。
   名称用短名（quotes.js SHORT，最宽 5 个汉字 = 60）；最新价按 Manrope 12 / 700（09-29 字体自托管后重测）：七位数字「73,895.74」59.4 + 4 = 64，
   整数位 ≥ 6 时卡片少显示小数（quotes.js fmtPrice compact：最多 7 位数字，「151,828.62」→「151,828.6」，全精度 66.8 放不下）。
   百分比 11.5 / 700、正负号等宽盒 .sg；涨 green-d / 跌 red / 0 与空值 ink-3；行级陈旧（stale / error 保留旧值）最新价转 ink-3 */
.qt-card { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 12px; font-variant-numeric: tabular-nums; }
.qt-card .qc-nm { width: 60px; }
.qt-card .qc-px { width: 64px; }
.qt-card th { height: 18px; padding: 0; font-size: 11px; font-weight: 600; color: var(--ink-3); text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
.qt-card td { height: 25px; padding: 0 0 0 4px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qt-card th:first-child, .qt-card td:first-child { text-align: left; padding-left: 0; }
.qt-card tr:last-child td { border-bottom: 0; }
.qt-card .qt-nm, .qt-card .qt-px { font-weight: 700; color: var(--ink); }
.qt-card .qt-pc { font-size: 11.5px; font-weight: 700; }
/* 窄卡（卡内宽 ≤ 290：视口 1052–1076 两列档、1412–1417 三列档）百分比 10.5 号、左内边距 3：最窄 278 时每列 51.3，
   Manrope 实测（09-29；数字等宽，「±dd.dd%」与 compact「±ddd.d%」同宽）11.5 号 50.4 / 10.5 号 46.0，10.5 + 3 仍留 2.0px（回退字体时代 50.3 / 45.9）。
   其余宽度（含 1440 参考宽：内宽 298、每列 58）保持 11.5；容器查询不支持时也保持 11.5，最后兜底是单元格省略号 */
#mod-quotes { container-type: inline-size; }
@container (max-width: 290px) {
  .qt-card .qt-pc { font-size: 10.5px; padding-left: 3px; }
}
.qt-card .sg, .qt-tbl .sg { display: inline-block; width: .7em; text-align: center; }   /* 「+」「−」字形宽度不同，装进同宽盒子对齐 */
.qt-pc.up { color: var(--green-d); }
.qt-pc.dn { color: var(--red); }
.qt-pc.flat, .qt-pc.is-nil { color: var(--ink-3); }
.qt-card .qt-px.is-late, .qt-tbl .qt-px.is-late { color: var(--ink-3); }
.qt-late { color: var(--amber); }   /* collected_at 距今 > 3 小时：卡头 / 页头时间后「· 可能延迟」 */

/* ============ 4 · 行情速览页（?page=quotes；页头 + Tab 固定、只有表区滚动——v14 §10 .mp / .mp-body 骨架本就如此） ============
   表不进容器，直接铺在 --page 底色上（二轮用户拍板）；表头 34 高 11.5 / 600 ink-3；行 44 高 13.5，单元 padding 0 10，首尾列贴边；
   名称 13.5 / 700 + 代码 11 / 600 ink-3 换行；最新 13.5 / 800；五个百分比列 13.5 / 700。组标题（指数 Tab）绿竖条 3×14 + 14 / 800 */
.qt-tabs .qt-edit {
  margin-left: auto; flex: none; height: 30px; padding: 0 12px; border-radius: var(--r-pill);
  border: 1px solid var(--line); background: var(--card); font-size: 12px; font-weight: 700; color: var(--ink-2);
  display: inline-flex; align-items: center; gap: 6px; transition: border-color var(--t-fast), color var(--t-fast);
}
.qt-tabs .qt-edit:hover { border-color: var(--line-hover); color: var(--ink); }
.qt-grp { display: flex; align-items: center; gap: 8px; margin: 26px 0 6px; font-size: 14px; font-weight: 800; color: var(--ink); letter-spacing: .01em; }
.qt-grp::before { content: ''; flex: none; width: 3px; height: 14px; border-radius: 2px; background: var(--green); }
.qt-grp:first-child { margin-top: 4px; }
/* 固定列宽：名称 200 / 最新 116 / 五个百分比列均分余量（900 版心时各 117），指数三组上下对齐；
   表最小宽 760（百分比列内容区 ≥ 68，三位数涨跌幅「+245.67%」13.5 号约 65 也不截），视口窄于版心时在 .qt-scroll 里横滑 */
.qt-scroll { overflow-x: auto; scrollbar-width: none; }
.qt-scroll::-webkit-scrollbar { display: none; }
.qt-tbl { width: 100%; min-width: 760px; border-collapse: collapse; table-layout: fixed; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.qt-tbl .qc-nm { width: 200px; }
.qt-tbl .qc-px { width: 116px; }
.qt-tbl th { height: 34px; padding: 0 10px; text-align: right; font-size: 11.5px; font-weight: 600; color: var(--ink-3); border-bottom: 1px solid var(--line); white-space: nowrap; overflow: hidden; }
.qt-tbl td { height: 44px; padding: 0 10px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qt-tbl th:first-child, .qt-tbl td:first-child { text-align: left; padding-left: 0; }
.qt-tbl th:last-child, .qt-tbl td:last-child { padding-right: 0; }
.qt-tbl .qt-nm { font-weight: 700; color: var(--ink); }
.qt-tbl .qt-nm-t { display: block; overflow: hidden; text-overflow: ellipsis; }
.qt-tbl .qt-nm small { display: block; font-size: 11px; font-weight: 600; color: var(--ink-3); letter-spacing: .02em; text-transform: uppercase; }   /* 站内稳定码（spx / us10y…）按行情代码习惯大写显示 */
.qt-tbl .qt-px { font-weight: 800; color: var(--ink); }
.qt-tbl .qt-pc { font-weight: 700; }
.qt-swipe { display: none; }   /* 「左右滑动看 1M / YTD / 1Y 列」只在 ≤720 显示（mobile.css） */

/* ============ 5 · 编辑速览弹窗（登录；760 宽、最高 82% 视口、圆角 18；体 = 标的池 1fr + 已选 300） ============
   勾选即入已选末尾；已选行 34 高（序号 + 短名 + ↑ ↓ ✕），前 7 项绿描边 = 进首页卡；空列表保存钮禁用；失败内联报错、保留选择。≤720 全屏页 */
.qe-dim { position: fixed; inset: 0; z-index: 130; background: rgba(15, 19, 27, .38); display: grid; place-items: center; padding: 16px; }
.qe-dlg { width: 760px; max-width: 100%; max-height: 82vh; background: var(--pop); border-radius: 18px; box-shadow: var(--sh-pop); display: flex; flex-direction: column; overflow: hidden; }
.qe-h { flex: none; display: flex; align-items: center; gap: 10px; padding: 16px 20px 12px; border-bottom: 1px solid var(--line); }
.qe-h-t { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; min-width: 0; }
.qe-h h3 { font-size: 16px; font-weight: 800; color: var(--ink); }
.qe-h small { font-size: 12px; color: var(--ink-3); }
.qe-x { margin-left: auto; flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--soft); color: var(--ink-2); display: grid; place-items: center; }
.qe-x:hover { background: var(--line); color: var(--ink); }
.qe-b { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 300px; }
.qe-pool { min-height: 0; overflow-y: auto; padding: 8px 12px 12px 20px; border-right: 1px solid var(--line); }
.qe-sec h4 { margin: 12px 0 6px; font-size: 12px; font-weight: 800; color: var(--ink-2); letter-spacing: .02em; }
.qe-opt { display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 6px; border-radius: 8px; font-size: 13px; color: var(--ink); cursor: pointer; }
.qe-opt:hover { background: var(--soft); }
.qe-opt input { flex: none; width: 15px; height: 15px; margin: 0; accent-color: var(--green); }
.qe-opt-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qe-opt small { flex: none; font-size: 11px; font-weight: 600; color: var(--ink-3); text-transform: uppercase; }
.qe-opt.is-off { opacity: .45; cursor: not-allowed; }
.qe-sel { display: flex; flex-direction: column; min-height: 0; }
.qe-sel h4 { flex: none; padding: 14px 16px 6px; font-size: 12px; font-weight: 800; color: var(--ink-2); }
.qe-list { list-style: none; margin: 0; padding: 0 12px 12px; flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; }
.qe-li { flex: none; display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 6px 0 10px; border-radius: 9px; background: var(--soft); font-size: 13px; font-weight: 700; color: var(--ink); }
.qe-li.is-home { box-shadow: inset 0 0 0 1px rgba(11, 168, 74, .35); }
.qe-i { flex: none; width: 18px; font-size: 11px; font-weight: 600; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.qe-nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qe-mv { margin-left: auto; flex: none; display: inline-flex; gap: 2px; }
.qe-mv button { width: 24px; height: 24px; border-radius: 6px; font-size: 12px; color: var(--ink-3); display: grid; place-items: center; }
.qe-mv button:hover:not(:disabled) { background: var(--card); color: var(--ink); }
.qe-mv button:disabled { opacity: .35; cursor: default; }
.qe-hint { flex: none; padding: 0 16px 10px; font-size: 11px; color: var(--ink-3); }
.qe-err { flex: none; margin: 10px 20px 0; padding: 8px 12px; border-radius: 10px; background: var(--red-soft); color: var(--red); font-size: 12px; }
.qe-f { flex: none; display: flex; align-items: center; gap: 10px; padding: 12px 20px 16px; border-top: 1px solid var(--line); }
.qe-cnt { margin-right: auto; font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.qe-btn { height: 34px; padding: 0 16px; border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--card); font-size: 13px; font-weight: 700; color: var(--ink-2); transition: border-color var(--t-fast), color var(--t-fast), background var(--t-fast); }
.qe-btn:hover:not(:disabled) { border-color: var(--line-hover); color: var(--ink); }
.qe-btn.is-pri { background: var(--green-solid); border-color: transparent; color: #fff; }
.qe-btn.is-pri:hover:not(:disabled) { background: var(--green-solid-h); color: #fff; }
.qe-btn:disabled { opacity: .5; cursor: not-allowed; }
