/* ==========================================================================
   创金A — A股数据工具 · 统一设计体系 v9
   中性冷灰底 / 纯白卡片 / 品牌红 #d6001c / 红涨绿跌 / 全等宽数字
   响应式 1440 / 1180 / 1024 / 900 / 768 / 560 / 420
   令牌结构预留暗色：新增主题只需覆盖本 :root 块，图表主题另行处理
   ========================================================================== */

/* ==========================================================================
   1. 设计令牌
   ========================================================================== */
:root {
  color-scheme: light;

  /* 表面 */
  --bg: #f4f5f7;
  --bg-soft: #eceef1;
  --panel: #ffffff;
  --panel-2: #f8f9fa;
  --panel-3: #eff1f4;

  /* 描边 */
  --border: #e3e6ea;
  --border-strong: #cfd4da;

  /* 文字 */
  --text: #14181f;
  --text-dim: #2f3742;
  --muted: #5c6572;
  --faint: #8b939f;

  /* 品牌色（唯一强调色，金色/蓝色已弃用） */
  --accent: #d6001c;
  --accent-deep: #a80016;
  --accent-2: #8a6a00;
  --accent-dim: color-mix(in srgb, var(--accent) 7%, transparent);
  --blue: #1e5aa8;

  /* A 股语义（与 charts.js 保持一致） */
  --up: #d6001c;
  --up-dim: color-mix(in srgb, var(--up) 9%, transparent);
  --down: #0a7a54;
  --down-dim: color-mix(in srgb, var(--down) 10%, transparent);
  --flat: #64748b;
  --warn: #b47d00;
  --warn-dim: color-mix(in srgb, var(--warn) 12%, transparent);
  --danger: #c81e2e;

  /* 几何 */
  --radius: 10px;
  --radius-sm: 8px;
  --radius-lg: 14px;

  /* 阴影（更扁平，数据界面不抢注意力） */
  --shadow-sm: 0 1px 2px rgba(18, 24, 33, 0.05);
  --shadow-md: 0 2px 6px rgba(18, 24, 33, 0.06), 0 8px 20px rgba(18, 24, 33, 0.06);
  --shadow-lg: 0 8px 20px rgba(18, 24, 33, 0.08), 0 20px 48px rgba(18, 24, 33, 0.12);

  /* 控件 */
  --ctrl-h: 34px;
  --ctrl-h-sm: 28px;
  --ctrl-h-lg: 42px;

  --font-sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-mono: "SF Mono", "JetBrains Mono", "Roboto Mono", ui-monospace, Menlo,
    Consolas, "Liberation Mono", monospace;

  --topbar-h: 56px;
  --sidebar-w: 220px;
}

/* ==========================================================================
   2. Reset / 基础
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  scrollbar-color: var(--border-strong) var(--bg-soft);
}
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 1.55;
  background-color: var(--bg);
  background-image: radial-gradient(880px 300px at 82% -8%, color-mix(in srgb, var(--accent) 4.5%, transparent), transparent 68%);
  background-repeat: no-repeat;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, p {
  margin: 0;
}
a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  color: var(--accent-deep);
}
button {
  font-family: inherit;
  color: inherit;
}
input, select, textarea {
  font-family: inherit;
}
canvas {
  display: block;
}
:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 65%, transparent);
  outline-offset: 2px;
  border-radius: 4px;
}
::selection {
  background: color-mix(in srgb, var(--accent) 16%, transparent);
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* 滚动条 */
::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 6px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover {
  background: #a9bad2;
  background-clip: padding-box;
  border: 2px solid transparent;
}

/* ==========================================================================
   3. 工具类
   ========================================================================== */
.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.muted { color: var(--muted); }
.dim { color: var(--text-dim); }
.up, .tone-up { color: var(--up) !important; }
.down, .tone-down { color: var(--down) !important; }
.flat, .tone-flat { color: var(--flat) !important; }
.warn-text { color: var(--warn) !important; }
.nowrap { white-space: nowrap; }
/* .hide-sm：v7 审计勘误——第 33 节响应式段（≤860px）已有生效规则，
   原第 171 行的 `.hide-sm {}` 空壳已删除；两档裁剪为 .hide-sm ≤860 / .hide-md ≤1180 */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.dot-sep { margin: 0 4px; opacity: 0.6; }
[hidden] { display: none !important; }

/* ==========================================================================
   4. 布局骨架
   ========================================================================== */
.app {
  flex: 1;
  width: 100%;
  max-width: 1460px;
  margin: 0 auto;
  padding: 20px 24px 40px;
}
.page {
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: page-in 0.24s ease;
}
@keyframes page-in {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: none; }
}

/* ==========================================================================
   5. 壳层：侧栏（桌面）+ 顶栏
   ========================================================================== */
/* v9：桌面改为「左侧固定导航 + 顶栏工具区」，移动端保留顶栏 + 底部 Tab */

/* ---------- 侧栏 ---------- */
/* v12：浅灰画布 + 白色浮起激活胶囊（Linear 风格）；二级菜单为入口磁贴 */
.sidebar {
  display: none;
}
@media (min-width: 1024px) {
  .sidebar {
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--sidebar-w);
    padding: 16px 12px 14px;
    background: var(--paper);
    border-right: 1px solid var(--border);
    z-index: 65;
  }
  /* 主体让位给侧栏：用 body padding 而非子元素 margin，
     避免与 .app 既有的 `margin: 0 auto` 居中规则冲突导致溢出 */
  body {
    padding-left: var(--sidebar-w);
  }
  .topbar,
  .app,
  .site-footer {
    max-width: none;
  }
  .app {
    padding-left: 22px;
    padding-right: 22px;
  }
  .topbar-inner {
    padding-left: 22px;
    padding-right: 22px;
  }
}
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 8px 16px;
  color: var(--text);
}
.sidebar-brand:hover { color: var(--text); }
.sidebar-brand .brand-mark { width: 40px; height: 40px; }
.sidebar-brand-name { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.sidebar-brand-name strong {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.sidebar-brand-name small {
  font-size: 10px;
  font-weight: 500;
  color: var(--faint);
  letter-spacing: 0.08em;
}
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
/* v11：导航组微标签，建立分区节奏 */
.sidebar-nav::before {
  content: "行情导航";
  padding: 0 11px 7px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--faint);
}
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  height: 40px;
  padding: 0 11px;
  border: 0;
  border-radius: 9px;
  background: none;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  transition: background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}
.sidebar-link svg { flex: 0 0 auto; transition: color 0.16s ease; }
.sidebar-link .sidebar-link-text { flex: 1 1 auto; min-width: 0; }
/* 有二级的一级项：右侧箭头指示可展开，展开后旋转 90° */
.sidebar-link-chev {
  display: inline-flex;
  flex: 0 0 auto;
  color: var(--faint);
  transition: transform 0.18s ease, color 0.16s ease;
}
.sidebar-link.open .sidebar-link-chev { transform: rotate(90deg); color: var(--text-dim); }
.sidebar-link:hover { background: var(--panel-3); color: var(--text); }
/* v12：激活态为白色浮起胶囊（替代红底 + 贴边条），品牌红只落在图标上 */
.sidebar-link.active {
  background: var(--panel);
  color: var(--text);
  font-weight: 600;
  box-shadow: inset 0 0 0 1px var(--border), var(--shadow-sm);
}
/* 只染主图标，避免展开箭头也被染红 */
.sidebar-link.active > svg { color: var(--accent); }
/* v13：二级菜单 = 手风琴列表（图标行式，PC 端；移动端抽屉保持方形入口磁贴） */
.sidebar-entries {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin: 4px 0 10px 16px;
  animation: nav-sub-in 0.2s ease;
}
@keyframes nav-sub-in {
  from { opacity: 0; transform: translateY(-3px); }
  to { opacity: 1; transform: none; }
}
.sidebar-entry {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 32px;
  padding: 0 10px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 500;
  transition: background 0.15s ease, color 0.15s ease;
}
.sidebar-entry svg { color: var(--faint); transition: color 0.15s ease; flex: 0 0 auto; }
.sidebar-entry:hover { background: var(--panel-3); color: var(--text); }
.sidebar-entry:hover svg { color: var(--text-dim); }
.sidebar-entry.active {
  background: var(--up-dim);
  color: var(--accent);
  font-weight: 600;
}
.sidebar-entry.active svg { color: var(--accent); }
.sidebar-foot {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
/* 侧栏底部订阅状态卡（v12：灰底画布上的白卡，悬停/按压微动效） */
.sub-card {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel);
  padding: 12px 13px;
}
.sub-card.expired {
  border-color: color-mix(in srgb, var(--danger) 30%, transparent);
  background: linear-gradient(165deg, color-mix(in srgb, var(--danger) 7%, transparent) 0%, color-mix(in srgb, var(--danger) 2%, transparent) 100%), var(--panel);
}
.sub-card.pro {
  border-color: color-mix(in srgb, var(--accent) 22%, transparent);
  background: linear-gradient(165deg, color-mix(in srgb, var(--accent) 7%, transparent) 0%, color-mix(in srgb, var(--accent) 2%, transparent) 100%), var(--panel);
}
.sub-card-title {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}
.sub-card-title svg { color: var(--accent); flex: 0 0 auto; }
.sub-card.expired .sub-card-title { color: var(--danger); }
.sub-card.expired .sub-card-title svg { color: var(--danger); }
.sub-card-note {
  margin-top: 2px;
  font-size: 10.5px;
  color: var(--muted);
  line-height: 1.45;
}
.sub-card-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 30px;
  margin-top: 10px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--panel);
  font-size: 12px;
  font-weight: 600;
  transition: background 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}
.sub-card-cta:hover {
  color: var(--panel);
  background: var(--accent-deep);
  transform: translateY(-1px);
  box-shadow: 0 3px 10px color-mix(in srgb, var(--accent) 24%, transparent);
}
.sub-card-cta:active { transform: translateY(0); box-shadow: none; }
.sub-card-cta.ghost {
  background: var(--panel);
  border: 1px solid var(--border);
  color: var(--text-dim);
}
.sub-card-cta.ghost:hover { background: var(--panel-3); color: var(--text); }

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  background: color-mix(in srgb, var(--panel) 86%, transparent);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(14px) saturate(1.3);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
}
.topbar-inner {
  max-width: 1240px;
  margin: 0 auto;
  min-height: var(--topbar-h);
  padding: 0 22px;
  display: flex;
  align-items: center;
  gap: 12px;
}
/* 移动端品牌（桌面由侧栏承担） */
.brand { display: flex; align-items: center; gap: 9px; color: var(--text); flex: 0 0 auto; }
.brand:hover { color: var(--text); }
.brand-mark { width: 40px; height: 40px; display: grid; place-items: center; }
.brand-mark img { width: 100%; height: 100%; object-fit: contain; display: block; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand-text strong { font-size: 14.5px; font-weight: 700; letter-spacing: 0.02em; white-space: nowrap; }
.brand-text em { display: none; }
@media (min-width: 1024px) {
  .brand { display: none; }
}

.topbar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}
.topbar-avatar {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--panel-3);
  color: var(--text-dim);
  font-size: 12px;
  font-weight: 700;
  transition: color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}
.topbar-avatar:hover {
  color: var(--text);
  background: var(--panel-2);
  box-shadow: inset 0 0 0 1px var(--border-strong);
}
/* v11：顶栏全局搜索胶囊 —— 桌面带占位文案与 `/` 快捷键提示，≤1023px 收窄为图标 */
.topbar-search-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: 236px;
  height: 32px;
  padding: 0 8px 0 11px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--panel-2);
  color: var(--faint);
  font-size: 12.5px;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}
.topbar-search-pill svg { color: var(--muted); flex: 0 0 auto; }
.topbar-search-pill:hover {
  background: var(--panel);
  border-color: var(--border-strong);
  color: var(--muted);
  box-shadow: var(--shadow-sm);
}
.topbar-search-text {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
}
.topbar-search-kbd {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--panel);
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 10.5px;
}
@media (max-width: 1023px) {
  .topbar-search-pill { width: 32px; padding: 0; justify-content: center; gap: 0; border-radius: 8px; }
  .topbar-search-text,
  .topbar-search-kbd { display: none; }
}

/* ---------- 状态胶囊 ---------- */
.status-capsule {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 10px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  font-family: var(--font-mono);
  white-space: nowrap;
  transition: border-color 0.15s, color 0.15s;
}
.status-capsule:hover { border-color: var(--border-strong); color: var(--text); }
.status-capsule .dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  flex: 0 0 auto;
}
.status-capsule.active { color: var(--text-dim); }
.status-capsule.active .dot { background: var(--accent); }
.status-capsule.expired {
  color: var(--danger);
  border-color: color-mix(in srgb, var(--danger) 32%, transparent);
  background: color-mix(in srgb, var(--danger) 7%, transparent);
  font-weight: 600;
}
.status-capsule.login {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--panel);
  font-family: var(--font-sans);
  font-weight: 600;
  padding: 0 12px;
}
.status-capsule.login:hover { background: var(--accent-deep); border-color: var(--accent-deep); color: var(--panel); }
@media (max-width: 420px) {
  .status-capsule { padding: 0 8px; font-size: 10.5px; }
}

/* 兼容旧类名（部分页面仍生成 status-badge） */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 14px;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 11px;
  font-family: var(--font-mono);
  white-space: nowrap;
  background: var(--panel);
}
.status-badge.warn { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 28%, transparent); background: var(--up-dim); }
.status-badge.ok { color: var(--text-dim); }
.status-badge.danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 32%, transparent); background: color-mix(in srgb, var(--danger) 7%, transparent); }

