/* ─────────────────────────────────────────────────────────────────────────
 * v2.1.148 T1: 音频 CSS 拆分模块 (extracted from prototype.html)
 *
 * 来源行号(拆分前 prototype.html 13314 行,2026-06-26):
 *   - .node.audio                                  L619   (1 行,散落)
 *   - .node-head-icon[data-type="audio"]           L1773  (1 行,散落)
 *   - .node-preview.asset-audio                    L1948-1955 (8 行)
 *   - .clip.audio + .clip.audio .clip-strip        L2529-2539 (11 行)
 *   - .lightbox-audio-visual + .audio-icon         L3207-3212 (6 行)
 *   - .prop-badge.audio                            L3741  (1 行,散落)
 *   - .audio-node-card + .audio-upload-*           L4056-4188 (~133 行)
 *   - .audio-popover + .audio-popover-foot + ...   L4190-4271 (~82 行)
 *   - .audio-mode-bar + .audio-shortcut-* + ...    L4798-4875 (~78 行)
 *
 * 拆分理由:
 *   - audio JS 已独立(canvas-bundle.js + canvas-audio-renderer.js 308 行)
 *   - audio CSS 散落在 prototype.html 9 处, 集中后约 320 行
 *   - 后续 audio 域二次重构(popover 优化、播放器替换)不再动 prototype.html
 *
 * 边界:
 *   - 不改 prototype.html 其他 CSS 选择器
 *   - 不改任何 audio JS
 *   - 不引入新依赖,只用 prototype.html 顶层 <style> 已声明的 CSS 变量(--text / --muted / --border / --green / --cyan / --purple / --yellow)
 * ───────────────────────────────────────────────────────────────────────── */

/* ── 节点类型颜色:audio (与 .node.video/.image/.script 同组) ── */
.node.audio { border-color: rgba(72,193,123,.55); }

/* ── 节点头部图标[data-type="audio"] ── */
.node-head-icon[data-type="audio"]  { background: rgba(236,72,153,.15); }

/* ── 节点预览:asset-audio(音频波形条纹背景) ── */
.node-preview.asset-audio {
  display: grid;
  align-items: end;
  padding: 10px;
  background:
    repeating-linear-gradient(90deg, rgba(72,193,123,.72) 0 4px, transparent 4px 11px),
    linear-gradient(135deg, rgba(72,193,123,.22), rgba(2,199,217,.12));
}

/* ── 时间线 clip:audio 类型 ── */
.clip.audio {
  border-color: #399a65;
  background: rgba(72,193,123,.46);
  color: #d8ffe8;
}

.clip.audio .clip-strip {
  display: block;
  height: 20px;
  background: repeating-linear-gradient(90deg, rgba(216,255,232,.62) 0 2px, transparent 2px 8px);
}

/* ── Lightbox:audio 视觉占位 ── */
.lightbox-audio-visual {
  display: flex; flex-direction: column; align-items: center; gap: 16px;
}
.lightbox-audio-visual .audio-icon {
  font-size: 64px; opacity: .6;
}

/* ── 属性徽章:audio 类型 ── */
.prop-badge.audio { background: rgba(246,189,72,.2); color: var(--yellow); }

