/* خط المصحف «KFGQPC HAFS Uthmanic Script» ٣٫٠ — ملف المجمع كما نُشر، بلا تحويلٍ ولا اقتطاع
   (رخصته تمنع التعديل؛ نصّها في assets/fonts/KFGQPC-LICENSE.txt). block لا swap: الخط
   البديل يرسم علامات الضبط بغير رسم المصحف، فلا تُعرض به الآيات ولو لحظة. */
@font-face { font-family: 'KFGQPC Hafs'; src: url('assets/fonts/kfgqpc-hafs-v30.ttf') format('truetype'); font-weight: 400; font-style: normal; font-display: block; }

:root {
  color-scheme: light;
  --page: #f3ecdd;
  --surface: #fffaf0;
  --surface-muted: #f0e5d0;
  --ink: #30241a;
  --ink-soft: #695d4f;
  --line: #d9c6a3;
  --gold: #95651f;
  --gold-strong: #674414;
  --gold-pale: #eee0bd;
  --hero: #e9d8b8;
  --hero-deep: #cdb78d;
  --gold-on: #24180a;
  --page-background: radial-gradient(circle at 85% 3%, #e2cca5 0, transparent 34%), radial-gradient(circle at 8% 55%, #efe2c7 0, transparent 32%), linear-gradient(145deg, #faf4e9, #eee3ce 62%, #e8d7b7);
  --surface-background: linear-gradient(145deg, #fffdf7, #f6eddd 74%, #ecddc2);
  --card-background: linear-gradient(145deg, #fffcf5 0%, #f8efdf 58%, #f0e2c7 100%);
  --hero-background: radial-gradient(circle at 80% 44%, rgba(198, 151, 74, .27), transparent 38%), linear-gradient(122deg, #e7d2a7 0%, #f9eed9 50%, #e1c99d 100%);
  --metal-gradient: linear-gradient(125deg, #b17b32 0%, #f5d794 31%, #d3a353 59%, #8c5b22 100%);
  --edge-highlight: rgba(255, 252, 231, .85);
  --shadow: 0 12px 36px rgba(43, 37, 25, 0.065), 0 1px 3px rgba(43, 37, 25, 0.055);
  --shadow-lift: 0 20px 48px rgba(43, 37, 25, 0.12), 0 3px 9px rgba(43, 37, 25, 0.07);
  --radius-card: 20px;
  --radius-shell: 28px;
  --font-body: 'Tajawal', Tahoma, sans-serif;
  --font-display: 'Noto Naskh Arabic', 'Times New Roman', serif;
  /* نص المصحف وحده: خط مجمع الملك فهد، ونصّه بترميز المجمع (data/hafs-v30). لا يُستعمل
     لغير الآيات، ولا يتبدّل بلغة الواجهة كما يتبدّل خط العناوين. */
  --font-quran: 'KFGQPC Hafs', 'Noto Naskh Arabic', serif;
  --ease-luxe: cubic-bezier(.22, 1, .36, 1);
  --motion-fast: 180ms;
  /* ارتفاع الشريط اللاصق. مربوطٌ به scroll-margin لأقسام المراسي: لو بقي رقماً ثابتاً
     لاختفى عنوان القسم تحت الشريط كلّما تغيّر ارتفاعه بين المقاسات. */
  --header-height: 76px;
  --motion-page: 320ms;
  --motion-theme: 460ms;
}

:root[data-theme='dark'] {
  color-scheme: dark;
  --page: #19140f;
  --surface: #241e18;
  --surface-muted: #352a1d;
  --ink: #f9f0df;
  --ink-soft: #c7b69b;
  --line: #59452c;
  --gold: #d9ad60;
  --gold-strong: #f1d292;
  --gold-pale: #49341e;
  --hero: #3b2b1c;
  --hero-deep: #18130f;
  --gold-on: #241708;
  --page-background: radial-gradient(ellipse at 80% 2%, rgba(126, 83, 31, .34), transparent 38%), radial-gradient(ellipse at 5% 56%, rgba(88, 54, 26, .3), transparent 40%), linear-gradient(145deg, #251d17 0%, #151311 48%, #2a2018 100%);
  --surface-background: linear-gradient(145deg, #30251b, #211b17 54%, #191714);
  --card-background: linear-gradient(145deg, #35291d 0%, #262019 51%, #1b1916 100%);
  --hero-background: radial-gradient(circle at 77% 43%, rgba(179, 114, 41, .38), transparent 38%), radial-gradient(circle at 3% 0%, rgba(112, 72, 32, .37), transparent 51%), linear-gradient(122deg, #3d2b1c 0%, #231c17 48%, #161513 100%);
  --metal-gradient: linear-gradient(125deg, #ad7228 0%, #f8e4b2 27%, #d9a755 56%, #8d571e 100%);
  --edge-highlight: rgba(248, 218, 157, .2);
  --shadow: 0 14px 38px rgba(8, 6, 4, .24), inset 0 1px rgba(255, 232, 178, .05);
  --shadow-lift: 0 22px 48px rgba(6, 4, 2, .38), 0 0 25px rgba(184, 124, 47, .09);
}

:root[lang='en'] { --font-body: 'Segoe UI', system-ui, sans-serif; --font-display: Georgia, serif; }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--page-background) fixed; color: var(--ink); font-family: var(--font-body); font-size: 16px; line-height: 1.7; }
button, input { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
svg { width: 1.25em; height: 1.25em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; }
::selection { background: var(--gold); color: var(--gold-on); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.page-wrap { min-height: 100vh; display: flex; flex-direction: column; overflow: clip; }
.shell { width: min(100% - 48px, 1220px); margin-inline: auto; }

/* The header spans the dock's full width while its contents follow the page grid. */
.site-header { position: sticky; z-index: 30; top: 0; display: flex; align-items: center; gap: 24px; width: 100%; min-height: 76px; padding: 10px max(24px, calc((100vw - 1220px) / 2)); margin-top: 0; border: 0; border-bottom: 1px solid var(--gold); border-radius: 0; background: var(--surface-background); box-shadow: var(--shadow), inset 0 1px var(--edge-highlight); backdrop-filter: blur(18px); }
.site-header.shell { width: 100%; }
.brand { display: inline-flex; align-items: center; gap: 11px; min-width: 0; }
.brand-mark { display: grid; place-items: center; flex: none; width: 48px; height: 48px; border: 1px solid var(--gold); border-radius: 50%; background: radial-gradient(circle, var(--gold-pale), var(--surface-muted)); box-shadow: inset 0 1px var(--edge-highlight); }
.brand-mark img { display: block; width: 41px; height: 41px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; white-space: nowrap; }
.brand-text strong { font-family: var(--font-display); font-size: 23px; line-height: 1.2; }
.brand-text small { margin-top: 3px; color: var(--ink-soft); font-size: 11px; font-weight: 600; letter-spacing: .01em; }
.header-nav { display: flex; align-items: center; gap: 12px; margin-inline-start: auto; }
.nav-link { padding: 8px 18px; border-radius: 999px; color: var(--ink-soft); font-weight: 600; transition: color .2s, background .2s; }
.nav-link:hover, .nav-link.is-current { color: var(--gold-strong); background: var(--gold-pale); }
.mobile-library-link { display: none; color: var(--gold-strong); font-size: 12px; font-weight: 700; white-space: nowrap; }
.network-status { flex: none; color: var(--gold-strong); font-size: 11px; font-weight: 700; }
.language-picker { display: inline-flex; align-items: center; gap: 8px; flex: none; color: var(--ink-soft); font-size: 12px; font-weight: 700; }
.language-picker select { min-height: 44px; max-width: 165px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--card-background); color: var(--ink); cursor: pointer; font: inherit; }
.language-picker select:hover { border-color: var(--gold); }
.theme-toggle { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 50%; background: var(--card-background); color: var(--gold-strong); transition: transform .2s, border-color .2s; }
.theme-toggle:hover { transform: rotate(-18deg); border-color: var(--gold); }
.theme-toggle svg { width: 21px; height: 21px; }
:root .theme-toggle .icon-sun, :root[data-theme='dark'] .theme-toggle .icon-moon { display: none; }
:root[data-theme='dark'] .theme-toggle .icon-sun { display: block; }

/* An original layered rosette is the singular decorative signature. */
.hero { position: relative; isolation: isolate; display: grid; grid-template-columns: 1.1fr .9fr; min-height: 500px; margin-top: 26px; overflow: hidden; border: 1px solid var(--gold); border-radius: var(--radius-shell); background: var(--hero-background); box-shadow: var(--shadow-lift), inset 0 1px var(--edge-highlight); }
.hero::before, .reader-hero::before { content: ''; position: absolute; inset: 18px; pointer-events: none; border: 1px solid color-mix(in srgb, var(--gold) 25%, transparent); border-radius: 18px; }
.hero-copy { z-index: 1; align-self: center; padding: 60px 70px 72px 28px; }
.eyebrow { display: inline-flex; align-items: center; gap: 12px; color: var(--gold-strong); font-size: 13px; font-weight: 700; letter-spacing: .02em; }
.eyebrow-line { width: 26px; height: 1px; background: var(--gold); }
.hero h1 { margin: 25px 0 14px; font-family: var(--font-display); font-size: clamp(49px, 5.5vw, 80px); font-weight: 700; line-height: 1.25; letter-spacing: -.025em; }
.hero h1.hero-verse { max-width: 680px; font-size: clamp(32px, 3.35vw, 52px); font-weight: 600; line-height: 1.55; letter-spacing: 0; text-wrap: balance; }
:root[lang='en'] .hero h1.hero-verse { font-family: 'Noto Naskh Arabic', 'Times New Roman', serif; }
.hero h1 em { color: var(--gold-strong); font-style: normal; }
:root[data-theme='dark'] .hero h1 em { background: var(--metal-gradient); background-clip: text; -webkit-background-clip: text; color: transparent; }
.hero p { max-width: 510px; margin: 0 0 29px; color: var(--ink-soft); font-size: 17px; line-height: 2; }
.hero-action { display: inline-flex; align-items: center; gap: 16px; min-height: 48px; padding: 10px 22px; border: 1px solid color-mix(in srgb, var(--gold) 75%, transparent); border-radius: 13px; background: var(--metal-gradient); color: var(--gold-on); box-shadow: 0 8px 22px rgba(92, 56, 15, .24), inset 0 1px rgba(255, 245, 205, .64); font-weight: 700; transition: transform .2s, box-shadow .2s; }
.hero-action:hover { transform: translateY(-2px); box-shadow: 0 13px 25px rgba(92, 56, 15, .35), inset 0 1px rgba(255, 245, 205, .72); }
.hero-action svg { width: 17px; height: 17px; }
.hero-art { position: relative; z-index: 1; display: grid; place-items: center; min-height: 100%; overflow: hidden; }
.hero-art::before { content: ''; position: absolute; width: min(49vw, 575px); aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--gold) 18%, transparent) 0, color-mix(in srgb, var(--gold) 7%, transparent) 45%, transparent 70%); }
/* الزخرفة تدور ببطءٍ ثابت، وفي وسطها أسماء الله الحسنى تتعاقب — بطلب المالك.
   الدوران للصورة وحدها، والظلّ على الإطار الثابت حولها: لو بقي الظلّ على الصورة لدار معها، فصار
   فوقها حين تنقلب. والأسماء في قرصٍ لا يدور، فالكتابة تبقى مستقيمة والزخرفة تدور من خلفها. */
.hero-emblem { position: relative; display: grid; place-items: center; width: min(44vw, 500px); aspect-ratio: 1; filter: drop-shadow(0 18px 30px rgba(8, 5, 2, .28)); }
.hero-emblem > * { grid-area: 1 / 1; }
.hero-rosette { position: relative; display: block; width: 100%; height: auto; max-width: none; aspect-ratio: 1; object-fit: contain; }
:root[data-theme='light'] .hero-rosette { filter: brightness(.65) contrast(1.08) saturate(1.2); }
:root[data-theme='light'] .hero-emblem { filter: drop-shadow(0 18px 25px rgba(100, 65, 21, .18)); }
.hero-names { --medallion: #1f160d; position: relative; display: grid; place-items: center; width: 31%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--medallion) 88%, #4a3218) 0, var(--medallion) 70%); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--gold) 60%, transparent), inset 0 0 0 6px color-mix(in srgb, var(--medallion) 100%, transparent), inset 0 0 0 7px color-mix(in srgb, var(--gold) 28%, transparent), 0 0 22px 8px color-mix(in srgb, var(--medallion) 75%, transparent); }
:root[data-theme='light'] .hero-names { --medallion: #f6ead2; }
/* خط النسخ صراحةً لا --font-display: الواجهة الإنجليزية تجعل ذاك Georgia، والأسماء عربية دائماً. */
.hero-name { display: inline-block; max-inline-size: 70%; padding-block: .08em; color: var(--gold-strong); font-family: 'Noto Naskh Arabic', serif; font-weight: 700; line-height: 1.3; text-align: center; white-space: nowrap; }
.hero-name[data-words] { white-space: normal; text-wrap: balance; }
:root[data-theme='dark'] .hero-name { background: var(--metal-gradient); background-clip: text; -webkit-background-clip: text; color: transparent; }
@media (prefers-reduced-motion: no-preference) {
  .hero-rosette { animation: rosette-turn 120s linear infinite; }
  .hero-name { animation: divine-name 3s infinite both; }
  .hero-art.is-resting .hero-rosette, .hero-art.is-resting .hero-name { animation-play-state: paused; }
}
@keyframes rosette-turn { to { rotate: 360deg; } }
/* ظهورٌ يكبر من الصغر إلى الوضوح، ثباتٌ يُقرأ فيه الاسم، ثم انكماشٌ وتلاشٍ — ٣ ثوانٍ لكل اسم. */
@keyframes divine-name {
  0% { opacity: 0; scale: .55; animation-timing-function: cubic-bezier(.22, 1, .36, 1); }
  27% { opacity: 1; scale: 1; }
  77% { opacity: 1; scale: 1; animation-timing-function: cubic-bezier(.55, 0, .8, .35); }
  100% { opacity: 0; scale: .78; }
}

.reciters-section { padding-block: 82px 110px; scroll-margin-top: calc(var(--header-height) + 36px); }
.resume-listening { display: flex; align-items: center; justify-content: space-between; gap: 28px; margin-top: 28px; padding: 24px 30px; border: 1px solid var(--gold); border-radius: var(--radius-card); background: var(--surface-background); box-shadow: var(--shadow); }
.resume-copy { min-width: 0; flex: 1; }
.resume-copy h2 { margin: 4px 0; font-family: var(--font-display); font-size: 30px; line-height: 1.35; }
.resume-copy p { margin: 0 0 12px; color: var(--ink-soft); font-size: 13px; }
.resume-listening .hero-action { flex: none; }
.resume-timeline { display: flex; align-items: center; gap: 12px; max-width: 430px; color: var(--gold-strong); font-size: 12px; }
.resume-timeline span { flex: none; }
.resume-timeline progress { appearance: none; min-width: 50px; width: 100%; height: 4px; overflow: hidden; border: 0; border-radius: 4px; background: var(--gold-pale); accent-color: var(--gold); }
.resume-timeline progress::-webkit-progress-bar { background: var(--gold-pale); border-radius: 4px; }
.resume-timeline progress::-webkit-progress-value { background: var(--metal-gradient); border-radius: 4px; }
.resume-timeline progress::-moz-progress-bar { background: var(--metal-gradient); border-radius: 4px; }
.library-section { padding-top: 72px; scroll-margin-top: calc(var(--header-height) + 36px); }
.library-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.library-actions button, .import-label { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 15px; border: 1px solid var(--gold); border-radius: 11px; background: var(--surface-background); color: var(--gold-strong); font-size: 13px; font-weight: 700; cursor: pointer; }
.library-actions button:hover, .import-label:hover, .import-label:focus-within { background: var(--gold-pale); }
.library-message { min-height: 20px; color: var(--gold-strong); font-size: 13px; }
.library-columns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.library-panel { min-width: 0; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius-card); background: var(--surface-background); box-shadow: var(--shadow); }
/* يلتفّ عند الضيق: نصّ زر المسح بالإنجليزية ("Clear recent history") أطول من العربي
   ("مسح السجل")، وكان flex:none مع nowrap يدفعه ٥٤ بكسل خارج لوحته عند ١٠٢٤ بكسل —
   حيث الأعمدة ثلاثة والواحد منها ضيّق. قيس قبل الإصلاح: يمين اللوحة ٩٦٧، يمين الزر ١٠٢١. */
.library-panel-heading { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.library-panel h3 { margin: 0; color: var(--gold-strong); font-family: var(--font-display); font-size: 24px; }
.library-panel h3 span { font-family: var(--font-body); font-size: 12px; }
.library-clear { display: inline-flex; align-items: center; gap: 5px; flex: 0 1 auto; min-width: 0; max-width: 100%; min-height: 36px; padding: 5px 7px; border: 1px solid transparent; border-radius: 9px; background: transparent; color: var(--ink-soft); font-size: 11px; font-weight: 700; text-align: start; white-space: normal; transition: color var(--motion-fast), background var(--motion-fast), border-color var(--motion-fast); }
.library-clear span { font-size: 17px; line-height: 1; }
.library-clear:hover:not(:disabled) { border-color: var(--line); background: var(--gold-pale); color: var(--gold-strong); }
.library-clear:disabled { opacity: .48; cursor: default; }
.library-clear-dialog { width: min(100% - 32px, 420px); padding: 28px; border: 1px solid var(--gold); border-radius: var(--radius-card); background: var(--surface-background); color: var(--ink); box-shadow: var(--shadow-lift); }
.library-clear-dialog::backdrop { background: rgba(12, 9, 5, .66); backdrop-filter: blur(4px); }
.library-clear-dialog h3 { margin: 5px 0 8px; color: var(--gold-strong); font-family: var(--font-display); font-size: 29px; }
.library-clear-dialog p { margin: 0 0 22px; color: var(--ink-soft); }
.library-clear-actions { display: flex; justify-content: flex-end; gap: 9px; }
.library-clear-actions button { min-height: 44px; padding: 8px 16px; border: 1px solid var(--gold); border-radius: 10px; background: var(--card-background); color: var(--gold-strong); font-weight: 700; }
.library-clear-actions button[value='confirm'] { background: var(--metal-gradient); color: var(--gold-on); }
.library-clear-actions button:hover { filter: brightness(1.08); }
.library-items { display: grid; gap: 8px; max-height: 315px; overflow-y: auto; scrollbar-color: var(--gold) transparent; }
.library-link { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 9px 12px; border: 1px solid var(--line); border-radius: 11px; background: var(--card-background); transition: border-color var(--motion-fast), background var(--motion-fast); }
.library-link:hover { border-color: var(--gold); background: var(--gold-pale); }
.library-link strong, .library-link small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.library-link strong { font-size: 14px; }.library-link small, .library-empty { color: var(--ink-soft); font-size: 12px; }
.library-empty { margin: 6px 0; }
.favorite-button { display: grid; place-items: center; flex: none; min-width: 44px; min-height: 44px; padding: 8px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-background); color: var(--gold-strong); transition: background var(--motion-fast), border-color var(--motion-fast); }
.favorite-button:hover { border-color: var(--gold); background: var(--gold-pale); }
.favorite-button[aria-pressed='true'] { border-color: var(--gold); background: var(--gold-pale); }
.favorite-button[aria-pressed='true'] svg { fill: currentColor; }
.favorite-button svg { width: 19px; height: 19px; }
.card-favorite { position: absolute; z-index: 3; top: 22px; inset-inline-end: 22px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 30px; }
.section-kicker { color: var(--gold-strong); font-size: 13px; font-weight: 700; }
.section-heading h2 { margin: 4px 0 0; font-family: var(--font-display); font-size: clamp(37px, 4vw, 50px); line-height: 1.25; }
.section-heading p { margin: 3px 0 0; color: var(--ink-soft); }
.result-count { flex: none; margin-bottom: 5px; color: var(--ink-soft); font-size: 13px; font-weight: 600; }
.browse-tools { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.search-field { display: flex; align-items: center; gap: 12px; width: min(100%, 385px); min-height: 53px; padding-inline: 17px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-background); box-shadow: var(--shadow); color: var(--gold); transition: border-color .2s; }
.search-field:focus-within { border-color: var(--gold); }
.search-field svg { flex: none; width: 20px; height: 20px; }
.search-field input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); }
.search-field input::placeholder { color: var(--ink-soft); opacity: .85; }
.search-field input::-webkit-search-cancel-button { cursor: pointer; }
.filter-group { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.filter-chip { min-height: 42px; padding: 8px 15px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-background); color: var(--ink-soft); font-size: 13px; font-weight: 700; transition: background .2s, color .2s, border-color .2s; }
.filter-chip:hover { border-color: var(--gold); color: var(--gold-strong); }
.filter-chip.is-active { border-color: var(--gold); background: var(--metal-gradient); color: var(--gold-on); box-shadow: inset 0 1px rgba(255, 245, 205, .5); }
.browse-state { color: var(--ink-soft); }
.browse-state:not(:empty) { margin-bottom: 20px; }
.state-panel { padding: 34px; border: 1px dashed var(--line); border-radius: var(--radius-card); background: var(--surface-background); text-align: center; }
.state-panel strong { display: block; margin-bottom: 5px; color: var(--ink); font-size: 18px; }
.state-panel p { margin: 0; }
.retry-button { margin-top: 16px; padding: 8px 18px; border: 1px solid var(--gold); border-radius: 10px; background: var(--gold-pale); color: var(--gold-strong); font-weight: 700; }
.reciter-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 17px; }
.reciter-card { position: relative; min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-card); background: var(--card-background); box-shadow: var(--shadow), inset 0 1px var(--edge-highlight); transition: transform .22s, box-shadow .22s, border-color .22s; }
.reciter-card::before { content: ''; position: absolute; inset: 0 22px auto; height: 1px; background: linear-gradient(90deg, transparent, var(--gold), transparent); opacity: .7; }
.reciter-card:hover, .reciter-card:focus-within { transform: translateY(-4px); border-color: var(--gold); box-shadow: var(--shadow-lift); }
.reciter-card a { display: flex; flex-direction: column; min-height: 240px; padding: 24px; border-radius: inherit; }
.card-topline { display: flex; align-items: start; justify-content: space-between; gap: 10px; }
.reciter-avatar { position: relative; display: grid; place-items: center; flex: none; width: 72px; height: 72px; overflow: hidden; border: 1px solid color-mix(in srgb, var(--gold) 75%, transparent); border-radius: 50%; background: radial-gradient(circle at 50% 42%, var(--gold-pale), var(--surface-muted)); color: var(--gold-strong); font-family: var(--font-display); font-size: 36px; line-height: 1; box-shadow: inset 0 0 0 4px color-mix(in srgb, var(--gold) 12%, transparent); }
.reciter-avatar::before { content: ''; position: absolute; inset: 3px; border-radius: 50%; background: url('./assets/rosette.svg') center / contain no-repeat; opacity: .53; }
.reciter-avatar span { z-index: 1; display: grid; place-items: center; width: 36px; height: 36px; overflow: hidden; border-radius: 50%; background: color-mix(in srgb, var(--surface) 88%, transparent); }
.initial-glyph { display: block; width: 100%; height: 100%; overflow: hidden; color: var(--gold-strong); }
.initial-glyph text { fill: currentColor; stroke: none; font-family: var(--font-display); font-weight: 700; }
.reciter-card h3 { margin: 16px 0 2px; font-family: var(--font-display); font-size: 26px; line-height: 1.45; }
.reciter-detail { min-height: 28px; color: var(--ink-soft); font-size: 13px; }
.card-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 17px; border-top: 1px solid var(--line); color: var(--gold-strong); font-size: 13px; font-weight: 700; }
.card-footer svg { width: 18px; height: 18px; transition: transform .2s; }
.reciter-card:hover .card-footer svg { transform: translateX(-4px); }
.skeleton-card { height: 240px; border: 1px solid var(--line); border-radius: var(--radius-card); background: linear-gradient(100deg, var(--surface) 15%, var(--surface-muted) 40%, var(--surface) 65%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { to { background-position-x: -200%; } }
.show-more { display: flex; align-items: center; gap: 12px; margin: 34px auto 0; padding: 11px 22px; border: 1px solid var(--gold); border-radius: 12px; background: var(--surface-background); color: var(--gold-strong); font-weight: 700; transition: background .2s; }
.show-more:hover { background: var(--gold-pale); }
.show-more svg { width: 17px; height: 17px; transform: rotate(-90deg); }
.site-footer { display: flex; justify-content: space-between; gap: 20px; margin-top: auto; padding-block: 27px 34px; border-top: 1px solid var(--line); color: var(--ink-soft); font-size: 13px; }
.site-footer a { color: var(--gold-strong); text-decoration: underline; text-underline-offset: 3px; }
.install-app { padding: 4px 10px; border: 1px solid var(--gold); border-radius: 8px; background: var(--gold-pale); color: var(--gold-strong); font-size: 12px; }
.footer-separator { color: var(--gold); padding-inline: 7px; }

/* Reciter page */
.reader-main { padding-block: 26px 90px; }
.breadcrumbs { display: flex; align-items: center; gap: 11px; margin: 7px 0 22px; color: var(--ink-soft); font-size: 13px; }
.breadcrumbs a:hover { color: var(--gold-strong); }
.breadcrumbs span:last-child { color: var(--ink); font-weight: 700; }
.reader-hero { position: relative; display: flex; align-items: center; gap: 40px; min-height: 285px; padding: 35px 55px; overflow: hidden; border: 1px solid var(--gold); border-radius: var(--radius-shell); background: var(--hero-background); box-shadow: var(--shadow), inset 0 1px var(--edge-highlight); }
.reader-portrait { position: relative; display: grid; place-items: center; flex: none; width: 160px; height: 160px; overflow: hidden; border: 1px solid var(--gold); border-radius: 50%; background: radial-gradient(circle, var(--gold-pale), var(--card-background)); box-shadow: inset 0 0 0 7px color-mix(in srgb, var(--gold) 9%, transparent), inset 0 0 0 9px color-mix(in srgb, var(--gold) 35%, transparent); color: var(--gold-strong); font-family: var(--font-display); font-size: 74px; line-height: 1; }
.reader-portrait::before { content: ''; position: absolute; inset: 4px; border-radius: 50%; background: url('./assets/rosette.svg') center / contain no-repeat; opacity: .5; }
.reader-portrait span { z-index: 1; display: grid; place-items: center; width: 80px; height: 80px; overflow: hidden; border-radius: 50%; background: color-mix(in srgb, var(--surface) 86%, transparent); }
.reader-intro { z-index: 1; }
.reader-intro h1 { margin: 10px 0 0; font-family: var(--font-display); font-size: clamp(39px, 5vw, 62px); line-height: 1.3; }
.reader-intro p { margin: 2px 0 14px; color: var(--ink-soft); }
.reader-facts { display: flex; flex-wrap: wrap; gap: 8px; }
.reader-facts span { padding: 5px 13px; border: 1px solid color-mix(in srgb, var(--gold) 35%, transparent); border-radius: 999px; background: color-mix(in srgb, var(--surface) 65%, transparent); color: var(--gold-strong); font-size: 12px; font-weight: 700; }
.reader-decoration { position: absolute; inset-inline-end: -38px; top: -105px; width: 415px; opacity: .32; pointer-events: none; }
.reader-decoration img { display: block; width: 100%; height: auto; }
:root[data-theme='light'] .reader-decoration { opacity: .22; filter: brightness(.75); }
.moshaf-section { padding-top: 55px; }
.moshaf-section .section-heading { margin-bottom: 18px; }
.moshaf-tabs { display: flex; flex-wrap: wrap; gap: 10px; }
.moshaf-item { display: inline-flex; align-items: stretch; gap: 5px; max-width: 100%; }
.moshaf-tab { display: flex; align-items: center; gap: 10px; padding: 11px 16px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface-background); color: var(--ink); text-align: start; box-shadow: var(--shadow); transition: border-color .2s, background .2s; }
.moshaf-tab:hover { border-color: var(--gold); }
.moshaf-tab[aria-pressed='true'] { border-color: var(--gold); background: linear-gradient(145deg, color-mix(in srgb, var(--gold-pale) 85%, var(--surface)), var(--surface-muted)); color: var(--gold-strong); box-shadow: inset 0 1px var(--edge-highlight), var(--shadow); }
.moshaf-tab span { font-weight: 700; }
.moshaf-tab small { color: var(--ink-soft); font-size: 11px; }
.surah-section { padding-top: 62px; }
.surah-section .section-heading { margin-bottom: 18px; }
.surah-search { margin-bottom: 22px; }
.surah-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.surah-item { position: relative; min-width: 0; }
.surah-item .surah-row { padding-inline-end: 62px; }
.surah-item > .favorite-button { position: absolute; z-index: 2; top: 50%; inset-inline-end: 9px; transform: translateY(-50%); width: 44px; height: 44px; }
.reader-favorite { display: inline-flex; align-items: center; margin-top: 13px; padding-inline: 15px; font-size: 13px; font-weight: 700; }
.surah-row { display: flex; align-items: center; width: 100%; min-width: 0; min-height: 75px; gap: 16px; padding: 11px 15px; border: 1px solid var(--line); border-radius: 15px; background: var(--card-background); color: var(--ink); text-align: start; box-shadow: var(--shadow); transition: border-color .2s, background .2s, transform .2s; }
.surah-row:hover, .surah-row.is-active { border-color: var(--gold); background: linear-gradient(145deg, var(--gold-pale), var(--surface-muted)); }
.surah-row:hover { transform: translateY(-2px); }
.surah-row::after { content: ''; position: absolute; bottom: 0; inset-inline-start: 0; width: var(--listening-progress, 0%); height: 2px; background: var(--metal-gradient); pointer-events: none; }
.surah-number { display: grid; place-items: center; flex: none; width: 43px; height: 43px; border: 1px solid color-mix(in srgb, var(--gold) 45%, transparent); border-radius: 12px; color: var(--gold-strong); font-family: var(--font-display); font-size: 18px; }
.surah-name-wrap { display: flex; flex-direction: column; min-width: 0; }
.surah-name { overflow: hidden; font-family: var(--font-display); font-size: 22px; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.surah-kind { color: var(--ink-soft); font-size: 11px; }
.surah-play { display: grid; place-items: center; flex: none; width: 34px; height: 34px; margin-inline-start: auto; border-radius: 50%; background: var(--gold-pale); color: var(--gold-strong); }
.surah-play svg { width: 17px; height: 17px; }
.surah-row.is-active .surah-play { background: var(--metal-gradient); color: var(--gold-on); }
.surah-row.is-active.is-playing .surah-play svg { display: none; }
.surah-row.is-active.is-playing .surah-play::after { content: ''; width: 9px; height: 14px; border-inline: 3px solid currentColor; }
.quran-text-section { margin-top: 65px; padding: 28px; border: 1px solid var(--gold); border-radius: var(--radius-shell); background: var(--surface-background); box-shadow: var(--shadow); }
.quran-verses { display: flex; flex-wrap: wrap; gap: 0 8px; align-items: baseline; padding: 16px 20px; border-radius: 15px; background: var(--card-background); font-family: var(--font-quran); font-size: clamp(28px, 3.1vw, 40px); line-height: 2.2; }
.quran-verse { display: inline; margin: 0; }
.quran-basmala { flex-basis: 100%; margin: 0 0 4px; color: var(--gold-strong); text-align: center; }
.ayah-number { display: inline-grid; place-items: center; min-width: 36px; height: 36px; margin-inline: 5px; border: 1px solid var(--gold); border-radius: 50%; color: var(--gold-strong); font-family: var(--font-body); font-size: 13px; vertical-align: middle; }
.text-source { margin: 15px 0 0; color: var(--ink-soft); font-size: 12px; }.text-source a { color: var(--gold-strong); text-decoration: underline; }

/* The player remains available while moving through a long surah list. */
.player { position: fixed; z-index: 40; inset-inline: 0; bottom: 0; border-top: 1px solid var(--gold); background: var(--surface-background); box-shadow: 0 -12px 34px rgba(0,0,0,.2), inset 0 1px var(--edge-highlight); backdrop-filter: blur(18px); transition: transform 320ms var(--ease-luxe), opacity 220ms, visibility 0s; }
.player.is-collapsed { transform: translateY(calc(100% + 20px)); opacity: 0; visibility: hidden; pointer-events: none; transition: transform 320ms var(--ease-luxe), opacity 220ms, visibility 0s 320ms; }
.player-inner { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 25px; min-height: 96px; padding-block: 13px; }
.player-options { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; border-top: 1px solid var(--line); padding-top: 9px; color: var(--ink-soft); font-size: 12px; }
.player-options label { display: inline-flex; align-items: center; gap: 7px; }
.player-options select, .player-options button { min-height: 34px; border: 1px solid var(--line); border-radius: 8px; background: var(--card-background); color: var(--ink); padding: 3px 8px; }
.player-options button:hover, .player-options select:focus-visible { border-color: var(--gold); }
.player-options input { accent-color: var(--gold); }
.repeat-mode { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.repeat-mode.is-segment { row-gap: 22px; padding-bottom: 17px; }
.segment-step { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.segment-point { position: relative; display: inline-flex; }
.segment-time { position: absolute; top: calc(100% + 3px); inset-inline: 0; color: var(--gold-strong); font-size: 11px; font-weight: 700; line-height: 14px; text-align: center; white-space: nowrap; font-variant-numeric: tabular-nums; }
.segment-guide { display: inline-grid; place-items: center; flex: none; width: 38px; height: 44px; color: var(--gold-strong); pointer-events: none; }
.segment-guide svg { width: 34px; height: 20px; stroke-width: 2.3; filter: drop-shadow(0 0 4px color-mix(in srgb, var(--gold) 40%, transparent)); }
.segment-guide-spark { fill: currentColor; stroke: none; opacity: 0; }
@media (prefers-reduced-motion: no-preference) {
  .segment-guide:not([hidden]) svg { animation: segment-guide-arrive 380ms var(--ease-luxe) both; }
  .segment-guide:not([hidden]) .segment-guide-spark { animation: segment-guide-travel 1250ms ease-in-out 2 250ms both; }
}
@keyframes segment-guide-arrive { from { opacity: 0; transform: translateX(8px); } to { opacity: 1; transform: translateX(0); } }
@keyframes segment-guide-travel { 0%, 100% { opacity: 0; transform: translateX(0); } 15% { opacity: 1; } 75% { opacity: 1; transform: translateX(-20px); } 95% { opacity: 0; transform: translateX(-23px); } }
.player-options .repeat-mode button { min-height: 44px; }
.repeat-stepper { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 3px 8px; border: 1px solid var(--gold); border-radius: 12px; background: linear-gradient(120deg, var(--card-background), var(--gold-pale)); }
.repeat-label { color: var(--ink); font-weight: 700; white-space: nowrap; }
.player-options .repeat-stepper button { display: inline-flex; align-items: center; justify-content: center; gap: 3px; min-width: 44px; min-height: 44px; padding: 3px 5px; border-radius: 9px; color: var(--gold-strong); cursor: pointer; touch-action: manipulation; transition: background var(--motion-fast), scale var(--motion-fast); }
.repeat-stepper button svg { width: 18px; height: 18px; }
.repeat-arrow-right { transform: scaleX(-1); }
.player-options .repeat-stepper button:hover:not(:disabled), .player-options .repeat-stepper button:focus-visible { background: var(--gold-pale); border-color: var(--gold); }
.player-options .repeat-stepper button:disabled { opacity: .4; cursor: not-allowed; }
.repeat-stepper output { display: inline-grid; place-items: center; min-width: 36px; min-height: 36px; border-radius: 8px; background: var(--metal-gradient); color: var(--gold-on); font-weight: 700; font-variant-numeric: tabular-nums; }
.repeat-stepper small { min-width: 65px; color: var(--ink-soft); font-size: 11px; white-space: nowrap; }
#player-option-status { color: var(--gold-strong); }
#player-retry:not([hidden]) { width: auto; min-width: 44px; padding-inline: 7px; border: 1px solid var(--gold); border-radius: 8px; color: var(--gold-strong); font-size: 11px; }
.player-info { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.player-collapse { position: absolute; top: 7px; inset-inline-end: clamp(8px, 1.6vw, 22px); display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; background: transparent; color: var(--gold-strong); touch-action: manipulation; transition: color var(--motion-fast), opacity var(--motion-fast); }
.player-collapse svg { width: 23px; height: 23px; stroke-width: 2.2; transition: transform var(--motion-fast) var(--ease-luxe); }
.player-collapse:hover, .player-collapse:focus-visible { color: var(--gold); }
.player-collapse:hover svg, .player-collapse:focus-visible svg { transform: translateY(3px); }
.player-collapse:active svg { transform: translateY(5px); }
.player-collapse::after { content: attr(data-tooltip); position: absolute; inset-inline-end: 0; bottom: calc(100% + 9px); width: max-content; max-width: min(82vw, 290px); padding: 9px 13px; border: 1px solid var(--gold); border-radius: 10px; background: var(--surface-background); color: var(--ink); box-shadow: var(--shadow-lift); font-size: 12px; font-weight: 600; line-height: 1.6; text-align: start; white-space: normal; opacity: 0; pointer-events: none; transform: translateY(5px); transition: opacity var(--motion-fast), transform var(--motion-fast) var(--ease-luxe); }
.player-collapse:hover::after, .player-collapse:focus-visible::after { opacity: 1; transform: translateY(0); }
.player-kicker { color: var(--gold-strong); font-size: 10px; font-weight: 700; }
.player-info strong { overflow: hidden; font-family: var(--font-display); font-size: 23px; text-overflow: ellipsis; white-space: nowrap; }
.player-info small { overflow: hidden; color: var(--ink-soft); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.player-controls { display: flex; align-items: center; gap: 12px; }
.player-controls button { display: grid; place-items: center; flex: none; border: 0; }
.player-skip { width: 37px; height: 37px; border-radius: 50%; background: transparent; color: var(--ink); }
.player-skip:hover { background: var(--gold-pale); color: var(--gold-strong); }
.player-skip:disabled { opacity: .35; cursor: not-allowed; }
.player-skip svg { width: 19px; height: 19px; }
.flip-icon { transform: rotate(180deg); }
[dir="ltr"] .player-prev svg { transform: rotate(180deg); }
[dir="ltr"] .player-next .flip-icon { transform: none; }
[dir="ltr"] .hero-action svg, [dir="ltr"] .card-footer svg, [dir="ltr"] .show-more svg { transform: scaleX(-1); }
[dir="ltr"] .reciter-card:hover .card-footer svg, [dir="ltr"] .hero-action:hover svg { transform: scaleX(-1) translateX(-4px); }
.player-toggle { width: 51px; height: 51px; border-radius: 50%; background: var(--metal-gradient); color: var(--gold-on); box-shadow: inset 0 1px rgba(255, 245, 205, .65); }
.player-toggle:hover { filter: brightness(1.15); }
.player-toggle svg { width: 23px; height: 23px; }
.player.is-playing .play-icon, .player:not(.is-playing) .pause-icon { display: none; }
.player-timeline { display: flex; align-items: center; gap: 10px; min-width: 0; padding-inline-end: 48px; color: var(--ink-soft); direction: ltr; font-size: 11px; }
[dir="rtl"] .player-timeline { padding-left: 48px; padding-right: 0; }
[dir="ltr"] .player-timeline { padding-right: 48px; padding-left: 0; }
.player-timeline input { width: 100%; min-width: 60px; accent-color: var(--gold-strong); cursor: pointer; }
.player-timeline span { min-width: 29px; text-align: center; font-variant-numeric: tabular-nums; }
.player-open .page-wrap { padding-bottom: 190px; }
.player-open.player-collapsed .page-wrap { padding-bottom: 104px; }
.player-bubble { position: fixed; z-index: 45; inset-inline-end: clamp(16px, 2.5vw, 34px); bottom: calc(18px + env(safe-area-inset-bottom)); display: grid; place-items: center; width: 76px; height: 76px; padding: 0; border: 1px solid var(--gold); border-radius: 50%; background: radial-gradient(circle at 34% 25%, var(--surface-muted), var(--page) 72%); color: var(--gold-strong); box-shadow: 0 16px 40px rgba(0,0,0,.28), 0 0 0 4px color-mix(in srgb, var(--gold) 12%, transparent), inset 0 1px var(--edge-highlight); isolation: isolate; touch-action: manipulation; transition: transform 220ms var(--ease-luxe), box-shadow 220ms; }
.player-bubble::before { content: ''; position: absolute; inset: 7px; border: 1px solid color-mix(in srgb, var(--gold) 62%, transparent); border-radius: 50%; pointer-events: none; }
.player-bubble:hover { transform: translateY(-4px); box-shadow: 0 20px 45px rgba(0,0,0,.32), 0 0 0 6px color-mix(in srgb, var(--gold) 17%, transparent), inset 0 1px var(--edge-highlight); }
.player-bubble:active { transform: scale(.95); }
.bubble-progress { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); pointer-events: none; }
.bubble-progress circle { fill: none; stroke-width: 2.2; }
.bubble-progress-track { stroke: var(--line); }
.bubble-progress-value { stroke: var(--gold-strong); stroke-dasharray: 100; stroke-dashoffset: 100; stroke-linecap: round; transition: stroke-dashoffset 280ms linear; }
.bubble-medallion { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--card-background); box-shadow: inset 0 0 0 1px var(--gold); }
.bubble-medallion img { display: block; width: 43px; height: 43px; }
.bubble-status { position: absolute; inset-inline-end: 1px; bottom: 1px; display: flex; align-items: center; justify-content: center; gap: 2px; width: 22px; height: 22px; border: 1px solid var(--gold); border-radius: 50%; background: var(--surface); box-shadow: 0 2px 7px rgba(0,0,0,.25); }
.bubble-status i { display: block; width: 2px; height: 3px; border-radius: 2px; background: var(--gold-strong); }
.player-bubble.is-playing .bubble-status i:nth-child(1) { height: 7px; }
.player-bubble.is-playing .bubble-status i:nth-child(2) { height: 11px; }
.player-bubble.is-playing .bubble-status i:nth-child(3) { height: 6px; }
.toast { position: fixed; z-index: 60; inset-inline: 24px; bottom: 115px; width: fit-content; max-width: min(90vw, 420px); margin-inline: auto; padding: 12px 20px; border: 1px solid var(--gold); border-radius: 12px; background: var(--surface-background); color: var(--ink); box-shadow: var(--shadow-lift); text-align: center; }

@media (max-width: 1000px) {
  /* بين ٧٠٠ و١٠٠٠ بكسل كان اسم الموقع يركب على روابط التنقّل: القائمة تُخفى عند ٧٠٠ فقط،
     فيبقى شريطٌ لا يتّسع لما فيه. قيس التداخل: ٢٧− بكسل بالإنجليزية عند ٩٠٠، و٢٠٢− عند ٧١٠،
     و١١− بالعربية عند ٧٦٠ — فالعلة في كلتا اللغتين وأشدّ في الإنجليزية لأن كلماتها أعرض.
     الحلّ: تنزل القائمة سطراً ثانياً بدل أن تُزاحم، ولا يضيع رابط. */
  :root { --header-height: 116px; }
  .site-header { flex-wrap: wrap; row-gap: 6px; padding-bottom: 8px; }
  .header-nav { order: 10; width: 100%; margin-inline-start: 0; justify-content: center; }
  .brand-text small { display: none; }
  .hero-copy { padding-inline-start: 44px; }.hero h1 { font-size: clamp(45px, 6vw, 68px); }
  .hero-emblem { width: min(46vw, 480px); }
  .reciter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .browse-tools { align-items: start; flex-direction: column; }
  .search-field { width: min(100%, 460px); }
  .library-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .shell { width: min(100% - 28px, 1220px); }
  :root { --header-height: 68px; }
  .site-header { min-height: 68px; gap: 8px; padding: 8px 14px; }
  .brand-mark { width: 43px; height: 43px; }.brand-mark img { width: 37px; height: 37px; }
  .brand-text strong { font-size: 20px; }.brand-text small { font-size: 9px; }
  .header-nav { display: none; }.mobile-library-link { display: inline-flex; margin-inline-start: auto; padding: 5px; }.theme-toggle { width: 40px; height: 40px; }
  .language-picker > span { display: none; }.language-picker select { max-width: 100px; }
  .hero { grid-template-columns: 1fr; min-height: 0; margin-top: 15px; }
  .hero-copy { align-self: start; padding: 46px 32px 0; }.hero h1 { margin-top: 19px; font-size: clamp(43px, 9vw, 60px); }
  .hero p { font-size: 15px; line-height: 1.85; }.hero-art { min-height: min(85vw, 345px); align-self: end; }
  .hero-art::before { width: min(88vw, 370px); }
  .hero-emblem { width: min(84vw, 345px); }
  .reciters-section { padding-block: 58px 80px; }.section-heading { align-items: start; flex-direction: column; gap: 8px; }
  .resume-listening { align-items: stretch; flex-direction: column; gap: 18px; padding: 22px; }.resume-listening .hero-action { align-self: start; }
  .reciter-grid, .surah-list { grid-template-columns: 1fr; }.reciter-card a { min-height: 215px; }
  .library-section { padding-top: 52px; }.library-columns { grid-template-columns: 1fr; }.library-items { max-height: 270px; }
  .filter-group { width: 100%; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 3px; scrollbar-width: thin; }.filter-chip { flex: none; }
  .reader-main { padding-top: 20px; }.reader-hero { align-items: start; flex-direction: column; gap: 17px; min-height: 0; padding: 30px; }
  .reader-portrait { width: 105px; height: 105px; font-size: 53px; }.reader-portrait span { width: 60px; height: 60px; }
  .reader-intro h1 { font-size: 43px; }.reader-decoration { width: 275px; top: -60px; inset-inline-end: -74px; opacity: .22; }
  .moshaf-section { padding-top: 43px; }.surah-section { padding-top: 48px; }
  .quran-text-section { padding: 20px; }.quran-verses { padding: 12px; line-height: 2.2; }
  .site-footer { flex-direction: column; gap: 5px; padding-block: 20px 28px; }
  .player-inner { grid-template-columns: 1fr auto; gap: 8px 12px; padding-block: 10px; }
  .player-info strong { font-size: 19px; }.player-controls { gap: 5px; margin-inline-start: 46px; }.player-toggle { width: 44px; height: 44px; }.player-skip { width: 31px; height: 31px; }
  .player-timeline, [dir="rtl"] .player-timeline, [dir="ltr"] .player-timeline { grid-column: 1 / -1; grid-row: 2; padding: 0; }.player-open .page-wrap { padding-bottom: 240px; }
  .player-options { max-height: min(155px, 26dvh); overflow-y: auto; gap: 7px 10px; }
  .player-open .page-wrap { padding-bottom: 270px; }
  .repeat-stepper { max-width: 100%; }
  .player-bubble { width: 68px; height: 68px; }
  .bubble-medallion { width: 43px; height: 43px; }
  .bubble-medallion img { width: 38px; height: 38px; }
}
@media (max-width: 390px) {
  .brand-text small { display: none; }.hero-copy { padding-inline: 26px; }.hero h1 { font-size: 41px; }
  .site-header { flex-wrap: wrap; }.language-picker { order: 5; width: 100%; }.language-picker > span { display: inline; }.language-picker select { flex: 1; max-width: none; }
  .reader-hero { padding: 24px; }.reader-intro h1 { font-size: 36px; }
}
/* Quiet gold feedback, with no layout movement or perpetual loops. (The hero rosette's
   slow turn and the names at its centre are the one deliberate exception, at the owner's request.) */
.hero-action, .reciter-card a, .filter-chip, .moshaf-tab, .surah-row,
.show-more, .theme-toggle, .player-toggle, .player-skip, .retry-button {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  touch-action: manipulation;
  transition: transform var(--motion-fast) var(--ease-luxe), scale var(--motion-fast) var(--ease-luxe), border-color var(--motion-fast), color var(--motion-fast), box-shadow var(--motion-fast);
}
.touch-glow { position: absolute; z-index: 2; display: block; border-radius: 50%; background: radial-gradient(circle, var(--gold-strong), transparent 70%); pointer-events: none; }
.search-field { transition: border-color 220ms, box-shadow 220ms; }
.search-field:focus-within { box-shadow: var(--shadow), 0 0 0 3px color-mix(in srgb, var(--gold) 12%, transparent); }
.search-field > svg { transition: transform 220ms var(--ease-luxe); }
.search-field:focus-within > svg { transform: scale(1.1); }
.reciter-card { transition: transform 260ms var(--ease-luxe), scale var(--motion-fast), box-shadow 260ms, border-color 220ms; }
.reciter-card::after { content: ''; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 30%, color-mix(in srgb, var(--gold-strong) 13%, transparent) 49%, transparent 68%); opacity: 0; pointer-events: none; }
.reciter-avatar::before, .brand-mark img { transition: transform 500ms var(--ease-luxe); }
.hero-action svg { transition: transform 220ms var(--ease-luxe); }
.surah-play { transition: transform 220ms var(--ease-luxe); }
.browse-state[aria-busy='true']::after { content: ''; display: block; width: 88px; height: 2px; margin-top: 12px; background: var(--metal-gradient); transform-origin: right; animation: loading-breath 1.2s ease-in-out infinite alternate; }


/* ── السبحة ───────────────────────────────────────────────────────────
   نفس لوحة الموقع: الفحم والذهب وخط النسخ. الدائرة هي الهدف كله، فكل ما
   حولها أصغر منها وأهدأ. حلقة التقدم conic-gradient لأنها تُرسم بلا عنصر
   إضافي ولا SVG، وتتحرك بقيمة واحدة (--portion) يضبطها جافاسكربت. */
/* ── بطاقة برنامج الأذان ── */
.adhan-section { display: flex; flex-direction: column; gap: 18px; padding-bottom: 64px; }
.adhan-card { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; padding: 22px 24px; border: 1px solid var(--line); border-radius: var(--radius-card); background: var(--surface-background); box-shadow: var(--shadow), inset 0 1px var(--edge-highlight); }
.adhan-mark { display: grid; place-items: center; flex: none; width: 56px; height: 56px; border: 1px solid var(--gold); border-radius: 50%; background: radial-gradient(circle at 34% 25%, var(--gold-pale), var(--surface-muted)); color: var(--gold-strong); }
.adhan-mark svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.adhan-copy { flex: 1 1 260px; min-width: 0; }
.adhan-text { margin: 0; color: var(--ink); font-size: 16px; line-height: 1.7; }
.adhan-meta { margin: 6px 0 0; color: var(--ink-soft); font-size: 12px; font-weight: 600; }
.adhan-button { display: inline-flex; align-items: center; justify-content: center; flex: none; min-height: 48px; padding: 10px 26px; border: 1px solid color-mix(in srgb, var(--gold) 75%, transparent); border-radius: 13px; background: var(--metal-gradient); color: var(--gold-on); box-shadow: 0 8px 22px rgba(92, 56, 15, .24), inset 0 1px rgba(255, 245, 205, .64); font-weight: 700; transition: transform .2s, box-shadow .2s; }
.adhan-note { margin: 0; color: var(--ink-soft); font-size: 12px; line-height: 1.8; }

/* ── كن شريكاً في هذا الخير ── قسمٌ هادئ في آخر الرئيسية لا لافتةٌ تقطع الاستماع: نفس خلفية
   القسم العلوي، وظلّ الزخرفة باهتاً خلفه (ثابتاً — الدوران للزخرفة العلوية وحدها). */
.support-section { padding-bottom: 90px; scroll-margin-top: calc(var(--header-height) + 24px); }
.support-card { position: relative; isolation: isolate; display: flex; flex-direction: column; align-items: center; gap: 14px; overflow: hidden; padding: 40px clamp(20px, 5vw, 64px) 30px; border: 1px solid var(--gold); border-radius: var(--radius-shell); background: var(--hero-background); box-shadow: var(--shadow); text-align: center; }
.support-card::before { content: ''; position: absolute; z-index: -1; top: -42%; left: 50%; width: min(560px, 120%); aspect-ratio: 1; translate: -50% 0; background: url('./assets/rosette.svg') center / contain no-repeat; opacity: .07; pointer-events: none; }
.support-mark { display: grid; place-items: center; width: 56px; height: 56px; border: 1px solid var(--gold); border-radius: 50%; background: radial-gradient(circle at 34% 25%, var(--gold-pale), var(--surface-muted)); color: var(--gold-strong); }
.support-mark svg { width: 26px; height: 26px; }
.support-card h2 { margin: 0; font-family: var(--font-display); font-size: clamp(30px, 3.4vw, 44px); line-height: 1.35; }
.support-text { max-width: 660px; margin: 0; color: var(--ink-soft); font-size: 16px; line-height: 2; }
.support-hadith { max-width: 660px; margin: 8px 0 2px; padding: 14px 6px 10px; border-block: 1px solid color-mix(in srgb, var(--gold) 35%, transparent); }
.support-hadith blockquote { margin: 0; color: var(--gold-strong); font-family: var(--font-display); font-size: clamp(18px, 2vw, 22px); font-weight: 600; line-height: 1.9; }
.support-hadith figcaption { margin-top: 4px; color: var(--ink-soft); font-size: 12px; }
.support-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 6px; }
.support-share { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 10px 22px; border: 1px solid var(--gold); border-radius: 13px; background: var(--card-background); color: var(--gold-strong); font: inherit; font-weight: 700; cursor: pointer; transition: border-color .2s, transform .2s; }
.support-share:hover { border-color: var(--gold-strong); transform: translateY(-2px); }
.support-share svg, .support-give svg { width: 18px; height: 18px; }
/* القلب لا يُدفع جانباً عند التحويم كما يُدفع السهم في أزرار .hero-action الأخرى. */
.hero-action.support-give:hover svg { transform: none; }
.support-status { margin: 0; color: var(--gold-strong); font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
.support-status:empty { display: none; }
.support-note { max-width: 560px; margin: 4px 0 0; color: var(--ink-soft); font-size: 12px; line-height: 1.9; }
/* البصمة طويلة ولا تُقرأ ككلمة: تُكسر أينما اتّفق بدل أن تمدّ الصفحة أفقياً. */
.adhan-hash { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; word-break: break-all; unicode-bidi: plaintext; }

.tasbih-section { display: flex; flex-direction: column; gap: 22px; }
.tasbih-board { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 30px 22px 26px; border: 1px solid var(--line); border-radius: var(--radius-shell); background: var(--card-background); box-shadow: var(--shadow); }
.tasbih-dhikr { margin: 0; max-width: 34ch; color: var(--ink); font-family: var(--font-display); font-size: clamp(21px, 4.6vw, 30px); line-height: 1.75; text-align: center; }
.tasbih-bead { position: relative; display: grid; place-items: center; align-content: center; gap: 2px; width: 172px; height: 172px; padding: 0; border: 0; border-radius: 50%; background: var(--surface); box-shadow: var(--shadow-lift), inset 0 0 0 1px var(--line); cursor: pointer; }
.tasbih-ring { position: absolute; inset: -7px; border-radius: 50%; background: conic-gradient(var(--gold) calc(var(--portion, 0) * 360deg), var(--gold-pale) 0); -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 7px), #000 calc(100% - 6px)); mask: radial-gradient(farthest-side, transparent calc(100% - 7px), #000 calc(100% - 6px)); }
.tasbih-count { color: var(--gold-strong); font-family: var(--font-display); font-size: 52px; line-height: 1; font-variant-numeric: tabular-nums; }
.tasbih-of { color: var(--ink-soft); font-size: 12px; }
.tasbih-bead.is-complete { background: var(--gold-pale); }
.tasbih-bead.is-complete .tasbih-count { color: var(--gold-strong); }
.tasbih-status { min-height: 1.3em; margin: 0; color: var(--gold-strong); font-size: 13px; font-weight: 600; }
.tasbih-targets { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.tasbih-target { min-width: 52px; min-height: 38px; padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink-soft); font: inherit; font-variant-numeric: tabular-nums; cursor: pointer; }
.tasbih-target[aria-pressed='true'] { border-color: var(--gold); background: var(--gold-pale); color: var(--gold-strong); font-weight: 700; }
.tasbih-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 9px; }
.tasbih-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font-family: var(--font-display); font-size: 16px; cursor: pointer; }
.tasbih-chip[aria-pressed='true'] { border-color: var(--gold); background: var(--gold-pale); color: var(--gold-strong); }
.tasbih-chip-count { color: var(--ink-soft); font-family: var(--font-body); font-size: 11px; font-variant-numeric: tabular-nums; }
.tasbih-chip[aria-pressed='true'] .tasbih-chip-count { color: var(--gold-strong); }
.tasbih-reset { min-height: 38px; padding: 6px 15px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--ink-soft); font: inherit; cursor: pointer; }
.tasbih-reset:disabled { opacity: .45; cursor: default; }
@media (max-width: 430px) { .tasbih-bead { width: 148px; height: 148px; } .tasbih-count { font-size: 44px; } }


/* ── تصفّح المصحف ─────────────────────────────────────────────────────
   قائمة آيات تُقرأ لا بطاقات: الآية هي الوحدة، ورقمها في قرصٍ ذهبي على
   حافتها. الآية المتلوّة تُعلَّم بخلفية وحدّ جانبي لا بلونٍ وحده، حتى
   تبقى ظاهرة لمن لا يميّز الألوان. */
.read-main { display: flex; flex-direction: column; gap: 18px; }
.read-controls { display: flex; flex-wrap: wrap; align-items: end; gap: 14px; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius-card); background: var(--surface-background); }
.read-picker { display: flex; flex-direction: column; gap: 5px; min-width: 190px; color: var(--ink-soft); font-size: 12px; }
.read-picker select { min-height: 42px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); font: inherit; font-size: 15px; }
.read-picker select:disabled { opacity: .5; }
.read-now { flex: 1 1 160px; margin: 0; color: var(--gold-strong); font-size: 13px; font-weight: 600; text-align: end; }
/* زرّ الإيقاف عائمٌ أسفل الشاشة لا في رأس القسم: التلاوة تُنزل الصفحة إلى الآية المتلوّة، فكان
   الزر يختفي تحت الشريط العلوي لحظةَ يُحتاج إليه — يعمل ولا يُطال. */
