/* Quran Hifz - app shell: floating controls (no header), settings sheet (gear), «حفظ» panel (home, nav, history, more), help page,
   coach marks, tajweed colour key. Loaded last. Colours come from the app variables, so dark + light themes both work. */
:root { --hf-line: color-mix(in srgb, var(--gold) 24%, transparent); --hf-line2: color-mix(in srgb, var(--gold) 45%, transparent);
  --hf-soft: #ffffff0b; --hf-soft2: #ffffff14; --hf-ok: #3fa36b; --hf-r: 14px; --hf-zoom: 1;
  --tj-g: #d6156b; --tj-h: #12873d; --tj-q: #1658c9; --tj-mw: #c2410c; --tj-mj: #d97706; --tj-s: #a3a3a3; }
html[dir=ltr] #stSheet, html[dir=ltr] #help > div, html[dir=ltr] .cm-tip, html[dir=ltr] .hd-go, html[dir=ltr] #tjKey { direction: ltr; }
#stSheet, #help > div, .cm-tip, .hd-go, #tjKey { direction: rtl; }
html[dir=ltr] #stSheet, html[dir=ltr] #help > div, html[dir=ltr] .cm-tip, html[dir=ltr] .hd-go, html[dir=ltr] #tjKey { direction: ltr; }
.qi-svg { flex: none; }

/* ================================================================ immersive reader: no top header, floating auto-hiding controls */
main, aside#panel { top: 0 !important; }
#rdSheet { top: 0 !important; }
.toast { top: 18px; }
#qiBtn, #aboutBtn, #helpBtn, #simpleBtn { display: none !important; }
/* ================================================================ bottom chrome "Scene 2": full-width ayah player bar + 5 tabs (modules/dock.js) */
:root { --mini-h: 62px; --nav-h: 58px; --dk-h: calc(var(--mini-h) + var(--nav-h)); --dk-bg: #0d1914; --dk-bg2: #10201a; --dk-line: #8a7440;
  --dk-fg: #f1ead2; --dk-mut: #a9bcb1; --dk-hov: #ffffff12; --dk-mic: #2f9e62; --tw-h: 64px; }
body.light { --dk-bg: #24463a; --dk-bg2: #2a4f41; --dk-line: #b39349; --dk-fg: #fbf4dc; --dk-mut: #cddbd2; --dk-hov: #ffffff1a; }
main, aside#panel { bottom: var(--dk-h) !important; transition: right .2s, bottom .2s ease; }
body.simple footer { display: flex !important; bottom: var(--dk-h); z-index: 9; transition: bottom .2s ease, opacity .2s; }
body.simple main { bottom: calc(var(--dk-h) + 44px) !important; }

#dock { position: fixed; z-index: 12; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; color: var(--dk-fg);
  background: var(--dk-bg); border-top: 1px solid var(--dk-line); box-shadow: 0 -6px 22px #0000004d; transition: transform .2s ease, visibility .2s; direction: rtl; }
html[dir=ltr] #dock, html[dir=ltr] #plSheet { direction: ltr; }

/* the player bar keeps one physical order in every language: avatar, ⏮ ▶ ⏹ ⏭, the ayah, 3/7, focus, mic */
.dk-mini { position: relative; height: var(--mini-h); direction: ltr; display: grid; align-items: center; column-gap: 10px; padding: 0 14px;
  grid-template-columns: auto auto minmax(0, 1fr) auto auto auto; grid-template-areas: "av ctl ay rep fo mic"; }
.dk-prog { position: absolute; top: -1px; left: 0; right: 0; height: 2px; background: #ffffff14; overflow: hidden; }
.dk-prog i, .pl-prog i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #b8912c, var(--gold), #f3d77e); transition: width .25s linear; }
/* RTL: the progress grows from the right, like the reading direction (the bar row itself is laid out ltr) */
html[dir=rtl] .dk-prog i { margin-left: auto; background: linear-gradient(270deg, #b8912c, var(--gold), #f3d77e); }
.dk-dot { display: inline-block; margin: 0 .45em; opacity: .6; }
.dk-mini button { font: inherit; color: inherit; }
.dk-av { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%;
  background: radial-gradient(circle at 30% 25%, #2f6a50, #173a2b); border: 1.5px solid var(--gold); color: var(--gold); font-weight: 700; font-size: 14px;
  letter-spacing: .5px; font-family: 'Segoe UI', 'Noto Naskh Arabic', sans-serif; }
#dkAv { grid-area: av; padding: 0; cursor: pointer; transition: box-shadow .15s; }
#dkAv:hover { box-shadow: 0 0 0 4px var(--dk-hov); }
.dk-ctl { grid-area: ctl; display: flex; align-items: center; gap: 4px; direction: ltr; }
html[dir=rtl] .dk-ctl, html[dir=rtl] .tw-ctl { flex-direction: row-reverse; }
html[dir=rtl] .dk-flip svg { transform: scaleX(-1); }
.dk-b { width: 44px; height: 44px; padding: 0; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%;
  background: transparent; border: 0; color: var(--dk-fg); transition: background .15s, transform .1s, opacity .15s; }
.dk-b:hover { background: var(--dk-hov); }
.dk-b:active { transform: scale(.92); }
.dk-b.idle { opacity: .4; cursor: default; }
.dk-b.idle:hover { background: transparent; }
.dk-play { width: 46px; height: 46px; margin: 0 2px; background: var(--gold); color: #10241b; box-shadow: 0 3px 12px #0006; }
.dk-play:hover { background: #e2c25a; }
.dk-play.on { background: #f3d77e; }

/* the current ayah: DigitalKhatt IndoPak, tajweed colours, the word being recited lit, a smooth marquee for long ayahs */
.dk-ayah { grid-area: ay; position: relative; height: calc(var(--mini-h) - 8px); min-width: 0; overflow: hidden; padding: 0; margin: 0;
  background: transparent; border: 0; border-radius: 12px; cursor: pointer; color: var(--dk-fg);
  --tj-g: #ff7eb6; --tj-h: #7ee29c; --tj-q: #98c4ff; --tj-mw: #ffa36b; --tj-mj: #ffc861; --tj-s: #9aa7a0; }
.dk-ayah:hover { background: #ffffff08; }
/* soft fade only on the side(s) where more of the ayah is hidden (start of the ayah = right edge, no fade there) */
.dk-ayah.ovf { --fl: 28px; --fr: 28px;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 var(--fl), #000 calc(100% - var(--fr)), transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 var(--fl), #000 calc(100% - var(--fr)), transparent 100%); }
.dk-ayah.ovf.at-s { --fr: 0px; } .dk-ayah.ovf.at-e { --fl: 0px; }
.dk-ay-in { position: absolute; top: 0; bottom: 0; right: 0; display: flex; align-items: center; gap: .3em; white-space: nowrap;
  font-family: 'QMushafDK', 'Noto Naskh Arabic', serif; font-size: 25px; line-height: 1; direction: rtl; will-change: transform;
  transition: transform .7s cubic-bezier(.3, .1, .2, 1); }
.dk-ay-in.jump { transition: none; }
.dk-w { flex: none; display: inline-block; padding: 6px .12em 9px; border-radius: 8px; transition: background .25s, box-shadow .25s; }
.dk-w .tj { display: inline; }
.dk-ay-in .tj-g { color: var(--tj-g); } .dk-ay-in .tj-h { color: var(--tj-h); } .dk-ay-in .tj-q { color: var(--tj-q); }
.dk-ay-in:not(.qm-tj-full) .tj-mw, .dk-ay-in:not(.qm-tj-full) .tj-mj, .dk-ay-in:not(.qm-tj-full) .tj-s { color: inherit; }
.dk-ay-in.qm-tj-full .tj-mw { color: var(--tj-mw); } .dk-ay-in.qm-tj-full .tj-mj { color: var(--tj-mj); } .dk-ay-in.qm-tj-full .tj-s { color: var(--tj-s); }
.dk-w.dk-cur { background: #c9a54838; box-shadow: inset 0 -2px 0 var(--gold); }
.dk-ae { flex: none; color: var(--gold); font-size: 1.05em; padding: 0 .1em; }
.dk-ay-none { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--dk-mut); font-size: 13px; }

.dk-rep { grid-area: rep; min-width: 40px; text-align: center; font: 700 15px/1 'Segoe UI', sans-serif; color: var(--dk-mut); letter-spacing: .5px; font-variant-numeric: tabular-nums; }
.dk-mini.live .dk-rep { color: var(--gold); }
.dk-focus { grid-area: fo; width: auto; min-width: 44px; height: 38px; padding: 0 12px; gap: 6px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--dk-line) 75%, transparent); }
.dk-focus .dk-fl { font-size: 13px; white-space: nowrap; line-height: 1.6; }
.dk-mic { grid-area: mic; width: 44px; height: 44px; padding: 0; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: var(--dk-mic); border: 1px solid #6fd39a66; color: #fff; box-shadow: 0 3px 10px #0005; }
.dk-mic:hover { background: #35b36f; }
#dock button:focus-visible, #plSheet button:focus-visible, #twPill button:focus-visible { outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 60%, transparent); }

/* ================================================================ TAWAJJO (focus) mode: tabs + ayah bar go away, the mushaf fills the window,
   only a small glass pill with ⏮ ▶ ⏹ ⏭ + exit stays at the bottom centre (no timers: it never hides) */
body.tawajjo #dock { transform: translateY(100%); visibility: hidden; pointer-events: none; }
body.tawajjo main, body.tawajjo aside#panel { bottom: var(--tw-h) !important; }
body.tawajjo.simple main { bottom: var(--tw-h) !important; }
body.tawajjo footer, body.tawajjo.simple footer { bottom: 0; opacity: 0; visibility: hidden; pointer-events: none; }
/* phone: the page-turn arrows stay slim at the edge so they never cover the ayahs (⏮ ⏭ also turn the page) */
@media (max-width: 700px) { main .nav { width: 22px; height: 84px; font-size: 20px; border-radius: 8px; background: #0000001a; color: #ffffffb0; }
  #prevBtn { right: 0; } #nextBtn { left: 0; } }
#twPill { position: fixed; z-index: 13; left: 50%; bottom: 8px; display: flex; align-items: center; gap: 2px; padding: 4px 6px; direction: ltr;
  border-radius: 999px; border: 1px solid color-mix(in srgb, var(--gold) 70%, transparent); color: var(--dk-fg);
  background: color-mix(in srgb, var(--dk-bg) 72%, transparent); -webkit-backdrop-filter: blur(14px) saturate(1.3); backdrop-filter: blur(14px) saturate(1.3);
  box-shadow: 0 8px 26px #0007, inset 0 1px 0 #ffffff14; transform: translate(-50%, 0); opacity: 1; transition: transform .2s ease, opacity .2s ease, visibility .2s; }
#twPill[hidden] { display: flex; visibility: hidden; opacity: 0; pointer-events: none; transform: translate(-50%, 20px); }
#twPill .dk-b { width: 42px; height: 42px; }
#twPill .dk-play { width: 46px; height: 46px; }
.tw-ctl { display: flex; align-items: center; gap: 2px; direction: ltr; }

#dock #hfNav { order: 0; height: var(--nav-h); display: grid; grid-template-columns: repeat(5, minmax(0, 112px)); justify-content: center; gap: 6px; padding: 3px 8px 4px;
  background: var(--dk-bg2); border-top: 1px solid #ffffff10; zoom: 1; }
#dock #hfNav button { min-height: 0; height: 100%; padding: 3px 4px; gap: 2px; border-radius: 12px; color: var(--dk-mut); font-size: 12px; position: relative; }
#dock #hfNav button:hover { background: var(--dk-hov); color: var(--dk-fg); }
#dock #hfNav button.on { color: var(--gold); background: transparent; }
#dock #hfNav button.on::before { content: ''; position: absolute; top: -3px; left: 30%; right: 30%; height: 2px; border-radius: 2px; background: var(--gold); }
#dock #hfNav.closed button.on { color: var(--dk-mut); font-weight: 400; }
#dock #hfNav.closed button.on::before { display: none; }
#dock #hfNav.closed button.on svg { stroke-width: 1.6; }
#dock #hfNav .hf-nl { white-space: nowrap; overflow: visible; }
html[lang=ur] #dock #hfNav .hf-nl { font-size: 12px; line-height: 1.6; }
/* full player sheet */
#plOv { position: fixed; inset: 0; z-index: 30; background: #0008; opacity: 0; transition: opacity .2s; }
#plOv.show { opacity: 1; }
#plSheet { position: fixed; z-index: 31; left: 50%; bottom: 0; width: min(560px, 100vw); max-height: calc(100vh - 24px); display: flex; flex-direction: column;
  background: var(--bar); color: var(--text); border: 1px solid var(--dk-line); border-bottom: 0; border-radius: 20px 20px 0 0; box-shadow: 0 -18px 50px #000a;
  transform: translate(-50%, 100%); transition: transform .22s ease; direction: rtl; }
#plSheet.show { transform: translate(-50%, 0); }
#plSheet[hidden], #plOv[hidden] { display: none; }
.pl-top { display: flex; align-items: center; gap: 8px; padding: 10px 12px 6px; }
.pl-top h3 { flex: 1; margin: 0; text-align: center; font-size: 15px; color: var(--gold); line-height: 1.6; }
html[lang=ur] .pl-top h3 { font-family: 'Noto Nastaliq Urdu', 'Noto Naskh Arabic', serif; font-weight: 600; }
.pl-x, .pl-sp { width: 40px; height: 40px; flex: none; }
.pl-x { padding: 0; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: transparent; border: 0; color: var(--text); }
.pl-x:hover { background: var(--hf-soft2); }
.pl-x svg { transform: rotate(-90deg); }
.pl-body { overflow: auto; padding: 4px 18px 18px; }
.pl-now { display: flex; align-items: center; gap: 14px; margin: 4px 0 12px; }
.pl-av { width: 64px; height: 64px; font-size: 22px; }
.pl-tx { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pl-tx b { font-size: 17px; color: var(--text); line-height: 1.5; }
.pl-tx small { font-size: 13px; color: var(--muted); line-height: 1.5; }
.pl-prog { height: 4px; border-radius: 4px; background: #ffffff1c; overflow: hidden; }
.pl-pt { display: flex; justify-content: space-between; margin: 5px 0 6px; font-size: 12.5px; color: var(--muted); }
.pl-rep { color: var(--gold); font-weight: 600; }
.pl-host .ayahbox { margin-top: 4px; }
.pl-host .ctrl { justify-content: center; align-items: center; gap: 14px; margin: 10px 0 14px; direction: ltr; }
html[dir=rtl] .pl-host .ctrl { flex-direction: row-reverse; }
.pl-host .ctrl button { flex: none; width: 48px; height: 48px; padding: 0; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: 1px solid var(--hf-line); color: var(--text); }
.pl-host .ctrl button:hover { background: var(--hf-soft2); }
.pl-host .ctrl #pPlay { width: 64px; height: 64px; background: var(--gold); border-color: var(--gold); color: #10241b; box-shadow: 0 4px 14px #0006; }
.pl-host .ctrl #pPlay:hover { background: #e2c25a; }
/* same order as the bar and the tawajjo pill: ⏮ ▶ ⏹ ⏭; the row stays pinned at the bottom of the sheet so it is never cut off */
.pl-host .ctrl #pPrev { order: 1; } .pl-host .ctrl #pPlay { order: 2; } .pl-host .ctrl #pStop { order: 3; } .pl-host .ctrl #pNext { order: 4; }
.pl-host .ctrl { position: sticky; bottom: 0; z-index: 2; margin: 6px -18px 8px; padding: 10px 18px 14px; background: var(--bar);
  box-shadow: 0 -10px 14px -8px color-mix(in srgb, var(--bar) 90%, transparent); }
.pl-host .row { display: flex; align-items: center; gap: 10px; margin: 8px 0; }
.pl-host .row > label:first-child { min-width: 72px; color: var(--muted); font-size: 13.5px; }
.pl-host .row select { flex: 1; min-width: 0; }
.pl-host .chk { display: block; margin: 8px 0; font-size: 13.5px; line-height: 1.8; }
.pl-host .note { font-size: 12.5px; color: var(--muted); line-height: 1.8; }
/* sheet: where-am-I pill + speed chip (moved here from the bar) */
.pl-meta { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 10px; margin: 2px 0 12px; }
.dk-speed { min-width: 52px; height: 34px; padding: 0 12px; border-radius: 999px; background: transparent; border: 1px solid var(--hf-line2);
  color: var(--gold); font-size: 13.5px; font-weight: 700; direction: ltr; }
.dk-speed:hover { background: var(--hf-soft2); }
/* go-to sheet: page slider at the bottom */
.hg-slide input[type=range] { width: 100%; direction: rtl; accent-color: var(--gold); }
@media (max-width: 1000px) { .dk-focus { padding: 0; width: 42px; min-width: 42px; } .dk-focus .dk-fl { display: none; } }
/* phone: tabs open as a full sheet above the bars, the mushaf uses the whole width; the player bar takes two rows:
   the ayah on top, avatar + ⏮ ▶ ⏹ ⏭ + 3/7 + focus + mic below (the four buttons stay at every width) */
@media (max-width: 700px) {
  :root { --mini-h: 98px; --nav-h: 60px; --tw-h: 60px; }
  body.panel main { right: 0 !important; }
  aside#panel { left: 0; width: auto !important; border-left: 0; z-index: 11; }
  .dk-mini { grid-template-columns: auto auto minmax(0, 1fr) auto auto auto; grid-template-rows: 44px 50px; padding: 2px 8px 2px; column-gap: 5px;
    grid-template-areas: "ay ay ay ay ay ay" "av ctl . rep fo mic"; }
  .dk-ayah { height: 44px; }
  .dk-ay-in { font-size: 21px; }
  .dk-w { padding: 5px .1em 8px; }
  .dk-av { width: 36px; height: 36px; font-size: 13px; }
  .dk-ctl { gap: 0; }
  .dk-mini .dk-b { width: 42px; height: 42px; }
  .dk-mini .dk-play { width: 44px; height: 44px; }
  .dk-rep { min-width: 30px; font-size: 14px; }
  .dk-mic { width: 42px; height: 42px; }
  #dock #hfNav { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; padding: 3px 2px 4px; }
  #plSheet { max-height: calc(100vh - 12px); }
  #book.own { padding: 6px 8px; }
}
@media (prefers-reduced-motion: reduce) { #dock, #plSheet, #plOv, main, aside#panel, #twPill, .dk-ay-in { transition: none !important; } }
html[dir=ltr] .pl-host #pPrev svg, html[dir=ltr] .pl-host #pNext svg { transform: scaleX(-1); }
/* bottom bar: where-am-I pill (para · surah · page) opens the go-to sheet */
footer #status { display: none !important; }
.ft-where { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 14px; border-radius: 999px; white-space: nowrap;
  background: #00000026; border: 1px solid var(--hf-line); color: var(--text); font-size: 13.5px; direction: rtl; }
html[dir=ltr] .ft-where { direction: ltr; }
.ft-where:hover, .ft-where.on { border-color: var(--gold); background: color-mix(in srgb, var(--gold) 14%, transparent); }
.ft-where b { color: var(--gold); font-weight: 700; }
.ft-where .ft-sur { color: var(--text); font-family: 'Noto Naskh Arabic', serif; font-size: 14.5px; }
.ft-where .hd-dot { color: var(--muted); padding: 0 1px; }
.ft-where svg:last-child { transform: rotate(90deg); opacity: .7; }
.hd-go { position: fixed; z-index: 40; padding: 12px 14px 14px; background: var(--bar); border: 1px solid var(--hf-line2); border-radius: 16px;
  box-shadow: 0 -10px 34px #0008; color: var(--text); }
.hd-go[hidden] { display: none; }
.hd-go .hg-h { margin: 2px 0 6px; font-size: 13px; color: var(--gold); font-weight: 600; }
.hd-go .row { display: flex; align-items: center; gap: 8px; margin: 7px 0; }
.hd-go .row label { min-width: 74px; color: var(--muted); font-size: 13px; }
.hd-go select { flex: 1; min-width: 0; }
.hd-go input { flex: 1; width: auto !important; min-width: 0; }
.hd-go .hg-h2 { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--hf-line); }
.hg-bms { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.hg-bm { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.hg-go { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 7px 4px; border-radius: 12px; background: var(--hf-soft2); border: 1px solid var(--hf-line); min-width: 0; }
.hg-go b { color: var(--gold); font-size: 14px; line-height: 1.5; }
.hg-go small { color: var(--muted); font-size: 11.5px; line-height: 1.4; white-space: nowrap; }
.hg-go.on { border-color: var(--gold); background: color-mix(in srgb, var(--gold) 16%, transparent); }
.hg-go:disabled { opacity: .6; cursor: default; }
.hg-save { font-size: 12px; padding: 5px 4px; border-radius: 10px; background: transparent; border: 1px dashed var(--hf-line2); color: var(--text); white-space: nowrap; }
.hg-save:hover { border-style: solid; border-color: var(--gold); background: transparent; }
/* reading-mode switch (top of the حفظ panel and of Settings) */
.md-box { margin: 0 0 14px; padding: 10px 10px 8px; border: 1px solid var(--hf-line); border-radius: var(--hf-r); background: var(--hf-soft); }
.md-t { display: block; font-size: 12.5px; color: var(--muted); font-weight: 600; margin: 0 2px 6px; }
.md-switch { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 4px; background: #00000030; border-radius: 12px; }
body.light .md-switch { background: #0000000f; }
.md-switch button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-width: 0; min-height: 54px; padding: 6px 4px;
  background: transparent; border: 0; border-radius: 9px; color: var(--text); font-size: 12.5px; line-height: 1.35; text-align: center; }
.md-switch button:hover { background: var(--hf-soft2); }
.md-switch button.on { background: var(--accent); color: #fff; box-shadow: inset 0 -2px 0 var(--gold); font-weight: 600; }
.md-switch button svg { color: var(--gold); }
.md-switch button.on svg { color: #fff4cf; }
.md-desc { margin: 6px 2px 0; font-size: 12px; color: var(--muted); line-height: 1.6; }
.st-mdg { padding: 10px 10px 2px; }
.st-mdg .md-box { margin: 0 0 8px; border: 0; background: none; padding: 0; }
.st-logo { width: 30px; height: 30px; border-radius: 8px; flex: none; }
#stSheet:not(.st-main) .st-logo { display: none; }

/* ================================================================ panel shell */
aside#panel { overflow: hidden; }
aside#panel > .tabs { display: none !important; }
aside#panel > * { order: 1; }
#hfHead { order: 0; flex: 0 0 auto; display: flex; align-items: center; gap: 10px; padding: 12px 14px 10px; border-bottom: 1px solid var(--hf-line);
  background: linear-gradient(180deg, #ffffff08, transparent); zoom: var(--hf-zoom); }
#hfHead .hf-hico { color: var(--gold); display: inline-flex; width: 38px; height: 38px; align-items: center; justify-content: center; border-radius: 12px;
  background: color-mix(in srgb, var(--gold) 14%, transparent); flex: none; }
#hfHead .hf-htxt { min-width: 0; flex: 1; }
#hfHead h3 { margin: 0; font-size: 16px; color: var(--gold); line-height: 1.5; }
#hfHead p { margin: 0; font-size: 12.5px; color: var(--muted); line-height: 1.55; }
.hf-back { width: 36px; height: 36px; padding: 0 !important; display: inline-flex; align-items: center; justify-content: center; flex: none; border-radius: 10px !important; }
.hf-back svg, .st-back svg { transform: scaleX(-1); }
html[dir=ltr] .hf-back svg, html[dir=ltr] .st-back svg { transform: none; }
html[dir=ltr] .hf-list > button > svg:last-child, html[dir=ltr] .st-chev svg { transform: scaleX(-1); }
aside#panel > .tab { zoom: var(--hf-zoom); }
#hfNav { order: 2; flex: 0 0 auto; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 2px; padding: 6px 6px 7px;
  border-top: 1px solid var(--hf-line); background: color-mix(in srgb, var(--bar) 70%, #000 30%); zoom: var(--hf-zoom); }
#hfNav button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-width: 0; min-height: 54px; padding: 6px 2px 5px;
  background: transparent; border: 0; border-radius: 12px; color: var(--muted); font-size: 12px; line-height: 1.25; }
#hfNav button:hover { background: var(--hf-soft2); color: var(--text); }
#hfNav button.on { color: var(--gold); background: color-mix(in srgb, var(--gold) 13%, transparent); font-weight: 600; }
#hfNav button.on svg { stroke-width: 2; }
#hfNav .hf-nl { max-width: 100%; text-align: center; overflow-wrap: anywhere; }
html[lang=ur] #hfNav .hf-nl { font-family: 'Noto Nastaliq Urdu', 'Noto Naskh Arabic', serif; font-size: 12px; line-height: 1.75; }

/* ================================================================ home */
.hf-sec { padding: 12px 14px 18px !important; }
.hf-card { background: var(--hf-soft); border: 1px solid var(--hf-line); border-radius: var(--hf-r); padding: 12px; margin: 0 0 12px; }
.hf-card h4 { margin: 0 0 6px !important; display: flex !important; align-items: center; gap: 8px; color: var(--gold); font-size: 15px; }
.hf-card h4::after { display: none !important; }
.hf-card h4 svg { color: var(--gold); }
.hf-desc { margin: 2px 0 8px; font-size: 12.5px; color: var(--muted); line-height: 1.6; }
.hf-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.hf-tb { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 34px; padding: 4px 12px; font-size: 13px; border-radius: 10px;
  background: var(--hf-soft2); border: 1px solid var(--hf-line); color: var(--text); white-space: normal; text-align: center; flex: none; }
.hf-tb:hover { border-color: var(--gold); }
.hf-tb.primary { background: var(--accent); color: #fff; border-color: var(--hf-line2); }
.hf-tb.ghost { background: transparent; }
.hf-tb.wide { width: 100%; margin-top: 8px; }
.hf-start { border-color: var(--hf-line2); background: color-mix(in srgb, var(--gold) 9%, transparent); }
.hf-start ol { margin: 4px 0 2px; padding-inline-start: 22px; line-height: 1.9; font-size: 13.5px; }
.hf-th { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.hf-th h4 { margin: 0 !important; }
.hf-th small { display: block; color: var(--muted); font-size: 12px; line-height: 1.5; }
.hf-rw { position: relative; width: 64px; height: 64px; flex: none; }
.hf-ring { display: block; }
.hf-rbg { fill: none; stroke: #ffffff17; stroke-width: 6; }
.hf-rfg { fill: none; stroke: var(--gold); stroke-width: 6; stroke-linecap: round; transition: stroke-dasharray .4s; }
.hf-rnum { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 15px; color: var(--text); }
.hf-task { display: flex; align-items: center; gap: 10px; padding: 9px 4px; border-top: 1px solid #ffffff0d; }
.hf-task .hf-tt { flex: 1; min-width: 0; }
.hf-task .hf-tt b { display: block; font-size: 14px; line-height: 1.5; }
.hf-task .hf-tt small { display: block; font-size: 12.5px; color: var(--muted); line-height: 1.55; }
.hf-task.done .hf-tt b { color: var(--hf-ok); }
.hf-chk { position: relative; flex: none; cursor: pointer; margin: 0 !important; padding: 0 !important; }
.hf-chk input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.hf-box { width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; border-radius: 9px; border: 2px solid var(--hf-line2);
  color: transparent; transition: background .15s, border-color .15s; }
.hf-chk:hover .hf-box { border-color: var(--gold); }
.hf-chk input:checked + .hf-box, .hf-chk.auto.on .hf-box { background: var(--hf-ok); border-color: var(--hf-ok); color: #fff; }
.hf-chk input:focus-visible + .hf-box { box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 35%, transparent); }
.hf-chk.auto { cursor: default; }
.hf-chk.auto .hf-box { border-style: dashed; color: var(--muted); }
.hf-bms { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.hf-bm { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.hf-bmgo { display: flex; flex-direction: column; align-items: center; padding: 8px 4px !important; border-radius: 12px !important; background: var(--hf-soft2);
  border: 1px solid var(--hf-line); min-height: 56px; }
.hf-bmgo b { font-size: 14px; color: var(--gold); line-height: 1.5; }
.hf-bmgo small { font-size: 12px; color: var(--muted); }
.hf-bmgo.on { border-color: var(--gold); background: color-mix(in srgb, var(--gold) 16%, transparent); }
.hf-bmgo:disabled { opacity: .6; cursor: default; }
.hf-bmsave { font-size: 12px !important; padding: 4px 2px !important; background: transparent; border: 1px dashed var(--hf-line2); border-radius: 9px !important; color: var(--muted); }
.hf-bmsave:hover { color: var(--text); border-color: var(--gold); }
.hf-qa { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0 0 12px; }
.hf-qa button { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 12px; min-height: 96px; text-align: start;
  background: var(--hf-soft); border: 1px solid var(--hf-line); border-radius: var(--hf-r) !important; }
.hf-qa button:hover { border-color: var(--gold); background: var(--hf-soft2); }
.hf-qa button svg { color: var(--gold); margin-bottom: 2px; }
.hf-qa b { font-size: 14px; line-height: 1.45; }
.hf-qa small { font-size: 12px; color: var(--muted); line-height: 1.5; }
.hf-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 6px 0 10px; }
.hf-stats div { text-align: center; padding: 8px 2px; background: var(--hf-soft2); border-radius: 12px; }
.hf-stats b { display: block; font-size: 22px; color: var(--gold); line-height: 1.3; }
.hf-stats small { font-size: 12px; color: var(--muted); line-height: 1.4; display: block; }
.hf-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; align-items: end; height: 76px; padding: 0 2px; }
.hf-wd { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; height: 100%; }
.hf-wd i { width: 100%; max-width: 26px; border-radius: 6px 6px 3px 3px; background: color-mix(in srgb, var(--gold) 70%, transparent); }
.hf-wd i.z { background: #ffffff14; }
.hf-wd.now i { background: var(--gold); box-shadow: 0 0 0 2px color-mix(in srgb, var(--gold) 30%, transparent); }
.hf-wd small { font-size: 11px; color: var(--muted); line-height: 1.2; white-space: nowrap; }
.hf-support { display: flex !important; align-items: center; justify-content: center; gap: 8px; width: 100%; margin: 4px 0 0; padding: 10px !important;
  background: transparent !important; border: 1px dashed var(--hf-line) !important; color: var(--muted); font-size: 12.5px !important; line-height: 1.6; }
.hf-support:hover { color: var(--text); border-color: var(--gold) !important; }
.hf-support svg { color: #e0708f; }

/* more list */
.hf-list { background: var(--hf-soft); border: 1px solid var(--hf-line); border-radius: var(--hf-r); overflow: hidden; margin: 0 0 12px; }
.hf-list > button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px; background: transparent; border: 0; border-radius: 0 !important;
  border-bottom: 1px solid #ffffff0d; text-align: start; color: var(--text); }
.hf-list > button:last-child { border-bottom: 0; }
.hf-list > button:hover { background: var(--hf-soft2); }
.hf-li { width: 40px; height: 40px; flex: none; display: inline-flex; align-items: center; justify-content: center; border-radius: 12px; color: var(--gold);
  background: color-mix(in srgb, var(--gold) 13%, transparent); }
.hf-lt { flex: 1; min-width: 0; }
.hf-lt b { display: block; font-size: 14px; line-height: 1.5; }
.hf-lt small { display: block; font-size: 12.5px; color: var(--muted); line-height: 1.55; }
.hf-list > button > svg:last-child { color: var(--muted); }

/* daily account */
.hf-hist { margin: 4px 0 14px; }
.hf-hist h4 { margin-top: 6px !important; }
.hf-tots { display: grid; gap: 8px; margin-bottom: 10px; }
.hf-tot { background: var(--hf-soft); border: 1px solid var(--hf-line); border-radius: 12px; padding: 8px 10px; }
.hf-tot > b { display: block; font-size: 13px; color: var(--gold); margin-bottom: 4px; }
.hf-tot > div { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.hf-tot span { display: flex; flex-direction: column; align-items: center; text-align: center; font-size: 11.5px; color: var(--muted); line-height: 1.35;
  background: var(--hf-soft2); border-radius: 9px; padding: 5px 2px; }
.hf-tot em { font-style: normal; font-size: 17px; font-weight: 700; color: var(--text); }
.hf-tw { border: 1px solid var(--hf-line); border-radius: 12px; overflow: hidden; }
.hf-table { width: 100%; border-collapse: collapse; font-size: 12.5px; table-layout: fixed; }
.hf-table th { background: color-mix(in srgb, var(--gold) 14%, transparent); color: var(--gold); font-weight: 600; font-size: 11.5px; padding: 6px 2px; line-height: 1.3;
  overflow-wrap: anywhere; }
.hf-table th:first-child, .hf-table td:first-child { width: 22%; }
.hf-table td { text-align: center; padding: 5px 2px; border-top: 1px solid #ffffff0d; }
.hf-table td:first-child { color: var(--muted); font-size: 12px; white-space: nowrap; }
.hf-table tr.hf-off td { opacity: .5; }
.hf-table small { color: #e88; }
.hf-y { color: var(--hf-ok); display: inline-flex; }
.hf-n { color: var(--muted); }
#tab-prog > h4:last-of-type, #log { display: none; }

/* repeat-player placeholder (outside the Quran text box so it is translated) */
#ayahText:empty { display: none; }
.ayah-ph { text-align: center; color: var(--muted); font-size: 15px; padding: 18px 6px; line-height: 1.7; }
#ayahText:not(:empty) + .ayah-ph { display: none; }

/* ================================================================ settings sheet */
#stOv { position: fixed; inset: 0; z-index: 44; background: #0007; opacity: 0; transition: opacity .2s; }
#stOv.on { opacity: 1; }
#stSheet { position: fixed; top: 0; bottom: 0; right: 0; z-index: 45; width: min(440px, 100vw); display: flex; flex-direction: column;
  background: linear-gradient(180deg, var(--bar2), var(--bar) 160px); border-left: 1px solid var(--hf-line2); box-shadow: -14px 0 40px #0008;
  transform: translateX(104%); transition: transform .22s ease-out; color: var(--text); }
html[dir=ltr] #stSheet { right: auto; left: 0; border-left: 0; border-right: 1px solid var(--hf-line2); box-shadow: 14px 0 40px #0008; transform: translateX(-104%); }
#stSheet.on { transform: none !important; }
@media (prefers-reduced-motion: reduce) { #stSheet, #stOv { transition: none; } }
.st-top { display: flex; align-items: center; gap: 8px; padding: 12px 12px 10px; border-bottom: 1px solid var(--hf-line); flex: none; }
.st-top h2 { flex: 1; margin: 0; font-size: 18px; color: var(--gold); line-height: 1.6; min-width: 0; }
.st-top button { width: 38px; height: 38px; padding: 0; display: inline-flex; align-items: center; justify-content: center; border-radius: 11px; flex: none; }
.st-body { flex: 1; overflow-y: auto; padding: 12px 14px 22px; zoom: var(--hf-zoom); }
.st-body.st-in { animation: st-in .2s ease-out; }
@keyframes st-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
html[lang=ur] #stSheet, html[lang=ur] #help > div, html[lang=ur] .cm-tip, html[lang=ur] .hd-go { font-family: 'Noto Naskh Arabic', 'Segoe UI', Tahoma, sans-serif; }
html[lang=ur] .st-top h2, html[lang=ur] #help h2, html[lang=ur] #hfHead h3 { font-family: 'Noto Nastaliq Urdu', 'Noto Naskh Arabic', serif; font-weight: 600; }
.st-group { background: var(--hf-soft); border: 1px solid var(--hf-line); border-radius: var(--hf-r); overflow: hidden; margin-bottom: 12px; }
.st-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 12px; background: transparent; border: 0; border-radius: 0;
  border-bottom: 1px solid #ffffff0d; text-align: start; color: var(--text); }
.st-row:last-child { border-bottom: 0; }
.st-row:hover { background: var(--hf-soft2); }
.st-row:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }
.st-ic { width: 38px; height: 38px; flex: none; display: inline-flex; align-items: center; justify-content: center; border-radius: 11px; color: var(--gold);
  background: color-mix(in srgb, var(--gold) 13%, transparent); }
.st-rt { flex: 1; min-width: 0; }
.st-rt b { display: block; font-size: 14.5px; font-weight: 600; line-height: 1.5; }
.st-rt small { display: block; font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.st-chev { color: var(--muted); display: inline-flex; }
.st-danger .st-ic { color: #f19a8f; background: #f19a8f1f; }
.st-foot { text-align: center; color: var(--muted); font-size: 12px; margin: 6px 0 0; }
.st-note { color: var(--muted); font-size: 13px; line-height: 1.7; margin: 4px 0 12px; }
.st-sub { display: flex; align-items: center; gap: 8px; margin: 14px 0 4px; color: var(--gold); font-size: 15px; }
.st-sub:first-child { margin-top: 2px; }
.st-field { display: flex; flex-direction: column; gap: 6px; margin: 0 0 14px; }
.st-fl { display: flex; flex-direction: column; min-width: 0; }
.st-fl b { font-size: 14px; font-weight: 600; line-height: 1.5; }
.st-fl small { font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.st-select { width: 100%; min-height: 40px; border-radius: 11px !important; background: color-mix(in srgb, var(--btn) 70%, #000 20%) !important; }
.st-seg { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; background: #00000030; border: 1px solid var(--hf-line); border-radius: 13px; }
.st-seg button { flex: 1 1 auto; min-height: 38px; padding: 6px 10px; background: transparent; border: 0; border-radius: 10px; color: var(--text); font-size: 13.5px;
  line-height: 1.4; white-space: normal; }
.st-seg button:hover { background: var(--hf-soft2); }
.st-seg button.on { background: var(--accent); color: #fff; box-shadow: inset 0 -2px 0 var(--gold); font-weight: 600; }
.st-sw7 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.st-sw7 button { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 2px; background: var(--hf-soft); border: 1px solid var(--hf-line);
  border-radius: 12px; font-size: 12px; line-height: 1.35; color: var(--text); }
.st-sw7 button.on { border-color: var(--gold); background: color-mix(in srgb, var(--gold) 15%, transparent); }
.st-sw7 i { width: 30px; height: 30px; border-radius: 50%; border: 1px solid #0000004d; box-shadow: inset 0 0 0 2px #ffffff40; }
.st-sw7 i.auto { background: linear-gradient(135deg, #f6eccf 50%, #123d2b 50%); }
.st-sw7 span { text-align: center; overflow-wrap: anywhere; }
.st-tg { display: flex; align-items: center; gap: 12px; padding: 10px 0; margin: 0 0 6px; cursor: pointer; border-bottom: 1px solid #ffffff0d; }
.st-tg .st-fl { flex: 1; }
.st-tg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.st-sw { width: 44px; height: 26px; flex: none; border-radius: 13px; background: #ffffff26; position: relative; transition: background .15s; }
.st-sw::after { content: ''; position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: right .15s; box-shadow: 0 1px 3px #0006; }
.st-tg input:checked + .st-sw { background: var(--accent); }
.st-tg input:checked + .st-sw::after { right: 21px; }
html[dir=ltr] .st-sw::after { right: auto; left: 3px; transition: left .15s; }
html[dir=ltr] .st-tg input:checked + .st-sw::after { left: 21px; }
.st-tg input:focus-visible + .st-sw { box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 35%, transparent); }
.st-vol { display: flex; align-items: center; gap: 10px; margin: -2px 0 10px; color: var(--muted); }
.st-vol input { flex: 1; accent-color: var(--gold); }
.st-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 42px; margin: 4px 0 8px; padding: 8px 12px;
  border-radius: 12px; border: 1px solid var(--hf-line); background: var(--hf-soft2); color: var(--text); font-size: 14px; white-space: normal; text-align: center; }
.st-btn:hover:not(:disabled) { border-color: var(--gold); }
.st-btn.primary { background: var(--accent); color: #fff; border-color: var(--hf-line2); }
.st-btn.ghost { background: transparent; }
.st-btn.danger { background: #8a3a32; color: #fff; border-color: #c96a5f; }
.st-btn:disabled { opacity: .55; cursor: not-allowed; }
.st-col { display: flex; flex-direction: column; }
.st-card { background: var(--hf-soft); border: 1px solid var(--hf-line); border-radius: 12px; padding: 4px 12px; margin: 0 0 12px; }
.st-kv { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid #ffffff0d; font-size: 13.5px; }
.st-kv:last-child { border-bottom: 0; }
.st-kv span { color: var(--muted); display: inline-flex; }
.st-kv b { text-align: end; }
.st-hero { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 16px 12px; margin: 0 0 12px;
  background: var(--hf-soft); border: 1px solid var(--hf-line); border-radius: var(--hf-r); }
.st-hero > svg { color: var(--gold); }
.st-hero h3 { margin: 0; color: var(--gold); font-size: 17px; }
.st-hero p { margin: 0; font-size: 13.5px; line-height: 1.75; }
.st-pill { display: inline-block; padding: 3px 12px; border-radius: 999px; background: color-mix(in srgb, var(--gold) 18%, transparent); color: var(--gold); font-size: 12.5px; }
.st-don > svg { color: #e0708f; }
.st-dtx { font-size: 15px !important; }
.st-num { font: 700 30px/1.3 'Segoe UI', Tahoma, sans-serif; letter-spacing: 1px; color: var(--gold); margin: 6px 0 2px; user-select: all; }
.st-svc { color: var(--muted); font-size: 13px; }
.st-dua { color: var(--muted); font-size: 12.5px !important; }
.st-warn > svg { color: #f19a8f; }
.st-confirm { padding: 4px 0 0; }
#stSheet .qi-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
#stSheet .qi-grid button { min-height: 46px; padding: 6px 8px; border-radius: 12px; background: var(--hf-soft); border: 1px solid var(--hf-line); font-size: 15px; white-space: normal; }
#stSheet .qi-grid button.on { border-color: var(--gold); background: var(--accent); color: #fff; }
.st-legend { display: grid; gap: 4px; margin: 10px 0 8px; padding: 8px 10px; border-radius: 12px; background: #f8f1dc; color: #1b2a22; border: 1px solid var(--hf-line2); }
.st-legend.off { opacity: .55; }
.st-lg { display: flex; align-items: center; gap: 8px; font-size: 13px; line-height: 1.4; min-height: 34px; }
.st-lg.dim { opacity: .4; }
.st-lg > span:nth-child(2) { flex: 1; min-width: 0; }
.st-lg i, #tjKey i { width: 12px; height: 12px; border-radius: 50%; flex: none; display: inline-block; }
.st-lgx.arabic { font-family: 'QMushafDK', 'Noto Naskh Arabic', serif !important; font-size: 21px !important; line-height: 1.5 !important; text-align: end; color: inherit !important; }
.tjk-g { background: var(--tj-g); } .tjk-h { background: var(--tj-h); } .tjk-q { background: var(--tj-q); } .tjk-mw { background: var(--tj-mw); } .tjk-mj { background: var(--tj-mj); } .tjk-s { background: var(--tj-s); }
.tjc-g { color: var(--tj-g) !important; } .tjc-h { color: var(--tj-h) !important; } .tjc-q { color: var(--tj-q) !important; } .tjc-mw { color: var(--tj-mw) !important; } .tjc-mj { color: var(--tj-mj) !important; } .tjc-s { color: var(--tj-s) !important; }

/* (old floating tajweed key: never shown — the key is printed inside each page's bottom margin, modules/mushaf.js) */
#tjKey { display: none !important; position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%); z-index: 6; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 12px;
  max-width: calc(100% - 140px); padding: 4px 14px; border-radius: 999px; background: #f8f1dce6; color: #1b2a22; border: 1px solid var(--hf-line2);
  font-size: 12px; line-height: 1.5; box-shadow: 0 3px 10px #0004; height: auto; }
#tjKey[hidden] { display: none; }
#tjKey span { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
#tjKey:hover { background: #fffaf0; }
body.hifz #tjKey { display: none; }

/* ================================================================ help page */
#help { z-index: 46; }
#help > div { position: relative; width: min(820px, calc(100vw - 32px)); max-width: none !important; max-height: calc(100vh - 40px); overflow-y: auto;
  padding: 20px 24px 18px !important; line-height: 1.7 !important; border: 1px solid var(--hf-line2) !important; border-radius: 18px !important;
  background: linear-gradient(180deg, var(--bar2), var(--bar) 200px) !important; box-shadow: 0 20px 60px #000a; }
#help h2 { margin: 0 0 12px !important; font-size: 20px; }
.gd-x { position: absolute; top: 14px; inset-inline-end: 14px; width: 38px; height: 38px; padding: 0; display: inline-flex; align-items: center; justify-content: center; border-radius: 11px; }
.gd-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.gd-steps li { background: var(--hf-soft); border: 1px solid var(--hf-line); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; }
.gd-pic { position: relative; background: color-mix(in srgb, var(--gold) 7%, #00000022); color: var(--text); padding: 10px 12px 6px; display: flex; justify-content: center; }
.gd-art { width: 100%; max-width: 190px; height: auto; }
.gd-n { position: absolute; top: 8px; inset-inline-start: 10px; width: 26px; height: 26px; border-radius: 50%; background: var(--gold); color: #123d2b;
  font: 700 14px/26px 'Segoe UI', sans-serif; text-align: center; }
.gd-tx { padding: 8px 12px 12px; }
.gd-tx b { display: block; color: var(--gold); font-size: 15px; line-height: 1.6; }
.gd-tx p { margin: 2px 0 0; font-size: 13px; line-height: 1.75; color: var(--text); }
.gd-keys { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 14px 0 4px; font-size: 13px; color: var(--muted); }
.gd-keys span { display: inline-flex; align-items: center; gap: 6px; }
.gd-foot { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.gd-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 6px 18px; border-radius: 12px;
  border: 1px solid var(--hf-line); background: var(--hf-soft2); color: var(--text); font-size: 14px; }
.gd-btn.primary { background: var(--accent); color: #fff; border-color: var(--hf-line2); }
.gd-btn.ghost { background: transparent; }
.gd-btn:hover { border-color: var(--gold); }

/* ================================================================ coach marks */
#cmOv { position: fixed; inset: 0; z-index: 60; }
.cm-hole { position: fixed; border-radius: 14px; box-shadow: 0 0 0 9999px #000000a8; outline: 2px solid var(--gold); outline-offset: 2px; pointer-events: none;
  transition: all .25s ease-out; }
.cm-tip { position: fixed; z-index: 61; padding: 14px 16px 12px; background: var(--bar); color: var(--text); border: 1px solid var(--hf-line2); border-radius: 16px;
  box-shadow: 0 16px 40px #000b; transition: top .25s, left .25s; line-height: 1.7; }
.cm-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cm-h b { color: var(--gold); font-size: 16px; }
.cm-n { color: var(--muted); font-size: 12.5px; }
.cm-tip p { margin: 4px 0 10px; font-size: 14px; }
.cm-btns { display: flex; justify-content: space-between; gap: 8px; }
html[lang=ur] .cm-h b { font-family: 'Noto Nastaliq Urdu', 'Noto Naskh Arabic', serif; }

/* about dialog: one quiet support line */
.ob-support { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; margin: 10px 0; padding: 9px 12px; background: transparent;
  border: 1px dashed var(--hf-line2); border-radius: 12px; color: inherit; font: inherit; font-size: 13px; cursor: pointer; line-height: 1.6; }
.ob-support svg { color: #e0708f; }

/* games / srs line icons (emoji-free) */
.gm-bicon svg, .gm-picon svg { color: var(--gold); }
.gm-stars { display: inline-flex; align-items: center; gap: 4px; }
.gm-stars svg { color: var(--gold); }
.srs-mini svg { vertical-align: middle; }
#hfHead [hidden], #stSheet [hidden], .hd-go[hidden], #help [hidden] { display: none !important; }

/* ================================================================ bottom-nav sections: ہوم tools heading, فہرست, لائیو, اکاؤنٹ */
.hf-sh { display: flex; align-items: center; gap: 8px; margin: 4px 2px 8px !important; color: var(--gold); font-size: 15px; }
.hf-sh::after { display: none !important; }
.hf-empty { margin: 8px 2px; font-size: 13px; color: var(--muted); line-height: 1.7; text-align: center; }
.hf-ar { font-family: 'Noto Naskh Arabic', 'Traditional Arabic', serif; font-weight: 600; }
/* index */
.hf-ixbar { position: sticky; top: -12px; z-index: 2; display: flex; flex-direction: column; gap: 8px; margin: 0 -14px 8px; padding: 8px 14px 10px;
  background: var(--bar); border-bottom: 1px solid var(--hf-line); }
.hf-ixs { display: flex; align-items: center; gap: 8px; margin: 0 !important; padding: 0 12px; height: 40px; border-radius: 12px; border: 1px solid var(--hf-line2);
  background: var(--hf-soft2); color: var(--muted); }
.hf-ixs:focus-within { border-color: var(--gold); }
.hf-ixs input { flex: 1; min-width: 0; width: auto !important; height: 38px; border: 0 !important; background: transparent !important; color: var(--text); font-size: 14px; outline: none; padding: 0 !important; }
.hf-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 12px; background: #00000030; }
body.light .hf-seg { background: #0000000d; }
.hf-seg button { min-height: 34px; padding: 4px 6px !important; border: 0 !important; border-radius: 9px !important; background: transparent; color: var(--muted); font-size: 13.5px; white-space: normal; line-height: 1.4; }
.hf-seg button.on { background: var(--accent); color: #fff; font-weight: 600; }
.hf-ixl { display: flex; flex-direction: column; gap: 4px; }
.hf-ix { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px !important; text-align: start; border-radius: 12px !important;
  background: transparent; border: 1px solid transparent; color: var(--text); }
.hf-ix:hover { background: var(--hf-soft2); border-color: var(--hf-line); }
.hf-ix.now { border-color: var(--hf-line2); background: color-mix(in srgb, var(--gold) 10%, transparent); }
.hf-ix > svg:last-child { color: var(--muted); flex: none; }
.hf-ixn { flex: none; width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%;
  border: 1px solid var(--hf-line2); color: var(--gold); font-size: 13px; font-weight: 600; }
.hf-ixt { flex: 1; min-width: 0; }
.hf-ixt b { display: block; font-size: 16px; line-height: 1.6; color: var(--text); }
.hf-ixt b .hf-ar { color: var(--gold); font-size: 15px; margin-inline-start: 4px; }
.hf-ixt small { display: block; font-size: 12px; color: var(--muted); line-height: 1.5; }
/* live */
.hf-live { background: color-mix(in srgb, var(--gold) 8%, transparent); border: 1px solid var(--hf-line2); border-radius: var(--hf-r); }
.hf-join { min-height: 44px; padding: 6px 20px; font-size: 14.5px; margin-top: 6px; }
.hf-join:disabled { opacity: .55; cursor: not-allowed; }
.hf-ol { margin: 4px 0 2px; padding-inline-start: 22px; line-height: 1.9; font-size: 13.5px; }
.hf-ses { display: flex; flex-direction: column; }
.hf-se { display: flex; align-items: center; gap: 10px; padding: 8px 2px; border-top: 1px solid #ffffff0d; font-size: 13px; }
.hf-se:first-child { border-top: 0; }
.hf-se small { flex: none; min-width: 60px; color: var(--muted); font-size: 12px; }
.hf-se span { flex: 1; min-width: 0; line-height: 1.5; }
.hf-se b { flex: none; color: var(--hf-ok); font-size: 13.5px; }
/* account */
.hf-pr { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.hf-av { flex: none; width: 56px; height: 56px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: var(--gold);
  border: 1.5px solid var(--hf-line2); background: color-mix(in srgb, var(--gold) 10%, transparent); }
.hf-pt { flex: 1; min-width: 140px; }
.hf-pt b { display: block; font-size: 16px; line-height: 1.5; }
.hf-pt small { display: block; font-size: 12.5px; color: var(--muted); line-height: 1.55; }
.hf-r2 { display: grid; grid-template-columns: 1fr 1fr; }
.hf-r2 .hf-tb { white-space: normal; text-align: center; }
.hf-r2 .hf-tb:disabled { opacity: .55; cursor: not-allowed; }

/* ================================================================ 2026-11-10: Dynamic Island capsule, qari name pill, centred panels, gold scrollbars */
#dock { transition: transform .55s cubic-bezier(.2,.8,.2,1), visibility .55s; }
#twPill { bottom: 12px; height: 52px; padding: 0 14px 0 8px; gap: 0; overflow: hidden; background: #0d1914; border: 1px solid #8a7440; color: #f3e8cc;
  -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: 0 10px 30px #0009, 0 2px 6px #0005, inset 0 1px 0 #ffffff10; transition: none; cursor: pointer; }
#twPill[hidden] { transform: translate(-50%, 0); }
#twPill.isl-out { pointer-events: none; }
body.light #twPill { background: #fbf5e4; border-color: #b39349; color: #24463a; box-shadow: 0 10px 28px #5a4a2033, 0 2px 6px #0000001f; }
.isl-in { display: flex; align-items: center; gap: 6px; height: 100%; white-space: nowrap; }
#twPill .dk-b { width: 40px; height: 40px; color: inherit; }
#twPill .dk-play { width: 44px; height: 44px; }
.isl-wave { display: none; align-items: flex-end; gap: 2px; height: 16px; margin: 0 4px; }
#twPill.playing .isl-wave { display: inline-flex; }
.isl-wave i { width: 3px; height: 100%; border-radius: 2px; background: #c9a54a; transform-origin: bottom; animation: isl-w 1s ease-in-out infinite; }
.isl-wave i:nth-child(2) { animation-delay: -.3s; } .isl-wave i:nth-child(3) { animation-delay: -.6s; } .isl-wave i:nth-child(4) { animation-delay: -.15s; }
@keyframes isl-w { 0%, 100% { transform: scaleY(.3); } 50% { transform: scaleY(1); } }
.isl-sep { width: 1px; height: 28px; margin: 0 6px; background: linear-gradient(transparent, #c9a54a99, transparent); }
.isl-lbl { background: none; border: 0; padding: 0 2px; color: inherit; cursor: pointer; min-width: 0; }
.isl-t { display: flex; flex-direction: column; align-items: center; line-height: 1.25; transition: opacity .16s ease; direction: rtl; }
html[dir=ltr] .isl-t { direction: ltr; }
.isl-t.fade { opacity: 0; }
.isl-l1 { font: 400 16px/1.35 'DigitalKhatt', 'Amiri', 'Noto Naskh Arabic', serif; color: #f3e8cc; }
.isl-l2 { font-size: 11px; color: #a99d7a; letter-spacing: .2px; }
body.light .isl-l1 { color: #24463a; } body.light .isl-l2 { color: #8a7440; }
@media (prefers-reduced-motion: reduce) { #dock { transition: none !important; } .isl-wave i { animation: none; } .isl-t { transition: none; } }

/* qari: full name in gold Naskh inside a thin gold pill (click = qari picker) */
#dock #dkAv.dk-qb { grid-area: av; max-width: 210px; height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid #8a7440; background: #14241c; color: #d9b968;
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
#dock #dkAv.dk-qb:hover { border-color: #c9a54a; color: #f0d68e; }
.dk-qb-n { font: 600 15px/1.4 'Noto Naskh Arabic', 'Amiri', serif; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; direction: rtl; }
body.light #dock #dkAv.dk-qb { background: #fbf5e4; border-color: #b39349; color: #8a6a1f; }
@media (max-width: 700px) { #dock #dkAv.dk-qb { max-width: 112px; height: 34px; padding: 0 9px; } .dk-qb-n { font-size: 13px; } }

/* centred modal cards: panels, settings, player, help, qari picker */
#pnOv { position: fixed; left: 0; right: 0; top: 0; bottom: var(--dk-h); z-index: 10; background: #0009; opacity: 0; pointer-events: none; transition: opacity .2s; }
body.panel:not(.simple):not(.tawajjo) #pnOv { opacity: 1; pointer-events: auto; }
@keyframes md-in { from { opacity: 0; transform: translate(-50%, -50%) scale(.96); } to { opacity: 1; transform: translate(-50%, -50%); } }
@media (min-width: 701px) {
  body.panel main { right: 0 !important; }
  aside#panel { position: fixed; left: 50% !important; right: auto !important; top: calc((100vh - var(--dk-h)) / 2) !important; bottom: auto !important;
    width: min(720px, calc(100vw - 32px)) !important; height: min(86vh, calc(100vh - var(--dk-h) - 24px)); transform: translate(-50%, -50%); z-index: 11;
    border: 1px solid color-mix(in srgb, var(--gold) 55%, transparent) !important; border-radius: 16px; box-shadow: 0 24px 70px #000a; animation: md-in .22s ease-out; }
  #stSheet, html[dir=ltr] #stSheet { top: 50%; bottom: auto; left: 50%; right: auto; width: min(720px, calc(100vw - 32px)); height: min(86vh, 820px);
    border: 1px solid color-mix(in srgb, var(--gold) 55%, transparent); border-radius: 16px; box-shadow: 0 24px 70px #000a; overflow: hidden;
    transform: translate(-50%, -50%) scale(.96); opacity: 0; transition: transform .22s ease, opacity .22s ease; }
  #stSheet.on { opacity: 1; transform: translate(-50%, -50%) !important; }
  #plSheet { top: 50%; bottom: auto; width: min(720px, calc(100vw - 32px)); max-height: 86vh; border: 1px solid color-mix(in srgb, var(--gold) 55%, transparent);
    border-radius: 16px; transform: translate(-50%, -50%) scale(.96); opacity: 0; transition: transform .22s ease, opacity .22s ease; box-shadow: 0 24px 70px #000a; }
  #plSheet.show { transform: translate(-50%, -50%); opacity: 1; }
  #help > div { width: min(720px, calc(100vw - 32px)); max-height: 86vh; border-radius: 16px !important; border-color: color-mix(in srgb, var(--gold) 55%, transparent) !important; }
}
@media (max-width: 700px) {
  #stSheet, html[dir=ltr] #stSheet { width: 100vw; border: 0; }
  #plSheet { top: 0; border-radius: 0; max-height: none; border: 0; }
  #help > div { width: 100vw; max-height: 100vh; height: 100vh; border-radius: 0 !important; }
}
@media (prefers-reduced-motion: reduce) { aside#panel { animation: none !important; } #stSheet, #plSheet { transition: none !important; } }
.gd-x { inset-inline-end: auto; inset-inline-start: 14px; }
#help h2 { padding-inline-start: 48px; }
.md-back svg { transform: scaleX(-1); } html[dir=ltr] .md-back svg { transform: none; }
.md-ov { position: fixed; inset: 0; z-index: 50; background: #0009; display: flex; align-items: center; justify-content: center; animation: md-fade .2s ease-out; }
@keyframes md-fade { from { opacity: 0; } }
.md-card { width: min(520px, calc(100vw - 32px)); max-height: 86vh; display: flex; flex-direction: column; background: linear-gradient(180deg, var(--bar2), var(--bar) 160px);
  color: var(--text); border: 1px solid color-mix(in srgb, var(--gold) 55%, transparent); border-radius: 16px; box-shadow: 0 24px 70px #000a; direction: rtl; overflow: hidden; }
html[dir=ltr] .md-card { direction: ltr; }
.qr-list { display: flex; flex-direction: column; gap: 6px; }
.qr-it { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 14px; border-radius: 12px; background: var(--hf-soft); border: 1px solid var(--hf-line); color: var(--text); text-align: start; }
.qr-it span { font: 500 17px/1.6 'Noto Naskh Arabic', 'Amiri', serif; }
.qr-it svg { color: var(--muted); flex: none; }
.qr-list .qr-it.on { border-color: var(--gold); color: var(--gold); background: color-mix(in srgb, var(--gold) 12%, transparent); } .qr-it.on svg { color: var(--gold); }
.qr-it:hover { background: var(--hf-soft2); }
@media (max-width: 700px) { .md-card { width: 100vw; height: 100vh; max-height: none; border-radius: 0; border: 0; } }

/* thin rounded gold scrollbars, app-wide */
* { scrollbar-width: thin; scrollbar-color: #c9a54a8c transparent; }
body.light * { scrollbar-color: #9c7a2a8c transparent; }
::-webkit-scrollbar { width: 7px; height: 7px; }
::-webkit-scrollbar-track, ::-webkit-scrollbar-corner { background: transparent; }
::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
::-webkit-scrollbar-thumb { background: #c9a54a59; border-radius: 99px; }
:hover::-webkit-scrollbar-thumb { background: #c9a54a8c; }
::-webkit-scrollbar-thumb:hover, ::-webkit-scrollbar-thumb:active { background: #c9a54a; }
body.light ::-webkit-scrollbar-thumb { background: #9c7a2a59; }
body.light :hover::-webkit-scrollbar-thumb { background: #9c7a2a8c; }
body.light ::-webkit-scrollbar-thumb:hover { background: #9c7a2a; }

/* 2026-11-10b: a closed settings sheet is really gone (it used to stay as an invisible centred card: a faint gold outline over the mushaf that also ate clicks) */
#stSheet[hidden] { display: none !important; }

/* ================================================================ 2026-11-10b: PRO PANELS (Apple / Google settings quality)
   8-pt grid · type scale: title 20 / section 13 muted / row 15 / secondary 13 · grouped inset lists with inset dividers ·
   leading icon tiles · hover / pressed / focus states · same header on every centred panel · polished light theme */
:root { --pro-r: 14px; --pro-tile: 36px; --pro-row: 56px; --pro-ease: cubic-bezier(.2, .8, .2, 1); --pro-div: #ffffff12; --pro-card: #ffffff0a; --pro-card2: #ffffff12; --pro-sh: 0 1px 0 #ffffff08 inset; }
/* --- header: back arrow · icon tile · title (20) + one-line subtitle (13) · optional action */
#hfHead, .st-top { min-height: 72px; padding: 12px 16px !important; gap: 12px !important; border-bottom: 1px solid var(--pro-div) !important; }
#hfHead h3, .st-top h2 { font-size: 20px !important; line-height: 1.45 !important; font-weight: 600; color: var(--text) !important; letter-spacing: -.1px; }
#hfHead p { font-size: 13px !important; line-height: 1.5 !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#hfHead .hf-hico { width: 40px; height: 40px; border-radius: 12px; background: color-mix(in srgb, var(--gold) 16%, transparent) !important; border: 0 !important; }
.hf-back, .st-back, .md-back, .st-x { width: 40px !important; height: 40px !important; border-radius: 50% !important; transition: background .15s, transform .1s; }
.hf-back:active, .st-back:active, .md-back:active, .st-x:active { transform: scale(.94); }
aside#panel > .tab, .st-body { padding: 16px !important; scroll-behavior: smooth; }
/* --- section headers above grouped lists */
.st-sh, .hf-sh { display: flex; align-items: center; gap: 8px; margin: 24px 4px 8px !important; font-size: 13px !important; font-weight: 600; color: var(--muted) !important;
  letter-spacing: .4px; text-transform: uppercase; line-height: 1.4; }
.st-sh:first-child, .st-mdg + .st-sh { margin-top: 8px !important; }
.hf-sh svg { color: var(--muted); }
/* --- grouped inset lists: settings rows, account rows */
.st-group, .hf-list { background: var(--pro-card) !important; border: 1px solid var(--pro-div) !important; border-radius: var(--pro-r) !important; box-shadow: var(--pro-sh); margin-bottom: 8px !important; overflow: hidden; }
.st-row, .hf-list > button { position: relative; min-height: var(--pro-row); padding: 10px 16px !important; gap: 12px !important; border: 0 !important;
  transition: background .15s var(--pro-ease); }
.st-row:not(:last-child)::after, .hf-list > button:not(:last-child)::after { content: ""; position: absolute; bottom: 0; inset-inline-end: 0; inset-inline-start: calc(16px + var(--pro-tile) + 12px); height: 1px; background: var(--pro-div); }
.st-row:hover, .hf-list > button:hover { background: var(--pro-card2) !important; }
.st-row:active, .hf-list > button:active { background: color-mix(in srgb, var(--gold) 12%, transparent) !important; }
.st-row:focus-visible, .hf-list > button:focus-visible, .hf-ix:focus-visible, .hf-cont:focus-visible, .hf-qa button:focus-visible { outline: none; box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--gold) 70%, transparent) !important; }
.st-ic, .hf-li { width: var(--pro-tile) !important; height: var(--pro-tile) !important; border-radius: 10px !important; border: 0 !important;
  background: color-mix(in srgb, var(--gold) 15%, transparent) !important; color: var(--gold) !important; }
.st-ic svg, .hf-li svg { width: 20px; height: 20px; }
.st-rt b, .hf-lt b { font-size: 15px !important; font-weight: 600; line-height: 1.45 !important; color: var(--text); }
.st-rt small, .hf-lt small { font-size: 13px !important; line-height: 1.45 !important; color: var(--muted) !important; }
.st-chev, .hf-list > button > svg:last-child { color: var(--muted) !important; opacity: .7; }
.st-danger .st-ic { background: #d9534f22 !important; color: #e0716d !important; } .st-danger .st-rt b { color: #e0716d; }
.st-foot { text-align: center; font-size: 12px; color: var(--muted); margin: 24px 0 8px; }
/* --- cards */
.hf-card { border-radius: 16px !important; padding: 16px !important; margin: 0 0 16px !important; background: var(--pro-card) !important; border: 1px solid var(--pro-div) !important; box-shadow: var(--pro-sh); }
.hf-card h4 { font-size: 15px; font-weight: 600; margin: 0 0 4px; }
.hf-desc { font-size: 13px !important; color: var(--muted); }
/* continue reading */
.hf-cont { display: flex !important; align-items: center; gap: 16px; width: 100%; text-align: start; cursor: pointer; color: var(--text);
  background: linear-gradient(135deg, color-mix(in srgb, var(--gold) 20%, transparent), color-mix(in srgb, var(--accent) 22%, transparent)) !important;
  border-color: color-mix(in srgb, var(--gold) 40%, transparent) !important; transition: transform .12s var(--pro-ease), border-color .15s; }
.hf-cont:hover { border-color: var(--gold) !important; } .hf-cont:active { transform: scale(.99); }
.hf-cont-ic { flex: none; width: 52px; height: 52px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; background: var(--gold); color: #1a1406; }
.hf-cont-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.hf-cont-t small { font-size: 13px; color: var(--muted); line-height: 1.4; }
.hf-cont-t b { font: 400 22px/1.5 'DigitalKhatt', 'Amiri', 'Noto Naskh Arabic', serif; color: var(--text); }
.hf-cont-go { flex: none; display: inline-flex; align-items: center; gap: 4px; padding: 8px 12px 8px 16px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 13px; font-weight: 600; }
.hf-cont-go svg { transform: scaleX(-1); } html[dir=ltr] .hf-cont-go svg { transform: none; }
/* today: progress ring + tasks */
.hf-today .hf-th { padding-bottom: 12px; gap: 16px !important; }
.hf-today h4 { font-size: 17px !important; }
.hf-task { padding: 12px 0 !important; gap: 12px !important; border-top: 1px solid var(--pro-div) !important; }
.hf-tt b { font-size: 15px !important; } .hf-tt small { font-size: 13px !important; color: var(--muted); }
.hf-task.done .hf-tt b { color: var(--muted); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--muted) 60%, transparent); }
.hf-rfg { transition: stroke-dasharray .6s var(--pro-ease); }
.hf-tb { min-height: 36px; padding: 6px 16px !important; border-radius: 999px !important; font-size: 13px !important; font-weight: 600; transition: background .15s, transform .1s; }
.hf-tb:active { transform: scale(.96); }
/* quick actions grid: icon tile + title + description */
.hf-qa { gap: 8px !important; margin-bottom: 16px !important; }
.hf-qa button { min-height: 112px !important; padding: 16px !important; gap: 4px !important; border-radius: 14px !important; background: var(--pro-card) !important; border: 1px solid var(--pro-div) !important;
  transition: background .15s, border-color .15s, transform .12s var(--pro-ease); }
.hf-qa button:hover { border-color: color-mix(in srgb, var(--gold) 55%, transparent) !important; background: var(--pro-card2) !important; }
.hf-qa button:active { transform: scale(.98); }
.hf-qa button svg { width: 36px; height: 36px; padding: 8px; border-radius: 10px; background: color-mix(in srgb, var(--gold) 15%, transparent); margin-bottom: 8px !important; box-sizing: border-box; }
.hf-qa b { font-size: 15px !important; font-weight: 600; } .hf-qa small { font-size: 13px !important; }
/* stat cards */
.hf-stats, #tab-prog .stats { gap: 8px !important; }
.hf-stats div, #tab-prog .stats > div { padding: 16px 8px !important; border-radius: 14px !important; background: var(--pro-card2) !important; border: 1px solid var(--pro-div); }
.hf-stats b, #tab-prog .stats b { font-size: 26px !important; font-weight: 700; line-height: 1.2 !important; font-variant-numeric: tabular-nums; color: var(--gold); }
.hf-stats small, #tab-prog .stats span { font-size: 13px !important; color: var(--muted) !important; margin-top: 4px; display: block; }
.hf-week i { border-radius: 6px 6px 3px 3px !important; transition: height .4s var(--pro-ease); }
/* index: search, segmented control, surah rows */
.hf-ixs { height: 44px !important; border-radius: 12px !important; border: 1px solid var(--pro-div) !important; background: var(--pro-card2) !important; }
.hf-ixs:focus-within { border-color: var(--gold) !important; box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 22%, transparent); }
.hf-ixs input { font-size: 15px !important; }
.hf-seg { border-radius: 12px !important; padding: 4px !important; }
.hf-seg button { min-height: 36px !important; font-size: 14px !important; transition: background .2s var(--pro-ease), color .2s; }
.hf-ix { min-height: 64px; padding: 8px 12px !important; gap: 12px !important; border: 1px solid transparent !important; transition: background .15s; }
.hf-ix:hover { background: var(--pro-card2) !important; }
.hf-ix.now { background: color-mix(in srgb, var(--gold) 12%, transparent) !important; border-color: color-mix(in srgb, var(--gold) 40%, transparent) !important; }
.hf-ix + .hf-ix { box-shadow: 0 -1px 0 var(--pro-div); }
.hf-ixn { width: 40px !important; height: 40px !important; border-radius: 50% !important; border: 1.5px solid color-mix(in srgb, var(--gold) 70%, transparent) !important;
  background: color-mix(in srgb, var(--gold) 8%, transparent) !important; font-size: 14px !important; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--gold); }
.hf-ix .hf-ixt { flex: 1; min-width: 0; }
.hf-ix .hf-ixt b { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.hf-ix .hf-ixt .hf-ar { font: 400 20px/1.5 'DigitalKhatt', 'Amiri', 'Noto Naskh Arabic', serif; }
.hf-tl { font: 500 13px/1.4 'Segoe UI', system-ui, sans-serif; color: var(--muted); }
.hf-ix .hf-ixt small { font-size: 13px !important; color: var(--muted); }
.hf-rev { flex: none; font-size: 12px; font-weight: 600; padding: 2px 10px; border-radius: 999px; line-height: 1.6; }
.hf-rev.mk { color: #d9b968; background: #d9b9681f; } .hf-rev.md { color: #6fcf97; background: #6fcf971f; }
.hf-empty { text-align: center; padding: 32px 16px; color: var(--muted); font-size: 14px; }
/* para grid (ترقی) */
#paraGrid { gap: 8px !important; }
#paraGrid > * { border-radius: 10px !important; min-height: 40px; font-variant-numeric: tabular-nums; transition: transform .1s, background .15s; }
#paraGrid > *:active { transform: scale(.95); }
/* live: informative coming-soon hero */
.st-hero { padding: 32px 24px !important; border-radius: 16px !important; text-align: center; background: radial-gradient(120% 90% at 50% 0%, color-mix(in srgb, var(--gold) 18%, transparent), transparent 70%), var(--pro-card) !important; }
.st-hero h3 { font-size: 20px !important; margin: 8px 0 4px !important; color: var(--text) !important; }
.st-hero p { font-size: 14px !important; color: var(--muted) !important; max-width: 46ch; margin: 0 auto 16px !important; line-height: 1.8; }
.st-pill { display: inline-flex; align-items: center; padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 600; background: color-mix(in srgb, var(--gold) 18%, transparent); color: var(--gold); }
/* account: profile header */
.hf-prof .hf-av { width: 64px !important; height: 64px !important; border-radius: 50% !important; background: linear-gradient(135deg, var(--gold), color-mix(in srgb, var(--gold) 40%, var(--accent))) !important; color: #1a1406 !important; border: 0 !important; }
.hf-prof .hf-pt b { font-size: 20px !important; } .hf-prof .hf-pt small { font-size: 13px !important; color: var(--muted); }
.hf-prof .hf-pr { gap: 16px !important; margin-bottom: 16px; }
/* form controls inside panels */
aside#panel select, #stSheet select, aside#panel input[type=number], #stSheet input[type=number] { min-height: 40px; border-radius: 10px !important; border: 1px solid var(--pro-div) !important; background-color: var(--pro-card2) !important; color: var(--text); font-size: 14px; transition: border-color .15s; }
aside#panel select:focus-visible, #stSheet select:focus-visible, aside#panel input:focus-visible, #stSheet input:focus-visible { outline: none; border-color: var(--gold) !important; box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 22%, transparent); }
aside#panel input[type=range], #stSheet input[type=range] { accent-color: var(--gold); }
aside#panel input[type=checkbox], #stSheet input[type=checkbox] { accent-color: var(--accent); }
/* motion */
aside#panel > .tab.on, .st-body > * { animation: pro-in .24s var(--pro-ease) both; }
@keyframes pro-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { aside#panel > .tab.on, .st-body > * { animation: none; } .hf-cont, .hf-qa button, .hf-ix { transition: none; } }
@media (max-width: 700px) { .hf-cont-go { display: none; } .hf-qa button { min-height: 100px !important; } }
/* capsule: dark glyph on the gold play disc (contrast) */
#twPill .dk-play { color: #1a1406 !important; }

/* --- light theme: real light surfaces (ivory sheet, white grouped cards, dark text) */
body.light aside#panel, body.light #stSheet, body.light .md-card, body.light #plSheet {
  --text: #1d2a24; --muted: #66706a; --gold: #94711f; --pro-div: #1d2a2417; --pro-card: #ffffff; --pro-card2: #f3efe4; --pro-sh: 0 1px 2px #1d2a240d;
  --hf-line: #1d2a241a; --hf-line2: #1d2a2426; --hf-soft: #ffffff; --hf-soft2: #f3efe4;
  background: #f6f3ea !important; color: var(--text); }
body.light aside#panel { border-color: #d9cfb3 !important; box-shadow: 0 24px 70px #2a20084d !important; }
body.light #hfHead, body.light .st-top { background: #fbf9f3 !important; }
body.light .hf-seg { background: #1d2a240f !important; }
body.light .hf-seg button.on { color: #fff; }
body.light .hf-rev.mk { color: #8a6514; background: #c9a54a26; } body.light .hf-rev.md { color: #1f7a4a; background: #3fa36b22; }
body.light .hf-tb:not(.primary) { background: #f3efe4 !important; color: var(--text) !important; border-color: #1d2a241f !important; }
body.light .hf-task, body.light .hf-tt b, body.light .st-row, body.light .hf-list > button, body.light .hf-qa button, body.light .hf-ix { color: var(--text) !important; }
body.light .md-box, body.light .md-switch { background: #1d2a240a !important; color: var(--text); }
body.light .md-switch button { color: var(--muted) !important; } body.light .md-switch button.on { color: #fff !important; }
body.light .hf-ixn { color: #8a6514; }
/* pro panels: fine-tuning (Nastaliq needs taller lines; the surah list is one grouped card with inset dividers) */
#hfHead h3 { line-height: 1.7 !important; } #hfHead p { line-height: 2 !important; margin-top: -2px !important; }
.hf-ixl { background: var(--pro-card); border: 1px solid var(--pro-div); border-radius: var(--pro-r); overflow: hidden; margin-top: 8px; }
.hf-ixl .hf-ix { border-radius: 0 !important; border: 0 !important; position: relative; box-shadow: none !important; }
.hf-ixl .hf-ix:not(:last-child)::after { content: ""; position: absolute; bottom: 0; inset-inline-end: 0; inset-inline-start: 64px; height: 1px; background: var(--pro-div); }
.hf-ixl .hf-ix.now { box-shadow: inset 3px 0 0 var(--gold) !important; } html[dir=rtl] .hf-ixl .hf-ix.now { box-shadow: inset -3px 0 0 var(--gold) !important; }
.hf-ixl .hf-empty { margin: 0; }
body.light .hf-rbg { stroke: #1d2a2414 !important; }
.hf-ixbar { top: -16px !important; margin: 0 -16px 8px !important; padding: 8px 16px 12px !important; }
.hf-chart { margin-top: 8px !important; }
.hf-ch-h { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.hf-ch-h b { font-size: 15px; font-weight: 600; } .hf-ch-h span { font-size: 22px; font-weight: 700; color: var(--gold); font-variant-numeric: tabular-nums; }
.hf-w14 { height: 104px; align-items: flex-end; }
.hf-w14 .hf-wd small { font-size: 11px; }
.hf-w14 { display: grid !important; grid-template-columns: repeat(14, minmax(0, 1fr)) !important; gap: 6px !important; align-items: end; height: auto !important; min-height: 104px; }
.hf-w14 .hf-wd { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; min-width: 0; }
.hf-w14 .hf-wd i { width: 100%; max-width: 22px; }
