/* GENERATED by heatmap_app/asset_bundles.py - do not edit.
   Edit the part files under static/css/ instead; this is rebuilt on change. */

/* ==================== css/tokens.css ==================== */
/* ============================================================
   A股景气捕手 — 统一设计 Token 体系
   版本: v2.0 | 日期: 2026-06-13
   覆盖: 桌面 / 平板 / 手机 / 折叠屏
   兼容: 保留 --rf-* 和 --ui-* 原有变量
   ============================================================ */

/* ── 1. 复古未来主义色彩 Token（向后兼容） ── */
:root {
  --rf-bg-0: #070607;
  --rf-bg-1: #100b10;
  --rf-panel: #151018;
  --rf-line: #5a3c2e;
  --rf-line-soft: rgba(255, 184, 107, 0.22);
  --rf-cream: #f7e7c6;
  --rf-muted: #c4a98a;           /* 微调: #b99f83 → #c4a98a, 对比度 3.2:1 → 4.6:1 (WCAG AA) */
  --rf-amber: #ffb86b;
  --rf-orange: #ff7a3d;
  --rf-cyan: #72f7ff;
  --rf-green: #6bffad;
  --rf-red: #ff4d4d;
  --rf-shadow: 0 18px 60px rgba(0, 0, 0, 0.72), 0 0 26px rgba(255, 122, 61, 0.08);

  /* 原生表单控件方案：复古未来为深色 — 避免 <select> 下拉弹出层白底配米色字 */
  color-scheme: dark;
}

/* ── 2. 语义色彩 Token（统一 admin + 主应用） ── */
:root {
  /* 主色调 */
  --color-bg-primary: var(--rf-bg-0);
  --color-bg-secondary: var(--rf-bg-1);
  --color-bg-panel: var(--rf-panel);

  /* 文字层级 */
  --color-text-primary: var(--rf-cream);
  --color-text-secondary: var(--rf-muted);
  --color-text-accent: var(--rf-cyan);

  /* 功能色 */
  --color-up: var(--rf-red);            /* A股传统: 红涨 */
  --color-down: var(--rf-green);        /* A股传统: 绿跌 */
  --color-up-global: var(--rf-green);   /* 国际: 绿涨 */
  --color-down-global: var(--rf-red);   /* 国际: 红跌 */
  --color-warning: #ffd166;
  --color-info: var(--rf-cyan);
  --color-success: #7ee787;
  --color-error: #ff7b72;

  /* 边框 */
  --color-border: rgba(255, 184, 107, 0.24);
  --color-border-strong: rgba(114, 247, 255, 0.48);
  --color-border-subtle: rgba(255, 184, 107, 0.12);
  --color-border-card: rgba(255, 255, 255, 0.08);

  /* 背景渐变 */
  --gradient-body: radial-gradient(circle at 14% 8%, rgba(255, 122, 61, 0.18), transparent 30%),
    radial-gradient(circle at 86% 16%, rgba(114, 247, 255, 0.12), transparent 28%),
    linear-gradient(180deg, #070607 0%, #120a10 48%, #050505 100%);
  --gradient-card: linear-gradient(180deg, rgba(31, 20, 24, 0.97), rgba(10, 8, 10, 0.98));
  --gradient-head: linear-gradient(180deg, rgba(34, 22, 25, 0.98), rgba(14, 10, 12, 0.98));
  --gradient-btn: linear-gradient(180deg, rgba(37, 24, 26, 0.96), rgba(17, 12, 14, 0.98));
  --gradient-input: linear-gradient(180deg, rgba(12, 9, 11, 0.96), rgba(23, 15, 18, 0.94));
  --gradient-card-alt: linear-gradient(180deg, rgba(255, 184, 107, 0.055), rgba(114, 247, 255, 0.025));
  --gradient-admin-bg: #070b10;
  --gradient-admin-panel: #0f141c;
}

/* ── 3. Admin 模块色彩对齐（覆盖独立色板） ── */
:root {
  --admin-bg: var(--gradient-admin-bg);
  --admin-panel: var(--gradient-admin-panel);
  --admin-line: #2a3340;
  --admin-line-soft: #1e2631;
  --admin-text: #dce5ef;
  --admin-muted: #8b98a8;
  --admin-blue: #2f81f7;
  --admin-green: #27a55b;
  --admin-red: #e5534b;
  --admin-yellow: #d6a019;
  --admin-purple: #8b5cf6;
}

/* ── 4. UI 形状 Token（保留现有） ── */
:root {
  --ui-radius-xs: 8px;
  --ui-radius-sm: 10px;
  --ui-radius-md: 14px;
  --ui-radius-lg: 18px;
  --ui-radius-full: 999px;
  --ui-gap-xs: 4px;
  --ui-gap-sm: 8px;
  --ui-gap-md: 12px;
  --ui-pad-sm: 8px;
  --ui-pad-md: 12px;
}

/* ── 5. 排版 Token ── */
:root {
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --font-size-2xs: 0.625rem;  /* 10px */
  --font-size-xs: 0.6875rem;  /* 11px */
  --font-size-sm: 0.75rem;    /* 12px */
  --font-size-base: 0.8125rem;/* 13px */
  --font-size-md: 0.875rem;   /* 14px */
  --font-size-lg: 1rem;       /* 16px */
  --font-size-xl: 1.125rem;   /* 18px */
  --font-size-2xl: 1.25rem;   /* 20px */
  --font-size-3xl: 1.5rem;    /* 24px */
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --font-weight-extrabold: 800;
  --font-weight-black: 900;
  --line-height-tight: 1.15;
  --line-height-normal: 1.45;
  --line-height-relaxed: 1.65;
}

/* ── 6. 动效 Token ── */
:root {
  --transition-fast: 120ms ease;
  --transition-normal: 200ms ease;
  --transition-slow: 350ms ease;
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ── 7. 响应式断点 Token（覆盖手机/平板/桌面/折叠屏） ── */
:root {
  /* 断点值（仅供 JS 读取，CSS 用 @media 硬编码以保证 style 标签剥离后仍可用） */
  --bp-folded-min: 280px;       /* 折叠屏折叠态最小 */
  --bp-folded-max: 380px;       /* 折叠屏折叠态最大 */
  --bp-phone: 390px;            /* 小屏手机 */
  --bp-phone-max: 760px;        /* 手机最大 */
  --bp-tablet-min: 761px;       /* 平板/折叠展开起点 */
  --bp-tablet: 900px;           /* 平板 */
  --bp-desktop-sm: 980px;       /* 小桌面 */
  --bp-desktop: 1180px;         /* 标准桌面 */
  --bp-desktop-lg: 1280px;      /* 大桌面 */

  /* 面板尺寸变量（桌面端基准） */
  --panel-w-sm: min(420px, calc(100vw - 24px));
  --panel-w-md: min(640px, calc(100vw - 24px));
  --panel-w-lg: min(900px, calc(100vw - 24px));
  --panel-w-xl: min(1080px, calc(100vw - 24px));
  --panel-offset: 12px;
  --panel-top: 52px;
  --panel-max-height: 76vh;
}

/* ── 8. 面板阴影层级 ── */
:root {
  --shadow-panel: var(--rf-shadow);
  --shadow-dropdown: 0 14px 42px rgba(0, 0, 0, 0.72);
  --shadow-modal: 0 20px 60px rgba(0, 0, 0, 0.75);
  --shadow-tooltip: 0 8px 40px rgba(0, 0, 0, 0.8);
  --shadow-glow-cyan: 0 0 14px rgba(114, 247, 255, 0.13);
  --shadow-glow-amber: 0 0 14px rgba(255, 122, 61, 0.06);
}

/* ── 9. 全局滚动条 Token ── */
:root {
  --scrollbar-width: 8px;
  --scrollbar-track: rgba(12, 8, 10, 0.82);
  --scrollbar-thumb: linear-gradient(180deg, rgba(255, 184, 107, 0.55), rgba(114, 247, 255, 0.32));
  --scrollbar-thumb-hover: linear-gradient(180deg, rgba(255, 184, 107, 0.78), rgba(114, 247, 255, 0.48));
}

/* ── 10. Z-Index 层级 Token ── */
:root {
  --z-base: 1;
  --z-tooltip: 100;
  --z-stock-panel: 160;
  --z-panel: 90;
  --z-action-menu: 180;
  --z-overlay: 240;
  --z-modal: 330;
  --z-loading: 999;
  --z-help-tour: 12000;
}

/* ── 11. 折叠屏 / 安全区 Token ── */
:root {
  --safe-area-top: env(safe-area-inset-top, 0px);
  --safe-area-bottom: env(safe-area-inset-bottom, 0px);
  --safe-area-left: env(safe-area-inset-left, 0px);
  --safe-area-right: env(safe-area-inset-right, 0px);
  --folded-col-width: 52px;     /* 折叠态最小列宽 */
}

/* ── 12. Taste Theme (Modern Dark Glass Finance App) ───────────────
   仅在 <html class="taste"> 下激活；开关按钮在 index.html 顶栏。
   色板：保留 A股红涨绿跌语义；强调色电光青绿 + CTA 橙。
   ──────────────────────────────────────────────────────────────── */
:root {
  /* Taste 基础调色板（不破坏现有 --rf-* / --color-* 语义） */
  --taste-bg-0: #050810;
  --taste-bg-1: #0a0f1c;
  --taste-bg-2: #0f1525;
  --taste-surface: rgba(15, 21, 37, 0.72);
  --taste-surface-strong: rgba(20, 28, 48, 0.92);
  --taste-surface-line: rgba(255, 255, 255, 0.08);
  --taste-surface-line-strong: rgba(0, 224, 164, 0.42);

  /* 主色 + 辅色 */
  --taste-accent: #00e0a4;          /* 电光青绿 */
  --taste-accent-soft: rgba(0, 224, 164, 0.14);
  --taste-cta: #ff7849;             /* 暖橙 CTA */
  --taste-cta-soft: rgba(255, 120, 73, 0.16);
  --taste-info: #5da6ff;            /* 冷蓝辅助 */
  --taste-warning: #ffd166;

  /* 文本 */
  --taste-text: #f0f4ff;
  --taste-text-soft: #b6c2d8;
  --taste-text-muted: #7a869e;

  /* A股语义色（与主项目一致） */
  --taste-up: #ff4d4d;              /* 涨 */
  --taste-down: #2bbf6e;            /* 跌 */
  --taste-flat: #c9d1de;

  /* Taste 几何 */
  --taste-radius-card: 18px;
  --taste-radius-button: 12px;
  --taste-radius-pill: 999px;
  --taste-gap-md: 12px;
  --taste-gap-lg: 18px;

  /* Taste 阴影 / 玻璃 */
  --taste-shadow-1: 0 10px 30px rgba(0, 0, 0, 0.45);
  --taste-shadow-2: 0 20px 60px rgba(0, 0, 0, 0.55);
  --taste-glass-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    inset 0 -1px 0 rgba(0, 0, 0, 0.32),
    0 18px 60px rgba(0, 0, 0, 0.55);

  /* Taste 渐变 */
  --taste-grad-accent: linear-gradient(135deg, #00e0a4 0%, #00b389 100%);
  --taste-grad-cta: linear-gradient(135deg, #ff7849 0%, #ff5722 100%);
  --taste-grad-bg: radial-gradient(circle at 12% 8%, rgba(0, 224, 164, 0.08), transparent 32%),
    radial-gradient(circle at 88% 18%, rgba(93, 166, 255, 0.06), transparent 28%),
    linear-gradient(180deg, #050810 0%, #0a0f1c 50%, #050810 100%);
}

/* 顶栏 Taste 切换按钮：默认显示；html.taste 激活时变实心青绿 */
#taste-toggle {
  display: inline-flex;
  width: 32px;
  height: 32px;
  border-radius: var(--taste-radius-pill);
  border: 1px solid var(--taste-surface-line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--taste-text-soft);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  margin-left: 6px;
  transition: border-color var(--transition-normal), background var(--transition-normal), color var(--transition-normal);
}
#taste-toggle:hover {
  border-color: var(--taste-accent);
  color: var(--taste-accent);
}
html.taste #taste-toggle {
  background: var(--taste-accent) !important;
  border-color: var(--taste-accent) !important;
  color: #050810 !important;
}
html.taste #taste-toggle:hover { filter: brightness(1.1); }


/* ==================== css/layout.css ==================== */
/* ============================================================
   A股景气捕手 — 响应式布局框架
   断点: 8档 (340/380/390/700/760/900/980/1180)
   覆盖: 桌面/平板/手机/折叠屏 全端自适应
   ============================================================ */

/* ── 1. 全局 Reset & Body ── */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-family);
  background: #0a0a0a;
  color: #c9d1d9;
  overflow: hidden;
}

