/* Custom player for surah_detail.html (#q-surah-player) - progress bar
   with elapsed/remaining time, prev/play-pause/next controls, volume
   bar. Reuses --app-* tokens (staticsrc/input.css :root), same as
   karaoke.css/player.css, so it matches both light and dark themes
   without its own color values. */

/* tailwind.css reserves body { padding-bottom: 60px + safe-area } site-
   wide below 1024px for .q-bottombar - which isn't actually rendered
   anywhere in the codebase currently (no template uses that class at
   all), so this page was inheriting dead reserved space it can't use:
   <main> itself is already a hard h-[100dvh] (own main_class block),
   plus this padding pushed <body> taller than one viewport, making the
   whole page scroll that little bit on mobile (own report: "la page
   est tjs scrollable verticalement" - iPhone 13 Pro) even though
   #q-karaoke-lines is the only thing actually meant to scroll. Same
   fix mushaf.css already applies for its own immersive layout
   (body:has(.q-mushaf-immersive)), scoped here off #q-karaoke-root
   instead since this page has no equivalent wrapper class of its own. */
body:has(#q-karaoke-root) {
    padding-bottom: 0;
}
/* Own report ("il y a de l'espace en bas... faire descendre") - mobile
   only, desktop jamais évoqué/touché. <main>'s own py-6 (main_class)
   reserved 24px below the mobile share row for real content (own
   report found: #q-surah-footer, empty spacer div now removed) - 16px
   matches /ar/s's own #q-mini-player-mobile-bar bottom padding
   (surah_list.html), same reasoning. */
@media (max-width: 1023px) {
    body:has(#q-karaoke-root) #main-content {
        padding-bottom: 2rem;
    }
}
/* Own report ("elargir le header de sorte que le titre s'aligne avec le
   texte du Coran") - la ligne du header (base.html) est bornée à
   max-w-4xl/px-3/px-6 par défaut (pensée pour les pages au contenu
   centré classique) - <main> ici est max-w-7xl px-6 (own main_class),
   même largeur/padding repris ici pour que le titre (colonne de départ
   de la grille, header_start/surah_detail.html) tombe exactement au
   même bord que le texte de la sourate en dessous. Desktop only
   (>=1024px, own report "home pas aligné avec la home page sur
   mobile") - base.html est en px-3 (0.75rem) sous 1024px (lg:px-6
   seulement à partir de là) ; forcer 1.5rem ici aussi décalait Accueil
   (#q-header-col-start) de ce même écart vs. les autres pages en
   mobile, et le titre a de toute façon quitté cette ligne large sur
   mobile (colonne centrale, surah-player.js) - l'alignement avec le
   texte ci-dessus ne concerne donc plus que le desktop. */
@media (min-width: 1024px) {
    body:has(#q-karaoke-root) > header > div {
        max-width: 80rem;
        padding-inline: 1.5rem;
    }
    /* own bug trouvé sur /fr/s/1 (UI non-ar) : le titre (colonne de
       départ, justify-self-start) suivait le `direction` du document
       (ltr hors arabe) et tombait à gauche au lieu de droite - cette
       grille place ses colonnes par `direction`, pas par langue du
       texte qu'elle affiche (CSS Grid, comme #q-karaoke-root plus bas,
       own comment "afficher le LTR comme le RTL"). Le texte du Coran
       est toujours à droite quelle que soit la langue de l'interface -
       même correctif ici : direction:rtl forcé sur CETTE grille
       précisément (.grid, pas juste "header > div"), col-start (le
       titre) atterrit physiquement à droite dans tous les cas. own
       erreur vécue juste avant : "header > div" sans le .grid matchait
       aussi #q-settings-header (sibling direct de <header>, le menu
       Lecture/traduction) et lui renversait sa direction par erreur -
       .grid cible uniquement la ligne de titre, jamais ce menu. */
    body:has(#q-karaoke-root) > header > div.grid {
        direction: rtl;
    }
}
/* Own report ("la premiere lettre du titre doit etre au meme niveau que
   la premiere lettre d'une ligne du texte") - #q-karaoke-lines a son
   propre px-6 (24px, template) qui insète le texte depuis SON bord à
   lui, en plus du padding de la ligne du header ci-dessus - sans ce
   même écart ici, le titre (aligné sur le bord de la ligne, own report
   précédent) tombait 24px trop loin par rapport au vrai début du texte.
   margin (pas padding) - un padding à l'intérieur du h1 aurait faussé
   son propre max-w-[10rem]/truncate (template). Desktop only (>=1024px,
   own report "le titre doit etre parfaitement centré ... sur mobile") -
   le h1 vit maintenant dans la colonne centrale sur mobile
   (surah-player.js, #q-header-col-title), un item flex centré par
   justify-content:center (base.html) : cette marge y aurait juste
   recassé le centrage en le poussant d'un côté, sans plus aucun bord de
   ligne de texte à aligner dessus vu qu'il n'est plus dans la colonne de
   départ à cette largeur. */
@media (min-width: 1024px) {
    body:has(#q-karaoke-root) #q-surah-header {
        /* margin-inline-START (pas -end) - en RTL, inline-start = bord
           physique droit (own erreur vécue : -end poussait le côté gauche
           de la boîte, sans effet sur le bord droit qu'il fallait rentrer). */
        margin-inline-start: 1.5rem;
    }
}

/* #q-karaoke-root's own layout (surah_detail.html) - named grid areas
   instead of the old plain 2-col Tailwind grid (grid-cols-1
   lg:grid-cols-[2fr_1fr]). Just 3 areas now - #q-surah-header-actions
   (own report: Accueil/Favoris/"..." row, used to live inside
   #q-surah-player itself) isn't one of them: surah-player.js physically
   moves that element between #q-surah-header (mobile, own CSS below
   floats it beside the h1) and #q-surah-player-col (desktop, where it
   becomes the top of the same centered flex-column as the rest of the
   player) depending on viewport - no clean way to get one CSS-only
   layout to both "beside the title" (mobile) and "grouped with the
   player, centered as a unit" (desktop) without either duplicating the
   element or moving it, and duplicating it re-opens the exact
   querySelector-first-match bug already hit and fixed once this
   session (see surah-player.js's own comment there). */
