﻿:root {
  /* JARVIS v2.0 — Spec-aligned default theme */
  --bg0: #0a0e14;
  --bg1: #0f1419;
  --bg-deep: #060a10;
  --ink: var(--text-primary, #e6edf3);
  --ink2: var(--text-secondary, #8b949e);
  --dim: var(--text-tertiary, #6e7681);
  --line: var(--border-default, #21262d);
  --line-strong: var(--border-emphasis, #30363d);
  --panel: var(--bg-panel, #151b23);
  --console-bg: var(--bg-hover, #1c2430);
  --cool: var(--color-info, #58a6ff);
  --warm: var(--color-accent, #e3b341);
  --node-low: #3a556e;
  --node-high: var(--text-primary, #e6edf3);
  --glow-halo: var(--brand-blue-glow, rgba(31,111,235,0.4));
  --glow-tint1: var(--brand-blue-glow, rgba(31,111,235,0.15));
  --glow-tint2: var(--brand-gold-glow, rgba(227,179,65,0.15));
  --link-stroke: var(--border-emphasis, #30363d);
}

[data-theme="phosphor"] {
  --bg0: #050806; --bg1: #0a120c; --bg-deep: #020403;
  --ink: #c8f0c8; --ink2: #8fb48a; --dim: #4a6b4e;
  --line: rgba(140, 220, 140, 0.08); --line-strong: rgba(140, 220, 140, 0.22);
  --panel: rgba(6, 12, 8, 0.58); --console-bg: rgba(10, 20, 12, 0.42);
  --cool: #9fe09a; --warm: #f0c866;
  --node-low: #2d5a36; --node-high: #d4ffce;
  --glow-halo: rgba(140, 220, 140, 0.10);
  --glow-tint1: rgba(140, 220, 140, 0.08);
  --glow-tint2: rgba(240, 200, 102, 0.05);
  --link-stroke: rgba(140, 220, 140, 0.18);
}

[data-theme="violet"] {
  --bg0: #0d0a1a; --bg1: #161128; --bg-deep: #070512;
  --ink: #e4deff; --ink2: #a89fd4; --dim: #645b8a;
  --line: rgba(170, 140, 240, 0.10); --line-strong: rgba(170, 140, 240, 0.22);
  --panel: rgba(14, 10, 26, 0.56); --console-bg: rgba(22, 17, 40, 0.42);
  --cool: #b098f0; --warm: #78e0c8;
  --node-low: #4a3a6e; --node-high: #e0d4ff;
  --glow-halo: rgba(170, 140, 240, 0.12);
  --glow-tint1: rgba(170, 140, 240, 0.09);
  --glow-tint2: rgba(120, 224, 200, 0.06);
  --link-stroke: rgba(170, 140, 240, 0.20);
}

[data-theme="rose"] {
  --bg0: #1a0f16; --bg1: #24151f; --bg-deep: #10080d;
  --ink: #f4e0e4; --ink2: #c9a8ae; --dim: #7a5a61;
  --line: rgba(230, 160, 170, 0.10); --line-strong: rgba(230, 160, 170, 0.22);
  --panel: rgba(26, 15, 22, 0.56); --console-bg: rgba(36, 21, 31, 0.42);
  --cool: #e89aa8; --warm: #f2c27a;
  --node-low: #5a3a44; --node-high: #fad8de;
  --glow-halo: rgba(230, 160, 170, 0.10);
  --glow-tint1: rgba(230, 160, 170, 0.08);
  --glow-tint2: rgba(242, 194, 122, 0.06);
  --link-stroke: rgba(230, 160, 170, 0.20);
}

[data-theme="arctic"] {
  --bg0: #f5f7f9; --bg1: #eaeef2; --bg-deep: #dfe4ea;
  --ink: #1a2330; --ink2: #4a5a6e; --dim: #8a98a8;
  --line: rgba(40, 60, 85, 0.08); --line-strong: rgba(40, 60, 85, 0.18);
  --panel: rgba(255, 255, 255, 0.54); --console-bg: rgba(255, 255, 255, 0.46);
  --cool: #3a6a8f; --warm: #b85a3a;
  --node-low: #c0ccd8; --node-high: #2a3e58;
  --glow-halo: rgba(58, 106, 143, 0.06);
  --glow-tint1: rgba(58, 106, 143, 0.05);
  --glow-tint2: rgba(184, 90, 58, 0.04);
  --link-stroke: rgba(40, 60, 85, 0.18);
}

[data-theme="sand"] {
  --bg0: #f2ede3; --bg1: #eae2d2; --bg-deep: #ddd2bc;
  --ink: #2a231a; --ink2: #6a5c48; --dim: #9e917c;
  --line: rgba(70, 55, 35, 0.08); --line-strong: rgba(70, 55, 35, 0.20);
  --panel: rgba(250, 246, 238, 0.54); --console-bg: rgba(250, 246, 238, 0.46);
  --cool: #7a5a2c; --warm: #c8502e;
  --node-low: #cdbfa6; --node-high: #3a2a16;
  --glow-halo: rgba(122, 90, 44, 0.06);
  --glow-tint1: rgba(122, 90, 44, 0.06);
  --glow-tint2: rgba(200, 80, 46, 0.05);
  --link-stroke: rgba(70, 55, 35, 0.18);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { width: 100%; height: 100%; }

body {
  overflow: hidden;
  color: var(--ink);
  font-family: "Inter", "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at 22% 18%, var(--glow-tint1), transparent 35%),
    radial-gradient(circle at 80% 82%, var(--glow-tint2), transparent 38%),
    linear-gradient(160deg, var(--bg0), var(--bg1) 60%, var(--bg-deep) 100%);
  user-select: none;
  transition: background 0.6s ease, color 0.6s ease;
}

.grid-overlay {
  display: none;
}

#graph {
  position: fixed;
  inset: 0;
  z-index: 1;
  display: none;
  transition: transform 0.45s cubic-bezier(0.4,0,0.2,1);
}

@keyframes neb-blink {
  0%, 92%, 100% { opacity: 1; }
  96% { opacity: 0.35; }
}

@keyframes neb-cursor {
  0%, 50%, 100% { opacity: 1; }
  25%, 75% { opacity: 0.2; }
}

@keyframes neb-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(0.78); }
}

@keyframes neb-node-use {
  0% { opacity: 0.88; }
  28% { opacity: 1; }
  58% { opacity: 0.9; }
  100% { opacity: 1; }
}

.panel {
  position: fixed;
  top: 20px;
  bottom: 20px;
  width: 362px;
  z-index: 3;
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid var(--line-strong);
  background: var(--panel);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  overflow: hidden auto;
  overscroll-behavior: contain;
  transition: background 0.6s ease, border-color 0.6s ease, transform 0.38s cubic-bezier(0.4,0,0.2,1);
}

#panel-l1 { left: 20px; }
#panel-l2 { right: 20px; }

.panel-identity {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.brand-mark {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, var(--ink), var(--cool) 45%, var(--bg0));
  box-shadow: 0 0 12px color-mix(in srgb, var(--cool) 33%, transparent);
  animation: neb-blink 2.6s ease-in-out infinite;
  flex-shrink: 0;
}

.brand-copy { display: flex; flex-direction: column; gap: 2px; }

.eyebrow {
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--dim);
  font-family: "JetBrains Mono", ui-monospace, monospace;
}

.brand-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.panel-stats {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.stat { display: flex; flex-direction: column; gap: 2px; }

.stat-label {
  font-size: 9px;
  color: var(--dim);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-family: "JetBrains Mono", ui-monospace, monospace;
}

.stat-value {
  font-size: 12px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-weight: 500;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 6px;
}

.stat-value.live { color: var(--warm); }

.stat-value .live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--warm);
  box-shadow: 0 0 8px var(--warm);
  animation: neb-blink 1.4s ease-in-out infinite;
}

.stream-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.update-card {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: color-mix(in srgb, var(--cool) 7%, var(--bg1));
}

.update-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  margin-left: auto;
}

.update-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.update-title {
  font-size: 10px;
  color: var(--ink2);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-family: "JetBrains Mono", ui-monospace, monospace;
}

.update-status {
  font-size: 12px;
  color: var(--ink);
  line-height: 1.45;
  word-break: break-word;
}

.update-status[data-state="checking"],
.update-status[data-state="downloading"] {
  color: var(--warm);
}

.update-status[data-state="available"],
.update-status[data-state="ready"] {
  color: var(--cool);
}

.update-status[data-state="error"] {
  color: #e7a4a4;
}

.update-status[data-state="muted"] {
  color: var(--dim);
}

.update-action {
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--cool) 28%, transparent);
  background: transparent;
  color: var(--ink);
  font-size: 10px;
  font-weight: 700;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.18s ease, opacity 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.update-action:hover:not(:disabled) {
  transform: translateY(-1px);
  color: var(--cool);
  border-color: color-mix(in srgb, var(--cool) 48%, transparent);
}

.update-action:disabled {
  cursor: default;
  opacity: 0.55;
}

.update-action-install {
  border-color: color-mix(in srgb, var(--warm) 40%, transparent);
}

.update-action-install:hover:not(:disabled) {
  color: var(--warm);
  border-color: color-mix(in srgb, var(--warm) 60%, transparent);
}

.update-ignore {
  padding: 6px 10px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--dim);
  font-size: 10px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: color 0.15s ease;
}

.update-ignore:hover {
  color: var(--ink2);
}

.update-card.hidden {
  display: none;
}

.update-close {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  padding: 0;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: var(--dim);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}

.update-close:hover {
  color: var(--ink);
  background: color-mix(in srgb, var(--ink) 10%, transparent);
}

.stream-title-text {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

.stream-subtitle {
  font-size: 10px;
  color: var(--dim);
  margin-top: 2px;
}

.pill {
  font-size: 9px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  padding: 3px 8px;
  border-radius: 999px;
  letter-spacing: 0.12em;
  color: var(--cool);
  border: 1px solid color-mix(in srgb, var(--cool) 33%, transparent);
}

.pill-warm {
  color: var(--warm);
  border-color: color-mix(in srgb, var(--warm) 33%, transparent);
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  padding-bottom: 12px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

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

.legend-dot { width: 7px; height: 7px; border-radius: 50%; }

.legend-name {
  font-size: 10px;
  color: var(--ink2);
  font-family: "JetBrains Mono", ui-monospace, monospace;
}

.legend-count {
  font-size: 10px;
  color: var(--dim);
  font-family: "JetBrains Mono", ui-monospace, monospace;
}

.stream {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}

.stream-inner {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.panel-actions {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.stream::-webkit-scrollbar,
.panel::-webkit-scrollbar { width: 6px; }

.stream::-webkit-scrollbar-thumb,
.panel::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border-radius: 999px;
}

.stream-line {
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  transition: opacity 0.5s ease;
}

.stream-line.fading { opacity: 1; }

.line-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
}

.line-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  flex-shrink: 0;
}

.line-type {
  font-size: 9px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
}

.line-time {
  font-size: 9px;
  color: var(--dim);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  margin-left: auto;
}

.line-status {
  font-size: 9px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  letter-spacing: 0.04em;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  color: var(--ink2);
  background: color-mix(in srgb, var(--panel) 76%, transparent);
  white-space: nowrap;
}

.line-status.busy {
  color: var(--warm);
  border-color: color-mix(in srgb, var(--warm) 48%, transparent);
  background: color-mix(in srgb, var(--warm) 12%, transparent);
}

.line-status.failed {
  color: #e7a4a4;
  border-color: rgba(224, 120, 120, 0.4);
  background: rgba(224, 120, 120, 0.08);
}

.line-text {
  font-size: 12px;
  line-height: 1.6;
  color: var(--ink);
  padding-left: 13px;
  word-break: break-word;
  white-space: pre-wrap;
}

.line-tool {
  font-size: 11px;
  opacity: 0.92;
  padding-left: 13px;
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.line-tool .tool-spinner {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1.4px solid currentColor;
  border-top-color: transparent;
  opacity: 0.9;
  animation: tool-spin 1.1s linear infinite;
  flex-shrink: 0;
}

.line-tool.done .tool-spinner {
  animation: none;
  border-top-color: currentColor;
  opacity: 0.5;
}

.line-tool .tool-name {
  font-weight: 500;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.line-tool .tool-icon {
  font-size: 13px;
  line-height: 1;
  flex-shrink: 0;
}

.line-tool .tool-status {
  margin-left: auto;
  font-size: 9px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  letter-spacing: 0.06em;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid transparent;
  flex-shrink: 0;
}

.line-tool .tool-status.success {
  color: #7fcf8f;
  border-color: rgba(127, 207, 143, 0.4);
  background: rgba(127, 207, 143, 0.08);
}

.line-tool .tool-status.ended {
  color: var(--ink2);
  border-color: var(--line-strong);
  background: color-mix(in srgb, var(--panel) 76%, transparent);
}

.line-tool .tool-status.failed {
  color: #e07878;
  border-color: rgba(224, 120, 120, 0.4);
  background: rgba(224, 120, 120, 0.08);
}

.line-tool-detail {
  font-size: 10px;
  color: var(--ink2);
  padding-left: 26px;
  margin-top: 4px;
  white-space: pre-wrap;
  word-break: break-word;
  opacity: 0.78;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  line-height: 1.55;
}

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

.line-thinking {
  font-size: 12px;
  color: var(--ink2);
  padding-left: 13px;
  display: flex;
  align-items: center;
  gap: 3px;
  letter-spacing: 0.04em;
}

.line-thinking .dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.35;
  animation: think-dot 1.2s ease-in-out infinite;
}

.line-thinking .dot:nth-child(2) { animation-delay: 0.15s; }
.line-thinking .dot:nth-child(3) { animation-delay: 0.3s; }
.line-thinking .dot:nth-child(4) { animation-delay: 0.45s; }

.line-thinking.done .dot {
  animation: none;
  opacity: 0.25;
}

@keyframes think-dot {
  0%, 80%, 100% { opacity: 0.25; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-2px); }
}

.cursor {
  display: inline-block;
  width: 6px;
  height: 11px;
  background: var(--warm);
  margin-left: 13px;
  margin-top: 2px;
  animation: neb-cursor 1s steps(2) infinite;
  vertical-align: middle;
}

.console {
  position: fixed;
  left: 402px;
  right: 402px;
  bottom: 24px;
  z-index: 4;
  transition: left 0.38s cubic-bezier(0.4,0,0.2,1), right 0.38s cubic-bezier(0.4,0,0.2,1);
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  background: var(--console-bg);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(20px);
}

#chat-history {
  flex: 1 1 auto;
  min-height: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.62s cubic-bezier(1, 0, 0.2, 1);
}

#chat-history.open { max-height: min(800px, calc(100vh - 160px)); }

#chat-messages {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
  max-height: min(800px, calc(100vh - 220px));
  overflow-y: auto;
  padding: 14px 18px 10px;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}

#chat-messages::-webkit-scrollbar { width: 6px; }
#chat-messages::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 999px; }

.msg {
  max-width: 85%;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.55;
  word-break: break-word;
  border: 1px solid var(--line);
  user-select: text;
  -webkit-user-select: text;
  cursor: text;
}

.msg-user {
  align-self: flex-end;
  color: var(--warm);
  border-color: color-mix(in srgb, var(--warm) 25%, transparent);
}

.msg-jarvis {
  align-self: flex-start;
  color: var(--cool);
  border-color: color-mix(in srgb, var(--cool) 25%, transparent);
}

.msg-external {
  align-self: center;
  color: var(--ink2);
  border-color: var(--line-strong);
  max-width: 78%;
}

.msg-label {
  display: block;
  margin-bottom: 3px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.65;
}

.msg-body,
.msg-body * {
  user-select: text;
  -webkit-user-select: text;
}

.msg-body > * + * {
  margin-top: 0.55em;
}

.msg-body p {
  margin: 0;
  white-space: normal;
}

.msg-body h1,
.msg-body h2,
.msg-body h3,
.msg-body h4,
.msg-body h5,
.msg-body h6 {
  margin: 0;
  line-height: 1.35;
  font-weight: 700;
}

.msg-body h1 { font-size: 1.28em; }
.msg-body h2 { font-size: 1.18em; }
.msg-body h3 { font-size: 1.1em; }
.msg-body h4,
.msg-body h5,
.msg-body h6 { font-size: 1em; }

.msg-body ul,
.msg-body ol {
  margin: 0;
  padding-left: 1.3em;
}

.msg-body li + li {
  margin-top: 0.2em;
}

.msg-body blockquote {
  margin: 0;
  padding-left: 0.8em;
  border-left: 2px solid var(--line-strong);
  color: var(--ink2);
}

.msg-body code {
  padding: 0.08em 0.36em;
  border-radius: 6px;
  background: color-mix(in srgb, var(--bg0) 68%, transparent);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.95em;
}

.msg-body pre {
  margin: 0;
  padding: 0.7em 0.85em;
  border-radius: 8px;
  background: color-mix(in srgb, var(--bg0) 82%, transparent);
  border: 1px solid var(--line);
  overflow-x: auto;
}

.msg-body pre code {
  padding: 0;
  background: transparent;
  border-radius: 0;
}

.msg-body a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: currentColor;
  text-underline-offset: 0.16em;
}

.msg-body strong {
  font-weight: 700;
}

.msg-body em {
  font-style: italic;
}

#input-row {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-top: 1px solid var(--line);
}

.prompt-mark {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 13px;
  color: var(--warm);
  animation: neb-blink 1.6s ease-in-out infinite;
}

#msg-input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 0;
  outline: 0;
  color: var(--ink);
  font-size: 14px;
  font-family: inherit;
  padding: 4px 0;
}

