/* Qwen3-ASR Web UI 共享样式：应用栏 / 工作区栅格 / 分段时间轴 / 控制台条 / 协议日志。
 * 主色 teal #14b8a6；暗色基于 body.dark（common.js 同步切换）。 */
:root {
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, "Liberation Mono", monospace;
  --accent: #14b8a6;
  --accent-deep: #0d9488;
  --rec: #ef4444;
  /* 键值行配色（模型信息卡 / 会话协议卡共用，随主题切换） */
  --kv-key: #64748b;
  --kv-val: #334155;
}
body.dark { --kv-key: #94a3b8; --kv-val: #e2e8f0; }
* { margin: 0; padding: 0; box-sizing: border-box; }

/* 背景：网点纹理 + 顶部主色光晕（颜色本体由 Naive 主题 bodyColor 控制） */
body { background-image: radial-gradient(rgba(15, 118, 110, .05) 1px, transparent 1px); background-size: 22px 22px; }
body.dark { background-image: radial-gradient(rgba(45, 212, 191, .05) 1px, transparent 1px); }
body::before {
  content: ''; position: fixed; top: -240px; left: 50%; transform: translateX(-50%);
  width: 760px; height: 400px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(20, 184, 166, .14), transparent);
  pointer-events: none; z-index: 0;
}
body.dark::before { background: radial-gradient(closest-side, rgba(20, 184, 166, .09), transparent); }