#q-karaoke-root {
    display: grid;
    grid-template-columns: 1fr;
    /* 1fr on the text row (not auto) - #q-karaoke-lines's own h-full/
       overflow-y-auto (own scrollable reading column, <main> itself is
       h-[100dvh] overflow-hidden, base.html) needs a *definite* row
       height to resolve against, not "auto" (percentage height against
       an auto-sized track computes as auto - own report: text silently
       stopped scrolling without this). */
    grid-template-rows: 1fr auto;
    grid-template-areas:
        "text"
        "player";
    row-gap: 1rem;
    /* No overflow-x here anymore (own report, real re-check after the
       Sourates/sleep-timer popovers turned out to still be clipped
       despite the old overflow-x:hidden/overflow-y:visible pair below) -
       that pairing does NOT work the way the previous comment here
       claimed: per the CSS Overflow spec, whenever one axis is anything
       but visible, the *other* axis's used value is forced to auto too,
       regardless of what's actually authored on it - "overflow-y:
       visible" next to "overflow-x: hidden" still computes to
       overflow-y:auto (verified live, getComputedStyle), silently
       turning this grid row into a real clipping/scroll container at
       its own (content-sized "player" track) height. That's what was
       eating the bottom of both popovers - not <main>'s own
       h-[100dvh] overflow-hidden (surah_detail.html main_class), which
       sits well below them. Moved the actual horizontal guard onto
       #q-karaoke-lines instead (below) - the only track that can ever
       be forced wider by an unbreakable Arabic run - where it pairs
       with that element's own already-non-visible overflow-y:auto, so
       there's no "one visible / one not" mismatch left to coerce. */
}
#q-karaoke-lines {
    grid-area: text;
    min-width: 0;
    /* overflow-x:hidden moved here from #q-karaoke-root (own report,
       comment above) - safe here specifically because overflow-y is
       already non-visible (Tailwind's own overflow-y-auto, template),
       so both axes agree and neither gets silently coerced. */
    overflow-x: hidden;
}
#q-surah-player-col {
    grid-area: player;
    min-width: 0;
    /* Own report: #q-surah-header-actions (desktop: moved here, first
       child, by surah-player.js) + the rest of the player centered as
       one group within this area's own full (grid-stretched) height,
       not stuck at its own top. */
    justify-content: center;
    opacity: 1;
    /* Own report: the Sourates/sleep-timer popovers (.q-surah-popover,
       position:absolute) had no positioned ancestor anywhere inside
       <main> - their containing block fell all the way back to <body>,
       so opening one could grow <body>'s own scrollable height (a real
       page scroll) even though <main>'s h-[100dvh] overflow-hidden
       (surah_detail.html main_class) was clipping them visually at the
       same time - clipped AND still creating a scroll past it. Anchoring
       them here instead keeps their box inside <main>'s own clipped
       bounds, so there's nothing left outside it to scroll to. */
    position: relative;
}
/* Ex-règle mobile (#q-surah-header-actions "rejoint le h1") retirée -
   own report ("le titre doit etre parfaitement centré ... sur la meme
   ligne que les icons") : le h1 (colonne centrale, #q-header-col-title)
   et Accueil/"..." (colonnes #q-header-col-start/-col-end) sont
   maintenant 3 vrais enfants séparés de la même grille (base.html,
   surah-player.js) - plus de "rejoindre le h1", ce dernier ne les
   contient plus du tout sur mobile, rien à styler ici en plus. */
@media (min-width: 1024px) {
    #q-karaoke-root {
        grid-template-columns: 2fr 1fr;
        grid-template-rows: 1fr;
        grid-template-areas:
            "text   player";
        /* Own report: "afficher le LTR comme le RTL" - CSS Grid places
           columns per the container's own `direction` (unlike flexbox's
           default), so this 2-col split used to flip between languages
           (text/player swapping sides with html[dir]) even though the
           Quran text itself is always Arabic/RTL regardless of UI
           language. Forced rtl here keeps text on the right / player on
           the left for every language - the per-element dir="rtl" on
           the actual Arabic runs (verse <p>, h1...) already handles
           their own script direction independently of this. */
        direction: rtl;
    }
    /* own bug trouvé: direction:rtl juste au-dessus est HÉRITÉ par tout
       #q-surah-player-col en dessous (`direction` est une propriété
       héritée, CSS Writing Modes) - ça rendait #q-surah-menu-popover et
       #q-mushaf-surah-popover (tous deux .q-surah-popover ici - mushaf.html
       a sa propre copie de #q-mushaf-surah-popover SANS cette classe,
       jamais concernée par ce sélecteur) ainsi que tous leurs sous-menus
       (surah-reciter-menu, q-surah-reading-submenu,
       q-surah-accessibility-submenu, q-surah-share-submenu) RTL même en
       langue non-arabe, alors que ce sont de vrais menus d'UI (pas du
       texte coranique) qui doivent suivre la langue de l'interface. own
       erreur juste avant: reset sur #q-surah-player-col en entier cassait
       aussi la mise en page du lecteur (barre de progression, prev/play/
       next) - CE lecteur-là garde volontairement le même agencement
       physique quelle que soit la langue (même logique que le texte),
       seuls ces popovers/sous-menus (vraie UI/wording) ont besoin de
       suivre le dir réel du document. */
    html[dir="ltr"] .q-surah-popover {
        direction: ltr;
    }
    /* Own bug (suite immédiate du reset ci-dessus): .q-surah-menu-submenu
       (popover.css) s'ouvre avec `inset-inline-end: 100%` - une propriété
       LOGIQUE qui, une fois `direction` remis à ltr juste au-dessus,
       s'ouvrait à gauche au lieu de droite. Contrairement au texte/
       wording (qui doit suivre la vraie langue), le CÔTÉ D'OUVERTURE du
       sous-menu fait partie de l'agencement physique volontairement
       identique quelle que soit la langue (own report: "doivent
       s'ouvrir à droite comme dans l'arabe") - valeur physique figée ici
       plutôt que logique, insensible au reset de direction ci-dessus. */
    html[dir="ltr"] .q-surah-popover .q-surah-menu-submenu {
        inset-inline-end: auto;
        left: 100%;
        right: auto;
    }
    /* Own report: same width as #q-surah-player (max-w-xs, Tailwind's
       20rem) so it starts/ends at the exact same edges as the player
       card below it, not the wider column's own edges - #q-surah-
       player-col's own items-center would otherwise center this at its
       own (narrower) natural width, landing it somewhere else entirely.
       justify-content:right, not flex-end/justify-end - a *physical*
       value (CSS Box Alignment, unlike flex-end/end which follow
       direction) so this lands on the right regardless of the RTL/LTR
       swap between languages (LANGUAGE_BIDI, base.html). */
    #q-surah-header-actions {
        width: 100%;
        justify-content: right;
    }
}
/* Own report: "tu affiches #q-surah-header-actions sur mobile... il
   n'est pas affiché là-bas, il est déjà dans le header" - mobile moves
   its own children (Accueil/"...") out into the real site header
   (placeHeaderActions, surah-player.js), leaving this container empty,
   but nothing told it to actually disappear there in the meantime -
   whatever briefly showed through it before that JS ran (page paint
   racing the deferred script, a toast's own absolute box sitting near
   it) had a real, if empty, flex box to render into. Hidden outright on
   mobile instead of trusting JS timing to always empty it first. */
@media (max-width: 1023px) {
    #q-surah-header-actions {
        display: none;
    }
}

/* Mobile reading mode (surah-player.js) - fades out rather than
   snapping straight to [hidden], own class instead of relying on
   [hidden] alone since display:none can't be transitioned; JS actually
   sets [hidden] itself only after this finishes (or immediately when
   reduced motion applies, own report - CLAUDE.md, no motion at all
   there, not just a shorter one). */
.q-surah-player-col-fading {
    opacity: 0;
    /* Own report: "c'est sec" - plain opacity alone read as an abrupt
       cut even with the transition below. A slight downward slide on
       the way out (reversed on the way back in) reads as a real
       slide+fade instead. */
    transform: translateY(0.5rem);
}
@media (prefers-reduced-motion: no-preference) {
    #q-surah-player-col {
        transition: opacity 0.3s ease, transform 0.3s ease;
    }
}