body,
button,
input,
select,
textarea {
  font-family: var(--font-family);
}

/* ── 2. 主题 Body 覆盖（复古未来主义） ── */
body {
  color: var(--color-text-primary);
  background: var(--gradient-body);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    radial-gradient(ellipse at center, transparent 0%, rgba(0, 0, 0, 0.36) 82%);
  background-size: 24px 24px, 24px 24px, 100% 100%;
  mix-blend-mode: screen;
  opacity: 0.55;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 5px);
  opacity: 0.16;
}

/* ── 3. 主布局容器 ── */
#main {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

/* ── 4. 顶部栏 ── */
#topbar {
  display: grid;
  /* 5 列：品牌 | 涨平跌 | 指数条 | 搜索 | 菜单
     --topbar-cols 由页面按「是否渲染指数条」覆盖（见下）：
       有指数条 → 指数条独占第 3 列、搜索贴第 4 列（首页语义）
       无指数条 → 第 3 列宽度归零，搜索框右对齐紧贴菜单，避免留出空档。
     gap: 4px 是品牌/涨平跌/菜单之间的呼吸间距；搜索与菜单之间不额外加 gap，
     由搜索框自身 padding 承担内边距，保证"紧贴但可点"。 */
  grid-template-columns: var(--topbar-cols, auto auto minmax(260px, 1fr) minmax(220px, 340px) auto);
  position: relative;
  align-items: center;
  gap: 4px;
  padding: 5px 14px;
  background: var(--gradient-head);
  border-bottom: 1px solid var(--rf-line-soft);
  min-height: 50px;
  flex-shrink: 0;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.03) inset,
    0 8px 26px rgba(0, 0, 0, 0.45),
    0 0 22px rgba(255, 184, 107, 0.08);
}

#topbar::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 2px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--rf-amber), var(--rf-cyan), transparent);
  opacity: 0.55;
}

#topbar .title {
  display: flex !important;
  align-items: center !important;
  gap: 5px;
  line-height: 1 !important;
  height: 32px;
  font-size: 15px;
  font-weight: 850;
  letter-spacing: 0.015em;
  color: var(--color-text-primary);
  text-shadow: 0 0 10px rgba(255, 184, 107, 0.28);
  white-space: nowrap;
}

#stats {
  display: contents;
}

.market-summary {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-shrink: 0;
  white-space: nowrap;
  font-size: var(--font-size-sm);
  height: 32px;
  line-height: 1;
  color: var(--color-text-secondary);
}

.market-summary .stat-item,
.market-summary span {
  display: inline-flex;
  align-items: center;
  line-height: 1;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 3px;
}

.stat-label {
  color: var(--color-text-secondary);
}

.stat-value {
  font-weight: var(--font-weight-semibold);
}

.stat-value.up { color: var(--color-up); }
.stat-value.down { color: var(--color-down); }

/* ── 5. 指数条 ── */
.index-strip {
  position: static;
  transform: none;
  width: auto;
  max-width: none;
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  min-width: 0;
  overflow: hidden;
  z-index: 1;
  pointer-events: none;
}

.index-card {
  min-width: 58px;
  text-align: center;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
  background: transparent;
  border: 0;
  box-shadow: none;
  border-radius: 0;
  padding: 0 2px;
}

.index-card-top {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
  min-width: 0;
}

.index-name {
  color: var(--color-text-secondary);
  white-space: nowrap;
  font-size: 10px;
}

.index-price {
  margin-top: 3px;
  font-weight: var(--font-weight-extrabold);
  font-size: 12px;
}

.index-pct { font-size: 9px; }

.index-card.up .index-price,
.index-card.up .index-pct,
.stat-value.up {
  color: var(--color-up);
  text-shadow: 0 0 8px rgba(255, 77, 77, 0.36);
}

.index-card.down .index-price,
.index-card.down .index-pct,
.stat-value.down {
  color: var(--color-down);
  text-shadow: 0 0 8px rgba(107, 255, 173, 0.32);
}

.index-card.flat .index-price,
.index-card.flat .index-pct {
  color: var(--color-text-primary);
}

/* ── 6. 热力图容器 ── */
#chart-container {
  flex: 1;
  position: relative;
  overflow: hidden;
  cursor: grab;
  background: radial-gradient(circle at 50% 45%, rgba(255, 184, 107, 0.06), transparent 42%);
}

#chart-container:active { cursor: grabbing; }

#treemap {
  display: block;
}

/* ── 7. 底部栏 / 缩放提示 / 图例 ── */
#footer {
  text-align: center;
  font-size: 10px;
  color: var(--color-text-secondary);
  padding: 3px;
  flex-shrink: 0;
  border-top: 1px solid #222;
  background: rgba(8, 6, 8, 0.88);
}

#footer a {
  color: #6e7681;
  text-decoration: none;
  margin-left: 8px;
}

#footer a:hover { color: var(--rf-cyan); }

#zoom-hint {
  position: fixed;
  bottom: 12px;
  left: 16px;
  font-size: 11px;
  color: var(--color-text-secondary);
  background: rgba(8, 6, 8, 0.88);
  padding: 3px 8px;
  border-radius: 4px;
}

#legend {
  position: fixed;
  bottom: 12px;
  right: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #8b949e;
  background: rgba(10, 10, 10, 0.92);
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid #333;
}