/* —— 应用栏 —— */
.appbar {
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, .82); border-bottom: 1px solid rgba(15, 23, 42, .07);
}
body.dark .appbar { background: rgba(14, 15, 19, .84); border-bottom-color: rgba(255, 255, 255, .07); }
.appbar-inner {
  max-width: 1280px; margin: 0 auto; height: 56px;
  display: flex; align-items: stretch; gap: 26px; padding: 0 clamp(16px, 4vw, 32px);
}
.brand { display: flex; align-items: center; gap: 9px; text-decoration: none; color: #0f172a; font-weight: 700; font-size: .98em; letter-spacing: .2px; }
body.dark .brand { color: #e2e8f0; }
.brand svg { color: var(--accent); }
.appnav { display: flex; gap: 2px; }
.appnav a {
  display: flex; align-items: center; padding: 0 14px; text-decoration: none;
  color: #64748b; font-size: .88em; font-weight: 600;
  border-bottom: 2px solid transparent; margin-bottom: -1px; transition: color .15s ease;
}
.appnav a:hover { color: var(--accent-deep); }
.appnav a.active { color: var(--accent-deep); border-bottom-color: var(--accent); }
body.dark .appnav a { color: #94a3b8; }
body.dark .appnav a:hover, body.dark .appnav a.active { color: #2dd4bf; }
.appbar-right { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.iconbtn {
  position: relative; width: 32px; height: 32px; background: transparent;
  border: 1px solid rgba(15, 23, 42, .1); border-radius: 8px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  color: #64748b; transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.iconbtn:hover { background: rgba(20, 184, 166, .1); border-color: rgba(20, 184, 166, .4); color: var(--accent-deep); }
body.dark .iconbtn { color: #94a3b8; border-color: rgba(255, 255, 255, .13); }
body.dark .iconbtn:hover { background: rgba(45, 212, 191, .12); border-color: rgba(45, 212, 191, .42); color: #2dd4bf; }
/* 统一光学视重：稍放大 + 收细描边，让密集图标(chip)与稀疏图标(key)观感拉平 */
.appbar-right .iconbtn svg { width: 17px; height: 17px; stroke-width: 1.7; }
/* API Key 已配置点：小巧 + 同背景描边环，从应用栏干净浮起 */
.iconbtn.has-key::after { content: ''; position: absolute; right: 4px; bottom: 4px; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .92); }
body.dark .iconbtn.has-key::after { box-shadow: 0 0 0 1.5px rgba(16, 17, 21, .95); }
.iconbtn.lang-btn { width: auto; min-width: 32px; padding: 0 9px; font-size: .8em; font-weight: 600; letter-spacing: .03em; }
/* 服务状态点：独立「状态区」，柔光环替代强发光，用细分隔线与右侧操作图标分组 */
/* 服务就绪灯：并入模型信息(chip)按钮的角标，状态色随 svc.cls */
.svc-badge { width: 6px; height: 6px; border-radius: 50%; background: #94a3b8; flex-shrink: 0; }
.svc-host .svc-badge { position: absolute; right: 4px; bottom: 4px; box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .92); }
body.dark .svc-host .svc-badge { box-shadow: 0 0 0 1.5px rgba(16, 17, 21, .95); }
.svc-host.ok .svc-badge, .svc-line.ok .svc-badge { background: #10b981; }
.svc-host.warn .svc-badge, .svc-line.warn .svc-badge { background: #f59e0b; }
.svc-host.off .svc-badge, .svc-line.off .svc-badge { background: #94a3b8; }
/* 模型信息卡顶部服务状态行 */
.svc-line { display: flex; align-items: center; gap: 7px; font-size: .82em; font-weight: 600; color: var(--kv-val); padding-bottom: 9px; margin-bottom: 7px; border-bottom: 1px solid rgba(148, 163, 184, .16); }
.svc-line .svc-badge { width: 7px; height: 7px; }
/* 应用栏分组分隔线（模型信息 ↔ 操作图标） */
.appbar-sep { width: 1px; height: 18px; background: rgba(148, 163, 184, .28); margin: 0 6px; flex-shrink: 0; }

/* —— 内容区 / 工作区栅格 —— */
.container { position: relative; z-index: 1; max-width: 1280px; margin: 0 auto; padding: 24px clamp(16px, 4vw, 32px) 56px; }
.workspace { display: flex; gap: 20px; align-items: flex-start; }
.side-col { flex: 0 0 340px; min-width: 0; }
.main-col { flex: 1; min-width: 0; }
@media (max-width: 960px) {
  .workspace { flex-direction: column; }
  .side-col { flex: none; width: 100%; }
  .main-col { width: 100%; }
  .appbar-inner { gap: 14px; }
  .brand span { display: none; }
}
/* —— 满高布局（桌面端，仅 body.app-fullh 的转写两页；文档页保持文档流滚动）——
 * 页面不滚动，工作区撑满视口，底部 dock 收起一行/展开占 1/3。
 * .panel-body / .dock-content 经 n-card 的 content-class 注入（公开 API），
 * 不依赖 Naive 内部类名 .n-card-content（库升级改名会静默塌陷）。 */
@media (min-width: 961px) {
  body.app-fullh { overflow: hidden; }
  .app-fullh .container { height: calc(100vh - 57px); padding-top: 20px; padding-bottom: 20px; }  /* 57 = 应用栏 56 + 1px 底边框 */
  .page-flex { height: 100%; display: flex; flex-direction: column; }
  .workspace { flex: 1; min-height: 0; }
  .side-col { max-height: 100%; overflow: auto; }
  .main-col { height: 100%; }
  .main-col .panel { height: 100%; display: flex; flex-direction: column; }
  .main-col .panel > .panel-body { flex: 1; min-height: 0; overflow: auto; }
  #transcript { height: 100%; overflow: auto; }
  .dock-card.open { flex: 0 0 33%; min-height: 0; display: flex; flex-direction: column; }
  .dock-card.open > .dock-content { flex: 1; min-height: 0; display: flex; flex-direction: column; }
  .dock-body { flex: 1; min-height: 0; overflow: auto; }
  .dock-card.open .proto-log { max-height: none; }
}
.panel { border-radius: 12px; box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 1px 3px rgba(16, 24, 40, .07); }
body.dark .panel { box-shadow: none; border: 1px solid rgba(255, 255, 255, .06); }
.panel-title { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; }
.panel-title svg { color: var(--accent); }

/* —— 离线页 —— */
.file-meta { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: .85em; color: #64748b; }
body.dark .file-meta { color: #94a3b8; }
.file-meta .file-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.audio-box { width: 100%; margin-top: 10px; height: 40px; }
.sec-title { font-size: .8em; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: #64748b; margin: 4px 0 10px; }
body.dark .sec-title { color: #94a3b8; }

/* 高级设置：标签 + 控件成行对齐（离线/实时 per-request 覆盖项） */
.adv-field { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 9px 0; }
.adv-field .lbl { font-size: .82em; color: #475569; flex: 1; min-width: 0; line-height: 1.35; transition: opacity .15s; }
body.dark .adv-field .lbl { color: #cbd5e1; }
.adv-field .lbl.muted { opacity: .4; }
.adv-hint { font-size: .76em; color: #94a3b8; line-height: 1.55; margin: 2px 0 12px; }
.adv-field + .sec-title { margin-top: 16px; }

/* 应用栏「模型信息」卡片（chip 图标悬停弹出） */
.model-card { min-width: 226px; }
.model-card-title { font-size: .76em; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; }
.model-row { display: flex; justify-content: space-between; gap: 18px; padding: 5px 0; font-size: .84em; font-variant-numeric: tabular-nums; }
.model-row + .model-row { border-top: 1px solid rgba(148, 163, 184, .16); }
.model-row .k { color: var(--kv-key); white-space: nowrap; }
.model-row .v { font-weight: 600; color: var(--kv-val); text-align: right; word-break: break-all; }
.model-row .v.on { color: var(--accent); }
.model-row .v.off { color: #94a3b8; font-weight: 500; }

.seg-row { display: flex; align-items: flex-start; gap: 14px; padding: 6px 8px 6px 0; border-radius: 8px; cursor: pointer; }
.seg-row.static { cursor: default; }
.seg-row:hover { background: rgba(20, 184, 166, .07); }
.seg-time {
  flex: 0 0 92px; text-align: right; padding: 4px 12px 0 0;
  font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: .78em; color: #64748b;
  border-right: 2px solid rgba(20, 184, 166, .3);
}
body.dark .seg-time { color: #94a3b8; }
.seg-text { flex: 1; line-height: 1.65; }
.seg-play { opacity: 0; color: var(--accent); padding-top: 4px; transition: opacity .12s ease; }
.seg-row:hover .seg-play { opacity: 1; }
.full-text { white-space: pre-wrap; line-height: 1.75; }
.json-pre {
  max-height: 380px; overflow: auto; padding: 12px; border-radius: 8px;
  font-family: var(--mono); font-size: .8em; line-height: 1.55;
  background: rgba(127, 127, 127, .08); white-space: pre-wrap; word-break: break-all;
}
.poll-note { display: block; margin-top: 8px; font-size: .76em; }

/* —— 实时页 —— */
.console-row { display: flex; align-items: center; gap: 30px; flex-wrap: wrap; }
.status-pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px;
  font-size: .85em; font-weight: 600; background: rgba(100, 116, 139, .1); color: #475569; white-space: nowrap;
}
body.dark .status-pill { background: rgba(148, 163, 184, .1); color: #cbd5e1; }
.status-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: #94a3b8; flex-shrink: 0; }
.status-pill.connecting .dot, .status-pill.stopping .dot { background: #f59e0b; }
.status-pill.streaming { background: rgba(239, 68, 68, .1); color: #dc2626; }
body.dark .status-pill.streaming { color: #f87171; }
.status-pill.streaming .dot { background: var(--rec); animation: rec-pulse 1.4s ease-in-out infinite; }
@keyframes rec-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, .45); }
  50% { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
}
.diag-row { display: flex; gap: 30px; flex-wrap: wrap; font-variant-numeric: tabular-nums; }
.diag-unit { font-size: .6em; opacity: .65; }
.vu-canvas { display: block; width: 100%; height: 12px; border-radius: 6px; background: rgba(127, 127, 127, .13); }
/* 文件模拟：ffmpeg 选项（勾选框 + 说明 popover 触发图标）与转码器加载提示 */
.ff-opt { display: flex; align-items: center; gap: 6px; }
.info-dot { display: inline-flex; align-items: center; color: #94a3b8; cursor: help; transition: color .15s ease; }
.info-dot:hover { color: var(--accent-deep); }
body.dark .info-dot:hover { color: #2dd4bf; }
.ff-tip { max-width: 264px; font-size: .82em; line-height: 1.65; }
.ff-loading { display: flex; align-items: center; gap: 8px; font-size: .8em; color: var(--accent-deep); }
body.dark .ff-loading { color: #2dd4bf; }
.transcript-line { display: flex; gap: 12px; padding: 3px 0; }
.transcript-line .t {
  flex: 0 0 80px; text-align: right; padding: 5px 10px 0 0;
  font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: .76em; color: #64748b;
  border-right: 2px solid rgba(20, 184, 166, .3);
}
body.dark .transcript-line .t { color: #94a3b8; }
.transcript-line .tx { flex: 1; line-height: 1.7; }
.partial-line {
  margin-top: 10px; padding: 8px 12px; line-height: 1.65;
  border-left: 3px solid var(--accent); background: rgba(20, 184, 166, .07); border-radius: 0 8px 8px 0;
}
.cursor-blk { display: inline-block; width: 8px; height: 1.05em; background: var(--accent); vertical-align: text-bottom; margin-left: 3px; animation: cursor-blink 1s steps(2) infinite; }
@keyframes cursor-blink { 50% { opacity: 0; } }
/* 追加输出：分隔不同录制/推流批次的虚线 + 居中标签 */
.transcript-divider { display: flex; align-items: center; gap: 10px; margin: 14px 0; color: #94a3b8; font-size: .72em; font-weight: 600; letter-spacing: .05em; }
.transcript-divider::before, .transcript-divider::after { content: ''; flex: 1; border-top: 1px dashed rgba(148, 163, 184, .4); }
body.dark .transcript-divider::before, body.dark .transcript-divider::after { border-top-color: rgba(148, 163, 184, .26); }
.proto-log {
  max-height: 300px; overflow: auto; padding: 10px 12px; border-radius: 8px;
  font-family: var(--mono); font-size: .76em; line-height: 1.55;
  background: rgba(127, 127, 127, .08); white-space: pre-wrap; word-break: break-all;
}
.proto-log .send { color: #0369a1; }
.proto-log .recv { color: #15803d; }
.proto-log .evt { color: #b45309; }
body.dark .proto-log .send { color: #60a5fa; }
body.dark .proto-log .recv { color: #4ade80; }
body.dark .proto-log .evt { color: #fbbf24; }

/* —— 实时页 · 会话协议卡片（输入源下方，session.created 后出现）—— */
.sess-card { margin-top: 16px; position: relative; overflow: hidden; }
/* 顶部主色渐隐细线，呼应「会话握手已建立」语义 */
.sess-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--accent), rgba(20, 184, 166, 0) 78%);
}
.sess-proto {
  display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap;
  padding-bottom: 12px; margin-bottom: 12px;
  border-bottom: 1px dashed rgba(148, 163, 184, .28);
}
.sess-proto .id {
  font-family: var(--mono); font-size: 1em; font-weight: 700;
  letter-spacing: -.2px; color: #0f172a; word-break: break-all;
}
body.dark .sess-proto .id { color: #e2e8f0; }
.sess-proto .ver {
  font-family: var(--mono); font-size: .72em; font-weight: 700;
  padding: 1px 8px; border-radius: 999px;
  background: rgba(20, 184, 166, .14); color: var(--accent-deep);
}
body.dark .sess-proto .ver { color: #2dd4bf; }
.sess-meta { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; align-items: baseline; }
.sess-meta .k { font-size: .82em; color: var(--kv-key); }
.sess-meta .v {
  font-family: var(--mono); font-size: .82em; font-weight: 600;
  color: var(--kv-val); text-align: right; word-break: break-all; font-variant-numeric: tabular-nums;
}
.sess-caps-label {
  font-size: .8em; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  color: #64748b; margin: 16px 0 9px;
}
body.dark .sess-caps-label { color: #94a3b8; }
.sess-caps { display: flex; flex-wrap: wrap; gap: 6px; }
.cap-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px 3px 8px; border-radius: 999px;
  font-size: .75em; font-weight: 600; line-height: 1.5;
}
.cap-chip::before { content: ''; width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.cap-chip.on { background: rgba(20, 184, 166, .12); color: #0d9488; }
.cap-chip.on::before { background: var(--accent); box-shadow: 0 0 5px rgba(20, 184, 166, .55); }
.cap-chip.off { background: rgba(148, 163, 184, .1); color: #94a3b8; }
.cap-chip.off::before { border: 1.5px solid #cbd5e1; }
body.dark .cap-chip.on { color: #2dd4bf; }
body.dark .cap-chip.off { color: #94a3b8; background: rgba(148, 163, 184, .08); }
body.dark .cap-chip.off::before { border-color: #475569; }
.cap-chip.has-tip { cursor: help; }

/* —— 文档中心（服务端渲染 Markdown，外壳走 Studio Console）—— */
.docs-layout { display: flex; gap: 20px; align-items: flex-start; }
.docs-sidebar {
  flex: 0 0 220px; position: sticky; top: 77px;   /* 应用栏 57 + 容器上留白 20 */
  display: flex; flex-direction: column; gap: 2px;
  border-radius: 12px; padding: 10px; background: #fff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 1px 3px rgba(16, 24, 40, .07);
}
body.dark .docs-sidebar { background: #16171c; box-shadow: none; border: 1px solid rgba(255, 255, 255, .06); }
.docs-sidebar a { text-decoration: none; padding: 8px 12px; border-radius: 8px; color: #475569; font-size: .88em; }
.docs-sidebar a:hover { background: rgba(20, 184, 166, .08); color: var(--accent-deep); }
.docs-sidebar a.active { background: rgba(20, 184, 166, .12); color: var(--accent-deep); font-weight: 600; }
/* API v2 子文档：缩进 + 略小字号，体现层级 */
.docs-sidebar a.sub { padding-left: 26px; font-size: .84em; color: #64748b; }
body.dark .docs-sidebar a.sub { color: #8a99ad; }
body.dark .docs-sidebar a { color: #94a3b8; }
body.dark .docs-sidebar a:hover, body.dark .docs-sidebar a.active { color: #2dd4bf; }

.markdown-body {
  flex: 1; min-width: 0; border-radius: 12px; padding: 32px 40px;
  background: #fff; box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 1px 3px rgba(16, 24, 40, .07);
  line-height: 1.7; font-size: .95em; color: #334155;
}
body.dark .markdown-body { background: #16171c; box-shadow: none; border: 1px solid rgba(255, 255, 255, .06); color: #cbd5e1; }
.markdown-body h1, .markdown-body h2, .markdown-body h3, .markdown-body h4 { color: #0f172a; }
body.dark .markdown-body h1, body.dark .markdown-body h2,
body.dark .markdown-body h3, body.dark .markdown-body h4 { color: #e2e8f0; }
.markdown-body h1 { font-size: 1.7em; padding-bottom: .3em; border-bottom: 1px solid #e2e8f0; margin-bottom: 16px; }
.markdown-body h2 { font-size: 1.35em; padding-bottom: .3em; border-bottom: 1px solid #e2e8f0; margin: 28px 0 12px; }
body.dark .markdown-body h1, body.dark .markdown-body h2 { border-bottom-color: rgba(255, 255, 255, .09); }
.markdown-body h3 { font-size: 1.12em; margin: 22px 0 10px; }
.markdown-body h4 { font-size: 1em; margin: 18px 0 8px; }
.markdown-body p, .markdown-body ul, .markdown-body ol { margin-bottom: 12px; }
.markdown-body ul, .markdown-body ol { padding-left: 1.8em; }
.markdown-body li { margin-bottom: 4px; }
.markdown-body a { color: var(--accent-deep); text-decoration: none; }
.markdown-body a:hover { text-decoration: underline; }
body.dark .markdown-body a { color: #2dd4bf; }
.markdown-body code {
  background: rgba(20, 184, 166, .08); padding: 2px 6px; border-radius: 4px;
  font-family: var(--mono); font-size: .88em; color: #0f766e;
}
body.dark .markdown-body code { background: rgba(45, 212, 191, .1); color: #5eead4; }
.markdown-body pre { background: #0f172a; color: #e2e8f0; padding: 14px 16px; border-radius: 8px; overflow-x: auto; margin-bottom: 14px; }
body.dark .markdown-body pre { background: #0b0c10; border: 1px solid rgba(255, 255, 255, .07); }
.markdown-body pre code { background: none; padding: 0; color: inherit; font-size: .86em; }
.markdown-body table { border-collapse: collapse; width: 100%; margin-bottom: 14px; display: block; overflow-x: auto; }
.markdown-body th, .markdown-body td { border: 1px solid #e2e8f0; padding: 8px 12px; text-align: left; }
.markdown-body th { background: #f8fafc; font-weight: 600; }
body.dark .markdown-body th, body.dark .markdown-body td { border-color: rgba(255, 255, 255, .09); }
body.dark .markdown-body th { background: rgba(255, 255, 255, .04); }
.markdown-body blockquote {
  border-left: 4px solid rgba(20, 184, 166, .45); background: #f8fafc;
  padding: 8px 14px; color: #64748b; margin-bottom: 12px; border-radius: 0 8px 8px 0;
}
body.dark .markdown-body blockquote { background: rgba(255, 255, 255, .03); color: #94a3b8; }
.markdown-body blockquote p { margin-bottom: 0; }
.markdown-body hr { border: none; border-top: 1px solid #e2e8f0; margin: 24px 0; }
body.dark .markdown-body hr { border-top-color: rgba(255, 255, 255, .09); }
.markdown-body img { max-width: 100%; }
@media (max-width: 960px) {
  .docs-layout { flex-direction: column; }
  .docs-sidebar { position: static; flex: none; width: 100%; flex-direction: row; flex-wrap: wrap; }
  .markdown-body { padding: 20px 16px; width: 100%; }
}

/* ── 说话人徽标（转写分段行首，匿名标签 A/B/C…，8 色板按标签字母取色） ── */
.speaker-badge {
  display: inline-block; min-width: 18px; padding: 0 5px; margin-right: 6px;
  border-radius: 4px; font-size: .72em; font-weight: 700; line-height: 1.7;
  text-align: center; vertical-align: 1px;
}
.spk-0 { background: rgba(20, 184, 166, .14); color: #0d9488; }
.spk-1 { background: rgba(59, 130, 246, .14); color: #2563eb; }
.spk-2 { background: rgba(139, 92, 246, .14); color: #7c3aed; }
.spk-3 { background: rgba(245, 158, 11, .16); color: #b45309; }
.spk-4 { background: rgba(244, 63, 94, .13); color: #e11d48; }
.spk-5 { background: rgba(34, 197, 94, .14); color: #16a34a; }
.spk-6 { background: rgba(6, 182, 212, .14); color: #0891b2; }
.spk-7 { background: rgba(249, 115, 22, .15); color: #c2410c; }
body.dark .spk-0 { color: #2dd4bf; }
body.dark .spk-1 { color: #60a5fa; }
body.dark .spk-2 { color: #a78bfa; }
body.dark .spk-3 { color: #fbbf24; }
body.dark .spk-4 { color: #fb7185; }
body.dark .spk-5 { color: #4ade80; }
body.dark .spk-6 { color: #22d3ee; }
body.dark .spk-7 { color: #fb923c; }

/* 派生场景色标（离线 per-seg / 时间线 / 实时实况；五桶固定配色） */
.scene-badge {
  display: inline-block; min-width: 18px; padding: 0 6px; margin-right: 6px;
  border-radius: 4px; font-size: .72em; font-weight: 700; line-height: 1.7;
  text-align: center; vertical-align: 1px; white-space: nowrap;
}
.scene-silence { background: rgba(100, 116, 139, .14); color: #475569; }
.scene-speech  { background: rgba(20, 184, 166, .14); color: #0d9488; }
.scene-singing { background: rgba(139, 92, 246, .14); color: #7c3aed; }
.scene-music   { background: rgba(59, 130, 246, .14); color: #2563eb; }
.scene-other   { background: rgba(245, 158, 11, .16); color: #b45309; }
body.dark .scene-silence { color: #94a3b8; }
body.dark .scene-speech  { color: #2dd4bf; }
body.dark .scene-singing { color: #a78bfa; }
body.dark .scene-music   { color: #60a5fa; }
body.dark .scene-other   { color: #fbbf24; }

/* 音频事件时间轴行（离线 audio_events / 标注 scene_timeline 复用） */
.event-row { display: flex; align-items: center; gap: 12px; padding: 5px 8px 5px 0; border-radius: 8px; }
.event-row.seekable { cursor: pointer; }
.event-row.seekable:hover { background: rgba(20, 184, 166, .07); }
.event-span { font-size: .8em; color: #64748b; font-variant-numeric: tabular-nums; white-space: nowrap; }
body.dark .event-span { color: #94a3b8; }
.event-conf { margin-left: auto; font-size: .78em; color: #94a3b8; font-variant-numeric: tabular-nums; }