.q-surah-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 9999px;
    border: none;
    background: color-mix(in srgb, var(--app-text) 20%, transparent);
    color: var(--app-text);
}
.q-surah-btn:hover,
.q-surah-btn:focus-visible {
    background: color-mix(in srgb, var(--app-text) 28%, transparent);
}
#q-play-btn {
    border-radius: 0;
    background: none;
    color: var(--app-sub);
}
#q-play-btn:hover,
#q-play-btn:focus-visible {
    background: none;
    color: var(--app-text);
}
/* Prev/next: text (surah name) alongside the icon, not a plain circle -
   drop the pill background so the name below can read on its own line
   instead of getting boxed in. */
.q-surah-nav-btn {
    background: transparent;
    color: var(--app-sub);
}
/* Sourates/prev/play/next/minuterie, 5 columns x 2 rows (own report:
   "tableau sur deux lignes et 5 colonnes... deuxieme ligne colonne 2
   et 4 sont les textes") - row 1 is icon-only in every column, row 2
   only has content in prev/next's own columns (their surah-name
   label). A lone centered icon (Sourates/Play/Minuterie) and prev/
   next's icon used to disagree on where "centered" means (prev/next's
   own label stacked underneath pushed its icon up, own report:
   "leurs icons ne sont pas alignes") - subgrid on the prev/next
   anchors below inherits this row's own row-1 track exactly, so their
   icon lands in the same slot every other column's icon centers in,
   by construction rather than by matched offsets. */
.q-surah-transport-row {
    display: grid;
    /* Cols 2/4 (next/prev) fixed at 4rem - same cap as their own name
       span's max-w-[4rem] (surah_detail.html) - own report: "quand je
       shuffle parfois le play, next et prev change de position": auto
       sizing shrinks each column to its *current* content's real width,
       not the 4rem cap, so a short shuffled name (vs a long one) moved
       col3/5 sideways every time. Fixed width holds them in place
       regardless of which name is showing. */
    grid-template-columns: auto 4rem auto 4rem auto;
    grid-template-rows: auto auto;
    align-items: center;
    justify-content: space-between;
}
/* Own report ("/ar/s/1 desktop: le bouton mobile Partager/Sourates
   s'affiche et le clic ne fait rien") - .q-surah-transport-row's own
   unconditional display:grid above (no media query - it's ALSO used
   unconditionally, line 764 surah_detail.html) has the exact same
   specificity as Tailwind's lg:hidden utility (one class each) -
   surah-player.css loads *after* tailwind.css (base.html's own
   extra_head block sits below its own tailwind.css <link>), so this
   rule's display:grid always won the cascade regardless of viewport
   width, silently defeating lg:hidden on the *2nd* .q-surah-transport-row
   (line 834, the Partager/Sourates mobile-only copy) - visible AND
   clickable on real desktop widths, where the click then opened its
   submenu using __qSurahIsMobile()'s own (correctly desktop) code path -
   positioned relative to the "..." menu's own toggle, never actually
   opened, so the submenu rendered at zero size. Two classes here
   (0,2,0) beats the single-class rule above regardless of source order -
   scoped to the exact lg:hidden pairing so the *other*
   .q-surah-transport-row (no lg:hidden, meant to show at every width)
   is untouched. */
@media (min-width: 1024px) {
    .q-surah-transport-row.lg\:hidden {
        display: none;
    }
}
.q-surah-transport-col1 { grid-column: 1; grid-row: 1; }
.q-surah-transport-col2 { grid-column: 2; }
.q-surah-transport-col3 { grid-column: 3; grid-row: 1; }
.q-surah-transport-col4 { grid-column: 4; }
.q-surah-transport-col5 { grid-column: 5; grid-row: 1; }
.q-surah-transport-row .q-surah-nav-btn {
    grid-row: 1 / 3;
    display: grid;
    grid-template-rows: subgrid;
    justify-items: center;
    align-items: start;
    width: auto;
    height: auto;
    gap: 0;
}
.q-surah-transport-row .q-surah-nav-btn .q-surah-icon {
    grid-row: 1;
    align-self: center;
}
.q-surah-transport-row .q-surah-nav-btn span {
    grid-row: 2;
    align-self: start;
    margin-top: 0.25rem;
    /* Own report: descenders/diacritics of some Arabic surah names
       (التكوير, الحجر...) got clipped at the bottom - text-xs's own
       line-height (Tailwind, 1rem) left no room under the baseline for
       them. */
    line-height: 1.3rem;
}
.q-surah-nav-btn:hover,
.q-surah-nav-btn:focus-visible {
    background: transparent;
    color: var(--app-text);
}
.q-surah-icon {
    width: 1.75rem;
    height: 1.75rem;
    fill: currentColor;
}
.q-surah-nav-btn .q-surah-icon {
    width: 1.25rem;
    height: 1.25rem;
}
/* hx-disabled-elt (surah_detail.html) sets/clears this attribute on
   every player control (nav/popover/share/bookmark/play/seek/volume)
   while a prev/next/popover surah nav request is in flight. Real
   <button>/<input> already block interaction natively once disabled;
   this is purely the visual dimming, needed unconditionally for <a>
   (no native disabled behaviour at all) and to actually be visible for
   the rest (browsers barely dim native disabled controls on their
   own). Same 0.15s fade as #q-karaoke-lines's own text dim
   (karaoke.css) - both were toggling in the same instant but one
   snapped instantly and the other faded, reading as out of sync. */
.q-surah-nav-btn[disabled],
.q-surah-popover-item[disabled],
.q-icon-btn[disabled],
.q-surah-btn[disabled],
.q-surah-range[disabled],
.q-surah-menu-item[disabled],
.q-surah-popover-fav-filter[disabled],
.q-surah-popover-fav[disabled],
.q-popover-close[disabled],
#q-surah-search-input[disabled],
#q-surah-search-input[disabled] ~ svg,
.q-surah-popover-item[disabled] ~ .q-surah-popover-current-mark {
    pointer-events: none;
    opacity: 0.5;
}
@media (prefers-reduced-motion: no-preference) {
    .q-surah-nav-btn,
    .q-surah-popover-item,
    .q-icon-btn,
    .q-surah-btn,
    .q-surah-range,
    .q-surah-menu-item,
    .q-surah-popover-fav-filter,
    .q-surah-popover-fav,
    .q-popover-close,
    #q-surah-search-input,
    #q-surah-search-input ~ svg,
    .q-surah-popover-current-mark {
        transition: opacity 0.15s ease;
    }
}
/* Swapped via .is-playing on the button (surah-player.js) - same
   one-class-flip pattern as player.css's .q-play-btn, kept separate
   here since this file is this page's own, not a shared dependency. */
.q-surah-btn .q-surah-icon-pause {
    display: none;
}
.q-surah-btn.is-playing .q-surah-icon-play {
    display: none;
}
.q-surah-btn.is-playing .q-surah-icon-pause {
    display: block;
}

.q-surah-time {
    font-variant-numeric: tabular-nums;
    color: var(--app-sub);
    font-size: 0.8rem;
    min-width: 2.5em;
    text-align: center;
    opacity: 0.7;
}
/* Same htmx-request dimming as the rest of the player controls
   (surah_detail.html's hx-indicator now also targets these 2 spans
   directly, not just #q-karaoke-lines) - purely visual, these aren't
   interactive so there's nothing to actually disable. */
