/* Additive voice controls only. Existing app palette, typography and routes stay intact. */

.bb-voice-toggle,.bb-voice-listen,.bb-voice-stop,.bb-voice-pause{font:inherit;font-size:14px;line-height:1.5;min-height:44px;padding:8px 12px;border:1px solid currentColor;border-radius:10px;color:var(--m,#7a1f2b);background:var(--card,#fffaf1);cursor:pointer}

.bb-voice-article-controls{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin:10px 0}
.bb-voice-article-status{font-size:13px;line-height:1.6;flex:1 1 150px}
.bb-voice-post-entry{display:flex;flex-direction:column;gap:6px;min-width:0}
.bb-voice-post-entry>.gl-volume-card{flex:1}
.bb-voice-post-entry>.bb-voice-listen{align-self:flex-end}
.bb-voice-dialog{width:min(760px,calc(100vw - 24px));max-height:90dvh;padding:18px;border:1px solid var(--m,#7a1f2b);border-radius:14px;background:var(--card,#fffaf1);color:var(--text,#3b2b24);font:inherit;box-sizing:border-box;overflow:auto}
.bb-voice-dialog::backdrop{background:rgb(0 0 0/.45)}
.bb-voice-dialog h2{font:inherit;font-weight:700;font-size:22px;line-height:1.6;margin:10px 0}
.bb-voice-dialog>iframe{display:block;width:100%;height:55dvh;border:0;background:#fffaf1}
.bb-voice-dialog .bb-voice-close{font:inherit;min-height:44px;padding:8px 14px;color:inherit;background:transparent;border:1px solid currentColor;border-radius:10px;cursor:pointer}
.bb-voice-dialog .bb-voice-loading{line-height:1.8}
.bb-voice-dialog a{color:var(--m,#7a1f2b);text-decoration:underline}
.bb-voice-toggle:focus-visible,.bb-voice-listen:focus-visible,.bb-voice-stop:focus-visible,.bb-voice-pause:focus-visible,.bb-voice-close:focus-visible{outline:3px solid currentColor;outline-offset:3px}
[data-bb-voice-control][hidden]{display:none!important}
@media(max-width:440px){.bb-voice-dialog{padding:12px}.bb-voice-dialog h2{font-size:19px}}








/* Reading panel only: compact header and independently scrolling, text-only article. */
.bb-voice-dialog[open]{display:flex;flex-direction:column;width:min(760px,calc(100vw - 16px));height:min(94dvh,1000px);max-height:94dvh;padding:12px;overflow:hidden;gap:7px}
.bb-voice-dialog .bb-voice-close{align-self:flex-start;flex:none;font-size:14px;min-height:44px;padding:6px 12px}
.bb-voice-dialog h2{font-size:17px;line-height:1.55;margin:0;max-height:4.65em;overflow:auto;flex:none;overflow-wrap:normal;word-break:normal}
.bb-voice-dialog>.bb-voice-reading{flex:1 1 auto;min-height:0;overflow:auto;overscroll-behavior:contain;padding:12px 10px;scroll-padding:24px;box-sizing:border-box;background:#fffaf1;border:1px solid #decba9;border-radius:10px;color:#382a23;font-family:inherit;font-size:18px;line-height:1.9;word-break:normal;overflow-wrap:break-word}
.bb-voice-reading p{font:inherit;line-height:1.9;margin:0 0 15px;white-space:pre-wrap}
.bb-voice-reading .bb-voice-book-name{font-size:clamp(18px,6.2vw,30px);font-weight:700;line-height:1.55;white-space:nowrap;color:#741f29;margin:8px 0 12px;text-align:center;letter-spacing:normal}
.bb-voice-reading .bb-voice-subtitle{font-size:20px;font-weight:700;line-height:1.6;color:#741f29;margin:14px 0 8px;word-break:normal}
.bb-voice-read-current{background:#f8e4b4;color:#382014;border-radius:4px;box-decoration-break:clone;-webkit-box-decoration-break:clone;text-decoration:underline;text-decoration-color:#a2631f;text-underline-offset:4px}
.bb-voice-dialog>div{flex:none}
.bb-voice-dialog .bb-voice-article-controls{margin:0;gap:6px}
.bb-voice-dialog .bb-voice-article-status{flex-basis:100%;font-size:12px;line-height:1.4}
.bb-voice-dialog .bb-voice-follow{font:inherit;font-size:12px;min-height:44px;padding:6px 10px;color:#741f29;background:#fffaf1;border:1px solid #decba9;border-radius:8px;margin-top:5px;cursor:pointer}
.bb-voice-dialog>a,.bb-voice-dialog>p{font-size:12px;margin:0;flex:none}
@media(max-width:360px){.bb-voice-dialog[open]{padding:9px;gap:5px}.bb-voice-dialog h2{font-size:16px}.bb-voice-dialog>.bb-voice-reading{padding:10px 8px;font-size:17px}.bb-voice-reading .bb-voice-subtitle{font-size:18px}}

/* One compact global switch; no settings panel and no document-flow space. */
#bbVoiceToggle{position:fixed;left:max(12px,calc((100vw - 520px)/2 + 12px));bottom:calc(86px + env(safe-area-inset-bottom,0px));z-index:20;display:grid;place-items:center;width:40px;height:40px;min-width:40px;min-height:40px;max-width:40px;padding:0;margin:0;border:1px solid #d8c6af;border-radius:50%;background:#fffaf1;color:#7a1f2b;box-shadow:0 2px 7px #3b2b241a;font-size:0;line-height:1;cursor:pointer;touch-action:manipulation}
#bbVoiceToggle svg{display:block;width:21px;height:21px;pointer-events:none}
#bbVoiceToggle[aria-pressed="false"]{color:#827469;background:#f5f0e8}
#bbVoiceToggle:disabled{opacity:.5;cursor:default}
#bbVoiceToggle:focus-visible{outline:3px solid #7a1f2b;outline-offset:3px}