#msg-input::placeholder { color: var(--dim); }

#send-btn {
  padding: 8px 18px;
  border-radius: 10px;
  border: 0;
  background: var(--warm);
  color: var(--bg0);
  font-size: 11px;
  font-weight: 700;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

#send-btn:hover { transform: translateY(-1px); }
#send-btn:active { transform: translateY(0); opacity: 0.85; }

#tip {
  position: fixed;
  z-index: 200;
  display: none;
  max-width: 260px;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--panel);
  backdrop-filter: blur(20px);
  color: var(--ink);
  font-size: 12px;
  line-height: 1.55;
  word-break: break-word;
  pointer-events: none;
}

.tip-type {
  display: inline-block;
  margin-bottom: 4px;
  color: var(--dim);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.theme-switcher {
  width: fit-content;
  display: flex;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--bg0);
  pointer-events: auto;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.theme-switcher.visible { opacity: 1; transform: translateY(0); }

.theme-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.theme-dot:hover { transform: scale(1.15); }
.theme-dot.active { box-shadow: 0 0 0 2px var(--ink); }

.theme-dot[data-t="midnight"] { background: linear-gradient(135deg, #0f1822, #d39872); }
.theme-dot[data-t="phosphor"] { background: linear-gradient(135deg, #0a120c, #9fe09a); }
.theme-dot[data-t="violet"] { background: linear-gradient(135deg, #161128, #b098f0); }
.theme-dot[data-t="rose"] { background: linear-gradient(135deg, #24151f, #f2c27a); }
.theme-dot[data-t="arctic"] { background: linear-gradient(135deg, #eaeef2, #b85a3a); }
.theme-dot[data-t="sand"] { background: linear-gradient(135deg, #eae2d2, #c8502e); }

.reset-view {
  position: relative;
  z-index: 1;
  padding: 10px 14px;
  border-radius: 16px;
  border: 1px solid var(--line-strong);
  background: var(--panel);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  color: var(--ink);
  font-size: 10px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease, color 0.18s ease, background 0.6s ease, border-color 0.6s ease;
}

.reset-view.visible { opacity: 1; transform: translateY(0); }
.reset-view:hover { color: var(--warm); }

.physics-control {
  position: relative;
  z-index: 1;
  width: 100%;
  border-radius: 16px;
  border: 1px solid var(--line-strong);
  background: var(--panel);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  overflow: hidden;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease, background 0.6s ease, border-color 0.6s ease;
}

.physics-control.visible { opacity: 1; transform: translateY(0); }

.physics-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
}

.physics-toggle-label {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-family: "JetBrains Mono", ui-monospace, monospace;
}

.physics-toggle-icon {
  color: var(--dim);
  font-size: 12px;
  transition: transform 0.2s ease, color 0.2s ease;
}

.physics-control.open .physics-toggle-icon {
  transform: rotate(180deg);
  color: var(--ink);
}

.physics-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.28s ease;
}

.physics-control.open .physics-panel {
  max-height: 240px;
}

.physics-panel-inner {
  padding: 0 12px 12px;
  border-top: 1px solid var(--line);
}

.physics-field {
  padding-top: 12px;
}

.physics-field-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 6px;
  gap: 12px;
}

.physics-field-label,
.physics-field-value {
  font-size: 10px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
}

.physics-field-label {
  color: var(--ink2);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.physics-field-value {
  color: var(--warm);
}

.physics-slider {
  width: 100%;
  accent-color: var(--warm);
  cursor: pointer;
  background: transparent;
}

/* ── Voice button ── */
.voice-btn {
  margin-left: auto;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: transparent;
  color: var(--dim);
  font-size: 13px;
  cursor: pointer;
  transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}
.voice-btn:hover  { color: var(--ink); background: var(--line); }
.voice-btn.active { color: var(--cool); border-color: var(--cool); background: rgba(143,182,216,0.08); }

/* ── Video mode button ── */
.video-btn {
  display: none;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: transparent;
  color: var(--dim);
  font-size: 13px;
  cursor: pointer;
  transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}
.video-btn:hover  { color: var(--ink); background: var(--line); }
.video-btn.active { color: var(--warm); border-color: var(--warm); background: rgba(211,152,114,0.08); }

/* ── Settings button ── */
.settings-btn {
  margin-left: auto;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: transparent;
  color: var(--dim);
  font-size: 14px;
  cursor: pointer;
  transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}
.settings-btn:hover { color: var(--ink); background: var(--line); }

/* ── Settings modal ── */
.settings-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
}
.settings-overlay[hidden] { display: none; }

.settings-modal {
  width: 600px;
  height: 560px;
  max-width: calc(100vw - 40px);
  max-height: calc(100vh - 80px);
  border-radius: 16px;
  border: 1px solid var(--line-strong);
  background: var(--bg1);
  backdrop-filter: blur(24px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.settings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px 12px;
  border-bottom: 1px solid var(--line);
}

.settings-title {
  font-size: 12px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink2);
}

.settings-close {
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: transparent;
  color: var(--dim);
  font-size: 16px;
  cursor: pointer;
  transition: color 0.15s ease;
}
.settings-close:hover { color: var(--ink); }

.settings-section {
  padding: 14px 18px 10px;
  border-bottom: 1px solid var(--line);
}
.settings-section:last-child { border-bottom: none; }

.settings-section-label {
  font-size: 10px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--warm);
  margin-bottom: 12px;
}

.settings-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.settings-label {
  font-size: 11px;
  color: var(--ink2);
  min-width: 68px;
  flex-shrink: 0;
}

.settings-value {
  font-size: 11px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  color: var(--ink);
}

.settings-select,
.settings-input {
  flex: 1;
  min-width: 0;
  width: 0;
  height: 30px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  background: var(--bg0);
  color: var(--ink);
  font-size: 11px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s ease;
}
.settings-select:focus,
.settings-input:focus { border-color: var(--cool); }

.settings-row-action {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}

.settings-save-btn {
  height: 28px;
  padding: 0 14px;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ink);
  font-size: 11px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.settings-save-btn:hover { background: var(--line); }
.settings-save-btn:disabled { opacity: 0.45; cursor: default; }

.settings-feedback {
  font-size: 11px;
  color: var(--cool);
  font-family: "JetBrains Mono", ui-monospace, monospace;
}
.settings-feedback.error { color: var(--warm); }

.settings-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  flex-shrink: 0;
}
.settings-toggle input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.settings-toggle-track {
  display: inline-block;
  width: 36px;
  height: 20px;
  border-radius: 10px;
  background: var(--line-strong);
  position: relative;
  transition: background 0.2s ease;
}
.settings-toggle-track::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--ink2);
  transition: transform 0.2s ease, background 0.2s ease;
}
.settings-toggle input:checked + .settings-toggle-track {
  background: var(--cool);
}
.settings-toggle input:checked + .settings-toggle-track::after {
  transform: translateX(16px);
  background: var(--bg);
}

.settings-config-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 3px 0;
}

.settings-config-type {
  font-size: 10px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  color: var(--ink2);
  width: 32px;
  flex-shrink: 0;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.settings-config-info {
  font-size: 11px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  color: var(--ink);
  flex: 1;
}

.settings-config-dot {
  font-size: 10px;
  flex-shrink: 0;
}
.settings-config-dot.active  { color: var(--cool); }
.settings-config-dot.inactive { color: var(--dim); }

/* ── Settings sidebar body ── */
.settings-body {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.settings-nav {
  width: 112px;
  flex-shrink: 0;
  border-right: 1px solid var(--line);
  padding: 10px 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
}

.settings-nav-item {
  text-align: left;
  padding: 7px 14px;
  font-size: 11px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  color: var(--ink2);
  background: transparent;
  border: none;
  cursor: pointer;
  letter-spacing: 0.04em;
  transition: color 0.15s ease, background 0.15s ease;
  border-radius: 0;
}
.settings-nav-item:hover { color: var(--ink); background: var(--line); }
.settings-nav-item.active {
  color: var(--cool);
  background: rgba(143,182,216,0.08);
  border-right: 2px solid var(--cool);
}

.settings-content {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  padding-bottom: 6px;
}

.settings-tab { display: none; }
.settings-tab.active { display: block; }

/* ── Custom scrollbars for settings ── */
.settings-content::-webkit-scrollbar,
.settings-nav::-webkit-scrollbar {
  width: 4px;
}
.settings-content::-webkit-scrollbar-track,
.settings-nav::-webkit-scrollbar-track {
  background: transparent;
}
.settings-content::-webkit-scrollbar-thumb,
.settings-nav::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border-radius: 2px;
}
.settings-content::-webkit-scrollbar-thumb:hover,
.settings-nav::-webkit-scrollbar-thumb:hover {
  background: var(--dim);
}

.settings-section-action {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-direction: row;
  padding-top: 10px;
}

.settings-platform-status {
  font-size: 10px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  margin-bottom: 8px;
  height: 14px;
}
.settings-platform-status.ok    { color: var(--cool); }
.settings-platform-status.miss  { color: var(--dim); }

.settings-hint {
  font-size: 11px;
  color: var(--dim);
  line-height: 1.6;
  margin-bottom: 14px;
}

/* ── Voice panel (left message processor card) ── */
.voice-panel {
  width: 100%;
  margin-bottom: 14px;
  background: var(--panel);
  border: 0;
  border-radius: 0;
  padding: 14px 0 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  animation: scale-up 0.22s ease;
}

#voice-canvas {
  display: block;
  width: min(220px, 78%);
  aspect-ratio: 1;
  height: auto;
  border-radius: 50%;
  cursor: pointer;
  image-rendering: auto;
}

.voice-status {
  font-size: 11px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  color: var(--dim);
  letter-spacing: 0.08em;
  min-height: 16px;
  transition: color 0.3s ease;
}
.voice-status.listening   { color: #78c8ff; }
.voice-status.recognizing { color: #a0e0ff; }
.voice-status.processing  { color: #b898f8; }

#voice-whisper-svc-status[data-state="running"]  { color: #6fcf97; }
#voice-whisper-svc-status[data-state="starting"] { color: #f2c94c; }
#voice-whisper-svc-status[data-state="error"]    { color: var(--warm); }
#voice-whisper-svc-status[data-state="stopped"]  { color: var(--ink2); }

.voice-transcript {
  font-size: 11px;
  color: var(--ink2);
  max-width: 220px;
  text-align: center;
  line-height: 1.55;
  min-height: 16px;
  word-break: break-all;
}

/* ═══════════════ 视频模式面板 ═══════════════ */

.video-panel {
  position: fixed;
  right: 16px;
  top: 16px;
  bottom: 16px;
  width: 0;
  overflow: hidden;
  z-index: 4;
  border-radius: 16px;
  background: color-mix(in srgb, var(--bg-deep) 92%, black);
  border: 1px solid transparent;
  opacity: 0;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  transition:
    width 0.45s cubic-bezier(0.4,0,0.2,1),
    opacity 0.35s ease,
    border-color 0.35s ease;
}

body.video-mode .video-panel {
  width: calc(66vw - 32px);
  opacity: 1;
  pointer-events: auto;
  border-color: var(--line-strong);
}

.image-panel {
  position: fixed;
  left: 16px;
  top: 16px;
  bottom: 16px;
  width: 0;
  overflow: hidden;
  z-index: 4;
  border-radius: 16px;
  background: color-mix(in srgb, var(--bg-deep) 88%, black);
  border: 1px solid transparent;
  opacity: 0;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  transition:
    width 0.45s cubic-bezier(0.4,0,0.2,1),
    opacity 0.35s ease,
    border-color 0.35s ease;
}

body.image-mode .image-panel {
  width: calc(48vw - 32px);
  opacity: 1;
  pointer-events: auto;
  border-color: var(--line-strong);
}

.media-stage-head {
  flex: 0 0 auto;
  min-width: 260px;
  height: 46px;
  padding: 0 14px 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--line);
}

.media-stage-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink2);
  font-size: 11px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.video-surface,
.image-surface {
  position: relative;
  flex: 1 1 auto;
  min-width: 260px;
  min-height: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
}

/* 横视频晕染背景 — YouTube 缩略图 / 纯色兜底 */
.video-backdrop {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(28px) brightness(0.28) saturate(1.4);
  transform: scale(1.12);
  z-index: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  opacity: 0;
}
.video-surface.has-media .video-backdrop {
  opacity: 1;
}

#video-feed,
#image-display {
  position: relative;
  z-index: 1;
  display: block;
  border: 0;
}

#video-feed {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: transparent;
}

/* hidden 属性被 ID 选择器 display:block 覆盖，需显式修复 */
#video-feed[hidden] {
  display: none;
}

/* iframe 保持 16:9，高度自适应，不撑破容器 */
#video-frame {
  position: relative;
  z-index: 1;
  display: block;
  border: 0;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 100%;
  height: auto;
}

#video-frame[hidden] {
  display: none;
}

#image-display {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 18px;
}

