/* ═══════════════════════════════════════════════════════════════
   心灵镜 SoulMirror · 全屏水镜主题样式
   摄像头铺满背景 · 玻璃面板悬浮 · 水波纹 · 情绪光晕 · 粒子
   ═══════════════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg-deep:    #060a14;
  --bg-glass:   rgba(8,14,32,0.55);
  --bg-glass-hover: rgba(12,20,44,0.82);
  --bg-card:    rgba(10,16,36,0.85);

  --border-glow:   rgba(80,130,255,0.25);
  --border-active: rgba(80,180,255,0.6);
  --border-subtle: rgba(255,255,255,0.08);
  --border-glass:  rgba(255,255,255,0.12);

  --accent-blue:   #4a90e2;
  --accent-purple: #8b5cf6;
  --accent-cyan:   #22d3ee;
  --accent-green:  #10b981;
  --accent-orange: #f59e0b;
  --accent-red:    #ef4444;
  --accent-pink:   #ec4899;

  --text-primary:   rgba(255,255,255,0.95);
  --text-secondary: rgba(255,255,255,0.62);
  --text-muted:     rgba(255,255,255,0.35);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 22px;
  --transition: 0.28s cubic-bezier(0.4,0,0.2,1);
}

html {
  width: 100%; height: 100%;
  background: var(--bg-deep);
}
body, #root {
  width: 100%; height: 100%;
  overflow: hidden;
  background: transparent;
  color: var(--text-primary);
  /* 升级字体栈：Inter（英文/数字）+ Noto Sans SC（中文），全平台一致 */
  font-family: 'Inter', 'Noto Sans SC', -apple-system, BlinkMacSystemFont,
    'PingFang SC', 'Microsoft YaHei', 'Segoe UI', sans-serif;
  font-size: 14px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: 'kern' 1, 'liga' 1;
}

/* ═══════════════════════════════════════════════════════════════
   全屏水镜根容器
   ═══════════════════════════════════════════════════════════════ */
.mirror-root {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* ─── 背景层：摄像头全屏铺满 ─────────────────────────────────── */
.mirror-bg-layer {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: transparent;
}

.mirror-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
  display: block;
  z-index: 2; /* 覆盖粒子背景 */
}

.mirror-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 3; /* 高于 video，用于面部网格叠加 */
}

/* 深度遮罩：四周渐暗，中间透明，让玻璃面板更易读 */
.mirror-vignette {
  position: absolute;
  inset: 0;
  z-index: 3;
  background:
    radial-gradient(ellipse at center, transparent 30%, rgba(6,10,20,0.55) 100%),
    linear-gradient(to bottom, rgba(6,10,20,0.65) 0%, transparent 15%, transparent 85%, rgba(6,10,20,0.65) 100%),
    linear-gradient(to right,  rgba(6,10,20,0.75) 0%, transparent 18%, transparent 82%, rgba(6,10,20,0.75) 100%);
  pointer-events: none;
}

/* ─── 加载状态小条（不覆盖背景） ─────────────────────────────── */
.mirror-loading-bar {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  background: rgba(6,10,20,0.82);
  border: 1px solid rgba(34,211,238,0.25);
  border-radius: 20px;
  font-size: 11px;
  color: var(--text-secondary);
  backdrop-filter: blur(12px);
  white-space: nowrap;
}
.mirror-spinner-sm {
  width: 14px; height: 14px;
  border: 2px solid rgba(34,211,238,0.2);
  border-top-color: var(--accent-cyan);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── 摄像头错误 ─────────────────────────────────────────────── */
.mirror-error {
  position: absolute;
  inset: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: rgba(6,10,20,0.92);
  backdrop-filter: blur(20px);
}
.mirror-error-icon { font-size: 48px; }
.mirror-error-title { font-size: 16px; font-weight: 600; color: var(--accent-red); }
.mirror-error-hint  { font-size: 12px; color: var(--text-secondary); }

/* ─── 摄像头权限提示（摄像头未就绪时显示） ─────────────────────── */
.mirror-camera-prompt {
  position: absolute;
  inset: 0;
  z-index: 45;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(6,10,20,0.6);
  backdrop-filter: blur(8px);
  pointer-events: all;
}
.mirror-camera-prompt-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 32px;
  background: rgba(10,16,36,0.9);
  border: 1px solid rgba(34,211,238,0.3);
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 30px rgba(34,211,238,0.1);
}

/* ═══════════════════════════════════════════════════════════════
   顶部 Header（玻璃效果，浮在最上层）
   ═══════════════════════════════════════════════════════════════ */
.mirror-header {
  position: relative;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  height: 52px;
  background: rgba(6,10,20,0.65);
  backdrop-filter: blur(12px) saturate(1.4);
  -webkit-backdrop-filter: blur(12px) saturate(1.4);
  border-bottom: 1px solid rgba(34,211,238,0.12);
  flex-shrink: 0;
}

.mirror-brand { display: flex; align-items: center; gap: 11px; }
.mirror-brand-logo {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  box-shadow: 0 0 16px rgba(74,144,226,0.45), inset 0 1px 0 rgba(255,255,255,0.2);
}
.mirror-brand-name {
  font-size: 16px; font-weight: 700;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-purple));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  letter-spacing: 0.5px;
}
.mirror-brand-sub { font-size: 10px; color: var(--text-muted); letter-spacing: 1.2px; margin-top: 1px; }