/* 账户按钮 */
.account-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 30px;
  padding: 0 10px 0 5px;
  border: 1px solid var(--border);
  border-radius: 16px;
  color: var(--text-dim);
  font-size: 12px;
  background: var(--panel);
  transition: border-color 0.15s;
}
.account-btn:hover { color: var(--text); border-color: var(--border-strong); }
.avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--panel-3);
  color: var(--text-dim);
}
.account-name { max-width: 88px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.btn-sm-login { height: 30px; padding: 0 13px; font-size: 12.5px; gap: 6px; }

/* ==========================================================================
   7. 移动端 / 平板底部导航（v10：断点放宽到 1023px，与侧栏 ≥1024px 无缝衔接，
      修复 769–1023px 区间无任何一级导航的缺口）
   ========================================================================== */
.bottom-nav { display: none; }
@media (max-width: 1023px) {
  .nav-links { display: none; }
  .account-name { display: none; }
  .topbar-right { gap: 7px; }
  .topbar-inner { padding: 9px 14px; min-height: 54px; flex-wrap: wrap; row-gap: 6px; }
  .status-badge { padding: 3px 8px; font-size: 10px; }
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  .bottom-nav {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 70;
    background: color-mix(in srgb, var(--panel) 92%, transparent);
    border-top: 1px solid var(--border);
    backdrop-filter: blur(18px) saturate(1.4);
    -webkit-backdrop-filter: blur(18px) saturate(1.4);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .bottom-nav-item {
    flex: 1;
    height: 56px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    /* 一级项可能是 button（有二级，点击只展开面板）或 a（无二级，直接跳转） */
    padding: 0;
    border: 0;
    background: none;
    font-family: inherit;
    color: var(--muted);
    font-size: 10.5px;
    position: relative;
    -webkit-tap-highlight-color: transparent;
    transition: color 0.16s ease;
  }
  /* v11：激活态改为图标胶囊高亮（替代顶部横条），带按压反馈 */
  .bn-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 25px;
    border-radius: 13px;
    transition: background 0.18s ease, transform 0.15s ease;
  }
  .bottom-nav-item:active .bn-icon { transform: scale(0.9); }
  .bottom-nav-item.active { color: var(--accent); }
  .bottom-nav-item.active .bn-icon { background: var(--up-dim); }
  .bottom-nav-item.active > span:last-child { font-weight: 600; }
  .site-footer { padding-bottom: 76px; }
}

/* v11：二级入口面板 —— 圆角抽屉样式，从底部导航上方滑出，选中二级后收起；
   隐藏态用 transform + visibility 收起（不占布局、不拦截点击），
   桌面（≥1024px）由侧栏手风琴承担，面板整体隐藏 */
.bottom-subnav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(56px + env(safe-area-inset-bottom));
  z-index: 69;
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  padding: 18px 16px 13px;
  background: color-mix(in srgb, var(--panel) 97%, transparent);
  border-radius: 18px 18px 0 0;
  box-shadow: 0 -10px 32px rgba(18, 24, 33, 0.12);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  transform: translateY(110%);
  visibility: hidden;
  opacity: 0;
  transition: transform 0.24s cubic-bezier(0.32, 0.72, 0, 1), opacity 0.2s ease, visibility 0.24s;
}
/* 顶部拖拽条装饰 */
.bottom-subnav::before {
  content: "";
  position: absolute;
  top: 7px;
  left: 50%;
  transform: translateX(-50%);
  width: 34px;
  height: 4px;
  border-radius: 2px;
  background: var(--border-strong);
  opacity: 0.65;
}
.bottom-subnav.open {
  transform: translateY(0);
  visibility: visible;
  opacity: 1;
}
@media (min-width: 1024px) {
  .bottom-subnav { display: none !important; }
}
.bottom-subnav-label {
  flex-basis: 100%;
  margin-bottom: 1px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--faint);
}
.bottom-subnav-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.15s ease;
}
.bottom-subnav-item svg { color: var(--faint); transition: color 0.16s ease; }
.bottom-subnav-item:active { transform: scale(0.97); }
.bottom-subnav-item.active {
  border-color: color-mix(in srgb, var(--accent) 35%, transparent);
  background: var(--up-dim);
  color: var(--accent);
  font-weight: 600;
}
.bottom-subnav-item.active svg { color: var(--accent); }
@media (prefers-reduced-motion: reduce) {
  .bottom-subnav { transition: none; }
}

/* ==========================================================================
   8. 页头
   ========================================================================== */
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.page-head-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.page-head h1 {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: 0.01em;
  display: flex;
  align-items: center;
  gap: 8px;
}
/* v9：标题前的品牌条统一挂在 .page-title-row 上（h1 自身不再重复） */
.page-title-row::before {
  content: "";
  width: 3px;
  height: 19px;
  border-radius: 2px;
  background: var(--accent);
  flex: 0 0 auto;
}
/* 富节点标题自身不再重复品牌条 */
.page-title-row:has(.page-title-node)::before { display: none; }
.page-title-node { font-size: 20px; align-items: center; }
.page-title-row { display: flex; align-items: center; gap: 8px; }
.page-eyebrow {
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
  font-weight: 600;
}
.page-sub {
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.live-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--down);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--down) 14%, transparent);
  animation: pulse 2.4s ease infinite;
}
.meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.5px 7px;
  line-height: 1.6;
  background: var(--panel);
}
.meta-chip.cached,
.meta-chip.warn {
  color: var(--warn);
  border-color: color-mix(in srgb, var(--warn) 32%, transparent);
  background: var(--warn-dim);
}

/* ==========================================================================
   9. 面板
   ========================================================================== */
.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-width: 0;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.18s ease;
}
.panel:hover { box-shadow: var(--shadow-md); }
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--panel-2);
  border-radius: var(--radius) var(--radius) 0 0;
}
.panel-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 650;
  color: var(--text);
}
.panel-title::before {
  content: "";
  width: 3px;
  height: 13px;
  border-radius: 2px;
  background: var(--accent);
  flex: 0 0 auto;
}
.panel-title small {
  font-weight: 400;
  font-size: 11px;
  color: var(--muted);
}
.panel-body {
  padding: 14px 16px;
}
.panel-body.flush { padding: 0; }
.panel-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-wrap: wrap;
}
.panel-subhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 12px 0 8px;
  font-size: 12px;
  color: var(--text-dim);
  flex-wrap: wrap;
}
.section-head { flex-wrap: wrap; }

/* ==========================================================================
   10. 按钮
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: var(--ctrl-h);
  padding: 0 14px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-dim);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s, background 0.15s, box-shadow 0.15s, transform 0.06s;
}
.btn:hover {
  color: var(--text);
  border-color: var(--border-strong);
  background: var(--panel-2);
}
.btn:active { transform: translateY(1px); }
.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}
.btn.primary {
  color: var(--panel);
  background: linear-gradient(135deg, #e8362c, #d6001c 55%, #b40018);
  border-color: transparent;
  font-weight: 600;
  box-shadow: 0 3px 10px color-mix(in srgb, var(--accent) 28%, transparent), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}
.btn.primary:hover {
  color: var(--panel);
  background: linear-gradient(135deg, #f04438, #e01a30 55%, #c0001a);
  box-shadow: 0 4px 14px color-mix(in srgb, var(--accent) 36%, transparent), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}
.btn.ghost {
  background: var(--panel);
  border-color: var(--border);
  color: var(--text-dim);
}
.btn.ghost:hover {
  background: var(--panel-2);
  border-color: var(--border-strong);
}
.btn.danger {
  color: var(--danger);
  border-color: color-mix(in srgb, var(--danger) 32%, transparent);
  background: color-mix(in srgb, var(--danger) 5%, transparent);
}
.btn.danger:hover {
  color: var(--panel);
  background: var(--danger);
  border-color: var(--danger);
}
.btn.sm {
  height: var(--ctrl-h-sm);
  padding: 0 10px;
  font-size: 12px;
  border-radius: 7px;
}
.btn.block, .btn-block { width: 100%; }
.btn.lg, .btn-lg { height: var(--ctrl-h-lg); font-size: 14px; border-radius: 10px; }
.btn-icon { width: 13px; height: 13px; }

/* ==========================================================================
   11. 表单
   ========================================================================== */
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-label { font-size: 12px; font-weight: 500; color: var(--text-dim); }
.form-hint { font-size: 11px; color: var(--faint); line-height: 1.6; }
.form-input {
  width: 100%;
  height: 42px;
  padding: 0 13px;
  background: var(--panel);
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  color: var(--text);
  font-size: 14px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.form-input::placeholder { color: var(--faint); opacity: 1; }
.form-input:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
  box-shadow: 0 0 0 3.5px color-mix(in srgb, var(--accent) 10%, transparent);
}
.form-error {
  display: block;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--danger) 7%, transparent);
  border: 1px solid color-mix(in srgb, var(--danger) 30%, transparent);
  color: var(--danger);
  font-size: 12px;
}
.form-note { font-size: 11px; color: var(--faint); line-height: 1.7; }
.form-select {
  height: var(--ctrl-h);
  padding: 0 30px 0 10px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 12px;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 14px) 14px, calc(100% - 9px) 14px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  cursor: pointer;
  transition: border-color 0.15s;
}
.form-select:hover { border-color: var(--border-strong); }
.form-select:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 8%, transparent);
}

/* ==========================================================================
   12. 搜索
   ========================================================================== */
.searchbox {
  position: relative;
  flex: 1 1 auto;
  max-width: 520px;
  margin: 0 auto;
}
.searchbox svg.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  color: var(--faint);
  pointer-events: none;
}
.searchbox input {
  width: 100%;
  height: 38px;
  padding: 0 44px 0 36px;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 13px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.searchbox input::placeholder { color: var(--faint); }
.searchbox input:focus {
  border-color: color-mix(in srgb, var(--accent) 50%, transparent);
  box-shadow: 0 0 0 3.5px color-mix(in srgb, var(--accent) 9%, transparent);
  outline: none;
}
.searchbox input::-webkit-search-cancel-button {
  -webkit-appearance: none;
}
.searchbox kbd {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--faint);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 1px 6px;
  background: var(--panel-2);
  pointer-events: none;
}
.search-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 80;
  max-height: 360px;
  overflow: auto;
  padding: 6px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
}
.search-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  text-align: left;
}
.search-item:hover,
.search-item.active {
  background: var(--accent-dim);
}
.search-item .si-code {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  min-width: 58px;
}
.search-item .si-name {
  font-size: 13px;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.search-item .si-board {
  font-size: 10px;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 0 6px;
  background: var(--panel-2);
  white-space: nowrap;
}
.search-note {
  padding: 10px 12px;
  font-size: 12px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 10px;
}
.search-note.error { color: var(--danger); }

/* ==========================================================================
   13. Tabs
   ========================================================================== */
.tabs {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  background: var(--panel-3);
  border: 1px solid var(--border);
  border-radius: 10px;
  max-width: 100%;
}
.tab {
  border: 0;
  background: transparent;
  color: var(--text-dim);
  font-size: 12.5px;
  font-weight: 500;
  padding: 5px 13px;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.13s, background 0.13s, box-shadow 0.13s;
}
.tab:hover { color: var(--text); }
.tab.active {
  color: var(--accent-deep);
  background: var(--panel);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(16, 28, 48, 0.1), inset 0 0 0 1px color-mix(in srgb, var(--accent) 24%, transparent);
}
.tabs.sm .tab { font-size: 11.5px; padding: 4px 10px; }
.tab-badge {
  font-style: normal;
  font-size: 10px;
  padding: 0 5px;
  margin-left: 4px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--panel);
  font-family: var(--font-mono);
}
.tabs.plain {
  background: transparent;
  border: 0;
  padding: 0;
  gap: 16px;
}
.tabs.plain .tab {
  padding: 3px 1px;
  border-radius: 0;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  box-shadow: none;
}
.tabs.plain .tab.active {
  color: var(--accent);
  background: transparent;
  box-shadow: none;
  border-bottom-color: var(--accent);
}
.link-tabs {
  display: inline-flex;
  background: var(--panel-3);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 3px;
  gap: 2px;
  overflow-x: auto;
  max-width: 100%;
}
.link-tabs .tab { text-decoration: none; }
.link-tabs .tab.active {
  color: var(--accent-deep);
  background: var(--panel);
  box-shadow: 0 1px 3px rgba(16, 28, 48, 0.1), inset 0 0 0 1px color-mix(in srgb, var(--accent) 24%, transparent);
}
.subnav {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border);
  padding-bottom: 9px;
}
.subnav-link {
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 500;
  border: 1px solid transparent;
  transition: color 0.14s, background 0.14s;
}
.subnav-link:hover { color: var(--accent-deep); background: var(--accent-dim); }
.subnav-link.active {
  color: var(--accent-deep);
  background: var(--accent-dim);
  font-weight: 600;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 20%, transparent);
}

/* ==========================================================================
   14. 数据表格
   ========================================================================== */