.video-empty,
.image-empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--dim);
  font-size: 11px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  letter-spacing: 0.08em;
  pointer-events: none;
}

.video-surface.has-media .video-empty,
.image-surface.has-media .image-empty {
  display: none;
}

.video-exit-btn,
.image-exit-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: var(--panel);
  backdrop-filter: blur(12px);
  color: var(--ink2);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease, background 0.15s ease;
}
.video-exit-btn:hover,
.image-exit-btn:hover { color: var(--ink); background: var(--line-strong); }

/* 媒体模式下：两侧栏滑出，舞台为聊天区与背景节点让出空间 */
body.video-mode #panel-l1 {
  transform: translateX(calc(-100% - 20px));
}
body.video-mode #panel-l2 {
  transform: translateX(calc(100% + 20px));
}
body.video-mode .console {
  left: 16px;
  right: calc(66vw + 8px);
}
body.video-mode #graph {
  transform: translateX(-26vw);
}
body.image-mode #panel-l1 {
  transform: translateX(calc(-100% - 20px));
}
body.image-mode #panel-l2 {
  transform: translateX(calc(100% + 20px));
}
body.image-mode .console {
  left: calc(48vw + 8px);
  right: 16px;
}
body.image-mode #graph {
  transform: translateX(18vw);
}
body.video-mode .panel-tab,
body.image-mode .panel-tab {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

/* ═══════════════ 面板折叠 tab 按钮 ═══════════════ */

.panel-tab {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 20px;
  height: 60px;
  background: var(--panel);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--line-strong);
  color: var(--dim);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-family: "JetBrains Mono", monospace;
  transition:
    left 0.38s cubic-bezier(0.4,0,0.2,1),
    right 0.38s cubic-bezier(0.4,0,0.2,1),
    color 0.18s ease,
    background 0.18s ease,
    border-color 0.18s ease,
    background 0.6s ease;
}