.q-surah-time.htmx-request {
    opacity: 0.35;
}
@media (prefers-reduced-motion: no-preference) {
    .q-surah-time {
        transition: opacity 0.15s ease;
    }
}

.q-surah-range {
    /* Own report ("le cercle... pas parfaitement centré", puis "pourquoi
       les autres sont good et pas celui la"): trouvé - flex:1 seul met
       flex-basis:0%, et le parent de #q-seek est un flex-col (colonne) -
       height (l'axe principal en colonne) était donc écrasé par le
       flex-grow au lieu d'être respecté, d'où un computed height (9px)
       qui ne correspondait jamais à la valeur déclarée (0.375rem), peu
       importe sa valeur - le vrai mystère "1.75rem déclaré, 16px rendu"
       d'avant dans cette session, jamais élucidé jusqu'ici. #q-mini-seek
       (surah_list.html) n'a pas cette classe/ce flex - son parent est un
       flex-row, où flex-basis ne touche que la largeur, jamais la
       hauteur, donc jamais ce bug. flex-basis:auto (au lieu de 0%)
       respecte height comme base réelle. */
    flex: 1 1 auto;
    cursor: pointer;
    /* Own report: "je n'arrive pas à changer les input range" (iPhone 13
       Pro) - the native thumb (~15-20px depending on browser) is the
       whole touch target, no padding trick reliably grows it for a
       range input the way it would a button. Sized up explicitly below
       (own vendor-prefixed pseudo-elements, no unprefixed equivalent
       exists) instead - still native accent-color styling otherwise,
       just a bigger thumb to actually grab. */
    /* Own report ("le meilleur designé... c'est q-mini-seek sur /ar/s
       desktop"): référence retenue = la fine 0.375rem/pouce 0.75rem
       (surah_list.html), pas la précédente 1.75rem/1.5rem d'ici - les 4
       ranges (seek+volume, /ar/s et /ar/s/1) rendent identiques par
       construction plutôt que par 4 tailles séparées à maintenir en
       synchro. Own report ("le progress et le volume ne sont pas bien
       affichés sur Safari desktop pour les couleurs"): Safari's
       accent-color only ever tints the thumb, never paints the
       played-vs-remaining split Chrome does natively - appearance:none
       plus a hand-painted track (below) renders identically everywhere
       instead of leaning on a browser feature only some browsers
       implement fully. --q-range-fill (0% by default, kept in sync with
       the input's own value/max by surah-player.js on every change)
       draws the hard cutoff between played (var(--app-link)) and
       remaining (muted) - swapped to accent-color's own var(--app-link)
       so the "Neutre" theme reset below still applies unchanged.
       Track spans the input's full own height (not a slim centered
       strip) - no separate vertical-centering math to get wrong, this
       box is already sized for exactly this. */
    height: 0.375rem;
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    --q-range-fill: 0%;
}
.q-surah-range::-webkit-slider-runnable-track {
    height: 100%;
    border-radius: 9999px;
    background: linear-gradient(to right, var(--app-link) var(--q-range-fill), color-mix(in srgb, var(--app-sub) 30%, transparent) var(--q-range-fill));
}
.q-surah-range::-moz-range-track {
    height: 100%;
    border-radius: 9999px;
    background: color-mix(in srgb, var(--app-sub) 30%, transparent);
}
.q-surah-range::-moz-range-progress {
    height: 100%;
    border-radius: 9999px;
    background: var(--app-link);
}
.q-surah-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 9999px;
    background: var(--app-link);
    /* WebKit doesn't auto-center a custom thumb on a custom track like
       Firefox does (own -moz-range-thumb below needs no such rule) -
       half the leftover height (box 0.375rem - thumb 0.75rem) computed
       from the same declared values above, not a measured guess. */
    margin-top: calc((0.375rem - 0.75rem) / 2);
}
.q-surah-range::-moz-range-thumb {
    width: 0.75rem;
    height: 0.75rem;
    border: none;
    border-radius: 9999px;
    background: var(--app-link);
}
/* Own report ("augmenter l'épaisseur... confort mobile") - mobile
   uniquement, desktop garde 0.375rem/0.75rem (own report précédent:
   "le meilleur designé... c'est q-mini-seek sur /ar/s desktop"). Même
   recette #q-mini-seek/#q-mini-volume (surah_list.html). */
@media (max-width: 1023px) {
    .q-surah-range {
        height: 0.5rem;
    }
    .q-surah-range::-webkit-slider-thumb {
        width: 1rem;
        height: 1rem;
        margin-top: calc((0.5rem - 1rem) / 2);
    }
    .q-surah-range::-moz-range-thumb {
        width: 1rem;
        height: 1rem;
    }
}
/* --app-link reset, thème de lecture "Neutre" uniquement
   (data-q-mushaf-theme="neutral") - own report: le bleu générique jure
   avec les autres thèmes (Calme/warm), "on laisse ce bleu que pour le
   neutre" - mêmes 4 valeurs littérales que .q-popover/
   .q-surah-menu-submenu (popover.css). */
html.q-surah-reading-frame[data-q-mushaf-theme="neutral"] .q-surah-range {
    --app-link: #1a0dab;
}
@media (prefers-color-scheme: dark) {
    html.q-surah-reading-frame[data-q-mushaf-theme="neutral"] .q-surah-range {
        --app-link: #99c3ff;
    }
}
html:root[data-theme="light"].q-surah-reading-frame[data-q-mushaf-theme="neutral"] .q-surah-range {
    --app-link: #1a0dab;
}
html:root[data-theme="dark"].q-surah-reading-frame[data-q-mushaf-theme="neutral"] .q-surah-range {
    --app-link: #99c3ff;
}
/* Desktop (souris) uniquement - pouce masqué tant que la barre n'a ni
   hover ni focus clavier (visible au clavier aussi, pas juste au
   survol - sinon un utilisateur clavier ne verrait jamais son repère).
   Exclu du tactile (pointer: fine) - pas de hover sur mobile, le pouce
   y reste visible en permanence (own report iPhone ci-dessus). */
@media (hover: hover) and (pointer: fine) {
    .q-surah-range::-webkit-slider-thumb {
        opacity: 0;
        transition: opacity 0.15s ease;
    }
    .q-surah-range::-moz-range-thumb {
        opacity: 0;
        transition: opacity 0.15s ease;
    }
    .q-surah-range:hover::-webkit-slider-thumb,
    .q-surah-range:focus-visible::-webkit-slider-thumb {
        opacity: 1;
    }
    .q-surah-range:hover::-moz-range-thumb,
    .q-surah-range:focus-visible::-moz-range-thumb {
        opacity: 1;
    }
}

/* Options row (partager/thèmes/lecture/signet) below the volume bar -
   same look as mushaf.html's .q-mushaf-icon-btn (mushaf.css), always
   visible here (not hover-revealed - this panel has no corner-overlay
   layout to earn that behavior). Icons only for now, popovers wired up
   one at a time next. */
