/* QUANT NEON theme layer — 覆盖基础皮肤，提供两档：日常 / DEMO。 */
:root {
  --bg: #050410;
  --bg-soft: #07051a;
  --panel: #0d0818;
  --panel-2: #120b21;
  --panel-3: #0a0616;
  --line: rgba(244, 114, 182, 0.18);
  --line-strong: rgba(244, 114, 182, 0.36);
  --text: #f3ecff;
  --text-2: #a99cc0;
  --text-3: #72678c;
  --accent: #f472b6;
  --accent-strong: #ff9ed6;
  --accent-soft: rgba(244, 114, 182, 0.12);
  --observed: #22d3ee;
  --derived: #a78bfa;
  --suggested: #fbbf24;
  --confirmed: #34d399;
  --radius-lg: 12px;
  --radius: 10px;
  --radius-sm: 7px;
  --shadow-panel: inset 0 0 26px rgba(244, 114, 182, 0.035), 0 18px 44px -26px rgba(0, 0, 0, 0.95);
}

html {
  background: var(--bg);
}

body {
  background-color: var(--bg);
  background-image:
    radial-gradient(1200px 560px at 12% -12%, rgba(244, 114, 182, 0.16), transparent 58%),
    radial-gradient(1000px 560px at 88% -8%, rgba(167, 139, 250, 0.16), transparent 56%),
    radial-gradient(900px 620px at 50% 115%, rgba(34, 211, 238, 0.06), transparent 62%),
    linear-gradient(180deg, #050410 0%, #07051a 55%, #050410 100%);
}

body::before {
  background-image:
    linear-gradient(rgba(244, 114, 182, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(244, 114, 182, 0.045) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse at 50% 40%, #000 30%, transparent 78%);
}

/* 粒子 / 文字雨画布 */
.fx-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.9;
}

/* 顶栏霓虹 */
.topbar {
  background: linear-gradient(180deg, rgba(9, 5, 20, 0.95), rgba(5, 4, 16, 0.9));
  border-bottom: 1px solid rgba(244, 114, 182, 0.24);
  box-shadow: 0 1px 0 rgba(244, 114, 182, 0.18), 0 0 24px rgba(244, 114, 182, 0.1);
}

.brand-name {
  text-shadow: 0 0 18px rgba(244, 114, 182, 0.4);
}

/* 导航激活态 */
.nav-item.is-active {
  background: linear-gradient(90deg, rgba(244, 114, 182, 0.16), transparent);
  border-color: rgba(244, 114, 182, 0.4);
  box-shadow: 0 0 20px rgba(244, 114, 182, 0.12) inset;
}

/* 按钮 */
.btn-primary {
  background: linear-gradient(180deg, rgba(244, 114, 182, 0.28), rgba(244, 114, 182, 0.12));
  border-color: rgba(244, 114, 182, 0.6);
  color: #fff;
  box-shadow: 0 0 20px rgba(244, 114, 182, 0.3);
}

.btn-mode {
  border-color: rgba(244, 114, 182, 0.5);
  color: var(--accent);
  background: rgba(244, 114, 182, 0.09);
}

body[data-mode="demo"] .btn-mode {
  color: #fff;
  background: linear-gradient(180deg, rgba(244, 114, 182, 0.34), rgba(167, 139, 250, 0.16));
  box-shadow: 0 0 24px rgba(244, 114, 182, 0.42);
}

/* 统计卡：3D 倾斜 + 里程表数字 */
.stats {
  perspective: 1200px;
}

.stat-card {
  transform: perspective(1000px) rotateX(2deg) rotateY(-3deg);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  border-color: rgba(244, 114, 182, 0.2);
}

body[data-mode="demo"] .stat-card {
  transform: perspective(820px) rotateX(5deg) rotateY(-7deg);
  box-shadow: 0 0 30px rgba(244, 114, 182, 0.16), inset 0 0 24px rgba(244, 114, 182, 0.06);
}

.stat-num {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  font-family: var(--font-mono);
}

.qdigit {
  display: inline-block;
  min-width: 0.62em;
  padding: 1px 3px;
  text-align: center;
  border-radius: 3px;
  border: 1px solid rgba(244, 114, 182, 0.28);
  background: linear-gradient(180deg, rgba(244, 114, 182, 0.16), rgba(244, 114, 182, 0));
  text-shadow: 0 0 14px rgba(244, 114, 182, 0.8);
  animation: qpop 0.45s ease both;
}

.qsep {
  opacity: 0.55;
}

@keyframes qpop {
  from {
    transform: translateY(6px) scale(0.9);
    opacity: 0;
  }
  to {
    transform: none;
    opacity: 1;
  }
}

/* 顶部滚动 ticker */
.quant-ticker {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  height: 30px;
  overflow: hidden;
  border-bottom: 1px solid rgba(244, 114, 182, 0.22);
  background: linear-gradient(90deg, rgba(244, 114, 182, 0.08), rgba(167, 139, 250, 0.05), rgba(34, 211, 238, 0.05));
}

.quant-ticker::before,
.quant-ticker::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 80px;
  z-index: 2;
  pointer-events: none;
}

.quant-ticker::before {
  left: 0;
  background: linear-gradient(90deg, var(--bg), transparent);
}

.quant-ticker::after {
  right: 0;
  background: linear-gradient(270deg, var(--bg), transparent);
}

.quant-ticker-track {
  display: flex;
  gap: 26px;
  padding-left: 12px;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.05em;
  animation: qmarquee 30s linear infinite;
  will-change: transform;
}

@keyframes qmarquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

.qt {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--text-2);
}

.qt b {
  color: var(--text);
}

.qt .up {
  color: var(--confirmed);
}

.qt .warn {
  color: var(--suggested);
}

.qt .cy {
  color: var(--observed);
}

.qt-sep {
  color: rgba(167, 139, 250, 0.4);
}

/* DEMO：更强的辉光与环形/置信度狂闪 */
body[data-mode="demo"] .panel,
body[data-mode="demo"] .stat-card {
  border-color: rgba(244, 114, 182, 0.34);
}

body[data-mode="demo"] .workspace-detail {
  animation: qflash 1.1s ease-in-out infinite;
}

@keyframes qflash {
  0%,
  100% {
    box-shadow: 0 0 0 rgba(244, 114, 182, 0);
  }
  50% {
    box-shadow: 0 0 28px rgba(244, 114, 182, 0.32);
  }
}

body[data-mode="demo"] .conf-meter i {
  animation: qmeter 0.7s ease-in-out infinite;
}

@keyframes qmeter {
  0%,
  100% {
    filter: brightness(1);
  }
  50% {
    filter: brightness(1.7);
  }
}

/* 减少动效：全部静态化 */
@media (prefers-reduced-motion: reduce) {
  .quant-ticker-track {
    animation: none;
  }
  .qdigit {
    animation: none;
  }
  body[data-mode="demo"] .workspace-detail {
    animation: none;
  }
  body[data-mode="demo"] .conf-meter i {
    animation: none;
  }
  .stat-card {
    transform: none;
  }
}

