.voice-top-links { display: flex; align-items: center; gap: 24px; }
.voice-top-links a { color: inherit; text-decoration: none; }
.voice-list { min-height: 570px; height: calc(100vh - 81px); padding: 41px 44px 24px 24px; }
.voice-list .task-tabs { gap: 40px; margin-bottom: 21px; }
.voice-list .task-tabs button { padding-top: 3px; padding-bottom: 5px; }
.tab-voice-design { display: flex; min-height: 0; gap: 20px; width: 100%; height: calc(100% - 52px); transform: translateY(-2px); }
.tab-voice-design[hidden] { display: none; }
.tab-voice-design__left, .tab-voice-design__right {
  display: flex; flex: 1; flex-direction: column; min-width: 550px; min-height: 0; overflow: auto;
  border-radius: 8px; background: var(--df-color-surface); padding: 20px;
}
.tab-voice-design__left { max-width: 550.5px; }
.tab-voice-design__right { padding: 16px; }
@media (max-width: 1250px) {
  body:has(.voice-list) { min-width: 0; }
  .voice-list { padding-right: 24px; }
  .tab-voice-design__left, .tab-voice-design__right { min-width: 0; }
}
@media (max-width: 850px) {
  .voice-list { height: auto; }
  .tab-voice-design { flex-direction: column; height: auto; }
  .tab-voice-design__left { max-width: none; }
  .tab-voice-design__right { min-height: 300px; }
}
.voice-generate-form { overflow: hidden; padding-top: 25px; }
.voice-generate-form label { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; font-size: 12px; }
.voice-generate-form textarea, .voice-generate-form select { padding: 12px; border: 1px solid var(--df-color-border-subtle); border-radius: 4px; font: inherit; color: var(--df-color-text-strong); background: transparent; color-scheme: dark; }
.voice-generate-form select.is-placeholder { color: var(--df-color-text-placeholder); }
.voice-generate-form textarea { resize: none; }
.voice-generate-form select { height: 32px; padding: 0 12px; border-color: var(--df-color-divider); }
.voice-generate-form textarea { padding: 5px 16px; }
.voice-generate-form textarea::placeholder { color: var(--df-color-text-placeholder); }
.voice-prompt-field { position: relative; flex: none; height: 304px; min-height: 0; gap: 13px !important; }
.voice-prompt-field textarea { flex: none; height: 274px; min-height: 0; padding-bottom: 48px; }
.voice-prompt-presets { position: absolute; right: 12px; bottom: 10px; left: 16px; display: flex; gap: 8px; overflow: hidden; }
.voice-prompt-presets button { display: inline-flex; flex: none; align-items: center; gap: 4px; height: 32px; padding: 0 12px; border: 1px solid var(--df-color-border-subtle); border-radius: 8px; background: var(--df-color-surface-panel-2); color: var(--df-color-text); font-size: 12px; white-space: nowrap; }
.voice-prompt-presets button .df-icon { width: 14px; height: 14px; }
.voice-prompt-presets button:hover { background: var(--df-color-surface-active); border-color: var(--df-color-border-strong); }
.voice-generate-form .voice-sample-field { gap: 11px; margin-bottom: 17px; }
.voice-sample-field textarea { height: 188px; }
.voice-generate-form .voice-submit { flex: none; min-height: 32px; border: 0; border-radius: 20px; background: var(--df-color-primary-fill); color: var(--df-color-primary-text); font-size: 12px; }
.voice-generate-form .voice-submit:disabled { opacity: 1; cursor: default; }
.voice-result h2 { margin: 0 0 16px; color: var(--df-color-text-strong); font-size: 14px; line-height: 20px; }
.voice-result__empty { display: flex; flex: 1; flex-direction: column; align-items: center; justify-content: center; }
.voice-result__empty-img { width: 80px; height: 80px; object-fit: contain; }
.voice-result__empty-title { margin-top: 16px; font-size: 14px; font-weight: 500; line-height: 22px; color: var(--df-color-text-strong); }
.voice-result__empty-desc { margin-top: 4px; font-size: 12px; line-height: 22px; color: var(--df-color-text-muted); }
.voice-disclaimer { position: absolute; right: 44px; bottom: 20px; left: 124px; margin: 0; color: var(--df-color-text-secondary); font-size: 12px; text-align: center; }
.tab-builtin-voice-library[hidden] { display: none; }
.tab-builtin-voice-library__search { display: flex; align-items: center; gap: 8px; width: 240px; height: 32px; margin-bottom: 16px; padding: 0 11px; border: 1px solid var(--df-color-border); border-radius: var(--df-radius-md); box-sizing: border-box; color: var(--df-color-text-muted); }
.tab-builtin-voice-library__search input { flex: 1; min-width: 0; padding: 0; border: 0; outline: 0; background: transparent; color: var(--df-color-text); font: inherit; font-size: 12px; }
.tab-builtin-voice-library__search:focus-within { border-color: var(--df-color-focus-ring); }
.tab-builtin-voice-library__search .df-icon { width: 14px; height: 14px; }
.voice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(298px, 1fr)); gap: 16px; }
.voice-card { display: flex; align-items: center; gap: 12px; min-width: 0; height: 70px; padding: 16px; border: 1px solid var(--df-color-voice-border); border-radius: 8px; background: transparent; text-align: left; }
.voice-card:hover { background: var(--df-color-voice-hover); border-color: var(--df-color-voice-border-hover); }
.voice-card__play { position: relative; display: flex; flex: none; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; background: var(--df-color-fill); }
.voice-card__play .df-icon { width: 10px; height: 10px; }
.voice-card.is-playing .voice-card__play { border: 1px solid var(--df-color-primary-bright); background: var(--df-color-primary-fill); color: var(--df-color-primary-text); }
.voice-card.is-playing .voice-card__play .df-icon { width: 16px; height: 16px; fill: currentColor; }
.voice-card__text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.voice-card__text strong { color: var(--df-color-text-body); font-size: 12px; font-weight: 500; line-height: 18px; }
.voice-card__text > span { overflow: hidden; color: var(--df-color-text-muted); font-size: 12px; line-height: 18px; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 1100px) { .voice-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 850px) { .voice-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- 音色生成结果与音色库筛选（P-06） ---------- */
.voice-library-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--df-space-4); padding: 18px 0; margin-bottom: var(--df-space-4); }
/* 分类 chips 复用 .df-chips/.df-chip */
#voice-filter-chips .df-chip { height: 32px; display: inline-flex; align-items: center; }
/* 线上「内置音色库」态没有筛选条：分隔线下方直接是卡片网格首行（基线 y=140）。
   保留筛选逻辑与 DOM，仅默认不渲染，避免把网格整体压下 84px。 */
