.voice-player {
  --voice-progress: 0%;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 8px 11px;
  min-width: 0;
  width: 100%;
  text-align: start;
  white-space: normal;
  color: var(--ink);
}

.voice-toggle {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--action, var(--green));
  color: var(--action-ink, #fff);
  transition: background .18s, transform .18s;
}

.voice-toggle:hover { background: var(--action-hover, var(--deep)); }
.voice-toggle:active { transform: scale(.96); }

.voice-toggle span {
  display: block;
  width: 0;
  height: 0;
  margin-left: 2px;
  border-block: 6px solid transparent;
  border-left: 10px solid currentColor;
}

.voice-player[data-voice-playing] .voice-toggle span {
  width: 12px;
  height: 13px;
  margin: 0;
  border: 0;
  border-inline: 4px solid currentColor;
  border-radius: 1px;
}

.voice-timeline {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.voice-track {
  position: relative;
  min-height: 29px;
}

.voice-wave {
  position: absolute;
  inset: 2px 0;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(1px, 1fr);
  align-items: center;
  gap: clamp(1px, .45vw, 3px);
  pointer-events: none;
}

.voice-wave-base { color: var(--muted); opacity: .42; }
.voice-wave-played { color: var(--green); clip-path: inset(0 calc(100% - var(--voice-progress)) 0 0); }

.voice-wave i {
  width: min(100%, 4px);
  height: var(--voice-height);
  border-radius: 20px;
  background: currentColor;
  justify-self: center;
}

.voice-seek {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  border: 0;
  border-radius: 4px;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  cursor: pointer;
}

.voice-seek:disabled { cursor: default; }

.voice-seek::-webkit-slider-runnable-track { background: transparent; }
.voice-seek::-moz-range-track { background: transparent; }

.voice-seek::-webkit-slider-thumb {
  width: 10px;
  height: 10px;
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  border-radius: 50%;
  background: var(--green);
}

.voice-seek::-moz-range-thumb {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 50%;
  background: var(--green);
}

.voice-seek:disabled::-webkit-slider-thumb { opacity: 0; }
.voice-seek:disabled::-moz-range-thumb { opacity: 0; }

.voice-times {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.voice-error {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--rose, #9f302e);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.voice-error a { font-weight: 700; text-underline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  .voice-toggle { transition: none; }
}
