@font-face{font-family:"IHA LPMQ";src:url("/public/assets/fonts/lpmq-isep-misbah.ttf") format("truetype");font-display:swap}@font-face{font-family:"IHA LPMQ";src:url("/public/assets/fonts/kfgqpc-uthmanic-hafs.otf") format("opentype");unicode-range:U+671;font-display:swap}:root{--scripture-font:"IHA LPMQ",serif;--scripture-size:28px}.qh-page,.scripture-workspace{--iha-arabic-font:var(--scripture-font)}.qh-arabic,.qh-book-ar,.qh-mushaf-text,.scripture-workspace :is(.sc-quote,.sc-verse-ar,.sc-decision-quote,.sc-td-ar,.hp-arabic){font-family:var(--scripture-font)!important;font-size:var(--scripture-size)!important;line-height:2.1!important;font-weight:400;overflow-wrap:anywhere}.qh-mushaf-text :is(span,a,h3),.qh-arabic *,.scripture-workspace :is(.sc-quote,.sc-verse-ar,.sc-decision-quote,.sc-td-ar,.hp-arabic) *{font-family:var(--scripture-font)!important}.scripture-reading-controls,.qh-reader-search{margin:12px 0 20px;border:1px solid #d5dfd3;border-radius:10px;background:#fffdf8;color:#31543d;font:13px/1.5 system-ui}.scripture-reading-controls summary,.qh-reader-search>summary{padding:12px 16px;min-height:44px;cursor:pointer;font-weight:650}.scripture-reading-controls>div{display:flex;flex-wrap:wrap;gap:16px;padding:0 16px 16px;align-items:end}.scripture-reading-controls label{display:grid;gap:7px}.scripture-reading-controls select{max-width:100%;padding:9px;border:1px solid #c8d8c8;border-radius:7px;min-height:44px;background:#fff}.scripture-reading-controls button{padding:11px;border:1px solid #c8d8c8;background:#edf3eb;border-radius:7px;color:#31543d;min-height:44px;cursor:pointer}.scripture-reading-controls input{accent-color:#075c35}.qh-reader-search .qh-search-panel{border:0;border-top:1px solid #e0e6db;border-radius:0}.qh-reading-mode .qh-hero>p{display:none}.qh-reading-mode .qh-hero h1{font-size:42px;margin:6px 0 12px}.qh-reading-mode .qh-hero{padding-bottom:15px}.qh-reading-mode .qh-main{padding-top:26px}.qh-mushaf-toolbar{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap;margin:24px 0 14px}.qh-mushaf-toolbar h2{font:500 25px Georgia;margin:0}.qh-mushaf-toolbar form{display:flex;gap:10px;align-items:center}.qh-mushaf-toolbar input{width:72px;padding:10px;border:1px solid #c4d4c5;border-radius:7px;background:#fff}.qh-mushaf-toolbar button{min-height:44px;padding:10px 14px;border:1px solid #c4d4c5;border-radius:7px;color:#1b5234;background:#edf3eb;cursor:pointer}.qh-mushaf-sheet{max-width:760px;margin:auto;border:1px solid #c7d5c2;border-radius:16px;padding:24px 32px;background:#fffef7;box-shadow:0 5px 22px #243e2510}.qh-mushaf-meta{display:flex;justify-content:space-between;gap:12px;font:11px/1.5 system-ui;color:#607358;padding-bottom:16px;border-bottom:1px solid #e0e5d8}.qh-mushaf-text{text-align:justify;padding:14px 0}.qh-mushaf-text h3{text-align:center;font:400 26px/1.8 var(--scripture-font);padding:5px 10px;border:1px solid #d4dfc8;border-radius:8px;background:#eff3e7;margin:12px 0 20px}.qh-mushaf-ayah{font-size:.7em;text-decoration:none;color:#466d40;white-space:nowrap}@media(max-width:650px){.qh-mushaf-sheet{padding:14px 16px}.qh-mushaf-meta{font-size:10px}.scripture-reading-controls>div{display:grid;grid-template-columns:1fr}.qh-mushaf-text h3{font-size:24px}}
.qh-mode-tabs{display:flex;gap:10px;margin:16px 0}.qh-mode-tabs a{flex:1;padding:13px 16px;border:1px solid #cad9c7;border-radius:10px;color:#31543d;background:#fffdf8;text-decoration:none;font:650 14px/1.5 system-ui}.qh-mode-tabs a[aria-current]{background:#e7eee1;border-color:#83a079}.qh-mode-tabs span{display:block;font-size:11px;font-weight:400;margin-top:3px}.qh-mushaf-navigation{border:1px solid #d4dfcc;border-radius:10px;margin:12px 0 20px;background:#fffdf8}.qh-mushaf-navigation summary{padding:12px 16px;cursor:pointer;min-height:44px;color:#31543d;font:650 13px/1.5 system-ui}.qh-mushaf-navigation>div{display:grid;grid-template-columns:2fr 1fr 1fr;gap:16px;padding:0 16px 16px}.qh-mushaf-navigation form{display:grid;gap:9px;min-width:0}.qh-mushaf-navigation label{display:grid;gap:6px;font:600 12px/1.5 system-ui;color:#31543d}.qh-mushaf-navigation :is(select,input,button){width:100%;min-height:44px;border:1px solid #c8d8c3;border-radius:7px;padding:9px;background:white;font:13px system-ui}.qh-mushaf-navigation button{background:#edf3e8;color:#31543d;cursor:pointer}@media(max-width:650px){.qh-mushaf-navigation>div{grid-template-columns:1fr}.qh-mushaf-navigation form{grid-template-columns:1fr 110px;align-items:end}.qh-reading-mode .qh-hero h1{font-size:34px}}
.qh-reader-target{font:12px/1.7 system-ui;color:#536b47}.qh-target-verse{background:#edf3e3;border-radius:4px}
.qh-reading-mode .qh-hero .qh-eyebrow,.qh-reading-mode .qh-hero-mark,.qh-reading-mode .qh-tabs a>span{display:none}.qh-reading-mode .qh-hero h1{font-size:28px;margin:0}.qh-reading-mode .qh-hero{padding-bottom:10px}.qh-reading-mode .qh-tabs a{padding:12px 16px}.qh-reading-mode .qh-tabs{margin-bottom:12px}
.qh-activities{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;margin:12px 0 22px}.qh-activities a{padding:11px 8px;min-height:44px;border-bottom:2px solid transparent;color:#3a5d42;text-align:center;text-decoration:none;font:650 13px/1.5 system-ui}.qh-activities a[aria-current]{border-color:#075c35;background:#edf2e6}.qh-reader-toolbar{display:flex;justify-content:space-between;align-items:center;gap:14px;margin:12px 0}.qh-reader-toolbar h2{font:500 24px Georgia;margin:0}.qh-reader-destination summary{min-height:44px;padding:12px;cursor:pointer;color:#31543d;font:650 13px system-ui}.qh-reader-destination form{display:grid;grid-template-columns:1fr 90px auto;align-items:end;gap:9px;padding:12px;border:1px solid #ccd9c5;background:#fffdf7;border-radius:10px}.qh-reader-destination label{display:grid;gap:5px;font:12px system-ui}.qh-reader-destination :is(select,input,button){min-height:44px;max-width:100%;width:100%;padding:9px;border:1px solid #c4d6c0;border-radius:7px;background:white;color:#31543d}.qh-reader-destination small{grid-column:1/-1;font:11px system-ui;color:#657660}.qh-facsimile{max-width:760px;margin:16px auto;border:1px solid #cbd7c3;border-radius:12px;background:#fffef8;padding:16px}.qh-facsimile-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;font:12px/1.6 system-ui;color:#46663d;margin-bottom:12px}.qh-facsimile-heading button{min-height:44px;padding:9px 12px;border:1px solid #c5d5c0;border-radius:7px;background:#f3f7ec;color:#31543d;cursor:pointer;white-space:nowrap}.qh-facsimile-stage{overflow:auto;max-height:85vh;overscroll-behavior:contain}.qh-facsimile-image{width:100%}.qh-page-image{display:block;width:100%;height:auto;max-width:none}.qh-facsimile.is-zoomed .qh-facsimile-image{width:180%}.qh-focus-note{margin:0 0 10px;font:12px/1.7 system-ui;color:#506f40}.qh-verse-detail{display:inline-block;padding:10px 0;font:12px/1.7 system-ui;color:#315d40}.qh-results-help{font:13px/1.8 system-ui;color:#596c51}.qh-result-table{width:100%;border-collapse:collapse;background:#fffdf8}.qh-result-table th,.qh-result-table td{padding:12px;border-bottom:1px solid #dce6d5;vertical-align:top}.qh-result-table th{font:650 12px system-ui;text-align:left;background:#edf3e6}.qh-result-table td:first-child{width:42px;font:12px system-ui}.qh-result-table td:last-child{width:68px;font:12px system-ui}.qh-hit-toggle{font:650 13px/1.7 system-ui;color:#1d5b3a;text-decoration:none;display:block;padding:5px 0;min-height:36px}.qh-hit-toggle[aria-expanded=true]{color:#075c35;text-decoration:underline}.qh-result-table .qh-table-verse{margin:8px 0 0}.qh-hit-fold[hidden]{display:none!important}.qh-result-table .qh-hit-fold>td{width:auto}.qh-hit-fold .qh-facsimile{margin:0}.scripture-fixed-font{font:12px system-ui;color:#536b47}@media(max-width:650px){.qh-reader-toolbar{align-items:start}.qh-reader-toolbar h2{font-size:21px}.qh-reader-destination[open]{width:100%}.qh-reader-toolbar:has(.qh-reader-destination[open]){flex-wrap:wrap}.qh-reader-destination form{grid-template-columns:1fr 80px auto}.qh-result-table td,.qh-result-table th{padding:9px 6px}.qh-facsimile{padding:10px}.qh-result-table td:last-child{width:52px}.qh-facsimile-heading{font-size:11px}}
.qh-page-text{margin:20px 0;border-top:1px solid #dce5d3}.qh-page-text>summary{padding:12px 0;min-height:44px;font:650 12px system-ui;color:#3f603d;cursor:pointer}.qh-page-text a{color:#315d40;font:12px system-ui}.qh-hit-fold td .qh-facsimile{max-width:760px}
.qh-facsimile-image{width:min(100%,46.3vh);margin-inline:auto}.qh-facsimile.is-zoomed .qh-facsimile-image{width:min(180%,83.3vh);margin-inline:0}.qh-facsimile-stage{max-height:78vh}
/* R138: the document owns vertical scrolling; the page viewport only pans horizontally. */
.qh-facsimile{max-width:940px}.qh-facsimile-stage{max-height:none;overflow-x:auto;overflow-y:visible;overscroll-behavior:auto;touch-action:auto}.qh-facsimile-image{width:100%;margin-inline:0}.qh-facsimile.is-zoomed .qh-facsimile-image{width:180%}.qh-page-image{user-select:none;-webkit-user-drag:none}
.qh-facsimile-image{position:relative}.qh-ayah-regions{position:absolute;inset:0;pointer-events:none}.qh-ayah-region{position:absolute;border:0!important;border-radius:3px;background:transparent;pointer-events:auto;padding:0!important;min-height:0!important;cursor:pointer}.qh-ayah-region.is-active{background:#d9b44f30;outline:1px solid #b3944d44}.qh-ayah-region:hover,.qh-ayah-region:focus-visible{background:#9dbf7735}.qh-reader-action-pane{margin-top:14px;border-top:1px solid #d5dfcc;padding-top:14px}.qh-reader-action-pane>label{display:flex;align-items:center;gap:10px;color:#34583e;font:650 13px system-ui}.qh-reader-action-pane select{flex:1;max-width:100%;min-width:0;min-height:44px;padding:9px;border:1px solid #c7d7bd;border-radius:7px;background:#fffdf7}.qh-reader-selectable{user-select:text!important;-webkit-user-select:text!important;cursor:text;margin:14px 0;white-space:pre-wrap}.qh-reader-actions{display:flex;gap:9px;align-items:center;flex-wrap:wrap}.qh-reader-actions button{min-height:44px;padding:10px 16px;background:#edf3e5;border:1px solid #c5d5bd;border-radius:8px;color:#275437}.qh-reader-actions [role=status]{font:12px system-ui;color:#4f7043}.qh-reader-tafsir{padding-top:16px}.qh-reader-tafsir h3{font:650 17px/1.6 system-ui;color:#284d35}.qh-reader-tafsir .qh-arabic{margin:10px 0;white-space:pre-wrap}.qh-reader-tafsir a{font:12px system-ui;color:#315e3d}
.qh-hadith-family{margin:18px 0;border:1px solid #d6e1ce;border-radius:12px;background:#fffdf8;overflow:hidden}.qh-hadith-family>header{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:16px 18px;background:#edf3e6}.qh-hadith-family h2{font:550 21px/1.5 Georgia;margin:0;color:#254d35}.qh-hadith-family header>span{font:12px system-ui;color:#59714c}.qh-hadith-table{width:100%;border-collapse:collapse}.qh-hadith-table th,.qh-hadith-table td{padding:12px;border-bottom:1px solid #e1e8da;vertical-align:top;text-align:left}.qh-hadith-table th{font:650 11px system-ui;color:#58714d}.qh-hadith-table td:first-child{width:40px;font:12px system-ui}.qh-hadith-table td:last-child{width:100px;font:12px/1.7 system-ui;overflow-wrap:anywhere}.qh-hadith-record summary{cursor:pointer;color:#315840;min-height:44px;font:13px/1.8 system-ui}.qh-hadith-record summary small{display:block;color:#75866b;font-size:11px;margin-top:3px}.qh-hadith-record-body{padding:12px 0;overflow-wrap:anywhere}.qh-hadith-bibliography{font:12px/1.8 system-ui;color:#637453}.qh-hadith-record-body button{padding:10px 15px;min-height:44px;border:1px solid #c6d7be;border-radius:7px;color:#31583b;background:#eff5e9}.qh-sharh-fold>summary{padding:14px 18px;cursor:pointer;background:#f5f5e9;color:#665a30;font:650 13px/1.7 system-ui;min-height:44px}.qh-sharh-fold>summary span{font-weight:400;margin-left:8px}.qh-sharh-book{padding:12px;border-top:1px solid #e6e6d7}.qh-sharh-book h3{font:650 17px/1.7 system-ui;color:#5b593a;margin:2px 0 10px}@media(max-width:650px){.qh-hadith-family>header{display:block}.qh-hadith-family h2{font-size:19px}.qh-hadith-table td,.qh-hadith-table th{padding:9px 6px}.qh-hadith-table td:last-child{width:72px}.qh-hadith-table td:first-child{width:28px}}
.qh-plan-intro h2{font:500 28px Georgia;color:#254d35}.qh-plan-intro p{font:14px/1.8 system-ui;color:#58704c}.qh-plan-categories{display:grid;grid-template-columns:1fr 1fr;gap:18px}.qh-plan-categories>details{border:1px solid #cfdfc5;border-radius:12px;background:#fffdf8;align-self:start}.qh-plan-categories summary{padding:20px;cursor:pointer;font:650 20px Georgia;color:#28543a}.qh-plan-categories summary span{display:block;font:12px/1.8 system-ui;color:#758464;margin-top:5px}.qh-plan-categories ol{list-style:none;padding:0 18px 18px;margin:0;display:grid;gap:8px}.qh-plan-categories li a{display:flex;gap:14px;justify-content:space-between;padding:12px 14px;background:#f1f5e9;border:1px solid #e0e7d5;border-radius:8px;text-decoration:none;font:13px/1.7 system-ui;color:#35553c;min-height:44px}.qh-plan-categories li strong{white-space:nowrap}.qh-plan-categories li span{text-align:right}.qh-plan-status{padding:14px;border:1px solid #d6e1ce;border-radius:10px;background:#eff4e7;margin:18px 0;font:13px/1.8 system-ui;color:#365b3e}.qh-plan-status p{margin:5px 0}.qh-plan-status a{color:#285a38}@media(max-width:650px){.qh-plan-categories{grid-template-columns:1fr}}
.qh-reading-mode .qh-main{max-width:1480px}.qh-reading-mode .qh-facsimile{max-width:none}.qh-reader-grid{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:20px;align-items:start}.qh-reader-grid>.qh-facsimile-stage{grid-column:1;grid-row:1;min-width:0}.qh-reader-grid>.qh-reader-action-pane{grid-column:2;grid-row:1;position:sticky;top:84px;margin:0;border:1px solid #d3dfc9;border-radius:10px;padding:14px;background:#fffdf7;min-width:0}.qh-reader-selectable{font-size:24px!important;line-height:1.9!important}.qh-reader-tafsir{max-height:65vh;overflow:auto;overscroll-behavior:auto}.qh-hit-fold .qh-reader-grid{grid-template-columns:minmax(0,1fr) 260px}.qh-hit-fold .qh-reader-action-pane{position:static}@media(max-width:900px){.qh-reader-grid,.qh-hit-fold .qh-reader-grid{display:flex;flex-direction:column}.qh-reader-grid>.qh-reader-action-pane{order:0;position:static;width:100%}.qh-reader-grid>.qh-facsimile-stage{order:1;width:100%}.qh-reader-selectable{font-size:26px!important}.qh-reading-mode .qh-main{max-width:1120px}}
/* R139: measured Arabic ink size, consistent controls and a bounded interactive paper surface. */
.qh-page :is(.qh-arabic,.qh-book-ar,.qh-mushaf-text){font-size:min(var(--scripture-size,28px),var(--public-arabic-size,16px))!important;line-height:1.7!important}.qh-facsimile .qh-arabic{font-size:min(var(--scripture-size,28px),var(--reader-text-size,14px))!important;line-height:1.7!important}.qh-reader-action-pane{padding:12px!important}.qh-reader-action-pane>label{flex-wrap:wrap;font-size:12px}.qh-reader-selectable{margin:10px 0}.qh-reader-tafsir{max-height:60vh}.qh-reader-tafsir :is(p,h3){overflow-wrap:anywhere}.qh-reader-tafsir p:not(.qh-arabic){font:12px/1.65 system-ui}.qh-reader-tafsir h3{font:600 14px/1.6 system-ui}.qh-reader-actions{gap:6px}.qh-reader-actions button{padding:8px 10px;font-size:12px}.qh-search-categories{display:flex;gap:20px;border:0;padding:12px 0;grid-column:1/-1}.qh-search-categories label{display:flex;align-items:center;gap:7px}.qh-book-reader{outline:none}.qh-book-navigation{display:flex;justify-content:center;gap:10px;align-items:start;margin:14px 0}.qh-book-navigation>a{font:28px/44px system-ui;width:44px;text-align:center;text-decoration:none;border:1px solid #d1dec6;border-radius:8px;color:#31583c;background:#fffdf7}.qh-book-jump summary{cursor:pointer;min-height:44px;padding:12px 16px;font:13px system-ui}.qh-book-jump form{display:flex;gap:8px;padding:10px;align-items:end;background:#fffdf7;border:1px solid #d1dec6}.qh-book-jump input{width:80px;padding:9px}.qh-book-jump button{min-height:44px;padding:9px}.qh-book-help,.qh-book-feedback{font:12px/1.7 system-ui;color:#687957;text-align:center}.qh-book-next-day{display:block;text-align:center;font:12px system-ui;color:#31583c;margin:12px}.qh-leaves{display:flex;direction:rtl;gap:4px;align-items:start;transform-origin:top right}.qh-leaves>.qh-facsimile-image{flex:1;min-width:0;direction:ltr;box-shadow:0 3px 12px #2b3e2512;border-radius:2px}.qh-leaves:has(>.qh-facsimile-image:nth-child(2)){background:linear-gradient(90deg,#fffdf3 48%,#64592d25 50%,#fffdf3 52%)}.qh-book-reader .qh-facsimile-stage{position:relative;touch-action:pan-y;cursor:grab}.qh-book-reader .qh-facsimile-stage:active{cursor:grabbing}.qh-book-reader .qh-page-image{pointer-events:none}.qh-curl-canvas{position:absolute;inset:0;width:100%;z-index:4;pointer-events:none}.qh-book-reader[aria-busy=true] .qh-book-navigation{opacity:.65}.qh-book-reader .qh-reader-grid{grid-template-columns:minmax(0,1fr) 250px}.qh-book-reader .qh-facsimile{padding:12px}.qh-book-reader .qh-ayah-region{touch-action:pan-y}@media(max-width:1099px){.qh-book-reader .qh-reader-grid{display:flex;flex-direction:column}.qh-book-reader .qh-reader-action-pane{position:static;width:100%;order:1}.qh-book-reader .qh-facsimile-stage{order:0;width:100%}.qh-search-categories{flex-wrap:wrap}.qh-leaves{gap:0}}
.qh-blank-leaf{aspect-ratio:1024/1656;background:#fffdf3}

/* R140: reading and source details stay in the same scrollable document. */
.qh-reader-tafsir{max-height:none;overflow:visible}.qh-reader-actions [hidden]{display:none!important}.qh-source-identity{margin:12px 0;padding:0 10px 10px;border:1px solid #d2dfc8;border-radius:8px;background:#f5f8ef;overflow-wrap:anywhere}.qh-source-identity>summary{cursor:pointer;min-height:44px;padding:12px 0;color:#31583c;font:600 12px/1.6 system-ui}.qh-source-identity>p{margin:4px 0 12px}.qh-source-identity>a{display:inline-block;min-height:44px;padding:10px 0}.qh-reader-action-pane{box-sizing:border-box}

.qh-reader-tafsir button{min-height:44px;padding:9px 12px;border:1px solid #c5d5bd;border-radius:8px;background:#edf3e5;color:#275437;font:12px/1.6 system-ui;cursor:pointer}

/* R141: fullscreen keeps the same reader, panels and selected ayah. */
.qh-book-reader:fullscreen,.qh-facsimile:fullscreen,.is-reading-fullscreen{background:#f7f3ea;width:100%;height:100%;max-width:none;margin:0;overflow:auto;overscroll-behavior:contain;padding:12px clamp(8px,2vw,24px);box-sizing:border-box;scrollbar-gutter:stable}
.is-reading-fullscreen{position:fixed!important;inset:0;z-index:1000;height:100dvh;width:100vw}
.qh-book-reader:fullscreen .qh-facsimile,.is-reading-fullscreen .qh-facsimile{max-width:1600px;margin:0 auto}
:is(.qh-book-reader:fullscreen,.qh-facsimile:fullscreen,.is-reading-fullscreen) .qh-facsimile-stage{max-height:none;overflow:auto}
:is(.qh-book-reader:fullscreen,.qh-facsimile:fullscreen,.is-reading-fullscreen) .qh-reader-action-pane{top:12px}
[data-mushaf-fullscreen]{cursor:pointer}

.qh-facsimile-stage{overflow-anchor:none}.qh-reader-action-pane{overflow-anchor:none}

:is(.qh-book-reader:fullscreen,.qh-facsimile:fullscreen,.is-reading-fullscreen) .qh-facsimile-heading{position:sticky;top:0;z-index:8;background:#fffdf7;padding:6px 0;border-bottom:1px solid #d3dfc9;min-height:56px}

/* R280: native fullscreen is applied to the mushaf stage, not its surrounding UI.
   This CSS is part of the reader's core stylesheet, independent of translation load. */
.qh-facsimile-stage.iha-mushaf-only-fullscreen:is(:fullscreen,.is-reading-fullscreen){
  box-sizing:border-box!important;position:relative;width:100vw!important;
  height:100dvh!important;max-height:100dvh!important;max-width:none!important;
  margin:0!important;padding:0!important;overflow:auto!important;
  overscroll-behavior:contain;background:#f7f3ea!important;scrollbar-gutter:auto!important;
}
.qh-facsimile-stage.iha-mushaf-only-fullscreen.is-reading-fullscreen{
  position:fixed!important;inset:0!important;z-index:2147482500!important;
}
.qh-facsimile-stage.iha-mushaf-only-fullscreen .qh-facsimile-image{
  width:min(100%,calc(100dvh * 1024 / 1656))!important;
  max-width:100%!important;margin-inline:auto!important;
}
.qh-facsimile-stage.iha-mushaf-only-fullscreen .qh-page-image{
  display:block!important;max-width:100%!important;height:auto!important;object-fit:contain!important;
}
.qh-facsimile-stage.iha-mushaf-only-fullscreen .iha-mushaf-fs-exit{
  display:flex!important;align-items:center;justify-content:center;
  position:fixed!important;top:max(8px,env(safe-area-inset-top))!important;
  right:max(8px,env(safe-area-inset-right))!important;
  z-index:2147483000!important;min-height:36px!important;min-width:44px!important;
  padding:7px 12px!important;border-radius:9px!important;
  border:1px solid #b7c9b5!important;background:#fffdf8ed!important;
  color:#245138!important;font:600 12px/1.3 system-ui!important;
  box-shadow:0 2px 8px #0002!important;cursor:pointer;
}

/* R318 persistent book fullscreen: hide UI chrome without replacing the active book node. */












/* R319: compact responsive reader: prioritise the page rather than auxiliary copy. */
.qh-book-reader .iha-r319-source{font:12px/1.55 system-ui;color:#557063;margin:0;}
.qh-book-reader .iha-r319-source>summary{cursor:pointer;list-style:disclosure-closed;padding:9px 0;min-height:36px;}
.qh-book-reader .iha-r319-source[open]>summary{list-style:disclosure-open;}
.qh-book-reader .iha-r319-source p{font-size:12px;line-height:1.6;margin:8px 0;}
.qh-book-reader .qh-book-help{font-size:11px;line-height:1.55;margin:6px 0;color:#758074;}
.qh-book-reader .qh-book-navigation{margin:10px 0;}
.qh-book-reader .qh-reader-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;}
.qh-book-reader .qh-reader-actions button{min-width:0;overflow-wrap:anywhere;min-height:42px;}
.qh-book-reader .qh-reader-tafsir{max-height:none;overflow:visible;}
@media(max-width:700px){
 .qh-book-reader .qh-facsimile{padding:6px!important;}
 .qh-book-reader .qh-reader-action-pane{padding:10px!important;margin-top:8px;}
 .qh-book-reader .qh-reader-actions button{padding:8px 4px;font-size:12px;}
 .qh-book-reader .qh-book-navigation{gap:8px;}
 .qh-book-reader .qh-book-help{font-size:10px;}
}
@media(min-width:701px) and (max-width:1100px){
 .qh-book-reader .qh-reader-grid{grid-template-columns:minmax(0,1fr)!important;}
 .qh-book-reader .qh-reader-action-pane{position:static!important;width:100%;}
}

/* R324: reader-first layout; scoped styles, not global presentation changes. */
.qh-page .qh-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:clamp(3px,1vw,10px)}
.qh-page .qh-tabs>a{min-width:0;text-align:center;white-space:normal;overflow-wrap:normal;padding:9px 5px;font-size:clamp(11px,2.8vw,14px)}
.iha-r324-modes,.iha-r324-plan-options{display:flex;align-items:center;justify-content:flex-start;flex-wrap:wrap;gap:8px 18px;padding:5px 0;margin:4px 0 10px;border:0;min-width:0;background:none}
.iha-r324-modes>label,.iha-r324-plan-options>label{display:inline-flex!important;align-items:center;gap:5px;white-space:nowrap;font:500 clamp(12px,3vw,14px)/1.4 system-ui;cursor:pointer;margin:0;padding:6px 0}
.iha-r324-modes input,.iha-r324-plan-options input{margin:0;width:16px;height:16px;accent-color:#27633e}
.iha-r324-plan{display:flex;flex-direction:column;gap:8px;align-items:flex-start}
.iha-r324-plan-continue{display:inline-flex;align-items:center;justify-content:center;min-height:42px;padding:10px 18px;border-radius:8px;color:#fff;background:#24583d;text-decoration:none;font-weight:600}
.qh-book-reader .qh-reader-grid{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(220px,260px);align-items:start;gap:12px}
.qh-book-reader .qh-reader-grid>.qh-facsimile-stage{order:-1;grid-column:1;grid-row:1;margin:0;min-width:0}
.qh-book-reader .qh-reader-grid>.qh-reader-action-pane{grid-column:2;grid-row:1;margin:0;min-width:0}
.qh-book-reader .qh-facsimile-heading{padding:3px 6px;min-height:0;font-size:12px}
.qh-book-reader .qh-facsimile{padding:4px!important}
.qh-book-reader .qh-book-help{font-size:11px;margin:3px 0}
.qh-book-reader .qh-book-navigation{margin:5px 0}
.qh-book-reader .qh-reader-action-pane .qh-reader-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}
.qh-book-reader .qh-reader-action-pane .qh-reader-actions button{padding:7px 4px;font-size:11px;min-height:38px}
.qh-book-reader .iha-r324-attribution{margin:0;font-size:10px}
@media(max-width:900px){
 .qh-book-reader .qh-reader-grid{display:flex!important;flex-direction:column;gap:8px}
 .qh-book-reader .qh-reader-grid>.qh-facsimile-stage{order:0;width:100%}
 .qh-book-reader .qh-reader-grid>.qh-reader-action-pane{order:1;width:100%;position:static;max-width:none}
 .qh-reading-mode .qh-main{padding-top:8px}
 .qh-reading-mode .qh-hero{padding-block:6px}
 .qh-reading-mode .qh-hero h1{font-size:clamp(18px,5vw,26px);margin:2px 0}
 .qh-page .qh-book-reader{margin:0}
}
/* Fullscreen host is the persistent book node; its nested grid must remain present.
   Older rule hid .qh-reader-grid because it was not a direct .qh-facsimile. */










/* R324 reviewed mobile viewport and fullscreen constraints: target the actual book host. */
@media(max-width:900px){
 .qh-book-reader .qh-reader-grid{display:flex!important;flex-direction:column!important;gap:6px!important}
 .qh-book-reader .qh-reader-grid>.qh-facsimile-stage{order:0!important;flex:none!important;min-height:0!important}
 .qh-book-reader .qh-reader-grid>.qh-reader-action-pane{order:1!important;flex:none!important;box-shadow:none!important}
 .qh-book-reader .qh-facsimile{margin-block:4px!important;padding:3px!important}
 .qh-book-reader .qh-facsimile-heading{margin-bottom:4px!important}
 .qh-book-reader .qh-page-image{object-fit:contain}
}





/* R324 consistency pass: override obsolete nested fullscreen hiding rule. */




.qh-book-reader .iha-r319-source{display:none!important}
/* These radio groups are functional controls, not decorative cards. */
body.qh-page .iha-r324-modes,body.qh-page .iha-r324-plan-options{display:flex!important;flex-wrap:nowrap!important;gap:clamp(6px,2vw,16px)!important;overflow-x:auto;max-width:100%;scrollbar-width:none}
body.qh-page .iha-r324-modes::-webkit-scrollbar,body.qh-page .iha-r324-plan-options::-webkit-scrollbar{display:none}
@media(max-width:620px){body.qh-page .qh-tabs{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;flex-direction:row!important;gap:4px!important}body.qh-page .qh-tabs>a{box-sizing:border-box!important;display:flex!important;flex:initial!important;width:auto!important;min-width:0!important;min-height:38px!important;padding:6px 3px!important;justify-content:center!important;text-align:center!important;line-height:1.25!important;font-size:clamp(10px,2.8vw,13px)!important;border-radius:9px!important;white-space:normal!important}body.qh-page .qh-hero{padding:6px 10px!important;min-height:0!important}body.qh-page .qh-hero h1{font-size:clamp(19px,5vw,26px)!important;line-height:1.25!important;margin:0!important}body.qh-page .qh-search-panel{padding:10px!important}body.qh-page .qh-book-reader .qh-reader-grid{gap:5px!important}}

/* R327: compact, native, server-bound Hadith category radios. */
body.qh-page .qh-form .qh-search-categories.iha-r327-native-modes {
 display:flex!important;flex-wrap:wrap!important;align-items:center!important;
 justify-content:flex-start!important;gap:4px clamp(12px,2vw,22px)!important;
 border:0!important;box-shadow:none!important;background:transparent!important;
 margin:0!important;padding:4px 0 8px!important;min-width:0!important;overflow:visible!important;
}
body.qh-page .qh-form .qh-search-categories.iha-r327-native-modes>label {
 display:inline-flex!important;align-items:center!important;justify-content:flex-start!important;
 grid-template-columns:none!important;gap:7px!important;margin:0!important;
 padding:6px 0!important;width:auto!important;min-width:0!important;
 background:transparent!important;box-shadow:none!important;border:0!important;
 font:500 clamp(12px,2.8vw,14px)/1.45 system-ui,sans-serif!important;
 white-space:normal!important;cursor:pointer!important;
}
body.qh-page .qh-form .qh-search-categories.iha-r327-native-modes input[type=radio] {
 width:16px!important;height:16px!important;flex:0 0 16px!important;
 margin:0!important;accent-color:#27633e;
}
@media(max-width:370px){body.qh-page .qh-form .qh-search-categories.iha-r327-native-modes{column-gap:12px!important}}

/* R331: radio selector is an inline control, not a framed card. Keep names and values untouched. */
body.qh-page .qh-form fieldset.qh-scope,
body.qh-page .qh-form fieldset.qh-search-categories {
  min-inline-size:0!important;min-width:0!important;max-width:100%!important;
  margin:0 0 10px!important;padding:0!important;border:0!important;
  border-radius:0!important;box-shadow:none!important;background:transparent!important;
}
body.qh-page .qh-form fieldset.qh-scope > legend,
body.qh-page .qh-form fieldset.qh-search-categories > legend {
  float:none!important;width:auto!important;padding:0!important;margin:0 0 5px!important;
  border:0!important;background:transparent!important;
  font:600 13px/1.45 system-ui,sans-serif!important;color:inherit!important;
}
body.qh-page .qh-form fieldset.qh-scope > .qh-radio-row,
body.qh-page .qh-form fieldset.qh-search-categories {
  gap:5px 16px!important;
}
body.qh-page .qh-form fieldset.qh-scope > .qh-radio-row {
  display:flex!important;flex-flow:row wrap!important;align-items:center!important;
  justify-content:flex-start!important;width:100%!important;
  padding:0!important;margin:0!important;border:0!important;box-shadow:none!important;
  background:transparent!important;
}
body.qh-page .qh-form fieldset.qh-search-categories {
  display:flex!important;flex-flow:row wrap!important;align-items:center!important;
  justify-content:flex-start!important;
}
body.qh-page .qh-form fieldset.qh-search-categories > legend {
  flex:0 0 100%!important;
}
body.qh-page .qh-form fieldset.qh-scope > .qh-radio-row > label,
body.qh-page .qh-form fieldset.qh-search-categories > label,
body.qh-page .iha-r324-modes > label,
body.qh-page .iha-r324-plan-options > label {
  display:inline-flex!important;flex-direction:row!important;align-items:center!important;
  justify-content:flex-start!important;gap:6px!important;
  width:auto!important;max-width:100%!important;min-width:0!important;
  padding:5px 0!important;margin:0!important;
  border:0!important;border-radius:0!important;box-shadow:none!important;
  background:transparent!important;white-space:nowrap!important;
  font:500 clamp(12px,2.75vw,14px)/1.4 system-ui,sans-serif!important;
  cursor:pointer!important;
}
body.qh-page .qh-form fieldset.qh-scope > .qh-radio-row > label > input[type=radio],
body.qh-page .qh-form fieldset.qh-search-categories > label > input[type=radio] {
  display:inline-block!important;flex:0 0 16px!important;width:16px!important;height:16px!important;
  margin:0!important;accent-color:#27633e!important;
}
body.qh-page .qh-form fieldset.qh-scope > details {
  max-width:100%;margin-top:8px;
}
@media(max-width:370px) {
 body.qh-page .qh-form fieldset.qh-search-categories {gap:3px 10px!important}
 body.qh-page .qh-form fieldset.qh-search-categories > label {font-size:12px!important}
}

/* R332: visual section labels within one unified Pick Books catalogue. */
body.qh-page .qh-form .qh-books .qh-book-group-title {
  grid-column:1/-1;display:block;width:100%;margin:12px 0 5px;padding:6px 0;
  font:600 13px/1.4 system-ui,sans-serif;color:#23543b;
  border:0;border-bottom:1px solid rgba(35,84,59,.16);background:transparent;
}


/* R335: Murajaah matches the search workspace, without two giant disclosure cards. */
body.qh-page .qh-plan-intro{margin:0 0 18px;padding:0;}
body.qh-page .qh-plan-intro h2{font-size:clamp(18px,3.5vw,24px);line-height:1.3;margin:0 0 5px;}
body.qh-page .qh-plan-intro p{font-size:14px;line-height:1.5;margin:0;color:#66766a;}
body.qh-page .qh-plan-categories.qh-murajaah-compact{display:block;border:1px solid #dce7dc;border-top:3px solid #087447;border-radius:16px;background:#fff;padding:clamp(16px,3vw,24px);margin:0;}
body.qh-page .qh-murajaah-radio{border:0!important;box-shadow:none!important;background:transparent!important;margin:0 0 16px!important;padding:0!important;min-width:0;display:flex;flex-wrap:wrap;align-items:center;gap:10px 20px;}
body.qh-page .qh-murajaah-radio legend{display:block;width:100%;float:none;font:600 14px/1.4 system-ui,sans-serif;color:#204e38;padding:0;margin:0 0 12px;}
body.qh-page .qh-murajaah-radio label{display:inline-flex!important;align-items:center!important;gap:8px!important;margin:0!important;padding:0!important;width:auto!important;border:0!important;background:none!important;box-shadow:none!important;color:#20503a;font:500 14px/1.35 system-ui,sans-serif;cursor:pointer;white-space:nowrap;}
body.qh-page .qh-murajaah-radio input{width:18px!important;height:18px!important;min-width:18px;margin:0;accent-color:#067348;}
body.qh-page .qh-murajaah-option-panel{border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;margin:0!important;padding:0!important;}
body.qh-page .qh-murajaah-option-panel[hidden]{display:none!important;}
body.qh-page .qh-murajaah-option-panel > summary{display:none!important;}
body.qh-page .qh-murajaah-option-panel > ol{margin:0!important;padding:0!important;}
@media(max-width:420px){body.qh-page .qh-murajaah-radio{gap:10px 14px}body.qh-page .qh-murajaah-radio label{font-size:13px}}

/* R336 — Murajaah: same visual density as the two search workspaces. */
body.qh-page .qh-plan-categories.qh-murajaah-compact.qh-murajaah-r336{
  width:100%;box-sizing:border-box;display:block;
  margin:0!important;padding:clamp(12px,2.6vw,20px)!important;
  border:1px solid #dce7dc!important;border-top:3px solid #087447!important;
  border-radius:14px!important;background:#fff!important;box-shadow:none!important;
}
body.qh-page .qh-murajaah-r336 fieldset.qh-murajaah-radio{
  box-sizing:border-box!important;display:flex!important;flex-flow:row wrap!important;
  align-items:center!important;justify-content:flex-start!important;gap:6px 18px!important;
  margin:0 0 12px!important;padding:0!important;min-width:0!important;
  width:100%!important;border:0!important;outline:0!important;
  border-radius:0!important;box-shadow:none!important;background:transparent!important;
}
body.qh-page .qh-murajaah-r336 .qh-murajaah-radio legend{
  float:none!important;width:100%!important;margin:0 0 6px!important;
  padding:0!important;border:0!important;box-shadow:none!important;
  font:600 13px/1.45 system-ui,sans-serif!important;color:#204e38!important;
}
body.qh-page .qh-murajaah-r336 .qh-murajaah-radio label{
  display:inline-flex!important;align-items:center!important;flex-direction:row!important;
  gap:6px!important;width:auto!important;min-width:0!important;max-width:100%!important;
  padding:5px 0!important;margin:0!important;white-space:nowrap!important;
  border:0!important;outline:0!important;box-shadow:none!important;background:transparent!important;
  font:500 clamp(12px,2.75vw,14px)/1.4 system-ui,sans-serif!important;
}
body.qh-page .qh-murajaah-r336 .qh-murajaah-radio input[type=radio]{
  flex:0 0 16px!important;width:16px!important;height:16px!important;
  min-width:16px!important;margin:0!important;accent-color:#087447!important;
}
body.qh-page .qh-results:has(> .qh-murajaah-r336),
body.qh-page .qh-results:has(.qh-murajaah-r336){margin-top:0!important;padding-top:0!important;}
body.qh-page .qh-murajaah-r336 .qh-murajaah-option-panel > ol{padding:0!important;margin:0!important;}
@media(max-width:390px){body.qh-page .qh-murajaah-r336 fieldset.qh-murajaah-radio{gap:3px 12px!important;}}

/* R337: unframed Murajaah radio, matching the Ayat & Tafsir inline selector.
   Use a DIV radiogroup rather than a browser-styled FIELDSET/LEGEND.
   Existing native radio inputs, selectable labels and progress links remain intact. */
body.qh-page .qh-plan-categories.qh-murajaah-compact.qh-murajaah-r336{padding:clamp(12px,2.6vw,20px)!important;}
body.qh-page .qh-murajaah-r336 .qh-murajaah-radio-r337{
  display:flex!important;flex-direction:row!important;flex-wrap:wrap!important;
  align-items:center!important;justify-content:flex-start!important;
  column-gap:clamp(12px,2.4vw,20px)!important;row-gap:6px!important;
  padding:0!important;margin:0 0 16px!important;width:100%!important;
  min-width:0!important;max-width:100%!important;box-sizing:border-box!important;
  border:0!important;outline:0!important;border-radius:0!important;
  box-shadow:none!important;background:transparent!important;
}
body.qh-page .qh-murajaah-r336 .qh-murajaah-radio-r337 > label{
  display:inline-flex!important;flex-direction:row!important;align-items:center!important;
  width:auto!important;min-width:0!important;max-width:100%!important;
  gap:7px!important;padding:4px 0!important;margin:0!important;
  color:#20503a!important;background:transparent!important;
  border:0!important;border-radius:0!important;box-shadow:none!important;
  font:500 clamp(12px,2.75vw,14px)/1.4 system-ui,sans-serif!important;
  white-space:nowrap!important;cursor:pointer!important;
}
body.qh-page .qh-murajaah-r336 .qh-murajaah-radio-r337 input[type=radio]{
  appearance:auto!important;display:inline-block!important;flex:0 0 17px!important;
  width:17px!important;height:17px!important;min-width:17px!important;
  margin:0!important;padding:0!important;accent-color:#087447!important;
}
body.qh-page .qh-murajaah-r336 .qh-murajaah-radio-r337 input[type=radio]:focus-visible{
  outline:2px solid #087447!important;outline-offset:3px!important;
}
@media(max-width:370px){body.qh-page .qh-murajaah-r336 .qh-murajaah-radio-r337{column-gap:12px!important;}}


/* R338 — fullscreen page-first, single safe exit zone.
   Preserve the source page aspect ratio, text, markers and gestures. */








/* R339: fullscreen fallback must occupy the viewport when native API is unavailable.
   Separate native and fallback behavior; do not clip or modify mushaf source. */




/* R340: shared fullscreen layout for phones, tablets and desktop viewports.
   The facsimile remains aspect-preserving; empty source pixels are not cropped. */






/* Desktop mini, laptop, wide monitor: limit only the image's available extent,
   never upscale pixels to fill large monitors or force a two-page spread. */





/* R341: repair fullscreen DOM hierarchy without intercepting book-turn events.
   Fullscreen keeps the EXISTING facsimile stage and its bound pointer handlers. */






/* R344: the animation layer is anchored to the leaves, not the stage viewport.
   This prevents a doubled/stretching turn in native and fallback fullscreen. */
.qh-book-reader .qh-leaves{position:relative!important}
.qh-book-reader .qh-leaves>.qh-curl-canvas{
 position:absolute!important;inset:0!important;display:block!important;
 width:100%!important;height:100%!important;max-width:none!important;
 margin:0!important;padding:0!important;pointer-events:none!important;
 z-index:6!important;box-sizing:border-box!important;object-fit:fill!important;
}

/* R345: shared full-page reader in Quran/Tafsir and Hadith/Sharh.
   Reuse one reader engine; never alter the native Murajaah page. */
.qh-shared-book-open{appearance:none;background:transparent;border:1px solid #bfd2c4;color:#0a5e3d;border-radius:999px;padding:.42rem .82rem;font:inherit;font-size:.88rem;cursor:pointer;white-space:nowrap;margin-inline-start:auto}
.qh-shared-book-open:focus-visible,.qh-shared-book-close:focus-visible{outline:3px solid #247852;outline-offset:3px}
.qh-results>.qh-shared-book-open{display:block;margin:0 0 1rem auto}
.qh-shared-book-overlay[hidden]{display:none!important}
.qh-shared-book-overlay{position:fixed;inset:0;z-index:2147480000;display:flex;flex-direction:column;overflow:hidden;background:#f8f6ee;color:#173d2e;overscroll-behavior:contain}
.qh-shared-book-bar{display:flex;flex:none;align-items:center;justify-content:space-between;gap:1rem;padding:.55rem max(.75rem,env(safe-area-inset-right)) .55rem max(.75rem,env(safe-area-inset-left));background:#fffdf8;border-bottom:1px solid #cbdad0;min-height:48px}
.qh-shared-book-bar strong{font-size:1rem;font-weight:600}
.qh-shared-book-close{appearance:none;border:1px solid #c5d5c9;border-radius:8px;background:#fffdf8;color:#154f37;font:inherit;padding:.35rem .7rem;cursor:pointer}
.qh-shared-book-content{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable}
.qh-shared-book-content>.qh-book-reader{display:block;width:min(100%,1400px);max-width:1400px;margin:0 auto;padding:0 min(1vw,12px)}
.qh-shared-book-status{padding:1.2rem}
.qh-shared-book-overlay .qh-facsimile-stage{touch-action:pan-y}

@media(max-width:600px){.qh-shared-book-bar{padding:.45rem .65rem}.qh-shared-book-content>.qh-book-reader{padding:0}.qh-shared-book-open{font-size:.83rem}}


/* R346 — Unified Madinah paper and page-first fullscreen (native and fallback).
   Actual page PNGs are transparent. One paper pigment belongs to the book,
   leaf slots, stage AND canvas rasterization; never introduce a second paper.
   The page is top-aligned beneath a compact exit safety zone. Its 1024:1656
   ratio is maintained on phone/tablet/desktop. No cropping or stretching. */
.qh-book-reader { --iha-mushaf-paper:#fffcf3; }
.qh-book-reader .qh-facsimile-stage,
.qh-book-reader .qh-leaves,
.qh-book-reader .qh-leaves:has(>.qh-facsimile-image:nth-child(2)),
.qh-book-reader .qh-leaves>.qh-facsimile-image,
.qh-book-reader .qh-blank-leaf {
  background:var(--iha-mushaf-paper)!important;
}







/* R350 — evidence table shared by Ayat Terkait and Hadis Terkait. */
.iha-intertextual{max-width:100%;overflow-x:auto;overscroll-behavior-inline:contain}
.iha-intertextual-table{width:100%;border-collapse:collapse;table-layout:fixed;text-align:start;color:inherit;font-size:.91rem;line-height:1.5}
.iha-intertextual-table th,.iha-intertextual-table td{padding:9px 10px;vertical-align:top;text-align:start;border-bottom:1px solid rgba(28,76,47,.15);overflow-wrap:anywhere}
.iha-intertextual-table th{font-size:.8rem;font-weight:700;color:#26583b;border-bottom:1px solid rgba(28,76,47,.32)}
.iha-intertextual-table th:first-child{width:35%}.iha-intertextual-table th:nth-child(2){width:21%}
.iha-intertextual-table a{font-weight:650;text-underline-offset:3px;color:#155636}
.iha-intertextual-source,.iha-intertextual-status{display:block;font-size:.76rem;font-weight:400;color:#587260;margin-top:2px}
.iha-intertextual-proof{margin:0!important;padding:0!important;border:0!important;background:none!important;box-shadow:none!important}
.iha-intertextual-proof summary{font-weight:450!important;cursor:pointer;line-height:1.55;list-style:revert!important;overflow-wrap:anywhere;padding:0!important;background:none!important}
.iha-intertextual-proof p{margin:.4rem 0 0;line-height:1.65;font-size:.83rem;overflow-wrap:anywhere}
.iha-intertextual-proof .iha-intertextual-quote{font-size:1.05rem;line-height:1.9;text-align:right}
@media(max-width:520px){.iha-intertextual-table{font-size:.8rem}.iha-intertextual-table th,.iha-intertextual-table td{padding:8px 5px}.iha-intertextual-table th:first-child{width:37%}.iha-intertextual-table th:nth-child(2){width:23%}}

.iha-intertextual-proof summary::marker{font-size:.7em;color:#5b7866}
.iha-intertextual-proof summary::-webkit-details-marker{color:#5b7866}

/* R351: public evidence tables keep research metadata private and read naturally on mobile. */
.iha-intertextual-table th,.iha-intertextual-table td{overflow-wrap:break-word;word-break:normal}
.iha-intertextual-table th:first-child{width:30%}.iha-intertextual-table th:nth-child(2){width:28%}
@media(max-width:520px){.iha-intertextual-table th:first-child{width:28%}.iha-intertextual-table th:nth-child(2){width:29%}}

/* R356: disciplined 3-column scientific evidence reading across narrow screens. */
.iha-intertextual{margin-block:0.35rem;max-width:100%;overflow-x:auto;scrollbar-width:thin}
.iha-intertextual-table{font-size:.91rem;line-height:1.56}
.iha-intertextual-table th:first-child{width:24%}
.iha-intertextual-table th:nth-child(2){width:26%}
.iha-intertextual-table th:last-child{width:50%}
.iha-intertextual-table td:nth-child(2){word-break:normal;overflow-wrap:normal;hyphens:none}
.iha-intertextual-proof summary[lang="ar"]{font-size:1.04rem;line-height:1.85;text-align:right;unicode-bidi:isolate}
.iha-intertextual-proof[open] summary{color:#155636}
.iha-intertextual-table tbody tr:last-child td{border-bottom:0}
@media(max-width:540px){
 .iha-intertextual-table{font-size:.78rem;line-height:1.5}
 .iha-intertextual-table th,.iha-intertextual-table td{padding:10px 6px}
 .iha-intertextual-table th:first-child{width:23%}
 .iha-intertextual-table th:nth-child(2){width:29%}
 .iha-intertextual-table th:last-child{width:48%}
 .iha-intertextual-proof summary[lang="ar"]{font-size:.98rem;line-height:1.9}
 .iha-intertextual-source{font-size:.71rem}
}

/* R357: visually compact, evidence-first public reading. Internal review status stays private. */
.iha-intertextual-table td{vertical-align:top}
.iha-intertextual-table td:first-child a{font-weight:600;text-decoration-thickness:1px;text-underline-offset:3px}
.iha-intertextual-proof summary{transition:color .16s ease}
.iha-intertextual-proof[open]{padding-block:.08rem}
@media(max-width:390px){
 .iha-intertextual-table{font-size:.76rem}
 .iha-intertextual-table th,.iha-intertextual-table td{padding:8px 5px}
 .iha-intertextual-table td:nth-child(2){word-break:keep-all;overflow-wrap:normal}
 .iha-intertextual-proof summary[lang="ar"]{font-size:.94rem;line-height:1.95}
}

/* R358: canonical compact evidence table on both reading directions. */
.r276-reader-panel .iha-intertextual{width:100%;min-width:0;overflow-x:auto;margin:0;scrollbar-width:thin}
.r276-reader-panel .iha-intertextual-table{min-width:400px;table-layout:fixed;border-spacing:0;background:transparent}
.r276-reader-panel .iha-intertextual-table th:first-child{width:29%}
.r276-reader-panel .iha-intertextual-table th:nth-child(2){width:27%}
.r276-reader-panel .iha-intertextual-table th:nth-child(3){width:44%}
.r276-reader-panel .iha-intertextual-table tr:hover td{background:rgba(28,100,60,.035)}
.r276-reader-panel .iha-intertextual-table td[lang="ar"],
.r276-reader-panel .iha-intertextual-proof [lang="ar"]{font-size:1.05em;line-height:1.85;unicode-bidi:isolate}
.r276-reader-panel .iha-intertextual-proof summary{color:inherit;overflow-wrap:break-word}
.r276-reader-panel .iha-intertextual-proof summary:focus-visible{outline:2px solid #24744c;outline-offset:3px;border-radius:3px}
.r276-reader-panel .iha-intertextual-source{font-size:.75rem;line-height:1.55;color:#516c59}
@media(max-width:520px){
 .r276-reader-panel .iha-intertextual-table{min-width:0;font-size:.79rem}
 .r276-reader-panel .iha-intertextual-table th,.r276-reader-panel .iha-intertextual-table td{padding:8px 4px}
 .r276-reader-panel .iha-intertextual-proof p{font-size:.76rem;line-height:1.6}
}

@media(max-width:520px){.r276-reader-panel .iha-intertextual-table th:first-child{width:29%}.r276-reader-panel .iha-intertextual-table th:nth-child(2){width:27%}.r276-reader-panel .iha-intertextual-table th:nth-child(3){width:44%}}


/* R359: canonical page geometry for all three tabs and both fullscreen modes.
   Previous generations' conflicting fullscreen selectors were consolidated. */
.qh-book-reader{--iha-mushaf-paper:#fffcf3;--iha-page-count:1;--iha-page-height:min(130vh,1250px)}
.qh-book-reader .qh-facsimile-stage{min-width:0;box-sizing:border-box}
.qh-book-reader .qh-leaves{display:flex!important;direction:rtl;position:relative!important;
  margin:0 auto!important;max-width:100%!important;box-sizing:border-box!important;
  width:min(100%,calc(var(--iha-page-height) * 1024 / 1656 * var(--iha-page-count)))!important;
  height:auto!important;background:var(--iha-mushaf-paper)!important}
.qh-book-reader .qh-leaves>.qh-facsimile-image{position:relative!important;display:block!important;
  flex:1 1 0!important;min-width:0!important;max-width:100%!important;
  width:calc(100% / var(--iha-page-count))!important;
  height:auto!important;aspect-ratio:1024 / 1656;
  background:var(--iha-mushaf-paper)!important;box-sizing:border-box!important}
.qh-book-reader .qh-page-image{display:block!important;width:100%!important;
  height:auto!important;max-width:100%!important;aspect-ratio:1024 / 1656;
  object-fit:contain!important;transform:none!important;backface-visibility:visible!important}
.qh-book-reader .qh-leaves>.qh-curl-canvas{position:absolute!important;inset:0!important;
  width:100%!important;height:100%!important;max-width:none!important;
  display:block!important;pointer-events:none!important;z-index:6!important}
/* Fullscreen shows only the unchanged leaf surface and a compact exit control. */
.qh-book-reader.iha-book-fullscreen{--iha-fs-clear:calc(46px + env(safe-area-inset-top,0px) + env(safe-area-inset-bottom,0px));
  --iha-page-height:calc(100dvh - var(--iha-fs-clear));
  position:fixed!important;inset:0!important;z-index:2147482500!important;
  display:flex!important;flex-direction:column!important;box-sizing:border-box!important;
  width:100vw!important;height:100dvh!important;min-height:0!important;
  max-width:none!important;max-height:none!important;overflow:hidden!important;
  margin:0!important;padding:0!important;border:0!important;border-radius:0!important;
  background:#eee9df!important;overscroll-behavior:contain!important}
.qh-book-reader.iha-book-fullscreen>.qh-facsimile,
.qh-book-reader.iha-book-fullscreen .qh-facsimile>.qh-reader-grid,
.qh-book-reader.iha-book-fullscreen>.qh-reader-grid{display:flex!important;flex:1 1 auto!important;
  flex-direction:column!important;width:100%!important;height:100%!important;
  min-height:0!important;max-width:none!important;max-height:none!important;
  margin:0!important;padding:0!important;overflow:hidden!important;border:0!important;box-shadow:none!important}
.qh-book-reader.iha-book-fullscreen>.qh-facsimile>:not(.qh-reader-grid):not(.qh-facsimile-stage),
.qh-book-reader.iha-book-fullscreen>:not(.qh-facsimile):not(.qh-reader-grid):not(.iha-mushaf-fs-exit),
.qh-book-reader.iha-book-fullscreen .qh-reader-grid>.qh-reader-action-pane,
.qh-book-reader.iha-book-fullscreen .qh-facsimile-heading,
.qh-book-reader.iha-book-fullscreen .qh-book-navigation,
.qh-book-reader.iha-book-fullscreen .qh-book-jump,
.qh-book-reader.iha-book-fullscreen .qh-book-help,
.qh-book-reader.iha-book-fullscreen .qh-book-feedback,
.qh-book-reader.iha-book-fullscreen .qh-page-text,
.qh-book-reader.iha-book-fullscreen .qh-provenance,
.qh-book-reader.iha-book-fullscreen .qh-ayah-regions,
.qh-book-reader.iha-book-fullscreen .qh-source-identity{display:none!important}
.qh-book-reader.iha-book-fullscreen .qh-facsimile-stage,
.qh-book-reader.iha-book-fullscreen .qh-reader-grid>.qh-facsimile-stage,
.qh-book-reader.iha-book-fullscreen .qh-facsimile>.qh-reader-grid>.qh-facsimile-stage{
  box-sizing:border-box!important;display:flex!important;flex:1 1 auto!important;
  flex-direction:column!important;align-items:center!important;justify-content:safe center!important;
  width:100%!important;height:100%!important;min-width:0!important;min-height:0!important;
  max-width:100%!important;max-height:100%!important;
  margin:0!important;padding:calc(42px + env(safe-area-inset-top,0px))
    max(4px,env(safe-area-inset-right,0px)) env(safe-area-inset-bottom,0px)
    max(4px,env(safe-area-inset-left,0px))!important;
  overflow:auto!important;touch-action:pan-y!important;overscroll-behavior:contain!important;
  background:#eee9df!important}
.qh-book-reader.iha-book-fullscreen .qh-leaves{
  flex:0 0 auto!important;align-self:center!important;
  width:min(100%,calc(var(--iha-page-height) * 1024 / 1656 * var(--iha-page-count)))!important;
  max-height:none!important;margin:auto!important;box-shadow:none!important}
.qh-book-reader.iha-book-fullscreen .qh-leaves>.qh-facsimile-image,
.qh-book-reader.iha-book-fullscreen .qh-page-image{max-height:none!important;
  object-fit:contain!important;box-shadow:none!important}
.qh-book-reader.iha-book-fullscreen>.iha-mushaf-fs-exit{display:inline-flex!important;
  position:fixed!important;top:calc(6px + env(safe-area-inset-top,0px))!important;
  right:calc(8px + env(safe-area-inset-right,0px))!important;
  z-index:2147483001!important;align-items:center!important;justify-content:center!important;
  min-width:52px!important;min-height:34px!important;max-width:72px!important;
  margin:0!important;padding:5px 9px!important;border-radius:8px!important;
  border:1px solid #b9c9b7!important;background:#fffdf8f2!important;
  color:#174b35!important;font:600 12px/1.35 system-ui,sans-serif!important;
  cursor:pointer!important;box-shadow:0 2px 9px #0002!important}
@media(max-width:900px){.qh-book-reader{--iha-page-height:min(115vh,1150px)}}
@media(orientation:landscape) and (max-height:600px){
 .qh-book-reader.iha-book-fullscreen{--iha-fs-clear:calc(40px + env(safe-area-inset-top,0px) + env(safe-area-inset-bottom,0px))}
 .qh-book-reader.iha-book-fullscreen .qh-facsimile-stage,
 .qh-book-reader.iha-book-fullscreen .qh-reader-grid>.qh-facsimile-stage{padding-top:calc(36px + env(safe-area-inset-top,0px))!important}
}
@media(prefers-reduced-motion:reduce){.qh-book-reader .qh-curl-canvas{display:none!important}}

/* R359 pinch / wheel zoom: real leaf dimensions grow, allowing native panning. */
.qh-book-reader[data-book-zoom]:not([data-book-zoom="1.00"]) .qh-leaves{max-width:none!important}
.qh-book-reader.iha-book-fullscreen[data-book-zoom]:not([data-book-zoom="1.00"]) .qh-leaves{max-width:none!important}
.qh-book-reader[data-book-zoom]:not([data-book-zoom="1.00"]) .qh-facsimile-stage,
.qh-book-reader.iha-book-fullscreen[data-book-zoom]:not([data-book-zoom="1.00"]) .qh-facsimile-stage{
  align-items:flex-start!important;justify-content:flex-start!important;overflow:auto!important
}

/* R360: the only fullscreen overlay besides Exit is a transient, reader-facing
   failure notice. Blank state must not make an unavailable page seem frozen. */
.qh-book-reader.iha-book-fullscreen>.qh-book-feedback:not(:empty){
  display:block!important;position:fixed!important;
  z-index:2147483000!important;left:50%!important;bottom:calc(10px + env(safe-area-inset-bottom,0px))!important;
  transform:translateX(-50%)!important;max-width:min(88vw,390px)!important;
  padding:7px 11px!important;border-radius:7px!important;
  background:rgba(255,253,247,.95)!important;color:#244738!important;
  border:1px solid #d0dccc!important;font:500 13px/1.45 system-ui,sans-serif!important;
  text-align:center!important;pointer-events:none!important;
}
.qh-book-reader.iha-book-fullscreen .qh-facsimile-stage{
  cursor:default;
}

/* R360 public Murajaah reader: two complete leaves on laptop/desktop, one on phone.
   Change only the canonical book surface; never touch other tab's layout. */
@media (min-width:1024px){
  .qh-book-reader:not(.iha-book-fullscreen)>.qh-facsimile{width:100%!important;max-width:100%!important;box-sizing:border-box!important}
  .qh-book-reader:not(.iha-book-fullscreen) .qh-reader-grid{display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:12px!important;grid-template-columns:none!important}
  .qh-book-reader:not(.iha-book-fullscreen) .qh-reader-grid>.qh-facsimile-stage{order:0!important;width:100%!important;min-width:0!important;max-width:100%!important;grid-column:auto!important;grid-row:auto!important}
  .qh-book-reader:not(.iha-book-fullscreen) .qh-reader-grid>.qh-reader-action-pane{order:1!important;width:100%!important;max-width:100%!important;grid-column:auto!important;grid-row:auto!important;position:static!important}
  .qh-book-reader:not(.iha-book-fullscreen) .qh-reader-action-pane .qh-reader-actions{display:flex!important;flex-wrap:wrap!important;gap:8px!important}
  .qh-book-reader:not(.iha-book-fullscreen){--iha-page-height:min(100vh,950px)}
}
.qh-book-reader:not(.iha-book-fullscreen) .qh-leaves{border-radius:3px!important;box-shadow:0 8px 24px rgba(50,45,32,.13),0 1px 3px rgba(50,45,32,.13)!important}
.qh-book-reader:not(.iha-book-fullscreen) .qh-facsimile-stage{background:#f6f3eb!important;border-radius:8px!important;padding:12px!important}
.qh-book-reader.iha-book-fullscreen .qh-leaves{box-shadow:0 6px 28px rgba(49,43,32,.14)!important}
.qh-book-reader.iha-book-fullscreen .qh-facsimile-stage{cursor:grab;touch-action:pan-y!important}
.qh-book-reader.iha-book-fullscreen .qh-facsimile-stage:active{cursor:grabbing}
@media(max-width:700px){
 .qh-book-reader:not(.iha-book-fullscreen) .qh-facsimile-stage{padding:5px!important}
 .qh-book-reader .qh-leaves{box-shadow:0 3px 12px rgba(50,45,32,.08)!important}
}

/* R360 cohesive: the same book page turn is available in normal/fullscreen.
   The responsive reader's stage must allow horizontal pointer gestures without
   disabling normal vertical document scrolling on phones. */
.qh-book-reader .qh-facsimile-stage{touch-action:pan-y!important}
.qh-book-reader:not(.iha-book-fullscreen) .qh-facsimile-stage{cursor:grab}
.qh-book-reader:not(.iha-book-fullscreen) .qh-facsimile-stage:active{cursor:grabbing}
.qh-book-reader .qh-leaves{isolation:isolate}
@media(min-width:1024px){
  .qh-book-reader:not(.iha-book-fullscreen) .qh-leaves:has(>.qh-facsimile-image:nth-child(2)){
    box-shadow:0 12px 32px rgba(35,31,23,.12),0 2px 5px rgba(35,31,23,.08)!important
  }
  .qh-book-reader .qh-leaves:has(>.qh-facsimile-image:nth-child(2)):after{
    content:'';pointer-events:none;position:absolute;z-index:4;top:0;bottom:0;left:calc(50% - 7px);
    width:14px;background:linear-gradient(90deg,rgba(46,34,17,.11),rgba(255,255,255,.15) 47%,rgba(46,34,17,.08));
  }
}

/* R360 integrated: a facsimile must look like printed pages, not selected tiles.
   Ayah hit targets remain interactive and accessible from the reader panel. */
.qh-book-reader .qh-ayah-region.is-active{background:transparent!important;outline:0!important}
.qh-book-reader .qh-ayah-region:hover{background:rgba(96,120,80,.09)!important}
.qh-book-reader .qh-ayah-region:focus-visible{background:rgba(96,120,80,.09)!important;outline:2px solid #356c51!important}
.qh-book-reader .qh-leaves{gap:0!important;overflow:hidden;border-radius:3px!important}
.qh-book-reader .qh-leaves>.qh-facsimile-image{border-radius:0!important;box-shadow:none!important}
.qh-book-reader[data-iha-spread="2"] .qh-leaves{background:linear-gradient(90deg,#f7f1e3,#fffdf3 49%,#d5c5a7 50%,#fffdf3 51%,#f7f1e3)!important}
.qh-book-reader .qh-leaves:has(>.qh-facsimile-image:nth-child(2)):after{content:'';pointer-events:none;position:absolute;z-index:4;top:0;bottom:0;left:calc(50% - 6px);width:12px;background:linear-gradient(90deg,rgba(48,40,24,.09),rgba(255,255,255,.15),rgba(48,40,24,.12))}
.qh-book-reader .qh-facsimile-stage{touch-action:pan-y!important}
@media(max-width:1023px){.qh-book-reader:not(.iha-book-fullscreen) .qh-facsimile-stage{padding:4px!important;background:transparent!important}}

/* R361: contextual Ayat Terkait destination picker, not a second reader. */
.qh-shared-verse-choices{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}
.qh-shared-verse-choices button,.iha-related-open-mushaf{display:inline-flex;align-items:center;justify-content:center;border:1px solid #b6cfc0;border-radius:8px;background:#fffdf7;color:#18553b;padding:7px 12px;font:inherit;font-size:.9em;cursor:pointer;text-decoration:none}
.qh-shared-verse-choices button:hover,.iha-related-open-mushaf:hover{background:#edf5ed}
.qh-shared-verse-choices button:focus-visible,.iha-related-open-mushaf:focus-visible{outline:2px solid #11643d;outline-offset:3px}
/* R361: an embedded reader must take the real desktop width, not intrinsic
   shrink-to-fit width inherited from an empty modal status container. */
.qh-shared-book-overlay .qh-shared-book-content{width:100%;max-width:1400px;box-sizing:border-box;min-width:0;margin-inline:auto}
.qh-shared-book-overlay .qh-shared-book-content>.qh-book-reader{width:100%;max-width:100%;box-sizing:border-box}


/* R364 — Source navigation: modest, keyboard accessible and consistent on phones.
   Style only the existing return link; do not introduce a redundant toolbar. */
.qh-page .qh-main > .qh-back{
  display:inline-flex;align-items:center;justify-content:center;
  gap:.45rem;min-height:42px;max-width:100%;width:fit-content!important;justify-self:start;align-self:flex-start;
  padding:.57rem 1rem;margin:0 0 1.15rem;
  border:1px solid #c4d4c7;border-radius:10px;
  background:#fffdf7;color:#19553c;
  box-shadow:0 1px 3px rgba(25,65,44,.045);
  text-decoration:none;text-align:center;
  font:600 .875rem/1.35 system-ui,sans-serif;
  margin-inline-start:max(24px,calc(50% - 560px))!important;
  white-space:normal;overflow-wrap:anywhere;
  transition:background-color .16s ease,border-color .16s ease,box-shadow .16s ease;
}
.qh-page .qh-main > .qh-back:hover{
  background:#f0f5ee;border-color:#91b39b;
  box-shadow:0 3px 10px rgba(25,65,44,.09);
}
.qh-page .qh-main > .qh-back:focus-visible{
  outline:3px solid #a78235;outline-offset:3px;
}
@media(max-width:600px){
  .qh-page .qh-main > .qh-back{min-height:44px;padding:.65rem .85rem;font-size:.84rem;margin-inline-start:18px!important}
}
@media(prefers-reduced-motion:reduce){
  .qh-page .qh-main > .qh-back{transition:none}
}

/* R367 public reading standard: no technical provenance or source-description accordions.
   No modification to canonical source identity, licensing metadata or scholarly citations. */
.qh-page .qh-provenance,
.qh-page .iha-r319-source,
.qh-page .iha-r324-attribution{display:none!important}

/* Cumulative completion: a frame outside the unchanged canonical print surface.
   1120x1776 leaf = 1024x1656 print + 48px sides and 60px top/bottom.
   Hit regions and animation use these same coordinates. */
.qh-book-reader .qh-leaves>.qh-facsimile-image,
.qh-facsimile .qh-facsimile-image{
  aspect-ratio:1120 / 1776!important;padding:0!important;
  background-color:var(--iha-mushaf-paper,#fffcf3)!important;
  background-image:url('/public/assets/mushaf/madinah/frame-classic.svg?v=9c03dde9539c8ffd')!important;
  background-position:center!important;background-size:100% 100%!important;
  background-repeat:no-repeat!important;
}
.qh-facsimile .qh-facsimile-image>.qh-page-image{
  width:91.4285714286%!important;max-width:91.4285714286%!important;
  height:auto!important;aspect-ratio:1024 / 1656!important;
  position:absolute!important;left:4.2857142857%!important;top:3.3783783784%!important;
  margin:0!important;
  object-fit:contain!important;transform:none!important;
}
.qh-facsimile .qh-facsimile-image>.qh-ayah-regions{
  inset:3.3783783784% 4.2857142857%!important;
}
.qh-book-reader .qh-leaves{
  width:min(100%,calc(var(--iha-page-height) * 1120 / 1776 * var(--iha-page-count)))!important;
}
.qh-book-reader.iha-book-fullscreen .qh-leaves{
  width:min(100%,calc(var(--iha-page-height) * 1120 / 1776 * var(--iha-page-count)))!important;
}
.qh-book-reader[data-book-zoom]:not([data-book-zoom="1.00"]) .qh-leaves{
  max-width:none!important;
}
