/* Utlu v3: built on patterns iPhone users already know (Jakob's law).
   iOS system colours and type, large titles, inset grouped lists, a Spotify-style mini player and
   Now Playing screen, Instagram-style stories, and an Apple Fitness-style daily ring. */
@font-face { font-family: 'Uthmanic Hafs'; src: url('https://static.qurancdn.com/fonts/quran/hafs/uthmanic_hafs/UthmanicHafs1Ver18.woff2') format('woff2'); font-display: swap; }
:root {
  --bg: #f2f2f7; --panel: #ffffff; --fill: rgba(118,118,128,.12); --sunk: #e9e9ee; --line: rgba(60,60,67,.14);
  --ink: #000000; --ink-2: #3c3c43; --muted: #8a8a8e;
  --tint: #0f8f68; --tint-soft: rgba(15,143,104,.12); --on-tint: #ffffff;
  --live: #0f8f68; --live-soft: rgba(15,143,104,.12); --warn: #c27b12; --bad: #e5484d; --flame: #ff9500;
  --ui: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Inter', system-ui, 'Segoe UI', sans-serif;
  --mushaf: 'Uthmanic Hafs', 'Amiri Quran', 'Scheherazade New', serif;
  --ar-ui: 'IBM Plex Sans Arabic', -apple-system, sans-serif;
  --r: 14px; --ar-size: 30px;
  --top: env(safe-area-inset-top, 0px); --bot: env(safe-area-inset-bottom, 0px);
  --tabh: calc(50px + var(--bot));
  --tj-grey: #9a9a94; --tj-madd2: #2f6fdc; --tj-maddj: #4b44d6; --tj-maddw: #1d3fae; --tj-maddl: #0b1a8f;
  --tj-qalqalah: #c8102e; --tj-ikhfa: #8e1fa3; --tj-ikhfas: #b0168d; --tj-iqlab: #0a87c0; --tj-idghg: #0f8a62;
  --tj-idghn: #3a8a0a; --tj-idghs: #4f9a10; --tj-ghunnah: #d06008;
  --m-bayati: #2f6fdc; --m-saba: #6b4fd8; --m-hijaz: #c2410c; --m-rast: #0e9f6e; --m-nahawand: #b0168d; --m-sikah: #0a87c0; --m-ajam: #c27b12; --m-kurd: #64748b;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #000000; --panel: #1c1c1e; --fill: rgba(118,118,128,.24); --sunk: #2c2c2e; --line: rgba(84,84,88,.6);
  --ink: #ffffff; --ink-2: #d1d1d6; --muted: #8e8e93; --tint: #30d39a; --tint-soft: rgba(48,211,154,.14); --on-tint: #002a1c;
  --live: #30d39a; --live-soft: rgba(48,211,154,.14);
  --tj-grey: #6f6f6a; --tj-madd2: #6ea0ff; --tj-maddj: #9a94ff; --tj-maddw: #5b8cff; --tj-maddl: #b39bff; --tj-qalqalah: #ff6b7a;
  --tj-ikhfa: #d58bff; --tj-ikhfas: #ff86d6; --tj-iqlab: #4fd0ff; --tj-idghg: #34d399; --tj-idghn: #a3e36a; --tj-idghs: #86d146; --tj-ghunnah: #ffa14d;
  color-scheme: dark; } }
:root[data-theme="dark"] {
  --bg: #000000; --panel: #1c1c1e; --fill: rgba(118,118,128,.24); --sunk: #2c2c2e; --line: rgba(84,84,88,.6);
  --ink: #ffffff; --ink-2: #d1d1d6; --muted: #8e8e93; --tint: #30d39a; --tint-soft: rgba(48,211,154,.14); --on-tint: #002a1c;
  --live: #30d39a; --live-soft: rgba(48,211,154,.14);
  --tj-grey: #6f6f6a; --tj-madd2: #6ea0ff; --tj-maddj: #9a94ff; --tj-maddw: #5b8cff; --tj-maddl: #b39bff; --tj-qalqalah: #ff6b7a;
  --tj-ikhfa: #d58bff; --tj-ikhfas: #ff86d6; --tj-iqlab: #4fd0ff; --tj-idghg: #34d399; --tj-idghn: #a3e36a; --tj-idghs: #86d146; --tj-ghunnah: #ffa14d;
  color-scheme: dark; }
