.voice-studio {
  --voice-canvas: #f5f5f5;
  --voice-ink: #292524;
  --voice-ink-strong: #0c0a09;
  --voice-body: #4e4e4e;
  --voice-muted: #777169;
  --voice-line: #e7e5e4;
  --voice-line-strong: #d6d3d1;
  --voice-card: #ffffff;
  color: var(--voice-ink-strong);
  background: var(--voice-canvas);
  border: 1px solid var(--voice-line);
  border-radius: 24px;
  padding: clamp(18px, 3vw, 32px);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", sans-serif;
  letter-spacing: .15px;
}

.voice-studio-hero,
.voice-card-heading,
.voice-profile-row,
.voice-output-spec,
.voice-preview-card {
  display: flex;
  align-items: center;
}

.voice-studio-hero {
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.voice-kicker,
.voice-card-heading span {
  display: block;
  color: var(--voice-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .96px;
}

.voice-studio h2,
.voice-studio h3,
.voice-studio p { margin: 0; }

.voice-studio h2 {
  margin-top: 6px;
  font: 300 clamp(26px, 4vw, 36px)/1.17 Georgia, "Times New Roman", serif;
  letter-spacing: -.36px;
}

.voice-studio-hero p {
  max-width: 660px;
  margin-top: 8px;
  color: var(--voice-body);
  font-size: 14px;
  line-height: 1.55;
}

.voice-orb {
  width: min(230px, 28vw);
  height: 92px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 24px;
  background:
    radial-gradient(circle at 20% 65%, rgba(167, 229, 211, .75), transparent 48%),
    radial-gradient(circle at 72% 30%, rgba(200, 184, 224, .68), transparent 52%),
    #fafafa;
  overflow: hidden;
}

.voice-wave,
.voice-preview-wave {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 48px;
}

.voice-wave i,
.voice-preview-wave i {
  width: 2px;
  height: var(--wave);
  min-height: 5px;
  border-radius: 999px;
  background: var(--voice-ink);
  opacity: .72;
}

.voice-studio-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
}
.voice-studio-grid.voice-synthesis-only {
  grid-template-columns: minmax(0, 760px);
  justify-content: center;
}

.voice-card {
  min-width: 0;
  padding: 24px;
  background: var(--voice-card);
  border: 1px solid var(--voice-line);
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .04);
}

.voice-card-heading {
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--voice-line);
}

.voice-card-heading h3 {
  margin-top: 2px;
  font-size: 20px;
  font-weight: 500;
}

.voice-card-heading small,
.voice-preview-card small {
  color: var(--voice-muted);
  font-size: 12px;
}

.voice-card form {
  display: grid;
  gap: 14px;
  padding: 20px 0;
}

.voice-field,
.voice-rights,
.voice-check,
.voice-first-charge {
  display: grid;
  gap: 7px;
  color: var(--voice-body);
  font-size: 13px;
}

.voice-field > span,
.voice-rights legend { font-weight: 600; color: var(--voice-ink); }

.voice-field input,
.voice-field select,
.voice-field textarea {
  width: 100%;
  min-height: 44px;
  box-sizing: border-box;
  color: var(--voice-ink-strong);
  background: var(--voice-card);
  border: 1px solid var(--voice-line-strong);
  border-radius: 8px;
  padding: 11px 13px;
  font: inherit;
}

.voice-field textarea { resize: vertical; line-height: 1.55; }
.voice-source-player { width: 100%; height: 40px; }
.voice-source-player[hidden] { display: none; }

.voice-field input:focus-visible,
.voice-field select:focus-visible,
.voice-field textarea:focus-visible,
.voice-pill:focus-visible,
.voice-play:focus-visible {
  outline: 2px solid var(--voice-ink-strong);
  outline-offset: 2px;
}

.voice-rights { margin: 0; padding: 0; border: 0; }
.voice-rights label,
.voice-check { display: flex; align-items: flex-start; gap: 9px; line-height: 1.45; }
.voice-rights input,
.voice-check input,
.voice-first-charge input { margin-top: 3px; accent-color: var(--voice-ink); }

.voice-legal-note {
  color: var(--voice-muted);
  font-size: 12px;
  line-height: 1.55;
}

