.speech-options-grid select{min-width:0}
.speech-audition{margin:12px 0 22px;display:grid;gap:12px}
.speech-audition-main{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.speech-preview-button{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:42px;padding:10px 16px;border:1px solid #8373c6;border-radius:12px;background:#f2effc;color:#3a2d70;font-size:.86rem;font-weight:800;cursor:pointer}
.speech-preview-button:disabled{opacity:.65;cursor:wait}
.speech-preview-status{font-size:.78rem;color:var(--muted,#67637a);line-height:1.4}
.speech-audition audio{width:100%;max-width:420px;height:44px}
.speech-audition audio[hidden]{display:none}
.speech-voice-browser{border:1px solid var(--line,#e4e1e8);border-radius:15px;padding:0 13px;background:#fff}
.speech-voice-browser summary{padding:14px 2px;font-size:.85rem;font-weight:800;cursor:pointer;list-style:none;display:flex;justify-content:space-between;align-items:center;gap:10px}
.speech-voice-browser summary::-webkit-details-marker{display:none}
.speech-voice-browser summary::after{content:'⌄';font-size:1.1rem;color:#7363aa}
.speech-voice-browser[open] summary::after{content:'⌃'}
.speech-voice-browser small{color:var(--muted,#67637a);font-weight:500}
.speech-voice-gallery{display:grid;grid-template-columns:repeat(auto-fit,minmax(175px,1fr));gap:8px;padding:4px 0 13px}
.speech-voice-card{border:1px solid #e7e4ee;border-radius:12px;display:flex;align-items:stretch;background:#faf9fd;min-width:0}
.speech-voice-card.is-selected{border-color:#7a5fd7;background:#f0edfc;box-shadow:inset 0 0 0 1px #7a5fd7}
.speech-voice-choose{appearance:none;text-align:left;min-width:0;flex:1;border:0;background:transparent;padding:10px;color:inherit;cursor:pointer}
.speech-voice-choose strong{display:block;font-size:.81rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.speech-voice-choose small{display:block;margin-top:3px;font-size:.69rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.speech-voice-play{align-self:center;flex:none;margin:5px 6px 5px 0;width:33px;height:33px;border:1px solid #ded7f5;border-radius:10px;background:#fff;color:#6045b2;cursor:pointer;font-size:.86rem}
.speech-voice-play:hover,.speech-voice-choose:hover{color:#442ca2}
@media(max-width:520px){.speech-voice-gallery{grid-template-columns:repeat(2,minmax(0,1fr))}.speech-voice-browser{padding:0 10px}.speech-voice-choose{padding:9px 6px 9px 8px}}

/* Second Speech mode; hide the unrelated TTS inputs completely. */
.speech-transcription-input { display: grid; gap: .65rem; margin: .8rem 0 1.4rem; padding: 1.1rem; border: 1px solid rgba(140,165,255,.34); border-radius: 16px; background: rgba(110,145,240,.055); }
.speech-transcription-input[hidden], [data-speech-tts][hidden], [data-speech-stt][hidden] { display: none !important; }
.speech-transcription-input label { display: grid; gap: .3rem; }
.speech-transcription-input input[type=file] { width: 100%; padding: .9rem; border: 1px dashed rgba(140,165,255,.52); border-radius: 12px; }
.speech-mode-choice { margin-bottom: 1rem; }
.speech-transcription-result { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.7; user-select: text; }