.panel-tab:hover {
  color: var(--ink);
  background: color-mix(in srgb, var(--panel) 85%, var(--cool) 15%);
  border-color: color-mix(in srgb, var(--cool) 40%, transparent);
}

/* 左面板 tab：紧贴面板右边缘，右侧圆角 */
.panel-tab-left {
  left: 382px;
  border-radius: 0 8px 8px 0;
  border-left: none;
}

/* 右面板 tab：紧贴面板左边缘，左侧圆角 */
.panel-tab-right {
  right: 382px;
  border-radius: 8px 0 0 8px;
  border-right: none;
}

/* 箭头：CSS content 根据状态自动切换方向 */
.panel-tab-left::before  { content: "‹"; }
.panel-tab-right::before { content: "›"; }

/* ═══════════════ 折叠状态 ═══════════════ */

body.l1-collapsed #panel-l1 {
  transform: translateX(calc(-100% - 20px));
}
body.l1-collapsed .panel-tab-left {
  left: 0;
}
body.l1-collapsed .panel-tab-left::before {
  content: "›";
}
body.l1-collapsed .console {
  left: 24px;
}

body.l2-collapsed #panel-l2 {
  transform: translateX(calc(100% + 20px));
}
body.l2-collapsed .panel-tab-right {
  right: 0;
}
body.l2-collapsed .panel-tab-right::before {
  content: "‹";
}
body.l2-collapsed .console {
  right: 24px;
}

@media (max-width: 1180px) {
  .panel { width: 300px; }
  #panel-l2 { right: 20px; }
  .console { left: 340px; right: 340px; }
  .panel-tab-left  { left: 320px; }
  .panel-tab-right { right: 320px; }
  body.l1-collapsed .console { left: 24px; }
  body.l2-collapsed .console { right: 24px; }
}

@media (max-width: 900px) {
  .panel { width: 260px; }
  .console { left: 300px; right: 300px; }
  .panel-tab-left  { left: 280px; }
  .panel-tab-right { right: 280px; }
  body.l1-collapsed .console { left: 16px; }
  body.l2-collapsed .console { right: 16px; }
}

@media (max-width: 780px) {
  .panel { display: none; }
  .panel-tab { display: none; }
  .console { left: 16px; right: 16px; }
}

/* ═══════════════ 音乐模式面板 ═══════════════ */

.music-panel {
  position: fixed;
  right: 16px;
  top: 16px;
  bottom: 16px;
  width: 0;
  overflow: hidden;
  z-index: 4;
  border-radius: 16px;
  background: color-mix(in srgb, var(--bg-deep) 92%, black);
  border: 1px solid transparent;
  opacity: 0;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  transition:
    width 0.45s cubic-bezier(0.4,0,0.2,1),
    opacity 0.35s ease,
    border-color 0.35s ease;
}

body.music-mode .music-panel {
  width: 360px;
  opacity: 1;
  pointer-events: auto;
  border-color: var(--line-strong);
}

body.music-mode #panel-l2 {
  transform: translateX(calc(100% + 20px));
}
body.music-mode .console {
  right: calc(360px + 32px);
}

.music-exit-btn {
  flex: 0 0 auto;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--dim);
  font-size: 16px;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.18s ease, background 0.18s ease;
}
.music-exit-btn:hover { color: var(--ink); background: var(--line-strong); }

/* ── 舞台区 ── */
.music-stage {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 16px 20px 0;
  min-width: 320px;
}

/* ── 唱片机转盘 ── */
.music-turntable {
  position: relative;
  flex: 0 0 auto;
  width: 220px;
  height: 220px;
  margin: 0 auto 12px;
}

.music-vinyl {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%,
    #222 0%, #111 38%, #0a0a0a 65%, #141414 100%);
  box-shadow:
    0 0 0 2px rgba(255,255,255,0.04),
    0 6px 32px rgba(0,0,0,0.65);
  will-change: transform;
}

/* 刻槽同心圆 */
.music-groove {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.05);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
}
.music-groove-1 { width: 91%; height: 91%; }
.music-groove-2 { width: 76%; height: 76%; }
.music-groove-3 { width: 61%; height: 61%; }
.music-groove-4 { width: 46%; height: 46%; }