.q-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: var(--app-sub);
}
.q-icon-btn:hover,
.q-icon-btn:focus-visible {
    /* Same 14% as .q-mushaf-icon-btn's own hover (mushaf.css, own
       comment there) - was 10%, own report. */
    background: color-mix(in srgb, var(--app-text) 14%, transparent);
    color: var(--app-text);
}
.q-icon-btn:focus-visible {
    /* Same explicit outline as .q-mushaf-icon-btn's own :focus-visible
       (mushaf.css) - own report, this used to only get the browser's
       own default ring.  */
    outline: 2px solid var(--app-link);
    outline-offset: 2px;
}
/* Test: diagonal slash overlay while #q-autoscroll-toggle is pressed
   (aria-pressed toggled in surah-player.js) - color, not the icon shape
   itself, carries the on/off state, so it can't be the only signal;
   aria-pressed covers screen readers, real behavior still to be wired.
   Now a full-width .q-surah-menu-item row (own report: moved into the
   "..." overflow menu) with its icon at the inline-end, not centered
   in a square button anymore - the slash below tracks that same
   inline-end spot (button's own 0.625rem padding) instead of the
   button's own center. */
#q-autoscroll-toggle {
    position: relative;
}
/* #q-surah-continuous-btn/#q-surah-shuffle-btn (surah_detail.html) -
   même recette que #q-mini-continuous-btn/#q-mini-shuffle-btn
   (surah_list.html) : fond+couleur, aria-pressed/aria-label déjà
   portent l'état pour les lecteurs d'écran. #q-surah-continuous-btn
   n'est plus aria-pressed (own report: "trois etat" - binaire ne
   convient plus), sélecteur adapté à data-q-repeat-state, "off" exclu. */
#q-surah-continuous-btn[data-q-repeat-state="one"],
#q-surah-continuous-btn[data-q-repeat-state="all"],
#q-surah-shuffle-btn[aria-pressed="true"] {
    background: var(--app-link-soft);
    color: var(--app-link);
}
/* Une seule des 3 icônes visible à la fois selon data-q-repeat-state -
   même recette que .q-mini-icon-play/-pause (surah_list.html). */
#q-surah-continuous-btn .q-repeat-icon-one,
#q-surah-continuous-btn .q-repeat-icon-all {
    display: none;
}
#q-surah-continuous-btn[data-q-repeat-state="one"] .q-repeat-icon-off,
#q-surah-continuous-btn[data-q-repeat-state="one"] .q-repeat-icon-all {
    display: none;
}
#q-surah-continuous-btn[data-q-repeat-state="one"] .q-repeat-icon-one {
    display: block;
}
#q-surah-continuous-btn[data-q-repeat-state="all"] .q-repeat-icon-off,
#q-surah-continuous-btn[data-q-repeat-state="all"] .q-repeat-icon-one {
    display: none;
}
#q-surah-continuous-btn[data-q-repeat-state="all"] .q-repeat-icon-all {
    display: block;
}
#q-autoscroll-toggle[aria-pressed="true"]::after {
    content: "";
    position: absolute;
    top: 50%;
    inset-inline-start: 0.625rem;
    width: 18px;
    height: 2px;
    background: currentColor;
    transform: translateY(-50%) rotate(-45deg);
    z-index: 1;
    pointer-events: none;
}
.q-icon-btn .q-icon-lib-on {
    display: none;
    /* Same red as the Mushaf page's own bookmark ribbon
       (.q-lib-toggle-btn .q-icon-lib-on, mushaf.css) - already checked
       there against WCAG AA's 4.5:1 non-text threshold on both light
       and dark, not re-picked here. */
    fill: rgb(224, 42, 33);
}
.q-icon-btn[aria-pressed="true"] .q-icon-lib-off {
    display: none;
}
.q-icon-btn[aria-pressed="true"] .q-icon-lib-on {
    display: block;
}

/* Sourates popover (mirrors mushaf.html's own #q-mushaf-surah-popover
   look, mushaf.css - .q-popover/.q-popover-item family) - this page has
   no theme system of its own (--app-popover-* only exist under mushaf's
   [data-q-mushaf-theme] blocks), so this reuses the page's plain
   --app-surface/--app-text/--app-border tokens instead. No "current
   surah" highlight/checkmark here (unlike mushaf's own list) - every
   row is a plain navigation link to a different page, not a persistent
   selection. */
/* --app-popover-*, not the generic --app-surface/-border/-text pair
   (own report: this popover used to predate the theme system on this
   page - now that .q-surah-reading-frame/body carries a real theme
   pick, generic tokens only ever follow the site's own light/dark
   toggle, drifting out of sync with every submenu nested inside this
   same popover, which already reads the theme-specific --app-popover-*
   pair - own report: "les menus ne sont pas bien affichés" was this
   exact mismatch, most visible with a dark preset + light Apparence). */
/* .q-surah-popover's own box chrome (position/size/padding/radius/
   border/background/shadow/z-index) moved to popover.css (own report:
   "exactement comme q-surah-menu-popover... ne duplique pas le code" -
   base.html's own #q-panel-plus carries this same class now too, needed
   the CSS to actually be loaded there, not just on this page). */
/* #q-sleep-timer-popover's own short-viewport bottom-sheet rule moved to
   popover.css (own report: "meme chose pour /ar/s/ ... sans dupliquer le
   code" - surah_list.html doesn't load this stylesheet, only popover.css,
   see popover.css's own comment there). #q-mushaf-surah-popover kept
   there too, same reasoning as its own migration just above. */
/* Own report: "#q-mushaf-surah-popover doit etre comme data-q-mushaf-
   mobile-menu sur /ar/c/", later "meme structure et meme class css" -
   this whole block used to hand-reproduce .q-mushaf-mobile-menu's own
   fixed/rounded/flex-column/padding/max-height values under this ID
   instead of actually sharing that class, drifting out of sync twice
   (a stretched-to-70vh list, then a doubled-up gap) before landing on
   the real fix: #q-mushaf-surah-popover now carries the literal
   .q-mushaf-mobile-menu class too (surah_detail.html), same rule,
   same file (popover.css) - nothing left to duplicate here. */
/* Own report: "tous les titres des popups doivent être pareil structure
   et css comme /ar/c" - .q-popover-head/-title/-close used to be
   duplicated here under a q-surah- prefix, near-identical values by
   hand instead of guaranteed identical by definition. mushaf.css is
   already loaded on this page (surah_detail.html's own extra_head) and
   defines all 3 in full (chip-style close button, hover/focus-visible/
   disabled states included) - every popover here (Options/Sourates/
   sleep-timer/the 4 submenus) now uses those classes directly, nothing
   left to duplicate. */
/* Same look as the Mushaf page's own "Mot ou n° de page" field
   (.q-mushaf-jump-popover form/input, mushaf.css) - shared-border
   input+icon row, not a separately-boxed icon. That one's a real
   <form>/submit (navigates elsewhere); this is a live filter-as-you-
   type over the list right below it, so the icon here is decorative
   only, no button/submit needed. */
/* --app-popover-* below (own report: "les sous-menus doivent suivre le
   thème comme sur /ar/c/") - these already tracked the theme somewhat
   (--app-text/-sub/-border are re-derived per preset too, own comment
   on .q-surah-reading-frame's own base rule further below), just with
   this page's own generic reading-palette values instead of mushaf.css's
   own separate, deliberately-different popover-chrome palette
   (--app-popover-*, own comment there: "not the reading page's own
   --app-bg/--app-text") - every .q-popover-item/-quick-btn/etc mushaf.css
   itself styles this same way. */