.table-wrap {
  width: 100%;
  overflow: auto;
  border-radius: 0 0 var(--radius) var(--radius);
}
.table-scroll { max-height: 420px; overflow: auto; }
.table-wrap.table-sticky thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--panel-2);
  box-shadow: inset 0 -1px 0 var(--border);
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}
.data-table th {
  text-align: right;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.03em;
  color: var(--muted);
  padding: 9px 12px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  background: var(--panel-2);
}
.data-table th:first-child,
.data-table td:first-child { text-align: left; }
.data-table td {
  text-align: right;
  padding: 9px 12px;
  border-bottom: 1px solid var(--hairline);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr.clickable {
  cursor: pointer;
  transition: background 0.12s;
}
.data-table tbody tr.clickable:hover { background: color-mix(in srgb, var(--accent) 4.5%, transparent); }
.data-table tbody tr.clickable:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 50%, transparent);
  outline-offset: -2px;
}
.data-table tbody tr.latest td { background: color-mix(in srgb, var(--accent) 4%, transparent); }
.data-table tbody tr.latest td:first-child { box-shadow: inset 2.5px 0 0 var(--accent); }
.data-table .num {
  font-family: var(--font-mono);
  letter-spacing: -0.01em;
}
.data-table .rank {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--faint);
  width: 34px;
}
.data-table .rank.top {
  color: var(--accent);
  font-weight: 700;
}
.data-table .sym {
  display: flex;
  flex-direction: column;
  gap: 1px;
  text-align: left;
}
.data-table .sym .nm {
  font-size: 12.5px;
  font-weight: 550;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 132px;
}
.data-table .sym a.nm:hover { color: var(--accent); }
.data-table .sym .cd {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--faint);
}
.data-table .pct { font-weight: 650; }
.data-table .strong { font-weight: 600; }
.table-note {
  padding: 8px 14px;
  border-top: 1px solid var(--border);
  font-size: 10.5px;
  color: var(--faint);
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.table-caption {
  padding: 8px 12px;
  font-size: 10.5px;
  color: var(--faint);
}
.order-table { min-width: 640px; }

/* ==========================================================================
   15. 指数卡
   ========================================================================== */
.index-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.index-card {
  --tone: var(--flat);
  position: relative;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 128px;
  padding: 13px 15px 10px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.16s, transform 0.16s, box-shadow 0.16s;
}
.index-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--tone), transparent 82%);
  opacity: 0.9;
}
.index-card::after {
  content: "";
  position: absolute;
  right: -36px;
  top: -50px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--tone) 7%, transparent), transparent 66%);
  pointer-events: none;
}
.index-card:hover {
  color: var(--text);
  border-color: color-mix(in srgb, var(--tone) 42%, var(--border));
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.index-card.is-up { --tone: var(--up); }
.index-card.is-down { --tone: var(--down); }
.index-card-top {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}
.index-name {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.index-code {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--faint);
  flex: 0 0 auto;
}
.index-price {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 24px;
  font-weight: 650;
  line-height: 1.15;
  color: var(--tone);
  letter-spacing: -0.02em;
}
.index-change {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 11.5px;
  color: var(--tone);
}
.index-change .pct {
  padding: 0.5px 5px;
  border-radius: 4px;
  background: color-mix(in srgb, var(--tone) 10%, transparent);
  font-weight: 600;
}
.mini-chart {
  width: 100%;
  height: 30px;
  margin-top: auto;
  opacity: 0.95;
}
/* 指数卡日内振幅条 */
.mini-amp {
  width: 100%;
  height: 24px;
  margin-top: auto;
  display: block;
}
.index-skeleton { min-height: 128px; }

/* ==========================================================================
   16. 首页中段
   ========================================================================== */
.home-mid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: 14px;
}
.home-tables {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.home-flows {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.home-tab-content, .stock-tab-content, .fundflow-content, .sectors-content,
.sector-detail-content, .account-page, .fundflow-page, .sectors-page,
.sector-detail-page, .stock-page {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}
.index-select-tabs { max-width: 100%; }

/* ==========================================================================
   17. 市场宽度
   ========================================================================== */
.breadth-bar {
  display: flex;
  height: 10px;
  border-radius: 6px;
  overflow: hidden;
  background: var(--panel-3);
  gap: 2px;
}
.breadth-bar .seg {
  height: 100%;
  transition: width 0.5s ease;
  min-width: 0;
}
.breadth-bar .seg-up { background: linear-gradient(180deg, #e8362c, var(--up)); }
.breadth-bar .seg-flat { background: var(--faint); }
.breadth-bar .seg-down { background: linear-gradient(180deg, #0e9068, var(--down)); }
.breadth-legend {
  display: flex;
  gap: 16px;
  margin-top: 9px;
  font-size: 11px;
  color: var(--muted);
  flex-wrap: wrap;
}
.breadth-legend i {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 2.5px;
  margin-right: 5px;
}

/* ==========================================================================
   18. KPI 卡 / 指标卡（含资金流）
   ========================================================================== */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}
/* v9：统计条变体——四项连成一条，共享边框，视觉更整体 */
.stat-grid.strip {
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.stat-grid.strip .stat-card {
  border: 0;
  border-radius: 0;
  border-right: 1px solid var(--border);
  box-shadow: none;
  padding: 11px 15px;
}
.stat-grid.strip .stat-card:last-child { border-right: 0; }
/* 统计带内不再画单卡色条（色条会让连续带出现割裂竖线），数值本身已带涨跌色 */
.stat-grid.strip .stat-card::before { display: none; }
@media (max-width: 640px) {
  .stat-grid.strip { grid-template-columns: 1fr 1fr; }
  .stat-grid.strip .stat-card:nth-child(2n) { border-right: 0; }
  .stat-grid.strip .stat-card:nth-child(-n + 2) { border-bottom: 1px solid var(--border); }
}
.stat-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.stat-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--border-strong);
}
.stat-card:has(.stat-value.up)::before { background: var(--up); }
.stat-card:has(.stat-value.down)::before { background: var(--down); }
.stat-card.compact { padding: 9px 12px; }
.stat-label { font-size: 10.5px; color: var(--muted); white-space: nowrap; }
.stat-value {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 20px;
  font-weight: 650;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.stat-card.compact .stat-value { font-size: 16px; }
.stat-sub { font-size: 10.5px; color: var(--faint); }

.flow-cards {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}
.flow-card {
  background: var(--panel);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  padding: 11px 13px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  /* 六卡等高：副文本行数不同（有的有日期、有的只有一行）不再导致参差 */
  min-height: 76px;
  justify-content: flex-start;
}
.flow-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 26px;
  width: 3px;
  border-radius: 0 2px 2px 0;
  background: var(--border-strong);
}
.flow-card:has(.v.up)::before { background: var(--up); }
.flow-card:has(.v.down)::before { background: var(--down); }
.flow-card .k { font-size: 10.5px; color: var(--muted); white-space: nowrap; }
.flow-card .v {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 18px;
  font-weight: 650;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.flow-card .s { font-size: 10px; color: var(--faint); font-family: var(--font-mono); }
.flow-table-wrap { max-height: 460px; }
.flow-note {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 10.5px;
  color: var(--faint);
}
.stock-flow-detail { display: flex; flex-direction: column; gap: 10px; }
.stock-flow-detail .flow-cards { margin-bottom: 4px; }

/* ==========================================================================
   19. 个股页
   ========================================================================== */
.stock-page-head { gap: 10px; }
.stock-head-main {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  flex: 1 1 auto;
}
.breadcrumb { font-size: 12px; color: var(--muted); }
.breadcrumb a {
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.breadcrumb a:hover { color: var(--accent); }
.stock-identity {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.stock-title {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.stock-title h1 { font-size: 24px; font-weight: 700; }
.stock-title .code { font-size: 13px; color: var(--muted); font-family: var(--font-mono); }
.tag {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 8px;
  border-radius: 6px;
  font-size: 10.5px;
  color: var(--text-dim);
  border: 1px solid var(--border);
  background: var(--panel-2);
  white-space: nowrap;
}
.tag.accent {
  color: var(--accent-deep);
  border-color: color-mix(in srgb, var(--accent) 30%, transparent);
  background: var(--accent-dim);
}
.tag.warn {
  color: var(--warn);
  border-color: color-mix(in srgb, var(--warn) 32%, transparent);
  background: var(--warn-dim);
}
.stock-price {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}
.stock-price .price {
  font-size: 40px;
  font-weight: 650;
  line-height: 1;
  letter-spacing: -0.03em;
}
.stock-price .chg { font-size: 15px; font-weight: 600; }
.stock-price .pct {
  font-size: 15px;
  font-weight: 650;
  padding: 2.5px 8px;
  border-radius: 7px;
  background: var(--panel-3);
}
.stock-price.is-up .pct { background: var(--up-dim); }
.stock-price.is-down .pct { background: var(--down-dim); }
.stock-price .tag { align-self: center; }
.stock-head-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}
.stock-updated {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 11px;
  color: var(--muted);
  font-family: var(--font-mono);
}
.stock-updated .meta-chip { font-family: var(--font-sans); }
.quote-grid {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  gap: 1px;
  background: var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}
.quote-cell {
  background: var(--panel);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.quote-cell .k { font-size: 10.5px; color: var(--muted); white-space: nowrap; }
.quote-cell .v {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.stock-selector {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: var(--muted);
  flex-wrap: wrap;
}

/* ==========================================================================
   20. 图表
   ========================================================================== */
.chart-panel .panel-body { padding: 10px 10px 6px; }
.chart-panel-body { padding: 10px 10px 6px; }
.chart-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-left: auto;
}
.chart-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.chart-stage { position: relative; width: 100%; }
.chart { width: 100%; }
.chart-kline { height: 480px; }
/* 切换K线周期/复权时，加载·空态·失败态占住固定高度的图表容器并居中：文档高度不塌，页面不跳位 */
.chart .chart-state { height: 100%; display: grid; place-content: center; }
/* K线底部区间滑块（迷你走势 + 可拖窗口，参考同花顺）。高度固定：禁用时不塌，页面不跳 */
.chart-range {
  position: relative;
  height: 44px;
  margin-top: 6px;
  border: 1px solid var(--hairline, var(--border));
  border-radius: 8px;
  background: var(--panel-2, transparent);
  overflow: hidden;
  touch-action: pan-y; /* 横向手势归滑块，纵向仍交给页面滚动 */
  cursor: pointer;
}
.chart-range:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.chart-range .range-mini { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.chart-range .range-window {
  position: absolute;
  top: 0;
  bottom: 0;
  cursor: grab;
  background: color-mix(in srgb, var(--accent) 9%, transparent);
  border-left: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  border-right: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
}
.chart-range.is-dragging .range-window,
.chart-range .range-window:active { cursor: grabbing; }
.chart-range .range-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 18px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: ew-resize;
  display: grid;
  place-items: center;
}
.chart-range .range-handle::after {
  content: '';
  width: 3px;
  height: 16px;
  border-radius: 2px;
  background: color-mix(in srgb, var(--accent) 70%, var(--text));
}
.chart-range .range-handle.start { left: 0; }
.chart-range .range-handle.end { right: 0; }
.chart-range .range-tip {
  position: absolute;
  top: 1px;
  font-size: 10px;
  line-height: 1.3;
  color: var(--muted);
  pointer-events: none;
}
.chart-range .range-tip.left { left: 22px; }
.chart-range .range-tip.right { right: 22px; }
.chart-range .range-window.is-narrow .range-tip { display: none; }
.chart-range.is-disabled { opacity: 0.45; cursor: default; }
.chart-range.is-disabled .range-handle { display: none; }
.chart-flow { height: 240px; }
/* 板块资金流：双向 TOP20 横向条形（20 行需要更高画布）与多板块对比图 */
.chart-flow-rank { height: 440px; }
.chart-flow-compare { height: 260px; }
.chart-flow-compare-sm { height: 200px; }
.flow-rank-panel .panel-body { padding: 6px 8px 6px; }
/* 双榜「罗列 TOP20」主视图：取消内层滚动限高，20 行完整铺开 */
.flow-rank-list { max-height: none; }
.flow-picker-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
}
.flow-picker-label {
  flex: 0 0 auto;
  font-size: 11.5px;
  color: var(--muted);
  padding-top: 5px;
}
.flow-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}
.flow-pick-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--panel);
  color: var(--text-dim);
  font-size: 11.5px;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.14s, border-color 0.14s, background 0.14s;
}
.flow-pick-chip:hover { border-color: var(--border-strong); background: var(--panel-2); }
.flow-pick-chip.on {
  border-color: color-mix(in srgb, var(--accent) 42%, transparent);
  background: var(--accent-dim);
  color: var(--accent-deep);
  font-weight: 550;
}
.flow-pick-chip.disabled { opacity: 0.42; cursor: not-allowed; }
.flow-pick-chip .mini-flow {
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--muted);
}
.flow-pick-chip.on .mini-flow { color: inherit; }
.flow-pick-clear {
  height: 28px;
  padding: 0 9px;
  border: 1px dashed var(--border-strong);
  border-radius: 999px;
  background: none;
  color: var(--muted);
  font-size: 11px;
  cursor: pointer;
}
.flow-pick-clear:hover { color: var(--text-dim); border-color: var(--muted); }
.intraday-datebar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  flex-wrap: wrap;
}
.intraday-datebar .form-select { flex: 0 0 auto; min-width: 150px; }
.flow-comp-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}
.flow-comp-toggle input { accent-color: var(--accent); }
.rank-inflow { color: var(--up); font-weight: 600; }
.rank-outflow { color: var(--down); font-weight: 600; }
.flow-compare-meta { font-size: 11px; margin-bottom: 8px; }
.flow-hint {
  font-style: normal;
  font-size: 10.5px;
  color: var(--faint);
  margin-left: 8px;
  font-weight: 400;
}
.flow-compare-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
  gap: 14px;
}
.chart-intraday { height: 300px; }
.chart-state {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--panel) 70%, transparent);
  border-radius: 10px;
  z-index: 5;
  backdrop-filter: blur(1.5px);
}
.chart-state[hidden] { display: none; }
.chart-loading[hidden] { display: none; }
.chart-state .state-block { padding: 18px; }
.chart-loading {
  position: absolute;
  top: 10px;
  right: 12px;
  z-index: 6;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 10px;
  border-radius: 7px;
  font-size: 11px;
  color: var(--text-dim);
  background: color-mix(in srgb, var(--panel) 90%, transparent);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.spinner {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--accent) 20%, transparent);
  border-top-color: var(--accent);
  animation: spin 0.7s linear infinite;
  flex: 0 0 auto;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* 分时 */
.intraday-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.intraday-body { padding: 10px 10px 6px; }
.intraday-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 2px 6px 6px;
  flex-wrap: wrap;
}
.intraday-price { font-size: 20px; font-weight: 650; font-family: var(--font-mono); }
.intraday-pct { font-size: 12.5px; font-weight: 600; }
.intraday-change { font-size: 12px; }
.intraday-chart { height: 240px; width: 100%; }
.loading-inline { color: var(--muted); font-size: 12px; }

/* ==========================================================================
   21. Banner / 提示
   ========================================================================== */
.banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 12.5px;
  line-height: 1.5;
  flex-wrap: wrap;
}
.banner.warn {
  color: var(--warn);
  background: var(--warn-dim);
  border: 1px solid color-mix(in srgb, var(--warn) 30%, transparent);
}
.banner.error {
  color: var(--danger);
  background: color-mix(in srgb, var(--danger) 6%, transparent);
  border: 1px solid color-mix(in srgb, var(--danger) 30%, transparent);
}
.banner.info {
  color: var(--text-dim);
  background: var(--panel-2);
  border: 1px solid var(--border);
}
.banner .b-text { flex: 1 1 240px; min-width: 0; }
.banner .b-title { font-weight: 650; margin-right: 6px; }
.banner .b-actions {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

/* ==========================================================================
   22. 骨架屏
   ========================================================================== */
.sk {
  position: relative;
  overflow: hidden;
  background: var(--panel-3);
  border-radius: 6px;
}
.sk::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--panel) 65%, transparent), transparent);
  animation: shimmer 1.35s ease infinite;
}
@keyframes shimmer {
  100% { transform: translateX(100%); }
}
.sk-line { height: 12px; margin-bottom: 8px; }
.sk-line:last-child { margin-bottom: 0; }
.sk-line.w40 { width: 40%; }
.sk-line.w60 { width: 60%; }
.sk-line.w80 { width: 80%; }
.sk-line.w100 { width: 100%; }
.sk-card {
  min-height: 128px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--panel);
}
.sk-table { padding: 6px 12px 10px; }
.sk-row {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid var(--hairline);
}
.sk-row:last-child { border-bottom: 0; }
.sk-row .sk { flex: 1; height: 12px; }
.sk-row .sk.short { flex: 0 0 56px; }
.sk-chart {
  height: 100%;
  width: 100%;
  border-radius: 10px;
}
.sk-combo { display: grid; gap: 10px; width: 100%; }

/* ==========================================================================
   23. 空态 / 错误态
   ========================================================================== */
.state-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 36px 16px;
  text-align: center;
  color: var(--muted);
}
.state-block .state-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  background: var(--panel-2);
  color: var(--muted);
}
.state-block.error .state-icon {
  color: var(--danger);
  border-color: color-mix(in srgb, var(--danger) 28%, transparent);
  background: color-mix(in srgb, var(--danger) 6%, transparent);
}
.state-block .state-title { font-size: 13px; font-weight: 550; color: var(--text-dim); }
.state-block .state-desc {
  font-size: 11.5px;
  color: var(--muted);
  max-width: 380px;
  line-height: 1.65;
}
.state-block .state-code {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--faint);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 1px 6px;
  background: var(--panel-2);
}
.state-block.compact { padding: 20px 12px; }
.error-hint { font-size: 11px; color: var(--faint); }

/* ==========================================================================
   24. Toast
   ========================================================================== */
.toast-root {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  min-width: 220px;
  max-width: 360px;
  padding: 11px 15px;
  border-radius: 10px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  animation: toast-in 0.18s ease;
  display: flex;
  align-items: flex-start;
  gap: 9px;
  overflow: hidden;
  position: relative;
}
.toast::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3.5px;
  background: var(--accent);
}
.toast.success::before { background: var(--down); }
.toast.error::before { background: var(--up); }
.toast.info::before { background: var(--blue); }
.toast.leaving { animation: toast-out 0.18s ease forwards; }
@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to { opacity: 1; transform: none; }
}
@keyframes toast-out {
  to { opacity: 0; transform: translateY(6px) scale(0.98); }
}

/* ==========================================================================
   25. 弹窗
   ========================================================================== */
.modal-open { overflow: hidden; }
.modal-mask {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(16, 28, 48, 0.42);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: mask-in 0.16s ease;
}
@keyframes mask-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
.modal {
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: modal-in 0.18s ease;
}
@keyframes modal-in {
  from { opacity: 0; transform: translateY(10px) scale(0.985); }
  to { opacity: 1; transform: none; }
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--panel-2);
}
.modal-title { font-size: 14px; font-weight: 650; }
.modal-close {
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 5px;
  border-radius: 7px;
  transition: color 0.13s, background 0.13s;
}
.modal-close:hover { color: var(--text); background: var(--panel-3); }
.modal-body { padding: 16px 18px; font-size: 13px; color: var(--text-dim); }
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  padding: 12px 18px 16px;
}

/* 支付弹窗 */
.pay-summary { display: flex; flex-direction: column; gap: 8px; }
.pay-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 5px 0;
}
.pay-total {
  border-top: 1px dashed var(--border);
  padding-top: 10px;
  margin-top: 2px;
  font-size: 14px;
  color: var(--text);
}
.pay-tip {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin-top: 8px;
  padding: 9px 11px;
  border-radius: 8px;
  background: var(--warn-dim);
  border: 1px solid color-mix(in srgb, var(--warn) 26%, transparent);
  color: var(--warn);
  font-size: 11.5px;
  line-height: 1.6;
}
.pay-tip svg { flex: 0 0 auto; margin-top: 1px; }
.pay-error {
  display: none;
  align-items: flex-start;
  gap: 7px;
  margin-top: 8px;
  padding: 9px 11px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 7%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 26%, transparent);
  color: var(--up);
  font-size: 11.5px;
  line-height: 1.6;
}
.pay-error.is-show { display: flex; }
.pay-error::before { content: "⚠"; flex: 0 0 auto; }
.success-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 7px;
  padding: 10px 0;
}
.success-icon {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--down-dim);
  color: var(--down);
  border: 1px solid color-mix(in srgb, var(--down) 30%, transparent);
}
.success-block h3 { font-size: 16px; font-weight: 650; }
.success-block p { font-size: 12px; color: var(--muted); }

/* 提示弹窗（表单校验不通过等需确认的提示，替代右下角 toast） */
.dialog-msg {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 6px 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text);
}
.dialog-msg-icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  margin-top: 1px;
}
.dialog-msg.error .dialog-msg-icon { background: color-mix(in srgb, var(--accent) 9%, transparent); color: var(--up); }
.dialog-msg.info .dialog-msg-icon { background: color-mix(in srgb, var(--blue) 9%, transparent); color: var(--blue); }
.dialog-msg.success .dialog-msg-icon { background: var(--down-dim); color: var(--down); }

/* ==========================================================================
   26. 页脚
   ========================================================================== */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 16px 24px 22px;
  text-align: center;
  font-size: 11px;
  color: var(--faint);
  line-height: 1.7;
  background: var(--panel);
}
.site-footer .foot-sep { margin: 0 6px; opacity: 0.6; }

/* ==========================================================================
   28. 键值对行（账户页订单/事件等只读信息行；v7 清理了本节已无引用的运维组件样式）
   ========================================================================== */
.kv-list { display: flex; flex-direction: column; }
.kv-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 8px 16px;
  border-bottom: 1px solid var(--hairline);
  font-size: 12px;
}
.kv-row:last-child { border-bottom: 0; }
.kv-row .k { color: var(--muted); flex: 0 0 118px; }
.kv-row .v {
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 11.5px;
  word-break: break-all;
  text-align: right;
  flex: 1;
}

/* ==========================================================================
   30. 账户页
   ========================================================================== */
.account-content { display: flex; flex-direction: column; gap: 14px; }
.account-hero {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding: 20px 22px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background:
    linear-gradient(120deg, color-mix(in srgb, var(--accent) 6%, transparent), transparent 46%),
    var(--panel);
  box-shadow: var(--shadow-sm);
}
.account-hero.status-expired {
  background: linear-gradient(120deg, color-mix(in srgb, var(--danger) 7%, transparent), transparent 46%), var(--panel);
}
.account-hero-main { display: flex; gap: 14px; align-items: center; }
.account-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 12%, transparent), color-mix(in srgb, var(--warn) 14%, transparent));
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
}
.account-name-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.account-name-row h2 { font-size: 20px; font-weight: 700; }
.account-meta { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.account-hero-side {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-end;
  text-align: right;
}
.account-status-text { font-family: var(--font-mono); font-size: 15px; font-weight: 600; }
.account-hero-actions { display: flex; gap: 8px; margin-top: 6px; }
.account-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  gap: 14px;
  align-items: start;
}
.card-mini-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}
.card-mini {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--panel-2);
  color: var(--text);
  transition: border-color 0.14s, background 0.14s;
}
.card-mini:hover { border-color: color-mix(in srgb, var(--accent) 30%, transparent); background: var(--panel); }
.card-mini-name { font-size: 12px; font-weight: 550; }
.card-mini-price { font-size: 16px; color: var(--accent-2); font-family: var(--font-mono); font-weight: 650; }
.card-mini-days { font-size: 10px; color: var(--faint); }
.account-kv .kv-row { padding: 8px 0; }
.quick-links { display: flex; flex-direction: column; gap: 2px; }
.quick-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 9px;
  border-radius: 8px;
  color: var(--text-dim);
  font-size: 12.5px;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: background 0.13s, color 0.13s;
}
.quick-link svg:first-child { color: var(--muted); }
.quick-link svg:last-child { margin-left: auto; color: var(--faint); }
.quick-link:hover { background: var(--accent-dim); color: var(--accent-deep); }
.danger-link { color: var(--danger); }
.status-text { font-size: 12px; }
.status-text.ok { color: var(--down); }
.status-text.warn { color: var(--warn); }
.status-text.danger { color: var(--up); }
.page-actions-center { display: flex; justify-content: center; padding: 20px; }

/* ==========================================================================
   31. 订阅页
   ========================================================================== */
.subscription-page { max-width: 1160px; margin: 0 auto; }
.subscription-status { display: flex; flex-direction: column; gap: 10px; }
.subscription-status-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 12px;
}
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 4px;
}
.price-card {
  position: relative;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px 18px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.16s, transform 0.16s, box-shadow 0.16s;
}
.price-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.price-card.featured { border-color: color-mix(in srgb, var(--accent) 32%, transparent); }
.price-card.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--accent) 50%, transparent), var(--shadow-md);
  transform: translateY(-2px);
}
.price-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.price-name { font-size: 16px; font-weight: 700; }
.price-flag {
  font-size: 10px;
  padding: 2.5px 9px;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, #e8362c, #b40018);
  font-weight: 600;
  letter-spacing: 0.04em;
}
.price-line {
  display: flex;
  align-items: baseline;
  gap: 3px;
  color: var(--accent-2);
}
.price-line .currency { font-size: 15px; font-weight: 600; }
.price-value {
  font-size: 38px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
}
.price-unit { font-size: 12px; color: var(--muted); }
.price-sub { font-size: 11px; color: var(--muted); min-height: 16px; }
.price-benefits {
  list-style: none;
  padding: 11px 0 0;
  margin: 0;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.price-benefits li {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 11.5px;
  color: var(--text-dim);
  line-height: 1.55;
}
.price-benefits svg { color: var(--down); flex: 0 0 auto; margin-top: 1.5px; }
.price-check {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: auto;
  padding-top: 10px;
  font-size: 11.5px;
  color: var(--muted);
}
.radio-dot {
  width: 17px;
  height: 17px;
  border-radius: 50%;
  border: 1.5px solid var(--border-strong);
  display: grid;
  place-items: center;
  color: var(--panel);
  transition: border-color 0.14s, background 0.14s;
}
.radio-dot.active {
  background: var(--accent);
  border-color: var(--accent);
}
.purchase-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 15px 18px;
  border-radius: var(--radius);
  border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
  background: linear-gradient(120deg, color-mix(in srgb, var(--accent) 5%, transparent), transparent 55%), var(--panel);
  box-shadow: var(--shadow-sm);
  position: sticky;
  bottom: 12px;
  z-index: 30;
}
.purchase-summary {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}
.purchase-kicker { font-size: 10.5px; color: var(--muted); }
.purchase-card-name { font-size: 14px; font-weight: 600; }
.purchase-price { font-size: 24px; font-weight: 700; color: var(--accent-2); }
/* 支付渠道未接入：替换购买栏的说明态（不展示价格与下单按钮） */
.purchase-unavailable {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px dashed color-mix(in srgb, var(--blue) 35%, transparent);
  background: color-mix(in srgb, var(--blue) 5%, transparent);
  color: var(--text);
}
.purchase-unavailable-title { font-size: 13.5px; font-weight: 600; }
.purchase-unavailable-desc { margin-top: 3px; font-size: 12px; color: var(--muted); line-height: 1.65; }
.subscription-footnote {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  font-size: 11px;
  color: var(--faint);
  line-height: 1.7;
  padding: 4px 2px;
}
.subscription-footnote svg { flex: 0 0 auto; margin-top: 1px; }

/* 卡密兑换（紧凑行内表单） */
.card-key-wrap { margin-top: 2px; }
.card-key-body { display: flex; flex-direction: column; gap: 8px; }
.card-key-row {
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}
.card-key-row .form-field { flex: 1 1 260px; min-width: 240px; }
.card-key-row .form-input { height: var(--ctrl-h); font-size: 13px; }
.card-key-row .form-hint { flex-basis: 100%; }
.card-key-submit { padding-bottom: 1px; }
.card-key-message { min-height: 16px; color: var(--muted); }
.card-key-message.is-error { color: var(--danger); }

/* ==========================================================================
   32. 板块详情
   ========================================================================== */