.mirror-scenes { display: flex; align-items: center; gap: 6px; }
.mirror-scene-btn {
  padding: 5px 13px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  color: var(--text-secondary);
  font-size: 12px; cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4,0,0.2,1);
  font-family: inherit;
  backdrop-filter: blur(8px);
  white-space: nowrap;
}
.mirror-scene-btn:hover {
  border-color: var(--accent-blue);
  color: var(--text-primary);
  background: rgba(74,144,226,0.1);
  transform: translateY(-1px);
}
.mirror-scene-btn.active {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  background: rgba(34,211,238,0.1);
  box-shadow: 0 0 12px rgba(34,211,238,0.2), inset 0 1px 0 rgba(34,211,238,0.1);
  transform: translateY(-1px);
}

.mirror-status-bar { display: flex; align-items: center; gap: 8px; }

/* 情绪状态胶囊 */
.mirror-emotion-pill {
  display: flex; align-items: center; gap: 6px;
  padding: 4px 12px;
  background: rgba(0,0,0,0.4);
  border: 1px solid var(--emotion-color, var(--accent-cyan));
  border-radius: 20px;
  font-size: 12px; font-weight: 600;
  color: var(--emotion-color, var(--accent-cyan));
  box-shadow: 0 0 12px color-mix(in srgb, var(--emotion-color, var(--accent-cyan)) 30%, transparent);
  backdrop-filter: blur(8px);
  transition: var(--transition);
}
.emotion-pulse {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--emotion-color, var(--accent-cyan));
  animation: pulse-ring 1.5s infinite;
  flex-shrink: 0;
}
@keyframes pulse-ring {
  0%   { box-shadow: 0 0 0 0 var(--emotion-color, var(--accent-cyan)); opacity: 1; }
  70%  { box-shadow: 0 0 0 6px transparent; opacity: 0.5; }
  100% { box-shadow: 0 0 0 0 transparent; opacity: 1; }
}
.emotion-conf {
  font-size: 10px;
  opacity: 0.7;
  margin-left: 2px;
}

.mirror-status-pill {
  display: flex; align-items: center; gap: 5px;
  padding: 4px 11px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  font-size: 11px; color: var(--text-secondary);
  backdrop-filter: blur(8px);
  transition: var(--transition);
}
.mirror-status-pill.active {
  border-color: rgba(16,185,129,0.4);
  color: var(--accent-green);
}
.s-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--text-muted);
  flex-shrink: 0;
  transition: var(--transition);
}
.mirror-status-pill.active .s-dot {
  background: var(--accent-green);
  box-shadow: 0 0 6px var(--accent-green);
  animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot { 0%,100%{opacity:1} 50%{opacity:0.45} }

.mirror-toggle-btn {
  padding: 4px 10px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  color: var(--text-muted);
  font-size: 11px; cursor: pointer;
  transition: var(--transition); font-family: inherit;
}
.mirror-toggle-btn:hover { border-color: var(--accent-blue); color: var(--text-primary); }

/* ═══════════════════════════════════════════════════════════════
   三列玻璃面板层
   ═══════════════════════════════════════════════════════════════ */
.mirror-panels {
  position: relative;
  z-index: 10;
  flex: 1;
  display: grid;
  grid-template-columns: 280px 1fr 340px;
  gap: 0;
  overflow: hidden;
  min-height: 0;
}

/* ─── 通用玻璃面板 ───────────────────────────────────────────── */
.glass-panel {
  display: flex;
  flex-direction: column;
  background: rgba(6,10,20,0.35);
  backdrop-filter: blur(14px) saturate(1.5) brightness(0.9);
  -webkit-backdrop-filter: blur(14px) saturate(1.5) brightness(0.9);
  border-right: 1px solid rgba(34,211,238,0.12);
  overflow: hidden;
  min-height: 0;
  transition: width 0.3s cubic-bezier(0.4,0,0.2,1), opacity 0.3s ease;
}
.glass-panel:last-child { border-right: none; border-left: 1px solid var(--border-glass); }

.glass-panel.collapsed {
  width: 0 !important;
  min-width: 0 !important;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}
.glass-panel.visible { opacity: 1; pointer-events: all; }

/* ─── 左侧感知面板 ───────────────────────────────────────────── */
.panel-perception {
  overflow: hidden; /* 自身不滚动，由内层 .panel-scroll-body 负责 */
  padding: 0;
}
.panel-scroll-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
}
.panel-scroll-body::-webkit-scrollbar { width: 3px; }
.panel-scroll-body::-webkit-scrollbar-thumb { background: var(--border-glow); border-radius: 2px; }
.panel-scroll-body::-webkit-scrollbar-track { background: transparent; }

.glass-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px 8px;
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
}
.glass-panel-title {
  font-size: 11px; font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
}
.glass-panel-badge {
  display: flex; align-items: center; gap: 4px;
  font-size: 10px; color: var(--text-muted);
}
.live-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--text-muted);
  transition: var(--transition);
}
.live-dot.active {
  background: var(--accent-red);
  animation: pulse-dot 1.2s infinite;
  box-shadow: 0 0 5px var(--accent-red);
}

/* ─── 感知区块 ───────────────────────────────────────────────── */
.perception-section {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-subtle);
}
.perception-section:last-child { border-bottom: none; flex: 1; }
.perception-label {
  font-size: 10px; font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin-bottom: 8px;
  display: flex; align-items: center; gap: 6px;
}
.perception-label::before {
  content: '';
  width: 3px; height: 10px;
  background: linear-gradient(180deg, var(--accent-cyan), var(--accent-purple));
  border-radius: 2px;
  flex-shrink: 0;
}
.perception-empty {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  padding: 8px 0;
}