/* 窄屏收敛 */
@media (max-width: 767px) {
  .stat-card {
    transform: none;
  }
  .quant-ticker {
    height: 26px;
  }
  .quant-ticker-track {
    animation-duration: 40s;
  }
}

/* 宽屏大屏：放宽容器，更接近量化终端铺满感 */
@media (min-width: 1600px) {
  :root {
    --shell-max: 1880px;
    --pad: 18px;
  }
}

/* ============================================================
   DEMO 增强层：更接近量化终端大屏
   ============================================================ */
body[data-mode="demo"] {
  background-color: #03020a;
  background-image:
    radial-gradient(1200px 560px at 12% -12%, rgba(244, 114, 182, 0.22), transparent 58%),
    radial-gradient(1000px 560px at 88% -8%, rgba(167, 139, 250, 0.24), transparent 56%),
    radial-gradient(900px 620px at 50% 115%, rgba(34, 211, 238, 0.10), transparent 62%),
    linear-gradient(180deg, #03020a 0%, #07051a 55%, #03020a 100%);
}

/* 半透明玻璃面板，让粒子/文字雨透出来 */
body[data-mode="demo"] .panel,
body[data-mode="demo"] .stat-card,
body[data-mode="demo"] .nav-rail,
body[data-mode="demo"] .workspace-detail,
body[data-mode="demo"] .filters-panel,
body[data-mode="demo"] .timeline-panel,
body[data-mode="demo"] .heatmap-panel {
  background: rgba(10, 6, 20, 0.58);
  backdrop-filter: blur(10px) saturate(140%);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  border-color: rgba(244, 114, 182, 0.42);
  box-shadow: 0 0 34px rgba(244, 114, 182, 0.18), inset 0 0 30px rgba(244, 114, 182, 0.06);
}

body[data-mode="demo"] .topbar {
  background: linear-gradient(180deg, rgba(9, 5, 20, 0.72), rgba(5, 4, 16, 0.62));
  backdrop-filter: blur(12px) saturate(150%);
  -webkit-backdrop-filter: blur(12px) saturate(150%);
}

/* 扫描线 + 扫描光带 */
.q-scan,
.q-beam {
  display: none;
}

body[data-mode="demo"] .fx-canvas {
  opacity: 1;
}

body[data-mode="demo"] .q-scan {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.03) 0 1px, transparent 1px 3px);
  animation: qscan 9s linear infinite;
}

@keyframes qscan {
  from {
    background-position: 0 0;
  }
  to {
    background-position: 0 300px;
  }
}

body[data-mode="demo"] .q-beam {
  display: block;
  position: fixed;
  left: 0;
  right: 0;
  top: -25%;
  height: 26%;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(244, 114, 182, 0.16), rgba(167, 139, 250, 0.08), transparent);
  animation: qbeam 6s linear infinite;
}

@keyframes qbeam {
  from {
    transform: translateY(-30%);
  }
  to {
    transform: translateY(320%);
  }
}

/* 详情面板：旋转极光描边 + HUD 角标 */
body[data-mode="demo"] .workspace-detail {
  position: relative;
}

body[data-mode="demo"] .workspace-detail::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  pointer-events: none;
  background: conic-gradient(
    from 0deg,
    transparent,
    rgba(244, 114, 182, 0.85),
    transparent 30%,
    rgba(167, 139, 250, 0.85),
    transparent 62%,
    rgba(34, 211, 238, 0.7),
    transparent
  );
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: qspin 7s linear infinite;
}

body[data-mode="demo"] .workspace-detail::after {
  content: "";
  position: absolute;
  top: 8px;
  right: 8px;
  width: 14px;
  height: 14px;
  border-top: 1px solid rgba(244, 114, 182, 0.85);
  border-right: 1px solid rgba(244, 114, 182, 0.85);
  pointer-events: none;
}

/* 热力图面板：雷达扫掠 */
body[data-mode="demo"] .heatmap-panel {
  position: relative;
  overflow: hidden;
}

body[data-mode="demo"] .heatmap-panel::before {
  content: "";
  position: absolute;
  inset: -45%;
  pointer-events: none;
  z-index: 0;
  background: conic-gradient(from 0deg, transparent 0 330deg, rgba(244, 114, 182, 0.18) 360deg);
  animation: qspin 6s linear infinite;
}

body[data-mode="demo"] .heatmap-panel > * {
  position: relative;
  z-index: 1;
}

/* 里程表数字放大 + 更强辉光 */
body[data-mode="demo"] .stat-num {
  gap: 3px;
}

body[data-mode="demo"] .qdigit {
  border-color: rgba(244, 114, 182, 0.55);
  background: linear-gradient(180deg, rgba(244, 114, 182, 0.26), rgba(244, 114, 182, 0.04));
  box-shadow: 0 0 16px rgba(244, 114, 182, 0.35), inset 0 0 10px rgba(244, 114, 182, 0.12);
  text-shadow: 0 0 18px rgba(244, 114, 182, 0.95);
}

/* ticker 更快更亮 */
body[data-mode="demo"] .quant-ticker {
  background: linear-gradient(90deg, rgba(244, 114, 182, 0.20), rgba(167, 139, 250, 0.12), rgba(34, 211, 238, 0.12));
  border-bottom-color: rgba(244, 114, 182, 0.5);
  box-shadow: 0 0 20px rgba(244, 114, 182, 0.2);
}

body[data-mode="demo"] .quant-ticker-track {
  animation-duration: 14s;
  color: #fff;
}

/* 品牌等化器 */
.q-eq {
  display: none;
}

body[data-mode="demo"] .q-eq {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 16px;
  margin-left: 4px;
}

body[data-mode="demo"] .q-eq i {
  width: 3px;
  border-radius: 1px;
  background: linear-gradient(180deg, var(--accent), var(--derived));
  box-shadow: 0 0 8px rgba(244, 114, 182, 0.8);
  animation: qeq 1s ease-in-out infinite;
}

body[data-mode="demo"] .q-eq i:nth-child(1) {
  height: 30%;
  animation-delay: -0.1s;
}
body[data-mode="demo"] .q-eq i:nth-child(2) {
  height: 62%;
  animation-delay: -0.3s;
}
body[data-mode="demo"] .q-eq i:nth-child(3) {
  height: 92%;
  animation-delay: -0.5s;
}
body[data-mode="demo"] .q-eq i:nth-child(4) {
  height: 46%;
  animation-delay: -0.7s;
}
body[data-mode="demo"] .q-eq i:nth-child(5) {
  height: 72%;
  animation-delay: -0.9s;
}

@keyframes qeq {
  0%,
  100% {
    transform: scaleY(0.4);
  }
  50% {
    transform: scaleY(1);
  }
}

/* 底部十六进制遥测带 */
.q-hex {
  display: none;
}