.sector-detail-page .page-head h1 { font-size: 20px; }
.sector-snapshot { display: flex; flex-direction: column; gap: 14px; }
.sector-snapshot-main {
  display: flex;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
}
.sector-name { font-size: 22px; font-weight: 700; }
.sector-pct { font-family: var(--font-mono); font-size: 22px; font-weight: 650; }
.sector-snapshot-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}
.sector-leader {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.sector-leader .leader-link {
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.leader-link { color: var(--accent); font-weight: 550; }
.leader-link:hover { color: var(--accent-deep); text-decoration: underline; }
.mini-pct { font-family: var(--font-mono); font-size: 11px; }
.kv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}
.kv-cell {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--panel-2);
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.kv-cell .k { font-size: 10.5px; color: var(--muted); }
.kv-cell .v {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 600;
}

/* ==========================================================================
   33. 响应式
   ========================================================================== */
@media (max-width: 1280px) {
  .flow-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1180px) {
  .admin-cols { grid-template-columns: minmax(0, 1fr); }
  .chart-kline { height: 460px; }
  .quote-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
  .intraday-grid { grid-template-columns: 1fr; }
}
@media (max-width: 1024px) {
  .app { padding: 16px 16px 30px; }
  .topbar-inner { padding: 0 16px; }
  .home-mid { grid-template-columns: minmax(0, 1fr); }
  .gauge-wrap { height: 180px; }
  .metrics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .account-grid { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; }
  .price-benefits { display: none; }
}
@media (max-width: 860px) {
  .index-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-tables,
  .home-flows,
  .flow-compare-grid { grid-template-columns: minmax(0, 1fr); }
  .chart-flow-rank { height: 380px; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-card .stat-value { font-size: 17px; }
  .chart-kline { height: 420px; }
  .stock-price .price { font-size: 32px; }
  .hide-sm { display: none !important; }
  .account-hero { flex-direction: column; }
  .account-hero-side { align-items: flex-start; text-align: left; }
  .account-hero-actions { margin-top: 2px; }
  .account-hero-main { align-items: flex-start; }
}
@media (max-width: 768px) {
  :root { --topbar-h: 54px; }
  .searchbox kbd { display: none; }
  /* v7：删除遗留的 `.searchbox { order: 3 }` —— 其原宿主（顶栏内联搜索）已在 v6 移除，
     该规则会把独立搜索页 / 自选页的搜索框在移动端压到内容之后 */
  .searchbox { max-width: none; }
  .site-footer { padding: 14px 16px 20px; }
  .page-head h1 { font-size: 18px; }
  .page-title-row::before { height: 16px; }
  .page-title-node { font-size: 17px; }
  .flow-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .chart-kline { height: 380px; }
  .chart-flow { height: 210px; }
  .chart-flow-rank { height: 360px; }
  .chart-flow-compare { height: 220px; }
  .chart-flow-compare-sm { height: 180px; }
  .flow-picker-head { flex-direction: column; gap: 6px; }
  .flow-picker-label { padding-top: 0; }
  .stock-head-right { align-items: flex-start; }
  .stock-updated { justify-content: flex-start; }
  .breadth-num .n { font-size: 23px; }
  .metric-value { font-size: 21px; }
  .quote-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .table-scroll { max-height: 340px; }
}
@media (max-width: 560px) {
  .app { padding: 12px 12px 26px; }
  .page { gap: 12px; }
  .index-grid { gap: 8px; }
  .index-card { min-height: 104px; padding: 10px 11px 8px; }
  .index-price { font-size: 20px; }
  .index-card-top { gap: 6px; }
  .index-name { font-size: 12px; }
  .home-mid, .home-tables, .home-flows, .admin-cols { gap: 12px; }
  .metrics-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .quote-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .quote-cell .v { font-size: 12.5px; }
  .stock-title h1 { font-size: 20px; }
  .stock-price .price { font-size: 30px; }
  .stock-price .chg, .stock-price .pct { font-size: 13px; }
  .chart-kline { height: 320px; }
  .chart-intraday { height: 250px; }
  .intraday-chart { height: 200px; }
  .panel-head { padding: 10px 12px; }
  .panel-body { padding: 12px; }
  .chart-panel .panel-body, .chart-panel-body { padding: 8px 4px 4px; }
  .flow-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .flow-card .v { font-size: 15.5px; }
  .stat-grid { gap: 8px; }
  .stat-card { padding: 10px 11px; }
  .stat-card .stat-value { font-size: 15px; }
  .data-table th, .data-table td { padding: 8px 9px; font-size: 12px; }
  .data-table .sym .nm { max-width: 96px; }
  .toast-root { left: 12px; right: 12px; bottom: calc(72px + env(safe-area-inset-bottom)); }
  .toast { max-width: none; }
  .banner { padding: 9px 12px; }
  .page-head { align-items: flex-start; }
  .head-actions { width: 100%; }
  .nav-link { font-size: 12px; padding: 6px 9px; }
  .brand-mark { width: 36px; height: 36px; }
  .brand-text strong { font-size: 13px; }
  .brand-text em { display: none; }
  .searchbox input { height: 36px; }
  .pricing-grid { gap: 10px; }
  .price-card { padding: 16px 14px; }
  .price-value { font-size: 32px; }
  .purchase-bar { padding: 12px 14px; bottom: 8px; }
  .purchase-price { font-size: 20px; }
  .card-mini-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .quick-link { padding: 11px 8px; }
  .modal-mask { align-items: flex-end; padding: 0; }
  .modal { border-radius: 16px 16px 0 0; max-width: none !important; border-bottom: 0; }
  .modal-body { max-height: 62vh; overflow: auto; }
  .tabs { max-width: 100%; overflow-x: auto; }
  .link-tabs { display: flex; overflow-x: auto; }
  .rank-note { display: none !important; }
}
@media (max-width: 420px) {
  .index-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .index-price { font-size: 18px; }
  .mini-chart { height: 26px; }
  .quote-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chart-kline { height: 300px; }
  .flow-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tab { padding: 5px 9px; font-size: 12px; }
  .tabs.sm .tab { padding: 4px 7px; }
}

/* ==========================================================================
   v5 市场用户视角改版（2026-11-07）
   新增组件：市场情绪仪表 / 紧凑指数带 / 热点板块 chips / 自选股（行/星标/引导）
   ========================================================================== */

/* ------------------------------ 通用工具 ------------------------------ */
@media (max-width: 1180px) {
  .hide-md { display: none !important; }
}

/* ------------------------------ 自选星标 ------------------------------ */
.star-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
  color: var(--faint);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s, transform 0.1s;
}
.star-btn:hover {
  color: var(--accent-2);
  border-color: color-mix(in srgb, var(--accent-2) 45%, var(--border));
}
.star-btn:active { transform: scale(0.92); }
.star-btn.active {
  color: var(--accent-2);
  border-color: color-mix(in srgb, var(--accent-2) 55%, var(--border));
  background: var(--warn-dim);
}
.star-btn.active svg { fill: currentColor; }
.star-btn.lg { width: 28px; height: 28px; border-radius: 9px; }
.stock-title .star-btn { margin-left: 4px; vertical-align: -3px; }

/* ------------------------------ 市场情绪仪表 ------------------------------ */
.mood-body {
  display: grid;
  grid-template-columns: minmax(0, 248px) minmax(0, 1fr);
  gap: 10px 28px;
  align-items: center;
}
.mood-gauge-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.mood-gauge { width: 232px; height: auto; display: block; }
.mood-needle { stroke: var(--text); stroke-width: 2.4; stroke-linecap: round; }
.mood-hub {
  fill: var(--text);
  stroke: var(--panel);
  stroke-width: 2;
}
/* 分数独立成行，置于仪表开口下方，避免与指针/刻度打架 */
.mood-score-line {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 5px;
  margin-top: -10px;
}
.mood-score {
  font-size: 33px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
}
.mood-score.up { color: var(--up); }
.mood-score.down { color: var(--down); }
.mood-unit { font-size: 11px; color: var(--faint); }
.mood-label {
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: var(--panel-3);
  color: var(--muted);
}
.mood-label.level-frozen,
.mood-label.level-cool {
  background: var(--down-dim);
  color: var(--down);
}
.mood-label.level-warm,
.mood-label.level-hot {
  background: var(--up-dim);
  color: var(--up);
}
.mood-detail {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.mood-conclusion {
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.5;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.mood-conclusion-mark {
  flex: 0 0 auto;
  margin-top: 2px;
  padding: 1px 7px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--panel);
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  letter-spacing: 0.06em;
}
.mood-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.mood-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 11.5px;
}
.mood-chip i {
  font-style: normal;
  color: var(--muted);
}
.mood-chip b {
  font-size: 13.5px;
  font-weight: 650;
  color: var(--text);
}
.mood-chip b.up { color: var(--up); }
.mood-chip b.down { color: var(--down); }

/* ------------------------------ 紧凑指数带 ------------------------------ */
.index-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.strip-card {
  --tone: var(--flat);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  padding: 10px 12px 9px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color 0.16s, box-shadow 0.16s;
}
.strip-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: linear-gradient(90deg, var(--tone), transparent 80%);
  opacity: 0.85;
}
.strip-card:hover {
  border-color: color-mix(in srgb, var(--tone) 40%, var(--border));
  box-shadow: var(--shadow-sm);
}
.strip-card.is-up { --tone: var(--up); }
.strip-card.is-down { --tone: var(--down); }
.strip-card-top {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
}
.strip-name {
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.strip-code {
  font-size: 10px;
  color: var(--faint);
  flex: 0 0 auto;
}
.strip-card-quote {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.strip-price {
  font-size: 17px;
  font-weight: 650;
  color: var(--tone);
  letter-spacing: -0.01em;
}
.strip-change {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  font-size: 11.5px;
  color: var(--tone);
}
.strip-arrow { font-style: normal; font-size: 9px; }
.strip-card .mini-amp { height: 20px; width: 100%; }

/* ------------------------------ 热点板块 chips ------------------------------ */
.hot-panel .panel-body { min-height: 132px; }
.hot-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.hot-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 100%;
  padding: 7px 12px;
  line-height: 1.25;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 12.5px;
  color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.hot-chip:hover {
  color: var(--text);
  border-color: color-mix(in srgb, var(--accent) 40%, var(--border));
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}
.hot-chip-name {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hot-chip-value { font-size: 12.5px; font-weight: 650; }
.hot-chip-value.up { color: var(--up); }
.hot-chip-value.down { color: var(--down); }
.hot-chip-leader {
  display: inline-flex;
  align-items: center;
  gap: 3.5px;
  font-size: 11px;
  max-width: 92px;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--accent);
  white-space: nowrap;
}
.hot-chip-leader::before {
  content: "龙";
  display: inline-grid;
  place-items: center;
  width: 13px;
  height: 13px;
  font-size: 9px;
  line-height: 1;
  border-radius: 3px;
  color: var(--panel);
  background: var(--accent);
  flex: 0 0 auto;
}
.hot-chip-leader:hover { color: var(--accent-deep); }
/* 资金榜 chip：追加相对最强板块的占比条 */
.hot-chip-flow {
  position: relative;
  overflow: hidden;
  /* 底部留出占比条空间（条贴底 4px + 高 2.5px） */
  padding-bottom: 11px;
}
.hot-chip-bar {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 4px;
  height: 2.5px;
  background: var(--panel-3);
  border-radius: 2px;
  overflow: hidden;
}
.hot-chip-bar i {
  display: block;
  height: 100%;
  border-radius: 2px;
}
.hot-chip-bar.up i { background: var(--up); }
.hot-chip-bar.down i { background: var(--down); }
.flow-hot-tabs .tabs { margin: 0; }
.flow-hot-tabs .tab { height: 24px; padding: 0 9px; font-size: 11px; }

/* ------------------------------ 自选股 ------------------------------ */
.watch-add-search { position: relative; margin-bottom: 4px; }
.watchlist-page .searchbox { width: 100%; max-width: 640px; margin: 0; }
/* 顶栏移动端规则（.searchbox order:3）不适用于页内自选搜索 */
@media (max-width: 768px) {
  .watch-add-search { order: 0; flex: 0 0 auto; margin: 0 0 2px; }
}
.watch-search-results { max-height: 320px; overflow: auto; }
.watch-search-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-right: 8px;
}
.watch-search-item .watch-search-main {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.watch-search-item .watch-search-main:hover .si-name { color: var(--accent); }

.watch-rows { display: flex; flex-direction: column; }
.watch-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--panel-3);
  transition: background 0.14s;
}
.watch-row:last-child { border-bottom: 0; }
.watch-row:hover { background: var(--panel-2); }
.watch-row-main {
  flex: 1;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(120px, 1.4fr) 92px 76px minmax(0, 1.6fr);
  grid-template-areas: "name price pct sub";
  gap: 4px 14px;
  align-items: baseline;
  color: inherit;
}
.watch-row-main:hover { color: inherit; }
.watch-row-name {
  grid-area: name;
  display: flex;
  align-items: baseline;
  gap: 7px;
  min-width: 0;
}
.watch-row-name b {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.watch-row-code { font-size: 10.5px; color: var(--faint); flex: 0 0 auto; }
.watch-row-price {
  grid-area: price;
  font-size: 14.5px;
  font-weight: 650;
  text-align: right;
}
.watch-row-price.up { color: var(--up); }
.watch-row-price.down { color: var(--down); }
.watch-row-pct {
  grid-area: pct;
  font-size: 12.5px;
  font-weight: 650;
  text-align: right;
}
.watch-row-pct.up { color: var(--up); }
.watch-row-pct.down { color: var(--down); }
.watch-row-sub {
  grid-area: sub;
  display: flex;
  flex-wrap: wrap;
  gap: 3px 14px;
  font-size: 11px;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
}
.watch-row-sub i { font-style: normal; color: var(--faint); margin-right: 3px; }
.watch-row-actions { flex: 0 0 auto; display: flex; align-items: center; }
.watch-remove-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  /* v7：触控目标 36px（触屏 44px），此前 26px 低于触控底线且易误删 */
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 9px;
  background: none;
  color: var(--faint);
  cursor: pointer;
  transition: color 0.14s, background 0.14s;
}
@media (pointer: coarse) {
  .watch-remove-btn { width: 44px; height: 44px; }
}
.watch-remove-btn:hover {
  color: var(--danger);
  background: color-mix(in srgb, var(--danger) 8%, transparent);
}

/* 首页自选速览空态 */
.watch-quick-empty {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 14px;
}
.watch-quick-copy {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 200px;
}
.watch-quick-copy b { font-size: 13px; }
.watch-quick-copy span { font-size: 11.5px; color: var(--muted); }
.watch-quick-go { margin-left: auto; }

/* 自选页空态引导 */
.watch-empty { margin-top: 4px; }
.watch-empty-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  padding: 42px 20px;
}
.watch-empty-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  color: var(--accent-2);
  background: var(--warn-dim);
}
.watch-empty-icon.sm { width: 36px; height: 36px; border-radius: 11px; }
.watch-empty-body .state-desc { max-width: 420px; }
.watch-hot-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.watch-quick-empty .watch-hot-chips { justify-content: flex-start; }
.watch-hot-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--panel);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-dim);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s, transform 0.12s;
}
.watch-hot-chip .mono { font-size: 10.5px; color: var(--faint); font-weight: 500; }
.watch-hot-chip:hover {
  color: var(--accent-2);
  border-color: color-mix(in srgb, var(--accent-2) 45%, var(--border));
  background: var(--warn-dim);
  transform: translateY(-1px);
}