/* ─── 情绪条 ─────────────────────────────────────────────────── */
.emotion-bars { display: flex; flex-direction: column; gap: 5px; }
.emotion-dominant {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 10px;
  background: color-mix(in srgb, var(--c, var(--accent-cyan)) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--c, var(--accent-cyan)) 40%, transparent);
  border-radius: var(--radius-sm);
  margin-bottom: 4px;
}
.emotion-dominant-emoji { font-size: 18px; }
.emotion-dominant-name  { font-size: 14px; font-weight: 700; color: var(--c, var(--accent-cyan)); flex: 1; }
.emotion-dominant-conf  { font-size: 11px; color: var(--text-secondary); }

.emotion-bar-row {
  display: flex; align-items: center; gap: 6px;
  transition: var(--transition);
}
.emotion-bar-row.dominant { opacity: 1; }
.emotion-bar-row:not(.dominant) { opacity: 0.65; }
.emotion-bar-name { font-size: 10px; color: var(--text-muted); width: 26px; text-align: right; flex-shrink: 0; }
.emotion-bar-track {
  flex: 1;
  height: 4px;
  background: rgba(255,255,255,0.06);
  border-radius: 2px;
  overflow: hidden;
}
.emotion-bar-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.4s ease;
}
.emotion-bar-val { font-size: 10px; color: var(--text-muted); width: 22px; text-align: right; flex-shrink: 0; }

/* ─── 姿态网格 ───────────────────────────────────────────────── */
.pose-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.pose-item {
  display: flex; flex-direction: column; gap: 2px;
  padding: 7px 9px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
}
.pose-icon  { font-size: 12px; }
.pose-label { font-size: 9px; color: var(--text-muted); }
.pose-value { font-size: 12px; color: var(--accent-cyan); font-weight: 600; }

/* ─── Agent 日志区 ───────────────────────────────────────────── */
.agent-log-section { flex-shrink: 0; display: flex; flex-direction: column; min-height: 80px; max-height: 180px; }

/* ─── 中央对话面板 ───────────────────────────────────────────── */
.panel-chat {
  background: rgba(6,10,20,0.20);
  backdrop-filter: blur(10px) saturate(1.3);
  -webkit-backdrop-filter: blur(10px) saturate(1.3);
  border-right: 1px solid rgba(34,211,238,0.10);
  border-left: 1px solid rgba(34,211,238,0.10);
}

