.speech-strip {
    margin: 0 0 24px;
    border: 1px solid var(--line, #dce2e9);
    border-radius: 12px;
    background: var(--panel, #fff);
}
.speech-mode, .speech-live {
    display: grid;
    gap: 12px;
    align-items: center;
    padding: 10px 14px;
}
.speech-mode {
    grid-template-columns: minmax(125px, .65fr) minmax(220px, 1.15fr) minmax(0, 1fr);
    align-items: end;
    border-bottom: 1px solid var(--line, #dce2e9);
}
.speech-mode label { margin: 0; }
.speech-mode select { display: block; margin-top: 3px; }
.speech-mode-status { font-size: 13px; color: var(--muted); align-self: center; }
.speech-mode-status.interpreter-error { color: var(--red, #ab3e31); }
.speech-live { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; }
.speech-strip select { min-height: 38px; }
.speech-strip-item { min-width: 0; }
.speech-strip-item small { color: var(--muted); display: block; }
.speech-strip-item span { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.interpreter-shell { max-width: 1000px; margin-inline: auto; }
.interpreter-header { margin-bottom: 20px; }
.interpreter-header p { color: var(--muted); margin: 0; }
.interpreter-card {
    border: 1px solid var(--line, #dce2e9);
    border-radius: 16px;
    background: var(--panel, #fff);
    overflow: hidden;
}
.interpreter-toolbar, .interpreter-gestures, .interpreter-composer { padding: 16px 20px; }
.interpreter-toolbar { display: flex; gap: 12px; align-items: end; flex-wrap: wrap; }
.interpreter-toolbar label { margin: 0; flex: 1; min-width: 138px; }
.interpreter-toolbar select { margin-top: 4px; }
.interpreter-status { padding: 10px 20px; border-block: 1px solid var(--line); color: var(--muted); margin: 0; }
.interpreter-messages { min-height: 245px; max-height: 44vh; overflow: auto; display: flex; flex-direction: column; gap: 12px; padding: 18px 20px; }
.interpreter-messages:focus-visible { outline-offset: -3px; }
.interpreter-empty { margin: auto; text-align: center; color: var(--muted); max-width: 37ch; }
.interpreter-bubble { width: fit-content; max-width: min(84%, 600px); background: var(--raised, #f1f3f6); border-radius: 12px; padding: 10px 14px; overflow-wrap: anywhere; }
.interpreter-bubble[data-kind="operator"] { align-self: end; background: var(--accent-soft, #eef3ff); }
.interpreter-bubble small { display: block; color: var(--muted); }
.interpreter-bubble p { white-space: pre-wrap; margin: 3px 0 0; }
.interpreter-bubble .original { font-size: 14px; color: var(--secondary, #525d6b); }
.interpreter-composer, .interpreter-gestures { border-top: 1px solid var(--line); }
.interpreter-composer textarea { min-height: 64px; }
.interpreter-actions, .interpreter-gesture-buttons { display: flex; gap: 8px; flex-wrap: wrap; }
.interpreter-actions { justify-content: space-between; margin-top: 8px; }
.interpreter-gestures h2 { font-size: 16px; margin-bottom: 9px; }
.interpreter-gesture-group + .interpreter-gesture-group { margin-top: 13px; }
.interpreter-gesture-group h3 { font-size: 14px; color: var(--muted); margin: 0 0 5px; }
.interpreter-message { margin: 9px 0 0; }
.interpreter-error { color: var(--red, #ab3e31); }
.speech-journal-list {
    background: var(--bg, #f7f8fa);
    min-height: 210px;
    max-height: clamp(210px, calc(100dvh - 540px), 480px);
}
#journal-events { display: flex; flex-direction: column; gap: 12px; }
#journal-more { align-self: center; flex-shrink: 0; }
.speech-journal-list .interpreter-bubble[data-kind="heard"] {
    background: var(--panel, #fff);
    border: 1px solid var(--line, #dce2e9);
    border-bottom-left-radius: 4px;
}
.speech-journal-list .interpreter-bubble:is([data-kind="operator"], [data-kind="spoken"]) {
    align-self: flex-end;
    background: var(--accent-soft, #eef3ff);
    border-bottom-right-radius: 4px;
}
@media (max-width: 1000px) {
    .speech-mode { grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 8px; }
    .speech-mode-status { grid-column: 1 / -1; }
}
@media (max-width: 620px) {
    .speech-live { grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 8px; }
    .speech-live button { grid-column: 1 / -1; justify-self: start; }
    .interpreter-toolbar, .interpreter-gestures, .interpreter-composer, .interpreter-messages { padding-inline: 12px; }
    .interpreter-status { padding-inline: 12px; }
}
