:root{--bg:#f6f5ef;--ink:#23372e;--muted:#7b867e;--green:#194436;--line:#dfE3d9;--gold:#c7b77e;--accent:#c9dda7}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font-family:"Segoe UI",Tahoma,Arial,sans-serif;font-size:15px}button,input,select{font:inherit}button,a,input,select{-webkit-tap-highlight-color:transparent}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.4}button:focus-visible,input:focus-visible,select:focus-visible,a:focus-visible{outline:3px solid #b3a05a;outline-offset:4px}button[hidden],svg[hidden],[hidden]{display:none!important}a{color:inherit;text-decoration:none}.masthead{max-width:1380px;margin:auto;padding:25px 48px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line)}.brand{display:flex;gap:13px;align-items:center;font-size:23px;font-weight:700}.brand-mark{font-size:46px;font-weight:400;color:var(--green);line-height:1}.brand small{font-size:11px;display:block;color:var(--muted);font-weight:400;margin-top:3px;letter-spacing:1px}.header-note{font-size:13px;color:var(--muted);display:flex;align-items:center;gap:9px}.live-dot{width:6px;height:6px;border-radius:50%;background:#89a06a}.help{border:0;background:none;color:var(--ink);font-size:13px}.help span{margin-right:15px}main{max-width:1284px;margin:auto;padding:0 24px 132px}.intro{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:42px 0 36px}.eyebrow{font-size:12px;letter-spacing:1px;color:#82906e;font-weight:600}h1{font-weight:400;font-size:36px;margin:13px 0 10px;line-height:1.5}h1 em{font-style:normal;color:#71805f}.intro p{color:var(--muted);margin:0;font-size:14px}.library-stats{display:flex;gap:32px;align-items:center}.library-stats div{border-right:1px solid var(--line);padding-right:25px;display:flex;flex-direction:column;gap:8px}.library-stats strong{font-size:28px;font-weight:400;font-variant-numeric:tabular-nums}.library-stats span{font-size:11px;color:var(--muted)}.workspace{display:grid;grid-template-columns:300px 1fr;gap:22px}.selection{border:1px solid var(--line);border-radius:17px;padding:25px 24px 19px;display:flex;flex-direction:column;background:#fbfcf7}.section-caption{display:flex;align-items:center;gap:12px}.section-caption>span{font-size:11px;letter-spacing:1px;color:#97a28e;border:1px solid var(--line);width:28px;height:28px;display:grid;place-items:center;border-radius:50%}.section-caption h2{font-size:17px;font-weight:500;margin:0}.selection .section-caption{margin-bottom:27px}.selection>label{font-size:12px;color:#76826f;margin-bottom:9px}.selection select{width:100%;border:1px solid var(--line);border-radius:8px;background:#fff;padding:12px 9px;color:var(--ink);margin-bottom:22px;font-size:15px}.selection #version{font-size:12px}.reader-note{display:flex;gap:12px;border-top:1px solid var(--line);padding-top:15px;color:#89947f;font-size:12px;line-height:1.9}.reader-note>span{font-size:19px;color:#a5b492;padding-top:5px}.reader-note p{margin:0}.selection-bottom{margin-top:auto;padding-top:24px;display:flex;justify-content:space-between;font-size:10px;color:#9ba392}.listening-card{background:var(--green);border-radius:18px;padding:21px 27px 0;color:#eef1e1;position:relative;overflow:hidden;min-height:355px;display:flex;flex-direction:column}.listening-card:after{content:"۞";position:absolute;font-family:serif;font-size:430px;line-height:1;left:-120px;top:-70px;color:#ffffff04;pointer-events:none}.card-top{display:flex;justify-content:space-between;align-items:center;font-size:11px;color:#a7bea8;z-index:1}.card-top i{display:inline-block;width:5px;height:5px;background:#bdcf99;border-radius:50%;margin-left:7px}.card-decoration{font-size:29px;color:#d1c38f}.listening-center{text-align:center;z-index:1;margin-top:12px}.bismillah{font-family:"Traditional Arabic","Times New Roman",serif;font-size:24px;color:#c7c99e;margin:0 0 9px}.listening-center h2{font-family:"Traditional Arabic","Times New Roman",serif;font-size:43px;font-weight:400;margin:0 0 8px;line-height:1.4}.listening-center #now-reader{font-size:13px;margin:0;color:#bdcbb5}.sound-waves{height:26px;display:flex;align-items:center;justify-content:center;gap:4px;margin:17px 0 9px}.sound-waves b{display:block;width:3px;height:8px;border-radius:2px;background:#bbcb96;transform-origin:center}.sound-waves b:nth-child(2n){height:15px}.sound-waves b:nth-child(3n){height:23px}.sound-waves b:nth-child(4n){height:12px}.sound-waves.active b{animation:wave 1s ease-in-out infinite alternate}.sound-waves.active b:nth-child(2n){animation-delay:-.3s}.sound-waves.active b:nth-child(3n){animation-delay:-.6s}@keyframes wave{to{transform:scaleY(.35)}}#part-info{font-size:11px;color:#8fae95;margin:0 0 9px}.status{text-align:center;font-size:11px;line-height:1.8;color:#c3cdb9;margin:0 0 13px;min-height:20px;z-index:1}.status.error{color:#f1c5a4}.card-options{border-top:1px solid #ffffff19;padding:15px 0;display:flex;align-items:center;gap:20px;margin-top:auto;font-size:11px;z-index:1}.card-options label{display:flex;align-items:center;gap:6px;cursor:pointer}.card-options input{accent-color:#c9dda7;width:14px;height:14px}.card-options button{margin-right:auto;border:0;background:none;color:#c6d4b9;font-size:11px;padding:0}.card-options button span{margin-right:6px}.surah-section{margin-top:35px}.surah-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:20px;gap:15px}.section-caption small{font-size:11px;font-weight:400;color:#939c8d;margin-right:10px}.search-wrap{display:flex;align-items:center;gap:10px;background:#fff;border:1px solid var(--line);border-radius:9px;padding:9px 12px;width:290px}.search-wrap>span{font-size:23px;color:#8e9b83;line-height:1}.search-wrap input{min-width:0;width:100%;border:0;outline:none;background:transparent;font-size:12px;color:var(--ink)}.search-wrap kbd{border:1px solid var(--line);padding:0 5px;border-radius:3px;font-size:11px;color:#a5ad9d}.surah-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.surah-card{display:flex;align-items:center;gap:12px;text-align:right;background:#fff;border:1px solid var(--line);padding:16px 13px;border-radius:10px;min-height:82px;color:var(--ink);transition:background .15s,border .15s,transform .15s}.surah-card:hover:not(:disabled){background:#f0f4e8;border-color:#afbf9d;transform:translateY(-2px)}.surah-card.selected{border-color:#68915f;background:#edf3e3}.surah-card:disabled{opacity:.5}.surah-number{width:33px;height:33px;border-radius:9px;background:#f2f4eb;display:grid;place-items:center;font-size:11px;color:#8b997a;flex-shrink:0;font-variant-numeric:tabular-nums}.selected .surah-number{background:#d8e5c2;color:#4d6b38}.surah-copy{display:flex;flex-direction:column;gap:6px}.surah-copy strong{font-size:16px;font-weight:500}.surah-copy small{font-size:10px;color:#98a08f}.surah-action{margin-right:auto;font-size:13px;color:#83986d}.page-footer{display:flex;justify-content:space-between;font-size:10px;color:#99a08f;padding:28px 0}.player{position:fixed;bottom:0;left:0;right:0;background:#fffef9f5;backdrop-filter:blur(20px);border-top:1px solid var(--line);z-index:10}.player-inner{max-width:1284px;margin:auto;min-height:112px;display:grid;grid-template-columns:270px 1fr 190px;gap:40px;align-items:center;padding:14px 24px}.player-track{display:flex;gap:13px;align-items:center;min-width:0}.track-icon{width:49px;height:49px;border-radius:10px;background:#e9eedc;display:grid;place-items:center;font-size:31px;color:#71885c}.player-track>div{display:flex;flex-direction:column;gap:7px;min-width:0}.player-track strong{font-size:14px;font-weight:600}.player-track #track-reader{font-size:11px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:200px}.player-main{display:flex;flex-direction:column;gap:8px}.playback-buttons{display:flex;align-items:center;justify-content:center;gap:22px;direction:ltr}.playback-buttons button{border:0;background:none;color:#829075;font-size:13px;padding:7px}.playback-buttons .play-button{width:41px;height:41px;border-radius:50%;background:var(--green);display:grid;place-items:center;padding:10px;color:#fff}.play-button svg{width:22px;height:22px;fill:currentColor}.timeline{display:flex;align-items:center;gap:12px;direction:ltr}.timeline time{font-size:10px;color:#89947f;font-variant-numeric:tabular-nums;min-width:33px}.timeline input{width:100%;min-width:0}.volume-control{display:flex;align-items:center;gap:10px;direction:ltr;justify-content:flex-end}.volume-control button{border:0;background:none;color:#6d805e;font-size:22px}.volume-control input{width:110px}input[type=range]{accent-color:#6b8755;height:3px;cursor:pointer}#empty{padding:30px;text-align:center;color:var(--muted)}#retry-load{align-self:center;margin-bottom:12px;background:#e2e8d1;border:0;padding:7px 14px;border-radius:7px;color:#17372b}dialog{border:1px solid var(--line);border-radius:18px;padding:38px;max-width:540px;width:calc(100% - 32px);color:var(--ink);background:var(--bg);line-height:1.9}dialog::backdrop{background:#10251ab3;backdrop-filter:blur(4px)}dialog h2{font-size:26px;font-weight:400}dialog p{font-size:14px;color:#6a7868}dialog small{font-size:11px;color:#8b957f}.dialog-close{position:absolute;left:16px;top:10px;border:0;background:none;font-size:26px;color:#7e8a76}@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}@media(min-width:1500px){.intro{padding-top:54px}}@media(max-width:1050px){.surah-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.player-inner{grid-template-columns:220px 1fr 130px;gap:22px}.volume-control input{width:80px}.library-stats{gap:18px}.library-stats div{padding-right:17px}h1{font-size:30px}.masthead{padding:22px 26px}.workspace{grid-template-columns:270px 1fr;gap:16px}.listening-card{padding-right:18px;padding-left:18px}.card-options{gap:12px}}@media(max-width:740px){.masthead{padding:18px 20px}.brand{font-size:20px}.brand-mark{font-size:38px}.header-note{display:none}main{padding:0 18px 155px}.intro{padding:28px 0 26px;display:block}h1{font-size:27px}.eyebrow{font-size:10px}.intro p{font-size:12px}.library-stats{display:none}.workspace{display:flex;flex-direction:column;gap:15px}.selection{display:grid;grid-template-columns:1fr 1fr;gap:8px 12px;padding:18px}.selection .section-caption{grid-column:1/-1;margin:0 0 8px}.selection>label{margin:0;grid-row:2}.selection>label[for=version]{grid-column:2}.selection select{margin:0;font-size:14px;padding:10px 6px;grid-row:3;min-width:0}.selection #version{font-size:10px}.reader-note,.selection-bottom{display:none}.listening-card{min-height:325px;padding:18px 18px 0}.listening-center{margin-top:2px}.listening-center h2{font-size:38px}.bismillah{font-size:22px}.card-options{font-size:10px;gap:12px}.card-options button{font-size:10px}.surah-section{margin-top:26px}.surah-heading{align-items:stretch;flex-direction:column;gap:16px}.search-wrap{width:100%}.surah-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.surah-card{padding:13px 9px;gap:9px;min-height:77px}.surah-copy strong{font-size:15px}.surah-copy small{font-size:9px}.surah-number{width:28px;height:28px;font-size:10px}.surah-action{font-size:11px}.page-footer{display:block;line-height:2.3}.page-footer span{display:block}.player-inner{grid-template-columns:1fr auto;gap:7px 15px;padding:11px 18px 15px;min-height:125px}.player-track{grid-row:1;grid-column:1;gap:10px}.track-icon{width:37px;height:37px;font-size:25px}.player-track strong{font-size:13px}.player-track #track-reader{font-size:10px}.player-main{display:contents}.playback-buttons{grid-row:1;grid-column:2;gap:8px}.playback-buttons .play-button{width:39px;height:39px}.timeline{grid-row:2;grid-column:1/-1;gap:9px;margin-top:4px}.volume-control{display:none}.section-caption h2{font-size:16px}}@media(max-width:365px){.card-options{flex-wrap:wrap;gap:9px}.card-options button{margin-right:0}.surah-card{gap:6px}.surah-action{display:none}h1{font-size:24px}}
.reading-panel{--quran-size:30px;background:#fffef8;border:1px solid var(--line);border-radius:16px;padding:26px 30px;margin:24px 0 36px;color:#23372e}.reading-header{display:flex;justify-content:space-between;align-items:center;gap:18px;flex-wrap:wrap}.reading-header h2{font-size:23px;margin:8px 0}.reading-controls{display:flex;align-items:center;gap:8px}.reading-controls button{border:1px solid #ced6c8;background:transparent;color:inherit;border-radius:8px;min-height:42px;min-width:42px;padding:6px 12px}.reading-controls output{font-size:13px;min-width:24px;text-align:center}.reading-note,.text-credit{font-size:12px;line-height:1.9;opacity:.75}.text-credit a{text-decoration:underline;text-underline-offset:3px}.quran-text{font-family:'Traditional Arabic','Noto Naskh Arabic','Amiri',serif;font-size:var(--quran-size);line-height:2.5;max-height:540px;overflow-y:auto;padding:16px 12px;text-align:justify;scrollbar-width:thin;overscroll-behavior:contain}.quran-verse{white-space:normal}.ayah-number{font-size:.65em;color:#88733c;white-space:nowrap;display:inline-block;margin:0 .18em}.reading-night{background:#182a23;color:#ececda;border-color:#385044}.reading-night .ayah-number{color:#d4c38d}.reading-night .eyebrow{color:#d4c38d}@media(max-width:600px){.reading-panel{padding:20px 14px}.quran-text{max-height:440px;padding:10px 4px;line-height:2.4}.reading-controls{gap:5px}.reading-header h2{font-size:21px}}
.reading-toolbar{display:flex;justify-content:space-between;align-items:center;gap:14px;flex-wrap:wrap;margin:14px 0}.reading-toolbar label{font-size:13px;display:flex;align-items:center;gap:6px}.view-switch{display:flex;border:1px solid #cdd6c7;border-radius:9px;padding:3px;gap:3px}.view-switch button{background:none;border:0;border-radius:6px;padding:9px 15px;color:inherit}.view-switch button[aria-pressed=true]{background:#194436;color:#fff}.quran-text .quran-verse{display:inline;font:inherit;line-height:inherit;color:inherit;background:transparent;border:0;padding:2px 3px;border-radius:7px;text-align:inherit;box-decoration-break:clone;-webkit-box-decoration-break:clone;cursor:pointer}.quran-text .quran-verse:disabled{opacity:1;cursor:text}.quran-text .quran-verse:hover:not(:disabled){background:#e7ebd7}.quran-text .quran-verse.current-ayah{background:#d8e9b8;color:#173b29}.reading-night .quran-text .quran-verse:hover:not(:disabled){background:#344b36}.reading-night .quran-text .quran-verse.current-ayah{background:#405a30;color:#fff5cf}.mushaf-navigation{display:flex;align-items:center;justify-content:center;gap:15px;flex-wrap:wrap;margin:15px 0}.mushaf-navigation button{border:1px solid #cdd6c7;border-radius:8px;background:none;color:inherit;padding:9px 12px;min-height:42px}.mushaf-navigation input{width:72px;border:1px solid #cdd6c7;border-radius:6px;padding:7px;background:transparent;color:inherit;text-align:center}.mushaf-canvas{position:relative;max-width:680px;margin:0 auto;background:#fffdf2;border:1px solid #d7ccb0;border-radius:8px;box-shadow:0 8px 30px #1d382010;overflow:hidden}.mushaf-canvas img{display:block;width:100%;height:auto;min-height:180px;mix-blend-mode:multiply}.mushaf-canvas svg{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;mix-blend-mode:multiply}.mushaf-canvas svg rect{fill:#e2c857;fill-opacity:.35}.page-loading{opacity:.5}.reading-night .mushaf-canvas{background:#eee9d9}.reading-night .view-switch button[aria-pressed=true]{background:#b7cd91;color:#142a21}@media(max-width:600px){.view-switch{width:100%}.view-switch button{flex:1}.mushaf-navigation{gap:7px}.mushaf-navigation button{font-size:12px;padding:8px}.reading-toolbar{margin-top:10px}.mushaf-canvas{border-radius:4px}}
.mushaf-canvas{aspect-ratio:1024/1656}.mushaf-canvas img{position:absolute;inset:0 auto auto 0;min-height:0}.mushaf-canvas svg{inset:0 auto auto 0;height:auto}
/* Quiet, page-first mushaf presentation. */
.reading-panel.mushaf-mode{background:#eeeade;border:1px solid #ded7c3;padding:24px 32px 30px}.mushaf-mode .reading-header{max-width:900px;margin:auto}.mushaf-mode .reading-header h2{font-family:'Traditional Arabic','Noto Naskh Arabic',serif;font-size:32px;color:#254936}.mushaf-mode .reading-toolbar,.mushaf-mode>.reading-note{max-width:900px;margin:16px auto}.mushaf-sheet{position:relative;max-width:780px;margin:24px auto 16px;padding:36px 40px 16px;background:#fffdf3;border:1px solid #b9a367;box-shadow:inset 0 0 0 6px #fffdf3,inset 0 0 0 7px #c6b77e,0 12px 40px #3c392614;border-radius:3px}.mushaf-sheet:before{content:'';position:absolute;inset:12px;border:1px solid #c6b77e;pointer-events:none}.mushaf-sheet .mushaf-canvas{max-width:none;background:transparent;border:0;box-shadow:none;border-radius:0;overflow:hidden}.mushaf-sheet .mushaf-canvas img{mix-blend-mode:multiply}.sheet-corner{position:absolute;top:3px;color:#9a884c;font:32px Georgia,serif;line-height:1;background:#fffdf3;padding:0 5px;z-index:1}.corner-tr{right:1px}.corner-tl{left:1px;transform:scaleX(-1)}.page-ornament{display:flex;align-items:center;justify-content:center;gap:20px;position:relative;z-index:1;color:#8a7944;font-size:14px;margin-top:20px}.page-ornament span:first-child,.page-ornament span:last-child{font-size:22px}.mushaf-mode .mushaf-navigation{margin:18px auto 0}.mushaf-mode .mushaf-navigation button{background:#fffdf4;border-color:#c7bc99;color:#34513e}.mushaf-mode .view-switch{border-color:#c7bc99;background:#f7f3e7}.mushaf-mode .view-switch button[aria-pressed=true]{background:#254936;color:white}.mushaf-mode .text-credit{text-align:center;font-size:11px;margin:16px 0 0}.reading-expanded{position:fixed;inset:12px 12px 110px;margin:0!important;z-index:30;overflow:auto;box-shadow:0 0 0 30px #172b23c9}.reading-expanded .mushaf-sheet{max-width:860px}.reading-night.mushaf-mode{background:#182a23}.reading-night.mushaf-mode .reading-header h2{color:#e4e5c8}.reading-night .mushaf-sheet{background:#f1ebd9}.reading-night .sheet-corner{background:#f1ebd9}.reading-night.mushaf-mode .view-switch{background:#243c2f}.reading-night.mushaf-mode .view-switch button[aria-pressed=true]{background:#b7cd91;color:#172b21}.quran-text{text-align:right;text-align-last:right;word-spacing:normal}.quran-text .quran-verse{display:inline;white-space:normal}.mushaf-mode #mushaf-expand{display:inline-block}@media(max-width:600px){.reading-panel.mushaf-mode{padding:18px 10px 22px}.mushaf-sheet{padding:22px 15px 13px;margin:18px 0 12px}.mushaf-sheet:before{inset:8px}.sheet-corner{font-size:24px}.mushaf-mode .reading-header h2{font-size:28px}.reading-controls{flex-wrap:wrap}.page-ornament{margin-top:12px;gap:12px}.reading-expanded{inset:0 0 95px;border-radius:0}.mushaf-navigation label{font-size:12px}.reading-header{align-items:flex-start}}
/* Fullscreen reading and compact player controls */
.player-inner{grid-template-columns:minmax(130px,190px) minmax(160px,250px) minmax(240px,1fr) minmax(90px,140px);gap:20px}
.player-selectors{display:flex;gap:8px;min-width:0}.player-selectors label{display:flex;flex-direction:column;gap:3px;color:#687969;font-size:10px;min-width:0;flex:1}.player-selectors select{width:100%;min-width:0;background:#f5f7ef;border:1px solid #d9e1d2;border-radius:7px;padding:6px 5px;color:#23372e;font-size:12px}
body.mushaf-fullscreen{overflow:hidden}.reading-panel.mushaf-mode.reading-expanded{position:fixed;inset:0;z-index:30;margin:0!important;padding:0;border:0;border-radius:0;overflow:hidden;background:#14281e;box-shadow:none}
.reading-expanded .reading-header,.reading-expanded .reading-toolbar,.reading-expanded>.reading-note,.reading-expanded .text-credit,.reading-expanded .sheet-corner,.reading-expanded .page-ornament,.reading-expanded .mushaf-sheet:before{display:none}
.reading-expanded #mushaf-view{height:100%;display:grid;place-items:center}.reading-expanded .mushaf-sheet{height:100%;width:min(100vw,calc(100dvh * 1080 / 1714));max-width:none;margin:0;padding:0;background:transparent;box-shadow:none;border:0}.reading-expanded .mushaf-canvas{height:100%;width:100%;max-width:none;margin:0;border:0;border-radius:0;background:transparent}.reading-expanded .mushaf-canvas img{mix-blend-mode:normal}.reading-expanded .mushaf-navigation{position:fixed;top:12px;left:50%;transform:translateX(-50%);z-index:32;margin:0;padding:6px 10px;border-radius:12px;background:#fffef2e8;box-shadow:0 6px 24px #0003;transition:opacity .25s;white-space:nowrap}.fullscreen-exit{position:fixed;z-index:33;top:18px;right:18px;border:1px solid #ffffff55;background:#162c23d9;color:white;border-radius:9px;padding:10px 14px;transition:opacity .25s}.mushaf-fullscreen .player{z-index:40;transition:transform .25s,opacity .25s}.mushaf-fullscreen:not(.controls-visible) .player:not(:focus-within){transform:translateY(110%);opacity:0;pointer-events:none}.mushaf-fullscreen:not(.controls-visible) .mushaf-navigation:not(:focus-within),.mushaf-fullscreen:not(.controls-visible) .fullscreen-exit:not(:focus){opacity:0;pointer-events:none}.mushaf-fullscreen .fullscreen-exit:focus:not(:focus-visible){outline:none}
@media(max-width:740px){.player-inner{grid-template-columns:1fr auto;gap:7px 12px}.player-selectors{grid-column:1/-1;grid-row:2}.player-main{display:contents}.timeline{grid-row:3}.player-inner{min-height:155px}.reading-expanded .mushaf-navigation{top:8px;gap:4px;padding:4px;max-width:calc(100vw - 95px)}.reading-expanded .mushaf-navigation button{font-size:11px;padding:6px;min-height:36px}.reading-expanded .mushaf-navigation input{width:48px;padding:5px}.fullscreen-exit{top:10px;right:8px;padding:8px}.fullscreen-exit span{display:none}}
.reading-expanded .mushaf-canvas{background:#fffdf3}
/* Keep the complete page visible above the player, including on short screens. */
.mushaf-fullscreen{--mushaf-player-height:112px;--mushaf-nav-height:62px}
.reading-panel.mushaf-mode.reading-expanded #mushaf-view{position:absolute;inset:var(--mushaf-nav-height) 0 var(--mushaf-player-height);height:auto;display:flex;align-items:center;justify-content:center;padding:8px 12px}
.reading-panel.mushaf-mode.reading-expanded .mushaf-sheet{width:min(calc(100vw - 24px),calc((100dvh - var(--mushaf-nav-height) - var(--mushaf-player-height) - 16px) * 1080 / 1714));height:auto;max-width:none;max-height:100%;margin:0;padding:0;flex:none}
.reading-panel.mushaf-mode.reading-expanded .mushaf-canvas{width:100%;height:auto;max-height:none;aspect-ratio:1080/1714}
@media(max-width:740px){.mushaf-fullscreen{--mushaf-player-height:155px;--mushaf-nav-height:56px}}
/* Preserve the decorative page frame in expanded reading mode. */
.reading-panel.mushaf-mode.reading-expanded .mushaf-sheet{
  width:min(calc(100vw - 24px),calc((100dvh - var(--mushaf-nav-height) - var(--mushaf-player-height) - 86px) * 1080 / 1714 + 40px));
  height:auto;max-width:none;max-height:none;padding:16px 20px 10px;
  background:#fffdf3;border:1px solid #b9a367;border-radius:3px;
  box-shadow:inset 0 0 0 5px #fffdf3,inset 0 0 0 6px #c6b77e,0 12px 40px #0003;
}
.reading-expanded .mushaf-sheet:before{display:block;inset:9px}
.reading-expanded .sheet-corner{display:block;font-size:21px;top:1px}
.reading-expanded .page-ornament{display:flex;margin-top:4px;gap:12px;font-size:11px;line-height:20px}
.reading-expanded .page-ornament span:first-child,.reading-expanded .page-ornament span:last-child{font-size:15px}
.reading-panel.mushaf-mode.reading-expanded .mushaf-canvas{width:100%;height:auto;background:#fffdf3}
/* Expand the framed page into space released by the hidden controls. */
.mushaf-fullscreen{--reading-top-space:var(--mushaf-nav-height);--reading-bottom-space:var(--mushaf-player-height)}
.mushaf-fullscreen:not(.controls-visible):not(:has(.player:focus-within)):not(:has(.mushaf-navigation:focus-within)){--reading-top-space:0px;--reading-bottom-space:0px}
.reading-panel.mushaf-mode.reading-expanded #mushaf-view{inset:var(--reading-top-space) 0 var(--reading-bottom-space);transition:inset .25s ease}
.reading-panel.mushaf-mode.reading-expanded .mushaf-sheet{width:min(calc(100vw - 24px),calc((100dvh - var(--reading-top-space) - var(--reading-bottom-space) - 86px) * 1080 / 1714 + 40px));transition:width .25s ease}
/* Reclaim the space for each panel independently, while preserving keyboard focus. */
.mushaf-fullscreen:not(.controls-visible):not(:has(.mushaf-navigation:focus-within)){--reading-top-space:0px}
.mushaf-fullscreen:not(.controls-visible):not(:has(.player:focus-within)){--reading-bottom-space:0px}
/* A compact, reading-first application shell. */
:root{--bg:#f3f2eb;--ink:#173e32;--muted:#829187;--green:#123f32;--line:#e4e8df;--gold:#b7a369}
body{background:#f4f3ed;color:#1d3d32;font-family:Tahoma,"Segoe UI",Arial,sans-serif}
.app-header{height:76px;padding:0 5vw;background:#113d31;display:flex;justify-content:space-between;align-items:center;color:#f9f7ed;box-shadow:0 4px 24px #143b2e14;position:relative;z-index:12}
.app-brand{display:flex;align-items:center;gap:12px;font-family:"Traditional Arabic",serif;font-size:23px;font-weight:700;line-height:1}.app-brand small{display:block;font:10px Tahoma,sans-serif;letter-spacing:.02em;color:#b9cab3;margin-top:8px}.brand-emblem{font-size:38px;font-weight:400;color:#d2c293}.header-actions{display:flex;align-items:center;gap:9px}.header-help,.index-toggle{color:#e9eee1;background:#ffffff0c;border:1px solid #ffffff2b;border-radius:11px;min-height:39px;padding:0 13px}.header-help{width:40px;font-size:19px}.index-toggle{display:none}.index-toggle span{font-size:16px;margin-left:5px}
.app-shell{max-width:1480px;margin:auto;padding:22px 32px 145px;display:grid;grid-template-columns:272px minmax(0,1fr);gap:22px;align-items:start}
.surah-section{margin:0;background:#fffefa;border:1px solid #e4e8df;border-radius:18px;box-shadow:0 12px 40px #223d2a08;padding:21px 14px 14px;position:sticky;top:18px;max-height:calc(100dvh - 225px);display:flex;flex-direction:column;min-height:330px}.sidebar-top{display:flex;justify-content:space-between;align-items:center;padding:0 9px 17px}.sidebar-kicker{font-size:10px;letter-spacing:.03em;color:#a39669}.sidebar-top h2{margin:7px 0 0;font-size:19px;color:#244b3b}.sidebar-top small{font-size:10px;font-weight:400;color:#9aa79a;margin-right:7px}.sidebar-mark{font-size:29px;color:#c3b487}.search-wrap{width:100%;padding:8px 10px;border-radius:10px;background:#f5f6f1;border-color:#e8ebe2;margin-bottom:12px}.search-wrap input{font-size:12px}.surah-grid{display:flex;flex-direction:column;gap:3px;overflow:auto;min-height:0;padding:2px 1px 2px 5px;scrollbar-width:thin;scrollbar-color:#d3dfd1 transparent}.surah-card{min-height:58px;border:1px solid transparent;border-radius:10px;padding:8px 10px;background:transparent;gap:10px;transition:background .15s,border .15s}.surah-card:hover:not(:disabled){transform:none;background:#f5f8ef}.surah-card.selected{background:#edf4e8;border-color:#dfead8}.surah-number{width:32px;height:32px;background:#f1f4ed;color:#829375;border-radius:9px}.selected .surah-number{background:#d8e9d1;color:#436c49}.surah-copy{gap:4px}.surah-copy strong{font-size:14px;font-weight:600}.surah-copy small{font-size:10px}.surah-action{font-size:14px;color:#719270}
.reading-panel,.reading-panel.mushaf-mode{margin:0!important;padding:20px 26px 26px;background:#fffefa;border:1px solid #e4e8df;border-radius:18px;min-width:0;box-shadow:0 12px 40px #223d2a08}.reader-head{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:2px 4px 17px;border-bottom:1px solid #edf0e8}.reader-title-group{min-width:0}.section-eyebrow{font-size:10px;color:#aa9a69}.section-eyebrow span{font-size:8px;margin-right:5px}.reader-title-group h1{font-family:"Traditional Arabic",serif;font-weight:700;font-size:27px;line-height:1.2;margin:7px 0 0;color:#194634}.reader-actions{display:flex;align-items:center;gap:8px}.view-switch{padding:3px;background:#f3f5ef;border:1px solid #e5e9df;border-radius:10px}.view-switch button{font-size:12px;padding:8px 14px}.view-switch button[aria-pressed=true],.mushaf-mode .view-switch button[aria-pressed=true]{background:#1e4a39;color:#fff}.icon-action,.reading-settings>summary{min-height:39px;border:1px solid #e2e8dc;background:#fffefa;color:#365b47;border-radius:9px;padding:0 11px;font-size:14px;cursor:pointer;display:flex;align-items:center;justify-content:center;gap:5px}.icon-action span{font-size:11px}.reading-settings{position:relative}.reading-settings>summary{list-style:none;width:40px;font-size:19px}.reading-settings>summary::-webkit-details-marker{display:none}.settings-menu{position:absolute;top:48px;left:0;width:235px;background:#fffefa;border:1px solid #e0e6dc;border-radius:13px;box-shadow:0 18px 45px #193b2e24;z-index:20;padding:14px;display:flex;flex-direction:column;gap:12px;color:#294a3a}.settings-title{font-size:13px;font-weight:700;padding-bottom:9px;border-bottom:1px solid #edf0e8}.settings-menu label{font-size:12px;display:flex;align-items:center;gap:8px}.settings-menu input{accent-color:#275843}.settings-menu button{font-size:12px;border:1px solid #e1e7dc;background:#f8f9f4;color:#325743;border-radius:7px;padding:8px}.font-size-controls{display:flex;align-items:center;gap:8px;font-size:12px}.font-size-controls span{margin-left:auto}.font-size-controls output{min-width:18px;text-align:center}.reading-note{font-size:11px;color:#88968b;margin:9px 4px 0;min-height:16px}.mushaf-mode>.reading-note{max-width:none;margin:9px 4px 0}
.mushaf-navigation,.mushaf-mode .mushaf-navigation{margin:8px auto 0;gap:10px}.mushaf-mode .mushaf-navigation button,.mushaf-navigation button{min-height:37px;border-radius:9px;border:1px solid #e3e9df;background:#f8faf5;color:#57715d;padding:6px 12px;font-size:12px}.mushaf-navigation label{font-size:11px;color:#809185;display:flex;align-items:center;gap:5px}.mushaf-navigation input{font-size:12px;width:50px;border-color:#e3e8dd;background:#fff;padding:6px}.page-total{color:#a7b2a4}.mushaf-sheet{margin:16px auto 12px;max-width:640px;padding:22px 26px 12px;background:#fffdf5;box-shadow:inset 0 0 0 6px #fffdf3,inset 0 0 0 7px #d1c593,0 15px 40px #44482b12}.mushaf-sheet .mushaf-canvas img{mix-blend-mode:multiply}.page-ornament{margin-top:12px}.mushaf-mode .text-credit,.text-credit{text-align:center;font-size:10px;color:#9aa597;margin:9px 0 0}.quran-text{max-height:65vh;padding:32px 6%;line-height:2.6}.reading-night,.reading-panel.mushaf-mode.reading-night{background:#1b3429;border-color:#385044;color:#e6ecdf}.reading-night .reader-head{border-color:#ffffff20}.reading-night .reader-title-group h1{color:#e8efde}.reading-night .view-switch{background:#294438;border-color:#51685c}.reading-night .icon-action,.reading-night .reading-settings>summary{background:#294438;color:#eff2e5;border-color:#51685c}.reading-night .settings-menu{color:#244536}
.status-line{position:fixed;bottom:112px;left:24px;z-index:11;pointer-events:none}.status-line #status{font-size:10px;color:#819285;background:#fffefa;border-radius:6px;padding:4px 7px;margin:0;min-height:0}.status-line #status:empty{display:none}.status-line #status.error{color:#9a3f36;background:#fff2ec}.status-line #retry-load{pointer-events:auto}
.player{background:#fffefbf7;border-top:1px solid #dfe6dc;box-shadow:0 -8px 30px #19382b09}.player-inner{max-width:1480px;min-height:110px;grid-template-columns:minmax(140px,185px) minmax(200px,260px) minmax(240px,1fr) minmax(90px,130px);gap:26px;padding:12px 32px}.track-icon{width:48px;height:48px;background:#ecf3e6;color:#789468}.player-track strong{font-size:13px}.player-selectors label{font-size:10px}.player-selectors select{border-color:#e2e8dc;background:#f7f9f4;padding:8px 7px;font-size:11px}.playback-buttons .play-button{width:43px;height:43px;background:#1a4938}.timeline input{accent-color:#78986f}.volume-control input{width:85px}
/* Preserve the dedicated full-screen reading experience. */
.reading-panel.mushaf-mode.reading-expanded{padding:0;background:#14281e;border:0;border-radius:0}.reading-expanded .reader-head,.reading-expanded>.reading-note{display:none}.mushaf-fullscreen .status-line{display:none}.reading-panel.mushaf-mode.reading-expanded .mushaf-sheet{max-width:none;margin:0;padding:16px 20px 10px}
@media(max-width:1000px){.app-shell{grid-template-columns:235px minmax(0,1fr);gap:15px;padding-inline:20px}.player-inner{grid-template-columns:minmax(120px,145px) minmax(170px,215px) minmax(200px,1fr) 90px;gap:12px;padding-inline:20px}.volume-control input{width:62px}}
@media(max-width:850px){.app-header{height:66px;padding:0 18px}.app-brand{font-size:20px}.brand-emblem{font-size:32px}.index-toggle{display:block}.app-shell{display:block;padding:14px 14px 170px}.surah-section{display:none;position:fixed;z-index:45;top:74px;right:12px;left:12px;max-height:min(70dvh,620px);box-shadow:0 20px 70px #102c21a1}.surah-section.index-open{display:flex}.reading-panel,.reading-panel.mushaf-mode{padding:16px 14px 22px}.reader-head{gap:8px}.reader-title-group h1{font-size:23px}.reader-actions{gap:5px}.view-switch button{font-size:11px;padding:8px 10px}.icon-action{min-width:38px;padding:0 9px}.icon-action span{display:none}.mushaf-sheet{margin:14px auto 8px;padding:20px 15px 10px}.player-inner{grid-template-columns:1fr auto;gap:6px 10px;padding:10px 14px 12px;min-height:145px}.player-track{grid-row:1;grid-column:1}.playback-buttons{grid-row:1;grid-column:2}.player-selectors{grid-row:2;grid-column:1/-1}.timeline{grid-row:3;grid-column:1/-1;margin-top:0}.volume-control{display:none}.status-line{bottom:146px;left:14px}.reading-panel.mushaf-mode.reading-expanded{padding:0}.reading-panel.mushaf-mode.reading-expanded .mushaf-sheet{padding:16px 20px 10px}.mushaf-fullscreen .player-inner{min-height:145px}}
@media(max-width:380px){.section-eyebrow{display:none}.reader-title-group h1{font-size:20px}.reader-actions{gap:3px}.view-switch button{padding-inline:7px}.app-brand small{display:none}.app-shell{padding-inline:8px}.icon-action{min-width:34px}.reading-settings>summary{width:35px}}
.mushaf-mode .font-size-controls{display:none}
/* Playback visibility is controlled explicitly, not by pointer movement. */
.player{transition:transform .25s ease,opacity .25s ease}
body.player-hidden .player{transform:translateY(115%);opacity:0;pointer-events:none}
body.player-hidden .status-line{display:none}
body.mushaf-fullscreen.player-hidden{--reading-bottom-space:0px}
.show-player{position:fixed;z-index:55;bottom:16px;left:18px;border:1px solid #b7cdb8;border-radius:12px;background:#fdfef7;color:#1d5039;box-shadow:0 8px 26px #102f2550;padding:10px 13px;cursor:pointer;font-size:13px}.show-player span{margin-right:4px}.hide-player{position:absolute;z-index:2;top:-17px;left:20px;width:34px;height:24px;border:1px solid #dbe5d8;border-radius:9px 9px 0 0;background:#fffefa;color:#38634a;line-height:1;cursor:pointer;font-size:19px}
.page-audio{display:flex;align-items:center;justify-content:center;gap:7px}.page-audio label{font-size:11px;white-space:nowrap;color:#627767}.page-audio select{max-width:240px;min-width:150px;border:1px solid #dfe7dd;background:#fffefa;color:#254a37;border-radius:8px;padding:8px;font-size:12px}.mushaf-navigation .page-audio button{border-color:#1e4a39;background:#1e4a39;color:#fff;white-space:nowrap}.mushaf-navigation #page-audio-status{width:100%;margin:0;text-align:center;font-size:11px;color:#a33728}
.reading-expanded .mushaf-navigation{width:max-content;max-width:min(760px,calc(100vw - 120px));white-space:normal;flex-wrap:wrap}
@media(max-width:740px){.show-player{bottom:12px;left:12px}.reading-expanded .mushaf-navigation{max-width:calc(100vw - 80px)}.page-audio select{min-width:120px;max-width:180px}.page-audio label{font-size:10px}}
/* Long-press selection and actions on the original page image. */
.mushaf-canvas img{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;-webkit-user-drag:none;touch-action:pan-y pinch-zoom}
.mushaf-canvas svg rect.verse-selected{fill:#95b45f;fill-opacity:.32;stroke:#4e7c42;stroke-width:3}
.verse-action{position:absolute;z-index:6;bottom:12px;left:50%;transform:translateX(-50%);width:max-content;max-width:calc(100% - 24px);display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:10px 11px;background:#fffef9f7;color:#1b4432;border:1px solid #d7dfce;border-radius:12px;box-shadow:0 8px 30px #17372c40;font:12px Tahoma,sans-serif}.verse-action>div{display:flex;flex-direction:column;gap:4px;min-width:0}.verse-action>div span{font-size:10px;color:#809184}.verse-action button{border:0;border-radius:8px;cursor:pointer;min-height:36px;padding:7px 10px}.verse-action #verse-action-play{background:#1d4b39;color:#fff;white-space:nowrap}.verse-action #verse-action-close{background:#f1f4ec;color:#42614e}.verse-action p{width:100%;font-size:11px;color:#a33728;margin:0}.reading-expanded .verse-action{bottom:8px}@media(max-width:480px){.verse-action{gap:6px;padding:7px;max-width:calc(100% - 10px)}.verse-action #verse-action-play{font-size:11px}.verse-action>div{font-size:11px}}
/* Match the normal playback highlight and keep verse actions in view. */
.mushaf-canvas svg rect.verse-selected{fill:#e2c857;fill-opacity:.35;stroke:none}
.verse-action{position:fixed;z-index:100;top:max(12px,env(safe-area-inset-top));bottom:auto;max-width:calc(100vw - 24px)}
.verse-action[hidden]{display:none}

body.mushaf-fullscreen.player-hidden{--reading-top-space:0px;--reading-bottom-space:0px}
body.mushaf-fullscreen.player-hidden .mushaf-navigation,body.mushaf-fullscreen.player-hidden .fullscreen-exit{opacity:0;pointer-events:none}
#tafsir-dialog{padding:0;width:min(780px,calc(100vw - 24px));max-height:90dvh;border:1px solid #d5dfcd;border-radius:18px;background:#fffef7;color:#234434;box-shadow:0 20px 100px #071b1670;overflow:auto}#tafsir-dialog::backdrop{background:#102c23b0;backdrop-filter:blur(4px)}.tafsir-head{position:sticky;top:0;z-index:1;display:flex;align-items:center;justify-content:space-between;padding:20px 25px;background:#fffef7;border-bottom:1px solid #e5eadf}.tafsir-head small{color:#8b9a76;font-size:11px}.tafsir-head h2{font-size:21px;margin:6px 0 0}.tafsir-head button{border:1px solid #dce5d4;background:#f1f5ea;border-radius:10px;width:38px;height:38px;color:#31553d;cursor:pointer}.tafsir-tools{display:flex;gap:12px;align-items:center;padding:18px 25px 0;font-size:12px}.tafsir-tools select{min-width:170px;padding:9px;border:1px solid #d4dfcb;background:#f7f9f2;color:#244b37;border-radius:9px}#tafsir-verse{margin:20px 25px;padding:18px;border-right:3px solid #ad9b5c;background:#f3f0df;font-family:'Traditional Arabic',serif;font-size:26px;line-height:1.8}#tafsir-range{color:#809071;font-size:12px;margin:0 25px}#tafsir-range:empty,#tafsir-message:empty{display:none}#tafsir-body{white-space:pre-wrap;overflow-wrap:anywhere;font-family:Tahoma,Arial,sans-serif;font-size:17px;line-height:2.1;padding:20px 25px 30px}#tafsir-message{margin:20px 25px}#tafsir-retry{margin:0 25px 25px;padding:9px 14px;background:#244c39;color:white;border:0;border-radius:8px}#verse-action-tafsir{background:#eaf0dc;color:#244c37}@media(max-width:600px){.tafsir-head{padding:14px 17px}#tafsir-body{font-size:16px;padding:17px}#tafsir-verse{margin:17px;font-size:23px}}