body[data-mode="demo"] .q-hex {
  display: block;
  position: fixed;
  left: 50%;
  bottom: 6px;
  transform: translateX(-50%);
  max-width: 56vw;
  overflow: hidden;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.04em;
  color: rgba(167, 139, 250, 0.7);
  text-shadow: 0 0 10px rgba(167, 139, 250, 0.5);
  animation: qhex 14s linear infinite;
}

@keyframes qhex {
  from {
    transform: translateX(-50%) translateX(0);
  }
  to {
    transform: translateX(-50%) translateX(-50%);
  }
}

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

/* 减少动效：DEMO 新增动画全部关闭 */
@media (prefers-reduced-motion: reduce) {
  body[data-mode="demo"] .q-scan,
  body[data-mode="demo"] .q-beam,
  body[data-mode="demo"] .workspace-detail::before,
  body[data-mode="demo"] .heatmap-panel::before,
  body[data-mode="demo"] .quant-ticker-track,
  body[data-mode="demo"] .q-eq i,
  body[data-mode="demo"] .q-hex {
    animation: none;
  }
}

/* ============================================================
   VIVID：把 E 的配色拉满（默认两档都生效）
   ============================================================ */
:root {
  --bg: #07030f;
  --bg-soft: #0a0418;
  --panel: #150a26;
  --panel-2: #1a0d2e;
  --panel-3: #0f0720;
  --line: rgba(244, 114, 182, 0.30);
  --line-strong: rgba(244, 114, 182, 0.55);
  --text: #fff7ff;
  --text-2: #c3b0d8;
  --text-3: #9a86b8;
  --accent: #ff5fb0;
  --accent-strong: #ff8cc8;
  --accent-soft: rgba(255, 95, 176, 0.16);
}

