.conversation-view {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.messages {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.messages::before { content: ''; flex: 1; }

.msg {
  max-width: 88%;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 10px 12px;
  background: var(--surface);
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.45;
  animation: msg-in .2s ease-out;
}
@keyframes msg-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.msg.me {
  align-self: flex-end;
  border-color: rgba(56, 189, 248, .35);
  background: rgba(56, 189, 248, .08);
}
.msg.live {
  border-color: rgba(56, 189, 248, .55);
  animation: live-pulse 1.5s ease-in-out infinite;
}
@keyframes live-pulse {
  0%, 100% { border-color: rgba(56, 189, 248, .55); }
  50% { border-color: rgba(56, 189, 248, .2); }
}
.msg .meta {
  margin-top: 6px;
  font-size: 11px;
  color: var(--text-dim);
  font-family: var(--mono);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.msg .meta .meta-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg .play-btn {
  border: 1px solid var(--border);
  background: #0f0f18;
  color: var(--text);
  border-radius: 10px;
  padding: 4px 8px;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}
.msg .play-btn:hover { background: #1a1a2e; }
.msg .play-btn:active { transform: scale(.97); }
.msg .play-btn[disabled] { opacity: .6; cursor: default; transform: none; }
.msg .translation {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid var(--border);
  color: var(--purple);
  font-size: 13px;
  min-height: 0;
}
.msg .translation:empty { display: none; }
.msg .latency-debug { margin-top: 7px; display: flex; flex-wrap: wrap; gap: 6px; }
.msg .latency-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-dim);
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 10px;
  font-family: var(--mono);
  letter-spacing: 0.01em;
  line-height: 1.4;
}
.msg .latency-badge .kind { color: #9aa0b5; font-weight: 700; }
.msg .latency-badge .vals { color: #7fc7ea; }

.composer {
  flex-shrink: 0;
  display: flex;
  gap: 10px;
  padding: 10px 14px;
  border-top: 1px solid var(--border);
  background: rgba(18, 18, 28, 0.9);
  backdrop-filter: blur(10px);
}
textarea.input {
  resize: none;
  min-height: 42px;
  max-height: 120px;
  padding: 10px 12px;
  font-family: var(--font);
  line-height: 1.35;
}

@keyframes mic-pulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.08); }
}
.icon-btn.send { border-color: rgba(56, 189, 248, .35); }

.vad-strip {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px 6px;
  min-height: 22px;
}
.vad-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--border);
  transition: background .12s, box-shadow .12s;
  flex-shrink: 0;
}
.vad-dot[data-state="listening"] { background: var(--accent); box-shadow: 0 0 6px rgba(56, 189, 248, .3); }
.vad-dot[data-state="speech"] { background: var(--green); box-shadow: 0 0 10px rgba(52, 211, 153, .4); animation: vad-glow .4s ease-in-out infinite alternate; }
.vad-dot[data-state="processing"] { background: var(--amber); box-shadow: 0 0 8px rgba(251, 191, 36, .3); }
@keyframes vad-glow {
  from { box-shadow: 0 0 6px rgba(52, 211, 153, .25); }
  to   { box-shadow: 0 0 14px rgba(52, 211, 153, .55); }
}
.vad-bar-wrap { flex: 1; height: 4px; background: var(--surface); border-radius: 2px; overflow: hidden; }
.vad-bar { height: 100%; width: 0%; border-radius: 2px; background: var(--accent); transition: width 60ms linear, background .12s; }
.vad-bar.speech { background: var(--green); }
.vad-label { font-size: 10px; font-family: var(--mono); color: var(--text-dim); min-width: 80px; text-align: right; white-space: nowrap; }

.mic-status { display: none !important; }

.settings-card {
  margin: 14px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.hint { font-size: 12px; color: var(--text-dim); min-height: 16px; }

.toggle-row { display: flex; align-items: center; gap: 6px; cursor: pointer; font-size: 14px; }
.toggle-row input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--accent, #4f8cff); }

.voice-recorder { display: flex; flex-direction: column; gap: 8px; }
.voice-prompt-text { font-size: 13px; color: var(--text-dim); line-height: 1.5; font-style: italic; max-height: 120px; overflow-y: auto; }
.voice-recorder-controls { display: flex; align-items: center; gap: 10px; }
.voice-timer { font-family: var(--mono); font-size: 13px; color: var(--text-dim); }
.voice-recorder-result { display: flex; gap: 8px; margin-top: 4px; }
.voice-recorder-saved { display: flex; flex-direction: column; gap: 8px; }
.voice-saved-label { font-size: 13px; color: var(--green, #30c050); }
.voice-recorder-actions { display: flex; gap: 8px; }