.voice-library-toolbar { display: none; }

.voice-filter-model { display: flex; align-items: center; gap: var(--df-space-2); color: var(--df-color-text-faint); font-size: var(--df-font-size-xs); }
.voice-filter-model select { padding: 6px 10px; border: 1px solid var(--df-color-border); border-radius: var(--df-radius-md); background: var(--df-color-surface); color: var(--df-color-text); font: inherit; font-size: var(--df-font-size-xs); }
.voice-library-empty { padding: var(--df-space-8) 0; color: var(--df-color-text-faint); text-align: center; }
.voice-library-empty[hidden] { display: none; }
.voice-card[hidden] { display: none; }

.voice-result-loading { display: flex; flex-direction: column; gap: var(--df-space-3); }
.voice-result-loading span {
  height: 88px;
  border-radius: var(--df-radius-xl);
  background: linear-gradient(100deg, var(--df-color-surface) 30%, var(--df-color-surface-hover) 50%, var(--df-color-surface) 70%);
  background-size: 220% 100%;
  animation: df-voice-skeleton 1.2s linear infinite;
}
@keyframes df-voice-skeleton { from { background-position: 120% 0; } to { background-position: -20% 0; } }
.voice-result-card {
  display: flex;
  flex-direction: column;
  gap: var(--df-space-3);
  padding: var(--df-space-4);
  border: 1px solid var(--df-color-divider);
  border-radius: var(--df-radius-xl);
  background: var(--df-color-surface);
}
.voice-result-card header { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--df-space-3); }
.voice-result-card__name { margin: 0 0 2px; color: var(--df-color-text); font-size: var(--df-font-size-md); }
.voice-result-card__meta { margin: 0; color: var(--df-color-text-faint); font-size: var(--df-font-size-xs); }
.voice-result-card__actions { display: flex; gap: var(--df-space-2); }
.voice-result-card__actions button {
  padding: 4px 10px;
  border: 1px solid var(--df-color-border);
  border-radius: var(--df-radius-md);
  background: transparent;
  color: var(--df-color-text);
  font: inherit;
  font-size: var(--df-font-size-xs);
  cursor: pointer;
}
.voice-result-card__actions .is-danger { color: var(--df-color-danger); border-color: var(--df-color-danger); }
.voice-result-card__sample { color: var(--df-color-text-secondary); font-size: var(--df-font-size-xs); }
.voice-result-card__play {
  display: flex;
  align-items: center;
  gap: var(--df-space-3);
  width: 100%;
  padding: var(--df-space-2) var(--df-space-3);
  border: 1px solid var(--df-color-border);
  border-radius: var(--df-radius-pill);
  background: var(--df-color-surface-sunken);
  color: var(--df-color-text);
  cursor: pointer;
}
.voice-result-card__play .voice-card__play { position: static; flex: none; }
.voice-result-card__progress { flex: 1; height: 4px; border-radius: var(--df-radius-pill); background: var(--df-color-surface-active); overflow: hidden; }
.voice-result-card__progress i { display: block; width: 0; height: 100%; background: var(--df-color-accent); }
.voice-result-card__time { color: var(--df-color-text-faint); font-size: var(--df-font-size-xs); }

