#chat-page[data-ui-scope="brand-soft-refresh"] .chat-input-box.has-voice-input {
    grid-template-columns: var(--ui-control-height) minmax(0, 1fr) var(--ui-control-height);
}
#chat-page[data-ui-scope="brand-soft-refresh"] .chat-input-box.has-voice-input.has-composer-action {
    grid-template-columns: var(--ui-control-height) minmax(0, 1fr) var(--ui-control-height) var(--ui-control-height);
}
#chat-page .has-voice-input .chat-voice-btn { grid-column: 1; }
#chat-page .has-voice-input .chat-input-container { grid-column: 2; }
#chat-page .has-voice-input .chat-attach-btn { grid-column: 3; }
#chat-page .has-voice-input .chat-send-btn { grid-column: 4; }
#chat-page[data-ui-scope="brand-soft-refresh"] .chat-input-box.has-voice-input + .chat-attachments-panel {
    transform-origin: right bottom;
}
#chat-page .has-voice-input .chat-input-field[hidden],
#chat-page .has-voice-input .chat-send-btn[hidden],
#chat-page .chat-voice-hold-btn[hidden],
#chat-page .chat-voice-btn[hidden], .voice-input-overlay[hidden] { display: none; }
#chat-page .chat-voice-hold-btn {
    flex: 1;
    touch-action: none;
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}
.voice-input-overlay { position: fixed; inset: 0; z-index: 12000; pointer-events: none; background: var(--ui-color-voice-scrim); }
.voice-input-glow {
    position: absolute; bottom: 0; left: 0; right: 0; height: min(34vh, 280px);
    display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: var(--ui-space-6);
    padding-bottom: calc(var(--ui-control-height) + var(--ui-space-6) + var(--native-safe-bottom, env(safe-area-inset-bottom, 0)));
    background: var(--ui-gradient-voice-recording);
}
.voice-input-overlay[data-state="cancel"] .voice-input-glow { background: var(--ui-gradient-voice-cancel); }
.voice-input-hint { margin: var(--ui-space-0); color: var(--ui-color-on-action); font-size: var(--ui-type-section-title); font-weight: var(--ui-weight-medium); text-align: center; }
.voice-input-wave { display: flex; align-items: center; justify-content: center; gap: var(--ui-space-1); height: 30px; }
.voice-input-wave span { width: 3px; height: 3px; border-radius: var(--ui-radius-pill); background: var(--ui-color-on-action); transition: height 80ms ease; }
.voice-input-overlay[data-state="preparing"] .voice-input-wave, .voice-input-overlay[data-state="finishing"] .voice-input-wave { opacity: .65; }
.voice-input-active #chat-page .chat-input-container, .voice-input-active #chat-page .chat-attach-btn { pointer-events: none; }
.voice-input-active #chat-page .chat-voice-hold-btn, .voice-input-active #chat-page .chat-send-btn[data-state="stop"] { pointer-events: auto; }
@media (prefers-reduced-motion: reduce) { .voice-input-wave span { transition: none; } }
