.voice-editor,
.voice-detail {
  border: 1px solid #d9cbbb;
  border-radius: 16px;
  background: #fdfaf5;
  padding: 20px;
  margin: 20px 0;
  color: #2a2622;
}
.voice-dialog {
  width: min(620px, calc(100vw - 24px));
  max-height: 90dvh;
  overflow: auto;
  border: 1px solid #d9cbbb;
  border-radius: 20px;
  padding: 24px;
  background: #f7f1e8;
  color: #2a2622;
}
.voice-dialog::backdrop {
  background: #24211db3;
}
.voice-dialog h2 {
  font-family: Newsreader, Georgia, serif;
  font-size: 32px;
  font-weight: 500;
}
.voice-dialog audio,
.voice-editor audio,
.voice-detail audio {
  display: block;
  width: 100%;
  margin: 14px 0;
}
.voice-dialog button,
.voice-editor button,
.voice-detail button {
  min-height: 44px;
  margin: 6px 8px 6px 0;
}
.voice-dialog textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #baaa98;
  border-radius: 8px;
  background: #fdfaf5;
  color: inherit;
  font: inherit;
  box-sizing: border-box;
}
.voice-dialog input[type="file"] {
  max-width: 100%;
  min-height: 44px;
  margin: 12px 0;
}
.voice-trim,
.voice-segments > div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 16px 0;
}
.voice-trim label,
.voice-segments label {
  display: grid;
  gap: 6px;
}
.voice-dialog input[type="number"] {
  min-height: 44px;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 8px;
  border: 1px solid #baaa98;
  border-radius: 6px;
  background: #fffdf9;
  color: inherit;
  font: inherit;
}
.voice-segments textarea {
  grid-column: 1/-1;
}
.voice-timer {
  font-size: 48px;
  font-variant-numeric: tabular-nums;
  text-align: center;
  margin: 30px 0;
}
.voice-waveform svg {
  display: block;
  width: 100%;
  height: 80px;
  stroke: #b5563b;
  stroke-width: 2;
  stroke-linecap: round;
}
.voice-transcript {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.voice-detail summary {
  min-height: 44px;
  cursor: pointer;
  padding-top: 12px;
}
.voice-dialog :focus-visible {
  outline: 3px solid #b5563b;
  outline-offset: 3px;
}
@media (max-width: 400px) {
  .voice-dialog {
    padding: 16px;
  }
  .voice-trim {
    gap: 8px;
  }
  .voice-editor,
  .voice-detail {
    padding: 14px;
  }
}
