/* Compact article action and nonmodal player. Existing Pflegerio controls supply button skins. */
.rio-read-aloud { display:inline-flex; margin:0 0 16px; }
.rio-read-aloud[hidden],.rio-read-aloud-panel[hidden],
.rio-read-aloud-panel [hidden],.rio-read-aloud-launch [hidden] { display:none!important; }
.rio-read-aloud-launch { min-width:44px; min-height:44px; cursor:pointer; }
.rio-read-aloud-launch>[data-rio-read-headphones] { display:inline-flex; align-items:center; justify-content:center; }
.rio-read-aloud-launch:focus-visible { outline:2px solid var(--rio-focus,var(--rio-ink,#0c0c35)); outline-offset:3px; }
.rio-read-aloud-equalizer { display:inline-flex; align-items:center; justify-content:center; gap:2px; width:20px; height:20px; }
.rio-read-aloud-equalizer>i { display:block; width:3px; height:16px; background:currentColor; transform:scaleY(.35); }
.rio-read-aloud-equalizer>i:nth-child(2) { height:20px; }
.rio-read-aloud-equalizer>i:nth-child(3) { height:18px; }
.rio-read-aloud-equalizer>i:nth-child(4) { height:12px; }
.rio-read-aloud-launch[data-rio-read-state="playing"] .rio-read-aloud-equalizer>i { animation:rio-read-aloud-bars .85s ease-in-out infinite alternate; }
.rio-read-aloud-launch[data-rio-read-state="playing"] .rio-read-aloud-equalizer>i:nth-child(2) { animation-delay:-.32s; animation-duration:.7s; }
.rio-read-aloud-launch[data-rio-read-state="playing"] .rio-read-aloud-equalizer>i:nth-child(3) { animation-delay:-.56s; animation-duration:1.05s; }
.rio-read-aloud-launch[data-rio-read-state="playing"] .rio-read-aloud-equalizer>i:nth-child(4) { animation-delay:-.18s; animation-duration:.65s; }
@keyframes rio-read-aloud-bars { from { transform:scaleY(.25); } to { transform:scaleY(1); } }
.rio-read-aloud-panel {
    position:fixed; inset:auto; z-index:100000; box-sizing:border-box;
    width:min(360px,calc(100vw - 24px)); max-height:calc(100dvh - 24px);
    margin:0; padding:0; overflow:auto; overscroll-behavior:contain;
    border:1px solid var(--rio-line,#dce2e7); border-radius:0;
    background:var(--rio-paper,#fff); color:var(--rio-ink,#0c0c35);
    box-shadow:0 6px 24px rgb(24 40 59 / 16%);
    font:400 13px/1.5 var(--rio-font,system-ui,sans-serif); text-transform:none;
}
.rio-read-aloud-panel::backdrop { background:transparent; pointer-events:none; }
.rio-read-aloud-bar { display:grid; grid-template-columns:44px 44px auto minmax(32px,1fr) 44px; align-items:center; gap:4px; padding:4px; min-width:0; }
.rio-read-aloud-elapsed { min-width:38px; padding-inline:3px; font-size:12px; font-weight:400; font-variant-numeric:tabular-nums; white-space:nowrap; }
.rio-read-aloud-progress { appearance:none; display:block; box-sizing:border-box; width:100%; min-width:0; height:4px; margin:0; padding:0; border:0; border-radius:0; overflow:hidden; background:var(--rio-line,#dce2e7); color:var(--rio-accent,#8cf431); accent-color:var(--rio-accent,#8cf431); }
.rio-read-aloud-progress::-webkit-progress-bar { background:var(--rio-line,#dce2e7); }
.rio-read-aloud-progress::-webkit-progress-value { background:var(--rio-accent,#8cf431); }
.rio-read-aloud-progress::-moz-progress-bar { background:var(--rio-accent,#8cf431); }
.rio-read-aloud-message,.rio-read-aloud-options { padding:12px; border-top:1px solid var(--rio-line,#dce2e7); font-size:13px; font-weight:400; overflow-wrap:anywhere; }
.rio-read-aloud-fields { display:grid; grid-template-columns:minmax(0,2fr) minmax(84px,1fr); gap:10px; min-width:0; }
.rio-read-aloud-fields>label { display:grid; align-content:start; gap:5px; min-width:0; margin:0; font-size:12px; font-weight:500; }
.rio-read-aloud-fields select { width:100%; max-width:100%; min-width:0; min-height:44px; }
.rio-read-aloud-panel .rio-read-aloud-hint { margin:10px 0 0; font-size:12px; font-weight:400; line-height:1.5; }
.rio-read-aloud-fallback { display:inline-block; font:400 20px/1 system-ui,sans-serif; }
@media(prefers-reduced-motion:reduce) {
    .rio-read-aloud-launch[data-rio-read-state="playing"] .rio-read-aloud-equalizer>i { animation:none; transform:scaleY(.7); }
}
@media(forced-colors:active) {
    .rio-read-aloud-panel { border-color:CanvasText; background:Canvas; color:CanvasText; box-shadow:none; }
    .rio-read-aloud-equalizer>i { background:CanvasText; }
}
@media print { .rio-read-aloud,.rio-read-aloud-launch,.rio-read-aloud-panel { display:none!important; } }