#legend-bar {
  width: 140px;
  height: 10px;
  border-radius: 3px;
}

/* ── 8. 加载遮罩 ── */
#loading {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(8, 6, 8, 0.88);
  z-index: var(--z-loading);
  font-size: 15px;
  color: #58a6ff;
  flex-direction: column;
  gap: 12px;
}

#loading .spinner {
  width: 28px;
  height: 28px;
  border: 3px solid rgba(255, 184, 107, 0.25);
  border-top-color: var(--rf-cyan);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  box-shadow: 0 0 18px rgba(114, 247, 255, 0.2);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── 9. 全局搜索 ── */
.global-search-wrap {
  position: relative;
  z-index: 210;
  min-width: 220px;
  width: min(340px, 24vw);
  max-width: 340px;
  justify-self: end;
  min-height: 34px;
}

.global-search-box {
  position: relative;
  display: flex;
  align-items: center;
}

#global-search-input {
  width: 100%;
  height: 32px;
  border-radius: var(--ui-radius-full);
  border: 1px solid rgba(255, 184, 107, 0.28);
  background: var(--gradient-input);
  color: var(--color-text-primary);
  outline: none;
  padding: 0 34px 0 14px;
  font-size: var(--font-size-sm);
  box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.42), 0 0 0 1px rgba(114, 247, 255, 0.035);
}

#global-search-input:focus {
  border-color: var(--rf-cyan);
  box-shadow: 0 0 0 2px rgba(114, 247, 255, 0.16), inset 0 0 18px rgba(0, 0, 0, 0.38);
}

.global-search-icon {
  position: absolute;
  right: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--rf-cyan);
  font-size: 13px;
  pointer-events: none;
}

#global-search-results {
  position: absolute;
  right: 0;
  top: 38px;
  width: min(520px, calc(100vw - 24px));
  max-width: 520px;
  display: none;
  background: var(--gradient-card);
  border: 1px solid var(--color-border);
  border-radius: var(--ui-radius-md);
  box-shadow: var(--shadow-dropdown);
  overflow: hidden;
  z-index: 260;
}

/* ── 10. 桌面端响应式 ── */
@media (max-width: 1180px) {
  #topbar {
    grid-template-columns: auto auto minmax(0, 1fr) minmax(200px, 300px) auto;
    gap: 4px;
  }
  .global-search-wrap {
    width: min(300px, 24vw);
    min-width: 200px;
  }
  .index-strip {
    justify-content: center;
    overflow: hidden;
    gap: 8px;
  }
  .index-card { min-width: 58px; }
  .index-name { font-size: 10px; }
}

@media (min-width: 761px) and (max-width: 980px) {
  #topbar { grid-template-columns: auto auto minmax(0, 1fr) auto; }
  #topbar .title { font-size: 13px; }
  .global-search-wrap {
    grid-column: 1 / -1;
    width: 100%;
    max-width: none;
  }
  .market-summary { gap: 6px; font-size: 11px; }
  .index-strip {
    grid-column: 1 / -1;
    grid-row: 2;
    gap: 9px;
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
  }
  .index-card { min-width: 52px; }
  .index-name { font-size: 9px; }
  .index-price { font-size: 12px; }
}

/* ── 11. 手机端布局（≤760px） ── */
@media (max-width: 760px) {
  body {
    overflow: hidden;
    background: var(--gradient-body);
  }

  #topbar {
    grid-template-columns: 56px minmax(0, 1fr) minmax(111px, 34vw) 56px !important;
    grid-template-areas:
      "brand brand search search"
      "menu indices indices account";
    min-height: 90px;
    gap: 5px 5px;
    padding: 6px 6px;
    align-items: center;
    background: linear-gradient(180deg, rgba(35, 22, 25, 0.98), rgba(10, 8, 10, 0.98));
  }

  #topbar .title {
    grid-area: brand;
    justify-self: start;
    text-align: left;
    min-width: 0;
    max-width: 100%;
    height: 28px;
    gap: 3px;
  }

  .app-title-name { overflow: hidden; text-overflow: ellipsis; }
  .app-version { font-size: 8px; margin-left: 1px; color: #8b949e; }
  #clock { display: inline; font-size: 8px; color: #8b949e; flex: 0 0 auto; }

  .market-summary {
    grid-area: brand;
    justify-self: center;
    align-self: center;
    display: flex;
    gap: 3px;
    font-size: 9px;
    margin-left: 0;
    padding-left: 4px;
    background: transparent;
  }

  .stat-label { font-size: 9px; }
  .stat-item { gap: 1px; }

  .global-search-wrap {
    grid-area: search;
    justify-self: end;
    min-width: 0;
    width: auto;
    max-width: 180px;
  }

  #global-search-input {
    height: 27px;
    font-size: 9.5px;
    padding-left: 8px;
    padding-right: 25px;
  }

  .global-search-icon { right: 9px; }

  #global-search-results {
    position: fixed;
    left: 8px;
    right: 8px;
    top: 94px;
    width: auto;
    max-height: 58vh;
    overflow: hidden;
    z-index: 260;
  }

  #chart-container {
    cursor: default;
    touch-action: manipulation;
  }

  #chart-container:active { cursor: default; }
  #treemap { touch-action: manipulation; }
  #zoom-hint { display: none; }

  #legend {
    right: 8px;
    bottom: 8px;
    font-size: 10px;
    max-width: 56vw;
  }

  #legend-bar { width: 88px; }

  .index-strip {
    grid-area: menu / menu / account / account;
    justify-self: center;
    align-self: center;
    width: calc(66.666vw - 90.666px);
    max-width: calc(100vw - 136px);
    min-width: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    align-items: center;
    justify-items: center;
    column-gap: 4px;
    overflow: hidden;
    padding: 0;
    pointer-events: auto;
  }

  .index-card {
    min-width: 0;
    max-width: 100%;
    width: 100%;
    line-height: 1.03;
    text-align: center;
    overflow: hidden;
    padding: 0;
  }

  .index-card-top {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    min-width: 0;
  }

  .index-name {
    font-size: 6.8px;
    transform: none;
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .index-price { font-size: 7.8px; margin-top: 1px; white-space: nowrap; }
  .index-pct { font-size: 7px; line-height: 1; white-space: nowrap; }

  #global-search-results { top: 94px; }
}

/* ── 12. 小屏手机（≤390px） ── */
@media (max-width: 390px) {
  #topbar {
    grid-template-columns: minmax(0, 0.88fr) minmax(156px, 46vw) 54px;
    gap: 4px;
    padding: 5px 6px;
  }

  #topbar .title { font-size: 9px; }

  .market-summary { font-size: 8px; gap: 2px; }
  .stat-label { font-size: 8px; }
  #clock, .app-version { font-size: 7px; }

  #global-search-input { font-size: 9px; }

  .index-card {
    flex-basis: 42px;
    min-width: 36px;
    max-width: 46px;
  }

  .index-name { font-size: 6.4px; }
  .index-price { font-size: 7.2px; }
  .index-pct { font-size: 6px; }
}

/* ── 13. 折叠屏折叠态 / 超窄屏（≤380px） ── */
@media (max-width: 380px) {
  #topbar {
    grid-template-columns: 52px minmax(0, 1fr) minmax(166px, 52vw) 52px !important;
    padding-left: 5px;
    padding-right: 5px;
    gap: 4px;
  }

  .global-search-wrap { max-width: 198px; }

  .index-strip {
    width: calc(66.666vw - 82.666px);
    max-width: calc(100vw - 124px);
    column-gap: 3px;
    padding: 0;
  }

  .index-name { font-size: 7px; }
  .index-price { font-size: 7.8px; }
  .index-pct { font-size: 6.5px; }
}

/* ── 14. 极小屏（≤340px） ── */
@media (max-width: 340px) {
  .index-strip {
    width: calc(66.666vw - 78.666px);
    max-width: calc(100vw - 118px);
  }

  .index-name { font-size: 6px; }
  .index-price { font-size: 7px; }
  .index-pct { font-size: 5.5px; }
}

/* ── 15. 折叠屏展开 / 平板增强（761px+） ── */
@media (min-width: 761px) {
  #action-menu {
    width: min(680px, calc(100vw - 24px));
  }

  #action-menu .menu-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
  }

  #account-panel .account-shell {
    display: block;
  }

  #account-panel .account-login-card {
    max-width: none;
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
  }
}

/* ── 16. 平板优化（900px） ── */
@media (max-width: 900px) {
  #account-panel .account-shell {
    grid-template-columns: 1fr;
  }

  #account-panel .account-social-grid {
    grid-template-columns: 1fr;
  }
}

/* ── 17. 手机端 Admin 覆盖层 ── */
@media (max-width: 760px) {
  #admin-overlay {
    inset: 86px 0 0;
    padding: 8px;
    overflow: auto;
  }

  .admin-frame-shell {
    width: 100%;
    min-height: calc(100vh - 102px);
  }
}

/* ── 18. 手机端 Section 标题 ── */
.settings-section {
  padding: 8px 0;
}