/* ─── 右侧分析面板 ───────────────────────────────────────────── */
.panel-analysis {
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.panel-analysis::-webkit-scrollbar { width: 3px; }
.panel-analysis::-webkit-scrollbar-thumb { background: var(--border-glow); border-radius: 2px; }

/* ═══════════════════════════════════════════════════════════════
   水波纹组件
   ═══════════════════════════════════════════════════════════════ */
.water-ripple-container {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  overflow: hidden;
}
.water-ripple {
  position: absolute;
  border-radius: 50%;
  border: 1.5px solid rgba(34,211,238,0.35);
  animation: ripple-expand 3s ease-out infinite;
  transform: translate(-50%, -50%);
}
.water-ripple:nth-child(2) { animation-delay: 1s; border-color: rgba(139,92,246,0.25); }
.water-ripple:nth-child(3) { animation-delay: 2s; border-color: rgba(34,211,238,0.18); }
@keyframes ripple-expand {
  0%   { width: 0; height: 0; opacity: 0.8; }
  100% { width: 600px; height: 600px; opacity: 0; }
}

/* ═══════════════════════════════════════════════════════════════
   情绪光晕组件
   ═══════════════════════════════════════════════════════════════ */
.emotion-aura {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  transition: opacity 1.2s ease;
}
.emotion-aura-inner {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.22;
  animation: aura-breathe 4s ease-in-out infinite;
}
@keyframes aura-breathe {
  0%,100% { transform: scale(1); opacity: 0.18; }
  50%      { transform: scale(1.08); opacity: 0.28; }
}

/* ═══════════════════════════════════════════════════════════════
   浮动情绪标签组件
   ═══════════════════════════════════════════════════════════════ */
.floating-tags-container {
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
  overflow: hidden;
}
.floating-tag {
  position: absolute;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px; font-weight: 600;
  border: 1px solid currentColor;
  backdrop-filter: blur(8px);
  background: rgba(0,0,0,0.35);
  animation: tag-float 6s ease-in-out infinite;
  white-space: nowrap;
}
@keyframes tag-float {
  0%,100% { transform: translateY(0) translateX(0); opacity: 0.75; }
  33%     { transform: translateY(-12px) translateX(5px); opacity: 0.9; }
  66%     { transform: translateY(6px) translateX(-4px); opacity: 0.7; }
}

/* ═══════════════════════════════════════════════════════════════
   对话区样式（CenterPanel 内部）
   ═══════════════════════════════════════════════════════════════ */
.chat-messages {
  flex: 1; overflow-y: auto;
  padding: 20px 22px;
  display: flex; flex-direction: column; gap: 14px;
}
.chat-messages::-webkit-scrollbar { width: 3px; }
.chat-messages::-webkit-scrollbar-thumb { background: var(--border-glow); border-radius: 2px; }

.msg-bubble {
  max-width: 78%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 13px; line-height: 1.65;
  animation: fadeInUp 0.3s ease;
}
@keyframes fadeInUp { from { opacity:0; transform:translateY(6px); } to { opacity:1; transform:translateY(0); } }
@keyframes fadeInLeft { from { opacity:0; transform:translateX(-8px); } to { opacity:1; transform:translateX(0); } }
@keyframes fadeInRight { from { opacity:0; transform:translateX(8px); } to { opacity:1; transform:translateX(0); } }

.msg-bubble.user {
  align-self: flex-end;
  background: linear-gradient(135deg, rgba(74,144,226,0.35), rgba(139,92,246,0.25));
  border: 1px solid rgba(74,144,226,0.3);
  color: var(--text-primary);
  border-bottom-right-radius: 4px;
  animation: fadeInRight 0.25s ease;
}
.msg-bubble.assistant {
  align-self: flex-start;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  border-bottom-left-radius: 4px;
  backdrop-filter: blur(8px);
  animation: fadeInLeft 0.25s ease;
}
.msg-bubble.system {
  align-self: center;
  background: rgba(34,211,238,0.06);
  border: 1px solid rgba(34,211,238,0.15);
  color: var(--text-secondary);
  font-size: 11px;
  border-radius: 20px;
  padding: 5px 14px;
}
.msg-role {
  font-size: 10px; font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}
.msg-streaming-cursor {
  display: inline-block;
  width: 2px; height: 14px;
  background: var(--accent-cyan);
  margin-left: 2px;
  vertical-align: middle;
  animation: blink 0.8s step-end infinite;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }

/* ─── 输入区 ─────────────────────────────────────────────────── */
.chat-input-area {
  padding: 14px 18px;
  border-top: 1px solid var(--border-glass);
  background: rgba(6,10,20,0.6);
  backdrop-filter: blur(16px);
  flex-shrink: 0;
}
.chat-input-row {
  display: flex; gap: 8px; align-items: flex-end;
}
.chat-input {
  flex: 1;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 10px 14px;
  color: var(--text-primary);
  font-size: 13px; font-family: inherit;
  outline: none; resize: none;
  min-height: 42px; max-height: 120px;
  transition: var(--transition);
  line-height: 1.5;
}
.chat-input:focus { border-color: var(--accent-blue); box-shadow: 0 0 0 2px rgba(74,144,226,0.12); }
.chat-input::placeholder { color: var(--text-muted); }

.btn-send {
  width: 42px; height: 42px;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
  border: none;
  border-radius: 12px;
  color: #fff;
  font-size: 16px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: var(--transition);
  box-shadow: 0 2px 12px rgba(74,144,226,0.35);
}
.btn-send:hover { opacity: 0.9; transform: translateY(-1px); }
.btn-send:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

.btn-voice {
  width: 42px; height: 42px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  color: var(--text-secondary);
  font-size: 16px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: var(--transition);
}
.btn-voice:hover { border-color: var(--accent-blue); color: var(--text-primary); }
.btn-voice.active {
  border-color: var(--accent-red);
  color: var(--accent-red);
  background: rgba(239,68,68,0.1);
  animation: voice-pulse 1s infinite;
}
@keyframes voice-pulse { 0%,100%{box-shadow:0 0 0 0 rgba(239,68,68,0.4)} 50%{box-shadow:0 0 0 6px transparent} }

.btn-abort {
  padding: 5px 12px;
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.3);
  border-radius: 8px;
  color: var(--accent-red);
  font-size: 11px; cursor: pointer;
  transition: var(--transition); font-family: inherit;
}
.btn-abort:hover { background: rgba(239,68,68,0.2); }

/* 语音转录提示 */
.voice-interim {
  font-size: 11px;
  color: var(--accent-cyan);
  padding: 4px 0;
  font-style: italic;
  opacity: 0.8;
}

/* 错误提示 */
.chat-error {
  padding: 8px 14px;
  background: rgba(239,68,68,0.08);
  border: 1px solid rgba(239,68,68,0.2);
  border-radius: 8px;
  color: var(--accent-red);
  font-size: 11px;
  margin: 0 18px 8px;
}
.retry-info {
  font-size: 10px;
  color: var(--accent-orange);
  padding: 3px 14px;
  text-align: center;
}

/* ─── 场景标题 ───────────────────────────────────────────────── */
.scene-header {
  padding: 14px 22px 10px;
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
}
.scene-header-icon { font-size: 20px; margin-right: 8px; }
.scene-header-name { font-size: 14px; font-weight: 600; }
.scene-header-desc { font-size: 11px; color: var(--text-secondary); margin-top: 2px; }

/* ═══════════════════════════════════════════════════════════════
   右侧分析面板（RightPanel 内部）
   ═══════════════════════════════════════════════════════════════ */
.analysis-panel {
  display: flex; flex-direction: column;
  height: 100%;
}
.analysis-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
  padding: 0 6px;
}
.analysis-tab {
  padding: 10px 12px;
  font-size: 11px; font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: var(--transition);
  white-space: nowrap;
  background: none; border-top: none; border-left: none; border-right: none;
  font-family: inherit;
}
.analysis-tab:hover { color: var(--text-secondary); }
.analysis-tab.active { color: var(--accent-cyan); border-bottom-color: var(--accent-cyan); }

.analysis-content {
  flex: 1; overflow-y: auto;
  padding: 14px;
}
.analysis-content::-webkit-scrollbar { width: 3px; }
.analysis-content::-webkit-scrollbar-thumb { background: var(--border-glow); border-radius: 2px; }