body {
  background-color: #07030f;
  background-image:
    radial-gradient(1200px 620px at 10% -12%, rgba(255, 64, 160, 0.32), transparent 56%),
    radial-gradient(1000px 620px at 92% -10%, rgba(167, 139, 250, 0.30), transparent 56%),
    radial-gradient(900px 700px at 50% 118%, rgba(34, 211, 238, 0.14), transparent 60%),
    linear-gradient(180deg, #07030f 0%, #0a0418 55%, #07030f 100%);
}

body::before {
  background-image:
    linear-gradient(rgba(244, 114, 182, 0.10) 1px, transparent 1px),
    linear-gradient(90deg, rgba(244, 114, 182, 0.10) 1px, transparent 1px);
  background-size: 44px 44px;
}

/* 顶部 */
.topbar {
  background: linear-gradient(180deg, rgba(24, 10, 40, 0.94), rgba(10, 4, 20, 0.90));
  border-bottom: 1px solid rgba(255, 95, 176, 0.45);
  box-shadow: 0 0 26px rgba(255, 64, 160, 0.20);
}

.brand-name {
  color: #fff;
  text-shadow: 0 0 18px rgba(255, 64, 160, 0.85), 0 0 36px rgba(167, 139, 250, 0.5);
}

.brand-sub {
  color: var(--accent-strong);
}

.brand-mark svg {
  filter: drop-shadow(0 0 10px rgba(255, 64, 160, 0.6));
}

/* 面板：霓虹描边 + 外发光 + 半透明 */
.panel,
.nav-rail,
.workspace-detail,
.filters-panel,
.timeline-panel,
.heatmap-panel {
  background: linear-gradient(180deg, rgba(24, 12, 42, 0.78), rgba(10, 5, 20, 0.86));
  border: 1px solid rgba(244, 114, 182, 0.34);
  box-shadow: 0 0 30px rgba(244, 114, 182, 0.14), inset 0 0 24px rgba(244, 114, 182, 0.05);
}

/* 统计卡：每张卡用自己的颜色发光 */
.stat-card {
  background: linear-gradient(180deg, rgba(var(--stat-rgb), 0.24), rgba(16, 8, 30, 0.84));
  border: 1px solid rgba(var(--stat-rgb), 0.6);
  box-shadow: 0 0 30px rgba(var(--stat-rgb), 0.24), inset 0 0 26px rgba(var(--stat-rgb), 0.08);
}

.stat-card .stat-label {
  color: rgba(var(--stat-rgb), 1);
  letter-spacing: 0.16em;
}

.stat-card .stat-num {
  color: #fff;
  text-shadow: 0 0 20px rgba(var(--stat-rgb), 1), 0 0 44px rgba(var(--stat-rgb), 0.6);
}

.stat-card .stat-hint {
  color: var(--text-2);
}

.stat-card.is-attention {
  border-color: rgba(251, 191, 36, 0.7);
  box-shadow: 0 0 34px rgba(251, 191, 36, 0.28), inset 0 0 26px rgba(251, 191, 36, 0.08);
}

/* 导航 */
.nav-item.is-active {
  background: linear-gradient(90deg, rgba(255, 64, 160, 0.40), rgba(167, 139, 250, 0.14));
  border-color: rgba(255, 95, 176, 0.75);
  color: #fff;
  box-shadow: 0 0 26px rgba(255, 64, 160, 0.30), inset 0 0 18px rgba(255, 64, 160, 0.12);
}

/* 证据卡：按等级颜色发光 */
.ev-card {
  background: linear-gradient(180deg, rgba(var(--lv-rgb), 0.12), rgba(16, 8, 30, 0.78));
  border: 1px solid rgba(var(--lv-rgb), 0.38);
  box-shadow: 0 0 22px rgba(var(--lv-rgb), 0.12);
}

.ev-card:hover {
  border-color: rgba(var(--lv-rgb), 0.75);
  box-shadow: 0 0 30px rgba(var(--lv-rgb), 0.30);
}

.ev-card.is-selected {
  border-color: rgba(var(--lv-rgb), 0.95);
  box-shadow: 0 0 34px rgba(var(--lv-rgb), 0.42);
}

.lv-badge {
  background: rgba(var(--lv-rgb), 0.24);
  border-color: rgba(var(--lv-rgb), 0.7);
  color: #fff;
  text-shadow: 0 0 12px rgba(var(--lv-rgb), 0.9);
  box-shadow: 0 0 14px rgba(var(--lv-rgb), 0.28);
}

/* 热力图：品红 → 紫 → 青 */
.heat-lv-0 {
  background: rgba(154, 134, 184, 0.10);
}

.heat-lv-1 {
  background: rgba(255, 79, 163, 0.32);
  box-shadow: 0 0 8px rgba(255, 79, 163, 0.30);
}

.heat-lv-2 {
  background: rgba(255, 79, 163, 0.58);
  box-shadow: 0 0 10px rgba(255, 79, 163, 0.50);
}

.heat-lv-3 {
  background: linear-gradient(135deg, #ff4fa3, #a78bfa);
  box-shadow: 0 0 12px rgba(255, 79, 163, 0.70);
}

.heat-lv-4 {
  background: linear-gradient(135deg, #ff4fa3, #22d3ee);
  box-shadow: 0 0 16px rgba(255, 79, 163, 0.90);
}

.heat-cell.is-today {
  outline: 1.5px solid #fff;
  outline-offset: 1px;
  box-shadow: 0 0 14px rgba(255, 79, 163, 0.9);
}

/* 筛选/按钮/标签 */
.btn-primary {
  background: linear-gradient(180deg, rgba(255, 79, 163, 0.35), rgba(167, 139, 250, 0.16));
  border-color: rgba(255, 95, 176, 0.8);
  box-shadow: 0 0 22px rgba(255, 64, 160, 0.35);
}

.btn-mode {
  border-color: rgba(255, 95, 176, 0.6);
  color: var(--accent-strong);
}

.pill {
  border-color: rgba(244, 114, 182, 0.30);
}

.view-head h1,
.panel-head h2,
.panel-head h3 {
  text-shadow: 0 0 18px rgba(255, 64, 160, 0.35);
}

.eyebrow {
  color: var(--accent-strong);
}

/* 内容/项目卡 */
.project-tile,
.content-card {
  border-color: rgba(244, 114, 182, 0.30);
  box-shadow: 0 0 22px rgba(244, 114, 182, 0.10);
}

/* 详情面板 */
.workspace-detail {
  box-shadow: 0 0 34px rgba(255, 64, 160, 0.16), inset 0 0 26px rgba(255, 64, 160, 0.05);
}

/* ============================================================
   QUANT STRIP：事实甜甜圈 / 7 日成交量 / 活跃度环形
   ============================================================ */
.quant-strip {
  display: grid;
  grid-template-columns: 1.05fr 1.35fr 0.9fr;
  gap: 14px;
  margin-top: 16px;
}

.qs-card {
  position: relative;
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid rgba(244, 114, 182, 0.34);
  background: linear-gradient(180deg, rgba(30, 14, 52, 0.82), rgba(12, 6, 24, 0.9));
  box-shadow: 0 0 26px rgba(255, 79, 163, 0.14), inset 0 0 22px rgba(255, 79, 163, 0.05);
}

.qs-card::before,
.qs-card::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  border-color: rgba(255, 79, 163, 0.75);
  border-style: solid;
  pointer-events: none;
}

.qs-card::before {
  top: -1px;
  left: -1px;
  border-width: 1px 0 0 1px;
}

.qs-card::after {
  bottom: -1px;
  right: -1px;
  border-width: 0 1px 1px 0;
}

.qs-title {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.22em;
  color: var(--text-3);
}

.qs-title span {
  color: var(--accent-strong);
  letter-spacing: 0.05em;
}

.qs-body {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 8px;
}

.qs-body svg {
  flex: none;
  filter: drop-shadow(0 0 10px rgba(255, 79, 163, 0.55));
}

.qs-legend {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 14px;
  font-size: 10px;
  color: var(--text-2);
  flex: 1;
}

.qs-legend span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.qs-legend i {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  display: block;
}

.qs-legend b {
  margin-left: auto;
  color: #fff;
  font-family: var(--font-mono);
}

.qs-bars-track {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 72px;
  margin-top: 10px;
}

.qs-bars-track i {
  flex: 1;
  min-height: 4px;
  border-radius: 2px 2px 0 0;
  background: linear-gradient(180deg, #ff4fa3, rgba(167, 139, 250, 0.25));
  box-shadow: 0 0 12px rgba(255, 79, 163, 0.5);
  transform-origin: bottom;
  animation: qbar 1.2s ease-out both;
}

@keyframes qbar {
  from {
    transform: scaleY(0);
  }
  to {
    transform: scaleY(1);
  }
}

.qs-ring-body {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 6px;
}

.qs-ring-body svg {
  filter: drop-shadow(0 0 12px rgba(255, 79, 163, 0.7));
  animation: qring 1.6s ease-in-out infinite;
}

@keyframes qring {
  0%,
  100% {
    filter: drop-shadow(0 0 8px rgba(255, 79, 163, 0.5));
  }
  50% {
    filter: drop-shadow(0 0 22px rgba(255, 79, 163, 1)) drop-shadow(0 0 44px rgba(167, 139, 250, 0.7));
  }
}

.qs-ring-meta b {
  display: block;
  font-family: var(--font-mono);
  font-size: 22px;
  color: #fff;
  text-shadow: 0 0 16px rgba(255, 79, 163, 0.9);
}

.qs-ring-meta span {
  font-size: 9px;
  color: var(--text-3);
}

/* 放大 KPI */
.stat-card {
  padding: 16px 18px;
}

.stat-card .stat-num {
  font-size: 40px;
}

.stat-card .stat-value {
  margin-top: 4px;
}

/* DEMO：卡片呼吸光 */
body[data-mode="demo"] .qs-card {
  animation: qcard 2.4s ease-in-out infinite;
}

@keyframes qcard {
  0%,
  100% {
    box-shadow: 0 0 20px rgba(255, 79, 163, 0.14);
  }
  50% {
    box-shadow: 0 0 36px rgba(255, 79, 163, 0.42);
  }
}

@media (max-width: 900px) {
  .quant-strip {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   STRUCTURE：E 式结构（5 KPI / 大矩阵 / 行情流 / 下单面板）
   ============================================================ */
.workspace-main .stats {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.workspace-main .stat-num {
  font-size: 38px;
}

@media (max-width: 1023px) {
  .workspace-main .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* 大矩阵：放大热力格 */
@media (min-width: 1360px) {
  .workspace {
    grid-template-columns: 210px minmax(0, 1fr) 430px;
  }

  .workspace-main .heat-grid {
    grid-template-rows: repeat(7, 22px);
    grid-auto-columns: 22px;
    gap: 5px;
  }

  .workspace-main .heat-cell,
  .workspace-main .heat-blank {
    width: 22px;
    height: 22px;
    border-radius: 4px;
  }

  .workspace-main .heat-weekdays {
    grid-template-rows: repeat(7, 22px);
    line-height: 22px;
  }

  .workspace-main .heat-months {
    grid-template-columns: repeat(var(--heat-cols, 12), 22px);
  }
}

/* 行情流：证据卡压成紧凑行 */
.workspace-main .timeline-slot .ev-card {
  margin: 6px 0;
  padding: 9px 14px;
  border-radius: 8px;
}

.workspace-main .timeline-slot .ev-card .ev-summary,
.workspace-main .timeline-slot .ev-card .ev-meta {
  display: none;
}

.workspace-main .timeline-slot .ev-card.is-expanded .ev-summary,
.workspace-main .timeline-slot .ev-card.is-expanded .ev-meta {
  display: block;
}

.workspace-main .timeline-slot .ev-title {
  font-size: 13px;
}

.workspace-main .timeline-slot .ev-card .ev-top {
  padding-bottom: 2px;
}

/* 下单面板：详情票券化 */
.workspace-detail {
  padding: 14px 16px 18px;
  border-top: 2px solid rgba(255, 79, 163, 0.6);
}

.detail-head {
  border-bottom: 1px solid rgba(255, 79, 163, 0.3);
}

.detail-head .eyebrow {
  color: var(--accent-strong);
  letter-spacing: 0.22em;
}

.detail-head h2 {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.16em;
  color: var(--accent-strong);
}

.point-title {
  font-size: 17px;
  text-shadow: 0 0 18px rgba(255, 79, 163, 0.35);
}

.point-summary {
  color: var(--text-2);
}

.point-footer .btn-primary {
  width: 100%;
  border-radius: 8px;
}

/* ============================================================
   E 结构第二刀：紧凑筛选 / 行号涨跌 / 票券详情 / 状态栏
   ============================================================ */
/* 紧凑筛选工具条 */
#filters-slot .filters-panel {
  padding: 9px 12px;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(24, 12, 42, 0.62), rgba(10, 5, 20, 0.72));
  border: 1px solid rgba(244, 114, 182, 0.28);
  box-shadow: 0 0 22px rgba(255, 79, 163, 0.10);
}

#filters-slot .filters-head {
  margin: 0;
  padding: 0 0 8px;
  border: 0;
}

#filters-slot .filters-sub,
#filters-slot .filters-icon {
  display: none;
}

#filters-slot .filter-row {
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

#filters-slot .filter-label {
  font-size: 9px;
  letter-spacing: 0.16em;
}

#filters-slot .chip {
  height: 26px;
  padding: 0 9px;
  font-size: 10.5px;
}

/* 行情流行号 / 涨跌色 */
.ev-row {
  font-size: 9.5px;
  color: var(--text-3);
  letter-spacing: 0.08em;
}

.ev-delta {
  font-size: 9px;
  text-shadow: 0 0 8px currentColor;
}

/* 票券报价条 */
.ticket-quote {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin: 10px 0 4px;
  border: 1px solid rgba(244, 114, 182, 0.28);
  border-radius: 6px;
  overflow: hidden;
  background: rgba(255, 79, 163, 0.08);
}

.ticket-quote span {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 7px 9px;
  background: rgba(10, 5, 20, 0.72);
}

.ticket-quote i {
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.2em;
  color: var(--text-3);
}

.ticket-quote b {
  font-family: var(--font-mono);
  font-size: 11px;
  color: #fff;
  text-shadow: 0 0 10px rgba(255, 79, 163, 0.6);
}

/* 详情分段编号 */
.workspace-detail .drawer-section {
  counter-increment: qblock;
}

.workspace-detail .drawer-section-title::before {
  content: "BLOCK " counter(qblock, decimal-leading-zero) " · ";
  color: var(--accent-strong);
  opacity: 0.75;
}

.workspace-detail {
  counter-reset: qblock;
}

/* 常驻底部状态栏 */
.quant-statusbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 30px;
  padding: 0 16px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  color: var(--text-2);
  background: linear-gradient(180deg, rgba(10, 4, 20, 0.96), rgba(6, 2, 12, 0.98));
  border-top: 1px solid rgba(255, 79, 163, 0.5);
  box-shadow: 0 0 20px rgba(255, 64, 160, 0.25);
}