/* .q-surah-popover-search/-list/-item/[aria-current="page"]/
   [aria-disabled="true"]/-current-mark/-number/-translit, and the
   .q-popover-item-row hover/focus fill + "every row rounded, no
   dividers" radius treatment for #q-mushaf-surah-popover, all moved to
   mushaf.css (own report: "il doivent utiliser le même code css, même
   structure, 100% exactement" - #q-mushaf-surah-popover on the Mushaf
   reader shows the exact same 114-surah list, was drifting into a 2nd,
   subtly-different copy of all of this). mushaf.css is already loaded
   on this page. Only what's genuinely specific to this page's own
   favoris star stays below. */
/* Own toggle, "favoris only" filter (surah-player.js, combines with the
   text filter above it) - border-inline-start separates it from the
   input/search-icon it shares this row with (.q-surah-popover-search,
   mushaf.css), same divider look as .q-popover-list > li + li
   there. */
.q-surah-popover-fav-filter {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    margin: 0;
    padding: 0.5rem 0.625rem;
    border: 0;
    /* Plain --app-border, not --app-popover-* - same search-row
       contrast-zone reasoning as .q-surah-popover-search's own fix
       (mushaf.css), this sits inside that same row. */
    border-inline-start: 1px solid var(--app-border);
    background: transparent;
    color: var(--app-sub);
}
.q-surah-popover-fav-filter svg {
    margin: 0;
}
.q-surah-popover-fav-filter:hover,
.q-surah-popover-fav-filter:focus-visible {
    color: var(--app-text);
}
.q-surah-popover-fav-filter[aria-pressed="true"] {
    color: rgb(224, 42, 33);
}
.q-surah-popover-fav-filter[aria-pressed="true"] svg {
    fill: rgb(224, 42, 33);
}
.q-surah-popover-fav {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-inline-end: 0.375rem;
    padding: 0.375rem;
    border: none;
    background: transparent;
    color: var(--app-popover-text);
}
.q-surah-popover-fav:hover,
.q-surah-popover-fav:focus-visible {
    color: var(--app-popover-btn-text);
}
.q-surah-popover-fav .q-icon-lib-on {
    display: none;
    fill: rgb(224, 42, 33);
}
.q-surah-popover-fav[aria-pressed="true"] .q-icon-lib-off {
    display: none;
}
.q-surah-popover-fav[aria-pressed="true"] .q-icon-lib-on {
    display: block;
}
/* "Ajouter aux favoris" row (#q-surah-menu-popover) - same off/on
   icon-swap as .q-icon-btn/.q-surah-popover-fav above, this
   button just isn't either of those classes. */
[data-q-surah-menu-fav-btn] .q-icon-lib-on {
    display: none;
    fill: rgb(224, 42, 33);
}
[data-q-surah-menu-fav-btn][aria-pressed="true"] .q-icon-lib-off {
    display: none;
}
[data-q-surah-menu-fav-btn][aria-pressed="true"] .q-icon-lib-on {
    display: block;
}
/* Hovering/focusing the favoris star itself still highlights the whole
   row - .q-popover-item-row:hover/:focus-within::before (mushaf.css)
   already covers both, the star sits inside that same row. */
/* .q-surah-menu-item (+ :hover/[aria-expanded=true]/:focus-visible/
   :disabled) moved to popover.css (own report: "meme structure, meme
   css" - base.html's own Langue-inside-Réglages row uses it now too). */
/* #q-surah-menu-popover's own .q-popover-list already gets no-divider/
   every-row-rounded for free now (popover.css's own canonical default,
   own report: "on ne peut pas la mettre par défaut ?") - only
   .q-surah-menu-submenu's own (non -list) direct <li> children still
   need their own rule here, that shape isn't covered by the default. */
.q-surah-menu-submenu > li + li {
    border-top: none;
}
.q-surah-menu-submenu > li.q-popover-item-row {
    border-radius: 8px;
}
/* .q-menu-divider/-lg moved to popover.css (own report: invisible on
   the home page - base.html only loads popover.css, not this file,
   and the "Traduction" separator needs the same divider there). */
/* Plain rows (Favoris/Défilement automatique/Signaler) keep
   .q-popover-item-row on their own <li> - own hover/focus fill comes
   from the row (mushaf.css), cancelled here at the item level so it
   isn't painted twice. Récitant/Thèmes/Lecture/Partager's own <li>
   (data-q-surah-*-wrap) went back to plain/no class instead (own
   report: wrapping them in .q-popover-item-row made the trigger row's
   hitbox/hover state more sensitive to the pointer crossing it en
   route to its own flyout, closing that flyout right back via
   __qSurahCloseOtherSubmenus before a click inside it could land) -
   those keep their own hover/radius below, un-cancelled. */
.q-popover-item-row > .q-surah-menu-item:hover,
.q-popover-item-row > .q-surah-menu-item:focus-visible {
    background: none;
}
/* Reciter-switch confirmation (own report: no feedback at all before -
   the Récitant flyout closes itself on change, own JS, so a status
   *inside* it is never seen). Small floating toast instead, same
   box chrome as .q-surah-popover (border/radius/shadow/surface) - top-
   centered over the player, out of flow so it never shifts anything
   else while shown/hidden.
   top:0.5rem (own, not the -0.5rem + translateY(-100%) this used to
   have) - own report: "en desktop il est caché par le header" - the
   old rule put the toast *above* its own anchor (#q-surah-player-col,
   own report there: containing block chosen specifically to stay
   inside <main>'s own clipped bounds), which measured out to
   overlapping the site header above <main> by ~24px. Sitting just
   below the anchor's own top edge instead stays fully inside it. */