.voice-pill {
  min-height: 40px;
  width: fit-content;
  border-radius: 9999px;
  padding: 10px 20px;
  font: 500 14px/1 Inter, "PingFang SC", sans-serif;
  cursor: pointer;
}

.voice-pill-primary { color: #ffffff; background: var(--voice-ink); border: 1px solid var(--voice-ink); }
.voice-pill-outline { color: var(--voice-ink); background: transparent; border: 1px solid var(--voice-line-strong); }
.voice-pill:disabled { cursor: not-allowed; opacity: .45; }

.voice-profile-list { border-top: 1px solid var(--voice-line); }
.voice-profile-row { gap: 10px; min-height: 52px; border-bottom: 1px solid var(--voice-line); }
.voice-avatar {
  width: 32px;
  height: 32px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: #f0efed;
  font-size: 13px;
  font-weight: 600;
}
.voice-profile-copy { min-width: 0; display: grid; flex: 1; }
.voice-profile-copy strong,
.voice-profile-copy span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.voice-profile-copy strong { font-size: 14px; }
.voice-profile-copy span { color: var(--voice-muted); font-size: 12px; }
.voice-status {
  flex: 0 0 auto;
  padding: 4px 9px;
  border-radius: 9999px;
  color: var(--voice-ink);
  background: #f0efed;
  font-size: 11px;
  font-weight: 600;
}
.voice-status[data-status="ready"] { color: #166534; background: #dcfce7; }
.voice-status[data-status="failed"] { color: #991b1b; background: #fee2e2; }
.voice-empty { padding: 18px 0; color: var(--voice-muted); font-size: 13px; line-height: 1.55; }

.voice-script span { display: flex; justify-content: space-between; gap: 12px; }
.voice-script span small { color: var(--voice-muted); font-weight: 400; }
.voice-output-spec {
  gap: 10px;
  flex-wrap: wrap;
  color: var(--voice-muted);
  font-size: 12px;
}
.voice-output-spec span { padding: 6px 10px; border-radius: 9999px; background: #f0efed; }
.voice-output-spec strong { color: var(--voice-ink); }
.voice-first-charge {
  grid-template-columns: auto minmax(0, 1fr);
  padding: 14px;
  border: 1px solid #f4c5a8;
  border-radius: 12px;
  background: #fffaf5;
  line-height: 1.5;
}
.voice-first-charge strong { display: block; color: var(--voice-ink); }
.voice-first-charge[hidden] { display: none; }

.voice-preview-card {
  gap: 14px;
  min-height: 76px;
  padding: 16px;
  border: 1px solid var(--voice-line);
  border-radius: 16px;
  background: #fafafa;
}
.voice-play {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 50%;
  color: #ffffff;
  background: var(--voice-ink);
}
.voice-play:disabled { opacity: .4; }
.voice-preview-wave { width: 120px; flex: 0 1 120px; height: 38px; overflow: hidden; }
.voice-preview-card > div { min-width: 0; display: grid; }
.voice-preview-card strong { font-size: 13px; }
.voice-studio-message { min-height: 22px; margin-top: 14px !important; color: var(--voice-muted); font-size: 13px; }
.voice-studio-message[data-tone="success"] { color: #166534; }
.voice-studio-message[data-tone="error"] { color: #b91c1c; }
.voice-result-player { width: 100%; }

@media (max-width: 900px) {
  .voice-studio-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .voice-studio { border-radius: 16px; padding: 14px; }
  .voice-studio-hero { align-items: flex-start; flex-direction: column; }
  .voice-orb { width: 100%; height: 72px; }
  .voice-card { padding: 17px; }
  .voice-card-heading { align-items: flex-start; flex-direction: column; }
  .voice-profile-row { flex-wrap: wrap; padding: 10px 0; }
  .voice-status { margin-left: 42px; }
  .voice-preview-wave { width: 76px; flex-basis: 76px; }
  .voice-pill { min-height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  .voice-studio *,
  .voice-studio *::before,
  .voice-studio *::after {
    scroll-behavior: auto !important;
    transition-duration: .001ms !important;
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
  }
}
