@media (min-width: 1001px) {
  .demos {grid-template-columns: repeat(6, minmax(0, 1fr))}
  .demos article {grid-column: span 2}
  .demos article:nth-child(n+4) {grid-column: span 3; border-top: 1px solid var(--line)}
  .demos article:nth-child(4) {border-left: 0; padding-left: 0}
}
@media (min-width: 701px) and (max-width: 1000px) {
  .demos article:last-child {grid-column: 1 / -1; border-left: 0; padding-left: 0}
}
#voice-dialog {
  inset: 0;
  width: min(28rem, calc(100% - 2rem));
  max-width: none;
  max-height: calc(100dvh - 2rem);
  margin: auto;
  border: 1px solid var(--line);
  border-radius: 24px;
  overflow-y: auto;
  background: var(--paper);
  text-align: center;
}
#voice-dialog::backdrop {background: #1a1a166b}
html:has(#voice-dialog[open]) {overflow: hidden}
.voice-shell {position: relative; padding: 3.75rem clamp(1rem, 4vw, 2.25rem) 2rem}
.voice-close {position: absolute; top: .6rem; right: .75rem; width: 44px; height: 44px; border-radius: 50%; background: transparent; font: 1.8rem/1 Arial,sans-serif}
.voice-close:hover {background: #e9e8dc}
.voice-shell h2 {font-size: clamp(1.1rem, 3.4vw, 1.6rem); line-height: 1.3}
.voice-telephony {max-width: 32ch; margin: .65rem auto 0; line-height: 1.45}
#voice-disclaimer {max-width: 30ch; margin: .65rem auto 0; color: var(--muted); font-size: .9rem; line-height: 1.5}
.voice-display {padding-block: clamp(1.3rem, 4vh, 2.4rem)}
.voice-avatar {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  width: clamp(6.5rem, 16vh, 9rem); aspect-ratio: 1;
  border-radius: 50%; background: var(--lemon); transition: background .2s;
}
.voice-avatar i {width: 4px; height: 15%; border-radius: 2px; background: var(--ink); animation: voice-pulse 1.35s ease-in-out infinite alternate}
.voice-avatar i:nth-child(2n) {height: 29%; animation-delay: -.7s}
.voice-avatar i:nth-child(3n) {height: 40%; animation-delay: -.25s}
.voice-avatar i:nth-child(4) {height: 54%; animation-delay: -.9s}
@keyframes voice-pulse {from {transform: scaleY(.55)} to {transform: scaleY(1)}}
#voice-dialog[data-state="ended"] .voice-avatar {background: #e6e5da}
#voice-dialog[data-muted="true"] .voice-avatar i, #voice-dialog[data-state="ended"] .voice-avatar i {animation: none; height: 4px}
.voice-state {margin: .85rem 0 .2rem; font-weight: 600}
.voice-clock {font-variant-numeric: tabular-nums; font-size: .93rem; color: var(--muted)}
.voice-actions {display: flex; justify-content: center; flex-wrap: wrap; gap: .6rem}
.voice-actions button {display: inline-flex; align-items: center; justify-content: center; min-height: 44px; gap: .45rem; padding: .65rem .9rem; font-weight: 600; font-size: .93rem; border-radius: 100px}
.voice-actions button[hidden] {display: none}
.voice-actions svg {width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7}
.voice-mute {background: transparent; border: 1px solid #999b8c}
.voice-mute[aria-pressed="true"] {background: #e8e8dd}
.voice-mute[aria-pressed="false"] .mute-slash {display: none}
.voice-end {background: #ad3129; color: white}
.voice-end:hover {background: #8e2721}
.voice-restart {background: var(--ink); color: white}
@media(prefers-reduced-motion: reduce) {.voice-avatar i {animation: none}}
#voice-dialog:is([data-state="permission"], [data-state="error"]) .voice-avatar {background: #e6e5da}
#voice-dialog:is([data-state="permission"], [data-state="error"]) .voice-avatar i {animation: none; height: 4px}