.q-surah-status-toast {
    position: absolute;
    top: 0.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 12;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    max-width: calc(100% - 1rem);
    /* Own report: "un peu d'espace entre le debut du texte et le bord...
       comme avec le bouton en symetrie" - own inline-end padding kept
       small since .q-popover-close (below) already carries its own
       padding around the icon; inline-start bumped to roughly match
       that combined start-to-text vs end-to-icon distance. */
    padding-inline-start: 0.875rem;
    padding-inline-end: 0.4375rem;
    padding-block: 0.5rem;
    border-radius: 999px;
    /* --app-popover-* (own report: full consistency with /ar/c/, every
       theme, not just the popovers) - was the generic --app-surface/
       -border/-text pair, the one remaining piece of this page's own
       chrome that hadn't followed the others yet. */
    border: 1px solid var(--app-popover-border);
    background: var(--app-popover-bg);
    box-shadow: 0 8px 28px rgb(0 0 0 / 20%);
    color: var(--app-popover-text);
    font-size: calc(0.8125rem * var(--q-ui-scale, 1));
}
.q-surah-status-toast [data-q-surah-status-toast-text] {
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.q-surah-status-toast .q-popover-close {
    flex-shrink: 0;
    /* Own report: "reduis un peu la taille du bouton" - smaller than
       the shared 0.25rem/16px default (popover.css), a bit much next to
       this pill's own small text. */
    padding: 0.1875rem;
}
.q-surah-status-toast .q-popover-close svg {
    width: 14px;
    height: 14px;
}
/* .q-surah-menu-item-sub/-content/-chevron (+ RTL mirror) moved to
   popover.css (own report: "meme structure, meme css" - base.html's own
   Langue-inside-Réglages row uses these same classes now too, own
   comment there). */
/* Partager/Récitant's own <li> anchors its flyout below (own report:
   macOS/Apple-Music-style side submenu, not an inline accordion) -
   position context for .q-surah-menu-submenu's own absolute placement.
   Without this, a wrap falls back to whichever positioned ancestor is
   next up the tree (#q-surah-menu-popover itself), placing the flyout
   in the wrong spot entirely instead of next to its own row. */
[data-q-surah-share-wrap],
[data-q-surah-langue-wrap],
[data-q-surah-reciter-wrap],
[data-q-surah-reading-wrap],
[data-q-surah-theme-wrap],
[data-q-surah-accessibility-wrap],
[data-q-surah-sourates-wrap] {
    position: relative;
}
/* .q-surah-menu-submenu's own base chrome (position/top/transform/
   inset-inline-end/width/padding/border/background/shadow/z-index/font-
   size/color/text-align) moved to popover.css too (own report - same
   move as -item-sub/-content/-chevron above). Only per-widget sizing
   overrides stay here (Récitant/Lecture's own width/height/padding
   below). */
/* Récitant's own submenu (own report: "trop petit", the real .q-reciter-
   list/-item tile grid - staticsrc/input.css - needs real room for its
   own 3-column photo grid, unlike Partager's plain 2-row text list
   above). Own padding too - the tile grid's own 8px gap (input.css)
   already reads as this popover's own inset on 3 of its 4 sides, .375rem
   here just matches that same spacing on the 4th (top). */
/* .q-reciter-submenu's own height/flex/overflow (was .q-surah-reciter-
   submenu, id-scoped) moved to popover.css, shared with home's own copy
   (base.html, own report: "la hauteur n'est pas comme /ar/s/X"). */
/* 2-column .q-reciter-list override moved to popover.css, scoped to the
   shared .q-menu-submenu-lg class instead of this page's own id - home's
   #q-plus-reciter-submenu (base.html) carries that same class, own
   report: "la liste est sur 2 colonnes dans /ar/s/X contrairement a la
   home". */
/* Lecture's own submenu - just a wrapping pill radiogroup
   (.q-choice-group, input.css), a bit wider than Partager's plain text
   list above so "Simple (Minimal)" etc. don't wrap every pill onto its
   own line. */
/* "Marques et repères" visible label (_mark_toggles.html) dropped here
   too (own report) - same sr-only-but-still-real technique mushaf.css's
   own #q-mushaf-reading-popover #mark-toggles-label already uses in
   that exact popover, just scoped to this one instead (accessible name
   stays real for aria-labelledby, CLAUDE.md - just not painted). */
/* .q-mark-desc's own negative top margin (-0.5rem, mushaf.css) is only
   ever compensated by mushaf.css's own #q-mushaf-reading-popover
   #mark-toggles { margin-bottom: 0.75rem } rule, scoped to that one
   popover's own id - own report: without the same rule scoped to this
   id too, that negative margin pulled .q-mark-desc straight up into
   the mark buttons instead of just closing a gap. */
#q-surah-reading-submenu #mark-toggles {
    margin-bottom: 0.75rem;
}
#q-surah-reading-submenu #mark-toggles-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border-width: 0;
}
/* Own report: "l'input de recherche soit aligné avec le bouton" -
   desktop only (own mobile bottom-sheet, top:auto below 1024px,
   popover.css, is unaffected). Base rule's own top:50%/translateY(-50%)
   (popover.css) centers the whole box on the trigger row - fine for a
   short list, but this one's own search input (its first real row,
   .q-surah-submenu-mobile-head above it is desktop-hidden) then sits
   noticeably above the button instead of level with it, since the box
   itself is much taller than one row. Cancels the transform and lifts
   the box back up by exactly .q-menu-submenu-lg's own 0.5rem top
   padding (popover.css) instead, landing the search row's own top
   flush with the button's. */
@media (min-width: 1024px) {
    #q-mushaf-surah-popover {
        top: -0.5rem;
        transform: none;
    }
}
/* Own sizing only (own report: wanted the same background/border-
   radius/shadow/font-size as Partager/Récitant/Thèmes above, all 3 of
   which only ever override sizing too, same reasoning) - chrome
   (translucent --app-surface + blur, 10px radius, .q-surah-menu-
   submenu's own base shadow/font-size) inherited from there instead of
   re-declared here, same as those. Padding: .q-menu-submenu-lg's own
   shared 0.5rem (popover.css) - was its own 0.375rem here, drifted from
   Récitant/Thèmes/home's own 0.5rem for no real reason (own report: "le
   padding n'est pas pareil", factored there instead). */
/* Same reasoning as .q-surah-reading-submenu just above - own report:
   "avant theme il faut l'accessibilite ici aussi... regarde comment
   c'est fais les autres sous menu pour la position" (own comment
   further up on why this needed [data-q-surah-accessibility-wrap] in
   the position:relative list too, and the mobile compound-selector
   list below). */
.q-surah-menu-submenu-label {
    margin: 0 0 0.5rem;
    font-size: calc(0.75rem * var(--q-ui-scale, 1));
    font-weight: 600;
    color: var(--app-popover-text);
}
/* .q-popover-list's own display:flex (author rule) otherwise
   beats the [hidden] attribute's UA-stylesheet display:none outright -
   author rules always win over UA ones regardless of source order or
   specificity, so without this the submenu stayed visible even while
   hidden. This selector's own extra specificity (class+attribute) is
   what actually restores the hide. */
.q-surah-menu-submenu[hidden] {
    display: none;
}
/* Generic .q-surah-menu-submenu/.q-surah-submenu-mobile-head mobile
   bottom-sheet rules moved to popover.css (own report: "meme chose pour
   #q-panel-plus... ne duplique pas le code" - base.html's own Langue/
   Traduction/Lecture/Récitant flyouts share these exact classes too and
   need the same treatment, popover.css is loaded on every page while
   this file only loads on /ar/s/X). Only the per-widget overrides below
   (Récitant/Thèmes/Lecture's own extra width/height/padding on top of
   that shared shell) stay page-specific here. */
@media (max-width: 1023px) {
    /* Own report: "n'a pas la bonne largeur" - .q-surah-reading-submenu/
       -reciter-submenu/-theme-submenu (own width:20rem, further below in
       this file, own max-height/padding on top for Récitant/Thèmes) come
       *after* this block in source order - same specificity (single
       class each) as .q-surah-menu-submenu above, so cascade order alone
       let them win back their own desktop width here regardless of this
       block's own width:auto. Two classes each (higher specificity, not
       source order) forces this block's own sizing to actually stick on
       mobile instead. */
    .q-surah-menu-submenu.q-surah-reading-submenu,
    .q-surah-menu-submenu.q-surah-langue-submenu,
    .q-surah-menu-submenu.q-reciter-submenu,
    .q-surah-menu-submenu.q-surah-theme-submenu,
    .q-surah-menu-submenu.q-surah-accessibility-submenu {
        width: auto;
        max-height: 70vh;
    }
    /* Own report continued (see .q-reciter-submenu's own desktop rule,
       popover.css): the base .q-surah-menu-submenu mobile rule further up
       sets overflow-y:auto on the whole box, same head+search+grid-
       scrolling-together trap on mobile too. Two classes here outrank
       that single-class rule, so the desktop fix (flex column, only
       .q-reciter-list scrolls) survives on mobile as well. */
    .q-surah-menu-submenu.q-reciter-submenu {
        overflow: hidden;
    }
    /* Own report: "le popup du partage est concerné aussi" - same trap,
       .q-popover-list's own max-height:18rem/margin (further above
       in this file) is a single class too, same specificity as this
       block's own base .q-surah-menu-submenu rule - #q-surah-share-
       submenu carries both classes, so cascade order (that rule comes
       first in the file) let it win its own sizing back here. */
    .q-surah-menu-submenu#q-surah-share-submenu {
        max-height: 70vh;
        margin: 0;
    }
}
/* #q-surah-menu-popover's own overflow:visible/max-height:none (itself
   and its own .q-popover-list) moved to popover.css, shared with home's
   #q-panel-plus (own report: "ca doit marcher automatiquement avec le
   code en commun" - same clipping trap, same fix, no reason for 2
   near-identical ID-scoped copies in 2 different files). */
