/* The mushaf page that mushaf.js draws, in Tarteel's look (Muhammad, 2026-10-24). Every rule the page needs is here, and every
   colour is a token style.css defines on :root for light and dark. */
.mushaf{flex:1;min-height:0;overflow:hidden auto;position:relative;display:flex;flex-direction:column;padding-top:4px;background:var(--page,#F7F5F0);color:var(--page-ink,var(--ink,#171511))}
.mushaf .page{margin:0 auto;direction:rtl;text-rendering:geometricPrecision}
.mushaf .ln{position:relative;z-index:0;display:flex;justify-content:space-between;align-items:center;white-space:nowrap;height:var(--lh);font-size:var(--fs);line-height:1}
.mushaf .ln.c,.mushaf .surah,.mushaf .basmalah{justify-content:center}
/* A word changes colour in the frame it is heard, as Tarteel's (2026-10-25: no fade or colour transition). The ayah markers are
   a shade softer than the text in dark mode, as Tarteel's. */
.mushaf .w{position:relative}
.mushaf .w[data-end]{color:var(--rosette,inherit)}
.mushaf .page-number{margin:2px 0 4px;text-align:center;font-size:13px;line-height:20px;color:var(--muted,#6B665C)}
.mushaf .page-number .en{display:none}
.mushaf-error{margin:auto;padding:0 24px;text-align:center;font-size:14px;color:var(--muted,#6B665C)}

/* The surah banner (an SVG from mushaf.js) with the name centred on its cartouche, then the Bismillah. */
.mushaf .banner{position:relative;width:100%;height:var(--bh)}
.mushaf .banner svg{position:absolute;inset:0;width:100%;height:100%;fill:none;stroke:currentColor;stroke-linejoin:round}
.mushaf .banner span{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;font:calc(var(--bh)*.7)/1 mushaf-names}
.mushaf .basmalah span{font-family:mushaf-p1;font-size:1.04em;translate:0 -.04em;padding:0 .3em;border-radius:.35em}

/* Listening: a gold underline and a faint wash behind the ayah or phrase being played (strips from mushaf.js) and a darker box behind the word. The
   same band marks the ayat he has chosen in Practice (2026-10-25). */
.mushaf .band{position:absolute;z-index:-1;top:50%;height:min(1.5em,calc(var(--lh) - 3px));translate:0 -50%;box-sizing:content-box;margin-left:-.15em;padding:0 .15em;border-radius:.2em .2em 0 0;background:color-mix(in srgb,var(--accent,#A87B1A) 6%,transparent);box-shadow:inset 0 -.09em 0 color-mix(in srgb,var(--accent,#A87B1A) 75%,transparent)}
.mushaf:not(.blank) .basmalah.hl span{background:var(--band,rgba(0,0,0,.055));box-shadow:0 0 0 .08em var(--band,rgba(0,0,0,.055))}
.mushaf .w.playing::before,.mushaf .w.now::before{content:'';position:absolute;z-index:-1;inset:-.25em -.06em;border-radius:.25em}
.mushaf:not(.blank) .w.playing::before{background:var(--wordbox,rgba(0,0,0,.12))}

/* How each word was said, in text colour only, as Tarteel does. Said words stay in ink. */
.mushaf .w.unsaid{color:var(--muted,#6B665C)}
/* Put right after an error sound: red, but green while it is the newest word, the place he is at (Tarteel's sequence). */
.mushaf .w.fixed{color:var(--miss,#D92D20)}
.mushaf .w.fresh{color:var(--fresh,#8A6212);background:color-mix(in srgb,var(--accent,#A87B1A) 15%,transparent);border-radius:.18em}
.mushaf .w.hint{color:var(--hint,#2F6AA8)}
/* PM L-1349 (his words 22 Nov: "It told me my mistakes but didnt highlight it"): a word Talqeen said for him (Help, or the stuck help)
   is highlighted, the help colour behind it, and stays so to the end of the step, after he says it too (app.js state H). Never red:
   the listener was not 90% sure he said it wrong (his rule), so it is not drawn as a mistake. Fable checked. */
.mushaf .w.helped{background:color-mix(in srgb,var(--hint,#2F6AA8) 32%,transparent);border-radius:.18em;box-shadow:0 0 0 .06em color-mix(in srgb,var(--hint,#2F6AA8) 32%,transparent)}
.mushaf .w.now::before{background:color-mix(in srgb,var(--miss,#D92D20) 15%,transparent)}
/* A mistake is red with a dotted red underline, as Tarteel marks it since late 2025 ("highlighted with red coloring and marked with a
   dotted underline"); put right after an error sound the underline goes and the red stays ("Once you correct the mistake, the
   underline disappears, but the red color remains"), 2026-10-25. The word Ayah said for him after three tries is a mistake too.
   While Ayah waits for another try, a short pale-red line lies on the slot's rule, the word still hidden; on a visible page the
   word itself is red and underlined. */
.mushaf .w.miss,.mushaf:not(.blank) .w.waiting{color:var(--miss,#D92D20);text-decoration:underline wavy var(--miss,#D92D20);text-decoration-thickness:.05em;text-underline-offset:.28em;text-decoration-skip-ink:none}
.mushaf.blank .w.waiting::after{content:'';visibility:visible;position:absolute;left:0;right:0;top:calc(var(--lh)*.12 + var(--fs)/2 - 1.1px);height:2px;border-radius:1px;background:var(--miss,#D92D20);opacity:.55}

/* Reciting from memory: words not yet heard keep their place but are not drawn, each with a short soft slot under where it
   will be. The markers, the banner, the
   Bismillah and the page above the part being recited stay; with Practice's "Hide ayah markers" (no-markers) the markers of
   ayahs not yet recited go too. */
.mushaf.blank .w:not(.shown,.kept,[data-end]),.mushaf.blank.no-markers .w[data-end]:not(.shown,.kept){visibility:hidden}
.mushaf.blank .w:not(.shown,.kept,[data-end],.waiting)::after{content:'';visibility:visible;position:absolute;left:.2em;right:.2em;top:calc(50% + .12em);height:.2em;border-radius:1em;background:var(--slot,rgba(0,0,0,.15))}
/* The test's Show (2026-10-26): the part's words not yet heard faintly (55% ink, 3:1 or better on the page in both themes), so the
   ones heard (ink, red, brown) still stand out; the rules under them go while they show. Hide ayah markers still hides the markers not yet recited. */
.mushaf.blank.peek .w.hl:not(.shown,.kept,[data-end]){visibility:visible;color:color-mix(in srgb,var(--page-ink,var(--ink)) 55%,transparent)}
.mushaf.blank.peek .w.hl:not(.shown,.kept,[data-end])::after{content:none}
@media(prefers-reduced-motion:reduce){.mushaf *{animation:none!important;transition:none!important}}
/* L-749 own rounds (#drill.own: a turn on your own, or from the start that is not a test; his words 15 Nov: "words should not be highlighted when
   repeating on my own, only when tested"). app.js draws the page there without what he says; should a mark still reach it, it shows as plain ink.
   Help's brown (.hint) and the step's band stay. */
#drill.own .mushaf .w:is(.miss,.waiting,.fixed,.unsaid,.told,.fresh,.now){color:inherit!important;background:none!important;text-decoration:none!important}
#drill.own .mushaf .w:is(.playing,.now)::before{content:none!important}
/* L-1097 (18 Nov 2026): the ayah markers in dark are a muted gold, a step under the bright gold that marks what is chosen or where you are
   (Fable 5.2's reading of "the words look very off": 30 bright rings on a page drowned the words). Light keeps its brown gold. */
@media (prefers-color-scheme:dark){:root:not([data-theme=light]) .mushaf{--rosette:#C9A54A}}
:root[data-theme=dark] .mushaf{--rosette:#C9A54A}
/* L-1097, Fable's check of the V2 page: every ayah marker keeps a clear gap from the words beside it (the line is measured with it), and
   the page sits 10px lower so the surah frame and the first line's marks clear the top bar (mushaf.js size() takes the 10px from the room). */
.mushaf .w[data-end]{padding-inline:.12em}
.mushaf .page{margin-top:10px}
/* L-1120 the Indo Pak 15 line page (mushaf.js, page.ip): Unicode words in the DigitalKhatt IndoPak font, one size for the page, the
   smallest space between words .3em (GAP in mushaf.js), a full line spread to the page's width by its spaces, a short one centred */
.mushaf .page.ip .ln,.mushaf .page.ip .ln.c{gap:.3em}
.mushaf .page.ip .basmalah span{font-size:1em;translate:none}
/* the ayah circle, its number and the signs printed with it (waqf, the ruku ain) in ink, as the Indo Pak print has them: in the app's muted
   gold the numbers did not read at computer size (Fable's judging) and the reading signs looked like decoration */
.mushaf .page.ip .w[data-end]{color:inherit}