.settings-section + .settings-section {
  border-top: 1px solid rgba(255, 184, 107, 0.16);
}

.settings-section-title {
  color: var(--color-text-primary);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-extrabold);
  margin-bottom: 6px;
  letter-spacing: 0.02em;
}

.settings-section-bottom {
  border-top: 1px solid rgba(255, 184, 107, 0.22);
  padding-top: 10px;
}


/* ==================== css/panels.css ==================== */
/* ============================================================
   A股景气捕手 — 面板系统（统一基类 + 全部面板响应式规格）
   覆盖: 20+ 滑动面板的尺寸/位置/行为统一
   ============================================================ */

/* ── 1. 面板基类 ── */
.panel {
  position: fixed;
  top: var(--panel-top);
  right: var(--panel-offset);
  width: 340px;
  max-height: var(--panel-max-height);
  overflow: hidden;
  z-index: var(--z-panel);
  display: none;
  flex-direction: column;
  min-height: 0;
  background: var(--gradient-card);
  border: 1px solid var(--color-border);
  border-radius: var(--ui-radius-md);
  box-shadow: var(--shadow-panel);
  color: var(--color-text-primary);
  padding: 0;
}

/* ── 2. 面板头部 ── */
.panel-head {
  flex: 0 0 auto;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: var(--ui-pad-md);
  border-bottom: 1px solid rgba(255, 184, 107, 0.22);
  background: var(--gradient-head);
}

.panel-head h3 {
  font-size: 13px;
  font-weight: var(--font-weight-extrabold);
  color: var(--color-text-primary);
  text-shadow: 0 0 12px rgba(255, 184, 107, 0.18);
  margin: 0;
  letter-spacing: 0.01em;
}

.panel-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.panel-head-action {
  border: 1px solid rgba(255, 184, 107, 0.34);
  background: var(--gradient-btn);
  color: var(--color-text-primary);
  border-radius: var(--ui-radius-full);
  font-size: var(--font-size-xs);
  padding: 6px 10px;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), var(--shadow-glow-amber);
  min-height: 32px;
}

.panel-head-action:hover {
  color: var(--color-text-accent);
  border-color: rgba(114, 247, 255, 0.6);
}

/* ── 3. 面板内容区 ── */
.panel-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: var(--ui-pad-md);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 184, 107, 0.45) rgba(20, 14, 17, 0.8);
}

/* ── 4. 关闭按钮统一 ── */
.panel-close,
.ui-close-x {
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  min-height: 32px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 999px !important;
  border: 1px solid #f85149 !important;
  background: #b42318 !important;
  color: #fff !important;
  font-size: 18px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  cursor: pointer !important;
  padding: 0 0 3px 0 !important;
  box-shadow: none !important;
}

.panel-close:hover,
.ui-close-x:hover {
  background: #d92d20 !important;
  border-color: #ff7b72 !important;
  color: #fff !important;
}

/* ── 5. 面板行 / 列表子组件 ── */
.panel .row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 8px 0;
  font-size: var(--font-size-sm);
}

.panel-item {
  border-bottom: 1px solid var(--color-border);
  padding: 6px 0;
  font-size: var(--font-size-sm);
}

.panel-item .muted {
  color: var(--color-text-secondary);
  font-size: var(--font-size-xs);
  margin-top: 2px;
}

.panel-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* ── 6. 面板输入控件 ── */
.panel input,
.panel select {
  background: var(--gradient-input);
  color: var(--color-text-primary);
  border: 1px solid rgba(255, 184, 107, 0.28);
  border-radius: var(--ui-radius-sm);
  padding: 4px 6px;
  width: 130px;
  font-size: var(--font-size-sm);
  box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.42), 0 0 0 1px rgba(114, 247, 255, 0.035);
}

.panel input:focus,
.panel select:focus {
  border-color: var(--rf-cyan);
  box-shadow: 0 0 0 2px rgba(114, 247, 255, 0.16), inset 0 0 18px rgba(0, 0, 0, 0.38);
  outline: none;
}

/* ── 7. 面板按钮 ── */
.panel button {
  border-radius: var(--ui-radius-sm);
  border: 1px solid var(--color-border);
  background: var(--gradient-btn);
  color: var(--color-text-primary);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.055);
  min-height: 32px;
  cursor: pointer;
  font-size: var(--font-size-xs);
  padding: 3px 8px;
}

.panel button:hover {
  border-color: var(--color-border-strong);
  color: var(--color-text-accent);
  box-shadow: var(--shadow-glow-cyan), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* ── 8. 面板尺寸变体（桌面端） ── */
/* 小面板: 设置、AI配置 */
#settings-panel { width: var(--panel-w-sm); right: var(--panel-offset); }
#ai-config-panel { width: min(430px, calc(100vw - 24px)); right: var(--panel-offset); }

/* 中面板: 新闻、账号 */
#news-panel { width: var(--panel-w-md); right: var(--panel-offset); }
#account-panel {
  width: min(520px, calc(100vw - 24px));
  right: var(--panel-offset);
}
#renew-panel { width: min(760px, calc(100vw - 24px)); right: var(--panel-offset); }

/* 大面板: 美股映射 */
#us-mapping-panel { width: var(--panel-w-lg); right: var(--panel-offset); }

/* 超大面板: 监控、数据管理 */
#monitoring-panel { width: var(--panel-w-xl); right: var(--panel-offset); }
#data-management-panel { width: var(--panel-w-xl); right: var(--panel-offset); }

/* AI工具面板 */
#ai-intel-panel,
#ai-position-panel,
#ai-research-panel,
#ai-stock-analysis-panel {
  width: min(840px, calc(100vw - 24px));
  right: var(--panel-offset);
}

/* 帮助文档面板 */
#help-doc-panel { width: min(980px, calc(100vw - 24px)); right: var(--panel-offset); }
#account-doc-panel { height: min(760px, calc(100vh - 74px)); }
#account-doc-panel .panel-body { flex: 1 1 auto; min-height: 0; overflow: auto; }

/* ── 9. 特殊面板: 菜单 / 提示 / 标的 ── */
#action-menu {
  position: absolute;
  right: 0;
  top: 38px;
  width: min(420px, calc(100vw - 24px));
  min-width: 260px;
  display: none;
  z-index: var(--z-action-menu);
  background: var(--gradient-card);
  border: 1px solid var(--color-border);
  border-radius: var(--ui-radius-md);
  box-shadow: var(--shadow-dropdown);
  padding: 8px;
}

#action-menu.open { display: block; }

#tooltip {
  position: fixed;
  pointer-events: auto;
  background: rgba(16, 16, 18, 0.98);
  border: 1px solid #444;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: var(--font-size-sm);
  line-height: 1.6;
  color: #c9d1d9;
  box-shadow: var(--shadow-tooltip);
  z-index: var(--z-tooltip);
  width: auto;
  min-width: 320px;
  max-width: min(760px, calc(100vw - 24px));
  display: none;
  flex-direction: column;
  border-left: 3px solid var(--color-up);
  max-height: 78vh;
  overflow-y: auto;
}

#stock-panel {
  position: fixed;
  top: 58px;
  right: 16px;
  width: min(760px, calc(100vw - 24px));
  max-height: 82vh;
  display: none;
  z-index: var(--z-stock-panel);
  overflow: hidden;
  flex-direction: column;
  background: rgba(13, 17, 23, 0.98);
  color: #e6edf3;
  border: 1px solid #30363d;
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.68);
}

#stock-chart-popover {
  position: fixed;
  display: none;
  z-index: 220;
  width: min(960px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  overflow: hidden;
  background: rgba(13, 17, 23, 0.99);
  color: #e6edf3;
  border: 1px solid #30363d;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.68);
  padding: 10px 12px;
  flex-direction: column;
}

/* ── 10. 强势赛道旋转视图 ── */
#rotation-view {
  position: fixed;
  inset: 49px 0 20px 0;
  z-index: 80;
  display: none;
  background: radial-gradient(circle at 20% 0%, rgba(88, 166, 255, 0.10), transparent 34%), #080b10;
  color: #e6edf3;
  overflow: hidden;
  border-top: 1px solid #222;
}

#rotation-view.open { display: flex; flex-direction: column; }

/* ── 11. L2 专注视图 ── */
#l2-focus-overlay,
#l2-stock-chart-modal {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.74);
  padding: 0;
}

#l2-focus-overlay.open,
#l2-stock-chart-modal.open { display: flex; }

.l2-focus-shell,
.l2-chart-shell {
  width: 90vw;
  height: 90dvh;
  max-width: none;
  max-height: none;
  background: #070b10;
  color: #e6edf3;
  border: 1px solid #30363d;
  border-radius: var(--ui-radius-md);
  box-shadow: var(--shadow-modal);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  margin: auto;
  position: relative;
}

.l2-chart-shell { width: min(72vw, 1180px); height: 68vh; }

.l2-focus-head,
.l2-chart-head {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 12px;
  border-bottom: 1px solid #263241;
  background: #0b1017;
}

