:root { color-scheme: light; --reader-green: #163f36; --reader-muted: #63716c; --reader-line: #e2e7df; --reader-font: 30px; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 28px; }
body { margin: 0; padding-bottom: 160px; background: #f7f8f4; color: #292e2b; font-family: Tahoma, Arial, sans-serif; line-height: 1.8; }
a { color: var(--reader-green); text-underline-offset: 4px; }
button, select { font: inherit; color: inherit; }
button, select, summary { cursor: pointer; }
button, select { min-height: 44px; }
button:disabled, select:disabled { cursor: default; opacity: .6; }
button:focus-visible, select:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid #ab791f; outline-offset: 4px; }
.reader-skip { position: absolute; top: -70px; right: 20px; background: white; padding: 10px 20px; z-index: 10; }
.reader-skip:focus { top: 10px; }
.reader-nav { background: var(--reader-green); color: #fff; }
.reader-nav > div { max-width: 1180px; margin: auto; padding: 20px 28px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.reader-nav a { color: #fff; text-decoration: none; font-size: 14px; }
.reader-nav .reader-brand { font-size: 23px; font-weight: 700; }
.reader-brand span { font-size: 14px; font-weight: 400; color: #d6e2dc; border-inline-start: 1px solid #79938a; margin-inline-start: 12px; padding-inline-start: 12px; }
.reader-layout { max-width: 1180px; padding: 36px 28px; margin: auto; display: grid; grid-template-columns: 240px minmax(0, 1fr); align-items: start; gap: 32px; }
.reader-tools { position: sticky; top: 28px; min-width: 0; font-size: 14px; }
.reader-eyebrow { margin: 0 0 12px; color: #517162; font-size: 13px; font-weight: 700; }
label { display: block; margin-bottom: 7px; font-size: 13px; color: #53665c; }
select { width: 100%; min-width: 0; max-width: 100%; background: #fff; border: 1px solid #bfcdbf; border-radius: 10px; padding: 10px; }
.reader-font-tools { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin: 22px 0; }
.reader-font-tools > span { margin-inline-end: auto; }
.reader-font-tools button { border: 1px solid var(--reader-line); background: white; border-radius: 8px; min-width: 44px; font-size: 18px; }
.reader-font-tools output { min-width: 24px; text-align: center; color: var(--reader-muted); font-size: 12px; }
.reader-secondary { background: #fff; border: 1px solid #c2cfc3; border-radius: 10px; padding: 10px 14px; font-size: 13px; color: var(--reader-green); }
.reader-tools > button { display: block; width: 100%; margin: 10px 0; }
.reader-help { font-size: 13px; color: var(--reader-muted); margin: 10px 0; line-height: 1.7; overflow-wrap: anywhere; }
.reader-tools details { margin: 20px 0; border-top: 1px solid var(--reader-line); padding-top: 12px; overflow-wrap: anywhere; }
.reader-tools summary { padding: 10px 0; color: var(--reader-green); }
.reader-tools details p { font-size: 12px; line-height: 1.9; }
.reader-top { font-size: 12px; }
.reader-paper { background: #fff; border: 1px solid var(--reader-line); border-radius: 18px; padding: 38px 44px; min-width: 0; }
.reader-heading { text-align: center; border-bottom: 1px solid #e8eae5; padding: 0 0 28px; }
.reader-heading h1 { font-family: "Traditional Arabic", "Noto Naskh Arabic", "Times New Roman", serif; font-size: 39px; line-height: 1.7; font-weight: 400; margin: 0 0 14px; }
.reader-language { color: #587264; font-size: 12px; margin: 10px 0; }
.reader-language span[aria-hidden] { padding: 0 12px; }
.reader-pair { padding: 30px 0 24px; border-bottom: 1px solid #edf0ea; scroll-margin-bottom: 170px; }
.reader-pair:last-child { border-bottom: 0; }
.reader-ar { font-family: "Traditional Arabic", "Noto Naskh Arabic", "Times New Roman", serif; font-size: var(--reader-font); font-weight: 400; line-height: 2.2; text-align: center; white-space: pre-line; overflow-wrap: break-word; margin: 0 0 24px; }
.reader-en { font-family: Arial, sans-serif; font-size: calc(var(--reader-font) * .64); line-height: 1.8; text-align: left; white-space: pre-line; overflow-wrap: break-word; margin: 0 0 16px; color: #464b47; }
.reader-mark { display: block; margin-inline-start: auto; border: 0; background: transparent; color: #718078; font-size: 11px; padding: 6px 10px; min-width: 64px; }
.reader-mark[aria-pressed="true"] { background: #eaf2e9; color: #204e3d; border-radius: 8px; }
.reader-notice { background: #f3f3e9; color: #67582c; border-radius: 9px; padding: 10px 14px; font-size: 13px; }
.reader-empty { color: #667169; padding: 28px 0; text-align: center; font-size: 17px; line-height: 2; }
.reader-player { position: fixed; bottom: 0; inset-inline: 0; z-index: 5; background: #fff; border-top: 1px solid #d9e1d7; padding: 15px 24px max(15px, env(safe-area-inset-bottom)); box-shadow: 0 -8px 26px #17352608; }
.reader-player-inner { max-width: 1080px; margin: auto; display: grid; grid-template-columns: 240px minmax(0, 1fr) auto; align-items: center; gap: 24px; }
.reader-track, .reader-audio-wrap { min-width: 0; }
.reader-track select { font-size: 13px; }
.reader-track label { margin-bottom: 3px; }
.reader-audio-wrap audio { width: 100%; height: 44px; display: block; }
.reader-audio-wrap .reader-help { margin: 3px 0; font-size: 11px; }
@media (max-width: 800px) {
  body { background: #fff; padding-bottom: 200px; }
  .reader-nav > div { padding: 16px 18px; }
  .reader-nav .reader-brand { font-size: 18px; }
  .reader-brand span { font-size: 12px; margin-inline-start: 7px; padding-inline-start: 7px; }
  .reader-nav a { font-size: 12px; }
  .reader-layout { display: block; padding: 20px 20px 32px; }
  .reader-tools { position: static; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 8px 18px; border-bottom: 1px solid var(--reader-line); padding-bottom: 18px; }
  .reader-tools > .reader-eyebrow { grid-column: 1 / -1; margin-bottom: 0; }
  .reader-tools > label { grid-column: 1 / -1; margin: 0; }
  .reader-font-tools { margin: 0; gap: 4px; }
  .reader-font-tools > span { display: none; }
  .reader-font-tools button { flex: 1; }
  .reader-tools > button { margin: 3px 0; }
  .reader-tools > .reader-help { grid-column: 1 / -1; margin: 0; }
  .reader-tools details { grid-column: 1 / -1; margin: 0; border: 0; padding: 0; }
  .reader-top { display: none; }
  .reader-paper { padding: 28px 0 0; border: 0; border-radius: 0; }
  .reader-heading { padding-bottom: 16px; }
  .reader-heading h1 { font-size: 35px; }
  .reader-pair { padding: 26px 0 20px; }
  .reader-ar { line-height: 2.15; }
  .reader-en { line-height: 1.8; }
  .reader-player { padding: 10px 16px max(10px, env(safe-area-inset-bottom)); }
  .reader-player-inner { grid-template-columns: minmax(0, 1fr) auto; gap: 7px 12px; }
  .reader-audio-wrap { grid-column: 1 / -1; grid-row: 2; }
  .reader-track { display: flex; align-items: center; gap: 8px; }
  .reader-track label { margin: 0; white-space: nowrap; }
  .reader-track select { min-height: 42px; padding: 7px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