/* 中心封面标签 */
.music-cover {
  position: absolute;
  width: 32%;
  height: 32%;
  border-radius: 50%;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: hsl(220, 45%, 32%);
  background-size: cover;
  background-position: center;
  overflow: hidden;
  z-index: 1;
}
.music-cover-title {
  font-size: 8px;
  font-weight: 600;
  color: rgba(255,255,255,0.9);
  text-align: center;
  line-height: 1.2;
  padding: 0 3px;
  overflow: hidden;
  max-width: 100%;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.music-cover-artist {
  font-size: 7px;
  color: rgba(255,255,255,0.55);
  text-align: center;
  padding: 0 3px;
  overflow: hidden;
  max-width: 100%;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 中心轴 */
.music-spindle {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #2a2a2a;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.12);
}

/* ── 唱臂 ── */
.music-tonearm-group {
  position: absolute;
  right: -8px;
  top: -8px;
  width: 80px;
  height: 170px;
  transform-origin: 38px 20px;
  transform: rotate(24deg);
  transition: transform 1.6s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 3;
}
body.music-playing .music-tonearm-group {
  transform: rotate(3deg);
}

.music-tonearm-pivot {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--ink2);
  top: 13px;
  left: 31px;
  box-shadow: 0 0 0 2px rgba(255,255,255,0.08), 0 2px 6px rgba(0,0,0,0.5);
  z-index: 2;
}
.music-arm-shaft {
  position: absolute;
  width: 3px;
  background: linear-gradient(to bottom, var(--ink2) 0%, color-mix(in srgb, var(--ink2) 70%, transparent) 100%);
  top: 20px;
  left: 38px;
  height: 106px;
  border-radius: 2px;
  transform: skewX(-2deg);
}
.music-headshell {
  position: absolute;
  width: 14px;
  height: 8px;
  background: var(--ink2);
  border-radius: 2px 2px 4px 4px;
  bottom: 40px;
  left: 32px;
  opacity: 0.85;
}
.music-stylus {
  position: absolute;
  width: 2px;
  height: 7px;
  background: var(--cool);
  border-radius: 0 0 2px 2px;
  bottom: -7px;
  left: 50%;
  transform: translateX(-50%);
}

/* ── 黑胶旋转动画 ── */
@keyframes vinyl-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
body.music-playing .music-vinyl {
  animation: vinyl-spin 1.8s linear infinite;
}

/* ── 歌词区 ── */
.music-lyrics-pane {
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  min-height: 0;
  position: relative;
}
.music-lyrics-pane::-webkit-scrollbar { display: none; }

.music-lyrics-scroll {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 48px 0;
}
.lrc-line {
  text-align: center;
  font-size: 13px;
  color: var(--dim);
  padding: 0 20px;
  line-height: 1.55;
  transition: color 0.3s ease, transform 0.3s ease, font-size 0.3s ease;
}
.lrc-line.active {
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
  transform: scale(1.04);
}
.music-no-lyrics {
  text-align: center;
  color: var(--dim);
  font-size: 12px;
  padding: 28px 0;
}

/* ── 底部控制栏 ── */
.music-footer {
  flex: 0 0 auto;
  padding: 10px 20px 18px;
  border-top: 1px solid var(--line);
  min-width: 320px;
}
.music-meta {
  text-align: center;
  margin-bottom: 8px;
}
.music-meta-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.music-meta-artist {
  font-size: 11px;
  color: var(--ink2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}
.music-progress-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.music-time {
  font-size: 11px;
  color: var(--dim);
  flex: 0 0 auto;
  font-variant-numeric: tabular-nums;
  min-width: 32px;
  text-align: center;
}
.music-seek {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 3px;
  border-radius: 2px;
  background: var(--line-strong);
  outline: none;
  cursor: pointer;
}
.music-seek::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--cool);
  cursor: pointer;
}
.music-controls-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.music-ctrl {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ink2);
  font-size: 14px;
  padding: 5px 8px;
  border-radius: 8px;
  transition: color 0.18s ease, background 0.18s ease;
  line-height: 1;
}
.music-ctrl:hover { color: var(--ink); background: var(--line); }
.music-ctrl-play {
  font-size: 18px;
  color: var(--cool);
  padding: 5px 12px;
}
.music-ctrl-play:hover { color: var(--ink); }
.music-vol {
  -webkit-appearance: none;
  appearance: none;
  width: 56px;
  height: 3px;
  border-radius: 2px;
  background: var(--line-strong);
  outline: none;
  cursor: pointer;
  margin-left: 4px;
}
.music-vol::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ink2);
  cursor: pointer;
}

/* ── header music-btn ── */
.music-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--dim);
  font-size: 16px;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  align-items: center;
  justify-content: center;
  transition: color 0.18s ease, background 0.18s ease;
  padding: 0;
  flex: 0 0 auto;
}
.music-btn:hover { color: var(--ink); background: var(--line); }
.music-btn.active { color: var(--cool); }


/* ═══════════════════════════════════════════════════════════════════════════
   热点模式面板  HOTSPOT MODE
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── 面板容器（从左侧弹出） ── */
.hotspot-panel {
  position: fixed;
  left: 16px;
  top: 16px;
  bottom: 16px;
  width: 0;
  overflow: hidden;
  z-index: 4;
  border-radius: 16px;
  background: color-mix(in srgb, var(--bg-deep) 94%, #000d1a);
  border: 1px solid transparent;
  opacity: 0;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  transition:
    width  0.45s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.35s ease,
    border-color 0.35s ease;
}

body.hotspot-mode .hotspot-panel {
  width: calc(66vw - 32px);
  opacity: 1;
  pointer-events: auto;
  border-color: var(--line-strong);
}

/* ── 热点面板启动序列：错峰故障闪动接入 ── */
body.hotspot-mode .hotspot-panel.hs-booting .hs-header,
body.hotspot-mode .hotspot-panel.hs-booting .hs-stat,
body.hotspot-mode .hotspot-panel.hs-booting .hs-list-card,
body.hotspot-mode .hotspot-panel.hs-booting .hs-earth-container,
body.hotspot-mode .hotspot-panel.hs-booting .hs-center-aux,
body.hotspot-mode .hotspot-panel.hs-booting .hs-feed-bar,
body.hotspot-mode .hotspot-panel.hs-booting .hs-ticker-bar {
  opacity: 0;
  transform: translateY(8px);
  animation: hs-glitch-in 620ms cubic-bezier(0.2, 0.9, 0.2, 1) forwards;
  animation-delay: var(--hs-boot-delay, 0ms);
  will-change: transform, opacity, filter, clip-path;
}

body.hotspot-mode .hotspot-panel.hs-booting .hs-header { --hs-boot-delay: 40ms; }
body.hotspot-mode .hotspot-panel.hs-booting .hs-stat:nth-child(1) { --hs-boot-delay: 130ms; }
body.hotspot-mode .hotspot-panel.hs-booting .hs-stat:nth-child(2) { --hs-boot-delay: 180ms; }
body.hotspot-mode .hotspot-panel.hs-booting .hs-stat:nth-child(3) { --hs-boot-delay: 230ms; }
body.hotspot-mode .hotspot-panel.hs-booting .hs-stat:nth-child(4) { --hs-boot-delay: 280ms; }
body.hotspot-mode .hotspot-panel.hs-booting #hs-douyin-card { --hs-boot-delay: 330ms; }
body.hotspot-mode .hotspot-panel.hs-booting #hs-xhs-card { --hs-boot-delay: 430ms; }
body.hotspot-mode .hotspot-panel.hs-booting .hs-earth-container { --hs-boot-delay: 500ms; }
body.hotspot-mode .hotspot-panel.hs-booting .hs-center-aux { --hs-boot-delay: 660ms; }
body.hotspot-mode .hotspot-panel.hs-booting #hs-wechat-card { --hs-boot-delay: 760ms; }
body.hotspot-mode .hotspot-panel.hs-booting #hs-weibo-card { --hs-boot-delay: 860ms; }
body.hotspot-mode .hotspot-panel.hs-booting .hs-feed-bar { --hs-boot-delay: 1000ms; }
body.hotspot-mode .hotspot-panel.hs-booting .hs-ticker-bar { --hs-boot-delay: 1140ms; }

body.hotspot-mode .hotspot-panel.hs-booting .hs-list-card,
body.hotspot-mode .hotspot-panel.hs-booting .hs-earth-container,
body.hotspot-mode .hotspot-panel.hs-booting .hs-aux-box,
body.hotspot-mode .hotspot-panel.hs-booting .hs-feed-card {
  position: relative;
}

body.hotspot-mode .hotspot-panel.hs-booting .hs-list-card::after,
body.hotspot-mode .hotspot-panel.hs-booting .hs-earth-container::after,
body.hotspot-mode .hotspot-panel.hs-booting .hs-aux-box::after,
body.hotspot-mode .hotspot-panel.hs-booting .hs-feed-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent 0%, rgba(120, 210, 255, 0.22) 48%, transparent 100%),
    repeating-linear-gradient(0deg, rgba(255,255,255,0.04) 0 1px, transparent 1px 5px);
  mix-blend-mode: screen;
  opacity: 0;
  transform: translateX(-120%);
  animation: hs-signal-sweep 560ms ease-out forwards;
  animation-delay: calc(var(--hs-boot-delay, 0ms) + 80ms);
}

@keyframes hs-glitch-in {
  0% {
    opacity: 0;
    transform: translateY(10px) skewX(-0.8deg);
    filter: brightness(1.9) contrast(1.35) saturate(0.6);
    clip-path: inset(42% 0 44% 0);
  }
  14% {
    opacity: 0.9;
    transform: translateY(-1px) translateX(-3px);
    filter: brightness(2.25) contrast(1.6) saturate(1.35);
    clip-path: inset(0 0 72% 0);
  }
  22% {
    opacity: 0.35;
    transform: translateY(4px) translateX(3px);
    clip-path: inset(66% 0 0 0);
  }
  34% {
    opacity: 1;
    transform: translateY(0) translateX(-1px);
    filter: brightness(1.35) contrast(1.18) saturate(1.1);
    clip-path: inset(0 0 0 0);
  }
  46% {
    opacity: 0.72;
    transform: translateY(1px);
    filter: brightness(1.8) contrast(1.35);
  }
  100% {
    opacity: 1;
    transform: none;
    filter: none;
    clip-path: inset(0 0 0 0);
  }
}

@keyframes hs-signal-sweep {
  0% { opacity: 0; transform: translateX(-120%); }
  18% { opacity: 0.75; }
  100% { opacity: 0; transform: translateX(120%); }
}

@media (prefers-reduced-motion: reduce) {
  body.hotspot-mode .hotspot-panel.hs-booting .hs-header,
  body.hotspot-mode .hotspot-panel.hs-booting .hs-stat,
  body.hotspot-mode .hotspot-panel.hs-booting .hs-list-card,
  body.hotspot-mode .hotspot-panel.hs-booting .hs-earth-container,
  body.hotspot-mode .hotspot-panel.hs-booting .hs-center-aux,
  body.hotspot-mode .hotspot-panel.hs-booting .hs-feed-bar,
  body.hotspot-mode .hotspot-panel.hs-booting .hs-ticker-bar {
    opacity: 1;
    transform: none;
    animation: none;
  }
}