/* ── 音频节点(audio-node-card) ── */
.audio-node-card {
  padding: 0;
  width: 300px;
  overflow: visible;
}
.audio-node-card .audio-upload-bar {
  display: flex;
  justify-content: center;
  padding: 8px 8px 4px;
}
.audio-node-card .audio-upload-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 18px;
  font-size: 12px;
  color: var(--text);
  background: rgba(20,20,26,.9);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: background .15s, border-color .15s;
  backdrop-filter: blur(6px);
}
.audio-node-card .audio-upload-btn:hover {
  background: rgba(40,40,50,.95);
  border-color: rgba(72,193,123,.45);
}
.audio-node-card .audio-upload-btn .icon {
  font-size: 14px;
  opacity: .8;
}
.audio-node-card .audio-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 2px 12px 6px;
  font-size: 12px;
  color: var(--text);
}
.audio-node-card .audio-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  color: var(--green);
  font-size: 14px;
}
.audio-node-card .audio-title {
  font-weight: 600;
}
.audio-node-card .audio-content-wrap {
  position: relative;
  padding: 0 4px 4px;
}
.audio-node-card .audio-side-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(20,20,26,.95);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 14px;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
  z-index: 2;
}
.audio-node-card .audio-side-btn.left  { left: -11px; }
.audio-node-card .audio-side-btn.right { right: -11px; }
.audio-node-card .audio-side-btn:hover {
  background: rgba(72,193,123,.18);
  border-color: var(--green);
  color: var(--green);
}
.audio-node-card .audio-content {
  min-height: 120px;
  max-height: 240px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(0,0,0,.25);
  padding: 10px;
}
.audio-node-card .audio-content audio {
  width: 100%;
  height: 32px;
}
.audio-node-card .audio-try {
  font-size: 12px;
  color: var(--muted);
  padding: 4px 0 6px;
}
.audio-node-card .audio-try-options {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.audio-node-card .audio-try-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 12px;
  text-align: left;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.audio-node-card .audio-try-option:hover {
  background: rgba(72,193,123,.12);
  border-color: rgba(72,193,123,.45);
  color: var(--green);
}
.audio-node-card .audio-try-option .play-icon {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: rgba(72,193,123,.18);
  color: var(--green);
  font-size: 12px;
}
/* 音频节点 popover：选中时显示输入框 + 模型选择 + 生成按钮 */
.audio-popover {
  position: absolute;
  z-index: 38;
  box-sizing: border-box;
  width: 540px;
  padding: 14px;
  background: rgba(16,20,30,.96);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0,0,0,.5);
  backdrop-filter: blur(12px);
}
.audio-popover .editor-prompt-area textarea {
  width: 100%;
  min-height: 100px;
  max-height: 320px;
  padding: 12px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 10px;
  background: rgba(0,0,0,.3);
  color: #e0e0e0;
  font-size: 13px;
  resize: vertical;
  outline: 0;
  font-family: inherit;
}
.audio-popover .editor-prompt-area textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(72,193,123,.12);
}
.audio-popover .editor-prompt-area textarea::placeholder { color: #666; }
.audio-popover-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
}
.audio-popover-foot .audio-model-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  font-size: 11px;
  color: var(--green);
  background: rgba(72,193,123,.12);
  border: 1px solid rgba(72,193,123,.3);
  border-radius: 999px;
}
.audio-popover-foot .audio-send-btn {
  padding: 6px 18px;
  font-size: 12px;
  font-weight: 600;
  background: linear-gradient(135deg, rgba(72,193,123,.85) 0%, rgba(2,199,217,.85) 100%);
  border: 0;
  border-radius: 8px;
  color: #050d10;
  cursor: pointer;
  transition: transform .1s, box-shadow .15s;
}
.audio-popover-foot .audio-send-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(72,193,123,.3);
}
.audio-popover .lite-popover-close {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 24px;
  height: 24px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  border-radius: 6px;
}
.audio-popover .lite-popover-close:hover {
  background: rgba(255,255,255,.06);
  color: var(--text);
}