/* ------------------------------ 响应式 ------------------------------ */
@media (max-width: 1100px) {
  .index-strip { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .mood-body { grid-template-columns: minmax(0, 188px) minmax(0, 1fr); gap: 10px 20px; }
  .mood-gauge { width: 196px; }
  .mood-score-line { margin-top: -4px; }
}
@media (max-width: 860px) {
  .index-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mood-body { grid-template-columns: minmax(0, 1fr); }
  .mood-gauge-wrap { align-self: center; }
  .watch-row-main {
    grid-template-columns: minmax(90px, 1.2fr) 84px 70px;
    grid-template-areas: "name price pct" "sub sub sub";
  }
  .watch-row-sub { margin-top: 1px; }
  .hot-panel .panel-body { min-height: 0; }
}
@media (max-width: 560px) {
  /* 指数带：横向滑动 */
  .index-strip {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 132px;
    grid-template-columns: none;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }
  .strip-card { scroll-snap-align: start; }
  .mood-gauge { width: 172px; }
  .mood-score-line { margin-top: 2px; }
  .mood-score { font-size: 27px; }
  .mood-conclusion { font-size: 13.5px; }
  .watch-quick-empty { flex-direction: column; align-items: flex-start; }
  .watch-quick-go { margin-left: 0; }
  .watch-row { padding: 10px 12px; gap: 8px; }
  .watch-row-name b { max-width: 96px; }
  .watchlist-page .searchbox { max-width: none; }
}

/* ==========================================================================
   v6 Mobile · 移动端企业级体验（2026-11-08）
   设计文档：docs/移动端改版方案-企业级体验.md
   断点约定：≤768 全局重构（安全区/触控/导航/表格降级）、≤560 密度收紧、≤420 极窄兜底。
   桌面（>768）零影响：本段全部位于 max-width 媒体内（除新增组件的桌面默认隐藏）。
   ========================================================================== */

/* --- v6 移除项说明：顶栏搜索入口（桌面内联搜索框 / 移动端图标+全屏搜索层）已按产品决策移除，
       相关 .topbar-search-btn / .search-sheet 样式一并删除；全局搜索暂由自选页「添加自选」搜索承担 --- */

@media (max-width: 768px) {
  /* --- 0. 全局兜底 --- */
  html,
  body {
    overflow-x: clip;
  }
  body {
    font-size: 13px;
    padding-bottom: calc(72px + env(safe-area-inset-bottom));
  }
  img,
  svg,
  video {
    max-width: 100%;
  }
  :root {
    --topbar-h: calc(52px + env(safe-area-inset-top, 0px));
  }

  /* --- 1. 安全区：顶栏 --- */
  .topbar {
    padding-top: env(safe-area-inset-top, 0px);
  }

  /* --- 2. 顶栏单行化 --- */
  .topbar-inner {
    padding: 0 12px;
    gap: 8px;
    min-height: 52px;
  }
  .brand-text em {
    display: none;
  }
  .status-badge {
    max-width: 118px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 11.5px;
    padding: 3px 9px;
  }
  .account-btn {
    padding: 4px;
  }
  .account-btn .account-name {
    display: none;
  }
  .account-btn .avatar {
    width: 32px;
    height: 32px;
  }
  .btn.btn-sm-login {
    min-height: 36px;
    padding: 0 12px;
    font-size: 12.5px;
  }

  /* --- 3. 页头（page-head）：标题+状态+刷新 收敛为两行紧凑 --- */
  .page-head {
    margin: 0 0 10px;
    gap: 8px;
  }
  .page-head-main h1 {
    font-size: 17px;
    line-height: 1.25;
  }
  .page-sub {
    gap: 6px;
    flex-wrap: wrap;
  }
  .page-sub .meta-chip {
    font-size: 11px;
    padding: 3px 8px;
    min-height: 22px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
  }
  .head-actions {
    gap: 8px;
    flex: none;
  }
  .head-actions .btn {
    min-height: 36px;
    min-width: 36px;
    padding: 0 12px;
    font-size: 12.5px;
    gap: 5px;
  }

  /* --- 4. 触控目标（企业级底线 36~44px） --- */
  .btn {
    min-height: 40px;
  }
  .btn.sm {
    min-height: 36px;
    min-width: 36px;
  }
  .tab,
  .tabs .tab {
    min-height: 36px;
    padding: 0 13px;
    font-size: 12.5px;
  }
  .link-tabs a,
  .link-tabs .tab {
    min-height: 36px;
    padding: 0 13px;
    font-size: 12.5px;
  }
  .star-btn {
    width: 32px;
    height: 32px;
  }
  .form-input,
  input[type='text'].form-input,
  input[type='password'].form-input {
    min-height: 44px;
  }
  .searchbox input {
    min-height: 40px;
  }

  /* --- 5. 底部导航：60px + 指示条 + 按压反馈 --- */
  .bottom-nav {
    height: calc(60px + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  .bottom-nav-item {
    height: 60px;
    position: relative;
    -webkit-tap-highlight-color: transparent;
  }
  .bottom-nav-item svg {
    width: 20px;
    height: 20px;
  }
  .bottom-nav-item span {
    font-size: 10.5px;
    font-weight: 500;
  }
  .bottom-nav-item.active span {
    font-weight: 700;
  }
  .bottom-nav-item.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 22px;
    height: 3px;
    border-radius: 0 0 3px 3px;
    background: var(--accent);
  }
  .bottom-nav-item:active {
    background: color-mix(in srgb, var(--accent) 5%, transparent);
  }

  /* --- 6. 宽表格企业级降级：sticky 首列 + 横滑 + 右缘渐隐 --- */
  .table-wrap {
    position: relative;
  }
  .table-wrap::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 20px;
    background: linear-gradient(to left, rgba(37, 56, 88, 0.08), transparent);
    pointer-events: none;
    border-radius: 0 8px 8px 0;
  }
  .table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .table-scroll table {
    min-width: 560px;
  }
  .data-table th,
  .data-table td {
    font-size: 12.5px;
    padding: 9px 10px;
  }
  .data-table th {
    font-size: 11px;
  }
  .data-table th:first-child,
  .data-table td:first-child {
    position: sticky;
    left: 0;
    z-index: 1;
    background: var(--panel);
  }
  .data-table th:first-child {
    background: var(--panel-2);
  }
  @media (hover: none) {
    .data-table tbody tr:hover td {
      background: transparent;
    }
  }

  /* --- 7. 面板与卡片密度 --- */
  .app {
    padding: 12px 12px 16px;
    gap: 12px;
  }
  .panel {
    border-radius: 12px;
  }
  .panel-head {
    padding: 11px 12px;
  }
  .panel-body {
    padding: 12px;
  }
  .panel-title {
    font-size: 14px;
  }
  .panel-title small {
    font-size: 11px;
  }
  .metric-card {
    padding: 10px 12px;
  }
  .metric-label {
    font-size: 11px;
  }
  .metric-value,
  .metric-value.sm {
    font-size: 17px;
  }
  .metric-sub {
    font-size: 10.5px;
  }
  .flow-cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .flow-card {
    padding: 10px 12px;
  }
  .flow-card .k {
    font-size: 11px;
  }
  .flow-card .v {
    font-size: 17px;
  }
  .flow-card .s {
    display: none; /* 面板头已有「截至」，卡内重复副文本隐藏（P11） */
  }
  .quote-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }
  .quote-cell {
    padding: 8px 10px;
  }
  .quote-cell .k {
    font-size: 11px;
  }
  .quote-cell .v {
    font-size: 13.5px;
  }

  /* --- 8. 指数带：滚动可供性 --- */
  .index-strip {
    -webkit-mask-image: linear-gradient(to right, #000 88%, transparent 100%);
    mask-image: linear-gradient(to right, #000 88%, transparent 100%);
  }
  .strip-card {
    min-width: 132px;
    scroll-snap-align: start;
  }
  .strip-name {
    font-size: 12px;
  }

  /* --- 9. 底部 Sheet 升级：把手 + 安全区 + 更高高度 --- */
  .modal {
    max-width: 100%;
    border-radius: 16px 16px 0 0;
    max-height: 86vh;
    position: relative;
  }
  .modal::before {
    content: '';
    position: absolute;
    top: 7px;
    left: 50%;
    transform: translateX(-50%);
    width: 36px;
    height: 4px;
    border-radius: 99px;
    background: var(--border-strong, #c9d2e0);
  }
  .modal-body {
    max-height: 72vh;
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  }
  .modal-actions {
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  }

  /* 登录/注册页：顶栏只保留品牌 */
  body[data-page='login'] .status-badge,
  body[data-page='login'] .topbar-right {
    display: none !important;
  }

  /* --- 11. 订阅：转化按钮置于 TabBar 之上（P13） --- */
  .purchase-bar {
    bottom: calc(64px + env(safe-area-inset-bottom, 0px));
    padding: 12px 14px;
    z-index: 30;
  }
  .price-card {
    padding: 14px;
  }
  .card-mini-list {
    grid-template-columns: repeat(2, 1fr);
  }

  /* --- 12. 自选 --- */
  .watch-add-search input {
    min-height: 44px;
  }
  /* v7：修正 v6 选择器笔误（.watch-remove/.row-remove 从未匹配真实类名） */
  .watch-remove-btn {
    width: 36px;
    height: 36px;
  }
  .watch-hot-chips {
    grid-template-columns: repeat(2, 1fr);
  }
  .watch-hot-chip {
    min-height: 40px;
  }

  /* --- 13. 情绪/杂项 --- */
  .mood-chips {
    flex-wrap: nowrap;
    overflow-x: auto;
  }
  .mood-chip {
    flex: none;
    min-height: 28px;
  }
  .kv-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .quick-links a {
    min-height: 48px;
  }
}

@media (max-width: 560px) {
  /* 密度收紧：小屏进一步压缩 */
  .app {
    padding: 10px 10px 14px;
  }
  .panel-head {
    padding: 10px 11px;
  }
  .panel-body {
    padding: 11px;
  }
  .metric-value,
  .metric-value.sm {
    font-size: 16px;
  }
  .btn {
    min-height: 38px;
  }
  .data-table th,
  .data-table td {
    font-size: 12px;
    padding: 8px 9px;
  }
  .flow-cards,
  .quote-grid {
    gap: 7px;
  }
  .home-tables,
  .home-flows {
    gap: 12px;
  }
  /* toast 避让底部安全区（覆盖 2873 行） */
  .toast-root {
    bottom: calc(66px + env(safe-area-inset-bottom, 0px));
  }
}

@media (max-width: 420px) {
  .strip-card {
    min-width: 124px;
  }
  .quote-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .page-head-main h1 {
    font-size: 16px;
  }
  .status-badge {
    max-width: 96px;
  }
}

/* ==========================================================================
   v7 前台体验改版（2026-11-10）
   新增：独立搜索页 / 密码可见切换 / 卡种加载骨架
   修复：自选删除钮触控目标、v6 选择器笔误、遗留 .searchbox order 3 误伤（见上文对应段）
   ========================================================================== */

/* ------------------------------ 全局搜索页 ------------------------------ */
.search-page { max-width: 860px; }
/* 搜索页内的快捷键提示（原顶栏入口的 kbd 样式，顶栏入口已移除） */
.search-page .kbd-hint {
  font-family: var(--font-mono);
  font-size: 10.5px;
  line-height: 1;
  padding: 3px 6px;
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  border-radius: 5px;
  color: var(--faint);
  background: var(--panel-2);
}
.search-page .search-page-box { width: 100%; max-width: none; margin: 0; }
.search-page .search-page-box input {
  width: 100%;
  height: 48px;
  font-size: 15px;
  border-radius: 12px;
}
.search-page-results { margin-top: 14px; display: grid; gap: 12px; }
.search-idle-panel .panel-body { display: grid; gap: 10px; justify-items: start; }
.search-idle-desc { font-size: 12.5px; color: var(--muted); line-height: 1.7; }
.recent-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 2px; }
.search-result-panel { overflow: hidden; }
.search-result-list { display: flex; flex-direction: column; }
.search-result-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border-bottom: 1px solid var(--border);
  min-height: 48px;
}
.search-result-row:last-child { border-bottom: 0; }
.search-result-row.active { background: var(--panel-2); }
.search-result-main {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex: 1;
  min-width: 0;
  padding: 6px 4px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--text);
}
.search-result-main:hover .si-name { color: var(--accent); }
.search-result-row .si-code {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-dim);
  flex: 0 0 auto;
}
.search-result-row .si-name { font-size: 14px; font-weight: 600; }
.search-result-row .si-board {
  font-size: 11px;
  color: var(--faint);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 1px 8px;
  white-space: nowrap;
}

/* ------------------------------ 密码可见切换 ------------------------------ */
.pwd-wrap { position: relative; display: block; }
.pwd-wrap .form-input { padding-right: 42px; width: 100%; }
.pwd-toggle {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--faint);
  cursor: pointer;
  transition: color 0.14s;
}
.pwd-toggle:hover { color: var(--text); }
.pwd-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

/* ------------------------------ 订阅页卡种骨架 ------------------------------ */
.pricing-loading {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}
.price-card-skeleton { min-height: 300px; }

/* ------------------------------ v7 移动端 ------------------------------ */
@media (max-width: 768px) {
  .search-result-row { padding: 4px 6px; }
  .search-result-row .si-name { font-size: 13.5px; }
  .pwd-toggle { width: 36px; height: 36px; }
}

/* ==========================================================================
   v9 新增组件：市场盯盘台 / 榜单行 / 指数横滑 / 抽屉 / 计划卡 / 下划线 Tab
   ========================================================================== */

/* ---------- 页面标题行（支持 back 面包屑） ---------- */
.page-title-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.page-title-row h1 { min-width: 0; }
.page-back {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--panel);
  color: var(--muted);
  transition: background 0.15s, color 0.15s;
}
.page-back:hover { background: var(--panel-3); color: var(--text); }