.quant-statusbar .qs-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--confirmed);
}

.quant-statusbar .qs-live i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--confirmed);
  box-shadow: 0 0 8px var(--confirmed);
  animation: qblink 1.4s infinite;
}

@keyframes qblink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.3;
  }
}

.quant-statusbar b {
  color: #fff;
}

.quant-statusbar .qs-sep {
  color: rgba(244, 114, 182, 0.4);
}

.quant-statusbar .qs-grow {
  flex: 1;
}

.app-shell {
  padding-bottom: 66px;
}

@media (max-width: 767px) {
  .quant-statusbar {
    display: none;
  }
  .app-shell {
    padding-bottom: 44px;
  }
}

/* ============================================================
   QUANT CHARTS（DEMO 专属）：会话 K 线 + 项目资金流
   ============================================================ */
.quant-charts {
  display: none;
}

body[data-mode="demo"] .quant-charts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 14px;
}

.qc-panel {
  position: relative;
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid rgba(244, 114, 182, 0.36);
  background: linear-gradient(180deg, rgba(30, 14, 52, 0.78), rgba(10, 5, 20, 0.9));
  box-shadow: 0 0 30px rgba(255, 79, 163, 0.16), inset 0 0 24px rgba(255, 79, 163, 0.05);
  animation: qcard 2.4s ease-in-out infinite;
}

.qc-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.22em;
  color: var(--text-3);
}

.qc-head span {
  color: var(--accent-strong);
}

.qc-body {
  height: 156px;
  margin-top: 8px;
}

.qc-svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.qc-foot,
.qc-flow-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 8.5px;
  color: var(--text-2);
}

.qc-foot span,
.qc-flow-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.qc-foot i,
.qc-flow-legend i {
  width: 7px;
  height: 7px;
  border-radius: 2px;
  display: block;
}

.qc-flow-legend b {
  color: #fff;
  margin-left: 2px;
}

@media (max-width: 1100px) {
  body[data-mode="demo"] .quant-charts {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   A 方案：扫描状态 + 爬虫轨道 + 证据网络
   ============================================================ */
.crawler-track {
  display: none;
}

body[data-mode="demo"] .crawler-track {
  display: block;
  margin-top: 14px;
  padding: 12px 16px;
  border-radius: var(--radius);
  border: 1px solid rgba(244, 114, 182, 0.34);
  background: linear-gradient(180deg, rgba(28, 12, 46, 0.72), rgba(10, 5, 20, 0.88));
  box-shadow: 0 0 28px rgba(255, 79, 163, 0.14), inset 0 0 22px rgba(255, 79, 163, 0.05);
}

.cl-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.22em;
  color: var(--text-3);
}

.cl-head span {
  color: var(--accent-strong);
}

.cl-warn {
  margin-left: auto;
  font-size: 8.5px;
  color: var(--suggested);
  letter-spacing: 0.04em;
}

.cl-warn.ok {
  color: var(--confirmed);
}

.crawler-lane {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) 104px;
  gap: 12px;
  align-items: center;
  height: 30px;
}

.cl-name {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-2);
}

.cl-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgb(var(--agent-rgb));
  box-shadow: 0 0 8px rgb(var(--agent-rgb));
}

.cl-rail {
  position: relative;
  height: 18px;
  overflow: hidden;
  border-bottom: 1px dashed rgba(244, 114, 182, 0.28);
}

.cl-trail {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 40%;
  background: linear-gradient(90deg, rgba(255, 79, 163, 0), rgba(var(--agent-rgb), 0.7));
  filter: blur(1px);
}

.cl-crawler {
  position: absolute;
  left: 0;
  bottom: 1px;
  color: rgb(var(--agent-rgb));
  filter: drop-shadow(0 0 6px currentColor);
  animation: crawl var(--crawl-duration, 6s) linear infinite alternate;
}

@keyframes crawl {
  from {
    left: 0;
  }
  to {
    left: calc(100% - 18px);
  }
}

.cl-chip {
  justify-self: end;
  font-family: var(--font-mono);
  font-size: 9px;
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px solid rgba(127, 144, 168, 0.3);
  color: var(--text-2);
}