/* ── 布局联动：聊天框挤到右侧 1/3 ── */
body.hotspot-mode #panel-l1 { transform: translateX(calc(-100% - 20px)); }
body.hotspot-mode #panel-l2 { transform: translateX(calc(100% + 20px)); }
body.hotspot-mode .console  { left: calc(66vw + 8px); right: 16px; }
body.hotspot-mode #graph    { transform: none; }
body.hotspot-mode .panel-tab { opacity: 0; pointer-events: none; transition: opacity 0.3s ease; }

/* ── 文档面板布局联动：两侧面板退出，聊天框居右半屏 ── */
body.doc-panel-mode #panel-l1 { transform: translateX(calc(-100% - 20px)); }
body.doc-panel-mode #panel-l2 { transform: translateX(calc(100% + 20px)); }
body.doc-panel-mode .console  { left: calc(50vw + 8px); right: 16px; }
body.doc-panel-mode #graph    { transform: none; }
body.doc-panel-mode .panel-tab { opacity: 0; pointer-events: none; transition: opacity 0.3s ease; }

/* ── 语音球悬浮：在热点/视频模式下移到对应聊天区顶部 ── */
/* #voice-panel 被 JS 移到 body 根下，用 fixed 定位，不再受 panel transform 影响 */
body.hotspot-mode > #voice-panel,
body.video-mode   > #voice-panel {
  position: fixed;
  z-index: 300;
  width: auto;
  margin: 0;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: var(--panel);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  top: 20px;
  animation: none;
}

body.hotspot-mode > #voice-panel {
  left: calc(66vw + 12px);
  right: 20px;
}

body.video-mode > #voice-panel {
  left: 20px;
  right: calc(66vw + 12px);
}

body.hotspot-mode > #voice-panel #voice-canvas,
body.video-mode   > #voice-panel #voice-canvas {
  width: 56px !important;
  flex-shrink: 0;
}

/* ── 顶部标题栏 ── */
.hs-header {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  height: 46px;
  border-bottom: 1px solid var(--line);
  min-width: 0;
}