/* ---------- 分段控件 ---------- */
.seg {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  border-radius: var(--radius-sm);
  background: var(--panel-3);
  flex: 0 0 auto;
}
.seg button {
  border: 0;
  border-radius: 6px;
  background: none;
  padding: 5px 11px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.14s, color 0.14s;
}
.seg button:hover { color: var(--text); }
.seg button.on {
  background: var(--panel);
  color: var(--text);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}
.seg.sm button { padding: 3px 9px; font-size: 11.5px; }
.seg-wrap { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* ---------- 下划线式页面 Tab ---------- */
.page-tabs {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  scrollbar-width: none;
}
.page-tabs::-webkit-scrollbar { display: none; }
.page-tabs .ptab {
  position: relative;
  border: 0;
  background: none;
  padding: 9px 12px;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.14s;
}
.page-tabs .ptab:hover { color: var(--text); }
.page-tabs .ptab.active { color: var(--text); font-weight: 600; }
.page-tabs .ptab.active::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: -1px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
}

/* ---------- 指数横滑条 ---------- */
.idx-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 1px 1px 4px;
  margin: 0 -1px;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
}
.idx-strip::-webkit-scrollbar { display: none; }
.idx-card {
  flex: 1 1 132px;
  min-width: 132px;
  max-width: 176px;
  scroll-snap-align: start;
  padding: 10px 11px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.idx-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); color: var(--text); }
.idx-card-name { font-size: 11.5px; color: var(--muted); }
.idx-card-price { margin-top: 2px; font-size: 17px; font-weight: 650; line-height: 1.25; letter-spacing: -0.01em; }
.idx-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 3px; }
.idx-card-amt { font-size: 10px; color: var(--faint); }
.idx-spark { display: block; width: 100%; height: 30px; margin-top: 7px; }

/* ---------- 涨跌胶囊 ---------- */
.pct-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 54px;
  padding: 1px 6px;
  border-radius: 5px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.pct-chip.up { color: var(--up); background: var(--up-dim); }
.pct-chip.down { color: var(--down); background: var(--down-dim); }
.pct-chip.flat { color: var(--flat); background: var(--panel-3); }

/* ---------- 榜单列表 ---------- */
.rank-list { display: flex; flex-direction: column; }
.rank-row {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 7px 8px;
  border: 0;
  border-radius: var(--radius-sm);
  background: none;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.14s;
}
.rank-row:hover { background: var(--panel-2); color: var(--text); }
a.rank-row:hover { color: var(--text); }
.rank-no {
  flex: 0 0 18px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--faint);
}
.rank-no.top { color: var(--accent); font-weight: 700; }
.rank-main { flex: 1 1 auto; min-width: 0; }
.rank-name {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rank-sub { margin-top: 1px; font-size: 10.5px; color: var(--faint); }
.rank-mid { flex: 0 0 auto; width: 84px; }
.rank-val { flex: 0 0 auto; text-align: right; font-size: 13px; font-weight: 600; }
.rank-foot-link {
  display: block;
  width: 100%;
  padding: 7px 0;
  margin-top: 2px;
  border: 0;
  border-top: 1px solid var(--border);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  background: none;
  color: var(--muted);
  font-size: 11.5px;
  text-align: center;
  cursor: pointer;
}
.rank-foot-link:hover { color: var(--text); background: var(--panel-2); }

/* ---------- 相对强度条 ---------- */
.bar-track {
  height: 5px;
  border-radius: 3px;
  background: var(--panel-3);
  overflow: hidden;
}
.bar-fill { height: 100%; border-radius: 3px; }
.bar-fill.up { background: var(--up); }
.bar-fill.down { background: var(--down); }

/* ---------- 情绪带 ---------- */
.sentiment {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
@media (min-width: 640px) {
  .sentiment { flex-direction: row; align-items: center; gap: 26px; }
}
.sentiment-gauge { flex: 0 0 auto; align-self: center; }
.sentiment-main { flex: 1 1 auto; min-width: 0; }
.sentiment-head { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.sentiment-title { font-size: 13px; font-weight: 650; }
.sentiment-bar {
  display: flex;
  height: 9px;
  margin-top: 11px;
  border-radius: 5px;
  overflow: hidden;
  background: var(--panel-3);
}
.sentiment-bar .seg-up { background: var(--up); }
.sentiment-bar .seg-flat { background: var(--border-strong); }
.sentiment-bar .seg-down { background: var(--down); }
.sentiment-legend {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 5px;
  font-family: var(--font-mono);
  font-size: 11px;
}
.sentiment-note { margin-top: 10px; font-size: 12.5px; line-height: 1.55; color: var(--muted); }

/* ---------- 结论条 ---------- */
.insight {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 11px 13px;
  border: 1px solid color-mix(in srgb, var(--accent) 16%, transparent);
  border-radius: var(--radius);
  background: var(--accent-dim);
  font-size: 12.5px;
  line-height: 1.6;
}
.insight-icon { flex: 0 0 auto; color: var(--accent); font-size: 13px; line-height: 1.3; }

/* ---------- 右侧抽屉 ---------- */
.drawer-mask {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  justify-content: flex-end;
  background: rgba(14, 18, 25, 0.42);
  animation: mask-in 0.16s ease;
}
.drawer {
  display: flex;
  flex-direction: column;
  max-width: 100vw;
  height: 100%;
  background: var(--panel);
  border-left: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  animation: drawer-in 0.2s cubic-bezier(0.22, 0.61, 0.36, 1);
}
@keyframes drawer-in {
  from { transform: translateX(18px); opacity: 0.6; }
  to { transform: none; opacity: 1; }
}
.drawer-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 16px 12px;
  border-bottom: 1px solid var(--border);
}
.drawer-head-main { flex: 1 1 auto; min-width: 0; }
.drawer-title { font-size: 15px; font-weight: 700; line-height: 1.4; }
.drawer-sub { margin-top: 2px; font-size: 11.5px; color: var(--muted); }
.drawer-close {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--faint);
  cursor: pointer;
}
.drawer-close:hover { background: var(--panel-3); color: var(--text); }
.drawer-body { flex: 1 1 auto; overflow-y: auto; padding: 14px 16px 22px; }

/* ---------- 订阅计划卡 ---------- */
.plan-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
@media (min-width: 640px) {
  .plan-grid { grid-template-columns: repeat(3, 1fr); gap: 12px; }
}
.plan-card {
  position: relative;
  display: block;
  width: 100%;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--text);
  text-align: left;
  font: inherit;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.plan-card:hover { border-color: var(--border-strong); }
.plan-card.selected {
  border-color: var(--accent);
  background: var(--accent-dim);
  box-shadow: 0 0 0 1px var(--accent) inset;
}
.plan-card-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.plan-name { font-size: 13px; font-weight: 650; }
.plan-selected { font-size: 11px; color: var(--accent); font-weight: 600; }
.plan-price { display: flex; align-items: baseline; gap: 4px; margin-top: 6px; }
.plan-price b { font-family: var(--font-mono); font-size: 26px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
.plan-price span { font-size: 11.5px; color: var(--muted); }
.plan-note { margin-top: 4px; font-size: 11.5px; color: var(--muted); }
.plan-flag {
  position: absolute;
  top: -8px;
  left: 13px;
  padding: 1px 7px;
  border-radius: 9px;
  background: var(--accent);
  color: var(--panel);
  font-size: 10px;
  font-weight: 600;
  line-height: 1.5;
}

/* ---------- 订阅权益清单 ---------- */
.benefit-list {
  display: grid;
  gap: 8px 26px;
}
@media (min-width: 640px) {
  .benefit-list { grid-template-columns: 1fr 1fr; }
}
.benefit {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  font-size: 12.5px;
  line-height: 1.5;
}
.benefit svg { flex: 0 0 auto; margin-top: 1px; color: var(--accent); }

/* ---------- 购买条（桌面） / 移动吸底 ---------- */
.buy-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow-sm);
}
.buy-bar-info { font-size: 12.5px; color: var(--muted); }
.buy-bar-info b { color: var(--text); font-weight: 650; }
.buy-bar-price { font-family: var(--font-mono); font-size: 18px; font-weight: 700; color: var(--text); }
.buy-dock {
  display: none;
}
@media (max-width: 767px) {
  .buy-dock {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    position: fixed;
    left: 0;
    right: 0;
    bottom: calc(56px + env(safe-area-inset-bottom));
    z-index: 50;
    padding: 10px 14px;
    background: var(--panel);
    border-top: 1px solid var(--border);
    box-shadow: 0 -2px 12px rgba(18, 24, 33, 0.06);
  }
  .buy-dock .buy-bar-price { font-size: 16px; }
  .buy-bar { display: none; }
  /* 移动端为吸底购买条留出空间 */
  body[data-page="subscription"] .app { padding-bottom: 84px; }
}

/* ---------- 账户资料卡 ---------- */
.profile-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 13px;
}
.profile-avatar {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: var(--radius-lg);
  background: var(--panel-3);
  color: var(--text-dim);
  font-size: 19px;
  font-weight: 700;
}
.profile-main { flex: 1 1 190px; min-width: 0; }
.profile-name { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; font-size: 15px; font-weight: 700; }
.profile-meta { margin-top: 3px; font-family: var(--font-mono); font-size: 11.5px; color: var(--muted); }
.profile-name-edit {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
  padding: 2px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--panel);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.profile-name-edit:hover { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, transparent); background: var(--accent-dim); }
.profile-name-edit:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- 游客引导 ---------- */
.guest-gate {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid color-mix(in srgb, var(--accent) 20%, transparent);
  border-radius: var(--radius);
  background: var(--accent-dim);
  font-size: 12.5px;
}
.guest-gate b { font-weight: 650; }
.guest-gate-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }

/* ---------- 只读提示（游客可见但受限的区块） ---------- */
.locked-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 26px 16px;
  text-align: center;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  background: var(--panel-2);
}
.locked-panel-title { font-size: 13px; font-weight: 600; }
.locked-panel-desc { font-size: 11.5px; color: var(--muted); max-width: 260px; line-height: 1.55; }
.locked-panel-actions { margin-top: 8px; display: flex; gap: 8px; }

/* ---------- 自选行 ---------- */
.wl-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  transition: background 0.14s;
}
.wl-row:last-child { border-bottom: 0; }
.wl-row:hover { background: var(--panel-2); }
.wl-main { flex: 1 1 auto; min-width: 0; color: var(--text); }
.wl-main:hover { color: var(--text); }
.wl-name { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; }
.wl-sub { margin-top: 1px; font-family: var(--font-mono); font-size: 10.5px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wl-price { flex: 0 0 auto; text-align: right; min-width: 74px; }
.wl-price b { font-family: var(--font-mono); font-size: 13.5px; font-weight: 650; }
.wl-del {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--faint);
  cursor: pointer;
  opacity: 0.65;
  transition: background 0.14s, color 0.14s, opacity 0.14s;
}
.wl-del:hover { background: var(--panel-3); color: var(--text); opacity: 1; }

/* ---------- 板块统计条 ---------- */
.stat-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 20px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  font-size: 12.5px;
  color: var(--muted);
}
.stat-strip b { font-family: var(--font-mono); color: var(--text); font-weight: 650; }

/* ---------- 板块移动卡片 ---------- */
.sector-cards { display: flex; flex-direction: column; gap: 8px; }
@media (min-width: 768px) { .sector-cards { display: none; } }
.sector-card {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}
.sector-card:hover { color: var(--text); border-color: var(--border-strong); }
.sector-card-main { flex: 1 1 auto; min-width: 0; }
.sector-card-name { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; }
.sector-card-sub { margin-top: 2px; font-size: 11px; color: var(--muted); }
.sector-card-right { flex: 0 0 auto; text-align: right; }
.sector-card-right .num { font-family: var(--font-mono); font-size: 13px; font-weight: 650; }

/* ---------- 空态插画 ---------- */
.empty-figure {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 2px;
  color: var(--faint);
  opacity: 0.7;
}

/* ---------- 搜索页 ---------- */
.search-hero { max-width: 660px; margin: 0 auto; }
.search-hero-box { position: relative; }
.search-hero-input {
  width: 100%;
  height: 48px;
  padding: 0 40px 0 42px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--text);
  font-size: 15px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.search-hero-input::placeholder { color: var(--faint); }
.search-hero-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }
.search-hero-icon { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--faint); pointer-events: none; }
.search-hero-clear {
  position: absolute;
  right: 9px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--faint);
  cursor: pointer;
}
.search-hero-clear:hover { background: var(--panel-3); color: var(--text); }
.search-hint { margin-top: 7px; font-size: 11px; color: var(--faint); }
.chip-row { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: var(--panel);
  color: var(--text);
  font-size: 12px;
  cursor: pointer;
  transition: border-color 0.14s, background 0.14s;
}
.chip:hover { border-color: var(--border-strong); background: var(--panel-2); color: var(--text); }
.search-results {
  margin-top: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.search-empty { padding: 40px 16px; text-align: center; font-size: 13px; color: var(--muted); }

/* ---------- 登录页 v10：深色品牌栏 + 层级导轨 ---------- */
.lg-shell {
  display: grid;
  grid-template-columns: minmax(0, 46%) minmax(0, 54%);
  min-height: 100vh;
}

/* 左侧深色品牌栏 */
.lg-brand {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 40px clamp(36px, 4.4vw, 64px) 36px;
  background: #101419;
  color: #f4f5f7;
  overflow: hidden;
}
.lg-brand::before {
  content: "";
  position: absolute;
  top: -22%;
  right: -18%;
  width: 78%;
  height: 62%;
  background: radial-gradient(circle at center, color-mix(in srgb, var(--accent) 20%, transparent), transparent 68%);
  pointer-events: none;
}
.lg-brand::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
  background-size: 58px 58px;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 78%);
  mask-image: linear-gradient(180deg, #000 0%, transparent 78%);
  pointer-events: none;
}
.lg-brand > * { position: relative; z-index: 1; }

.lg-brand-top { display: flex; align-items: center; gap: 11px; }
.lg-mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 6px;
  background: #f4f5f7;
  color: #101419;
  flex: 0 0 auto;
}
.lg-brand-name { font-size: 15.5px; font-weight: 700; letter-spacing: 0.01em; }
.lg-brand-kind {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.34);
  text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 99px;
  padding: 3px 10px;
}

