#quran {--teal:#14474e;--paper:#ebe7db;--row:#f6f4ef;--muted:#587373;position:fixed;inset:0;z-index:60;display:flex;flex-direction:column;max-width:none;width:100%;margin:0;padding:0;background:var(--paper);color:#181916;isolation:isolate;font-family:Arabic,sans-serif}
#quran[hidden],#quran [hidden] {display:none!important}
body:has(#quran:not([hidden])) {overflow:hidden}
#quran * {box-sizing:border-box}
#quran button,#quran a {touch-action:manipulation}
#quran button:focus-visible,#quran a:focus-visible,#quran input:focus-visible,#quran select:focus-visible {outline:2px solid #b16b25;outline-offset:-2px}
#quran button {font:inherit;cursor:pointer}
#quran button:disabled {opacity:.38;cursor:default}
.qr-bar {display:flex;flex:none;align-items:center;justify-content:space-between;gap:.5rem;background:var(--teal);color:white;padding:calc(.45rem + env(safe-area-inset-top)) max(.65rem,calc((100vw - 49rem)/2)) .45rem;min-height:3.15rem}
.qr-bar h1 {font:500 1.15rem/1.6 Arabic,sans-serif;margin:0;color:white}
.qr-bar a,.qr-bar button {color:inherit;text-decoration:none}
#qIndexBar {display:grid;grid-template-columns:1fr auto 1fr}
#qIndexBar>a {font-size:.83rem}
.qr-site-back[dir="ltr"] .icon {transform:scaleX(-1)}
#qReadBar .qr-reader-context {display:grid;justify-items:start;min-width:0}
.qr-reader-context .qr-site-back {display:inline-flex;align-items:center;gap:.4rem;min-height:44px;font-size:.95rem;line-height:1.2}
.qr-reader-context #qReturn {font-size:.82rem;line-height:1.3;overflow-wrap:anywhere}
#qReadBar>div,.qr-comment-tools>div,.qr-option-head,.qr-font {display:flex;align-items:center}
#qReturn {font-size:1rem;display:flex;align-items:center;gap:.4rem}
#quran .qr-icon {display:inline-flex;align-items:center;justify-content:center;background:none;border:0;color:inherit;width:2.65rem;height:2.65rem;padding:.45rem;border-radius:0}
#quran .icon {width:1.27rem;height:1.27rem;flex:none}
#quran [aria-pressed="true"].qr-icon .icon {fill:#c51756;stroke:#c51756}
.qr-view {display:flex;flex-direction:column;flex:1;min-height:0}
.qr-scroll {overflow-y:auto;overscroll-behavior:contain;min-height:0;flex:1}
.qr-tabs,.qr-dock,.qr-turn,.qr-comment-nav {display:flex;flex:none;align-items:stretch}
.qr-tabs {background:var(--row);justify-content:center}
.qr-tabs a {flex:1;max-width:23rem;text-align:center;padding:.55rem;color:#374040;text-decoration:none;border-bottom:2px solid transparent}
.qr-tabs a[aria-current] {color:var(--teal);border-color:var(--teal)}
.qr-band,.qr-index-row,.qr-resume {padding-inline:max(1.1rem,calc((100vw - 46rem)/2))}
.qr-band {padding-block:.95rem .55rem;background:var(--paper);font-size:.94rem}
.qr-index-row,.qr-resume {background:var(--row);min-height:3.65rem;align-items:center;gap:.5rem;color:#1a4347;border-bottom:1px solid #b1b8af;text-decoration:none!important}
.qr-index-row {display:grid;grid-template-columns:2rem minmax(0,1fr) auto 3.3rem}
.qr-index-row span:last-child,.qr-resume span:last-child {text-align:end}
.qr-index-row small,.qr-resume small {font-size:.84rem;color:#404743}
.qr-index-row strong,.qr-resume strong {font-size:1.07rem;font-weight:500}
.qr-resume {display:flex;justify-content:space-between;border-color:var(--teal)}
.qr-resume small {display:block}
.qr-dock {gap:.2rem;border:1px solid #c8c8bb;border-radius:99px;background:#faf9f6;align-self:center;width:min(calc(100% - 1.7rem),38rem);padding:.16rem;margin:.3rem auto max(.45rem,env(safe-area-inset-bottom));box-shadow:0 2px 10px #23383014}
.qr-dock a {flex:1;display:grid;place-items:center;gap:.1rem;text-decoration:none;color:#182220;border-radius:99px;padding:.32rem;font-size:.77rem;line-height:1.35}
.qr-dock a[aria-current] {color:var(--teal);background:#e6e8e3}
#quran .qr-dock .icon {width:1.45rem;height:1.45rem}
.qr-paper-stack {position:relative;isolation:isolate;flex:1;min-height:0;width:min(100%,43.8rem);align-self:center;overflow:hidden;background:var(--paper);touch-action:pan-y pinch-zoom}
.qr-paper {position:absolute;inset:0;z-index:2;background:var(--paper);touch-action:pan-y pinch-zoom;padding:.55rem .4rem .8rem}
.qr-under-page {z-index:0;pointer-events:none;overflow:hidden}
.qr-paper-stack.is-turning {user-select:none;-webkit-user-select:none}
.qr-fold-back,.qr-fold-shadow,.qr-edge-shadow {position:absolute;inset:0;pointer-events:none}
.qr-fold-shadow {z-index:1;background:linear-gradient(var(--light-angle),transparent calc(var(--crease) - var(--curl)),#49351936 var(--crease),transparent calc(var(--crease) + 1px))}
.qr-edge-shadow {z-index:2;background:linear-gradient(var(--edge-angle),transparent var(--free-edge),#4a361c2e calc(var(--free-edge) + 1px),transparent calc(var(--free-edge) + var(--curl) * .45))}
.qr-fold-back {z-index:3;background:linear-gradient(var(--light-angle),#a89d86 var(--crease),#d4cbb8 calc(var(--crease) + 2px),#faf7ef calc(var(--crease) + var(--curl) * .36),#e7e0d1 calc(var(--crease) + var(--curl)),#e1d9c9)}
#quran .qr-step {min-height:44px;padding:.15rem .45rem;border:0;background:transparent;color:var(--teal);font-size:.9rem}
@media(max-width:360px){.qr-turn {gap:.14rem!important}#quran .qr-step {padding-inline:.25rem}}
.qr-lines {container-type:inline-size;isolation:isolate;direction:rtl;color:#151512}
.qr-strip {display:grid;grid-template-columns:1fr auto 1fr;align-items:center;min-height:2.35rem;border:3px double #2e4341;background:#597f7e;position:relative;isolation:isolate;text-align:center;margin:0 0 .3rem;color:#f7f1dd;overflow:hidden}
.qr-strip::before,.qr-strip::after {content:"";position:absolute;z-index:-1;inset-block:0;width:24%;background:url("mushaf-border.svg") left center/100% 100% no-repeat}
.qr-strip::before {left:0}.qr-strip::after {right:0;transform:scaleX(-1)}
.qr-strip h2 {font:700 clamp(1.25rem,5cqw,1.95rem)/1.5 Naskh,serif;color:inherit;margin:0}
.qr-strip small {background:#577a7a;border:1px solid #294949;border-radius:50%;width:2rem;height:2rem;display:grid;align-content:center;font:700 .62rem/1.1 Naskh,serif;justify-self:center}
.qr-basmala {text-align:center;margin:.12rem 0;font:clamp(1.4rem,6.4cqw,2.25rem)/1.65 AmiriQuran,serif}
.qr-line {display:flex;justify-content:center;align-items:baseline;direction:rtl;white-space:nowrap;font:clamp(1.15rem,5.55cqw,2.35rem)/1.8 AmiriQuran,serif;min-width:0;margin:0}
.qr-line-inner {position:relative;z-index:1;display:inline-block;flex:none;transform:scaleX(var(--fit,1));transform-origin:center}
.qr-opening .qr-line {font-size:clamp(1.4rem,6.45cqw,2.65rem);line-height:1.83}
#quran .qr-verse {display:inline-block;font:inherit;color:inherit;text-decoration:none;border-radius:3px;cursor:pointer}
/* All ink is above the row backgrounds, including overhanging marks from adjacent rows. */
.qr-line.is-selected {
  background:linear-gradient(to bottom,rgba(97,137,111,.17) calc(100% - 1px),rgba(65,109,82,.40) 0)
    var(--ayah-left) center / var(--ayah-width) calc(100% - .18em) no-repeat;
}
/* A reader already open on the earlier selection markup can still mark a verse. */
#quran .qr-verse.is-selected {background:transparent;box-shadow:none;text-decoration:underline;text-decoration-color:#719681;text-underline-offset:.14em}
#quran .qr-word-meaning {color:#087553}#quran .qr-divine {color:#b32161}
.qr-medal {width:1.27em;height:1.27em;display:inline-grid;place-items:center;vertical-align:middle;color:var(--teal);background:var(--teal);clip-path:polygon(50% 0,63% 9%,78% 8%,84% 20%,95% 28%,94% 42%,100% 50%,94% 61%,95% 73%,84% 81%,77% 93%,63% 91%,50% 100%,38% 92%,23% 93%,16% 81%,5% 73%,7% 60%,0 50%,7% 40%,5% 27%,16% 19%,23% 8%,38% 9%)}
.qr-medal b {display:grid;place-items:center;border-radius:50%;border:1px solid #578887;width:81%;height:81%;background:var(--paper);font:700 .43em/1 Naskh,serif;color:#243e40}
.qr-turn {align-items:center;gap:.55rem;width:min(100%,45rem);align-self:center;padding:.55rem .8rem max(.75rem,env(safe-area-inset-bottom));color:var(--teal)}
#qPageNo {background:var(--teal);border:0;border-radius:.3rem;min-width:2rem;padding:.12rem .4rem;color:white}
#qSlider {flex:1;min-width:0;appearance:none;background:radial-gradient(circle at center,var(--teal) 1.4px,transparent 1.9px) left center/15px 4px repeat-x;height:2rem;direction:rtl;cursor:pointer}
#qSlider::-webkit-slider-thumb {appearance:none;width:8px;height:8px;border-radius:100%;background:var(--teal)}
#qSlider::-moz-range-thumb {width:8px;height:8px;border:0;background:var(--teal)}
#qPlay {font-size:1.3rem!important}
.qr-options {width:min(100%,48rem);margin:auto auto 0;flex:none;border-top:3px solid var(--teal);padding:0 .75rem max(.8rem,env(safe-area-inset-bottom));background:var(--paper)}
.qr-option-head {min-height:2.8rem;color:#474944}.qr-option-head strong {margin-inline-end:auto;color:var(--teal);font-weight:500}
.qr-option-grid,.qr-comment-nav {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:2px}
.qr-option-grid button,.qr-comment-nav button,#qJump button {border:0;border-radius:0;background:var(--teal);color:white;padding:.65rem;min-height:44px}
.qr-option-grid button {display:flex;justify-content:space-evenly;align-items:center;font-size:.89rem!important}
.qr-option-grid button:last-child {grid-column:1/-1;margin-top:.35rem}
#qWordNote {max-height:4rem;overflow:auto;font-size:.91rem;padding:.25rem .5rem}
.qr-comment-head,.qr-comment-tools {display:flex;align-items:center;gap:.4rem;padding-inline:max(.55rem,calc((100vw - 48rem)/2));flex:none}
.qr-comment-head h2 {font:500 1rem/1.5 Arabic,sans-serif;color:#21494c;margin:0;margin-inline-end:auto}
.qr-font {background:#dedbd1;border-radius:99px;overflow:hidden}.qr-font button {background:none;border:0;font-size:1.2rem!important;min-width:2.3rem;height:2rem}
.qr-comment-tools {justify-content:space-between;color:#4d504b}
.qr-comment-tools select {background:transparent;border:0;color:var(--teal);font:inherit}
.qr-comment-text {padding:1rem max(1rem,calc((100vw - 45rem)/2)) 1.5rem;line-height:1.95;color:#373a34;font-size:var(--taf-size,1.06rem)}
#tafsirBody {font-size:inherit;line-height:inherit}
#tafsirRange {font-size:.82rem;margin:0 0 .65rem;color:#496061}
.qr-comment-nav {gap:1px;background:#8da6a4;padding-bottom:env(safe-area-inset-bottom)}
.qr-comment-nav button:first-child::before {content:'⟶';float:right}.qr-comment-nav button:last-child::after {content:'⟵';float:left}
.qr-pane {padding:1rem max(1rem,calc((100vw - 44rem)/2))}
.qr-pane h2,#qJump h2 {font:700 1.65rem Naskh,serif;color:var(--teal)}
.qr-pane>label,#qJump label {display:grid;gap:.35rem;margin:.9rem 0}
.qr-pane select,#qJump select,#qJump input {max-width:100%;width:100%;color:inherit;font:inherit;padding:.45rem;background:var(--row);border:1px solid #a5b4ac;border-radius:.35rem}
.qr-pane .qr-check {display:flex;align-items:center;gap:.65rem}
.qr-pane details {margin:.8rem 0;padding:.6rem;border-block-start:1px solid #bfc9be}.qr-pane summary {cursor:pointer;color:var(--teal)}
.qr-pane .qr-index-row {padding:.7rem;grid-template-columns:1fr auto}
#qJump {border:1px solid #67817d;background:var(--paper);color:#223a35;width:min(90vw,25rem);padding:1.4rem;border-radius:.5rem}
#qJump::backdrop {background:#102c32a6}
#quranStatus:not(:empty) {position:absolute;bottom:13rem;left:50%;transform:translateX(-50%);background:#123f45;color:white;border-radius:.55rem;padding:.5rem .9rem;width:max-content;max-width:92%;font-size:.92rem;pointer-events:none;z-index:5}
#quranStatus:empty {display:none}
@media(min-width:700px){.qr-opening .qr-line {line-height:1.55}.qr-paper {padding-top:1rem}}
@media(max-height:530px){.qr-options {max-height:49dvh;overflow:auto}.qr-comment-head,.qr-comment-tools {min-height:2rem}}
#qIndexBar #qPrayer {justify-self:end}
.qr-strip small {white-space:pre-line}

#qIndexAudio{margin:.65rem max(.65rem,calc((100vw - 46rem)/2)) .45rem}
#qAudioView .recordings{margin:.7rem 0 1rem}
#qAudioView .recording-controls{grid-template-columns:repeat(2,minmax(0,1fr))}
#qAudioView .recording-controls :is(select,input){min-height:44px;max-width:100%;box-sizing:border-box}
#qAudioView audio{display:block;max-width:100%}
#qAudioView audio[hidden]{display:none}
#qReaderAudio{display:flex;align-items:center;justify-content:center;gap:.5rem;flex:none;min-height:44px;font-weight:600;color:var(--teal);background:var(--row);text-decoration:none;border-block-end:1px solid #c5d4cc}
#qReaderAudio .icon{width:1.15rem;height:1.15rem}
@media(max-width:34rem){#qAudioView .recording-controls{grid-template-columns:minmax(0,1fr)}}