.l2-focus-title,
.l2-chart-title {
  min-width: 0;
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-extrabold);
  color: #f0f6fc;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── 12. 生命周期覆盖层 ── */
#account-lifecycle-overlay {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(3, 6, 12, 0.58);
  backdrop-filter: blur(8px);
}

#account-lifecycle-overlay.visible { display: flex; }

.lifecycle-card {
  width: min(560px, calc(100vw - 24px));
  max-height: calc(100vh - 28px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #31445c;
  border-radius: var(--ui-radius-lg);
  background: linear-gradient(180deg, #101722, #080d14);
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.55);
}

/* ── 13. 手机端面板全屏化（≤760px） ── */
@media (max-width: 760px) {
  .panel,
  #us-mapping-panel,
  #monitoring-panel,
  #data-management-panel,
  #ai-config-panel,
  #ai-intel-panel,
  #ai-position-panel,
  #ai-research-panel,
  #ai-stock-analysis-panel,
  #help-doc-panel,
  #account-panel,
  #account-doc-panel,
  #renew-panel {
    left: 8px;
    right: 8px;
    top: 92px;
    bottom: 8px;
    width: auto;
    max-height: none;
    overflow: hidden;
    border-radius: 12px;
    z-index: 245;
  }

  .panel-body { padding: 10px; }
  .panel,
  #action-menu,
  #global-search-results,
  #tooltip,
  #stock-panel,
  .lifecycle-card,
  #rotation-view {
    border-radius: 16px;
  }

  #stock-panel {
    border-radius: 12px;
    z-index: 250;
    overflow: hidden;
    max-height: calc(100vh - 104px);
  }

  #stock-panel .stock-panel-body {
    max-height: calc(100vh - 204px);
    overflow: auto;
  }

  #stock-panel.mobile-side-left,
  #tooltip.mobile-side-left {
    left: 8px !important;
    right: auto !important;
    top: 92px !important;
    bottom: 8px !important;
    width: auto !important;
    max-width: calc(100vw - 16px) !important;
    max-height: calc(100vh - 100px) !important;
  }

  #stock-panel.mobile-side-right,
  #tooltip.mobile-side-right {
    right: 8px !important;
    left: auto !important;
    top: 92px !important;
    bottom: 8px !important;
    width: auto !important;
    max-width: calc(100vw - 16px) !important;
    max-height: calc(100vh - 100px) !important;
  }

  #stock-chart-popover {
    width: auto;
    max-height: 34vh;
    overflow: auto;
    border-radius: 12px;
    z-index: 270;
  }

  #stock-chart-popover svg {
    height: clamp(68px, 9vh, 110px);
  }

  #action-menu {
    position: fixed;
    left: 8px;
    right: 8px;
    top: 94px;
    width: auto;
    max-height: calc(100vh - 106px);
    overflow: auto;
    padding: 10px;
  }

  #tooltip {
    min-width: 0;
    max-width: none;
    max-height: calc(100vh - 104px);
    overflow: auto;
    pointer-events: auto;
    border-radius: 12px;
    scrollbar-width: thin;
  }

  #tooltip .tt-stocks {
    max-height: calc(100vh - 220px);
    overflow: auto;
  }

  .lifecycle-card {
    width: calc(100vw - 16px);
    max-height: calc(100vh - 16px);
  }

  #settings-panel { width: auto; }
  #settings-panel .row {
    grid-template-columns: minmax(86px, 0.86fr) minmax(132px, 1.14fr);
    gap: 7px 8px;
  }

  #rotation-view { inset: 86px 0 0 0; }

  #l2-focus-overlay,
  #l2-stock-chart-modal {
    align-items: center;
    justify-content: center;
    padding: 0;
  }

  .l2-focus-shell {
    width: 90vw;
    height: 90dvh;
    border-radius: 12px;
    border: 1px solid #30363d;
    margin: auto;
  }

  .l2-chart-shell {
    width: 92vw;
    height: 70dvh;
    border-radius: 12px;
    border: 1px solid #30363d;
    margin: auto;
  }

  .l2-focus-head,
  .l2-chart-head {
    min-height: 52px;
    align-items: flex-start;
    padding: 8px 10px;
  }

  .l2-focus-title,
  .l2-chart-title {
    font-size: 13px;
    white-space: normal;
    line-height: 1.25;
  }

  .l2-focus-close,
  .l2-chart-close {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
  }

  .l2-focus-body { padding: 6px; overflow: auto; -webkit-overflow-scrolling: touch; }
  #l2-focus-treemap { min-width: 0; min-height: 0; height: 100%; }
  .l2-chart-body { overflow: auto; padding: 8px; }
  .l2-chart-body svg {
    height: calc((70dvh - 92px) / 2);
    min-height: 0;
    min-width: 0;
  }
}

/* ── 14. 折叠屏折叠态 / 超小屏（≤390px） ── */
@media (max-width: 390px) {
  .panel,
  #us-mapping-panel,
  #monitoring-panel,
  #data-management-panel,
  #ai-config-panel,
  #ai-intel-panel,
  #ai-position-panel,
  #ai-research-panel,
  #ai-stock-analysis-panel,
  #help-doc-panel,
  #account-panel,
  #account-doc-panel,
  #renew-panel {
    left: 4px;
    right: 4px;
    top: 88px;
    bottom: 4px;
    border-radius: 10px;
    z-index: 245;
  }

  .panel-head {
    padding: 8px 10px;
  }

  .panel-body {
    padding: 8px;
  }

  .panel-head h3 {
    font-size: 12px;
  }

  #action-menu {
    left: 4px;
    right: 4px;
    top: 88px;
    border-radius: 10px;
  }
}

/* ── 15. 折叠屏展开态 / 平板（761px-980px）面板宽度自适应 ── */
@media (min-width: 761px) and (max-width: 980px) {
  .panel {
    width: min(480px, calc(100vw - 24px));
  }

  #us-mapping-panel,
  #monitoring-panel,
  #data-management-panel {
    width: min(760px, calc(100vw - 24px));
  }

  #account-panel {
    width: min(640px, calc(100vw - 24px));
    right: 12px;
  }

  #action-menu {
    width: min(680px, calc(100vw - 24px));
  }
}


/* ==================== css/components.css ==================== */
/* ============================================================
   A股景气捕手 — 原子组件库
   覆盖: 按钮/输入框/卡片/列表/标签/徽章/导航/表格/滚动条
   ============================================================ */

/* ── 1. 全局滚动条 ── */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 184, 107, 0.42) rgba(12, 8, 10, 0.82);
}

*::-webkit-scrollbar { width: 8px; height: 8px; }

*::-webkit-scrollbar-track {
  background: rgba(12, 8, 10, 0.82);
  border-radius: var(--ui-radius-full);
}

*::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(255, 184, 107, 0.55), rgba(114, 247, 255, 0.32));
  border-radius: var(--ui-radius-full);
  border: 2px solid rgba(12, 8, 10, 0.82);
}

*::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(255, 184, 107, 0.78), rgba(114, 247, 255, 0.48));
}

/* ── 2. 按钮系统 ── */

/* 2a. 通用按钮基类 */
#menu-button,
#account-button,
.top-control,
.top-control button,
.menu-action,
.rotation-controls button,
.rotation-window-tabs button,
.rotation-mode-tabs button,
.rotation-sort-tabs button,
.renew-pay-actions button,
.lifecycle-actions button,
.search-verify-btn,
#account-panel .account-login-methods button,
#account-panel .account-social-grid button,
.ai-profile-actions button,
.account-bind-actions button {
  border-radius: var(--ui-radius-sm);
  border: 1px solid var(--color-border);
  background: var(--gradient-btn);
  color: var(--color-text-primary);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.055);
  min-height: 32px;
  cursor: pointer;
  font-size: var(--font-size-sm);
}

#menu-button,
#account-button {
  width: 56px;
  min-width: 56px;
  height: 32px;
  padding: 0 10px;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-extrabold);
}

#menu-button { justify-self: end; }

/* 2b. 按钮悬停 */
#menu-button:hover,
#account-button:hover,
.panel button:hover,
.menu-action:hover,
.rotation-controls button:hover,
.renew-pay-actions button:hover,
.lifecycle-actions button:hover,
.search-verify-btn:hover,
.ai-profile-actions button:hover {
  border-color: var(--color-border-strong);
  color: var(--color-text-accent);
  box-shadow: var(--shadow-glow-cyan), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* 2c. 按钮激活态 */
.lifecycle-primary,
#account-panel .account-subnav button.active,
#account-panel .account-login-methods button.active,
.renew-plan-card.selected,
.rotation-window-tabs button.active,
.rotation-mode-tabs button.active,
.rotation-sort-tabs button.active,
.rotation-tab-wrap button[data-rotation-mode].active {
  border-color: rgba(114, 247, 255, 0.72);
  background: linear-gradient(135deg, rgba(255, 122, 61, 0.34), rgba(114, 247, 255, 0.18));
  color: #fff;
  box-shadow: 0 0 24px rgba(114, 247, 255, 0.16), 0 0 20px rgba(255, 122, 61, 0.12);
}

/* 2d. 菜单按钮 */
.menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(102px, 1fr));
  gap: 8px;
}