/* ─── 通用卡片（分析面板内） ─────────────────────────────────── */
.card {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px;
  margin-bottom: 10px;
  backdrop-filter: blur(8px);
  transition: border-color var(--transition);
}
.card:hover { border-color: var(--border-glow); }
.card-title {
  font-size: 10px; font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 10px;
  display: flex; align-items: center; gap: 6px;
}
.card-title::before {
  content: '';
  width: 3px; height: 11px;
  background: linear-gradient(180deg, var(--accent-cyan), var(--accent-purple));
  border-radius: 2px;
  flex-shrink: 0;
}

/* ─── 进度条 ─────────────────────────────────────────────────── */
.progress-bar {
  height: 5px;
  background: rgba(255,255,255,0.06);
  border-radius: 3px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.5s ease;
}

/* ─── 生命体征 ───────────────────────────────────────────────── */
.vitals-row { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.vital-item {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 9px 8px;
  text-align: center;
  transition: var(--transition);
}
.vital-item:hover { border-color: var(--border-glow); }
.vital-label { font-size: 9px; color: var(--text-muted); margin-bottom: 3px; letter-spacing: 0.5px; }
.vital-value { font-size: 20px; font-weight: 700; line-height: 1; }
.vital-unit  { font-size: 9px; color: var(--text-secondary); margin-left: 1px; }

/* ─── 心智工作台 ─────────────────────────────────────────────── */
.workspace-log  { flex: 1; overflow-y: auto; padding: 2px 0; min-height: 0; }
.workspace-log::-webkit-scrollbar { width: 3px; }
.workspace-log::-webkit-scrollbar-thumb { background: var(--border-glow); border-radius: 2px; }
.log-entry {
  display: flex; gap: 6px;
  padding: 4px 0;
  font-size: 11px; line-height: 1.45;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  animation: fadeInUp 0.3s ease;
}
.log-icon    { flex-shrink: 0; font-size: 11px; }
.log-agent   { color: var(--accent-cyan); font-weight: 600; flex-shrink: 0; font-size: 10px; }
.log-text    { color: var(--text-secondary); }

/* ═══════════════════════════════════════════════════════════════
   API Key 弹窗
   ═══════════════════════════════════════════════════════════════ */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(6,10,20,0.45);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
}
.modal-content {
  width: 480px;
  background: rgba(10,16,36,0.95);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-xl);
  padding: 32px;
  box-shadow: 0 28px 80px rgba(0,0,0,0.65), 0 0 40px rgba(74,144,226,0.08);
}
.modal-title {
  font-size: 22px; font-weight: 700; margin-bottom: 6px;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-purple));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.modal-subtitle { font-size: 13px; color: var(--text-secondary); margin-bottom: 24px; }

.provider-selector { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.provider-card {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  cursor: pointer; transition: var(--transition);
  text-align: left; font-family: inherit;
  position: relative;
}
.provider-card:hover { border-color: var(--accent-blue); background: rgba(74,144,226,0.06); }
.provider-card.active {
  border-color: var(--accent-cyan);
  background: rgba(34,211,238,0.07);
  box-shadow: 0 0 14px rgba(34,211,238,0.10);
}
.provider-card-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border-subtle);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: var(--accent-cyan);
}
.provider-card-icon svg { width: 18px; height: 18px; }
.provider-card-content { flex: 1; min-width: 0; }
.provider-card-name { display: block; font-size: 13px; font-weight: 600; color: var(--text-primary); margin-bottom: 2px; }
.provider-card-desc { display: block; font-size: 11px; color: var(--text-secondary); }
.provider-card-indicator {
  width: 8px; height: 8px; border-radius: 50%;
  border: 2px solid var(--border-subtle);
  transition: var(--transition);
  flex-shrink: 0;
}
.provider-card.active .provider-card-indicator {
  background: var(--accent-cyan);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 6px var(--accent-cyan);
}

