/* SiswaCap: Suara (butang bacakan halaman, bar kawalan, sorotan bahagian yang sedang dibaca) */
#sayBtn + #themeBtn { margin-left: 8px; }
#sayBtn.on { background: var(--brand); border-color: var(--brand); color: var(--brand-ink, #fff); }
.tts-now { background: color-mix(in srgb, var(--gold) 18%, transparent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--gold) 18%, transparent); border-radius: 6px; transition: background .2s, box-shadow .2s; }
.say-bar {
  position: fixed; z-index: 70; left: 50%; transform: translateX(-50%); bottom: calc(var(--tab-h) + 12px + env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: 4px; padding: 6px; border-radius: 999px; max-width: calc(100% - 24px);
  background: var(--surface); border: 1px solid var(--border); box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .35); animation: sayIn .2s ease-out;
}
@media (min-width: 900px) { .say-bar { bottom: 24px; } }
.say-bar.hidden { display: none; }
.say-c, .say-rate { border: 0; background: none; color: var(--text); cursor: pointer; height: 40px; min-width: 40px; border-radius: 999px; display: grid; place-items: center; font: inherit; font-weight: 700; font-size: .84rem; }
.say-c:hover, .say-rate:hover { background: var(--surface-2); }
.say-c .ic { width: 18px; height: 18px; }
.say-c.main { background: var(--brand); color: var(--brand-ink, #fff); }
.say-c.main .ic { width: 16px; height: 16px; }
.say-txt { font-size: .82rem; font-weight: 600; color: var(--muted); padding: 0 6px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.say-rate { padding: 0 8px; font-variant-numeric: tabular-nums; }
body.saying .toast { bottom: calc(var(--tab-h) + 76px + env(safe-area-inset-bottom)); }
@media (prefers-reduced-motion: reduce) { .tts-now { transition: none; } .say-bar { animation: none; } }
@keyframes sayIn { from { opacity: 0; transform: translate(-50%, 6px); } }

/* Tetapan suara */
footer .link-btn[data-say-settings] { padding: 0; font-size: inherit; text-decoration: underline; color: inherit; }
.say-dlg { width: min(520px, calc(100% - 24px)); max-height: calc(100dvh - 32px); overflow: auto; }
.say-dlg h2 { margin-bottom: 4px; }
.say-langs { display: flex; flex-direction: column; gap: 10px; margin: 14px 0; }
.say-lang { border: 1px solid var(--border); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.say-lh { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.say-lh b { font-size: 1rem; }
.say-pill { font-size: .74rem; font-weight: 650; padding: 3px 9px; border-radius: 99px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.say-pill.ok { color: color-mix(in srgb, var(--up) 80%, var(--text)); background: color-mix(in srgb, var(--up) 13%, var(--surface)); }
.say-pill.mid { color: var(--muted); background: var(--surface-2); }
.say-pill.no { color: color-mix(in srgb, var(--down) 85%, var(--text)); background: color-mix(in srgb, var(--down) 12%, var(--surface)); }
.say-lr { display: flex; align-items: center; gap: 8px; }
.say-lr select, .say-lr > span { flex: 1; min-width: 0; }
.say-lr .btn { flex: none; gap: 5px; }
.say-lr .btn .ic { width: 13px; height: 13px; }
.say-hd { display: grid; gap: 8px; padding: 12px; margin-bottom: 12px; border: 1px solid var(--border); border-radius: 12px; }
.say-hd p { margin: 2px 0 0; }
.say-hd-row { display: flex; gap: 8px; flex-wrap: wrap; }
.say-rate-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; font-weight: 600; font-size: .9rem; }
.say-rate-row span { margin-right: 4px; }
.say-help { border-top: 1px solid var(--border); padding: 12px 0; margin-bottom: 8px; }
.say-help summary { cursor: pointer; font-weight: 650; }
.say-help p { margin: 8px 0; color: var(--muted); line-height: 1.55; }