.menu-action {
  width: 100%;
  min-height: 32px;
  padding: 7px 9px;
  white-space: normal;
  line-height: 1.2;
  overflow-wrap: anywhere;
  word-break: break-word;
  height: auto;
}

.menu-section {
  padding: 6px 4px;
  border-bottom: 1px solid rgba(255, 184, 107, 0.16);
}

.menu-section:last-child { border-bottom: 0; }

.menu-title {
  font-size: 10px;
  color: var(--color-text-secondary);
  margin: 0 0 6px;
}

.menu-status {
  color: var(--color-text-primary);
  font-size: var(--font-size-xs);
  line-height: 1.5;
  word-break: break-all;
}

.menu-select-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  flex-wrap: wrap;
}

.menu-select-row select {
  flex: 1;
  min-width: 128px;
}

/* 2e. 顶部控制按钮 */
.top-control {
  background: #1a1a1a;
  color: #c9d1d9;
  border: 1px solid #333;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
}

.top-account {
  background: #111827;
  color: #e6edf3;
  border: 1px solid #334155;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  cursor: pointer;
}

.top-account:hover {
  color: #79c0ff;
  border-color: #4b5563;
  background: #1f2937;
}

.top-link {
  color: #c9d1d9;
  text-decoration: none;
  border: 1px solid #333;
  background: #1a1a1a;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
}

.top-link:hover { color: var(--rf-cyan); border-color: #444; }

/* ── 3. 输入框系统 ── */
#global-search-input,
.panel input,
.panel select,
.renew-code-row input,
.ai-field input,
.ai-field select,
.rotation-controls select,
.rotation-date-button {
  border-radius: var(--ui-radius-sm);
  border-color: var(--color-border);
  background: var(--gradient-input);
  color: var(--color-text-primary);
}

.rotation-date-button {
  min-width: 104px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  background: #161b22;
  color: #e6edf3;
  border: 1px solid #30363d;
  border-radius: 8px;
  padding: 5px 8px;
  font-size: var(--font-size-sm);
  cursor: pointer;
}

.rotation-date-button::after {
  content: "▾";
  color: #8b949e;
  font-size: 10px;
}

.rotation-date-button.has-date {
  color: #79c0ff;
  border-color: #365f91;
}

/* ── 4. 卡片系统 ── */

/* 4a. 卡片基类（用于面板内部内容块） */
.news-item,
.search-sector-reason,
.search-kpi,
.account-bind-card,
.renew-plan-card,
.follow-result-card,
.account-login-card,
.ai-profile-card {
  border: 1px solid var(--color-border);
  border-radius: var(--ui-radius-md);
  background: var(--gradient-card-alt);
}

/* 4b. 新闻卡片 */
.news-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.news-item {
  padding: 10px;
  border-radius: 12px;
}

.news-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.news-item-source { font-size: var(--font-size-xs); color: var(--rf-cyan); }

.news-item-time {
  font-size: var(--font-size-xs);
  color: var(--color-text-secondary);
  white-space: nowrap;
}

.news-item-title {
  font-size: 13px;
  font-weight: var(--font-weight-bold);
  color: var(--color-text-primary);
  line-height: 1.45;
}

.news-item-summary {
  margin-top: 6px;
  font-size: var(--font-size-sm);
  line-height: 1.6;
  color: #d3c3ad;
  white-space: pre-wrap;
}

.news-item-link {
  display: inline-flex;
  margin-top: 8px;
  font-size: var(--font-size-xs);
  color: var(--rf-cyan);
  text-decoration: none;
}

.news-source-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.news-source-chip {
  border: 1px solid rgba(255, 184, 107, 0.18);
  border-radius: var(--ui-radius-full);
  padding: 5px 9px;
  font-size: var(--font-size-xs);
  color: var(--color-text-secondary);
  background: rgba(255, 184, 107, 0.05);
}

/* 4c. 通用标签/徽章 */
.monitoring-pill,
.rotation-chip,
.monitoring-chip,
.rotation-badge,
.social-plugin-mobile-pill,
.social-plugin-job-tag,
.search-result-item .type {
  display: inline-flex;
  align-items: center;
  border: 1px solid #30363d;
  border-radius: var(--ui-radius-full);
  padding: 2px 7px;
  font-size: 10px;
  white-space: nowrap;
}

.monitoring-pill.good,
.monitoring-chip.good { border-color: #2ea043; color: #7ee787; }

.monitoring-pill.warn,
.monitoring-chip.warn { border-color: #d29922; color: #ffd33d; }

.monitoring-pill.bad,
.monitoring-chip.bad { border-color: #f85149; color: #ff7b72; }

.rotation-chip.good { color: #7ee787; border-color: #2ea043; background: rgba(46, 160, 67, 0.10); }
.rotation-chip.warn { color: #ffd33d; border-color: #d29922; background: rgba(210, 153, 34, 0.10); }
.rotation-chip.bad { color: #ff7b72; border-color: #f85149; background: rgba(248, 81, 73, 0.10); }

.rotation-badge {
  font-size: 9px;
  line-height: 1;
  color: #fff;
  background: rgba(0, 0, 0, 0.46);
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 2px 5px;
}

/* 4d. 拼音徽章 */
.pinyin-badge {
  display: inline-flex;
  align-items: center;
  min-width: 34px;
  justify-content: center;
  border: 1px solid rgba(255, 184, 107, 0.4);
  border-radius: var(--ui-radius-full);
  padding: 1px 6px;
  margin-right: 6px;
  color: #f0b07a;
  font-size: 10px;
  background: rgba(255, 184, 107, 0.08);
}

/* 4e. 状态徽章 */
.monitoring-status {
  display: inline-flex;
  align-items: center;
  border-radius: var(--ui-radius-full);
  padding: 1px 6px;
  font-size: 10px;
  border: 1px solid #30363d;
  color: #c9d1d9;
  white-space: nowrap;
}

.monitoring-status.ok { border-color: #2ea043; color: #7ee787; }
.monitoring-status.warn { border-color: #d29922; color: #ffd33d; }
.monitoring-status.bad { border-color: #f85149; color: #ff7b72; }

/* ── 5. 表格系统 ── */

/* 5a. 标的列表面板表格 */
#stock-panel .stock-panel-head {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--gradient-head);
  padding: 12px;
  border-bottom: 1px solid rgba(255, 184, 107, 0.22);
}

#stock-panel .stock-panel-title {
  font-weight: var(--font-weight-extrabold);
  font-size: var(--font-size-md);
  color: var(--color-text-primary);
  text-shadow: 0 0 12px rgba(255, 184, 107, 0.18);
  padding-right: 24px;
}

#stock-panel .stock-panel-meta {
  font-size: var(--font-size-xs);
  color: var(--color-text-secondary);
  margin-top: 4px;
}

#stock-panel .stock-panel-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-size: var(--font-size-xs);
  color: var(--color-text-secondary);
}

#stock-panel .stock-panel-toolbar select {
  background: #161b22;
  color: #f0f6fc;
  border: 1px solid #30363d;
  border-radius: 4px;
  padding: 3px 6px;
  font-size: var(--font-size-xs);
  outline: none;
}

#stock-panel table.stock-rows-table {
  table-layout: fixed;
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
}

#stock-panel table.stock-rows-table thead.stock-rows-thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #161b22;
  color: #8b949e;
  text-align: left;
  padding: 6px 10px;
  border-bottom: 1px solid #30363d;
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-sm);
  white-space: nowrap;
}

#stock-panel table.stock-rows-table tbody.stock-rows-body td {
  padding: 6px 10px;
  border-bottom: 1px solid #21262d;
  white-space: nowrap;
  vertical-align: middle;
}

#stock-panel tr:hover {
  background: rgba(255, 184, 107, 0.08);
}

#stock-panel .stock-name {
  font-weight: var(--font-weight-bold);
  color: var(--rf-cyan);
  cursor: crosshair;
}

#stock-panel td.up { color: var(--color-up); }
#stock-panel td.down { color: var(--color-down); }