/* ── v2.0.9+ 音频节点 popover 优化(参考图 1+2 设计) ── */
.audio-mode-bar { display: flex; gap: 6px; padding: 0 4px 10px; }
.audio-mode-pill {
  padding: 4px 12px; font-size: 12px; color: var(--muted);
  background: rgba(40,40,48,.6); border: 1px solid var(--border);
  border-radius: 999px; cursor: pointer; transition: all .15s;
}
.audio-mode-pill:hover { color: #fff; background: rgba(60,60,72,.85); }
.audio-mode-pill.active {
  color: #fff; background: linear-gradient(90deg, rgba(106,159,255,.9), rgba(160,140,255,.9));
  border-color: transparent; box-shadow: 0 0 10px rgba(106,159,255,.4);
}
.audio-shortcuts { display: flex; gap: 6px; padding: 6px 4px 0; }
.audio-shortcut-btn {
  padding: 4px 10px; font-size: 11px; color: var(--muted);
  background: rgba(40,40,48,.6); border: 1px solid var(--border);
  border-radius: 6px; cursor: pointer; transition: all .15s;
}
.audio-shortcut-btn:hover { color: #fff; background: rgba(60,60,72,.85); }
.audio-char-count { font-size: 11px; color: var(--muted); margin-left: auto; }
.audio-voice-pill, .audio-model-select {
  padding: 3px 10px; font-size: 11px; color: var(--text);
  background: rgba(40,40,48,.7); border: 1px solid var(--border);
  border-radius: 6px; cursor: pointer; outline: none;
}
.audio-popover-controls { display: flex; align-items: center; gap: 8px; flex: 1; }
.audio-advanced { padding: 8px 4px 0; }
.audio-advanced summary {
  font-size: 11px; color: var(--muted); cursor: pointer; padding: 4px 0;
  user-select: none; list-style: none;
}
.audio-advanced summary::before { content: "▸ "; }
.audio-advanced[open] summary::before { content: "▾ "; }
.audio-advanced-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 6px 0 4px;
}
.audio-slider-row { display: flex; align-items: center; gap: 6px; grid-column: 1/-1; }
.audio-slider-label { font-size: 11px; color: var(--muted); min-width: 36px; }
.audio-slider-row input[type=range] { flex: 1; }
.audio-slider-value { font-size: 11px; color: #fff; min-width: 30px; text-align: right; }
.audio-meta-input {
  width: 100%; padding: 5px 8px; font-size: 12px; color: var(--text);
  background: rgba(20,20,26,.7); border: 1px solid var(--border);
  border-radius: 6px; outline: none;
}
.audio-meta-input:focus { border-color: rgba(106,159,255,.5); }
.audio-lyrics {
  width: 100%; min-height: 100px; margin-top: 6px; padding: 8px;
  font-size: 12px; font-family: ui-monospace, "SF Mono", Menlo, monospace;
  color: var(--text); background: rgba(20,20,26,.7);
  border: 1px solid var(--border); border-radius: 6px; outline: none; resize: vertical;
}
.audio-prompt-secondary {
  width: 100%; margin-top: 6px; padding: 8px;
  font-size: 12px; color: var(--text);
  background: rgba(20,20,26,.7); border: 1px solid var(--border);
  border-radius: 6px; outline: none;
}
.audio-cover-input { padding: 4px; }
.audio-cover-upload {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 18px; font-size: 12px; color: var(--muted);
  background: rgba(20,20,26,.5); border: 1px dashed var(--border);
  border-radius: 8px; cursor: pointer; transition: all .15s;
}
.audio-cover-upload:hover { color: #fff; background: rgba(40,40,48,.7); border-color: rgba(106,159,255,.5); }
.upload-icon { font-size: 18px; opacity: .8; }
.audio-cover-preview {
  padding: 8px 12px; font-size: 12px; color: #6ee7c1;
  background: rgba(110,231,193,.1); border: 1px solid rgba(110,231,193,.3);
  border-radius: 6px;
}
/* 音频节点主区域显示模式标签 */
.audio-mode-tag {
  display: inline-block; padding: 1px 6px; margin-left: 6px;
  font-size: 9px; font-weight: 600; color: #fff;
  background: linear-gradient(90deg, rgba(106,159,255,.9), rgba(160,140,255,.9));
  border-radius: 4px; letter-spacing: .3px; vertical-align: middle;
}

/* ── v2.2.40 MiniMax Speech Studio ─────────────────────────────── */
.node-editor-audio {
  width: 760px;
  padding: 0;
  overflow: visible;
  border: 1px solid rgba(255,255,255,.11);
  border-radius: 16px;
  background: rgba(27,27,30,.98);
  box-shadow: 0 18px 54px rgba(0,0,0,.42);
  backdrop-filter: blur(18px);
}

.node-editor-audio .audio-editor-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  padding: 12px 16px 2px;
}

.node-editor-audio .audio-mode-bar,
.node-editor-audio .audio-shortcuts {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0;
}

.node-editor-audio .audio-mode-bar {
  padding: 3px;
  border-radius: 8px;
  background: rgba(255,255,255,.045);
}

.node-editor-audio .audio-mode-pill {
  height: 28px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: rgba(231,232,236,.55);
  font-size: 12px;
  font-weight: 600;
}

.node-editor-audio .audio-mode-pill:hover { color: rgba(255,255,255,.86); }
.node-editor-audio .audio-mode-pill.active {
  color: #f5f6f8;
  background: rgba(255,255,255,.10);
  box-shadow: none;
}

.node-editor-audio .audio-shortcut-btn,
.node-editor-audio .audio-expression-picker > summary {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 28px;
  box-sizing: border-box;
  padding: 0 9px;
  border: 0;
  border-radius: 6px;
  background: rgba(255,255,255,.055);
  color: rgba(231,232,236,.66);
  font-size: 12px;
  cursor: pointer;
}

.node-editor-audio .audio-shortcut-btn span,
.node-editor-audio .audio-expression-picker > summary span {
  color: rgba(255,255,255,.88);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
}

.node-editor-audio .audio-shortcut-btn:hover,
.node-editor-audio .audio-expression-picker > summary:hover,
.node-editor-audio .audio-expression-picker[open] > summary {
  color: #fff;
  background: rgba(255,255,255,.10);
}

.audio-expression-picker { position: relative; }
.audio-expression-picker > summary { list-style: none; }
.audio-expression-picker > summary::-webkit-details-marker { display: none; }
.audio-expression-picker > div {
  position: absolute;
  z-index: 12;
  top: 34px;
  right: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(116px, 1fr));
  width: 260px;
  padding: 6px;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 10px;
  background: #232326;
  box-shadow: 0 16px 40px rgba(0,0,0,.42);
}

.audio-expression-picker > div button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 36px;
  padding: 0 9px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: rgba(255,255,255,.78);
  font-size: 12px;
  cursor: pointer;
}
.audio-expression-picker > div button:hover { background: rgba(255,255,255,.07); color: #fff; }
.audio-expression-picker > div small { color: rgba(255,255,255,.36); font-size: 10px; }
.audio-expression-picker.disabled > summary { opacity: .32; cursor: not-allowed; }

.node-editor-audio .editor-prompt-area { padding: 0 16px; }
.node-editor-audio .editor-prompt-area textarea,
.node-editor-audio .audio-node-prompt {
  display: block;
  width: 100%;
  min-height: 112px;
  max-height: 240px;
  box-sizing: border-box;
  padding: 14px 2px 12px;
  border: 0;
  border-radius: 0;
  outline: 0;
  resize: none;
  background: transparent;
  color: rgba(249,249,250,.92);
  font-family: inherit;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.6;
}
.node-editor-audio .editor-prompt-area textarea::placeholder { color: rgba(222,224,230,.30); }

.node-editor-audio .audio-editor-foot {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  box-sizing: border-box;
  margin: 0;
  padding: 9px 12px 9px 16px;
  border-top: 1px solid rgba(255,255,255,.075);
}

.node-editor-audio .audio-editor-controls {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  flex: 1;
}

.audio-control-picker { position: relative; }
.audio-control-picker > summary,
.audio-voice-trigger {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  height: 36px;
  box-sizing: border-box;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: rgba(239,240,243,.72);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.audio-control-picker > summary::-webkit-details-marker,
.audio-settings-picker > summary::-webkit-details-marker { display: none; }
.audio-control-picker > summary:hover,
.audio-control-picker[open] > summary,
.audio-voice-trigger:hover { color: #fff; background: rgba(255,255,255,.075); }
.audio-model-picker > summary span { max-width: 132px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.audio-control-chevron,
.audio-control-picker > summary > i {
  width: 6px;
  height: 6px;
  margin: -3px 1px 0 2px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  opacity: .55;
}
.audio-control-picker[open] > summary > i { margin-top: 3px; transform: rotate(225deg); }

.audio-control-menu {
  position: absolute;
  z-index: 24;
  bottom: 44px;
  left: 0;
  min-width: 194px;
  padding: 6px;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 10px;
  background: #232326;
  box-shadow: 0 18px 44px rgba(0,0,0,.48);
}
.audio-control-menu button {
  display: block;
  width: 100%;
  height: 34px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: rgba(240,241,244,.70);
  text-align: left;
  font: 600 12px/1 inherit;
  cursor: pointer;
}
.audio-control-menu button:hover { background: rgba(255,255,255,.07); color: #fff; }
.audio-control-menu button.active { background: rgba(255,255,255,.11); color: #fff; }

.audio-voice-trigger { max-width: 172px; }
.audio-voice-trigger > span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.audio-voice-miniwave,
.audio-voice-wave {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
}
.audio-voice-miniwave i,
.audio-voice-wave i {
  display: block;
  width: 2px;
  border-radius: 2px;
  background: currentColor;
}
.audio-voice-miniwave i:nth-child(1) { height: 8px; }
.audio-voice-miniwave i:nth-child(2) { height: 14px; }
.audio-voice-miniwave i:nth-child(3) { height: 10px; }

.audio-settings-picker { position: relative; }
.audio-settings-picker > summary {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  color: rgba(239,240,243,.62);
  cursor: pointer;
  list-style: none;
}
.audio-settings-picker > summary:hover,
.audio-settings-picker[open] > summary { color: #fff; background: rgba(255,255,255,.075); }
.audio-settings-icon { position: relative; display: block; width: 16px; height: 15px; }
.audio-settings-icon i { position: absolute; left: 1px; width: 14px; height: 1px; background: currentColor; }
.audio-settings-icon i::after { content: ""; position: absolute; top: -2px; width: 5px; height: 5px; border: 1px solid currentColor; border-radius: 50%; background: #1b1b1e; }
.audio-settings-icon i:nth-child(1) { top: 2px; }
.audio-settings-icon i:nth-child(1)::after { left: 3px; }
.audio-settings-icon i:nth-child(2) { top: 7px; }
.audio-settings-icon i:nth-child(2)::after { left: 8px; }
.audio-settings-icon i:nth-child(3) { top: 12px; }
.audio-settings-icon i:nth-child(3)::after { left: 5px; }

.audio-char-count { color: rgba(231,232,236,.34); font: 500 11px/1 inherit; white-space: nowrap; }
.audio-point-cost { display: inline-flex; align-items: center; gap: 5px; color: rgba(241,242,245,.62); font: 700 12px/1 inherit; }
.audio-point-cost i { width: 9px; height: 9px; border-radius: 2px; background: #e8c65a; transform: rotate(45deg); box-shadow: inset 0 0 0 2px rgba(255,255,255,.16); }
.node-editor-audio .generate-btn-icon { flex: 0 0 auto; }

.audio-settings-popover {
  position: absolute;
  z-index: 30;
  right: -54px;
  bottom: 46px;
  width: 560px;
  max-height: min(420px, 40vh);
  box-sizing: border-box;
  overflow: auto;
  padding: 0 18px 16px;
  border: 1px solid rgba(255,255,255,.11);
  border-radius: 14px;
  background: #232326;
  box-shadow: 0 22px 60px rgba(0,0,0,.54);
}
.audio-settings-popover header { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; align-items: center; height: 52px; background: #232326; border-bottom: 1px solid rgba(255,255,255,.075); }
.audio-settings-popover header strong { color: rgba(255,255,255,.90); font-size: 14px; }
.audio-settings-popover header span { max-width: 240px; overflow: hidden; text-overflow: ellipsis; color: rgba(255,255,255,.38); font-size: 11px; white-space: nowrap; }
.audio-settings-popover section { padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,.065); }
.audio-settings-popover section:last-child { border-bottom: 0; padding-bottom: 0; }
.audio-settings-popover h3 { margin: 0 0 9px; color: rgba(255,255,255,.48); font-size: 11px; font-weight: 600; }

.audio-emotion-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.audio-emotion-grid button {
  height: 32px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 7px;
  background: transparent;
  color: rgba(255,255,255,.56);
  font-size: 11px;
  cursor: pointer;
}
.audio-emotion-grid button:hover { color: #fff; border-color: rgba(255,255,255,.20); }
.audio-emotion-grid button.active { color: #fff; background: rgba(255,255,255,.11); border-color: rgba(255,255,255,.28); }
.audio-emotion-grid button:disabled { opacity: .28; cursor: not-allowed; }

.audio-settings-ranges { display: grid; gap: 12px; }
.audio-setting-range { display: grid; grid-template-columns: 52px 1fr 42px; align-items: center; gap: 10px; }
.audio-setting-range > span,
.audio-setting-select > span,
.audio-pronunciation > span { color: rgba(255,255,255,.52); font-size: 11px; }
.audio-setting-range input { width: 100%; accent-color: #e9ebee; }
.audio-setting-range output { color: rgba(255,255,255,.72); font: 500 11px/1 ui-monospace, SFMono-Regular, Menlo, monospace; text-align: right; }

.audio-settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 9px 12px; }
.audio-setting-select { display: grid; grid-template-columns: 70px 1fr; align-items: center; gap: 8px; }
.audio-setting-select select,
.audio-meta-input {
  min-width: 0;
  height: 34px;
  box-sizing: border-box;
  padding: 0 9px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 7px;
  outline: 0;
  background: rgba(255,255,255,.045);
  color: rgba(255,255,255,.78);
  font-size: 11px;
}
.audio-setting-select select:focus,
.audio-meta-input:focus { border-color: rgba(255,255,255,.24); }
.audio-effect-ranges { opacity: .90; }
.audio-setting-toggle { display: inline-flex; align-items: center; gap: 8px; color: rgba(255,255,255,.72); font-size: 11px; }
.audio-setting-toggle input { accent-color: #dfe3e7; }
.audio-settings-bottom { display: grid; gap: 12px; }
.audio-pronunciation { display: grid; gap: 7px; }
.audio-pronunciation textarea {
  min-height: 66px;
  box-sizing: border-box;
  padding: 9px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 7px;
  outline: 0;
  resize: vertical;
  background: rgba(255,255,255,.035);
  color: rgba(255,255,255,.78);
  font: 11px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* 全局音色库，不跟随画布缩放。 */
.audio-voice-library[hidden] { display: none; }
.audio-voice-library { position: fixed; inset: 0; z-index: 3000; display: grid; place-items: center; }
.audio-voice-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.72); backdrop-filter: blur(7px); }
.audio-voice-dialog {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(980px, calc(100vw - 48px));
  height: min(720px, calc(100vh - 56px));
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 16px;
  background: #242426;
  box-shadow: 0 28px 90px rgba(0,0,0,.62);
}
.audio-voice-header { display: flex; align-items: center; justify-content: space-between; flex: 0 0 58px; padding: 0 20px; border-bottom: 1px solid rgba(255,255,255,.075); }
.audio-voice-header h2 { margin: 0; color: #f2f3f5; font-size: 15px; font-weight: 650; }
.audio-voice-close { width: 32px; height: 32px; border: 0; border-radius: 7px; background: transparent; color: rgba(255,255,255,.50); font-size: 24px; cursor: pointer; }
.audio-voice-close:hover { background: rgba(255,255,255,.07); color: #fff; }
.audio-voice-toolbar { display: flex; align-items: center; gap: 14px; padding: 15px 20px 10px; }
.audio-voice-tabs { display: flex; padding: 3px; border-radius: 8px; background: rgba(255,255,255,.05); }
.audio-voice-tab { height: 32px; padding: 0 15px; border: 0; border-radius: 6px; background: transparent; color: rgba(255,255,255,.48); font-size: 12px; cursor: pointer; }
.audio-voice-tab.active { color: #fff; background: rgba(255,255,255,.10); }
.audio-voice-search { display: flex; align-items: center; gap: 8px; min-width: 260px; height: 38px; margin-left: auto; padding: 0 12px; border-radius: 8px; background: rgba(255,255,255,.055); color: rgba(255,255,255,.35); }
.audio-voice-search input { width: 100%; border: 0; outline: 0; background: transparent; color: #fff; font-size: 12px; }
.audio-voice-search input::placeholder { color: rgba(255,255,255,.30); }
.audio-voice-filters { display: flex; align-items: center; gap: 10px; padding: 0 20px 12px; }
.audio-voice-filters select { height: 32px; padding: 0 8px; border: 1px solid rgba(255,255,255,.08); border-radius: 7px; background: rgba(255,255,255,.04); color: rgba(255,255,255,.66); font-size: 11px; }
.audio-voice-gender { display: flex; gap: 2px; }
.audio-voice-gender button { height: 30px; padding: 0 10px; border: 0; border-radius: 6px; background: transparent; color: rgba(255,255,255,.40); font-size: 11px; cursor: pointer; }
.audio-voice-gender button.active { background: rgba(255,255,255,.08); color: #fff; }
.audio-voice-count { margin-left: auto; color: rgba(255,255,255,.30); font-size: 11px; }
.audio-voice-list { flex: 1; min-height: 0; overflow: auto; padding: 0 20px 20px; }
.audio-voice-row { display: grid; grid-template-columns: 44px minmax(0,1fr) auto 34px 58px; align-items: center; gap: 12px; min-height: 66px; margin-bottom: 6px; padding: 0 12px; border: 1px solid transparent; border-radius: 9px; background: rgba(255,255,255,.045); }
.audio-voice-row:hover { background: rgba(255,255,255,.065); }
.audio-voice-row.selected { border-color: rgba(255,255,255,.18); background: rgba(255,255,255,.085); }
.audio-voice-preview { display: grid; place-items: center; width: 38px; height: 38px; border: 0; border-radius: 8px; background: rgba(255,255,255,.075); color: rgba(255,255,255,.72); cursor: pointer; }
.audio-voice-preview:hover { color: #fff; background: rgba(255,255,255,.12); }
.audio-voice-wave i:nth-child(1) { height: 10px; }.audio-voice-wave i:nth-child(2) { height: 16px; }.audio-voice-wave i:nth-child(3) { height: 8px; }.audio-voice-wave i:nth-child(4) { height: 13px; }
.audio-voice-preview.playing .audio-voice-wave i { animation: audio-voice-wave .7s ease-in-out infinite alternate; }
.audio-voice-preview.playing .audio-voice-wave i:nth-child(2) { animation-delay: -.25s; }.audio-voice-preview.playing .audio-voice-wave i:nth-child(3) { animation-delay: -.45s; }
@keyframes audio-voice-wave { to { height: 4px; } }
.audio-voice-copy { min-width: 0; display: grid; gap: 4px; }
.audio-voice-copy strong { overflow: hidden; text-overflow: ellipsis; color: rgba(255,255,255,.88); font-size: 13px; white-space: nowrap; }
.audio-voice-copy span { overflow: hidden; text-overflow: ellipsis; color: rgba(255,255,255,.38); font-size: 11px; white-space: nowrap; }
.audio-voice-meta { display: flex; gap: 5px; }
.audio-voice-meta span { padding: 3px 6px; border-radius: 4px; background: rgba(255,255,255,.045); color: rgba(255,255,255,.38); font-size: 10px; }
.audio-voice-favorite { width: 30px; height: 30px; border: 0; background: transparent; color: rgba(255,255,255,.30); font-size: 20px; cursor: pointer; }
.audio-voice-favorite.active { color: #e9c95c; }
.audio-voice-select { height: 30px; padding: 0 12px; border: 0; border-radius: 7px; background: #edf0f2; color: #101215; font-size: 11px; font-weight: 700; cursor: pointer; }
.audio-voice-row.selected .audio-voice-select { background: rgba(255,255,255,.10); color: rgba(255,255,255,.48); }
.audio-voice-state { display: grid; place-items: center; min-height: 240px; color: rgba(255,255,255,.38); font-size: 13px; }
.audio-voice-pagination { display: flex; align-items: center; justify-content: center; gap: 14px; flex: 0 0 48px; border-top: 1px solid rgba(255,255,255,.065); color: rgba(255,255,255,.38); font-size: 11px; }
.audio-voice-pagination button { display: grid; place-items: center; width: 30px; height: 30px; border: 0; border-radius: 7px; background: rgba(255,255,255,.06); color: rgba(255,255,255,.72); font-size: 20px; cursor: pointer; }
.audio-voice-pagination button:hover:not(:disabled) { background: rgba(255,255,255,.11); color: #fff; }
.audio-voice-pagination button:disabled { opacity: .24; cursor: not-allowed; }
body.audio-voice-library-open { overflow: hidden; }

@media (max-width: 760px) {
  .node-editor-audio { width: min(680px, calc(100vw - 28px)); }
  .audio-settings-popover { right: -12px; width: min(520px, calc(100vw - 36px)); }
  .audio-voice-dialog { width: calc(100vw - 20px); height: calc(100vh - 24px); }
  .audio-voice-toolbar { align-items: stretch; flex-direction: column; }
  .audio-voice-search { width: auto; min-width: 0; margin-left: 0; }
  .audio-voice-row { grid-template-columns: 40px minmax(0,1fr) 34px 56px; }
  .audio-voice-meta { display: none; }
}
