/* 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.3em;translate:0 -.07em;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)}
.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}