.read-stop { position: fixed; z-index: 40; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); translate: -50% 0; display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 9px 26px; border: 1px solid var(--gold); border-radius: 999px; background: var(--metal-gradient); color: var(--gold-on); box-shadow: var(--shadow-lift); font: inherit; font-size: 16px; font-weight: 700; cursor: pointer; }
.read-stop::before { content: ''; width: 13px; height: 13px; border-radius: 3px; background: currentColor; }
.read-main { padding-bottom: 96px; }
.read-state:empty { display: none; }
/* البسملة عنوانٌ فوق السورة لا آية: بلا رقم ولا زرّ تلاوة، كما في المصحف المطبوع. */
.read-basmala { margin: 2px 0 4px; color: var(--gold-strong); font-family: var(--font-quran); font-size: clamp(28px, 4.6vw, 40px); line-height: 1.9; text-align: center; }
.read-verses { display: flex; flex-direction: column; gap: 9px; margin: 0; padding: 0; list-style: none; counter-reset: none; }
.read-verse-button { display: flex; align-items: flex-start; gap: 14px; width: 100%; padding: 15px 17px; border: 1px solid var(--line); border-inline-start: 3px solid transparent; border-radius: var(--radius-card); background: var(--card-background); color: var(--ink); font: inherit; text-align: start; cursor: pointer; }
.read-verse-number { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--gold-pale); color: var(--gold-strong); font-size: 13px; font-variant-numeric: tabular-nums; font-weight: 700; }
.read-verse-text { font-family: var(--font-quran); font-size: clamp(25px, 4.2vw, 33px); line-height: 2; }
.read-verse.is-reciting .read-verse-button { border-color: var(--gold); border-inline-start-color: var(--gold); background: var(--gold-pale); }
.read-verse.is-reciting .read-verse-number { background: var(--metal-gradient); color: var(--gold-on); }
.read-verses.is-silent .read-verse-button { cursor: default; }
.read-credit { margin: 6px 0 0; color: var(--ink-soft); font-size: 12px; line-height: 1.8; text-align: center; }

