/* THE QURAN READER (2026-11-09): the estate's black and gold, the Duas page's ayah card (aya-card, aya-num, aya-ar, aya-en, aya-tr,
   m-num) in the same voice, KFGQPC Uthmanic Hafs for every Qur'anic letter (the font law), the shared reading chips (rchip). */
:root { --bg: #0a0a0a; --card: #111111; --gold: #c9a84c; --gold-bright: #f0c040; --gold-dim: #8a7a50; --gold-border: #2a2416; --line: #3a3020; --font-body: Inter, system-ui, -apple-system, sans-serif; --qfs: 1.75rem; }
@font-face { font-family: 'UthmanicHafs'; src: url('/fonts/UthmanicHafs.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'Inter'; src: url('/fonts/Inter-Regular.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('/fonts/Inter-SemiBold.woff2') format('woff2'); font-weight: 600; font-display: swap; }
html, body { touch-action: manipulation; }   /* pinch zoom allowed, a double tap never zooms (owner, 2026-11-20) */
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--gold); font-family: var(--font-body); -webkit-text-size-adjust: 100%; }
.q-main { max-width: 880px; margin: 0 auto; padding: 14px 16px 60px; min-height: 100vh; min-height: 100dvh; }
.q-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; max-width: 720px; margin: 6px auto 14px; } /* two rows of five (owner, 2026-11-10) */
.q-tile { background: var(--card); border: 1px solid var(--gold-border); border-radius: 12px; padding: 10px 6px 8px; text-align: center; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.q-tv { font-family: Georgia, 'Times New Roman', serif; font-size: 1.05rem; color: var(--gold-bright); font-variant-numeric: tabular-nums; white-space: nowrap; }
.q-tl { font-size: .56rem; letter-spacing: .12em; text-transform: uppercase; color: var(--gold-dim); }
.q-stat-line { grid-column: 1 / -1; text-align: center; font-size: .76rem; color: var(--gold-dim); margin: 0; }
.q-stat-line b { color: var(--gold-bright); }
@media (max-width: 400px) { .q-stats { gap: 5px; } .q-tile { padding: 8px 3px 6px; border-radius: 9px; } .q-tv { font-size: .86rem; } .q-tl { font-size: .44rem; letter-spacing: .06em; } }
@media (max-width: 360px) { .q-tv { font-size: .78rem; } .q-tl { font-size: .4rem; } }
.q-eyebrow { text-align: center; font-family: Georgia, 'Times New Roman', serif; font-size: .62rem; letter-spacing: .22em; text-transform: uppercase; color: var(--gold-dim); margin: 8px 0 12px; }

/* THE HEADER, THE DUAS PAGE'S OWN BLOCK (owner's screenshot, 2026-11-09, "look how ugly you made the header and it doesn't even stick"):
   the frame master (header.css) sets the bar, the hairline, the wordmark and the title voice, and leaves to each page what the Duas page
   keeps in its own stylesheet: the sticky position, the inner row as a flex line, the title in the flow between two equal sides. */
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(10,10,10,0.96); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border-bottom: 1px solid var(--gold-border); padding-top: env(safe-area-inset-top); }
.header-inner { max-width: 720px; margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; gap: 10px; position: relative; }
.header-brand { display: flex; align-items: center; gap: 0.4rem; color: var(--gold-dim); text-decoration: none; flex-shrink: 0; -webkit-tap-highlight-color: transparent; transition: color .2s ease; }
.header-brand:hover, .header-brand:active { color: var(--gold-bright); }
.header-brand svg { flex-shrink: 0; display: block; }
.header-side { flex: 1 1 0; min-width: 0; display: flex; align-items: center; }
.header-right { justify-content: flex-end; gap: 8px; }
.logo { display: flex; flex-direction: column; align-items: center; line-height: 1; user-select: none; }
.logo-top, .logo-bottom { font-family: Georgia, serif; font-weight: bold; font-size: 0.58rem; letter-spacing: 0.2em; color: #c9a84c; display: block; }
.logo-line { width: 100%; height: 1px; background: #7a6a30; opacity: 0.7; margin: 2px 0; display: block; border: none; }
.header-title { flex: 0 0 auto; margin: 0; font-weight: 400; text-align: center; font-family: Georgia, 'Times New Roman', serif; font-size: 1.05rem; color: var(--gold-bright); letter-spacing: 0.08em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.read-pct { font-size: 0.72rem; color: var(--gold-dim); font-variant-numeric: tabular-nums; letter-spacing: 0.04em; min-width: 36px; text-align: right; white-space: nowrap; }
@media (max-width: 359px) { .read-pct .q-pg { display: none; } } /* the page steps aside on the narrowest phones; the percentage stays */
/* the shared chips */
.rchip { font-family: inherit; font-size: .72rem; letter-spacing: .03em; color: var(--gold); background: transparent; border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; cursor: pointer; position: relative; -webkit-tap-highlight-color: transparent; }
.rchip::after { content: ''; position: absolute; left: 0; right: 0; top: -5px; bottom: -5px; }
.rchip.on { background: var(--gold); border-color: var(--gold); color: #0a0a00; font-weight: 600; }
.rchip:disabled { opacity: .35; cursor: default; }
.rchip.fs-chip { padding: 3px 12px; min-width: 40px; }
.q-nav, .q-chips, .q-size, .q-prevnext { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0 0 12px; }
/* the follow-along pill lives in the chip row (owner, 2026-11-10: nothing stands alone); the surah page's search box sits above the chips */
.q-play.on { background: var(--gold-bright); border-color: var(--gold-bright); color: #0a0a00; font-weight: 600; }
.q-continue { text-align: center; margin: 0 0 14px; }
.q-hint { text-align: center; font-size: .74rem; color: var(--gold-dim); margin: -6px 0 14px; }
.q-bm { color: var(--gold); }
.q-last { text-align: center; font-size: .78rem; color: var(--gold-dim); margin: -4px 0 12px; }
.q-last.nudge { color: #c48a2a; } /* amber, never red */

/* the list: one row per surah, number, names, the Arabic name on the right */
.q-grid { display: grid; grid-template-columns: 1fr; gap: 8px; }
@media (min-width: 700px) { .q-grid { grid-template-columns: 1fr 1fr; } }
.q-card { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 12px; width: 100%; text-align: left; background: var(--card); border: 1px solid var(--gold-border); border-radius: 12px; padding: 12px 14px; color: var(--gold); font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.q-card.here { border-color: var(--gold); }
.q-card.done .q-en::after { content: ' \2713'; color: var(--gold-bright); }
.q-n { font-family: Georgia, 'Times New Roman', serif; font-size: .9rem; color: var(--gold-dim); font-variant-numeric: tabular-nums; text-align: center; }
.q-names { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.q-en { font-family: Georgia, 'Times New Roman', serif; font-size: 1rem; color: var(--gold-bright); }
.q-meta { font-size: .66rem; color: var(--gold-dim); letter-spacing: .04em; }
.q-ar { font-family: 'UthmanicHafs', 'Amiri', serif; font-size: 1.35rem; color: var(--gold); direction: rtl; white-space: nowrap; }

/* the reader */
/* the surah head (owner, 2026-11-10): the name centred on its own line, the neighbours beneath; no gap beside the name any more */
.q-readhead { display: flex; flex-direction: column; align-items: center; gap: 10px; margin: 4px 0 12px; }
.q-surahname { display: flex; flex-direction: column; align-items: center; text-align: center; }
.q-headnav { display: flex; justify-content: center; align-items: center; gap: 8px; flex-wrap: wrap; }
.q-headnav .rchip { max-width: 42vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.q-sn-ar { font-family: 'UthmanicHafs', 'Amiri', serif; font-size: 1.5rem; color: var(--gold-bright); direction: rtl; }
.q-sn-en { font-family: Georgia, 'Times New Roman', serif; font-size: .92rem; color: var(--gold); }
.q-sn-meta { font-size: .62rem; color: var(--gold-dim); letter-spacing: .06em; }
.q-bism { font-family: 'UthmanicHafs', 'Amiri', serif; font-size: calc(var(--qfs) * .95); color: var(--gold-bright); text-align: center; direction: rtl; margin: 6px 0 16px; }
.q-ayat { display: flex; flex-direction: column; gap: 10px; }
.aya-card { background: var(--card); border: 1px solid var(--gold-border); border-radius: 12px; padding: 16px 16px 14px; position: relative; }
.aya-card.has-mark { border-color: var(--gold); }
.aya-card.read .aya-num { color: var(--gold); border-color: var(--line); } /* an ayah already read: its number in the fuller gold (owner, 2026-11-10) */
.aya-num { position: absolute; top: 12px; left: 14px; font-size: .68rem; color: var(--gold-dim); font-variant-numeric: tabular-nums; border: 1px solid var(--gold-border); border-radius: 999px; padding: 2px 8px; }
.aya-ribbon { position: absolute; top: 10px; left: 72px; width: 28px; height: 24px; display: flex; align-items: center; justify-content: center; background: transparent; border: 0; color: var(--gold-dim); opacity: .55; cursor: pointer; padding: 0; }
.aya-card.has-mark .aya-ribbon { color: var(--gold-bright); opacity: 1; }
/* the speaker beside the ribbon (owner go, 2026-11-10, row 2): dim until it sounds, the card lit while it does */
.aya-play { position: absolute; top: 10px; left: 102px; width: 28px; height: 24px; display: flex; align-items: center; justify-content: center; background: transparent; border: 0; color: var(--gold-dim); opacity: .7; cursor: pointer; padding: 0; -webkit-tap-highlight-color: transparent; }
.aya-play::after { content: ''; position: absolute; left: -6px; right: -6px; top: -8px; bottom: -8px; }
.aya-card.sounding { border-color: var(--gold-bright); }
.aya-card.sounding .aya-play { color: var(--gold-bright); opacity: 1; }
.q-note { text-align: center; font-size: .74rem; color: var(--gold-dim); margin: -4px 0 10px; }
/* the search box (owner go, 2026-11-10, row 7): the rchip's voice, a little taller, the reader's own typing stays in it */
.q-search { display: flex; justify-content: center; margin: 4px 0 14px; } /* first on the list page (owner, 2026-11-10) */
.q-search input { width: 100%; max-width: 420px; font: inherit; font-size: .84rem; color: var(--gold-bright); background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 9px 16px; outline: none; -webkit-appearance: none; appearance: none; text-align: center; }
.q-search input:focus { border-color: var(--gold); }
.q-search input::placeholder { color: var(--gold-dim); opacity: 1; }
.q-none { text-align: center; font-size: .78rem; color: var(--gold-dim); margin: 6px 0 14px; }

.aya-ar { font-family: 'UthmanicHafs', 'Amiri', 'Traditional Arabic', serif; font-size: var(--qfs); line-height: 2.25; color: var(--gold-bright); text-align: right; direction: rtl; margin: 4px 0 10px; padding-left: 44px; }
.m-num { font-size: .62em; color: var(--gold); margin: 0 5px; white-space: nowrap; }
.aya-tr { direction: ltr; text-align: left; unicode-bidi: isolate; font-family: var(--font-body); font-style: italic; color: var(--gold-dim); line-height: 1.6; font-size: calc(0.48rem + 0.2 * var(--qfs)); margin: 6px 0 4px; }
.aya-tr u { text-decoration: underline; text-underline-offset: 2px; } .aya-tr b { font-weight: 700; } .aya-tr i { font-style: normal; font-weight: 600; letter-spacing: .02em; }
.aya-en { font-size: calc(0.5rem + 0.2 * var(--qfs)); line-height: 1.65; color: var(--gold); margin: 0; }
.aya-page { display: flex; align-items: center; gap: 10px; margin: 4px 0 -2px; font-family: Georgia, 'Times New Roman', serif; font-size: .62rem; letter-spacing: .18em; text-transform: uppercase; color: var(--gold-dim); } /* a mushaf page begins here (owner go, 2026-11-10, row 9) */
.aya-page::before, .aya-page::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.aya-sajdah { position: absolute; top: 12px; right: 14px; font-size: .62rem; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); border: 1px solid var(--gold-border); border-radius: 999px; padding: 2px 8px; } /* a sajdah of recitation (owner go, 2026-11-10, row 4): the word beside the mushaf's own ۩, never a ruling, never a second sign */
.aya-card.sajdah .aya-ar { padding-right: 86px; }
/* THE TAFSIR CHIP (owner, 2026-11-11): the tafsir paragraph under the English, a hairline above it, the English's own size a step quieter,
   drawn only while the chip is on (.taf-on); it stands in every reading mode */
.aya-taf { display: none; }
.q-read.taf-on .aya-taf { display: block; }
.aya-taf { font-size: calc(0.46rem + 0.2 * var(--qfs)); line-height: 1.65; color: var(--gold-dim); margin: 10px 0 0; padding-top: 10px; border-top: 1px solid var(--gold-border); }
.aya-taf::before { content: 'Tafsir'; display: block; font-family: Georgia, 'Times New Roman', serif; font-size: .58rem; letter-spacing: .18em; text-transform: uppercase; color: var(--gold-dim); margin-bottom: 4px; }

/* the three modes: Arabic · English (the transliteration hidden), Arabic alone, Transliteration (Arabic, transliteration and English) */
.mode-all .aya-tr { display: none; }
.mode-ar .aya-tr, .mode-ar .aya-en { display: none; }
.q-foot { margin: 22px 0 0; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.q-done.on { background: #2f9e5f; border-color: #2f9e5f; color: #fff; }
.q-about { max-width: 620px; margin: 34px auto 0; text-align: center; }
#q-list[hidden] ~ .q-about { display: none; } /* the words belong to the list page; a surah or a memorisation session stands alone (seen in the session render, 2026-11-10) */
.q-h2 { font-family: Georgia, 'Times New Roman', serif; font-weight: 400; font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; color: var(--gold-dim); margin: 18px 0 8px; }
.q-p { font-size: .82rem; color: var(--gold); line-height: 1.7; margin: 0 0 6px; }
.q-link { color: var(--gold-bright); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line); } /* an internal link in the words (the info pages' gold-link rule, 2026-10-10) */
.q-source { text-align: center; font-size: .66rem; color: var(--gold-dim); line-height: 1.6; margin: 34px auto 0; max-width: 620px; }
.q-err { text-align: center; color: var(--gold-dim); font-size: .8rem; }
@media (max-width: 400px) { .q-card { padding: 10px 12px; gap: 10px; } .q-ar { font-size: 1.2rem; } .aya-card { padding: 14px 12px 12px; } .aya-ar { padding-left: 40px; } }