.voice-result__toolbar { display: flex; flex: none; align-items: center; justify-content: space-between; gap: var(--df-space-3); margin-bottom: var(--df-space-4); }
.voice-result__toolbar h2 { flex: none; margin: 0; }
.voice-result-search { display: flex; align-items: center; gap: var(--df-space-2); width: 240px; max-width: 65%; height: 32px; padding: 0 var(--df-space-3); border: 1px solid var(--df-color-border); border-radius: var(--df-radius-sm); color: var(--df-color-text-faint); }
.voice-result-search input { min-width: 0; width: 100%; padding: 0; border: 0; outline: 0; background: transparent; color: var(--df-color-text); font: inherit; font-size: var(--df-font-size-xs); }
.voice-result-search:focus-within { border-color: var(--df-color-focus-ring); }
.voice-result-search-empty { margin: auto; padding: var(--df-space-6); color: var(--df-color-text-secondary); text-align: center; }
.voice-result-card[hidden] { display: none; }
.voice-result-card__actions { align-items: center; }
.voice-result-card__actions button { display: inline-flex; align-items: center; gap: 4px; }
.voice-result-card__actions .df-icon { width: 14px; height: 14px; }
.edit-voice-dialog { width: min(520px, calc(100vw - 32px)); }
.edit-voice-dialog .dialog-form { display: flex; flex-direction: column; gap: 16px; }
.edit-voice-dialog .df-field { position: relative; gap: 8px; color: var(--df-color-text); font-size: 14px; }
.edit-voice-dialog .df-input, .edit-voice-dialog .df-select { height: 32px; padding: 4px 11px; box-sizing: border-box; }
.voice-edit-count { position: absolute; right: 10px; bottom: 8px; color: var(--df-color-text-faint); font-size: 12px; pointer-events: none; }
.tag-selects { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.edit-voice-visibility { display: flex; gap: 20px; margin: 0; padding: 0; border: 0; font-size: 14px; }
.edit-voice-visibility legend { margin-bottom: 8px; }
.edit-voice-visibility label { display: inline-flex; align-items: center; gap: 6px; }
.voice-edit-error { margin: 0; color: var(--df-color-danger); font-size: 12px; }

.voice-generate-form .voice-field-error { color: var(--df-color-danger); font-size: var(--df-font-size-xs); line-height: 18px; }
.voice-generate-form .voice-field-error[hidden] { display: none; }
.voice-generate-form [aria-invalid="true"] { border-color: var(--df-color-danger); }
.voice-generate-form .voice-prompt-field.has-error .voice-prompt-presets { border-color: var(--df-color-danger); }
.voice-generate-form [aria-invalid="true"]:focus-visible { outline-color: var(--df-color-danger); }
@media (forced-colors: none) {
  html[data-theme="light"] .edit-voice-visibility input[type="radio"] {
    appearance: none;
    box-sizing: border-box;
    width: 14px;
    height: 14px;
    border: 1px solid var(--df-color-control-edge);
    border-radius: 50%;
    background: var(--df-color-surface);
  }
  html[data-theme="light"] .edit-voice-visibility input[type="radio"]:checked {
    border: 4px solid var(--df-color-primary-active);
  }
}