.hs-brand {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  white-space: nowrap;
}
.hs-brand-name {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  font-weight: 600;
  color: var(--cool);
  letter-spacing: 0.06em;
}
.hs-brand-dot  { font-size: 7px; color: #44ee88; animation: hs-blink 1.5s infinite; }
.hs-brand-status { font-size: 10px; color: #44ee88; font-family: "JetBrains Mono", monospace; letter-spacing: 0.04em; }

@keyframes hs-blink { 0%,100% { opacity:1; } 50% { opacity:0.3; } }

.hs-title-block {
  flex: 1 1 0;
  min-width: 0;
  text-align: center;
}
.hs-title-en {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.12em;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hs-title-zh {
  font-size: 10px;
  color: var(--dim);
  letter-spacing: 0.08em;
  margin-top: 1px;
}

.hs-header-right {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 0 0 auto;
}
.hs-header-meta {
  display: flex;
  gap: 14px;
}
.hs-header-tag {
  font-size: 9.5px;
  color: var(--dim);
  font-family: "JetBrains Mono", monospace;
  line-height: 1.4;
  text-align: center;
}
.hs-tag-icon  { color: var(--cool); margin-right: 2px; }
.hs-tag-status { color: var(--ink2); }

.hs-clock-block { text-align: right; }
.hs-clock {
  font-family: "JetBrains Mono", monospace;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.04em;
  line-height: 1.1;
}
.hs-live-dot {
  font-size: 9px;
  color: #ff4444;
  letter-spacing: 0.08em;
  animation: hs-blink 1.2s infinite;
}

.hs-exit-btn {
  background: none;
  border: 1px solid var(--line);
  color: var(--dim);
  font-size: 16px;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  flex: 0 0 auto;
  padding: 0;
}
.hs-exit-btn:hover { color: var(--ink); background: var(--line-strong); border-color: var(--cool); }

/* ── 统计条 ── */
.hs-stats-bar {
  flex: 0 0 auto;
  display: flex;
  gap: 1px;
  border-bottom: 1px solid var(--line);
  background: var(--line);
}

.hs-stat {
  flex: 1 1 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  background: var(--bg1);
  min-width: 0;
}
.hs-stat-icon {
  font-size: 18px;
  flex: 0 0 auto;
  line-height: 1;
}
.hs-stat--warn .hs-stat-icon { color: #f0a030; }
.hs-stat--hot  .hs-stat-icon { }
.hs-stat--data .hs-stat-icon { color: var(--cool); }
.hs-stat--ai   .hs-stat-icon { color: #aa88ff; }

.hs-stat-body { min-width: 0; }
.hs-stat-label {
  font-size: 9.5px;
  color: var(--dim);
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.hs-stat-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.1;
  font-family: "JetBrains Mono", monospace;
  letter-spacing: -0.02em;
}
.hs-stat-delta {
  font-size: 9px;
  color: var(--dim);
  margin-top: 1px;
  white-space: nowrap;
}
.hs-delta-up   { color: #44dd88; }
.hs-delta-down { color: #ee5555; }

/* ── 主体三柱 ── */
.hs-body {
  flex: 1 1 0;
  min-height: 0;
  display: flex;
  gap: 0;
  overflow: hidden;
}

.hs-col {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-right: 1px solid var(--line);
}
.hs-col:last-child { border-right: none; }

.hs-col-left,
.hs-col-right {
  flex: 0 0 22%;
  min-width: 160px;
  gap: 0;
}
.hs-col-center {
  flex: 1 1 0;
  border-right: 1px solid var(--line);
}

/* ── 平台热榜卡片 ── */
.hs-list-card {
  flex: 1 1 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.hs-list-card:last-child { border-bottom: none; }

.hs-card-header {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px 6px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg1) 80%, transparent);
}

.hs-platform-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: 0 0 auto;
}
.hs-dot-douyin   { background: #FE2C55; box-shadow: 0 0 6px #FE2C5588; }
.hs-dot-xhs      { background: #FF2442; box-shadow: 0 0 6px #FF244288; }
.hs-dot-wechat   { background: #07C160; box-shadow: 0 0 6px #07C16088; }
.hs-dot-weibo { background: #E6162D; box-shadow: 0 0 6px #E6162D88; }

.hs-platform-name {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink);
  flex: 0 0 auto;
}
.hs-card-badge {
  font-size: 9px;
  color: var(--dim);
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  padding: 0 4px;
  line-height: 1.5;
  flex: 0 0 auto;
}
.hs-card-update {
  margin-left: auto;
  font-size: 9px;
  color: var(--dim);
  white-space: nowrap;
}

/* ── 热榜列表 ── */
.hs-list {
  flex: 1 1 0;
  min-height: 0;
  overflow-y: auto;
  list-style: none;
  margin: 0;
  padding: 2px 0;
  scrollbar-width: none;
}
.hs-list::-webkit-scrollbar { display: none; }

.hs-item {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  cursor: default;
  transition: background 0.12s ease;
  min-width: 0;
}
.hs-item:hover { background: var(--line); }

.hs-rank {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  font-weight: 700;
  color: var(--dim);
  flex: 0 0 16px;
  text-align: center;
  line-height: 1;
}
.hs-rank-top1 { color: #ff4444; }
.hs-rank-top2 { color: #ff8800; }
.hs-rank-top3 { color: #ffcc00; }

.hs-item-text {
  flex: 1 1 0;
  min-width: 0;
  font-size: 11px;
  color: var(--ink2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.4;
}
.hs-new-badge {
  display: inline-block;
  font-size: 8.5px;
  color: #ff4444;
  border: 1px solid #ff444466;
  border-radius: 2px;
  padding: 0 2px;
  margin-left: 4px;
  vertical-align: middle;
  line-height: 1.4;
}

.hs-heat {
  font-size: 9.5px;
  color: var(--dim);
  flex: 0 0 auto;
  white-space: nowrap;
}
.hs-label-badge {
  font-size: 9px;
  color: var(--cool);
  border: 1px solid color-mix(in srgb, var(--cool) 30%, transparent);
  border-radius: 3px;
  padding: 0 3px;
  flex: 0 0 auto;
  white-space: nowrap;
  line-height: 1.5;
}

.hs-trend {
  font-size: 10px;
  font-family: "JetBrains Mono", monospace;
  flex: 0 0 10px;
  text-align: center;
}
.hs-trend-up   { color: #44dd88; }
.hs-trend-dn   { color: #ee5555; }
.hs-trend-same { color: var(--dim); }

/* ── 中柱：地球容器 ── */
.hs-earth-container {
  flex: 1 1 0;
  min-height: 0;
  position: relative;
  overflow: hidden;
  background: radial-gradient(ellipse at center, #0a1a2e 0%, #060b14 100%);
}

.hs-earth-container canvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
}
.hs-earth-container canvas:active { cursor: grabbing; }

.hs-earth-label {
  position: absolute;
  top: 10px;
  left: 14px;
  font-size: 9.5px;
  color: var(--cool);
  font-family: "JetBrains Mono", monospace;
  letter-spacing: 0.12em;
  opacity: 0.7;
  pointer-events: none;
}
.hs-earth-hint {
  position: absolute;
  bottom: 8px;
  right: 12px;
  font-size: 9px;
  color: var(--dim);
  pointer-events: none;
  letter-spacing: 0.04em;
}

/* ── 中柱：辅助信息（区域关注 + 情绪指数） ── */
.hs-center-aux {
  flex: 0 0 auto;
  display: flex;
  gap: 0;
  border-top: 1px solid var(--line);
  height: 120px;
}

.hs-aux-box {
  flex: 1 1 0;
  padding: 8px 12px;
  border-right: 1px solid var(--line);
  overflow: hidden;
  min-width: 0;
}
.hs-aux-box:last-child { border-right: none; }

.hs-aux-title {
  font-size: 10px;
  color: var(--ink2);
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
  white-space: nowrap;
}
.hs-aux-sub {
  font-size: 8.5px;
  color: var(--dim);
  font-weight: 400;
  margin-left: 4px;
  letter-spacing: 0.06em;
}

.hs-region-list { display: flex; flex-direction: column; gap: 3px; }
.hs-region-row  { display: flex; align-items: center; gap: 6px; }
.hs-region-name { font-size: 9.5px; color: var(--ink2); flex: 0 0 52px; white-space: nowrap; }
.hs-bar-track   { flex: 1 1 0; height: 3px; background: var(--line-strong); border-radius: 2px; overflow: hidden; }
.hs-bar-fill    { height: 100%; background: linear-gradient(90deg, var(--cool), #88ccff); border-radius: 2px; transition: width 0.8s ease; }
.hs-region-pct  { font-size: 9px; color: var(--dim); flex: 0 0 28px; text-align: right; font-family: "JetBrains Mono", monospace; }

.hs-sentiment   { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.hs-sentiment-ring { position: relative; width: 80px; height: 80px; }
.hs-ring-svg    { width: 80px; height: 80px; }
.hs-ring-label  {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
}
.hs-ring-num    { font-size: 18px; font-weight: 700; color: var(--ink); font-family: "JetBrains Mono", monospace; line-height: 1; }
.hs-ring-text   { font-size: 8.5px; color: var(--dim); margin-top: 1px; }
.hs-sentiment-delta { font-size: 9.5px; color: #44dd88; }

/* ── 实时事件流 ── */
.hs-feed-bar {
  flex: 0 0 auto;
  display: flex;
  align-items: stretch;
  gap: 0;
  height: 146px;
  border-top: 1px solid var(--line);
  overflow: hidden;
}

.hs-feed-label {
  flex: 0 0 auto;
  width: 80px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 8px 10px;
  border-right: 1px solid var(--line);
  gap: 2px;
  background: color-mix(in srgb, var(--bg1) 60%, transparent);
}
.hs-feed-live-dot { color: #ff4444; font-size: 8px; animation: hs-blink 1.2s infinite; }
.hs-feed-label > span:nth-child(2) { font-size: 11px; font-weight: 700; color: var(--cool); letter-spacing: 0.06em; }
.hs-feed-subtitle { font-size: 10px; color: var(--ink2); font-weight: 600; }
.hs-feed-desc     { font-size: 8.5px; color: var(--dim); line-height: 1.4; margin-top: 2px; }

.hs-feed-viewport {
  flex: 1 1 0;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scrollbar-width: none;
  padding: 8px 6px;
  display: flex;
  align-items: stretch;
}
.hs-feed-viewport::-webkit-scrollbar { display: none; }

.hs-feed-track {
  display: flex;
  gap: 12px;
  align-items: stretch;
}

.hs-feed-card {
  flex: 0 0 200px;
  background: var(--bg1);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 9px 11px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: default;
  transition: border-color 0.15s ease, background 0.15s ease;
  min-width: 0;
}
.hs-feed-card:hover { border-color: var(--cool); background: color-mix(in srgb, var(--bg1) 80%, var(--cool) 5%); }

.hs-feed-card-top { display: flex; align-items: center; gap: 6px; }
.hs-feed-time     { font-size: 9px; color: var(--dim); font-family: "JetBrains Mono", monospace; flex: 0 0 auto; }
.hs-feed-cat      { font-size: 9px; border: 1px solid; border-radius: 3px; padding: 0 4px; line-height: 1.5; flex: 0 0 auto; }
.hs-feed-title    { font-size: 11px; font-weight: 600; color: var(--ink); line-height: 1.35; }
.hs-feed-desc     { font-size: 9.5px; color: var(--ink2); line-height: 1.4; flex: 1 1 0; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.hs-feed-loc      { font-size: 9px; color: var(--dim); margin-top: auto; }

.hs-feed-controls {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 10px;
  border-left: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg1) 60%, transparent);
}
.hs-feed-auto-label {
  font-size: 9px;
  color: var(--dim);
  writing-mode: vertical-rl;
  letter-spacing: 0.06em;
}
.hs-feed-nav {
  background: none;
  border: 1px solid var(--line-strong);
  color: var(--dim);
  font-size: 16px;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: color 0.12s ease, background 0.12s ease;
  padding: 0;
}
.hs-feed-nav:hover { color: var(--ink); background: var(--line); }

/* ── 底部跑马灯 ── */
.hs-ticker-bar {
  flex: 0 0 auto;
  height: 30px;
  border-top: 1px solid var(--line);
  overflow: hidden;
  display: flex;
  align-items: center;
  background: color-mix(in srgb, var(--bg-deep) 80%, #001020 20%);
}

.hs-ticker-inner {
  display: inline-flex;
  white-space: nowrap;
  animation: hs-ticker 60s linear infinite;
  will-change: transform;
}

@keyframes hs-ticker {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.hs-ticker-item {
  font-size: 10.5px;
  color: var(--ink2);
  padding: 0 8px;
}
.hs-ticker-time {
  font-family: "JetBrains Mono", monospace;
  font-size: 9.5px;
  color: var(--cool);
  margin-right: 6px;
}
.hs-ticker-sep {
  color: var(--dim);
  font-size: 8px;
  padding: 0 6px;
}

/* ─────────────────────────────────────────────────────────────────────────────
   人物卡片模式  PERSON CARD MODE
   ───────────────────────────────────────────────────────────────────────────── */

.person-card-panel {
  position: fixed;
  right: 18px;
  top: 82px;
  width: min(420px, calc(100vw - 28px));
  z-index: 90;
  pointer-events: none;
  opacity: 0;
}

body.person-card-mode .person-card-panel,
.person-card-panel.pc-visible {
  pointer-events: auto;
  opacity: 1;
}

.person-card-panel.pc-entering {
  animation: pc-flash-in 280ms ease both;
}

.person-card-panel.pc-leaving {
  pointer-events: none;
  animation: pc-flash-out 220ms ease both;
}

.pc-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(130, 210, 255, 0.28);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(12, 22, 28, 0.94), rgba(18, 18, 26, 0.94)),
    rgba(12, 22, 28, 0.94);
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  color: var(--ink);
  padding: 18px;
}

.pc-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(130, 210, 255, 0.08), transparent 34%),
    repeating-linear-gradient(0deg, rgba(255,255,255,0.035) 0, rgba(255,255,255,0.035) 1px, transparent 1px, transparent 8px);
  opacity: 0.55;
}

.pc-exit-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink2);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-3px);
  transition: opacity 150ms ease, transform 150ms ease, border-color 150ms ease, color 150ms ease;
}

.pc-card:hover .pc-exit-btn,
.pc-exit-btn:focus-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.pc-exit-btn:hover {
  color: var(--ink);
  border-color: rgba(130, 210, 255, 0.45);
}

.pc-header,
.pc-hero,
.pc-summary,
.pc-section,
.pc-tags,
.pc-footer {
  position: relative;
  z-index: 1;
}

.pc-header {
  min-width: 0;
  margin-top: 14px;
}

.pc-hero {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(130, 210, 255, 0.32);
  background:
    linear-gradient(135deg, rgba(73, 158, 210, 0.24), rgba(220, 120, 160, 0.12)),
    rgba(255, 255, 255, 0.04);
  color: #dff5ff;
  font-size: 42px;
  font-weight: 800;
}

.pc-hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 28%;
}

.pc-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 52%, rgba(8, 14, 18, 0.35));
}

.pc-hero-fallback {
  position: relative;
  z-index: 1;
}

.pc-hero.pc-hero-has-image .pc-hero-fallback {
  display: none;
}

.pc-head-copy {
  min-width: 0;
  padding-right: 34px;
}

.pc-kicker {
  color: #82d2ff;
  font-size: 11px;
  letter-spacing: 0;
  font-weight: 800;
}

.pc-name {
  margin-top: 3px;
  font-size: 24px;
  line-height: 1.15;
  font-weight: 850;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.pc-title {
  margin-top: 5px;
  color: var(--ink2);
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.pc-summary {
  margin-top: 16px;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.65;
}

.pc-section {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
}

.pc-section-title {
  color: var(--ink2);
  font-size: 12px;
  margin-bottom: 8px;
}

.pc-known-list {
  margin: 0;
  padding: 0;
  display: grid;
  gap: 7px;
  list-style: none;
}

.pc-known-list li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.35;
}

.pc-known-list li::before {
  content: "";
  flex: 0 0 5px;
  width: 5px;
  height: 5px;
  margin-top: 6px;
  border-radius: 50%;
  background: #82d2ff;
  box-shadow: 0 0 12px rgba(130, 210, 255, 0.65);
}

.pc-tags {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.pc-tag {
  max-width: 100%;
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid rgba(130, 210, 255, 0.24);
  color: #bfeaff;
  background: rgba(130, 210, 255, 0.08);
  font-size: 12px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.pc-footer {
  margin-top: 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--dim);
  font-size: 11px;
}

@media (max-width: 720px) {
  .person-card-panel {
    top: auto;
    right: 14px;
    left: 14px;
    bottom: 86px;
    width: auto;
  }
}

@keyframes pc-flash-in {
  0%   { opacity: 0; filter: brightness(2); }
  15%  { opacity: 1; filter: brightness(1.5); }
  35%  { opacity: 0.55; filter: none; }
  60%  { opacity: 1; }
  80%  { opacity: 0.82; }
  100% { opacity: 1; }
}

@keyframes pc-flash-out {
  0%   { opacity: 1; }
  25%  { opacity: 0.6; filter: brightness(1.4); }
  55%  { opacity: 0.85; filter: none; }
  100% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .person-card-panel,
  .person-card-panel.pc-entering,
  .person-card-panel.pc-leaving {
    animation: none !important;
    transition: none !important;
  }
}


/* ═══════════════════════════════════════════════════════════════════════════
   文档面板 (Doc Panel)
   从左侧滑入，覆盖在热点面板区域上方（z-index 5，比热点 4 更高）
   ═══════════════════════════════════════════════════════════════════════════ */

.doc-panel {
  position: fixed;
  left: 16px;
  top: 16px;
  bottom: 16px;
  width: 0;
  overflow: hidden;
  z-index: 5;
  border-radius: 16px;
  background: color-mix(in srgb, var(--bg-deep) 96%, #0a1a2e);
  border: 1px solid transparent;
  opacity: 0;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  transition:
    width  0.4s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.3s ease,
    border-color 0.3s ease;
}

.doc-panel.dp-visible {
  width: calc(50vw - 32px);
  opacity: 1;
  pointer-events: auto;
  border-color: var(--line-strong);
}

/* ── 顶部标题栏 ── */
.dp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--line-mid);
  flex-shrink: 0;
}

.dp-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.dp-icon {
  font-size: 22px;
  flex-shrink: 0;
}

.dp-titles {
  min-width: 0;
}

.dp-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dp-subtitle {
  font-size: 10px;
  color: var(--text-muted);
  font-family: var(--mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-top: 1px;
}

.dp-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.dp-tabs {
  display: flex;
  gap: 4px;
}

.dp-tab {
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid var(--line-mid);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.dp-tab:hover {
  background: var(--bg-card);
  color: var(--text-primary);
}

.dp-tab.dp-tab-active {
  background: var(--cool, #4a9fd5);
  border-color: transparent;
  color: #fff;
}

.dp-close-btn {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid var(--line-mid);
  background: transparent;
  color: var(--text-muted);
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
  line-height: 1;
}

.dp-close-btn:hover {
  background: var(--bg-card);
  color: var(--text-primary);
}

/* ── 摘要栏 ── */
.dp-summary {
  font-size: 12px;
  color: var(--text-secondary);
  padding: 8px 16px;
  border-bottom: 1px solid var(--line-weak);
  flex-shrink: 0;
  line-height: 1.5;
}

/* ── 主体（左导航 + 右内容） ── */
.dp-body {
  display: flex;
  flex: 1;
  overflow: hidden;
  min-height: 0;
}

/* 左：章节导航 */
.dp-nav {
  width: 160px;
  flex-shrink: 0;
  border-right: 1px solid var(--line-weak);
  overflow-y: auto;
  padding: 8px 0;
}

.dp-nav::-webkit-scrollbar { width: 3px; }
.dp-nav::-webkit-scrollbar-track { background: transparent; }
.dp-nav::-webkit-scrollbar-thumb { background: var(--line-mid); border-radius: 2px; }

.dp-nav-item {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  width: 100%;
  padding: 8px 12px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 11px;
  text-align: left;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
  line-height: 1.4;
}

.dp-nav-item:hover {
  background: var(--bg-card);
  color: var(--text-secondary);
}

.dp-nav-item.dp-nav-active {
  background: color-mix(in srgb, var(--cool, #4a9fd5) 15%, transparent);
  color: var(--cool, #4a9fd5);
}

.dp-nav-num {
  font-family: var(--mono);
  font-size: 10px;
  opacity: 0.5;
  flex-shrink: 0;
  padding-top: 1px;
}

.dp-nav-label {
  flex: 1;
  min-width: 0;
}

/* 右：内容详情 */
.dp-content {
  flex: 1;
  overflow-y: auto;
  padding: 14px 16px;
  min-width: 0;
}

.dp-content::-webkit-scrollbar { width: 4px; }
.dp-content::-webkit-scrollbar-track { background: transparent; }
.dp-content::-webkit-scrollbar-thumb { background: var(--line-mid); border-radius: 2px; }

.dp-section-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line-weak);
}

.dp-section-body {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.75;
}

.dp-bullet {
  color: var(--cool, #4a9fd5);
  margin: 4px 0;
  font-weight: 500;
}

.dp-arrow-item {
  padding-left: 8px;
  margin: 3px 0;
  color: var(--text-secondary);
}

.dp-list-item {
  display: flex;
  gap: 6px;
  margin: 3px 0;
}

.dp-list-num {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--cool, #4a9fd5);
  flex-shrink: 0;
  min-width: 16px;
}

.dp-link {
  color: var(--cool, #4a9fd5);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s;
  word-break: break-all;
}

.dp-link:hover {
  border-bottom-color: var(--cool, #4a9fd5);
}

.dp-loading {
  color: var(--text-muted);
  font-size: 12px;
  padding: 20px 0;
  text-align: center;
}

/* ── 服务商快速链接 ── */
.dp-providers {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 14px;
  border-top: 1px solid var(--line-weak);
  flex-shrink: 0;
}

.dp-provider-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid var(--line-mid);
  font-size: 11px;
  color: var(--text-secondary);
  text-decoration: none;
  background: var(--bg-card);
  transition: border-color 0.15s, color 0.15s;
  white-space: nowrap;
}

.dp-provider-chip:hover {
  border-color: var(--cool, #4a9fd5);
  color: var(--text-primary);
}

.dp-provider-chip.dp-provider-free {
  border-color: color-mix(in srgb, var(--cool, #4a9fd5) 40%, transparent);
}

.dp-chip-badge {
  font-size: 9px;
  background: color-mix(in srgb, var(--cool, #4a9fd5) 20%, transparent);
  color: var(--cool, #4a9fd5);
  padding: 1px 4px;
  border-radius: 4px;
}

.dp-chip-arrow {
  font-size: 10px;
  opacity: 0.5;
}

/* ── 底部状态栏 ── */
.dp-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 14px;
  border-top: 1px solid var(--line-weak);
  flex-shrink: 0;
}

.dp-footer-note {
  font-size: 10px;
  color: color-mix(in srgb, var(--cool, #4a9fd5) 80%, transparent);
  font-family: var(--mono);
}

.dp-footer-ttl {
  font-size: 10px;
  color: var(--text-muted);
  font-family: var(--mono);
}

/* ── 内联配置表单 ── */
.dp-config {
  flex-shrink: 0;
  border-top: 1px solid rgba(255,255,255,0.07);
  padding: 12px 16px 4px;
  background: rgba(0,0,0,0.15);
}

.dpc-section-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--cool, #4a9fd5);
  letter-spacing: 0.04em;
  margin-bottom: 8px;
  font-family: var(--mono);
}

.dpc-tabs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.dpc-tab {
  padding: 3px 9px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
  color: var(--text-muted);
  font-size: 11px;
  font-family: var(--mono);
  cursor: pointer;
  transition: all 0.15s;
}
.dpc-tab:hover { background: rgba(255,255,255,0.09); color: var(--text); }
.dpc-tab-active {
  background: rgba(74,159,213,0.18);
  border-color: rgba(74,159,213,0.45);
  color: var(--cool, #4a9fd5);
}

.dpc-fields { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }

.dpc-field {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dpc-label {
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--mono);
  min-width: 110px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 5px;
}

.dpc-badge {
  font-size: 9px;
  padding: 1px 5px;
  border-radius: 8px;
  background: rgba(80,200,120,0.2);
  border: 1px solid rgba(80,200,120,0.35);
  color: #5ec87a;
  font-weight: 600;
}

.dpc-input, .dpc-select {
  flex: 1;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 5px;
  color: var(--text);
  font-size: 11px;
  font-family: var(--mono);
  padding: 4px 8px;
  outline: none;
  transition: border-color 0.15s;
  min-width: 0;
}
.dpc-input:focus, .dpc-select:focus { border-color: rgba(74,159,213,0.5); }
.dpc-input-configured { border-color: rgba(80,200,120,0.3); }
.dpc-select option { background: #1a1f2e; }

.dpc-info {
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--mono);
  line-height: 1.6;
  padding: 6px 0;
}

.dpc-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.dpc-save-btn {
  padding: 4px 14px;
  border-radius: 5px;
  border: 1px solid rgba(74,159,213,0.4);
  background: rgba(74,159,213,0.12);
  color: var(--cool, #4a9fd5);
  font-size: 11px;
  font-family: var(--mono);
  cursor: pointer;
  transition: all 0.15s;
}
.dpc-save-btn:hover { background: rgba(74,159,213,0.22); }

.dpc-status {
  font-size: 11px;
  font-family: var(--mono);
  color: var(--text-muted);
  transition: color 0.2s;
}
.dpc-status-ok  { color: #5ec87a; }
.dpc-status-err { color: #e06c75; }

/* voice_config 双栏布局 */
.dpc-dual {
  display: flex;
  gap: 16px;
}
.dpc-dual-col {
  flex: 1;
  min-width: 0;
}
.dpc-dual-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
  font-family: var(--mono);
}
