.voice-mode {
  position: absolute;
  inset: 0;
  z-index: 5;
  background: transparent;
  display: flex;
  flex-direction: column;
  padding: 100px 24px 24px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.voice-mode[hidden] {
  display: none;
}
.voice-mode-header {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
}
.voice-mode-title {
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--text-2);
}
.voice-mode-back {
  flex-shrink: 0;
}
.voice-mode-main {
  flex: 1;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 24px;
  padding: 24px 0;
}
.voice-mode-status {
  margin: 0;
  color: var(--text-2);
  font-size: var(--fs-sm);
}
.voice-mode-subtitle {
  margin: 0;
  max-width: 640px;
  width: 100%;
  min-height: 3.6em;
  max-height: 30vh;
  overflow-y: auto;
  text-align: center;
  font-size: clamp(18px, 2.2vw, 25px);
  line-height: 1.6;
  color: var(--text);
  overflow-wrap: anywhere;
  scrollbar-width: thin;
}
.voice-mode-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  padding: 12px 0 max(12px, env(safe-area-inset-bottom));
}
.voice-mode-mic {
  width: 56px;
  height: 56px;
  flex: 0 0 56px;
  background: var(--accent-soft);
  color: var(--icon-accent);
}
.voice-mode-end {
  width: 56px;
  height: 56px;
  flex: 0 0 56px;
  background: var(--surface-2);
  color: var(--text-2);
}
@media (max-width: 859px) {
  .voice-mode {
    padding: 72px 16px 16px;
  }
  .voice-mode-main {
    min-height: 260px;
    gap: 20px;
  }
}

.composer .voice-mode-launch {
  grid-area: send;
}
.composer :is(.voice-mode-launch, .send)[hidden] {
  display: none;
}
.topbar #saveChatButton {
  margin-left: auto;
  flex-shrink: 0;
}
.topbar:has(#saveChatButton:not([hidden])) .topbar-new-chat {
  margin-left: 0;
}
