/* Compact iOS-inspired controls shared by chat, community and recording preview. */
html body.mm-app[data-mm-theme] .media-audio-player.pb-voice,html body .media-audio-player.pb-voice{
 --voice-accent:#6150c6;--voice-muted:var(--ios-muted,#767184);--voice-ink:var(--ios-ink,#29263a);--voice-surface:var(--ios-surface,#f4f1ff);
 display:grid;grid-template-columns:44px minmax(64px,1fr) 44px;align-items:center;gap:8px;
 width:310px;min-width:0;max-width:100%;padding:3px 0;box-sizing:border-box;color:var(--voice-ink);background:transparent;
 font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}
html body.mm-app[data-mm-theme=dark] .media-audio-player.pb-voice,html body[data-mm-theme=dark] .media-audio-player.pb-voice{--voice-accent:#b7a7f7;--voice-muted:var(--mm-muted,#b3aec6);--voice-ink:var(--mm-text,#f2efff);--voice-surface:var(--mm-soft,#302b46)}
html body.mm-app[data-mm-theme] .media-audio-player.pb-voice[data-listened=true],html body .media-audio-player.pb-voice[data-listened=true]{--voice-accent:#087df1}
html body.mm-app[data-mm-theme=dark] .media-audio-player.pb-voice[data-listened=true],html body[data-mm-theme=dark] .media-audio-player.pb-voice[data-listened=true]{--voice-accent:#4ca6ff}
html body.mm-app[data-mm-theme] .media-audio-player.pb-voice.pb-voice-downloadable,html body .media-audio-player.pb-voice.pb-voice-downloadable{grid-template-columns:44px minmax(48px,1fr) 44px 44px;gap:4px}
html body .media-audio-player.pb-voice .media-audio-play,html body .media-audio-player.pb-voice .media-audio-speed,html body .media-audio-player.pb-voice .pb-voice-download{display:grid;place-items:center;position:relative;min-width:44px;width:44px;height:44px;min-height:44px;padding:0;border:0;margin:0;touch-action:manipulation;cursor:pointer;box-sizing:border-box;flex-shrink:0}
html body .media-audio-player.pb-voice .media-audio-play{background:linear-gradient(145deg,color-mix(in srgb,var(--voice-accent) 15%,transparent),color-mix(in srgb,var(--voice-accent) 7%,transparent));border:1px solid color-mix(in srgb,var(--voice-accent) 18%,transparent);border-radius:50%;color:var(--voice-accent);box-shadow:inset 0 1px 0 #ffffff80,0 2px 5px #38286809}
html body .media-audio-player.pb-voice .pb-voice-play-glyph{display:grid;place-items:center}
html body .media-audio-player.pb-voice .pb-voice-play-glyph>svg{width:21px;height:21px;stroke-width:1;fill:currentColor;margin-left:2px}
html body .media-audio-player.pb-voice[data-state=playing] .pb-voice-play-glyph>svg,html body .media-audio-player.pb-voice[data-state=buffering] .pb-voice-play-glyph>svg{stroke-width:3.5;fill:none;margin-left:0}
html body .media-audio-player.pb-voice .pb-voice-mic{position:absolute;right:-2px;bottom:-2px;display:grid;place-items:center;width:16px;height:18px;border:2px solid var(--voice-surface);border-radius:9px;background:var(--voice-surface);color:var(--voice-accent);box-sizing:content-box;pointer-events:none}
html body .media-audio-player.pb-voice .pb-voice-mic>svg{width:12px;height:15px;stroke-width:2;fill:none}
html body .media-audio-player.pb-voice .media-audio-speed{background:none;color:var(--voice-accent);font-size:14px;font-weight:650;border-radius:14px;font-variant-numeric:tabular-nums}
html body .media-audio-player.pb-voice .media-audio-speed::before{content:"";position:absolute;inset:10px 1px;border:1px solid color-mix(in srgb,var(--voice-accent) 9%,transparent);border-radius:11px;background:color-mix(in srgb,var(--voice-accent) 6%,transparent);pointer-events:none}
html body .media-audio-player.pb-voice .pb-voice-download{background:none;color:var(--voice-muted);border-radius:12px}
html body .media-audio-player.pb-voice .pb-voice-download svg{width:18px;height:18px}
html body .media-audio-player.pb-voice .pb-voice-track{min-width:0;position:relative;align-self:center;height:54px}
html body .pb-voice-track>svg{display:block;width:100%;height:36px;overflow:visible}
.pb-voice-trace{fill:none;stroke:var(--voice-accent);stroke-opacity:.36;stroke-width:2.8;stroke-linecap:round;stroke-linejoin:round}
html body .pb-voice[data-listened=true] .pb-voice-trace{stroke-opacity:.66}
.pb-voice-played,html body .pb-voice[data-listened=true] .pb-voice-played{stroke-opacity:1}
.pb-voice-head{fill:var(--voice-accent);stroke:var(--voice-accent);stroke-width:1}
html body .media-audio-player.pb-voice input.pb-voice-seek[type=range]{position:absolute;inset:0;width:100%;min-width:0;height:44px;margin:0;padding:0;border:0;opacity:0;cursor:pointer;touch-action:pan-y}
html body .media-audio-player.pb-voice .media-audio-time{display:flex;justify-content:space-between;gap:8px;color:var(--voice-muted);font-size:12px;line-height:18px;font-variant-numeric:tabular-nums;white-space:nowrap}
html body .media-audio-player.pb-voice .pb-voice-status{grid-column:1/-1;color:var(--voice-muted);font-size:12px;line-height:1.5;overflow-wrap:anywhere;padding:0 2px}
html body .media-audio-player.pb-voice [hidden]{display:none!important}
html body .media-audio-player.pb-voice button:focus-visible,html body .pb-voice-track:has(input:focus-visible){outline:2px solid var(--voice-accent);outline-offset:3px;border-radius:12px}
html body .media-audio-player.pb-voice button:disabled{opacity:.5;cursor:wait}
html body .media-audio-player.pb-voice:is([data-state=loading],[data-state=buffering]) .media-audio-play::after{content:"";position:absolute;inset:3px;border-radius:50%;border:1.5px solid transparent;border-top-color:var(--voice-accent);animation:pb-voice-loading .9s linear infinite}
html body .media-audio-player.pb-voice[data-state=loading] .pb-voice-play-glyph{opacity:.35}
html body.mm-app .chat-media-slot:has(.pb-voice){min-width:0}
html body.mm-app #messages>article.pb-voice-message{min-height:0}
html body.mm-app #messages>article.pb-voice-message>.chat-media-slot{margin:3px 0 2px}
html body.mm-community #messages>article[data-chat-message]:has(.pb-voice){width:340px;min-width:0;max-width:calc(100% - 16px)}
html body.mm-community #messages>article>.chat-media-slot:has(.pb-voice){width:calc(100% - 24px)}
html body #media-preview .pb-voice{width:100%}
@keyframes pb-voice-loading{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){html body .media-audio-player.pb-voice:is([data-state=loading],[data-state=buffering]) .media-audio-play::after{animation:none}}
@media(prefers-contrast:more){html body .media-audio-player.pb-voice .pb-voice-trace{stroke-opacity:.8}html body .media-audio-player.pb-voice .media-audio-play{border-color:var(--voice-accent)}}
@media(forced-colors:active){html body .media-audio-player.pb-voice button{border:1px solid ButtonText}.pb-voice-trace{stroke:CanvasText}.pb-voice-head{fill:Highlight;stroke:Highlight}.pb-voice-played{stroke:Highlight}}

/* Keep every control on the same row, including under app theme overrides. */
html body.mm-app[data-mm-theme] .media-audio-player.pb-voice .media-audio-play,html body .media-audio-player.pb-voice .media-audio-play{grid-column:1;grid-row:1;align-self:center}
html body.mm-app[data-mm-theme] .media-audio-player.pb-voice .pb-voice-track,html body .media-audio-player.pb-voice .pb-voice-track{grid-column:2;grid-row:1}
html body.mm-app[data-mm-theme] .media-audio-player.pb-voice .media-audio-speed,html body .media-audio-player.pb-voice .media-audio-speed{grid-column:3;grid-row:1;align-self:center}
html body.mm-app[data-mm-theme] .media-audio-player.pb-voice .pb-voice-download,html body .media-audio-player.pb-voice .pb-voice-download{grid-column:4;grid-row:1;align-self:center}
html body.mm-app[data-mm-theme] .media-audio-player.pb-voice .pb-voice-status,html body .media-audio-player.pb-voice .pb-voice-status{grid-column:1/-1;grid-row:2}
html body .media-audio-player.pb-voice .pb-voice-transcription{grid-column:1/-1;grid-row:2;min-width:0;padding:0 2px}
html body .media-audio-player.pb-voice.pb-voice-transcribable .pb-voice-status{grid-row:3}
html body .media-audio-player.pb-voice .pb-voice-transcribe{display:inline-flex;align-items:center;min-height:44px;padding:8px 12px;margin:0;border:0;border-radius:12px;background:color-mix(in srgb,var(--voice-accent) 8%,transparent);color:var(--voice-accent);font-size:14px;font-weight:600;line-height:1.4;touch-action:manipulation;cursor:pointer}
html body .media-audio-player.pb-voice .pb-voice-transcript{margin:8px 0 6px;padding:10px 12px;border-left:2px solid var(--voice-accent);border-radius:0 12px 12px 0;background:color-mix(in srgb,var(--voice-accent) 6%,transparent);color:var(--voice-ink);font-size:16px;line-height:1.55;white-space:pre-wrap;overflow-wrap:anywhere;user-select:text}
html body .media-audio-player.pb-voice .pb-voice-transcript-status{display:block;margin:6px 0;color:var(--voice-muted);font-size:14px;line-height:1.5;overflow-wrap:anywhere}
html body.mm-app[data-mm-theme] .media-audio-player.pb-voice .media-audio-play:hover,html body .media-audio-player.pb-voice .media-audio-play:hover{background:color-mix(in srgb,var(--voice-accent) 18%,transparent)}
html body.mm-app[data-mm-theme] .media-audio-player.pb-voice .media-audio-play:active,html body .media-audio-player.pb-voice .media-audio-play:active{transform:scale(.96)}
html body.mm-app[data-mm-theme] .media-audio-player.pb-voice .pb-voice-download:hover,html body .media-audio-player.pb-voice .pb-voice-download:hover{background:color-mix(in srgb,var(--voice-accent) 8%,transparent);color:var(--voice-accent)}