.cl-chip.ok {
  color: var(--confirmed);
  border-color: rgba(52, 211, 153, 0.45);
  background: rgba(52, 211, 153, 0.08);
}

.cl-chip b {
  color: #fff;
  margin-left: 2px;
}

/* 证据网络 */
.prov-graph {
  display: block;
  width: 100%;
  height: auto;
  margin-top: 6px;
}

.prov-graph line {
  stroke: rgba(244, 114, 182, 0.45);
  stroke-width: 1;
  stroke-dasharray: 3 3;
}

.prov-graph circle {
  fill: rgba(255, 79, 163, 0.16);
  stroke: rgba(255, 79, 163, 0.8);
  stroke-width: 1.2;
  filter: drop-shadow(0 0 6px rgba(255, 79, 163, 0.6));
}

.prov-graph text {
  font-family: var(--font-mono);
  font-size: 8px;
  fill: var(--text-2);
  text-anchor: middle;
}

.prov-graph .pg-center circle {
  fill: rgba(255, 79, 163, 0.28);
  stroke: #ff5fb0;
  stroke-width: 1.6;
}

@media (max-width: 767px) {
  .crawler-lane {
    grid-template-columns: 80px minmax(0, 1fr) 84px;
  }
}

/* ============================================================
   CRAWLER WEB：Agent—项目 拓扑，蜘蛛沿连线爬
   ============================================================ */
.crawler-web {
  display: none;
}

body[data-mode="demo"] .crawler-web {
  display: block;
  margin-top: 14px;
  padding: 12px 16px;
  border-radius: var(--radius);
  border: 1px solid rgba(244, 114, 182, 0.34);
  background: linear-gradient(180deg, rgba(28, 12, 46, 0.72), rgba(10, 5, 20, 0.9));
  box-shadow: 0 0 30px rgba(255, 79, 163, 0.16), inset 0 0 22px rgba(255, 79, 163, 0.05);
}

.cw-head {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.22em;
  color: var(--text-3);
}

.cw-head > span {
  color: var(--accent-strong);
  letter-spacing: 0.08em;
}

.cw-head .cw-legend {
  margin-left: auto;
  color: var(--text-2);
  letter-spacing: 0.04em;
}

.cw-svg {
  display: block;
  width: 100%;
  height: auto;
  margin-top: 8px;
}

.cw-edge {
  fill: none;
  stroke: rgba(244, 114, 182, 0.5);
}

.cw-edge.cw-co {
  stroke: rgba(167, 139, 250, 0.35);
  stroke-dasharray: 2 4;
}

.cw-node circle,
.cw-node rect {
  fill: rgba(255, 79, 163, 0.16);
  stroke: rgba(255, 79, 163, 0.8);
  stroke-width: 1.2;
  filter: drop-shadow(0 0 6px rgba(255, 79, 163, 0.5));
}

.cw-node.cw-agent circle {
  fill: rgba(var(--node-rgb), 0.2);
  stroke: rgb(var(--node-rgb));
  filter: drop-shadow(0 0 6px rgb(var(--node-rgb)));
}

.cw-node.cw-project rect {
  fill: rgba(167, 139, 250, 0.18);
  stroke: #a78bfa;
  filter: drop-shadow(0 0 6px rgba(167, 139, 250, 0.6));
}

.cw-node text {
  fill: #fff;
  font-family: var(--font-mono);
  font-size: 6.5px;
  text-anchor: middle;
}

.cw-node .cw-label {
  fill: var(--text-2);
  font-size: 7px;
}

.cw-node .cw-count {
  fill: #fff;
  font-size: 7px;
}

/* ============================================================
   项目合并面板
   ============================================================ */
.project-merge-panel {
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-2);
}

.project-merge-title {
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 650;
}

.project-merge-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.project-merge-row select {
  min-width: 180px;
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel);
  color: var(--text);
}

.project-merge-arrow {
  color: var(--text-3);
}

.project-merge-hint {
  margin: 8px 0 0;
  font-size: 10.5px;
  color: var(--text-3);
}

/* 手机通知面板 */
.push-panel {
  margin-top: 16px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-2);
}

.push-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.push-head h3 {
  margin: 0;
  font-size: 13px;
}

.push-head span {
  font-size: 9px;
  color: var(--text-3);
}

.push-desc {
  margin: 8px 0;
  font-size: 11.5px;
  color: var(--text-2);
}

.push-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.push-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-2);
}

.push-status {
  margin: 8px 0 0;
  font-size: 10.5px;
  color: var(--text-3);
}

/* 访问令牌输入（PWA 与 Safari 存储隔离时使用） */
.notice-token {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.notice-token-input {
  height: 30px;
  min-width: 180px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel);
  color: var(--text);
  font-size: 11px;
}

/* DEMO 音效开关 */
.btn-sound {
  position: relative;
  padding-inline: 10px;
}

.btn-sound.is-on {
  color: var(--accent-cyan);
  border-color: color-mix(in srgb, var(--accent-cyan) 55%, transparent);
  box-shadow: 0 0 14px color-mix(in srgb, var(--accent-cyan) 32%, transparent);
}

.btn-sound.is-on::after {
  content: "";
  position: absolute;
  right: 6px;
  top: 6px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent-cyan);
  box-shadow: 0 0 6px var(--accent-cyan);
}

/* ============================================================
   质感层：颗粒噪点 + 暗角
   ============================================================ */
.grain {
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  opacity: 0.055;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
  background-size: 160px 160px;
  mix-blend-mode: overlay;
}

.vignette {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 42%, transparent 52%, rgba(0, 0, 0, 0.55) 100%);
}

/* 有序入场 */
@keyframes cardRise {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

body.is-entering .stat-card,
body.is-entering .project-tile,
body.is-entering .ev-card {
  animation: cardRise 0.42s cubic-bezier(0.2, 0.9, 0.2, 1) both;
}

body.is-entering .stat-card:nth-child(2),
body.is-entering .project-tile:nth-child(2),
body.is-entering .ev-card:nth-child(2) {
  animation-delay: 0.04s;
}

body.is-entering .stat-card:nth-child(3),
body.is-entering .project-tile:nth-child(3),
body.is-entering .ev-card:nth-child(3) {
  animation-delay: 0.08s;
}

body.is-entering .stat-card:nth-child(4),
body.is-entering .project-tile:nth-child(4),
body.is-entering .ev-card:nth-child(4) {
  animation-delay: 0.12s;
}

body.is-entering .stat-card:nth-child(n + 5),
body.is-entering .project-tile:nth-child(n + 5),
body.is-entering .ev-card:nth-child(n + 5) {
  animation-delay: 0.16s;
}

/* ============================================================
   Onboarding
   ============================================================ */
.onboard {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(5, 4, 15, 0.74);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.onboard-card {
  width: min(620px, 100%);
  padding: 26px 28px 22px;
  border: 1px solid rgba(56, 189, 248, 0.32);
  border-radius: 20px;
  background: linear-gradient(160deg, rgba(20, 24, 44, 0.97), rgba(9, 9, 22, 0.99));
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), 0 0 60px rgba(56, 189, 248, 0.12);
  animation: onboardIn 0.45s cubic-bezier(0.2, 0.9, 0.2, 1);
}

@keyframes onboardIn {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.onboard-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.onboard-eyebrow {
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--accent-cyan);
}

.onboard-skip {
  border: 0;
  background: none;
  color: var(--text-3);
  font-size: 12px;
  cursor: pointer;
}

.onboard-title {
  margin: 14px 0 10px;
  font-size: 26px;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.onboard-body {
  margin: 0;
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-2);
}

.onboard-body b {
  color: var(--text);
}

.onboard-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
}