@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  .site-header { view-transition-name: site-header; }
  ::view-transition { pointer-events: none; }
  ::view-transition-old(root) { animation: page-depart 180ms ease-in both; }
  ::view-transition-new(root) { animation: page-arrive var(--motion-page) var(--ease-luxe) both; }
  ::view-transition-group(site-header) { animation-duration: var(--motion-page); animation-timing-function: var(--ease-luxe); }
  .hero-action:active, .filter-chip:active, .moshaf-tab:active, .show-more:active,
  .theme-toggle:active, .player-toggle:active, .player-skip:active:not(:disabled), .retry-button:active { scale: .96; }
  .reciter-card:active, .surah-row:active { scale: .988; }
  .theme-toggle svg { animation: icon-arrive 240ms var(--ease-luxe); }
  .tasbih-bead, .tasbih-ring, .tasbih-chip, .tasbih-target { transition: background-color .25s ease, color .25s ease, border-color .25s ease; }
  .tasbih-ring { transition: background .3s var(--ease-luxe); }
  .tasbih-bead:active { scale: .965; }
  .read-verse-button { transition: background-color .25s ease, border-color .25s ease; }
  .read-verse-button:active { scale: .995; }
  /* A theme switch recolours the page in place, so it must not borrow page-arrive: that
     slides upward, which is right after a navigation and wrong when the reader has not
     moved. Both snapshots cross-fade over a slower beat than a page change. */
  html[data-theme-switch]::view-transition-old(root) { animation: theme-dissolve var(--motion-theme) var(--ease-luxe) reverse both; }
  html[data-theme-switch]::view-transition-new(root) { animation: theme-dissolve var(--motion-theme) var(--ease-luxe) both; }
  html[data-theme-switch]::view-transition-group(site-header) { animation-duration: var(--motion-theme); }
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .reciter-card:hover::after { animation: gold-sweep 650ms var(--ease-luxe); }
  .reciter-card:hover .reciter-avatar::before, .brand:hover .brand-mark img { transform: rotate(15deg); }
  .hero-action:hover svg { transform: translateX(-4px); }
  .surah-row:hover .surah-play { transform: scale(1.08); }
}
@keyframes page-depart { to { opacity: 0; } }
@keyframes theme-dissolve { from { opacity: 0; } to { opacity: 1; } }
@keyframes page-arrive { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes gold-sweep { 0% { opacity: 0; transform: translateX(100%); } 20% { opacity: 1; } 100% { opacity: 0; transform: translateX(-100%); } }
@keyframes icon-arrive { from { opacity: .3; transform: rotate(-35deg) scale(.8); } to { opacity: 1; transform: rotate(0) scale(1); } }
@keyframes loading-breath { from { opacity: .35; transform: scaleX(.35); } to { opacity: 1; transform: scaleX(1); } }
@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reciter-card:hover, .reciter-card:focus-within, .surah-row:hover, .hero-action:hover,
  .theme-toggle:hover, .reciter-card:hover .card-footer svg, .search-field:focus-within > svg { transform: none; }
}