.q-surah-menu-item svg {
    flex-shrink: 0;
    color: var(--app-popover-text);
}

/* "Thèmes et réglages" menu item - #marks-scope (own class here, not
   mushaf.css's own .q-mushaf-frame directly) carries data-q-mushaf-
   theme/-mode so the same 6 presets × 2 modes repaint just the ayah
   text column, same scoped --app-* override trick as mushaf.css's own
   .q-mushaf-frame comment explains. A shared class name would also
   drag in that file's own border/background/box-shadow/padding/flex
   card chrome (built for the Mushaf page's own single frame-as-page
   layout) onto this page's own #q-karaoke-lines/#marks-scope flex
   column - own selector instead, only the position/color/font re-
   resolve this page actually needs plus the same 12 (theme × mode)
   variable blocks below (mushaf.css, values copied verbatim). */
.q-surah-reading-frame {
    position: relative;
    background: var(--app-bg);
    /* color/--font-quran: single source now, popover.css's own shared
       combined rule (.q-mushaf-frame/.q-surah-reading-frame/
       [data-q-ayah-card]) - own report: "il faut utiliser un seul code
       de theme pour toute les pages". --q-ui-scale: single source too,
       popover.css's own :root default (own report: "a utiliser dans
       popover.css par exemple en commun") - was own report: this page's
       ported markup (mark-toggles, steppers, popover titles) used to
       fall back to the plain base size, systematically smaller than
       /ar/c/, before this was first redeclared here; now the same
       :root default already covers every page including this one. */
}
/* Cancels <html>'s own filter:brightness() ("Intensité" above 100%,
   surah-player.js applyMushafBrightness) on this page's own top-level
   popover boxes - same math/reasoning as mushaf.css's own
   .q-mushaf-frame.q-mushaf-brightened > .q-mushaf-jump-popover rule
   (own report: missed entirely on the initial port). Only the outer
   .q-surah-popover, NOT .q-surah-menu-submenu too - every submenu here
   is itself nested inside .q-surah-popover in the DOM, so it already
   inherits that un-dimmed rendering from its parent's own filter;
   giving it a second filter here double-compensated/over-darkened it
   (own report: "les sous-menus n'ont pas la même couleur que le menu",
   visible mainly above 100% - exact same double-compensation trap the
   old comment already warned about for #q-surah-theme-mode-popover,
   just missed one level higher up on this same selector). */
.q-surah-reading-frame.q-mushaf-brightened .q-surah-popover {
    filter: brightness(calc(100 / var(--q-mushaf-brightness-pct, 100)));
}
/* --app-surface/-link/-sub/-border base formula, the 6 themes × light/
   dark, the Tranquille --app-sub-mix override, and both "Contraste
   élevé" fixes (--app-border/--app-popover-border) all moved to
   popover.css - single source now, shared with mushaf.css's own
   identical values and the new card-wide use (own report: "au lieu de
   dupliquer les theme pour chaque page mets les dans un fichier
   unique... meme si il sont deja dupliquer dans l'existant, factorise
   les"). html:root.q-surah-reading-frame still needed as one of the
   combined selector's own branches there (frameEl IS :root on this
   page, own comment that used to live here) - just not duplicated
   value-wise anymore. */

/* Police (mushaf.css's own [data-q-mushaf-font=...] rules are scoped to
   .q-mushaf-frame specifically, own class here instead - own comment
   above on why). */
.q-surah-reading-frame[data-q-mushaf-font="scheherazade"] { --app-font-arabic: "Scheherazade New", serif; }
.q-surah-reading-frame[data-q-mushaf-font="scheherazade-classic"] { --app-font-arabic: "Scheherazade Classic", serif; }
.q-surah-reading-frame[data-q-mushaf-font="kfgqpc-hafs"] { --app-font-arabic: "KFGQPC Hafs", serif; }
.q-surah-reading-frame[data-q-mushaf-font="kfgqpc-naskh"] { --app-font-arabic: "KFGQPC Naskh", serif; }
.q-surah-reading-frame[data-q-mushaf-font="me-quran"] { --app-font-arabic: "Me Quran", serif; }
.q-surah-reading-frame[data-q-mushaf-font="pdms-saleem"] { --app-font-arabic: "PDMS Saleem", serif; }
/* Gras/Espacement des lignes/Espacement des mots - surah-player.js sets
   these classes on document.body (own report: wanted "Thèmes et
   réglages" to repaint the whole page via body's own no-margin box, not
   just #main-content's own max-w-7xl/mx-auto gutters), so the ancestor
   half of each selector matches body, not #marks-scope - #q-karaoke-
   track's own id in the 2nd half is what actually beats the site-wide
   leading-loose/other utility classes each ayah <p> carries regardless
   of stylesheet load order, no [data-q-mushaf] ancestor prefix needed
   the way mushaf.css's own equivalent rules require. */
/* .q-mushaf-bold-text .q-arabic-text (font-weight:900) moved to
   popover.css - single source, combined selector with mushaf.css/card
   contexts (own report on the theme consolidation above). */
.q-surah-reading-frame.q-mushaf-custom-spacing #q-karaoke-track > p {
    line-height: var(--q-mushaf-line-height);
}
.q-surah-reading-frame.q-mushaf-custom-spacing .q-arabic-text {
    word-spacing: var(--q-mushaf-word-spacing);
}
/* .q-mushaf-justify-text #q-karaoke-track > p (text-align:justify) moved
   to popover.css too - combined selector with the new card-wide
   .ayah-block target (own report: "un Verset grand sur plusieur ligne
   ca du sens"). */

/* "Thèmes et réglages" submenu box - own class (not mushaf.css's own
   .q-popover chrome, this page's hover-flyout convention instead, same
   as Lecture/Récitant above). Same width as those (own report) - taller
   only, most content of any submenu here (quickrow + grid +
   Personnaliser's own font grid). */
.q-surah-theme-submenu {
    /* padding: .q-menu-submenu-lg's own shared 0.5rem (popover.css). */
    max-height: 28rem;
    overflow-y: auto;
}
/* #q-surah-report-dialog's own radiogroup (surah_detail.html) - plain
   Tailwind mt-/mb- utilities on the fieldset lost to .q-choice-group's
   own margin:0 (input.css, same specificity, later in source order).
   ID-scoped like #q-surah-reading-submenu #mark-toggles just above
   overrides it for real regardless of stylesheet order. */
#q-surah-report-reason {
    margin-top: 0.75rem;
    margin-bottom: 1rem;
}