.lg-brand-main { margin: auto 0; padding: 48px 0 40px; }
.lg-eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.34);
}
.lg-eyebrow::before { content: ""; width: 20px; height: 1px; background: var(--accent); }
.lg-brand h1 {
  margin: 18px 0 0;
  font-size: clamp(30px, 3.15vw, 43px);
  line-height: 1.24;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.lg-brand h1 em {
  font-style: normal;
  color: #fff;
  background-image: linear-gradient(
    transparent 60%,
    color-mix(in srgb, var(--accent) 50%, transparent) 60%,
    color-mix(in srgb, var(--accent) 50%, transparent) 94%,
    transparent 94%
  );
  background-repeat: no-repeat;
  padding: 0 2px;
  margin: 0 -2px;
}
.lg-brand-sub {
  margin: 16px 0 0;
  max-width: 350px;
  font-size: 12.5px;
  line-height: 1.85;
  color: rgba(255, 255, 255, 0.52);
}

/* 层级导轨 */
.lg-rail { position: relative; margin: 40px 0 0; padding-left: 26px; max-width: 330px; }
.lg-rail::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 12px;
  bottom: 16px;
  width: 1px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.1) 0%,
    rgba(255, 255, 255, 0.26) 62%,
    color-mix(in srgb, var(--accent) 85%, transparent) 100%
  );
}
.lg-tier { position: relative; padding: 11px 0; }
.lg-tier::before {
  content: "";
  position: absolute;
  left: -26px;
  top: 17px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #101419;
  border: 1.5px solid rgba(255, 255, 255, 0.3);
}
.lg-tier.on::before {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent);
}
.lg-tier-name { margin-top: 1px; font-size: 13.5px; font-weight: 600; color: rgba(255, 255, 255, 0.82); }
.lg-tier.on .lg-tier-name { color: #fff; }
.lg-tier-note { margin-top: 1px; font-size: 11px; line-height: 1.5; color: rgba(255, 255, 255, 0.34); }


/* 右侧表单 */
.lg-form-col {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px clamp(32px, 7vw, 104px);
  background: var(--panel);
}
.lg-form-box { width: 100%; max-width: 356px; }
.lg-m-brand { display: none; align-items: center; gap: 9px; margin-bottom: 30px; }
.lg-m-brand .lg-mark { background: #101419; color: #fff; width: 28px; height: 28px; }
.lg-m-brand span { font-size: 14.5px; font-weight: 700; }

.lg-form-eyebrow {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--faint);
}
.lg-form-title {
  margin: 9px 0 0;
  font-size: 27px;
  font-weight: 700;
  letter-spacing: -0.028em;
  line-height: 1.2;
}
.lg-form-sub { margin: 7px 0 0; font-size: 12.5px; line-height: 1.6; color: var(--muted); }

/* 分段切换 */
.lg-seg { display: flex; gap: 24px; margin: 30px 0 22px; border-bottom: 1px solid var(--border); }
.lg-seg button {
  position: relative;
  padding: 0 0 11px;
  border: 0;
  background: none;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--faint);
  cursor: pointer;
  transition: color 0.16s;
}
.lg-seg button:hover { color: var(--text-dim); }
.lg-seg button.on { color: var(--text); font-weight: 650; }
.lg-seg button.on::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px 2px 0 0;
}
.lg-seg button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }

/* 字段 */
.lg-field { margin-bottom: 16px; }
.lg-field > label { display: block; margin-bottom: 7px; font-size: 12px; font-weight: 500; color: var(--text-dim); }
.lg-inp {
  display: flex;
  align-items: center;
  height: 46px;
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  background: var(--panel);
  transition: border-color 0.16s, box-shadow 0.16s;
}
.lg-inp:hover { border-color: var(--border-strong); }
.lg-inp:focus-within { border-color: color-mix(in srgb, var(--accent) 58%, transparent); box-shadow: 0 0 0 3.5px var(--accent-dim); }
.lg-inp.bad { border-color: color-mix(in srgb, var(--danger) 65%, transparent); }
.lg-input {
  flex: 1;
  min-width: 0;
  height: 100%;
  padding: 0 14px;
  border: 0;
  outline: none;
  background: none;
  font-size: 14px;
  letter-spacing: 0.01em;
  color: var(--text);
}
.lg-input::placeholder { color: var(--faint); letter-spacing: 0; }
.lg-eye {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-right: 5px;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--faint);
  cursor: pointer;
  transition: color 0.16s, background 0.16s;
}
.lg-eye:hover { color: var(--text-dim); background: var(--panel-3); }

.lg-chk {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 2px 0 20px;
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}
.lg-chk input { width: 14px; height: 14px; margin: 0; accent-color: var(--accent); cursor: pointer; }

.lg-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 46px;
  border: 0;
  border-radius: 9px;
  background: var(--accent);
  color: var(--panel);
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background 0.16s, transform 0.06s;
}
.lg-submit:hover { background: var(--accent-deep); }
.lg-submit:active { transform: translateY(1px); }
.lg-submit:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.lg-submit[disabled] { opacity: 0.62; cursor: default; transform: none; }

.lg-legal { margin: 24px 0 0; font-size: 11px; line-height: 1.75; color: var(--faint); }

.lg-err {
  display: none;
  margin-bottom: 16px;
  padding: 10px 13px;
  border: 1px solid color-mix(in srgb, var(--danger) 26%, transparent);
  border-left: 2.5px solid var(--danger);
  border-radius: 6px;
  background: color-mix(in srgb, var(--danger) 5.5%, transparent);
  color: var(--accent-deep);
  font-size: 12px;
  line-height: 1.5;
}
.lg-err.on { display: block; }

/* 登录页壳层：隐藏全局导航，铺满视口 */
body[data-page="login"] .topbar,
body[data-page="login"] .sidebar,
body[data-page="login"] .bottom-nav,
body[data-page="login"] .bottom-subnav,
body[data-page="login"] .site-footer { display: none !important; }
body[data-page="login"] .app { max-width: none; padding: 0; }
body[data-page="login"]::before { display: none; }
@media (min-width: 1024px) {
  body[data-page="login"] { padding-left: 0; }
}
body[data-page="login"] .lg-shell { min-height: 100vh; }

/* 响应式 */
@media (max-width: 1080px) {
  .lg-brand { padding: 36px 36px 32px; }
  .lg-form-col { padding: 44px 40px; }
}
@media (max-width: 900px) {
  .lg-shell { grid-template-columns: 1fr; grid-template-rows: auto 1fr; min-height: 100dvh; }
  .lg-brand { padding: 16px 20px 18px; min-height: 0; }
  .lg-brand::after {
    -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 100%);
    mask-image: linear-gradient(180deg, #000 0%, transparent 100%);
  }
  .lg-brand-top { gap: 9px; }
  .lg-mark { width: 26px; height: 26px; }
  .lg-brand-name { font-size: 14px; }
  .lg-brand-kind { display: none; }
  .lg-brand-main { margin: 0; padding: 0; }
  .lg-brand h1,
  .lg-eyebrow,
  .lg-rail {
    display: none;
  }
  .lg-brand-sub { margin: 10px 0 0; max-width: none; font-size: 11.5px; line-height: 1.65; }
  .lg-form-col { justify-content: flex-start; padding: 28px 20px 48px; }
  .lg-form-box { max-width: none; }
  .lg-form-title { font-size: 23px; }
  .lg-seg { margin: 24px 0 20px; }
}

/* ---------- 指数/标的报价头 ---------- */
.quote-hero {
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow-sm);
}
.quote-hero-top { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px; }
.quote-hero-price { display: flex; align-items: baseline; gap: 11px; }
.quote-hero-price b {
  font-family: var(--font-mono);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.quote-hero-meta { margin-top: 4px; font-family: var(--font-mono); font-size: 11.5px; color: var(--muted); }
.quote-hero-aside { display: flex; gap: 18px; font-family: var(--font-mono); font-size: 11.5px; color: var(--muted); }
.quote-scale { margin-top: 12px; }
.quote-scale-track {
  position: relative;
  height: 6px;
  border-radius: 3px;
  background: var(--panel-3);
  overflow: hidden;
}
.quote-scale-fill { position: absolute; top: 0; bottom: 0; left: 0; border-radius: 3px; }
.quote-scale-fill.up { background: var(--up); }
.quote-scale-fill.down { background: var(--down); }
.quote-scale-legend {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--faint);
}

/* ---------- 资金流 KPI 卡 ---------- */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
@media (min-width: 1024px) {
  .kpi-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.kpi {
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow-sm);
}
.kpi-label { font-size: 11.5px; color: var(--muted); }
.kpi-value { margin-top: 4px; font-family: var(--font-mono); font-size: 20px; font-weight: 700; line-height: 1.2; letter-spacing: -0.01em; }
.kpi-sub { margin-top: 3px; font-size: 10.5px; color: var(--faint); }

/* ---------- 双榜布局 ---------- */
.dual-board {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
}
@media (min-width: 768px) {
  .dual-board { grid-template-columns: 1fr 1fr; }
}

/* ---------- 移动端表格转卡片（通用开关） ---------- */
@media (max-width: 767px) {
  .app { padding: 14px 14px 32px; }
  .topbar-inner { padding: 0 14px; }
  .page-head { gap: 10px; }
  .kpi-value { font-size: 18px; }
  .quote-hero-price b { font-size: 27px; }
  .idx-card { width: 136px; }
}
@media (max-width: 560px) {
  .quote-hero-aside { display: none; }
  .buy-bar { flex-direction: column; align-items: stretch; }
  .buy-bar .btn { width: 100%; }
}

/* ---------- 市场盯盘台布局 ---------- */
.market-content {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.idx-strip-block {
  padding: 12px 14px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow-sm);
}
.block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.block-head h2 { font-size: 13.5px; font-weight: 650; }
.block-more { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.block-more:hover { color: var(--text); }

.home-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
}
@media (min-width: 900px) {
  .home-grid {
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    align-items: start;
  }
  /* 自选速览与榜单对半分栏 */
  .home-grid > .home-tables { grid-column: 1 / -1; }
}
.home-tables {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
}
@media (min-width: 900px) {
  .home-tables { grid-template-columns: 1fr 1fr; }
}
.hot-grid { display: grid; gap: 12px; }
@media (min-width: 900px) {
  .hot-grid { grid-template-columns: 1fr 1fr; }
}

/* ---------- 抽屉内容片段 ---------- */
.drawer-stack { display: flex; flex-direction: column; gap: 12px; }
.drawer-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel-2);
}
.drawer-metric { text-align: center; min-width: 0; }
.drawer-metric-label { font-size: 10px; color: var(--muted); white-space: nowrap; }
.drawer-metric-value {
  margin-top: 2px;
  font-size: 12.5px;
  font-weight: 650;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.drawer-kv-list { display: flex; flex-direction: column; }
.drawer-kv {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px solid var(--border);
  font-size: 12.5px;
}
.drawer-kv:last-child { border-bottom: 0; }
.drawer-kv-label { color: var(--muted); }
.drawer-kv-value { font-weight: 600; }
.drawer-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 2px; }
.drawer-actions .btn { justify-content: center; }

/* ---------- 登录页：隐藏全局壳层，让分屏占满视口 ---------- */
body[data-page="login"] .topbar,
body[data-page="login"] .sidebar,
body[data-page="login"] .bottom-nav,
body[data-page="login"] .bottom-subnav,
body[data-page="login"] .site-footer {
  display: none !important;
}
body[data-page="login"] .app {
  max-width: none;
  padding: 0;
}
@media (min-width: 1024px) {
  body[data-page="login"] { padding-left: 0; }
}

/* 页头标题支持富节点（个股 / 板块名称 + 代码） */
.page-title-node {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.4;
}
.page-title-node .stock-identity,
.page-title-node .stock-title { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }

/* search 输入框：隐藏浏览器原生清除钮，避免与自定义 × 重复 */
input[type="search"].search-hero-input::-webkit-search-cancel-button,
input[type="search"].search-hero-input::-webkit-search-decoration {
  -webkit-appearance: none;
  appearance: none;
}

/* ==========================================================================
   v10 指数行情页（市场 · 指数行情）
   ========================================================================== */
.idx-hero {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}
.idx-hero-price {
  font-size: 30px;
  font-weight: 700;
  line-height: 1.1;
}
.idx-hero-price.up { color: var(--up); }
.idx-hero-price.down { color: var(--down); }
.pct-chip.lg {
  height: 28px;
  padding: 0 12px;
  font-size: 14px;
  border-radius: 14px;
}


/* ==========================================================================
   大盘异动
   ========================================================================== */
.changes-type-select { width: 154px; }
.changes-time { white-space: nowrap; }
.changes-tag {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--panel-3);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
  white-space: nowrap;
}
.changes-tag.up { color: var(--up); background: color-mix(in srgb, var(--up) 10%, transparent); }
.changes-tag.down { color: var(--down); background: color-mix(in srgb, var(--down) 10%, transparent); }
.changes-tag.neutral { color: var(--muted); }
.changes-top-direction { margin-left: 4px; color: var(--muted); font-size: 10.5px; }
.changes-dist { color: var(--muted); font-size: 11px; }
.changes-note { font-size: 11px; white-space: nowrap; }
.changes-mobile-time { display: none; }
@media (max-width: 767px) {
  .changes-type-select { width: 100%; }
  .changes-note { white-space: normal; }
  .changes-mobile-time { display: inline; color: var(--faint); font-size: 10.5px; }
}

/* ==========================================================================
   移动端输入框防聚焦放大
   iOS Safari 会在聚焦字体小于 16px 的 input/select/textarea 时自动放大整个页面。
   统一把触屏宽度下的可输入控件保持在 16px，保留双指缩放手势，不影响可访问性。
   ========================================================================== */
@media (max-width: 1023px) {
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]):not([type="submit"]):not([type="button"]):not([type="reset"]):not([type="image"]),
  select,
  textarea {
    font-size: 16px !important;
    touch-action: manipulation;
  }
}