:root[data-theme="sepia"] { --bg: #f4ecd8; --panel: #fbf5e6; --sunk: #ebe1c8; --fill: rgba(120,90,40,.12); --line: rgba(120,90,40,.18); --ink: #3b2f1e; --ink-2: #5b4a33; --muted: #8f7d60; }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.4 var(--ui); -webkit-font-smoothing: antialiased; letter-spacing: -.01em; -webkit-text-size-adjust: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; touch-action: manipulation; -webkit-user-select: none; user-select: none; }
input, select, textarea { font: inherit; color: inherit; font-size: 17px; } /* 16px+ stops iOS zooming into fields */
a { color: var(--tint); }
svg.i { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
svg.i.fill { fill: currentColor; stroke: none; }
[hidden] { display: none !important; }
.ar-text, .ar, .big-ar, .bism, .var, [dir="rtl"], .ara { letter-spacing: 0 !important; }
:focus-visible { outline: 2px solid var(--tint); outline-offset: 2px; border-radius: 8px; }
button:active { opacity: .55; transition: opacity 0s; }
button { transition: opacity .2s; }

/* ---------- Shell & navigation bar ---------- */
.shell { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100%; }
.side { position: sticky; top: 0; height: 100vh; border-right: 1px solid var(--line); padding: 22px 14px; display: flex; flex-direction: column; gap: 2px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; padding: 4px 10px 18px; }
.logo b { font-family: var(--ar-ui); font-weight: 600; color: var(--muted); font-size: 15px; margin-left: auto; }
.nav-btn { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 10px; color: var(--ink-2); font-weight: 500; font-size: 15px; width: 100%; text-align: left; }
.nav-btn.on { background: var(--panel); color: var(--tint); font-weight: 600; }
.side .foot { margin-top: auto; font-size: 12px; color: var(--muted); padding: 10px; line-height: 1.5; }
.main { min-width: 0; padding-bottom: 120px; }
.nav { position: sticky; top: 0; z-index: 20; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; height: calc(44px + var(--top)); padding: var(--top) max(8px, env(safe-area-inset-right, 0px)) 0 max(8px, env(safe-area-inset-left, 0px)); background: transparent; transition: background .2s, box-shadow .2s; }
.nav.scrolled, .nav.inline { background: color-mix(in srgb, var(--bg) 82%, transparent); -webkit-backdrop-filter: saturate(1.8) blur(20px); backdrop-filter: saturate(1.8) blur(20px); box-shadow: 0 .5px 0 var(--line); }
.nav-t { margin: 0; font-size: 17px; font-weight: 600; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 56vw; opacity: 0; transition: opacity .18s; }
.nav.scrolled .nav-t, .nav.inline .nav-t { opacity: 1; }
.nav-l { display: flex; justify-content: flex-start; min-width: 0; }
.nav-r { display: flex; justify-content: flex-end; gap: 2px; }
.back { display: flex; align-items: center; gap: 2px; color: var(--tint); font-size: 17px; height: 44px; padding-right: 8px; min-width: 0; max-width: 34vw; }
.back svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.back span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.navbtn { height: 44px; min-width: 44px; display: grid; place-items: center; color: var(--tint); font-size: 17px; font-weight: 600; border-radius: 10px; }
.page { max-width: 760px; margin: 0 auto; padding: 0 max(16px, env(safe-area-inset-right, 0px)) 40px max(16px, env(safe-area-inset-left, 0px)); }
.page.push { animation: push .32s cubic-bezier(.2,.8,.2,1); }
.page.pop { animation: pop .28s cubic-bezier(.2,.8,.2,1); }
.page.fade { animation: fadein .18s ease-out; }
@keyframes push { from { transform: translateX(28%); opacity: 0; } }
@keyframes pop { from { transform: translateX(-18%); opacity: 0; } }
@keyframes fadein { from { opacity: 0; } }
.tabs { display: none; }
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side { display: none; }
  .tabs { display: flex; position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; height: var(--tabh); padding: 0 max(4px, env(safe-area-inset-right, 0px)) var(--bot) max(4px, env(safe-area-inset-left, 0px)); background: color-mix(in srgb, var(--bg) 82%, transparent); -webkit-backdrop-filter: saturate(1.8) blur(20px); backdrop-filter: saturate(1.8) blur(20px); box-shadow: 0 -.5px 0 var(--line); }
  .tabs button { flex: 1; display: grid; justify-items: center; align-content: center; gap: 2px; font-size: 10.5px; font-weight: 500; color: var(--muted); }
  .tabs button svg { width: 25px; height: 25px; }
  .tabs button.on { color: var(--tint); }
  .tabs button:active { opacity: 1; transform: scale(.9); transition: transform .1s; }
  .main { padding-bottom: calc(var(--tabh) + 90px); }
}

/* ---------- Type ---------- */
.ltitle { display: flex; align-items: flex-end; gap: 10px; margin: 2px 0 14px; }
.ltitle h2 { font-size: 34px; line-height: 1.1; font-weight: 700; letter-spacing: -.025em; margin: 0; flex: 1; min-width: 0; }
.ltitle .sub { display: block; font-size: 15px; font-weight: 400; color: var(--muted); letter-spacing: -.01em; margin-top: 2px; }
.eyebrow { font-size: 13px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .02em; }
h2.h { font-size: 28px; line-height: 1.15; letter-spacing: -.025em; font-weight: 700; margin: 18px 0 4px; text-wrap: balance; }
h3.sh { font-size: 22px; font-weight: 700; letter-spacing: -.02em; margin: 30px 0 12px; display: flex; align-items: baseline; gap: 8px; }
h3.sh small { font-weight: 400; color: var(--muted); font-size: 14px; letter-spacing: 0; }
h3.sh .more { margin-left: auto; font-size: 17px; color: var(--tint); font-weight: 400; letter-spacing: -.01em; }
.gh { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .02em; margin: 26px 16px 7px; }
.gf { font-size: 13px; color: var(--muted); margin: 7px 16px 0; line-height: 1.4; }
.lead { color: var(--muted); margin: 0 0 18px; font-size: 15px; line-height: 1.45; }
.muted { color: var(--muted); }

/* ---------- Primitives ---------- */
.panel { background: var(--panel); border-radius: var(--r); }
.pad { padding: 16px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 44px; padding: 0 20px; border-radius: 999px; font-weight: 600; font-size: 16px; background: var(--tint); color: var(--on-tint); white-space: nowrap; }
.btn svg.i { width: 18px; height: 18px; }
.btn.ghost { background: var(--fill); color: var(--tint); }
.btn.sm { height: 34px; padding: 0 14px; font-size: 15px; }
.btn.block { display: flex; width: 100%; }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn.live { background: var(--bad); color: #fff; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sep { height: .5px; background: var(--line); margin: 14px 0; }
.seg { display: flex; background: var(--fill); padding: 2px; border-radius: 9px; gap: 0; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button { flex: 1; padding: 6px 12px; border-radius: 7px; font-size: 14px; font-weight: 500; color: var(--ink); white-space: nowrap; }
.seg button.on { background: var(--panel); font-weight: 600; box-shadow: 0 3px 8px rgba(0,0,0,.12), 0 0 0 .5px rgba(0,0,0,.04); }
:root[data-theme="dark"] .seg button.on { background: #636366; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .seg button.on { background: #636366; } }
.seg button:active { opacity: .7; }
.field { display: grid; gap: 6px; }
.field label { font-size: 13px; color: var(--muted); font-weight: 500; }
.input, .select { height: 44px; padding: 0 12px; border-radius: 10px; border: 0; background: var(--fill); outline: none; width: 100%; -webkit-appearance: none; appearance: none; }
.select { background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 19px, calc(100% - 13px) 19px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 32px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.search { position: relative; margin-bottom: 12px; }
.search svg { position: absolute; left: 9px; top: 50%; transform: translateY(-50%); color: var(--muted); width: 18px; height: 18px; }
.search .input { padding-left: 34px; height: 38px; border-radius: 11px; }
.pill { display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 11px; border-radius: 999px; background: var(--fill); font-size: 14px; font-weight: 500; color: var(--ink); white-space: nowrap; }
.pill svg.i { width: 15px; height: 15px; }
.pill.live { background: var(--tint-soft); color: var(--tint); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; display: inline-block; }
.dot.pulse { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .3; } }
.skel { height: 52px; border-radius: 12px; background: linear-gradient(90deg, var(--sunk), var(--panel), var(--sunk)); background-size: 200% 100%; animation: sk 1.3s infinite; margin-bottom: 8px; }
@keyframes sk { to { background-position: -200% 0; } }
.empty { padding: 28px 12px; text-align: center; color: var(--muted); font-size: 15px; }
.switch { position: relative; width: 51px; height: 31px; border-radius: 999px; background: var(--fill); flex: none; transition: background .2s; }
.switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 3px 8px rgba(0,0,0,.15), 0 1px 1px rgba(0,0,0,.16); transition: transform .22s cubic-bezier(.3,.7,.4,1.3); }
.switch.on { background: #34c759; }
.switch.on::after { transform: translateX(20px); }
.switch:active { opacity: 1; }

/* ---------- Inset grouped lists (Settings / Music pattern) ---------- */
.group { background: var(--panel); border-radius: 12px; overflow: hidden; }
.list { display: grid; grid-template-columns: minmax(0, 1fr); }
.li, .cell { display: flex; align-items: center; gap: 12px; padding: 11px 16px; min-height: 52px; text-align: left; width: 100%; position: relative; }
.li + .li::before, .cell + .cell::before { content: ''; position: absolute; top: 0; right: 0; left: 62px; height: .5px; background: var(--line); }
.cell.flat + .cell::before { left: 16px; }
.li:active, .cell:active { background: var(--sunk); opacity: 1; }
.li .n { width: 34px; height: 34px; border-radius: 9px; background: var(--fill); display: grid; place-items: center; font-variant-numeric: tabular-nums; font-size: 14px; font-weight: 600; color: var(--ink-2); flex: none; }
.li .meta, .cell .meta { flex: 1; min-width: 0; }
.li .meta b, .cell .meta b { display: block; font-weight: 400; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.li .meta span, .cell .meta span { display: block; font-size: 14px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.li .ar { font-family: var(--ar-ui); font-size: 18px; color: var(--ink-2); flex: none; }
.li .chev, .cell .chev { color: var(--muted); opacity: .6; width: 18px; height: 18px; }
.cell .val { color: var(--muted); font-size: 17px; white-space: nowrap; max-width: 46%; overflow: hidden; text-overflow: ellipsis; }
.li.playing .meta b { color: var(--tint); font-weight: 600; }
.ico { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; color: #fff; flex: none; }
.ico svg.i { width: 18px; height: 18px; }
.vres .meta b { white-space: normal; font-size: 15px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.vres .meta b em { font-style: normal; color: var(--tint); font-weight: 600; }
.vres .vk { font-size: 13px; font-weight: 600; color: var(--tint); }
.vres .var { font-family: var(--mushaf); font-size: 19px; direction: rtl; text-align: right; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }

/* ---------- Artwork ---------- */
.art { display: grid; place-items: center; color: #fff; border-radius: 10px; position: relative; overflow: hidden; flex: none; font-weight: 700; letter-spacing: -.02em; text-align: center; }
.art::after { content: ''; position: absolute; inset: 0; background: radial-gradient(120% 90% at 20% 0%, rgba(255,255,255,.25), transparent 60%); pointer-events: none; }
.art .ara { font-family: var(--ar-ui); font-weight: 600; letter-spacing: 0; padding: 0 3px; }
.art.sm .ara { font-size: 11px; line-height: 1.1; }
.art.sm { width: 42px; height: 42px; border-radius: 7px; font-size: 14px; }
.avatar { width: 150px; height: 150px; border-radius: 10px; display: grid; place-items: center; font-weight: 700; font-size: 30px; letter-spacing: -.03em; color: #fff; position: relative; overflow: hidden; }
.avatar::after { content: ''; position: absolute; inset: 0; background: radial-gradient(120% 90% at 20% 0%, rgba(255,255,255,.22), transparent 60%); }
.avatar.sm { width: 42px; height: 42px; border-radius: 50%; font-size: 15px; }
.avatar.round { border-radius: 50%; }

/* ---------- Rails ---------- */
.rail { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 0 16px 6px; margin: 0 -16px; scroll-padding: 16px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.rail::-webkit-scrollbar { display: none; }
.rcard { flex: none; width: 150px; text-align: left; scroll-snap-align: start; }
.rcard b { display: block; font-weight: 500; font-size: 15px; margin-top: 8px; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rcard span { font-size: 14px; color: var(--muted); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rcard:active, .vcard:active, .qtile:active, .story-c:active { opacity: 1; transform: scale(.96); transition: transform .12s; }
.rcard, .vcard, .qtile, .story-c { transition: transform .25s cubic-bezier(.2,.8,.2,1); }
.vcard { flex: none; width: 270px; text-align: left; scroll-snap-align: start; }
.vthumb { position: relative; aspect-ratio: 16/9; border-radius: 10px; overflow: hidden; background: var(--sunk); }
.vthumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vthumb .len { position: absolute; right: 6px; bottom: 6px; background: rgba(0,0,0,.72); color: #fff; font-size: 12px; font-weight: 600; padding: 2px 6px; border-radius: 5px; font-variant-numeric: tabular-nums; }
.vcard b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-weight: 500; font-size: 15px; margin-top: 7px; line-height: 1.3; }
.vcard span { font-size: 13px; color: var(--muted); }

/* ---------- Home ---------- */
.streak { display: inline-flex; align-items: center; gap: 4px; height: 32px; padding: 0 12px; border-radius: 999px; background: var(--panel); font-weight: 700; font-size: 16px; font-variant-numeric: tabular-nums; flex: none; }
.streak svg { width: 18px; height: 18px; color: var(--flame); fill: currentColor; stroke: none; }
.streak.off svg { color: var(--muted); }
.stories { display: flex; gap: 14px; overflow-x: auto; padding: 4px 16px 6px; margin: 0 -16px 16px; scrollbar-width: none; }
.stories::-webkit-scrollbar { display: none; }
.story-c { flex: none; width: 72px; display: grid; justify-items: center; gap: 5px; font-size: 12px; color: var(--ink); }
.story-ring { width: 70px; height: 70px; border-radius: 50%; padding: 3px; background: conic-gradient(from 210deg, #f9ce34, #ee2a7b, #6228d7, #f9ce34); }
.story-c.seen .story-ring { background: var(--line); }
.story-ring .in { width: 100%; height: 100%; border-radius: 50%; border: 3px solid var(--bg); display: grid; place-items: center; color: #fff; font-family: var(--ar-ui); font-weight: 600; font-size: 21px; }
.goal { display: flex; align-items: center; gap: 16px; padding: 16px; }
.ringv { width: 76px; height: 76px; flex: none; position: relative; }
.ringv svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ringv b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; }
.goal .gmeta { flex: 1; min-width: 0; }
.goal .gmeta b { display: block; font-size: 17px; font-weight: 600; }
.goal .gmeta span { font-size: 14px; color: var(--muted); }
.goal .btn { margin-top: 10px; }
.daycard { padding: 20px 18px 16px; text-align: center; width: 100%; }
.daycard .ar { font-family: var(--mushaf); font-size: 26px; line-height: 2; direction: rtl; margin: 6px 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.daycard .tr { font-size: 15px; line-height: 1.5; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.daycard .ref { font-size: 13px; color: var(--muted); margin-top: 8px; }
.quick { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 620px) { .quick { grid-template-columns: repeat(3, 1fr); } }
.qtile { text-align: left; padding: 14px; border-radius: var(--r); background: var(--panel); display: grid; gap: 8px; align-content: start; }
.qtile b { font-weight: 600; font-size: 16px; }
.qtile span { font-size: 13px; color: var(--muted); line-height: 1.35; }

/* ---------- Reader ---------- */
.rhead { text-align: center; padding: 6px 0 4px; }
.rhead .ar { font-family: var(--ar-ui); font-size: 36px; font-weight: 600; line-height: 1.4; }
.rhead .meta { color: var(--muted); font-size: 15px; }
.rtools { display: flex; gap: 10px; justify-content: center; align-items: center; margin: 14px 0 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 999px; background: var(--fill); font-size: 14px; font-weight: 500; max-width: 60vw; }
.chip span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chip svg.i { width: 16px; height: 16px; color: var(--muted); }
.bism { text-align: center; font-family: var(--mushaf); font-size: 28px; margin: 18px 0 6px; }
.ayah { padding: 18px 4px 16px; border-bottom: .5px solid var(--line); scroll-margin-top: calc(70px + var(--top)); border-radius: 12px; cursor: pointer; transition: background .25s; }
.ayah:active { background: var(--sunk); }
.ayah.playing { background: var(--tint-soft); }
.ayah-k { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.akey { font-size: 13px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.ayah-k .bmk { width: 14px; height: 14px; color: var(--tint); fill: currentColor; stroke: none; }
.ar-text { font-family: var(--mushaf); direction: rtl; text-align: right; font-size: var(--ar-size); line-height: 2.05; }
.ar-text .end { font-size: .85em; color: var(--muted); }
.tr-text { color: var(--ink-2); margin-top: 6px; font-size: 16px; line-height: 1.55; }
.tj tajweed.ham_wasl, .tj tajweed.slnt, .tj tajweed.laam_shamsiyah { color: var(--tj-grey); }
.tj tajweed.madda_normal { color: var(--tj-madd2); } .tj tajweed.madda_permissible { color: var(--tj-maddj); }
.tj tajweed.madda_obligatory { color: var(--tj-maddw); } .tj tajweed.madda_necessary { color: var(--tj-maddl); }
.tj tajweed.qalaqah { color: var(--tj-qalqalah); } .tj tajweed.ikhafa { color: var(--tj-ikhfa); } .tj tajweed.ikhafa_shafawi { color: var(--tj-ikhfas); }
.tj tajweed.iqlab { color: var(--tj-iqlab); } .tj tajweed.idgham_ghunnah { color: var(--tj-idghg); } .tj tajweed.idgham_wo_ghunnah { color: var(--tj-idghn); }
.tj tajweed.idgham_shafawi { color: var(--tj-idghs); } .tj tajweed.idgham_mutajanisayn, .tj tajweed.idgham_mutaqaribayn { color: var(--tj-grey); }
.tj tajweed.ghunnah { color: var(--tj-ghunnah); }
.focus tajweed { color: inherit !important; }
.focus tajweed.hl { color: var(--tint) !important; background: var(--tint-soft); border-radius: 4px; }
.sw { width: 10px; height: 10px; border-radius: 3px; flex: none; display: inline-block; }
.next-surah { display: flex; align-items: center; gap: 12px; padding: 16px; margin-top: 18px; width: 100%; text-align: left; }

/* ---------- Mini player ---------- */
.mini { position: fixed; z-index: 29; left: max(8px, env(safe-area-inset-left, 0px)); right: max(8px, env(safe-area-inset-right, 0px)); bottom: calc(var(--tabh) + 8px); height: 60px; display: flex; align-items: center; gap: 4px; padding: 0 6px 0 8px; border-radius: 14px; background: color-mix(in srgb, var(--panel) 88%, transparent); -webkit-backdrop-filter: saturate(1.8) blur(24px); backdrop-filter: saturate(1.8) blur(24px); box-shadow: 0 10px 30px -10px rgba(0,0,0,.35), 0 0 0 .5px var(--line); overflow: hidden; animation: miniIn .35s cubic-bezier(.2,.8,.2,1); }
@keyframes miniIn { from { transform: translateY(30px); opacity: 0; } }
@media (min-width: 901px) { .mini { left: calc(240px + 50% - 120px); transform: translateX(-50%); width: min(640px, calc(100% - 280px)); right: auto; bottom: 18px; animation: none; } }
.mini-hit { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; height: 100%; text-align: left; }
.mini-hit:active { opacity: 1; }
.mini-meta { min-width: 0; flex: 1; }
.mini-meta b { display: block; font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-meta span { display: block; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-btn { width: 42px; height: 42px; display: grid; place-items: center; flex: none; }
.mini-btn svg.i { width: 24px; height: 24px; }
.mini-bar { position: absolute; left: 12px; right: 12px; bottom: 0; height: 2px; background: var(--line); border-radius: 2px; overflow: hidden; }
.mini-bar div { height: 100%; width: 0; background: var(--ink); }
.mq { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; padding: 0 9px; height: 24px; border-radius: 999px; background: var(--fill); color: var(--ink-2); white-space: nowrap; flex: none; }
.mq i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
@media (max-width: 380px) { .mini .mq { display: none !important; } }

/* ---------- Now Playing ---------- */
.np { position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; padding: calc(var(--top) + 6px) 24px calc(var(--bot) + 18px); background: linear-gradient(180deg, var(--np-a, #1d4d3f), var(--np-b, #0b1512) 75%); color: #fff; animation: npUp .38s cubic-bezier(.2,.85,.25,1); overflow: hidden; }
.np.closing { animation: npDown .28s cubic-bezier(.4,0,1,1) forwards; }
@keyframes npUp { from { transform: translateY(100%); } }
@keyframes npDown { to { transform: translateY(100%); } }
.np .navbtn { color: #fff; }
.np-top { display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 8px; }
.np-ctx { text-align: center; min-width: 0; }
.np-ctx span { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; opacity: .7; }
.np-ctx b { display: block; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np .mq { background: rgba(255,255,255,.14); color: #fff; }
.np-stage { flex: 1; min-height: 0; display: grid; place-items: center; padding: 18px 0; }
.np-art { width: min(100%, 46vh, 360px); aspect-ratio: 1; border-radius: 12px; box-shadow: 0 24px 50px -10px rgba(0,0,0,.55); font-size: clamp(40px, 13vw, 64px); transition: transform .35s cubic-bezier(.2,.8,.2,1); }
.np-art.paused { transform: scale(.86); }
.np-lyric { width: 100%; max-height: 100%; overflow-y: auto; text-align: center; padding: 10px 2px; -webkit-mask-image: linear-gradient(transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(transparent, #000 8%, #000 92%, transparent); }
.np-lyric .ar { font-family: var(--mushaf); font-size: clamp(26px, 7.4vw, 36px); line-height: 2.1; direction: rtl; }
.np-lyric .tr { font-size: 18px; line-height: 1.5; font-weight: 600; opacity: .75; margin-top: 12px; }
.np-meta { display: flex; align-items: center; gap: 10px; }
.np-meta > div { flex: 1; min-width: 0; }
.np-meta b { display: block; font-size: 21px; font-weight: 700; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-meta span { display: block; font-size: 17px; opacity: .7; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-meta .navbtn.on { background: rgba(255,255,255,.2); }
.scrub { -webkit-appearance: none; appearance: none; width: 100%; height: 22px; background: transparent; margin: 14px 0 0; }
.scrub::-webkit-slider-runnable-track { height: 5px; border-radius: 3px; background: linear-gradient(90deg, rgba(255,255,255,.9) var(--p, 0%), rgba(255,255,255,.25) var(--p, 0%)); }
.scrub::-moz-range-track { height: 5px; border-radius: 3px; background: rgba(255,255,255,.25); }
.scrub::-moz-range-progress { height: 5px; border-radius: 3px; background: rgba(255,255,255,.9); }
.scrub::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%; background: #fff; margin-top: -4.5px; }
.scrub::-moz-range-thumb { width: 14px; height: 14px; border: 0; border-radius: 50%; background: #fff; }
.np-times { display: flex; justify-content: space-between; font-size: 12px; opacity: .65; font-variant-numeric: tabular-nums; margin-top: 2px; }
.np-ctrl { display: flex; align-items: center; justify-content: space-between; margin: 10px 0 18px; }
.np-btn { width: 64px; height: 64px; display: grid; place-items: center; }
.np-btn svg.i { width: 36px; height: 36px; }
.np-play { width: 78px; height: 78px; border-radius: 50%; background: #fff; color: #0b1512; display: grid; place-items: center; }
.np-play svg.i { width: 34px; height: 34px; }
.np-play:active { opacity: 1; transform: scale(.92); transition: transform .1s; }
.np-sm { width: 44px; height: 44px; display: grid; place-items: center; font-size: 15px; font-weight: 700; opacity: .75; position: relative; }
.np-sm.on { opacity: 1; color: var(--np-hi, #6ff0c3); }
.np-sm em { position: absolute; right: 5px; top: 5px; font-style: normal; font-size: 9px; font-weight: 800; background: var(--np-hi, #6ff0c3); color: #0b1512; width: 13px; height: 13px; border-radius: 50%; display: grid; place-items: center; }
.np-foot { display: flex; justify-content: space-around; }
.np-pill { display: grid; justify-items: center; gap: 3px; font-size: 11px; opacity: .75; min-width: 64px; }
.np-pill.on { opacity: 1; color: var(--np-hi, #6ff0c3); }

/* ---------- Stories ---------- */
.story { position: fixed; inset: 0; z-index: 60; background: #000; color: #fff; display: flex; flex-direction: column; padding-top: calc(var(--top) + 8px); animation: storyIn .28s cubic-bezier(.2,.8,.2,1); -webkit-user-select: none; user-select: none; }
.story.closing { animation: storyOut .22s ease-in forwards; }
@keyframes storyIn { from { transform: scale(.92); opacity: 0; border-radius: 30px; } }
@keyframes storyOut { to { transform: translateY(40%) scale(.9); opacity: 0; } }
.story-bars { display: flex; gap: 3px; padding: 0 8px; }
.story-bars i { flex: 1; height: 2.5px; border-radius: 2px; background: rgba(255,255,255,.35); overflow: hidden; }
.story-bars i b { display: block; height: 100%; width: 0; background: #fff; }
.story-head { display: flex; align-items: center; gap: 8px; padding: 10px 10px 0 12px; font-size: 14px; }
.story-head span:not(.story-av) { opacity: .65; }
.story-av { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-family: var(--ar-ui); font-weight: 600; font-size: 14px; }
.story-x { margin-left: auto; width: 40px; height: 40px; display: grid; place-items: center; color: #fff; }
.story-body { flex: 1; position: relative; overflow: hidden; }
.slide { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; padding: 24px 26px calc(var(--bot) + 30px); text-align: center; animation: fadein .25s; }
.slide .k { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; opacity: .7; margin-bottom: 14px; }
.slide .big-ar { font-family: var(--mushaf); font-size: clamp(30px, 8.6vw, 42px); line-height: 2.05; direction: rtl; }
.slide .big { font-size: clamp(24px, 6.8vw, 32px); font-weight: 700; line-height: 1.3; letter-spacing: -.02em; text-wrap: balance; }
.slide .body { font-size: 18px; line-height: 1.55; opacity: .9; text-align: left; max-height: 62vh; overflow: hidden; -webkit-mask-image: linear-gradient(#000 80%, transparent); mask-image: linear-gradient(#000 80%, transparent); }
.slide .body p { margin: 0 0 10px; }
.slide .ref { margin-top: 14px; font-size: 14px; opacity: .7; }
.slide .acts { display: flex; gap: 10px; justify-content: center; margin-top: 26px; flex-wrap: wrap; }
.slide .btn { background: #fff; color: #000; }
.slide .btn.ghost { background: rgba(255,255,255,.18); color: #fff; }
.slide .ar-text { color: #fff; text-align: center; }

/* ---------- Maqam ---------- */
.detector { padding: 18px; }
.detector .big { font-size: 40px; font-weight: 700; letter-spacing: -.04em; line-height: 1; }
.detector .ar { font-family: var(--ar-ui); font-size: 22px; color: var(--muted); }
.ring { width: 100%; max-width: 220px; aspect-ratio: 1; margin: 0 auto; display: block; }
.bars { display: grid; gap: 7px; margin-top: 10px; }
.barrow { display: grid; grid-template-columns: 78px 1fr 34px; align-items: center; gap: 10px; font-size: 14px; }
.barrow .track { height: 6px; background: var(--sunk); border-radius: 9px; overflow: hidden; }
.barrow .track div { height: 100%; border-radius: 9px; transition: width .5s; }
.barrow span:last-child { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }
.timeline { display: flex; height: 24px; border-radius: 7px; overflow: hidden; background: var(--sunk); margin-top: 10px; }
.timeline div { min-width: 2px; }
.mgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 640px) { .mgrid { grid-template-columns: repeat(4, 1fr); } }
.mcard { text-align: left; padding: 14px; border-radius: var(--r); background: var(--panel); display: grid; gap: 4px; }
.mcard b { font-weight: 600; display: flex; align-items: center; gap: 8px; }
.mcard span { font-size: 13px; color: var(--muted); line-height: 1.4; }
.ladder { display: grid; gap: 6px; }
.rung { display: grid; grid-template-columns: 54px 1fr auto; align-items: center; padding: 11px 14px; border-radius: 12px; background: var(--panel); text-align: left; font-size: 15px; }
.rung.on { background: var(--tint-soft); box-shadow: inset 0 0 0 1.5px var(--tint); }
.rung b { font-variant-numeric: tabular-nums; }
.rung.q b { color: var(--warn); }
.needle-wrap { position: relative; height: 46px; background: var(--sunk); border-radius: 12px; overflow: hidden; }
.needle-wrap .c { position: absolute; left: 50%; top: 8px; bottom: 8px; width: 1px; background: var(--muted); }
.needle-wrap .n { position: absolute; top: 9px; bottom: 9px; width: 5px; margin-left: -2.5px; border-radius: 3px; background: var(--tint); left: 50%; transition: left .08s linear; }

/* ---------- Imitate / memorize / check ---------- */
.coach-head { display: flex; gap: 14px; align-items: center; margin-top: 4px; }
.contour { width: 100%; height: 160px; display: block; background: var(--sunk); border-radius: 12px; }
.scores { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 12px; }
.score { background: var(--sunk); border-radius: 12px; padding: 10px; text-align: center; }
.score b { display: block; font-size: 24px; font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.score span { font-size: 12px; color: var(--muted); }
.traits { margin: 12px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.traits li { display: grid; grid-template-columns: 16px 1fr; gap: 6px; font-size: 15px; color: var(--ink-2); line-height: 1.4; }
.traits li::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--tint); margin: 8px 0 0 3px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 14px 0; }
.step { padding: 9px 10px; border-radius: 12px; background: var(--sunk); font-size: 12.5px; color: var(--muted); line-height: 1.3; }
.step b { display: block; color: var(--ink); font-size: 14px; }
.step.on { background: var(--tint); color: color-mix(in srgb, var(--on-tint) 75%, transparent); }
.step.on b { color: var(--on-tint); }
.mic { width: 68px; height: 68px; border-radius: 50%; background: var(--tint); color: var(--on-tint); display: grid; place-items: center; position: relative; flex: none; }
.mic svg { width: 28px; height: 28px; }
.mic.rec { background: var(--bad); color: #fff; }
.mic.rec::after { content: ''; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid var(--bad); animation: ring 1.2s infinite; }
@keyframes ring { from { transform: scale(.92); opacity: 1; } to { transform: scale(1.2); opacity: 0; } }
.check .w { padding: 0 2px; border-radius: 4px; }
.check .ok { color: var(--tint); }
.check .miss { color: var(--bad); text-decoration: underline wavy; text-underline-offset: 10px; }
.heard { font-family: var(--ar-ui); direction: rtl; text-align: right; color: var(--muted); min-height: 30px; font-size: 18px; }
.mask .w { filter: blur(8px); cursor: pointer; transition: filter .2s; }
.mask .w.show { filter: none; }
.heat { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 10px; }
.heat i { width: 9px; height: 9px; border-radius: 2px; background: var(--sunk); }
.heat i.on { background: var(--tint); }
.track-bar { height: 6px; background: var(--sunk); border-radius: 9px; overflow: hidden; }
.track-bar div { height: 100%; background: var(--tint); border-radius: 9px; transition: width .3s; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat { padding: 14px 12px; }
.stat b { display: block; font-size: 24px; font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.stat span { font-size: 13px; color: var(--muted); }
.mem-bar { display: flex; align-items: center; gap: 2px; margin-bottom: 6px; }
.iconbtn { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; color: var(--muted); flex: none; }
.iconbtn.on { color: var(--tint); }
.iconbtn svg.i { width: 20px; height: 20px; }

/* ---------- Quiz ---------- */
.qopt { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 54px; padding: 12px 16px; border-radius: 14px; background: var(--panel); text-align: left; font-weight: 500; font-size: 16px; line-height: 1.35; }
.qopt.right { background: var(--tint-soft); box-shadow: inset 0 0 0 2px var(--tint); }
.qopt.wrong { box-shadow: inset 0 0 0 2px var(--bad); }
.qopt kbd { font: 600 13px var(--ui); width: 26px; height: 26px; border-radius: 8px; background: var(--fill); display: grid; place-items: center; flex: none; }

/* ---------- Sheets (iOS pattern: grabber, drag down to dismiss) ---------- */
.backdrop { position: fixed; inset: 0; z-index: 54; background: rgba(0,0,0,.4); animation: fadein .25s; }
.backdrop.closing { opacity: 0; transition: opacity .22s; }
.sheet { position: fixed; z-index: 55; left: 50%; bottom: 0; transform: translateX(-50%); width: min(640px, 100%); max-height: calc(100% - var(--top) - 24px); overflow-y: auto; overscroll-behavior: contain; background: var(--bg); border-radius: 14px 14px 0 0; padding: 8px max(16px, env(safe-area-inset-right, 0px)) calc(24px + var(--bot)) max(16px, env(safe-area-inset-left, 0px)); animation: sheetUp .36s cubic-bezier(.2,.85,.25,1); }
.sheet.closing { transform: translate(-50%, 105%) !important; transition: transform .26s cubic-bezier(.4,0,1,1); }
@keyframes sheetUp { from { transform: translate(-50%, 100%); } }
.sheet-done { position: absolute; top: 10px; right: 14px; height: 34px; padding: 0 6px; color: var(--tint); font-weight: 600; font-size: 17px; z-index: 2; }
.grip { width: 36px; height: 5px; background: var(--muted); opacity: .45; border-radius: 9px; margin: 0 auto 12px; }
.sheet h3 { margin: 2px 0 14px; font-size: 20px; font-weight: 700; letter-spacing: -.02em; text-align: center; }
.sheet .sh-sub { text-align: center; color: var(--muted); font-size: 14px; margin: -10px 0 14px; }
.acts .cell { min-height: 50px; }
.acts .cell svg.i { color: var(--tint); }
.acts .cell.danger, .acts .cell.danger svg.i { color: var(--bad); }
.tafsir { font-size: 16px; line-height: 1.7; color: var(--ink-2); }
.tafsir[dir="rtl"] { font-family: var(--ar-ui); font-size: 19px; line-height: 2; }
.tafsir h2, .tafsir h3 { font-size: 17px; margin: 16px 0 6px; color: var(--ink); text-align: left; }
.aa-preview { background: var(--panel); border-radius: 12px; padding: 14px 16px; }
.range { -webkit-appearance: none; appearance: none; width: 100%; height: 28px; background: transparent; }
.range::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: var(--fill); }
.range::-webkit-slider-thumb { -webkit-appearance: none; width: 28px; height: 28px; border-radius: 50%; background: #fff; margin-top: -12px; box-shadow: 0 3px 8px rgba(0,0,0,.15), 0 0 0 .5px rgba(0,0,0,.06); }
.range::-moz-range-track { height: 4px; border-radius: 2px; background: var(--fill); }
.range::-moz-range-thumb { width: 26px; height: 26px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 3px 8px rgba(0,0,0,.15); }
.size-row { display: flex; align-items: center; gap: 12px; padding: 8px 16px; }
.size-row span { color: var(--muted); font-weight: 600; }
.themes { display: flex; gap: 12px; justify-content: center; padding: 14px 16px; }
.themes button { width: 46px; height: 46px; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--line); }
.themes button.on { box-shadow: 0 0 0 3px var(--tint); }

/* ---------- Video modal ---------- */
.video-modal { position: fixed; inset: 0; z-index: 70; background: rgba(0,0,0,.92); display: grid; place-items: center; padding: calc(var(--top) + 20px) max(12px, env(safe-area-inset-right, 0px)) calc(var(--bot) + 20px) max(12px, env(safe-area-inset-left, 0px)); animation: fadein .2s; }
.video-modal .box { width: min(1000px, 100%); }
.video-modal iframe { width: 100%; aspect-ratio: 16/9; border: 0; border-radius: 12px; background: #000; display: block; }
.video-modal .vbar { display: flex; align-items: center; gap: 10px; color: #fff; margin-top: 12px; }
.video-modal .vbar b { flex: 1; min-width: 0; font-weight: 500; font-size: 15px; }
.video-modal .btn { background: rgba(255,255,255,.16); color: #fff; }
.toast { position: fixed; z-index: 80; left: 50%; top: calc(var(--top) + 10px); transform: translateX(-50%); background: color-mix(in srgb, var(--panel) 92%, transparent); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); color: var(--ink); padding: 11px 18px; border-radius: 999px; font-size: 15px; font-weight: 500; max-width: calc(100% - 32px); box-shadow: 0 10px 30px -8px rgba(0,0,0,.3), 0 0 0 .5px var(--line); animation: toastIn .35s cubic-bezier(.2,.9,.3,1.2); text-align: center; }
@keyframes toastIn { from { transform: translate(-50%, -30px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* Ajr tracker */
.panel.ajr { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; width: 100%; text-align: left; margin-top: 12px; padding: 16px 18px; }
.ajr-l { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ajr-l b { font-size: 30px; letter-spacing: -.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.ajr-l span:last-child { color: var(--muted); font-size: 14px; }
.ajr-bars { display: flex; align-items: flex-end; gap: 4px; height: 44px; flex: none; }
.ajr-bars i, .ajr-week .bar i { display: block; width: 8px; border-radius: 4px; background: var(--tint-soft); }
.ajr-bars i.now, .ajr-week .bar i.now { background: var(--tint); }
.ajr-hero { text-align: center; }
.ajr-hero .big { font-size: 52px; font-weight: 700; letter-spacing: -.04em; font-variant-numeric: tabular-nums; margin-top: 4px; }
.ajr-split { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 16px; text-align: center; }
.ajr-split b { display: block; font-size: 22px; font-variant-numeric: tabular-nums; }
.ajr-split span { color: var(--muted); font-size: 13px; }
.ajr-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; text-align: center; }
.ajr-week .bar { height: 110px; display: flex; align-items: flex-end; justify-content: center; }
.ajr-week .bar i { width: 18px; }
.ajr-week span { display: block; color: var(--muted); font-size: 12px; margin-top: 6px; }
.vthumb .yt { position: absolute; left: 8px; top: 8px; padding: 3px 7px; border-radius: 6px; background: rgba(0,0,0,.72); color: #fff; font-size: 11px; font-weight: 600; }

/* Makharij + mouth coach */
.ar-ui { font-family: var(--ar-ui); }
.coach-cta { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; margin-bottom: 4px; }
.coach-cta .meta { flex: 1; display: flex; flex-direction: column; }
.coach-cta .meta span { color: var(--muted); font-size: 14px; }
.mk-l { font-family: var(--ar-ui); font-size: 22px; min-width: 64px; text-align: center; color: var(--tint); direction: rtl; flex: none; }
.mk-big { font-family: var(--ar-ui); font-size: 52px; line-height: 1.4; color: var(--tint); direction: rtl; margin-top: 4px; }
.cam { position: relative; aspect-ratio: 3 / 4; max-height: 52vh; width: 100%; margin: 0 auto; border-radius: 22px; overflow: hidden; background: #111; box-shadow: inset 0 0 0 3px transparent; transition: box-shadow .15s; }
.cam.good { box-shadow: inset 0 0 0 4px var(--tint); }
.cam video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); display: block; }
.cam canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.cam-msg { position: absolute; left: 12px; right: 12px; bottom: 12px; padding: 8px 12px; border-radius: 12px; background: rgba(0,0,0,.6); color: #fff; font-size: 15px; text-align: center; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.cam-reps { position: absolute; top: 12px; right: 12px; padding: 4px 10px; border-radius: 999px; background: rgba(0,0,0,.6); color: #fff; font-weight: 600; font-variant-numeric: tabular-nums; }
.meters { display: grid; gap: 8px; margin-top: 12px; }
.mt { display: grid; grid-template-columns: 78px 1fr; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.mt.on { color: var(--ink); font-weight: 600; }
.mt i { display: block; height: 8px; border-radius: 4px; background: var(--fill); overflow: hidden; }
.mt b { display: block; height: 100%; width: 0; background: var(--muted); border-radius: 4px; transition: width .08s linear; }
.mt.on b { background: var(--tint); }
/* Learn has five sections: let its switcher scroll sideways instead of clipping the last one */
#ls { overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
#ls::-webkit-scrollbar { display: none; }
#ls button { flex: 1 0 auto; padding-left: 14px; padding-right: 14px; }
.drill-ar { font-family: var(--ar-ui); font-size: 30px; line-height: 1.6; margin: 2px 0 6px; color: var(--ink); }

/* Mushaf */
.mcont { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; }
.mcont .meta { flex: 1; display: flex; flex-direction: column; }
.mcont .meta span { color: var(--muted); font-size: 14px; }
.mpage-mini { width: 38px; height: 50px; border-radius: 6px; background: #fbf6ea; box-shadow: inset 0 0 0 1.5px #d9c8a3; display: grid; place-items: center; font-weight: 700; font-size: 13px; color: #6b5a3a; flex: none; }
.jgrid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin-top: 12px; }
.jcell { position: relative; overflow: hidden; border-radius: 10px; padding: 8px 2px; background: var(--fill); text-align: center; display: flex; flex-direction: column; gap: 1px; }
.jcell::before { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: calc(var(--f) * 100%); background: var(--tint-soft); }
.jcell b, .jcell span { position: relative; }
.jcell b { font-size: 15px; }
.jcell span { font-size: 10px; color: var(--muted); font-variant-numeric: tabular-nums; }
.mtools { margin-bottom: 10px; }
.mpage { background: #fbf6ea; color: #1f1a12; border-radius: 6px; padding: 12px 14px 10px; box-shadow: 0 1px 2px rgba(0,0,0,.08), inset 0 0 0 1px #e6d9bb, 0 0 0 5px #fbf6ea, 0 0 0 6.5px #c9b27a; margin: 8px 7px; user-select: none; -webkit-user-select: none; }
:root[data-theme="dark"] .mpage { background: #1c1a15; color: #efe6d2; box-shadow: inset 0 0 0 1px #3a3326, 0 0 0 5px #1c1a15, 0 0 0 6.5px #6b5a3a; }
.mhead, .mfoot { display: flex; justify-content: space-between; font: 600 12px var(--ui); color: #8a7a55; direction: ltr; }
.mfoot { justify-content: center; font: 500 15px var(--ar-ui); margin-top: 4px; }
.mlines { font-family: 'Uthmanic Hafs', serif; font-size: min(5.15vw, 24px); line-height: 2.05; margin-top: 4px; }
.mline { display: flex; justify-content: space-between; gap: .22em; white-space: nowrap; min-height: 2.05em; align-items: center; }
.mline.center { justify-content: center; gap: .32em; }
.mline.msurah { justify-content: center; }
.mline.msurah span { padding: 0 1.4em; border: 1.5px solid #c9b27a; border-radius: 999px; font-size: .82em; line-height: 1.7; background: #f3ead2; }
.mline.mbasm { justify-content: center; }
.mw { cursor: default; border-radius: 4px; transition: filter .15s, background .15s; }
.mw.masked { filter: blur(7px); opacity: .55; cursor: pointer; }
.mw.peek { background: rgba(212,175,55,.22); }
.me { color: #8a6d2f; }
.mnav { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 12px; }
.i.flip { transform: scaleX(-1); }
/* Hifz plan: sabaq, sabqi, manzil */
.plan .prow { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: .5px solid var(--line); }
.plan .prow:first-of-type { margin-top: 8px; }
.plan .pl { display: flex; flex-direction: column; width: 108px; flex: none; }
.plan .pl span { color: var(--muted); font-size: 12px; }
.pchips { display: flex; flex-wrap: wrap; gap: 6px; }
.pchip { min-width: 40px; height: 32px; padding: 0 10px; border-radius: 9px; background: #fbf6ea; box-shadow: inset 0 0 0 1.5px #d9c8a3; font-weight: 700; font-size: 13px; color: #6b5a3a; font-variant-numeric: tabular-nums; }
.pchip.done { background: var(--tint); box-shadow: none; color: #fff; }
.credits .cr { display: flex; flex-direction: column; gap: 2px; padding: 10px 0; border-bottom: .5px solid var(--line); }
.credits .cr span { color: var(--muted); font-size: 14px; }