/* 5b. 分类标签 */
.group-龙头 { background: rgba(255, 59, 48, 0.15); color: var(--color-up); }
.group-核心 { background: rgba(48, 209, 88, 0.15); color: #34c759; }
.group-弹性概念 { background: rgba(175, 82, 222, 0.15); color: #af52de; }

/* ── 6. 搜索相关组件 ── */
.search-result-head {
  padding: 8px 10px;
  color: var(--color-text-secondary);
  font-size: var(--font-size-xs);
  border-bottom: 1px solid rgba(255, 184, 107, 0.16);
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.search-result-list {
  max-height: 430px;
  overflow: auto;
  scrollbar-color: rgba(255, 184, 107, 0.45) rgba(20, 14, 17, 0.8);
}

.search-result-item {
  padding: 9px 10px;
  border-bottom: 1px solid rgba(255, 184, 107, 0.16);
  cursor: pointer;
  font-size: var(--font-size-sm);
  line-height: 1.45;
}

.search-result-item:hover {
  background: rgba(255, 184, 107, 0.08);
}

.search-result-item b { color: var(--color-text-primary); }

.search-result-item .type {
  min-width: 34px;
  justify-content: center;
  margin-right: 6px;
  color: var(--rf-cyan);
}

.search-result-item .muted {
  color: var(--color-text-secondary);
  font-size: var(--font-size-xs);
  margin-top: 2px;
}

.search-result-item .pinyin-hint {
  color: #f0b07a;
  font-size: 10px;
  margin-top: 2px;
}

.search-stock-detail { display: grid; gap: 8px; padding: 10px; }

.search-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.search-kpi {
  border-radius: 7px;
  padding: 7px;
  min-width: 0;
}

.search-kpi span {
  display: block;
  color: var(--color-text-secondary);
  font-size: 10px;
}

.search-kpi b {
  display: block;
  color: var(--color-text-primary);
  font-size: 13px;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-sector-reason {
  border-radius: 8px;
  padding: 8px;
  white-space: normal;
  line-height: 1.55;
}

.search-sector-reason h4 {
  margin: 0 0 5px;
  color: var(--color-text-primary);
  font-size: var(--font-size-sm);
}

.search-sector-reason .reason {
  color: #c9d1d9;
  font-size: var(--font-size-xs);
  max-height: 128px;
  overflow: auto;
  white-space: pre-wrap;
}

.search-verify-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 2px 0 4px;
}

.search-verify-btn {
  border-radius: var(--ui-radius-full);
  padding: 5px 10px;
  font-size: var(--font-size-xs);
  cursor: pointer;
  border-color: rgba(114, 247, 255, 0.34);
  background: rgba(16, 34, 58, 0.6);
  color: #79c0ff;
}

.search-verify-btn:hover {
  color: var(--color-text-accent);
  border-color: rgba(114, 247, 255, 0.6);
}

.search-verify-output {
  border: 1px solid #30363d;
  background: #0b1118;
  border-radius: 8px;
  padding: 8px;
  color: #c9d1d9;
  font-size: var(--font-size-xs);
  line-height: 1.55;
  white-space: normal;
}

.search-verify-output a { color: var(--rf-cyan); text-decoration: none; }

.search-history-head {
  padding: 7px 10px;
  color: var(--color-text-secondary);
  font-size: 10.5px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  background: rgba(255, 184, 107, 0.05);
  border-bottom: 1px solid #21262d;
}

.search-history-head .clear {
  cursor: pointer;
  color: #58a6ff;
  font-size: 10px;
}

.search-history-head .clear:hover { color: #79c0ff; }

.search-history-item {
  padding: 8px 10px;
  border-bottom: 1px solid #1f2933;
  cursor: pointer;
  font-size: var(--font-size-sm);
  line-height: 1.4;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.search-history-item:hover { background: #111b28; }
.search-history-item b { color: #f0f6fc; font-weight: var(--font-weight-semibold); }

.search-history-item .del {
  cursor: pointer;
  color: #8b949e;
  font-size: var(--font-size-xs);
  padding: 0 4px;
  border-radius: 4px;
  flex-shrink: 0;
}

.search-history-item .del:hover {
  color: #ff7b6b;
  background: rgba(255, 123, 107, 0.08);
}

/* ── 7. AI 工具组件 ── */
.ai-field {
  display: grid;
  gap: 5px;
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
}

.ai-field input,
.ai-field select {
  width: 100%;
  background: var(--gradient-input);
  color: #f0f6fc;
  border: 1px solid #333;
  border-radius: 5px;
  padding: 7px 8px;
  font-size: var(--font-size-sm);
}

.ai-check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--color-text-primary);
  font-size: var(--font-size-sm);
}

.ai-check-row input { width: auto; }

.ai-warn {
  color: #ffb480;
  background: rgba(255, 184, 107, 0.08);
  border: 1px solid rgba(255, 184, 107, 0.32);
  border-radius: 7px;
  padding: 7px 9px;
  font-size: var(--font-size-sm);
  line-height: 1.45;
  word-break: break-word;
}

.ai-config-summary {
  border: 1px solid #30363d;
  background: linear-gradient(180deg, #101722, #0d1117);
  border-radius: 9px;
  padding: 10px;
}

.ai-config-summary-title {
  color: #f0f6fc;
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-sm);
  margin-bottom: 8px;
}

.ai-config-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.ai-config-summary-grid div {
  border: 1px solid #242c36;
  border-radius: 7px;
  background: #0b1118;
  padding: 6px;
  min-width: 0;
}

.ai-config-summary-grid span {
  display: block;
  color: var(--color-text-secondary);
  font-size: 10px;
}

.ai-config-summary-grid b {
  display: block;
  color: #f0f6fc;
  font-size: var(--font-size-sm);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 2px;
}

.ai-disclaimer {
  color: #ffd33d;
  border: 1px solid #5d4411;
  background: rgba(210, 153, 34, 0.10);
  border-radius: 8px;
  padding: 8px;
  font-size: var(--font-size-xs);
  line-height: 1.55;
}

/* ── 8. 手机端组件调整 ── */
@media (max-width: 760px) {
  .menu-grid {
    grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
    gap: 7px;
  }

  .menu-action {
    min-height: 38px;
    height: auto;
    padding: 7px 6px;
    white-space: normal;
    line-height: 1.18;
    word-break: break-word;
    overflow-wrap: anywhere;
  }

  .menu-select-row {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .menu-select-row select {
    min-width: 0;
    width: 100%;
    flex: 1 1 100%;
  }

  .top-control,
  .panel button,
  .top-control button {
    white-space: normal;
    line-height: 1.18;
    height: auto;
    min-height: 32px;
  }

  .news-source-strip { gap: 4px; }
}

/* ── 9. 折叠屏折叠态组件调整 ── */
@media (max-width: 390px) {
  .menu-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .news-item-title { font-size: 12px; }
  .news-item-summary { font-size: 11px; }
}

@media (max-width: 380px) {
  #menu-button,
  #account-button {
    width: 52px !important;
    min-width: 52px !important;
  }
}

/* ── 10. 帮助文档组件 ── */
.help-doc-body {
  display: grid;
  gap: 12px;
  color: #c9d1d9;
  font-size: var(--font-size-sm);
  line-height: var(--line-height-relaxed);
}

.help-doc-hero {
  border: 1px solid #30363d;
  background: linear-gradient(180deg, #101722, #0d1117);
  border-radius: 10px;
  padding: 12px;
}

.help-doc-hero h4,
.help-doc-section h4 {
  margin: 0 0 6px;
  color: #f0f6fc;
  font-size: var(--font-size-md);
}

.help-doc-section {
  border: 1px solid #30363d;
  background: #0d131b;
  border-radius: 10px;
  padding: 12px;
  min-width: 0;
}

.help-doc-section ul { margin: 6px 0 0 18px; }

.help-doc-shot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
}

.help-doc-shot {
  border: 1px solid #242c36;
  border-radius: 10px;
  background: #0b1118;
  padding: 8px;
  min-width: 0;
}

.help-doc-shot b {
  display: block;
  color: #f0f6fc;
  font-size: var(--font-size-sm);
  margin-bottom: 6px;
}

.help-doc-shot img {
  display: block;
  width: 100%;
  max-height: 280px;
  object-fit: contain;
  border-radius: 8px;
  background: #05080c;
  border: 1px solid #202a34;
}

.help-doc-shot p {
  margin: 6px 0 0;
  color: var(--color-text-secondary);
  font-size: var(--font-size-xs);
  line-height: 1.5;
}

/* ── 11. Markdown 内容组件 ── */
.markdown-body {
  color: #c9d1d9;
  font-size: var(--font-size-sm);
  line-height: var(--line-height-relaxed);
  border-top: 1px solid #252525;
  padding-top: 10px;
}

.markdown-body h1 { font-size: var(--font-size-xl); color: #f0f6fc; margin: 8px 0 10px; }
.markdown-body h2 { font-size: 15px; color: #f0f6fc; margin: 14px 0 8px; }
.markdown-body h3 { font-size: 13px; color: #f0f6fc; margin: 12px 0 6px; }
.markdown-body p { margin: 6px 0; }

.markdown-body blockquote {
  border-left: 3px solid #30363d;
  padding-left: 8px;
  color: var(--color-text-secondary);
  margin: 6px 0;
}

.markdown-body ul,
.markdown-body ol { margin: 6px 0 8px 18px; }

.markdown-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 8px 0;
  font-size: var(--font-size-xs);
}

.markdown-body th,
.markdown-body td {
  border: 1px solid #30363d;
  padding: 5px 6px;
  vertical-align: top;
}

.markdown-body th {
  background: #161b22;
  color: var(--color-text-secondary);
  font-weight: var(--font-weight-semibold);
}

.markdown-body code {
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 3px;
  padding: 1px 4px;
}

.markdown-body pre {
  background: #0b0f14;
  border: 1px solid #30363d;
  border-radius: 6px;
  padding: 8px;
  overflow: auto;
}

/* ── 12. 特殊工具类 ── */
.hidden-small { display: none; }
.favorite-star { fill: #f5c518; stroke: #111; stroke-width: 1px; pointer-events: none; }

/* ── 13. 版本/时钟等辅助 ── */
#clock {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  font-variant-numeric: tabular-nums;
}

.app-version {
  color: var(--color-text-secondary);
  font-size: 10px;
  font-weight: var(--font-weight-bold);
  margin-left: 4px;
}

.app-logo {
  width: 24px;
  height: 24px;
  object-fit: contain;
  display: block;
  flex: 0 0 24px;
  filter: drop-shadow(0 0 8px rgba(114, 247, 255, 0.22));
}

@media (max-width: 760px) {
  .app-logo { width: 20px; height: 20px; flex-basis: 20px; }
}

@media (max-width: 380px) {
  .app-logo { width: 18px; height: 18px; flex-basis: 18px; }
}


/* ==================== css/heatmap.css ==================== */
/* ============================================================
   A股景气捕手 — 热力图专属样式
   覆盖: D3.js v7 Treemap / SVG / L1-L3 层级 / 信号帧
   ============================================================ */

/* ── 1. L1 层级（一级赛道板块边界） ── */
.l1-title-bar {
  fill: rgba(22, 12, 15, 0.92);
  /* 覆盖旧值: rgba(0,0,0,0.88) */
}

.l1-boundary {
  fill: none;
  stroke: var(--rf-orange);
  stroke-opacity: 0.9;
  stroke-width: 1.5px;
  pointer-events: none;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 0 2px rgba(212, 185, 122, 0.18));
}

.l1-title-text {
  fill: #ffffff;
  font-size: 12px;
  font-weight: 850;
  pointer-events: none;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.98), 0 0 8px rgba(255, 184, 107, 0.18);
}

/* ── 2. L2 层级（中板板块） ── */
.l2-title-bar {
  fill: rgba(19, 12, 14, 0.78);
  /* 覆盖旧值: rgba(0,0,0,0.72) */
}

.l2-hover-frame {
  fill: none;
  stroke: transparent;
  stroke-width: 3px;
  pointer-events: none;
  vector-effect: non-scaling-stroke;
}

.l2-hover-frame.active {
  stroke: var(--rf-amber);
}

.l2-title-text {
  font-size: 10px;
  font-weight: 800;
  pointer-events: none;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.98), 0 0 8px rgba(255, 184, 107, 0.18);
  text-anchor: middle;
}

.l2-rect {
  stroke: #211317;
  stroke-width: 1px;
  cursor: pointer;
  transition: stroke 0.15s, stroke-width 0.15s;
}

.l2-rect:hover {
  stroke: var(--rf-amber);
  stroke-width: 2px;
}

/* ── 3. L3 层级（小色块） ── */
.l3-rect {
  stroke: #140c0e;
  stroke-width: 0.5px;
  cursor: pointer;
}

.l3-rect:hover {
  stroke: var(--rf-cyan);
  stroke-width: 1px;
  filter: brightness(1.13) saturate(1.06);
}

/* ── 4. 节点文字（强制白色，杜绝继承） ── */
.node-text {
  fill: #ffffff !important;
  font-weight: 700 !important;
  pointer-events: none;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.95);
  text-anchor: middle;
  letter-spacing: 0.01em;
}

.node-text tspan {
  fill: #ffffff !important;
  font-weight: 700 !important;
}

.node-text.l3-node-text,
.node-text.l3-node-text tspan {
  font-weight: 500 !important;
  letter-spacing: 0.02em;
}

/* ── 5. 美股映射信号帧 ── */
.us-signal-frame {
  fill: none;
  pointer-events: none;
  stroke-width: 2.4px;
  vector-effect: non-scaling-stroke;
  opacity: 0.95;
}

.us-signal-frame.positive {
  stroke: var(--color-up);
  filter: drop-shadow(0 0 3px rgba(255, 59, 48, 0.62));
}

.us-signal-frame.negative {
  stroke: var(--color-down);
  filter: drop-shadow(0 0 3px rgba(52, 199, 89, 0.62));
}

/* ── 6. L2 专注视图中样式 ── */
.l2-focus-l3-rect {
  stroke: var(--color-up);
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

.l2-focus-l3-title-bg {
  fill: rgba(0, 0, 0, 0.88);
}

.l2-focus-stock-rect {
  stroke: rgba(10, 10, 10, 0.86);
  stroke-width: 1;
  cursor: pointer;
}

.l2-focus-stock-node:hover .l2-focus-stock-rect {
  stroke: #f1c40f;
  stroke-width: 2;
  filter: brightness(1.12);
}

.l2-focus-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 8px;
  background: radial-gradient(circle at 10% 0%, rgba(88, 166, 255, 0.09), transparent 36%), #06090e;
}

#l2-focus-treemap {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  display: block;
  background: #05080d;
  border: 1px solid #263241;
  border-radius: 10px;
}

.l2-focus-empty {
  color: var(--color-text-secondary);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
}

.l2-focus-meta {
  color: var(--color-text-secondary);
  font-size: var(--font-size-xs);
  white-space: nowrap;
}

.l2-chart-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 12px;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-content: stretch;
  background: #05080d;
}

.l2-chart-body svg {
  width: 100%;
  height: calc((68vh - 88px) / 2);
  min-height: 0;
  display: block;
  background: #0b0f14;
  border: 1px solid #30363d;
  border-radius: 8px;
}

@media (max-width: 760px) {
  .l2-focus-shell { width: 96vw; height: 94vh; }
  .l2-chart-shell { width: 92vw; height: 70dvh; margin: auto; }
  .l2-chart-body svg { height: calc((70dvh - 92px) / 2); }
}

/* ── 7. L1/L2 标题文字微调（retro-futurism 覆盖） ── */
.l1-title-text {
  font-size: 12px;
  font-weight: 850;
}

.l2-title-text {
  font-size: 10px;
  font-weight: 800;
}


/* ==================== help_tour.css ==================== */
/* 通用首次使用引导 */
#ashare-help-tour {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: none;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(2px);
}
#ashare-help-tour.open { display: block; }
.ashare-help-card {
  position: fixed;
  z-index: 12001;
  width: min(420px, calc(100vw - 24px));
  max-height: min(72vh, 680px);
  overflow: hidden;
  background: rgba(13, 17, 23, 0.98);
  border: 1px solid #30363d;
  border-radius: 14px;
  box-shadow: 0 22px 80px rgba(0, 0, 0, 0.62);
  color: #c9d1d9;
  padding: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.ashare-help-card h3 {
  color: #f0f6fc;
  font-size: 15px;
  line-height: 1.3;
  margin: 0;
}
.ashare-help-card p, .ashare-help-card li {
  font-size: 12px;
  line-height: 1.6;
  color: #c9d1d9;
}
.ashare-help-card ul { margin: 6px 0 0 18px; }
.ashare-help-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
  flex: 0 0 auto;
  padding: 12px 12px 10px;
  border-bottom: 1px solid #21262d;
  background: rgba(13, 17, 23, 0.98);
}
.ashare-help-title {
  min-width: 0;
  padding-right: 8px;
}
.ashare-help-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 10px 12px 0;
  -webkit-overflow-scrolling: touch;
}
.ashare-help-close {
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #f85149;
  background: #b42318;
  color: #fff;
  border-radius: 8px;
  font-size: 20px;
  font-weight: 900;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.12) inset;
}
.ashare-help-close:hover {
  background:#d92d20;
  border-color:#ff7b72;
  color:#fff;
}
.ashare-help-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  flex: 0 0 auto;
  margin-top: 0;
  padding: 10px 12px;
  border-top: 1px solid #21262d;
  background: rgba(13, 17, 23, 0.98);
}
.ashare-help-step {
  color: #8b949e;
  font-size: 11px;
}
.ashare-help-dismiss-toggle {
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: #c9d1d9;
  font-size: 12px;
  line-height: 1.45;
}
.ashare-help-dismiss-toggle input {
  margin-top: 2px;
  accent-color: #79c0ff;
}
.ashare-help-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.ashare-help-actions button {
  border: 1px solid #30363d;
  background: #111827;
  color: #f0f6fc;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 12px;
  cursor: pointer;
}
.ashare-help-actions button.primary {
  border-color: #2f81f7;
  background: #10223a;
  color: #79c0ff;
}
.ashare-help-highlight {
  position: relative;
  z-index: 4001 !important;
  outline: 2px solid rgba(245, 197, 24, 0.95) !important;
  box-shadow: 0 0 0 6px rgba(245, 197, 24, 0.16) !important;
  border-radius: 10px !important;
}
@media (max-width: 760px) {
  .ashare-help-card {
    width: calc(100vw - 16px);
    max-height: 52vh;
    border-radius: 12px;
  }
  .ashare-help-body { padding: 9px 10px 0; }
  .ashare-help-foot { padding: 9px 10px; }
}

