/* R202: three stable columns, one explicit read control, one active reading surface. */
.qh-page .qh-compact-shell{border:1px solid #dce4dc;border-radius:12px;overflow:hidden;background:#fff}
.qh-page .qh-hadith-family>.qh-compact-shell{border:0;border-radius:0}
.qh-page .qh-compact-table{display:table;width:100%;table-layout:fixed;border-collapse:collapse;margin:0;border:0;background:#fff}
.qh-page .qh-compact-table thead{display:table-header-group;background:#f3f6ef}
.qh-page .qh-compact-table tbody{display:table-row-group}
.qh-page .qh-compact-table tr{display:table-row}
.qh-page .qh-compact-table :is(th,td){display:table-cell;border:0;border-bottom:1px solid #e6ebe3;padding:12px 14px;vertical-align:middle}
.qh-page .qh-compact-table th{font:600 12px/1.6 system-ui;color:#60705f;text-align:start}
.qh-page .qh-compact-table :is(th,td):first-child{width:54px;text-align:center}
.qh-page .qh-compact-table :is(th,td):last-child{width:72px;text-align:center}
.qh-page .qh-compact-table tbody tr:last-child td{border-bottom:0}
.qh-page .qh-compact-number,.qh-page .qh-compact-verses td:first-child{font:20px/1.5 'IHA LPMQ',serif;color:#647263}
.qh-page .qh-compact-excerpt{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;overflow-wrap:anywhere;font:22px/1.9 'IHA LPMQ',serif;text-align:right;color:#204933}
.qh-page .qh-compact-unavailable{font:13px/1.7 system-ui;color:#6b776a}
.qh-page .qh-verse-label{display:block;margin-bottom:5px;font:12px/1.5 system-ui;color:#6b776a}
.qh-page .qh-reader-open{display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;border:1px solid #c8ded8;border-radius:10px;background:#f0f7f4;color:#086964;text-decoration:none;vertical-align:middle}
.qh-page .qh-reader-open:hover{background:#e5f1eb;border-color:#8db5a7}
.qh-page .qh-reader-open:focus-visible{outline:3px solid #a18b50;outline-offset:3px}
.qh-page .qh-read-symbol{display:inline-flex;align-items:center;justify-content:center;pointer-events:none}
.qh-page .qh-read-symbol svg{display:block;width:20px;height:20px}
.qh-page .qh-independent-note{padding:0 18px;margin:12px 0;font:12px/1.7 system-ui;color:#687564}
.qh-page .qh-reading-dialog{width:min(760px,94vw);height:min(900px,92dvh);max-width:none;max-height:none;margin:auto;padding:0;border:1px solid #d5dfd3;border-radius:16px;background:#fcfbf6;color:#1e432e;box-shadow:0 24px 100px #15362538;overflow:hidden}
.qh-page .qh-reading-dialog[open]{display:flex;flex-direction:column}
.qh-page .qh-reading-dialog,.qh-page .qh-reading-dialog *{box-sizing:border-box}
.qh-page .qh-reading-dialog [hidden]{display:none!important}
.qh-reading-dialog::backdrop{background:#163a2c7a}
.qh-page .qh-reader-bar{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 20px;border-bottom:1px solid #dde4d7;flex:none;background:#fcfbf6}
.qh-page .qh-reader-bar>div{flex:1;min-width:0}
.qh-page .qh-reader-kind{margin:0 0 4px;font:12px/1.6 system-ui;color:#60735d}
.qh-page #qh-reader-title{margin:0;min-width:0}
.qh-page #qh-reader-title .qh-source-ar{font-size:21px;line-height:1.6}
.qh-page #qh-reader-title .qh-source-latin{font-size:15px;line-height:1.5}
.qh-page .qh-reader-close{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-width:80px;min-height:44px;padding:8px 12px;border:1px solid #cdd9c9;border-radius:8px;background:#f0f4eb;color:#2d553b;font:600 13px/1.5 system-ui;cursor:pointer;flex:none}
.qh-page .qh-reader-close>span{font-size:21px;font-weight:400}
.qh-page .qh-reader-scroll{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable;padding:22px 24px;overflow-anchor:none}
.qh-page .qh-reader-navigation{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 20px;border-top:1px solid #dde4d7;flex:none;background:#fcfbf6}
.qh-page .qh-reader-navigation button{min-height:44px;padding:8px 12px;border:1px solid #d0dccb;border-radius:8px;background:#f3f6ee;color:#355b3f;font:600 12px/1.5 system-ui;cursor:pointer}
.qh-page .qh-reader-navigation button:disabled{opacity:.45;cursor:default}
.qh-page .qh-reader-navigation>span{font:18px/1.5 'IHA LPMQ',serif;color:#657260;white-space:nowrap}
.qh-page .qh-reading-dialog :is(button,summary):focus-visible{outline:3px solid #a18b50;outline-offset:2px}
.qh-page .qh-reading-dialog .qh-hadith-record-body{padding:0!important;min-width:0}
.qh-page .qh-reading-dialog .qh-hadith-view{margin:18px auto 0;max-width:800px}
.qh-page .qh-reading-dialog .qh-hadith-heading{display:none}
.qh-page .qh-reading-dialog .qh-hadith-section{padding:0}
.qh-page .qh-reading-dialog .qh-hadith-view .qh-prose{line-height:2!important}
.qh-page .qh-reading-dialog [data-source-region][hidden],.qh-page .qh-reading-dialog details[hidden]{display:none!important}
.qh-page .qh-reading-dialog .qh-prose{max-width:800px;font-family:'IHA LPMQ',serif!important;font-size:var(--search-arabic-size,26px)!important;line-height:2!important}
.qh-page .qh-reading-dialog .qh-prose>.qh-prose-paragraph{text-align:justify!important;text-align-last:right;direction:rtl;margin-bottom:.8em!important}
.qh-page .qh-reading-dialog .qh-prose>.qh-prose-paragraph:last-child{margin-bottom:0!important}
.qh-page .qh-reading-dialog .qh-copy-source{margin-top:22px}
.qh-page .qh-reader-explanations{margin-top:28px;padding-top:20px;border-top:1px solid #dbe3d4}
.qh-page .qh-reader-explanations-title{margin:0 0 12px;font:600 14px/1.6 system-ui;color:#3b5a3e}
.qh-page .qh-reader-explanation{margin-top:10px;border:1px solid #d9e2d1;border-radius:10px;background:#f7f8f1;overflow:hidden}
.qh-page .qh-reader-explanation .qh-hadith-record>summary{display:flex;align-items:center;gap:12px;min-height:52px;padding:12px 14px;list-style:none;cursor:pointer}
.qh-page .qh-reader-explanation summary::-webkit-details-marker{display:none}
.qh-page .qh-reader-sharh-label{flex:none;font:600 12px/1.6 system-ui;color:#617159}
.qh-page .qh-reader-sharh-name{flex:1;min-width:0;font:16px/1.7 Georgia,'IHA LPMQ',serif;overflow-wrap:anywhere}
.qh-page .qh-reader-sharh-arrow{flex:none;font:20px/1 system-ui;color:#557451}
.qh-page .qh-reader-explanation .qh-hadith-record[open]>summary .qh-reader-sharh-arrow{font-size:0}
.qh-page .qh-reader-explanation .qh-hadith-record[open]>summary .qh-reader-sharh-arrow:after{content:'−';font:20px/1 system-ui}
.qh-page .qh-reader-explanation [data-source-region]{padding:16px 14px;background:#fcfbf6;border-top:1px solid #dce3d5}
.qh-page .qh-reading-dialog.qh-reader-mushaf{width:min(1120px,96vw)}
.qh-page .qh-reading-dialog .qh-facsimile{margin:0 auto;max-width:100%}
.qh-page .qh-reading-dialog .qh-reader-tafsir{overflow:visible;max-height:none}
@media(max-width:650px){
 .qh-page .qh-compact-table :is(th,td){padding:10px 8px}
 .qh-page .qh-compact-table :is(th,td):first-child{width:38px}
 .qh-page .qh-compact-table :is(th,td):last-child{width:60px}
 .qh-page .qh-compact-excerpt{font-size:21px;line-height:1.85}
 .qh-page .qh-reading-dialog,.qh-page .qh-reading-dialog.qh-reader-mushaf{width:100%;height:100dvh;border:0;border-radius:0}
 .qh-page .qh-reader-bar{padding:12px 14px;gap:12px}
 .qh-page .qh-reader-scroll{padding:18px 18px}
 .qh-page .qh-reader-navigation{padding:8px 12px max(8px,env(safe-area-inset-bottom));gap:6px}
 .qh-page .qh-reader-navigation button{padding-inline:10px}
 .qh-page .qh-reader-explanation [data-source-region]{padding:16px 10px}
 .qh-page .qh-reader-explanation .qh-hadith-record>summary{padding:12px 10px;gap:8px}
 .qh-page .qh-reader-mushaf .qh-reader-scroll{padding:12px 8px}
}
@media print{.qh-reading-dialog[open]{position:static!important;width:100%!important;height:auto!important;max-height:none!important}.qh-reading-dialog .qh-reader-scroll{overflow:visible!important}.qh-reader-bar,.qh-reader-navigation{display:none!important}}
/* R203: size controls remain reachable while reading; 44px touch targets. */
.qh-page .qh-reader-type-controls{display:flex;align-items:center;justify-content:flex-end;gap:6px;flex:none;margin:0;padding:4px 20px;border:0;border-bottom:1px solid #e2e7db;border-radius:0;background:#f5f7ef;font:12px/1.5 system-ui;color:#61715c}
.qh-page .qh-reader-type-controls>span{margin-right:auto}
.qh-page .qh-reader-type-controls button{min-width:44px;min-height:44px;padding:6px;border:1px solid transparent;border-radius:7px;background:transparent;color:#30553a;font:600 14px/1.5 system-ui;cursor:pointer}
.qh-page .qh-reader-type-controls button:hover{background:#e7eee0;border-color:#d1ddc8}
.qh-page .qh-reader-type-controls button:disabled{opacity:.4;cursor:default}
.qh-page .qh-reader-type-controls output{min-width:40px;text-align:center;font-variant-numeric:tabular-nums}
@media(max-width:650px){.qh-page .qh-reader-type-controls{padding:2px 14px;gap:3px}}
@media print{.qh-reader-type-controls{display:none!important}}