.modal-steps { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.modal-step {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 12px; color: var(--text-secondary);
}
.step-number {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: rgba(34,211,238,0.12);
  border: 1px solid rgba(34,211,238,0.3);
  color: var(--accent-cyan);
  font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-top: 1px;
}
.step-text { line-height: 1.5; }
.step-text a { color: var(--accent-cyan); text-decoration: none; }
.step-text a:hover { text-decoration: underline; }
.step-text code { background: rgba(255,255,255,0.08); padding: 1px 5px; border-radius: 4px; font-size: 11px; }

.modal-input-group { margin-bottom: 16px; }
.modal-input-label { display: block; font-size: 11px; color: var(--text-secondary); margin-bottom: 6px; }
.modal-input {
  width: 100%;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  color: var(--text-primary);
  font-size: 13px; font-family: inherit;
  outline: none; transition: var(--transition);
}
.modal-input:focus { border-color: var(--accent-blue); box-shadow: 0 0 0 2px rgba(74,144,226,0.14); }
.modal-input::placeholder { color: var(--text-muted); }

.modal-test-result {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px; margin-bottom: 14px;
}
.modal-test-result.testing  { background: rgba(245,158,11,0.1); color: var(--accent-orange); border: 1px solid rgba(245,158,11,0.25); }
.modal-test-result.success  { background: rgba(16,185,129,0.1); color: var(--accent-green);  border: 1px solid rgba(16,185,129,0.25); }
.modal-test-result.error    { background: rgba(239,68,68,0.1);  color: var(--accent-red);    border: 1px solid rgba(239,68,68,0.25); }

.modal-buttons { display: flex; gap: 8px; }
.btn-modal-secondary {
  flex: 1; padding: 11px;
  background: transparent;
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 13px; cursor: pointer;
  transition: var(--transition); font-family: inherit;
}
.btn-modal-secondary:hover { border-color: var(--accent-blue); color: var(--text-primary); }
.btn-modal-secondary:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-modal-primary {
  flex: 2; padding: 11px;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
  border: none;
  border-radius: var(--radius-md);
  color: #fff;
  font-size: 13px; font-weight: 600; cursor: pointer;
  transition: var(--transition); font-family: inherit;
  box-shadow: 0 2px 12px rgba(74,144,226,0.35);
}
.btn-modal-primary:hover { opacity: 0.9; transform: translateY(-1px); }
.btn-modal-primary:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

/* ═══════════════════════════════════════════════════════════════
   场景大厅（SceneHall）
   ═══════════════════════════════════════════════════════════════ */
.scene-hall {
  width: 100vw; height: 100vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  background: radial-gradient(ellipse at 50% 40%, #0f1a3a 0%, #060a14 70%);
  position: relative;
  overflow: hidden;
}
.scene-hall::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 30% 60%, rgba(74,144,226,0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 30%, rgba(139,92,246,0.06) 0%, transparent 50%);
  pointer-events: none;
}
.scene-hall-hero {
  text-align: center;
  margin-bottom: 52px;
  position: relative; z-index: 1;
}
.scene-hall-logo {
  font-size: 52px;
  margin-bottom: 16px;
  filter: drop-shadow(0 0 20px rgba(34,211,238,0.5));
  animation: logo-float 4s ease-in-out infinite;
}
@keyframes logo-float {
  0%,100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}
.scene-hall-title {
  font-size: 36px; font-weight: 800;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-purple), var(--accent-pink));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  letter-spacing: 1px;
  margin-bottom: 10px;
}
.scene-hall-subtitle {
  font-size: 14px; color: var(--text-secondary);
  letter-spacing: 2px;
}
.scene-hall-cards {
  display: flex; gap: 20px;
  position: relative; z-index: 1;
}
.scene-card {
  width: 190px; padding: 24px 18px;
  background: rgba(14,20,42,0.88);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  cursor: pointer; transition: var(--transition);
  text-align: center;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  backdrop-filter: blur(16px);
}
.scene-card:hover {
  border-color: var(--accent-blue);
  transform: translateY(-6px);
  box-shadow: 0 20px 52px rgba(74,144,226,0.22);
}
.scene-card.selected {
  border-color: var(--accent-cyan);
  background: rgba(34,211,238,0.07);
  box-shadow: 0 0 24px rgba(34,211,238,0.18);
}
.scene-icon  { font-size: 36px; margin-bottom: 12px; }
.scene-name  { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.scene-desc  { font-size: 11px; color: var(--text-secondary); line-height: 1.55; }

/* ═══════════════════════════════════════════════════════════════
   场景主题覆盖
   ═══════════════════════════════════════════════════════════════ */
.scene-highrisk   { --accent-blue:#ef4444; --accent-cyan:#f97316; --border-glow:rgba(239,68,68,0.22); }
.scene-counseling { --accent-blue:#10b981; --accent-cyan:#34d399; --border-glow:rgba(16,185,129,0.22); }
.scene-elderly    { --accent-blue:#f59e0b; --accent-cyan:#fbbf24; --border-glow:rgba(245,158,11,0.22); }

/* ═══════════════════════════════════════════════════════════════
   全局滚动条
   ═══════════════════════════════════════════════════════════════ */
::-webkit-scrollbar { width: 3px; height: 3px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-glow); border-radius: 2px; }

/* ═══════════════════════════════════════════════════════════════
   工具类
   ═══════════════════════════════════════════════════════════════ */
.flex         { display: flex; }
.flex-col     { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2  { gap: 8px; }
.gap-1  { gap: 4px; }
.mt-2   { margin-top: 8px; }
.mt-1   { margin-top: 4px; }
.text-xs      { font-size: 10px; }
.text-sm      { font-size: 12px; }
.text-muted   { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-cyan    { color: var(--accent-cyan); }
.text-green   { color: var(--accent-green); }
.text-orange  { color: var(--accent-orange); }
.text-red     { color: var(--accent-red); }
.font-bold    { font-weight: 700; }
.w-full       { width: 100%; }

/* ═══════════════════════════════════════════════════════════════
   摄像头主动启动引导区
   ═══════════════════════════════════════════════════════════════ */
.mirror-camera-launch {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  z-index: 100;
  pointer-events: all;
  background: rgba(6,10,20,0.55);
  /* 不加 backdrop-filter，避免自身被模糊 */
}

.mirror-camera-launch-icon {
  font-size: 52px;
  line-height: 1;
  filter: drop-shadow(0 0 20px rgba(34,211,238,0.6));
  animation: pulse-icon 2.4s ease-in-out infinite;
}

@keyframes pulse-icon {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.08); opacity: 0.85; }
}

.mirror-camera-launch-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.06em;
  text-shadow: 0 0 20px rgba(34,211,238,0.5);
}

.mirror-camera-launch-desc {
  font-size: 13px;
  color: var(--text-secondary);
  text-align: center;
  max-width: 280px;
  line-height: 1.7;
}

.mirror-camera-launch-btn {
  margin-top: 6px;
  padding: 12px 36px;
  background: linear-gradient(135deg, rgba(34,211,238,0.25), rgba(139,92,246,0.25));
  border: 1.5px solid rgba(34,211,238,0.55);
  border-radius: 50px;
  color: #22d3ee;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 0 24px rgba(34,211,238,0.2), inset 0 0 12px rgba(34,211,238,0.05);
}

.mirror-camera-launch-btn:hover {
  background: linear-gradient(135deg, rgba(34,211,238,0.4), rgba(139,92,246,0.4));
  border-color: rgba(34,211,238,0.9);
  box-shadow: 0 0 36px rgba(34,211,238,0.4), inset 0 0 16px rgba(34,211,238,0.1);
  transform: translateY(-2px) scale(1.03);
  color: #fff;
}

.mirror-camera-launch-btn:active {
  transform: translateY(0) scale(0.98);
}

.mirror-camera-launch-hint {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

/* ── ProgressGuide 阶段进度条（fixed 顶部，不占文档流） ── */
.journey-guide {
  position: fixed;
  top: 52px;  /* 紧贴 mirror-header（高度52px）下方，避免重叠遮盖 */
  left: 50%;
  transform: translateX(-50%);
  z-index: 120;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 20px;
  background: rgba(6, 10, 20, 0.78);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(34, 211, 238, 0.12);
  border-radius: 0 0 14px 14px;
  pointer-events: none;
}
.journey-path { display: flex; align-items: center; }
.journey-step-wrap { display: flex; align-items: center; }
.journey-connector {
  width: 18px; height: 1px;
  background: rgba(255,255,255,0.12);
  transition: background 0.4s ease;
}
.journey-connector.filled { background: rgba(34,211,238,0.5); }
.journey-node {
  width: 20px; height: 20px; border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 9px; font-weight: 700;
  color: rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.04);
  transition: all 0.3s ease; flex-shrink: 0;
}
.journey-node.active {
  border-color: #22d3ee; color: #22d3ee;
  background: rgba(34,211,238,0.12);
  box-shadow: 0 0 8px rgba(34,211,238,0.4);
}
.journey-node.done {
  border-color: rgba(52,211,153,0.6); color: #34d399;
  background: rgba(52,211,153,0.08); font-size: 8px;
}
.journey-label { display: flex; flex-direction: column; gap: 1px; }
.journey-phase-name { font-size: 10px; font-weight: 700; color: #22d3ee; letter-spacing: 0.05em; }
.journey-hint { font-size: 9px; color: rgba(255,255,255,0.35); }

/* Phase 切换全屏遮罩 */
.phase-transition-overlay {
  position: fixed; inset: 0; z-index: 300;
  display: flex; align-items: center; justify-content: center;
  background: rgba(6,10,20,0.7); backdrop-filter: blur(16px);
  animation: phase-fade 3.2s ease forwards; pointer-events: none;
}
.phase-transition-inner { text-align: center; display: flex; flex-direction: column; gap: 8px; }
.phase-transition-step { font-size: 11px; color: rgba(34,211,238,0.7); letter-spacing: 0.15em; }
.phase-transition-name { font-size: 28px; font-weight: 800; color: #fff; }
.phase-transition-desc { font-size: 13px; color: rgba(255,255,255,0.5); }
@keyframes phase-fade {
  0%   { opacity: 0; }
  15%  { opacity: 1; }
  70%  { opacity: 1; }
  100% { opacity: 0; }
}

/* ── AnalysisToast ── */
.analysis-toast {
  position: fixed; bottom: 80px; left: 50%;
  transform: translateX(-50%); z-index: 200;
  display: flex; align-items: center; gap: 7px;
  padding: 7px 18px;
  background: rgba(6,10,20,0.85);
  border: 1px solid rgba(34,211,238,0.35); border-radius: 20px;
  font-size: 12px; color: rgba(34,211,238,0.9);
  backdrop-filter: blur(12px);
  animation: toast-pop 2.8s ease forwards;
  pointer-events: none; white-space: nowrap;
}
@keyframes toast-pop {
  0%   { opacity: 0; transform: translateX(-50%) translateY(10px); }
  12%  { opacity: 1; transform: translateX(-50%) translateY(0); }
  75%  { opacity: 1; }
  100% { opacity: 0; transform: translateX(-50%) translateY(-6px); }
}

/* ── 顶部阶段徽章 ── */
.mirror-phase-badge {
  display: flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 10px;
  background: rgba(34,211,238,0.08);
  border: 1px solid rgba(34,211,238,0.25);
  font-size: 10px; font-weight: 600; color: #22d3ee;
}
.mirror-phase-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: #22d3ee; box-shadow: 0 0 5px #22d3ee;
  animation: pulse-soft 1.8s ease-in-out infinite;
}

/* ── AI 思考中三点动画 ── */
.ai-thinking-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: rgba(34,211,238,0.6);
  animation: thinking-bounce 1.2s ease-in-out infinite;
}
@keyframes thinking-bounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40%           { transform: scale(1.0); opacity: 1; }
}

/* ── TTS 声波动画 ── */
@keyframes tts-bar-wave {
  from { transform: scaleY(0.4); opacity: 0.6; }
  to   { transform: scaleY(1.4); opacity: 1; }
}


/* ═══════════════════════════════════════════════════════════════
   语音可视化组件 (VoiceVisualizer) — 实时转录文字显示
   ═══════════════════════════════════════════════════════════════ */

/* 补充缺失的 CSS 变量（与原始仓库对齐） */
:root {
  --warmth: #80cbc4;
  --text-dim: rgba(255,255,255,0.28);
}

/* 补充缺失的动画 */
@keyframes msg-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes gentle-breathe {
  0%, 100% { opacity: 0.5; }
  50%       { opacity: 0.9; }
}

/* VoiceVisualizer 容器：相对定位，内部绝对定位 canvas 与文字层叠 */
.voice-viz-container {
  position: relative;
  width: 100%;
  border-radius: var(--radius-lg);
  height: 72px;
  z-index: 12;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, transparent 0%, rgba(6,10,20,0.45) 40%, rgba(6,10,20,0.65) 100%);
  overflow: hidden;
}

