.voice-recorder-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.voice-recorder-backdrop[hidden] { display: none; }

.voice-recorder-dialog {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 100%;
  max-width: 420px;
  padding: 1.25rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

.voice-recorder-dialog h2 {
  margin: 0 0 1rem;
  font-size: 1.15rem;
}

.voice-recorder-error {
  color: #ef4444;
  margin: 0 0 1rem;
  font-size: 0.95rem;
}

.voice-recorder-recording[hidden] { display: none; }

.voice-recorder-meter {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 4px;
  height: 48px;
  margin: 1rem 0;
}
.voice-recorder-meter span {
  display: block;
  width: 6px;
  min-height: 4px;
  border-radius: 2px;
  background: var(--accent);
  opacity: 0.35;
  transition: height 0.05s ease, opacity 0.05s ease;
}
.voice-recorder-meter.is-live span { opacity: 1; }

.voice-recorder-timer {
  text-align: center;
  font-size: 1.75rem;
  font-variant-numeric: tabular-nums;
  margin: 0.5rem 0;
}
.voice-recorder-timer.is-warning { color: #f59e0b; }

.voice-recorder-status {
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0 0 1rem;
  min-height: 1.25rem;
}

.voice-recorder-playback {
  margin: 0.5rem 0 1rem;
}
.voice-recorder-playback-label {
  margin: 0 0 0.25rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.voice-recorder-duration {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
  color: var(--muted);
}
.voice-recorder-playback audio {
  display: block;
  width: 100%;
  min-height: 2.5rem;
}

.voice-recorder-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
  margin-top: 1rem;
}

.voice-recorder-recovery {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid #f59e0b;
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  margin: 1rem 0;
}
.voice-recorder-recovery[hidden] { display: none; }
.voice-recorder-recovery p { margin: 0 0 0.5rem; }
.voice-recorder-recovery-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

body.voice-recorder-open { overflow: hidden; }
