body[data-page="voice"] { background: #000; }
.voice-main { width: min(880px, calc(100% - 32px)); margin: 0 auto; padding: 40px 0 72px; display: flex; flex-direction: column; gap: 28px; }
.voice-intro { text-align: center; padding: 12px 0 4px; }
.voice-eyebrow { margin: 0 0 14px; font-size: 9px; font-weight: 500; letter-spacing: 2px; color: #8d8d8d; }
.voice-intro h1 { margin: 0; font-size: clamp(30px, 3.2vw, 44px); font-weight: 620; line-height: 1.17; letter-spacing: -1.6px; }
.voice-intro h1 span { color: #7f7f7f; }
.voice-intro-description { max-width: 520px; margin: 16px auto 0; color: #878787; font-size: 13px; line-height: 1.7; }

.voice-composer { display: flex; flex-direction: column; gap: 18px; padding: 18px; border: 4px solid #1c1c1c; border-radius: 20px; background: #1f1f1f; box-shadow: 0 8px 25px #0003; }
.voice-composer:focus-within { border-color: #353535; }
.voice-composer fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.voice-composer legend { padding: 0; margin-bottom: 10px; color: #bdbdbd; font-size: 11px; font-weight: 600; letter-spacing: 1.2px; text-transform: uppercase; }
.voice-model { display: flex; align-items: center; gap: 10px; color: #e9e9e9; font-size: 13px; font-weight: 600; }
.voice-model small { color: #8a8a8a; font-size: 11px; font-weight: 400; }

.voice-speaker-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.voice-speaker { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid #333; border-radius: 12px; background: #262626; }
.voice-speaker-badge { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: #fff; color: #111; font-size: 11px; font-weight: 700; }
.voice-speaker[data-speaker="2"] .voice-speaker-badge, .voice-line[data-speaker="2"] .voice-line-speaker { background: #9ad1ff; }
.voice-speaker label { display: grid; gap: 2px; min-width: 0; color: #9a9a9a; font-size: 10px; }
.voice-composer select, .voice-composer input[type="text"], .voice-composer textarea { width: 100%; min-width: 0; color: #f1f1f1; background: #161616; border: 1px solid #3a3a3a; border-radius: 8px; font: inherit; font-size: 13px; }
.voice-composer select { padding: 6px 8px; }
.voice-composer select:focus-visible, .voice-composer input:focus-visible, .voice-composer textarea:focus-visible, .voice-composer button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.voice-speaker-remove, .voice-line-remove { width: 30px; height: 30px; border: 0; border-radius: 8px; background: transparent; color: #a8a8a8; font-size: 18px; line-height: 1; }
.voice-speaker-remove:hover:not(:disabled), .voice-line-remove:hover:not(:disabled) { background: #333; color: #fff; }
.voice-text-button { margin-top: 10px; padding: 7px 12px; border: 1px dashed #4a4a4a; border-radius: 9px; background: transparent; color: #d9d9d9; font-size: 12px; }
.voice-text-button:hover:not(:disabled) { border-color: #8a8a8a; color: #fff; }

.voice-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.voice-lines:focus { outline: 0; }
.voice-line { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: start; padding: 12px; border: 1px solid #333; border-radius: 12px; background: #262626; }
.voice-line-speaker { display: grid; place-items: center; width: 30px; height: 30px; margin-top: 2px; border: 0; border-radius: 50%; background: #fff; color: #111; font-size: 12px; font-weight: 700; }
.voice-line-speaker:disabled { cursor: default; }
.voice-line-fields { display: grid; gap: 8px; min-width: 0; }
.voice-line textarea { min-height: 64px; max-height: 320px; resize: vertical; padding: 8px 10px; line-height: 1.55; }
.voice-line input[type="text"] { padding: 6px 10px; font-size: 12px; }
.voice-composer textarea::placeholder, .voice-composer input::placeholder { color: #7a7a7a; opacity: 1; }
.voice-script-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.voice-counter { margin-top: 10px; color: #8a8a8a; font-size: 11px; font-variant-numeric: tabular-nums; }
.voice-counter[data-over="true"] { color: #ff9b9b; }
.voice-hint { margin: 8px 0 0; color: #7d7d7d; font-size: 11px; }

.voice-settings { display: flex; flex-wrap: wrap; gap: 14px 28px; }
.voice-variation { display: grid; gap: 6px; flex: 1 1 240px; color: #d0d0d0; font-size: 12px; }
.voice-variation span { display: flex; justify-content: space-between; }
.voice-variation output { color: #fff; font-variant-numeric: tabular-nums; }
.voice-variation input { width: 100%; accent-color: #fff; }
.voice-variation small, .voice-toggle small { display: block; color: #7d7d7d; font-size: 11px; }
.voice-toggle { display: flex; gap: 10px; align-items: flex-start; flex: 1 1 240px; color: #d0d0d0; font-size: 12px; }
.voice-toggle input { margin-top: 2px; accent-color: #fff; }

.voice-notice { padding: 11px 14px; border: 1px dashed #4a4a4a; border-radius: 8px; background: #111; color: #eee; font-size: 12px; line-height: 1.6; }
.voice-generate { display: grid; gap: 3px; justify-items: center; padding: 14px; border: 0; border-radius: 12px; background: #fff; color: #111; font-size: 13px; font-weight: 650; box-shadow: 0 3px 0 #bcbcbc, 0 5px 8px #0004; }
.voice-generate:hover:not(:disabled) { background: #f2f2f2; }
.voice-generate:disabled { cursor: default; color: #777; }
.voice-generate-price { font-size: 11px; font-weight: 500; color: #333; }
.voice-generate-price::before { content: '✦'; margin-right: 4px; }
.voice-composer button:disabled:not(.voice-generate), .voice-composer select:disabled, .voice-composer input:disabled, .voice-composer textarea:disabled { opacity: .5; cursor: default; }

.voice-history h2 { margin: 0 0 12px; font-size: 15px; font-weight: 600; }
.voice-history-empty { margin: 0; color: #7d7d7d; font-size: 12px; }
.voice-results { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.voice-result { display: grid; gap: 10px; padding: 14px; border: 1px solid #2c2c2c; border-radius: 14px; background: #141414; }
.voice-result-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 12px; }
.voice-result-title { margin: 0; color: #e9e9e9; font-size: 13px; font-weight: 600; }
.voice-result-meta { color: #8a8a8a; font-size: 11px; }
.voice-result-status { padding: 2px 8px; border-radius: 99px; background: #262626; color: #cfcfcf; font-size: 10px; font-weight: 600; letter-spacing: .4px; text-transform: uppercase; }
.voice-result[data-state="failed"] .voice-result-status { background: #3a1f1f; color: #ffb4b4; }
.voice-result-excerpt { margin: 0; color: #a8a8a8; font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.voice-result audio { width: 100%; height: 40px; }
.voice-result-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.voice-result-actions a, .voice-result-actions button { padding: 6px 10px; border: 1px solid #3a3a3a; border-radius: 8px; background: transparent; color: #dcdcdc; font-size: 11px; text-decoration: none; }
.voice-result-actions a:hover, .voice-result-actions button:hover { border-color: #7a7a7a; color: #fff; }
.voice-result-message { margin: 0; color: #cfcfcf; font-size: 12px; line-height: 1.6; }

@media (max-width: 600px) {
  .voice-main { width: calc(100% - 32px); padding-top: 24px; gap: 22px; }
  .voice-composer { padding: 12px; border-width: 2px; }
  .voice-line { grid-template-columns: auto 1fr; }
  .voice-line-remove { grid-column: 2; justify-self: end; }
}