/* Canvas 铺满容器底层 */
.voice-viz-canvas {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
}

/* 实时转录文字：叠加在波形上方，z-index 高于 canvas */
.voice-viz-transcript {
  position: relative;
  z-index: 2;
  font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
  padding: 4px 20px;
  max-width: 80%;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  animation: msg-in 0.25s ease-out;
}

/* 光标闪烁 */
.voice-viz-cursor {
  display: inline-block;
  width: 2px;
  height: 15px;
  background: var(--accent-cyan);
  margin-left: 3px;
  vertical-align: middle;
  animation: blink 0.8s step-end infinite;
}

/* "聆听中..." 提示文字 */
.voice-viz-hint {
  position: relative;
  z-index: 2;
  font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 3px;
  animation: gentle-breathe 3s ease-in-out infinite;
}

@media (max-width: 768px) {
  .voice-viz-container { height: 56px; }
  .voice-viz-transcript { font-size: 13px; }
}

/* ═══════════════════════════════════════════════════════════════
   全局视觉升级 v2.1 — 字体、卡片、按钮、间距统一规范
   ═══════════════════════════════════════════════════════════════ */

/* ── 字体继承修复：所有 font-family: inherit 的组件 ─────────────── */
button, input, select, textarea {
  font-family: 'Inter', 'Noto Sans SC', -apple-system, BlinkMacSystemFont,
    'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-size: inherit;
  line-height: inherit;
}