.onboard-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 22px;
}

.onboard-dots {
  display: flex;
  gap: 6px;
}

.onboard-dots i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
}

.onboard-dots i.is-on {
  background: var(--accent-cyan);
  box-shadow: 0 0 10px var(--accent-cyan);
}

.onboard-actions {
  display: flex;
  gap: 10px;
}

@media (max-width: 640px) {
  .onboard {
    padding: 16px;
  }

  .onboard-card {
    padding: 20px;
    border-radius: 16px;
  }

  .onboard-title {
    font-size: 21px;
  }

  .onboard-body {
    font-size: 13px;
  }

  .onboard-foot {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .onboard-dots {
    justify-content: center;
  }

  .onboard-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .onboard-card {
    animation: none;
  }

  body.is-entering .stat-card,
  body.is-entering .project-tile,
  body.is-entering .ev-card {
    animation: none;
  }

  .grain {
    display: none;
  }
}

.onboard-stats {
  display: flex;
  gap: 34px;
  margin: 18px 0 12px;
}

.onboard-stats b {
  display: block;
  font-family: var(--font-mono);
  font-size: 34px;
  line-height: 1;
  color: var(--text);
  background: linear-gradient(135deg, #7dd3fc, #c084fc 60%, #f0abfc);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.onboard-stats span {
  display: block;
  margin-top: 6px;
  font-size: 11px;
  color: var(--text-3);
  letter-spacing: 0.08em;
}

.onboard-sub {
  margin: 0;
  font-size: 12px;
  color: var(--text-3);
}

/* ============================================================
   像素伙伴 Mibi：对话式引导
   ============================================================ */
.onboard-scene {
  width: min(720px, 100%);
}

.onboard-head-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.onboard-scene-grid {
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 24px;
  align-items: center;
  margin-top: 10px;
}

.mibi-stage {
  position: relative;
  display: flex;
  justify-content: center;
  padding-top: 44px;
}

.mibi {
  width: 138px;
  height: 138px;
  filter: drop-shadow(0 10px 26px rgba(56, 189, 248, 0.35));
}

.mibi-float {
  animation: mibiFloat 3.4s ease-in-out infinite;
}

.mibi-eye {
  fill: #7dd3fc;
  animation: mibiBlink 4.2s infinite;
  transform-box: fill-box;
  transform-origin: center;
}

.mibi-arm-right {
  animation: mibiWave 3.8s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: center;
}

.mibi-antenna {
  animation: mibiBlink 2.2s infinite;
  fill: #f0abfc;
}

.mibi-bubble {
  position: absolute;
  top: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: 240px;
  min-width: 150px;
  padding: 8px 11px;
  border: 1px solid rgba(56, 189, 248, 0.42);
  border-radius: 10px;
  background: rgba(8, 12, 24, 0.96);
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--text-2);
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.5);
}

.mibi-bubble::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -5px;
  width: 8px;
  height: 8px;
  transform: translateX(-50%) rotate(45deg);
  background: rgba(8, 12, 24, 0.96);
  border-right: 1px solid rgba(56, 189, 248, 0.42);
  border-bottom: 1px solid rgba(56, 189, 248, 0.42);
}

.mibi-bubble [data-mibi-text]:empty::before {
  content: "…";
  color: var(--text-3);
}

@keyframes mibiFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

@keyframes mibiBlink {
  0%,
  92%,
  100% {
    transform: scaleY(1);
  }
  94%,
  96% {
    transform: scaleY(0.15);
  }
}

@keyframes mibiWave {
  0%,
  70%,
  100% {
    transform: rotate(0deg);
  }
  76% {
    transform: rotate(-28deg);
  }
  82% {
    transform: rotate(6deg);
  }
  88% {
    transform: rotate(-18deg);
  }
}

