/* Our explicit light/dark themes own the palette; disable UA auto-dark repaint. */
:root{color-scheme:only light}
/* Show only the final reading layout, after content, fonts and position settle. */
html[data-classic-pending="true"] body.parchment-page .paper>*,
html[data-classic-pending="true"] body.parchment-page .paper>* *{visibility:hidden!important}
/* The generated image is nine-sliced: curls keep their height on long chapters. */
@font-face{font-family:ClassicMushaf;src:url('assets/ShaikhHamdullahMushaf.ttf') format('truetype');font-display:swap}
@font-face{font-family:ClassicTitleFormal;src:url('assets/Courgette-Regular.ttf') format('truetype');font-weight:400;font-display:swap}
.parchment-page .paper #title{font-family:ClassicTitleFormal,'Palatino Linotype',serif;font-size:clamp(30px,4.5vw,42px);font-weight:400;line-height:1.4;letter-spacing:0;overflow-wrap:anywhere}
.classic-layers{display:flex;gap:6px;margin-right:8px}
.classic-layers button{padding:0 10px;font:14px Arial,sans-serif;border-color:#827b71;color:#bdb6aa}
.classic-layers button[aria-pressed="true"]{border-color:#e8bd81;color:#fff0d6;background:transparent}
.classic-translation,.classic-original{display:block;white-space:pre-line;overflow-wrap:anywhere}
/* The server's initial verses follow the same selection as the loaded reader. */
body.parchment-page[data-classic-translation="false"] #verses .classic-translation,
body.parchment-page[data-classic-original="false"] #verses .verse:has(.classic-translation) .classic-original,
body.parchment-page #verses .classic-reading{display:none}
.parchment-page .paper #verses .verse{line-height:var(--classic-line-spacing,1.65)}
.parchment-page .paper #verses .classic-original{line-height:var(--classic-original-line-spacing,1.9)}
.classic-translation{font-weight:var(--classic-text-weight,400)}
body[data-classic-font="handwriting"] .classic-translation{font-family:ClassicTitleFormal,Georgia,'Times New Roman',serif;font-weight:var(--classic-text-weight,400)}
.classic-original{font-size:clamp(24px,calc(var(--reading-size) * 2 - 12px),80px);line-height:1.9;text-align:start}
.classic-original:lang(ar){font-family:ClassicMushaf,"Traditional Arabic",serif}
.classic-original:lang(he){font-family:"SBL Hebrew","David","Times New Roman",serif}
.classic-translation+.classic-original{margin-top:16px}
.parchment-page .paper a.verse-number{text-decoration:none}
.parchment-page .paper a.verse-number:hover{color:var(--accent)}
.parchment-page a.verse-number:focus-visible,.classic-layers button:focus-visible{outline:2px solid currentColor;outline-offset:4px}
@media(max-width:600px){.parchment-page .simple-topbar{height:auto;min-height:64px;flex-wrap:wrap;padding:10px 13px;gap:10px}.parchment-page .settings{margin-left:auto;flex-wrap:wrap;justify-content:flex-end;align-items:center}.classic-layers{margin-right:2px}.classic-layers button{padding:0 8px;font-size:13px}}
.parchment-page .paper .verse-number{color:var(--ink);border:1px solid currentColor;border-radius:38%;background:transparent;font:600 15px/26px Georgia,"Times New Roman",serif;width:28px;height:28px;top:.45em;font-variant-numeric:lining-nums tabular-nums;box-shadow:inset 0 0 0 2px var(--paper)}
.parchment-page .chapter-ending{display:none;width:180px;max-width:70%;margin:42px auto 0;color:var(--ink)}
.parchment-page .paper:has(#verses .verse) .chapter-ending{display:block}
.chapter-ending svg{display:block;width:100%;height:auto;fill:none;stroke:currentColor;stroke-width:1.2;stroke-linecap:round;stroke-linejoin:round}
.chapter-ending .ending-diamond{fill:currentColor;stroke:none}
@media(max-width:600px){.parchment-page .paper .verse{padding-left:36px}.parchment-page .paper .verse-number{width:27px;height:27px;font-size:14px;line-height:25px}.parchment-page .chapter-ending{margin-top:32px}}
:root:root body.parchment-page{--paper:#f1e3c6;--ink:#30271e;--muted:#7c6952;--accent:#f8941c;background:#141311}
:root:root body.parchment-page .parchment-wrap{max-width:920px;filter:drop-shadow(0 14px 18px #0007)}
:root:root body.parchment-page main{padding:28px 34px 58px}
:root:root body.parchment-page .paper{padding:145px clamp(56px,8vw,100px) 142px;min-height:820px}
:root:root body.parchment-page .paper::before{inset:0;clip-path:none;box-shadow:none;background:none;border-style:solid;border-color:transparent;border-image-source:url('assets/parchment-realistic-v3.webp');border-image-slice:330 135 280 135 fill;border-image-width:150px 72px 140px;border-image-repeat:stretch round}
:root:root body.parchment-page .parchment-roll{display:none}
:root:root body.parchment-page.theme-dark{--paper:#29251e;--ink:#eaddc6;--muted:#bca889;--accent:#f8941c;background:#101010}
:root:root body.parchment-page.theme-dark .paper::before{filter:brightness(.23) saturate(.45)}
@media(max-width:600px){:root:root body.parchment-page main{padding:12px 8px 30px}:root:root body.parchment-page .paper{padding:84px 31px 86px;min-height:650px}:root:root body.parchment-page .paper::before{border-image-width:72px 28px}}
@media screen{
  :root:root body.parchment-page[data-reading-surface="flat"] .paper{--paper:#fff;--ink:#222;--muted:#666;--paper-edge:#d2d2d2;padding-block:54px 52px}
  :root:root body.parchment-page.theme-dark[data-reading-surface="flat"] .paper{--paper:#000;--ink:#eee;--muted:#aaa;--paper-edge:#444}
  :root:root body.parchment-page[data-reading-surface="flat"] .paper::before{border-image:none;background:var(--paper);filter:none}
  :root:root body.parchment-page.theme-dark[data-reading-surface="flat"] .paper::before{border:1px solid #f8941c}
  body.parchment-page[data-reading-surface="flat"] .article-topline{top:20px}
  :root:root:root body.parchment-page.theme-dark .paper #verses .verse-number{color:var(--muted)!important}
}
@media screen and (max-width:760px){
  :root:root body.parchment-page[data-reading-surface="flat"]>main{padding-inline:0!important}
  :root:root body.parchment-page[data-reading-surface="flat"] .paper{padding-left:max(12px,env(safe-area-inset-left));padding-right:max(12px,env(safe-area-inset-right))}
  :root:root body.parchment-page .paper #verses .verse{display:flow-root;padding-inline:0}
  :root:root body.parchment-page .paper .verse-number{position:static;float:inline-start;width:auto;min-width:27px;padding-inline:4px;margin-block:.12em 0;margin-inline:0 8px;direction:ltr}
}
@media print{:root:root body.parchment-page .paper::before{border-image:none;background:white;filter:none}:root:root body.parchment-page .paper{padding:20px;--ink:#222;--accent:#555;--muted:#555}}