/* ── 数字/指标专用等宽字体 ───────────────────────────────────────── */
.metric-value, .kline-price, .ohi-score, .pool-count,
[data-metric], .tabular-nums {
  font-family: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

/* ── 卡片统一阴影层次（深色主题）────────────────────────────────── */
.card-elevated {
  box-shadow: 0 2px 12px rgba(0,0,0,0.45), 0 0 0 1px rgba(255,255,255,0.05);
  transition: box-shadow 0.22s cubic-bezier(0.4,0,0.2,1),
              transform 0.22s cubic-bezier(0.4,0,0.2,1);
}
.card-elevated:hover {
  box-shadow: 0 6px 24px rgba(0,0,0,0.55), 0 0 0 1px rgba(255,255,255,0.08);
  transform: translateY(-1px);
}

/* ── 按钮统一交互反馈 ────────────────────────────────────────────── */
button:focus-visible {
  outline: 2px solid rgba(34,211,238,0.6);
  outline-offset: 2px;
}
button:active { transform: scale(0.97); }

/* ── 标题字重规范 ────────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Inter', 'Noto Sans SC', sans-serif;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

/* ── 数据表格字体 ────────────────────────────────────────────────── */
table { font-size: 13px; }
th { font-weight: 600; letter-spacing: 0.02em; }
td { font-variant-numeric: tabular-nums; }

/* ── 标签/徽章字体 ───────────────────────────────────────────────── */
.tag, .badge, .pill, .chip {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.03em;
  line-height: 1.4;
}

/* ── 导航菜单字体 ────────────────────────────────────────────────── */
nav, .sidebar, .nav-item {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

/* ── 修复 voice-viz-hint 字体 ────────────────────────────────────── */
.voice-viz-hint {
  font-family: 'Inter', 'Noto Sans SC', sans-serif !important;
}

/* ── 全局过渡动画（提升流畅感）──────────────────────────────────── */
* {
  transition-property: color, background-color, border-color, box-shadow, opacity;
  transition-duration: 0.15s;
  transition-timing-function: cubic-bezier(0.4,0,0.2,1);
}
/* 排除不需要过渡的属性 */
*:not(button):not(a):not(.card-elevated) {
  transition-property: color, background-color, border-color;
}


/* ═══════════════════════════════════════════════════════════════
   无障碍 (a11y) — 键盘可达性 + 屏幕阅读器友好
   Round 6 C
   ═══════════════════════════════════════════════════════════════ */

/* 全局可见焦点环：所有交互元素键盘 Tab 时清晰可见 */
*:focus-visible {
  outline: 2px solid var(--accent-cyan, #22d3ee);
  outline-offset: 2px;
  border-radius: 4px;
}

/* 鼠标点击不显示 outline，仅键盘 focus 时显示 */
*:focus:not(:focus-visible) {
  outline: none;
}

/* skip-to-content 跳过导航链接 - 屏幕阅读器友好 */
.skip-to-content {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  z-index: 99999;
}
.skip-to-content:focus {
  position: fixed;
  left: 12px;
  top: 12px;
  width: auto;
  height: auto;
  padding: 8px 16px;
  background: var(--accent-cyan, #22d3ee);
  color: #000;
  font-weight: 700;
  border-radius: 6px;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}

/* 减少动画 - 尊重用户系统偏好 (prefers-reduced-motion) */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* 屏幕阅读器专用 — 视觉隐藏但 SR 可读 */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