/* 引导结束后角落的小 Mibi */
.mibi-dock {
  position: fixed;
  left: 18px;
  bottom: 64px;
  z-index: 80;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 0;
  background: transparent;
  opacity: 0.55;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.mibi-dock:hover,
.mibi-dock:focus-visible {
  opacity: 1;
  transform: translateY(-2px);
}

.mibi-dock .mibi {
  width: 46px;
  height: 46px;
  filter: drop-shadow(0 4px 14px rgba(56, 189, 248, 0.45));
}

@media (max-width: 640px) {
  .onboard-scene-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .mibi-stage {
    padding-top: 40px;
  }

  .mibi {
    width: 104px;
    height: 104px;
  }

  .mibi-bubble {
    max-width: 260px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mibi-float,
  .mibi-eye,
  .mibi-arm-right,
  .mibi-antenna {
    animation: none;
  }
}

/* 咪咪：逐字打字 + 猫咪小动作 */
.mibi-ch {
  display: inline-block;
  opacity: 0;
  transform: translateY(5px) scale(0.86);
}

.mibi-ch.is-in {
  animation: mibiCharIn 0.34s cubic-bezier(0.2, 0.9, 0.2, 1) both;
}

@keyframes mibiCharIn {
  from {
    opacity: 0;
    transform: translateY(5px) scale(0.86);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.mibi-tail {
  animation: mibiTail 2.6s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: 10% 90%;
}

@keyframes mibiTail {
  0%,
  100% {
    transform: rotate(-8deg);
  }
  50% {
    transform: rotate(14deg);
  }
}

.mibi-ear {
  animation: mibiEar 3.6s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: bottom center;
}

.mibi-ear-right {
  animation-delay: 0.3s;
}

@keyframes mibiEar {
  0%,
  86%,
  100% {
    transform: rotate(0deg);
  }
  90% {
    transform: rotate(-8deg);
  }
  94% {
    transform: rotate(5deg);
  }
}

.onboard-stats.is-glitch b {
  animation: mibiGlitch 0.9s steps(2) 1;
}

@keyframes mibiGlitch {
  0%,
  100% {
    filter: none;
  }
  30% {
    filter: drop-shadow(2px 0 rgba(56, 189, 248, 0.8)) drop-shadow(-2px 0 rgba(240, 171, 252, 0.8));
  }
  60% {
    filter: drop-shadow(-2px 0 rgba(56, 189, 248, 0.8)) drop-shadow(2px 0 rgba(240, 171, 252, 0.8));
  }
}

@media (prefers-reduced-motion: reduce) {
  .mibi-ch.is-in,
  .mibi-tail,
  .mibi-ear,
  .onboard-stats.is-glitch b {
    animation: none;
  }

  .mibi-ch {
    opacity: 1;
    transform: none;
  }
}

/* 引导文字逐字浮现 */
.tw {
  display: inline-block;
  opacity: 0;
  animation: twIn 0.32s cubic-bezier(0.2, 0.9, 0.2, 1) both;
}

@keyframes twIn {
  from {
    opacity: 0;
    transform: translateY(5px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tw {
    opacity: 1;
    animation: none;
  }
}

/* 统计标签里的逐字 span 不能继承 block，否则会竖排 */
.onboard-stats .tw {
  display: inline-block;
}

/* 引导文字配色 */
.onboard-title {
  color: #f2f6ff;
  text-shadow: 0 0 22px rgba(56, 189, 248, 0.25);
}

.hl-cyan {
  color: #7dd3fc;
  text-shadow: 0 0 14px rgba(56, 189, 248, 0.55);
}

.hl-purple {
  color: #c084fc;
  text-shadow: 0 0 14px rgba(167, 139, 250, 0.5);
}

.hl-pink {
  color: #f0abfc;
  text-shadow: 0 0 14px rgba(240, 171, 252, 0.5);
}

.hl-amber {
  color: #fcd34d;
  text-shadow: 0 0 14px rgba(251, 191, 36, 0.45);
}

.hl-green {
  color: #6ee7b7;
  text-shadow: 0 0 12px rgba(52, 211, 153, 0.4);
}

.onboard-body b.hl-cyan,
.onboard-body b.hl-purple,
.onboard-body b.hl-amber {
  font-weight: 700;
}

.onboard-list li::marker {
  color: var(--accent-cyan);
}

.onboard-list li:nth-child(2)::marker {
  color: #c084fc;
}

.onboard-list li:nth-child(3)::marker {
  color: #fcd34d;
}

/* ============================================================
   成本与额度
   ============================================================ */
.quota-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.quota-kpi {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-2);
}

.quota-kpi span {
  display: block;
  font-size: 11px;
  color: var(--text-3);
}

.quota-kpi b {
  display: inline-block;
  margin: 6px 4px 0 0;
  font-family: var(--font-mono);
  font-size: 26px;
  line-height: 1;
  background: linear-gradient(135deg, #7dd3fc, #c084fc 60%, #f0abfc);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.quota-kpi small {
  font-size: 10px;
  color: var(--text-3);
}

.quota-advice {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.quota-advice-item {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--text-2);
  background: var(--panel-2);
}

.quota-advice-item .mono {
  font-size: 9px;
  padding: 2px 6px;
  border-radius: 99px;
  border: 1px solid var(--line);
  color: var(--text-3);
}

.quota-advice-item.is-warn {
  border-color: color-mix(in srgb, var(--amber, #fbbf24) 50%, transparent);
}

.quota-advice-item.is-urgent {
  border-color: color-mix(in srgb, #f87171 55%, transparent);
}

.quota-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.quota-card {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-2);
}

.quota-card.is-warn {
  border-color: color-mix(in srgb, #fbbf24 45%, transparent);
}

.quota-card.is-error {
  border-color: color-mix(in srgb, #f87171 45%, transparent);
}

.quota-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.quota-provider {
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-cyan);
}

.quota-card h3 {
  margin: 8px 0 10px;
  font-size: 14px;
}

.quota-bar {
  height: 6px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.07);
  overflow: hidden;
}

.quota-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #38bdf8, #c084fc);
}

.quota-detail {
  margin: 8px 0 10px;
  font-size: 11px;
  color: var(--text-3);
}

.quota-actions {
  display: flex;
  justify-content: flex-end;
}

.quota-split {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 12px;
}

.quota-panel {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-2);
}

.quota-panel h3 {
  margin: 0 0 12px;
  font-size: 13px;
}

.quota-days {
  display: flex;
  gap: 6px;
  align-items: flex-end;
  height: 100px;
  padding: 4px 0;
}

.quota-day {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  height: 100%;
  min-width: 0;
}

.quota-day i {
  display: block;
  min-height: 2px;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(180deg, #7dd3fc, #c084fc);
}

.quota-day span {
  margin-top: 5px;
  font-size: 8px;
  color: var(--text-3);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
}

.quota-key-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.quota-key-row label {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 11px;
  color: var(--text-2);
  min-width: 64px;
}

.quota-key-row label span {
  font-size: 8px;
  color: var(--text-3);
}

.quota-key-row input {
  flex: 1;
  min-width: 0;
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel);
  color: var(--text);
  font-size: 11px;
}

.quota-empty {
  margin: 8px 0 0;
  font-size: 11px;
  color: var(--text-3);
}

@media (max-width: 720px) {
  .quota-split {
    grid-template-columns: 1fr;
  }
}

/* DEMO-only 模块在 daily 模式隐藏（量化条/图表/爬虫） */
body[data-mode="daily"] .quant-strip,
body[data-mode="daily"] .quant-charts,
body[data-mode="daily"] .crawler-web,
body[data-mode="daily"] .crawler-track {
  display: none;
}

/* 非仪表盘视图时隐藏 DEMO 量化区，避免盖住页面内容 */
body[data-view="quota"] .quant-strip,
body[data-view="quota"] .quant-charts,
body[data-view="quota"] .crawler-web,
body[data-view="quota"] .crawler-track,
body[data-view="content"] .quant-strip,
body[data-view="content"] .quant-charts,
body[data-view="data"] .quant-strip,
body[data-view="data"] .quant-charts {
  display: none;
}

.quota-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0 10px;
  font-size: 12px;
  color: var(--text-2);
}

.quota-events {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.quota-events li {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 11px;
  color: var(--text-2);
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.02);
}

.quota-events .mono {
  color: var(--text-3);
  font-size: 9px;
}

.quota-events b {
  color: var(--accent-cyan);
  font-weight: 600;
}

.quota-muted {
  color: var(--text-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 成就徽章 */
.badge-panel {
  margin-top: 16px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-2);
}

.badge-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.badge-head h3 {
  margin: 0;
  font-size: 13px;
}

.badge-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.badge {
  padding: 10px 12px;
  border: 1px dashed var(--line);
  border-radius: var(--radius-sm);
  opacity: 0.45;
}

.badge.is-on {
  opacity: 1;
  border-style: solid;
  border-color: color-mix(in srgb, var(--accent-cyan) 45%, transparent);
  background: rgba(56, 189, 248, 0.08);
}

.badge b {
  display: block;
  font-size: 12px;
}

.badge span {
  display: block;
  margin-top: 4px;
  font-size: 10px;
  color: var(--text-3);
}

/* 海报弹层 */
.poster-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(4, 3, 12, 0.86);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.poster-modal {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

#poster-canvas {
  width: min(420px, 82vw);
  height: auto;
  max-height: 78vh;
  border-radius: 12px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7);
}

.poster-actions {
  display: flex;
  gap: 10px;
}
