.capture-dialog { width: min(460px, calc(100vw - 24px)); border: 1px solid var(--line); border-radius: 20px; padding: 22px; background: var(--panel); color: var(--ink); box-shadow: var(--shadow); }
.capture-dialog::backdrop { background: rgb(13 31 55 / 55%); }
.capture-dialog h2 { margin: 0 0 14px; font-size: 20px; }
.capture-status { color: var(--muted); min-height: 2.8em; }
.capture-preview video, .capture-preview img { display: block; max-width: 100%; max-height: 55vh; object-fit: contain; border-radius: 12px; margin: 0 auto; }
.capture-preview audio { display: block; width: 100%; }
.capture-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.capture-actions [hidden] { display: none; }
.composer.has-attachment-controls.has-capture-controls { grid-template-columns: 36px minmax(0, 1fr) 36px 40px; }
.capture-microphone { grid-column: 3; grid-row: 1; }
.composer.has-capture-controls > .send-button { grid-column: 4; grid-row: 1; }

/* Voice capture replaces the controls in-place; hidden draft nodes retain text. */
.composer.voice-capture-active > :not(.voice-capture) { display: none !important; }
.composer > .voice-capture { grid-column: 1 / -1; grid-row: 1; width: 100%; min-width: 0; display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 3px 0; }
.voice-capture-title { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.voice-capture-body { min-width: 0; }
.voice-capture .capture-status { margin: 0 0 3px; min-height: 0; font-size: 12px; line-height: 1.35; overflow-wrap: anywhere; }
.voice-capture[data-state="recording"] .capture-status::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; background: #df5266; }
.voice-capture .capture-actions { margin: 0; gap: 6px; flex-wrap: nowrap; }
.voice-capture > button, .voice-capture .capture-actions button, .voice-capture-play { width: 40px; height: 40px; min-width: 40px; padding: 9px; border: 0; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--accent-soft, #e4f2ff); color: var(--accent-strong, #147dcd); cursor: pointer; }
.voice-capture > button { color: var(--muted); background: transparent; }
.voice-capture .capture-actions > .security-button:not(.secondary) { background: var(--accent-strong, #147dcd); color: #fff; }
.voice-capture button svg { display: block; width: 22px; height: 22px; flex: none; }
.voice-capture button:disabled { opacity: .45; cursor: default; }
.voice-capture button:focus-visible, .voice-capture input:focus-visible { outline: 2px solid var(--accent-strong, #147dcd); outline-offset: 3px; }
.voice-capture [hidden] { display: none !important; }
.voice-capture-wave { display: flex; height: 27px; align-items: center; gap: 3px; overflow: hidden; }
.voice-capture-wave i { display: block; width: 3px; min-width: 2px; height: 3px; border-radius: 2px; background: var(--accent-strong, #147dcd); }
.voice-capture-playback { display: grid; grid-template-columns: 30px minmax(24px, 1fr) auto; align-items: center; gap: 6px; }
.voice-capture-play { width: 30px; height: 30px; min-width: 30px; padding: 5px; }
.voice-capture-playback input[type="range"] { display: block; width: 100%; min-width: 0; height: 24px; min-height: 0; padding: 0; border: 0; background: transparent; accent-color: var(--accent-strong, #147dcd); }
.voice-capture-duration { font-size: 12px; font-variant-numeric: tabular-nums; color: var(--muted); }
.voice-capture[data-state="sending"] .voice-capture-playback { opacity: .55; pointer-events: none; }
@media (max-width: 480px) {
  .composer > .voice-capture { gap: 6px; grid-template-columns: 36px minmax(0, 1fr) auto; }
  .voice-capture > button, .voice-capture .capture-actions button { width: 36px; height: 36px; min-width: 36px; padding: 7px; }
  .voice-capture .capture-actions { gap: 3px; }
}
