/* Read Aloud button (read-aloud.js): a calm pill with the speaker icon; tap again to stop. */
.ra-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 6px 14px; border: 1.5px solid var(--edge-purple, #d6d2ff); border-radius: var(--radius-pill, 999px); background: var(--primary-soft, #eeedff); color: var(--link-strong, #3d2dc4); font: inherit; font-family: var(--font, inherit); font-size: var(--fs-sm, 14px); font-weight: 700; line-height: 1; cursor: pointer; vertical-align: middle; transition: background .15s, border-color .15s, color .15s; -webkit-tap-highlight-color: transparent; }
.ra-btn:hover { border-color: var(--primary, #5140e6); }
.ra-btn:focus-visible { outline: 3px solid var(--focus, #5140e6); outline-offset: 2px; }
.ra-btn.ra-sm { min-height: 36px; padding: 4px 12px; }
.ra-btn.ra-icon-only { width: 44px; height: 44px; padding: 0; justify-content: center; }
.ra-ico { width: 20px; height: 20px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ra-off { display: none; fill: currentColor; stroke: none; }
.ra-btn.is-playing { background: var(--primary, #5140e6); border-color: var(--primary, #5140e6); color: #fff; }
.ra-btn.is-playing .ra-on { display: none; }
.ra-btn.is-playing .ra-off { display: block; }
.ra-btn.is-playing::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; animation: ra-pulse 1s ease-in-out infinite; }
@keyframes ra-pulse { 50% { opacity: .25; transform: scale(.6); } }
@media (prefers-reduced-motion: reduce) { .ra-btn.is-playing::after { animation: none; } }
/* Speaker icons point the same way in Arabic and English (like the system's). */
[dir="rtl"] .ra-ico { transform: none; }
/* Read aloud switched off in voice settings. */
[data-voice-off] .ra-btn { display: none !important; }
.ra-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0; }
/* In the how-to-play dialog (tutorial.js): the bubble keeps its width; the button drops below it on phones. */
.tu-guide:has(.ra-btn) { flex-wrap: wrap; }
.tu-guide:has(.ra-btn) .tu-bubble { flex: 1 1 170px; min-width: 0; }
.tu-guide .ra-btn { margin-inline-start: auto; }
