/* Reader-only parity styles. Shared shell, settings and tasbih are not changed. */
body.reader-page{background:#f9fafb}
.reader-page .app{padding-top:70px;padding-bottom:0}
.reader-page .hdr{position:fixed;inset:0 0 auto;height:70px;min-height:70px;padding:12px 16px;z-index:65;background:rgba(255,255,255,.96);backdrop-filter:blur(12px);border-bottom:1px solid #f3f4f6;gap:4px}
.reader-page .hdr>.ib:first-child{display:flex!important;margin-right:auto;width:38px;height:38px;color:#4b5563}
.reader-page .hdr h1{position:absolute;left:50%;transform:translateX(-50%);margin:0;text-align:center;pointer-events:none}
.reader-page .rd-title{pointer-events:auto;cursor:pointer}
.reader-page .hdr .rd-name{font-size:18px;line-height:25px;font-weight:700;max-width:65vw;display:flex;gap:8px;align-items:center}
.reader-page .rd-name b{font-size:16px;font-weight:400!important}
.reader-page .hdr .rd-sub{font-size:10px;line-height:15px;letter-spacing:1px;font-weight:500}
.reader-page .hdr .rd-btn{width:36px;height:36px;color:#4b5563;border-radius:12px;flex:none}
.reader-page .hdr .rd-btn:hover{background:#ecfdf5;color:#059669}
.reader-page .hdr>.sp{display:none}
.reader-page .main{display:block;padding:14px 16px 24px!important;max-width:none}
.reader-page .bbox{margin:0 0 24px;border:1px solid #d1fae580;border-radius:24px;padding:28px 0;background:linear-gradient(#ecfdf599,transparent);font-size:30px;line-height:36px;color:#065f46}
.reader-page #ayList:not(.mushaf-mode){display:block}
.reader-page #ayList:not(.mushaf-mode) .ay{position:relative;background:transparent;border:0;border-bottom:1px solid #f3f4f6;border-radius:0;padding:0 2px 24px;margin:0 0 8px;box-shadow:none;scroll-margin-top:90px;transition:background .2s}
.reader-page .ah{margin:0 0 20px;min-height:42px;gap:12px}
.reader-page .ah-l{gap:10px}
.reader-page .nc{width:36px;height:36px;border:1px solid #e5e7eb;border-radius:12px;background:#f9fafb;color:#4b5563;box-shadow:0 1px 2px #00000008;font-size:12px;font-weight:700;display:grid;place-items:center}
.reader-page .jh{font-size:10px;color:#9ca3af;line-height:15px;font-weight:400}
.reader-page .tb{margin-left:auto;padding:2px 4px;gap:0;background:#f3f4f6;border:1px solid #e5e7eb66;border-radius:16px}
.reader-page .tb button{width:36px;height:36px;border-radius:12px;background:transparent;color:#6b7280;display:grid;place-items:center}
.reader-page .tb .pb{background:transparent;color:#4b5563}
.reader-page .tb button:hover{background:#e5e7eb}
.reader-page .tb .bm.on{background:#fef3c7;color:#d97706}
.reader-page #ayList:not(.mushaf-mode) .qtext{padding:0 4px;margin:0 0 20px;line-height:2.4;letter-spacing:.75px;color:#111827;word-break:normal;overflow-wrap:anywhere;text-align:right}
.reader-page .qlatin{margin:0 0 8px;padding-left:4px;font-size:14px;font-style:normal;line-height:1.625;font-weight:500;color:#047857}
.reader-page .qtrans{margin:0;padding-left:4px;font-size:14px;line-height:1.625;font-weight:400;color:#374151}
.reader-page #ayList:not(.mushaf-mode) .ay.pl{background:#ecfdf5;border:1px solid #a7f3d0;border-radius:16px;padding:20px 16px 24px;margin-left:-14px;margin-right:-14px;box-shadow:0 1px 2px #0002}
.reader-page .ay.pl .nc,.reader-page .ay.pl .pb{background:#059669;color:white;border-color:#059669}
.reader-page .ay.inloop{box-shadow:inset 3px 0 #10b981!important}
.reader-page .ay.hl{background:#d1fae5!important;border-radius:16px!important}
.reader-page #ayList.mushaf-mode{padding:28px 32px;border:1px solid #f3f4f6;border-radius:24px;background:white;box-shadow:0 1px 2px #0001;line-height:2.8}
.reader-page #ayList.mushaf-mode .qtext{letter-spacing:.75px;border-radius:5px}
.reader-page #ayList.mushaf-mode .qtext:after{content:' ۝' attr(data-ayah) ' ';display:inline;font-family:'Amiri',serif;font-size:12px;border:1px solid #6ee7b7;border-radius:99px;background:#ecfdf5;color:#059669;padding:1px 6px;vertical-align:middle;white-space:nowrap}
.reader-page #ayList.mushaf-mode .qtext.active-ayah{background:#d1fae5;outline:1px solid #6ee7b7}
.reader-page .rd-nav{position:static;left:auto;right:auto;bottom:auto;width:auto;max-width:none;transform:none;border:0;background:transparent;margin:32px 0 0;padding:12px 0;gap:12px;display:flex}
.reader-page .rd-nav-btn{min-width:0;min-height:48px;border:1px solid #e5e7eb;border-radius:16px;background:transparent;font-size:14px;font-weight:700;color:#4b5563}
.reader-page .rd-nav-btn.next{background:#059669;border-color:#059669;color:white;box-shadow:0 3px 6px #05966922}
.reader-page .rd-nav-play{min-height:48px;border:1px solid #a7f3d0;background:#ecfdf5;color:#047857;border-radius:16px;font-size:14px;font-weight:700;padding:12px 20px}
.reader-page .bnav{display:none!important}
.reader-page .qbar:not(.drag){position:fixed;left:50%;right:auto;top:auto;bottom:24px;transform:translateX(-50%);width:min(576px,calc(100vw - 32px));max-width:none}
.reader-page .qbar{background:#10131c;border:1px solid #374151;border-radius:18px;padding:14px 16px;color:white;box-shadow:0 16px 36px #0004;z-index:75;transition:width .2s}
.reader-page .qbar-r1{gap:8px;margin:0 0 8px;padding-bottom:8px;border-bottom:1px solid #ffffff1a;min-height:30px}
.reader-page .qbar-title{font-size:14px;max-width:190px}
.reader-page .qbar-pill{font-size:10px;padding:3px 6px;background:#064e3b;color:#6ee7b7;border:1px solid #065f46}
.reader-page .qbar-count{font-size:10px;color:#9ca3af;white-space:nowrap}
.reader-page .qbb{color:#9ca3af;background:transparent;width:22px;height:24px;display:grid;place-items:center}
.reader-page .qbb-vol{padding:5px;border:1px solid #065f46;border-radius:8px;background:#064e3b66;color:#34d399;width:28px;height:28px;cursor:pointer}
.reader-page .qbar-r2{gap:6px;min-height:40px}
.reader-page .qbb-chip{background:#37415188;border:1px solid #4b556366;border-radius:6px;padding:5px 7px;font-size:12px;display:flex;gap:4px;align-items:center;white-space:nowrap}
.reader-page .qbar-play{width:40px;height:40px;background:#10b981;box-shadow:0 4px 12px #10b98133}
.reader-page .qbb-skip{width:32px;height:36px;color:#9ca3af}
.reader-page .qbar-reset{border:0;background:transparent;color:#9ca3af;font-size:10px;cursor:pointer;white-space:nowrap;padding:8px 4px;margin-left:auto}
.reader-page .qbar.min:not(.drag){width:min(360px,calc(100vw - 32px));padding:10px 14px}
.reader-page .qbar.min .qbar-play.sm{width:36px;height:36px}
.reader-page .qbar.min .qbar-title{max-width:130px}
.reader-page .qbar-timer{font-size:11px}
.reader-page #modal.show:not(.reader-settings){align-items:center;justify-content:center;padding:24px 12px;background:#0009;backdrop-filter:blur(4px)}
.reader-page #modal .mbox{max-height:85dvh;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#059669 transparent;border-radius:24px;box-shadow:0 25px 50px #0003}
.reader-page #modal .grab{display:none}
.reader-page .ayah-dialog{width:460px;max-width:100%;padding:0!important}
.reader-page .ayah-dialog>.mh{position:sticky;top:0;z-index:2;margin:0;padding:14px 20px;background:var(--card);border-bottom:1px solid #f3f4f6}
.reader-page .ayah-dialog .ays-num{width:32px;height:32px;border-radius:12px;font-size:12px}
.reader-page .ayah-dialog .mh h2{font-size:16px!important;line-height:24px}
.reader-page .ayah-dialog .ays-ayah{margin:12px 20px 8px;padding:16px;border:1px solid #f3f4f6;border-radius:16px;background:#f9fafb;text-align:left}
.reader-page .ays-arab{font-family:'Amiri',serif;font-size:24px;line-height:1.8;text-align:right;direction:rtl;margin:0 0 8px}
.reader-page .ayah-dialog .ays-latin-big{font-size:12px;line-height:18px;font-weight:500;color:#047857;letter-spacing:0}
.reader-page .ayah-dialog .ays-latin-ph{font-size:12px;line-height:20px;font-style:normal;margin:8px 0 0;color:#6b7280}
.reader-page .ayah-dialog .ays-list{margin:8px 20px 20px;gap:0}
.reader-page .ayah-dialog .ays-row{padding:12px;min-height:70px;gap:12px}
.reader-page .ayah-dialog .ays-ic{width:40px;height:40px;border-radius:12px}
.reader-page .ayah-dialog .ays-tx b{font-size:14px;line-height:20px}
.reader-page .ayah-dialog .ays-tx small{font-size:10px;line-height:15px}
.reader-page .jump-dialog{max-width:380px!important}
.reader-page .jump-input-wrap{display:flex;align-items:center;border:2px solid #10b981;border-radius:16px;background:var(--bg);margin-top:6px}
.reader-page .jump-input-wrap .jump-number{border:0;background:transparent;margin:0;box-shadow:none;min-width:0;flex:1;width:0;padding:10px 0;text-align:center;font-size:22px}
.reader-page .jump-input-wrap button{width:44px;height:48px;flex:none;border:0;background:transparent;color:#6b7280}
[data-theme=dark] .reader-page{background:#111827}
[data-theme=dark] .reader-page .hdr{background:#111827f5;border-color:#1f2937}
[data-theme=dark] .reader-page .rd-btn,[data-theme=dark] .reader-page .hdr>.ib:first-child{color:#9ca3af}
[data-theme=dark] .reader-page .bbox{background:linear-gradient(#064e3b55,transparent);border-color:#065f4655;color:#6ee7b7}
[data-theme=dark] .reader-page #ayList:not(.mushaf-mode) .ay{border-bottom-color:#1f2937}
[data-theme=dark] .reader-page .nc,[data-theme=dark] .reader-page .tb{background:#1f2937;border-color:#374151;color:#d1d5db}
[data-theme=dark] .reader-page .tb button{color:#9ca3af}
[data-theme=dark] .reader-page .qtext{color:#f9fafb!important}
[data-theme=dark] .reader-page .qlatin{color:#34d399}
[data-theme=dark] .reader-page .qtrans{color:#d1d5db}
[data-theme=dark] .reader-page #ayList.mushaf-mode{background:#1f2937;border-color:#374151}
[data-theme=dark] .reader-page #ayList:not(.mushaf-mode) .ay.pl,[data-theme=dark] .reader-page .ay.hl{background:#064e3b88!important;border-color:#065f46}
[data-theme=dark] .reader-page .ayah-dialog .ays-ayah{background:#111827;border-color:#374151}
[data-theme=dark] .reader-page .ayah-dialog>.mh{border-color:#374151}
[data-theme=dark] .reader-page .rd-nav-play{background:#064e3b66;color:#6ee7b7;border-color:#065f46}
[data-theme=dark] .reader-page .rd-nav-btn:not(.next){border-color:#374151;color:#d1d5db}
@media(min-width:1024px){.reader-page .main{padding:14px 24px 24px!important}.reader-page .sidebar{z-index:50}.reader-page .hdr h1{flex:none!important}.reader-page .qbar:not(.drag){left:50%}}
.reader-page .qbar.drag{max-width:calc(100vw - 8px)}
@media(max-width:639px){.reader-page .main{padding-top:6px!important;}.reader-page .hdr{padding:10px 12px;gap:0}.reader-page .hdr h1{left:48px;right:126px;transform:none;text-align:left}.reader-page .rd-title{align-items:flex-start;padding:0}.reader-page .hdr .rd-name{font-size:16px;gap:4px;max-width:100%}.reader-page .rd-name b{font-size:12px}.reader-page .hdr .rd-sub{font-size:8px;letter-spacing:.5px}.reader-page .hdr .rd-btn{width:34px;height:36px}.reader-page .qlatin{font-size:12px}.reader-page .qtrans{font-size:14px}.reader-page .rd-nav{gap:8px;flex-wrap:wrap}.reader-page .rd-nav-play{order:-1;width:100%;font-size:12px}.reader-page .rd-nav-btn{font-size:12px}.reader-page .qbar{padding:12px}.reader-page .qbar-r2{gap:4px}.reader-page .qbb-chip{font-size:10px;padding:5px}.reader-page .qbar-reset{font-size:9px;padding:6px 0}.reader-page .qbb-skip{width:24px}.reader-page .qbar-play{width:36px;height:36px}.reader-page .qbar-title{font-size:12px}.reader-page .qbar-count{font-size:9px}.reader-page #ayList.mushaf-mode{padding:24px 20px}.reader-page #modal.show:not(.reader-settings){align-items:flex-end;padding:0}.reader-page #modal .mbox{width:100%;max-width:100%!important;max-height:90dvh;border-radius:24px 24px 0 0;padding-bottom:calc(24px + env(safe-area-inset-bottom,0px))!important}.reader-page #modal .grab{display:block}.reader-page .ayah-dialog>.mh{padding-top:12px}.reader-page .ayah-dialog>.grab{margin:12px auto 0}}
@media(prefers-reduced-motion:reduce){.reader-page *{scroll-behavior:auto!important}}

/* Foreground-only tajwid coloring, as on the reference reader. */
.reader-page .qtext [data-tajweed]{background:transparent}
.reader-page #modal:not(.reader-settings) .ayah-dialog{width:460px;max-width:460px}
.reader-page #modal .ayah-dialog>.mh{margin-bottom:0}
.reader-page #modal:not(.reader-settings) .quote-dialog{width:512px;max-width:512px;padding:24px;border-radius:24px}
.reader-page #modal .quote-dialog .mh{gap:10px;margin-bottom:14px;padding-bottom:14px;border-bottom:1px solid var(--line)}
.reader-page .quote-dialog .mh h2{flex:1;margin:0}
.reader-page .quote-theme-row{display:flex;align-items:center;justify-content:space-between;margin-bottom:20px;font-size:12px;color:var(--sub)}
.reader-page .quote-themes{display:flex;gap:8px}
.reader-page .quote-themes button{height:28px;width:28px;border-radius:99px;border:2px solid transparent;cursor:pointer}
.reader-page .quote-themes button[aria-pressed=true]{outline:2px solid #10b981;outline-offset:2px;border-color:var(--card)}
.reader-page .quote-preview{--quote-from:#022c22;--quote-to:#020617;--quote-accent:#6ee7b7;padding:24px;border-radius:24px;color:#f8fafc;border:1px solid #065f46;box-shadow:0 12px 14px #0002;background:repeating-linear-gradient(45deg,transparent 0 29px,#ffffff03 30px 31px,transparent 32px 60px),repeating-linear-gradient(-45deg,transparent 0 29px,#ffffff03 30px 31px,transparent 32px 60px),linear-gradient(135deg,var(--quote-from),var(--quote-to));overflow-wrap:anywhere}
.reader-page .quote-top{display:flex;align-items:center;justify-content:space-between;gap:10px;color:var(--quote-accent);font-size:12px;line-height:18px}
.reader-page .quote-top b{display:flex;align-items:center;gap:6px;font-weight:600}
.reader-page .quote-top>span{font-family:'Amiri',serif;direction:rtl;font-size:12px;white-space:nowrap}
.reader-page .quote-arab{font-family:'Amiri',serif;font-size:30px;line-height:1.8;margin:20px 0 18px;text-align:right;direction:rtl;color:#f8fafc}
.reader-page .quote-trans{border-top:1px solid #ffffff20;margin:0;padding-top:14px;font-style:italic;font-size:14px;line-height:1.65;color:#e2e8f0}
.reader-page .quote-bottom{display:flex;align-items:center;justify-content:space-between;border-top:1px solid #ffffff10;padding-top:14px;margin-top:16px;color:#94a3b8;font-size:10px;line-height:16px}
.reader-page .quote-actions{display:flex;gap:8px;margin-top:24px}
.reader-page .quote-actions button{display:flex;justify-content:center;align-items:center;gap:6px;flex:1;min-height:38px;border:0;border-radius:12px;background:#f3f4f6;font:600 12px 'Plus Jakarta Sans',sans-serif;color:#374151;cursor:pointer;padding:8px}
.reader-page .quote-actions .quote-download{background:#059669;color:white}
.reader-page .quote-actions .quote-share{background:#d1fae5;color:#047857;flex:0 0 38px}
.reader-page .quote-status{font-size:11px;color:var(--sub);line-height:1.6;margin:8px 0 0;min-height:0}
.reader-page .quote-status:empty{display:none}
[data-theme=dark] .reader-page .quote-actions button:not(.quote-download):not(.quote-share){background:#374151;color:#e5e7eb}
@media(max-width:639px){.reader-page #modal:not(.reader-settings) .quote-dialog{padding:16px;border-radius:24px 24px 0 0}.reader-page #modal .quote-dialog>.grab{display:block}.reader-page .quote-preview{padding:20px}.reader-page .quote-top{font-size:10px}.reader-page .quote-arab{font-size:28px}.reader-page .quote-actions button{font-size:11px}.reader-page .quote-top>span{max-width:90px;white-space:normal;text-align:right}}

.reader-page button.qbar-title{background:transparent;border:0;padding:0;color:white;font-family:inherit;text-align:left;cursor:pointer}

/* Player parity: layout observed on Qari, scoped to the surah reader only. */
.reader-page .qbar{box-sizing:border-box;background:rgba(3,7,18,.95);border:1px solid #ffffff33;border-radius:16px;padding:12px 16px;color:#fff;box-shadow:0 16px 45px #0009,0 0 0 1px #10b98133;backdrop-filter:blur(40px);user-select:none}
[data-theme=dark] .reader-page .qbar{background:rgba(3,7,18,.95);border-color:#ffffff33}
.reader-page .qbar:not(.drag){width:min(94%,576px);bottom:24px}
.reader-page .qbar-r1{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:28px;margin:0 0 8px;padding-bottom:8px;border-bottom:1px solid #ffffff1a}
.reader-page .qbar-info{display:flex;align-items:center;gap:8px;min-width:0}
.reader-page .qbar-window-controls{display:flex;align-items:center;gap:4px;flex:none}
.reader-page .qbar-track,.reader-page .qbar-track-min{display:flex;align-items:center;gap:6px;min-width:0;background:transparent;border:0;padding:0;color:white;font-family:inherit;cursor:pointer;text-align:left}
.reader-page .qbar-title{font-size:14px;font-weight:700;min-width:0;max-width:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.reader-page .qbar-pill{font-size:10px;line-height:15px;padding:2px 6px;background:#10b98133;color:#6ee7b7;border:1px solid #10b9814d;border-radius:999px;flex:none}
.reader-page .qbar-count{font-size:10px;line-height:15px;color:#9ca3af;flex:none}
.reader-page .qbb{width:24px;height:24px;border:0;padding:4px;border-radius:8px;background:transparent;color:#9ca3af;display:grid;place-items:center;flex:none}
.reader-page .qbar-grip{width:26px;height:26px;color:#34d399cc;touch-action:none}
.reader-page .qbb-vol{width:28px;height:28px;border:1px solid #34d39966;padding:0;border-radius:8px;background:#10b98133;color:#34d399}
.reader-page .qbar-r2{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:40px}
.reader-page .qbar-options{display:flex;align-items:center;gap:6px;flex:none}
.reader-page .qbb-chip{font-family:inherit;font-size:12px;line-height:16px;font-weight:700;padding:4px 8px;border:1px solid #ffffff1a;border-radius:8px;background:#ffffff1a;color:#d1d5db;gap:4px;min-height:26px;cursor:pointer}
.reader-page .qbar-transport{display:flex;align-items:center;gap:8px;flex:none}
.reader-page .qbb-skip{display:grid;place-items:center;width:33px;height:33px;padding:8px;border:0;border-radius:8px;color:#d1d5db;background:transparent;cursor:pointer}
.reader-page .qbb-skip:disabled{opacity:.3;cursor:default}
.reader-page .qbar-play{width:40px;height:40px;padding:0;margin:0 2px;background:#10b981;border-radius:50%;box-shadow:0 10px 15px -3px #10b98166;display:grid;place-items:center}
.reader-page .qbar-play:hover{background:#34d399;transform:none}
.reader-page .qbar-reset{font-family:inherit;font-size:10px;line-height:15px;font-weight:400;color:#9ca3af;padding:4px 6px;margin:0;border:0;background:transparent;border-radius:4px;flex:none}
.reader-page .qbar.min:not(.drag){width:max-content;max-width:94%;padding:12px 16px}
.reader-page .qbar-min{gap:8px;padding-right:4px}
.reader-page .qbar.min .qbar-play.sm{height:32px;width:32px;margin:0;box-shadow:0 4px 6px #10b98166}
.reader-page .qbar.min .qbar-title{max-width:100px;font-size:12px;line-height:16px}
.reader-page .qbar-track-min{padding:0 4px}
.reader-page .qbar-timer{display:inline-block;min-width:0;width:auto;height:auto;font-size:10px;font-weight:700;line-height:15px;padding:2px 6px;border:1px solid #34d39966;border-radius:999px;background:#10b98140;color:#6ee7b7}
.reader-page .qbar.min .qbb:not(.qbar-grip){width:28px;height:28px;padding:6px}
.reader-page .qbar.min .qbar-grip{width:24px;height:24px;color:#9ca3af}
.reader-page .qbar button:focus-visible{outline:2px solid #6ee7b7;outline-offset:2px}
@media(max-width:1023px){.reader-page .qbar:not(.drag){bottom:calc(80px + env(safe-area-inset-bottom,0px))}}
@media(max-width:639px){
 .reader-page .qbar,.reader-page .qbar.min:not(.drag){padding:10px}
 .reader-page .qbar-count,.reader-page .qbar-reset,.reader-page .qbar-range span{display:none}
 .reader-page .qbar-title{font-size:12px;line-height:16px}
 .reader-page .qbar-r2{min-height:36px;gap:8px}
 .reader-page .qbar-transport{gap:6px}
 .reader-page .qbar-play{height:36px;width:36px}
 .reader-page .qbb-skip{width:29px;height:29px;padding:6px}
 .reader-page .qbb-chip{font-size:10px;line-height:15px;min-height:25px}
 .reader-page .qbar.min .qbar-title{max-width:100px}
}
