.voice-controls,.voice-settings {
  display:flex; flex-wrap:wrap; align-items:center; gap:4px 8px;
  min-width:0; color:var(--ink,inherit);
}
.voice-controls { margin:2px 0; }
.voice-controls:empty { display:none; }
.voice-controls button,.voice-settings select,.voice-settings button {
  min-height:32px; max-width:100%; padding:4px 9px;
  font:inherit; font-size:.8rem; line-height:1.2;
  border:1px solid var(--line,currentColor); border-radius:9px;
  background:var(--card,Canvas); color:var(--ink,CanvasText);
}
.voice-controls [hidden] { display:none; }
.voice-controls button:disabled { opacity:.65; }
.voice-settings { margin-block:8px; padding:6px; border:1px solid var(--line,currentColor); border-radius:9px; }
.voice-settings small { flex-basis:100%; overflow-wrap:anywhere; }
.voice-status,.voice-partial { font-size:.78rem; overflow-wrap:anywhere; }
.voice-status:empty,.voice-partial:empty { display:none; }
.voice-result {
  position:fixed; z-index:250; inset:auto 12px calc(12px + env(safe-area-inset-bottom));
  width:max-content; max-width:calc(100% - 24px); margin-inline:auto; padding:5px 9px;
  color:var(--ink,CanvasText); background:var(--card,Canvas); border:1px solid var(--line,currentColor);
  border-radius:9px; font-size:.78rem; overflow-wrap:anywhere; pointer-events:none;
}
.voice-listening .voice-answer { border-color:var(--accent,currentColor); font-weight:750; }
.voice-answer::before {
  content:''; display:inline-block; width:.92em; height:1em; margin-inline-end:.4em; vertical-align:-.12em;
  background:currentColor;
  mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 20'%3E%3Crect x='6' y='0' width='6' height='12' rx='3'/%3E%3Cpath d='M3 8v1a6 6 0 0 0 12 0V8M9 15v4m-3 0h6' stroke='black' stroke-width='2' fill='none'/%3E%3C/svg%3E") center/contain no-repeat;
}
.voice-listening .voice-answer::before { background:currentColor; animation:voice-pulse 1s ease-in-out infinite alternate; }
.voice-wave { width:19px; height:16px; color:var(--accent,currentColor); background:repeating-linear-gradient(90deg,currentColor 0 2px,transparent 2px 4px); transform:scaleY(clamp(.18,var(--voice-level,.18),1)); border-radius:45%; }
@keyframes voice-pulse { from { opacity:.45; transform:scale(.82); } to { opacity:1; transform:scale(1.08); } }
@media (prefers-reduced-motion:reduce) {
  .voice-listening .voice-answer::before { animation:none; }
  .voice-wave { transform:none; }
}
