/* Saleha Bibi Foundation website. Light parchment by default (matching the surah thumbnails),
   with an optional dark theme in the deep green and gold of the Foundation's own recitation
   artwork. The logo's blue is the single accent in light. */

:root {
  --bg: #f6f1e7;
  --surface: #fffdf8;
  --surface-2: #efe7d6;
  --ink: #2a251e;
  --ink-2: #4f4639;
  --muted: #7a6f5e;
  --line: #e2d7c1;
  --gold: #9c7834;
  --gold-soft: rgba(156, 120, 52, 0.2);
  --accent: #1544d6;
  --accent-ink: #ffffff;
  --accent-soft: rgba(21, 68, 214, 0.08);
  --shadow: 0 1px 2px rgba(60, 45, 20, 0.05), 0 8px 24px rgba(60, 45, 20, 0.06);
  --band-hero: #e9dcc1;
  --band-alt: #efe7d7;
  --band-memorial: #1d3b2f;
  --memorial-ink: #e6dec8;
  --memorial-gold: #d8b66e;
  --radius: 14px;
  --radius-sm: 9px;
  --font-body: "Source Sans 3", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-head: "Literata", Georgia, "Times New Roman", serif;
  --font-ar: "Amiri Quran", "Amiri", "Scheherazade New", "Traditional Arabic", serif;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #0e1713;
  --surface: #14211b;
  --surface-2: #1b2b24;
  --ink: #efe7d3;
  --ink-2: #cfc6af;
  --muted: #a1a08a;
  --line: #273830;
  --gold: #d6b46c;
  --gold-soft: rgba(214, 180, 108, 0.2);
  --accent: #dcbc75;
  --accent-ink: #18130a;
  --accent-soft: rgba(220, 188, 117, 0.12);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25);
  --band-hero: #152820;
  --band-alt: #111e18;
  --band-memorial: #1b3a2c;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--font-body);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 0.18em; }
h1, h2, h3 { font-family: var(--font-head); font-weight: 600; line-height: 1.2; margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }
/* reveal on time (see render.ts): scheduled items wait for their date; notices go when it arrives */
[data-release]:not(.released), [data-until].expired, [data-limit] > [data-over] { display: none !important; }
.chip-group { display: contents; }
.dot-item + .dot-item::before { content: " · "; }
.prerelease {
  display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; text-align: center;
  max-width: 900px; margin: 0 auto 14px; padding: 18px 20px; border-radius: var(--radius);
  border: 1px dashed var(--gold); background: var(--surface); color: var(--ink-2);
}
.prerelease strong { color: var(--ink); }
.prerelease-star { width: 20px; height: 20px; flex: none; background: var(--gold); -webkit-mask: url(/assets/star.svg) center / contain no-repeat; mask: url(/assets/star.svg) center / contain no-repeat; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 14px; z-index: 50; border-radius: 8px; }
.skip:focus { left: 8px; }
.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 28px; } }
.muted { color: var(--muted); font-weight: 400; }
.arabic { font-family: var(--font-ar); font-weight: 400; }

/* ---------------------------------------------------------------- header */
.site-header {
  position: sticky; top: 0; z-index: 30;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 12px; min-height: 66px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; flex: none; }
.brand-mark { width: 40px; height: 40px; border-radius: 10px; background: #fff; border: 1px solid var(--line); padding: 2px; }
.brand-word { height: 34px; width: auto; }
/* Dark theme: black letters become light; the 180deg hue turn keeps the blue rules blue. */
[data-theme="dark"] .brand-word { filter: invert(1) hue-rotate(180deg) brightness(0.95); }
@media (max-width: 400px) { .brand-word { height: 30px; } }
.header-actions { display: flex; gap: 4px; margin-left: auto; }
.icon-btn {
  width: 42px; height: 42px; display: grid; place-items: center;
  border: 1px solid transparent; border-radius: 10px; background: transparent; color: var(--ink-2); cursor: pointer;
}
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.icon-btn svg { width: 21px; height: 21px; }
.theme-toggle .i-sun { display: none; }
.theme-toggle[aria-pressed="true"] .i-sun { display: block; }
.theme-toggle[aria-pressed="true"] .i-moon { display: none; }

/* menu items: <details class="mega"> + a plain About link */
.site-nav { display: flex; align-items: center; gap: 2px; margin-left: 18px; }
.mega > summary, .nav-link {
  display: flex; align-items: center; gap: 4px;
  padding: 9px 12px; border-radius: 10px;
  color: var(--ink-2); font-weight: 600; font-size: 0.98rem; text-decoration: none;
  cursor: pointer; list-style: none; user-select: none;
}
.mega > summary::-webkit-details-marker { display: none; }
.mega > summary:hover, .nav-link:hover, .mega[open] > summary { background: var(--surface-2); color: var(--ink); }
.mega[data-current] > summary, .nav-link[aria-current] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--gold); border-radius: 10px 10px 2px 2px; }
.chev { width: 16px; height: 16px; transition: transform 0.2s ease; }
.mega[open] .chev { transform: rotate(180deg); }

.mega-panel { display: grid; gap: 28px; }
.mega-head { font-family: var(--font-head); font-weight: 600; font-size: 1.05rem; color: var(--ink); }
.mega-note { color: var(--muted); font-size: 0.92rem; margin-top: 2px; }
.mega-links { list-style: none; margin: 10px 0 0; padding: 0; }
.mega-links a { display: block; padding: 6px 0; color: var(--ink); text-decoration: none; font-weight: 600; }
.mega-links a span { color: var(--muted); font-weight: 400; margin-left: 4px; }
.mega-links a:hover { color: var(--accent); }
.mega-links-stacked a span { display: block; margin: 0; font-size: 0.88rem; }
.mega-all { display: inline-block; margin-top: 10px; font-weight: 600; font-size: 0.95rem; }
.soon { display: inline-block; margin-top: 14px; padding: 4px 12px; border-radius: 999px; background: var(--gold-soft); color: var(--ink); font-size: 0.88rem; font-weight: 600; }

@media (min-width: 900px) {
  .mega-panel {
    position: absolute; left: 0; right: 0; top: 100%;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding: 26px max(28px, calc((100vw - 1080px) / 2 + 28px)) 30px;
    background: var(--surface); border-bottom: 1px solid var(--line);
    box-shadow: 0 18px 40px rgba(40, 30, 10, 0.12);
  }
  .mega-col-wide { grid-column: span 2; }
  .mega-panel-narrow { grid-template-columns: minmax(0, 560px); }
  .mega-panel .mega-links { columns: 1; }
}

/* phones + small tablets: the menu is a drawer under the header */
@media (max-width: 899px) {
  .js .site-nav { display: none; }
  .js .nav-open .site-nav { display: flex; }
  .site-nav {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0; margin: 0;
    max-height: calc(100vh - 66px); overflow-y: auto;
    padding: 8px 16px 20px; background: var(--surface); border-bottom: 1px solid var(--line);
    box-shadow: 0 18px 40px rgba(40, 30, 10, 0.14);
  }
  html:not(.js) .site-nav { position: static; box-shadow: none; }
  .mega { border-bottom: 1px solid var(--line); }
  .mega > summary, .nav-link { justify-content: space-between; padding: 14px 4px; font-size: 1.05rem; border-radius: 0; }
  .mega > summary:hover, .mega[open] > summary { background: transparent; }
  .mega[data-current] > summary, .nav-link[aria-current] { box-shadow: none; color: var(--accent); }
  .mega-panel { padding: 0 4px 18px; gap: 18px; }
  .menu-toggle { display: grid; }
}
@media (min-width: 900px) { .menu-toggle { display: none !important; } }

/* ---------------------------------------------------------------- buttons + chips */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 18px;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); color: var(--ink);
  font: 600 0.98rem/1 var(--font-body); text-decoration: none; cursor: pointer;
}
.btn:hover { border-color: var(--gold); }
.btn svg { width: 16px; height: 16px; fill: currentColor; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-play { min-height: 38px; padding: 8px 14px; font-size: 0.92rem; background: var(--accent-soft); border-color: transparent; color: var(--accent); }
.btn-play:hover { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

.chips { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.chips-left { justify-content: flex-start; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 7px 14px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
  color: var(--ink); font-weight: 600; font-size: 0.93rem; text-decoration: none;
}
.chip span { color: var(--muted); font-weight: 600; font-size: 0.82rem; }
.chip:hover { border-color: var(--gold); }
.chip[aria-current] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.chip[aria-current] span { color: inherit; opacity: 0.7; }
.chip-quiet { background: transparent; border-style: dashed; }

/* ---------------------------------------------------------------- home: welcome + paths */

.welcome-inner { display: grid; gap: 24px; align-items: center; }
.dedication { font-family: var(--font-head); font-style: italic; color: var(--gold); font-size: 1.05rem; }
.welcome h1 { font-size: clamp(2rem, 5.5vw, 3rem); margin-top: 8px; max-width: 18ch; }
.paths { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 0; }
.path { padding: 22px 0; border-top: 1px solid var(--line); }
.path:last-child { border-bottom: 1px solid var(--line); }
.path-title { display: inline-flex; align-items: baseline; gap: 12px; font-family: var(--font-head); font-weight: 600; font-size: 1.45rem; color: var(--ink); text-decoration: none; }
a.path-title:hover { color: var(--accent); }
.path-num { font-family: var(--font-body); font-size: 0.85rem; font-weight: 700; color: var(--gold); min-width: 1ch; }
.path-text { color: var(--ink-2); margin: 4px 0 0 calc(1ch + 12px + 0.2rem); }
.path .chips { margin-left: calc(1ch + 12px + 0.2rem); }
.welcome-art { display: none; }
.welcome-art img { width: 70%; mix-blend-mode: multiply; }
@media (min-width: 900px) {
  .welcome-inner { grid-template-columns: minmax(0, 1fr) 300px; gap: 56px; }
  .welcome-art {
    display: grid; place-items: center; width: 300px; height: 300px; align-self: start; margin-top: 46px;
    border-radius: 50%; background: #f7f1e4; overflow: hidden; isolation: isolate;
    box-shadow: 0 0 0 1px var(--gold-soft), 0 0 0 12px var(--band-hero), 0 0 0 13px var(--gold-soft);
  }

}

/* ---------------------------------------------------------------- page heads + blocks */
.page-head { padding-top: 6px; }
.page-head h1 { font-size: clamp(1.9rem, 5vw, 2.6rem); }
.lead { color: var(--ink-2); font-size: 1.12rem; margin-top: 12px; max-width: 640px; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 24px; }
.jump { margin-top: 18px; }

.block { margin-top: 48px; }
.block-tight { margin-top: 20px; }
.block-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.section-title { font-size: 1.45rem; }
.section-title .muted { font-family: var(--font-body); font-size: 1rem; margin-left: 6px; }
.section-intro { color: var(--ink-2); margin: 6px 0 16px; max-width: 680px; }
.more { font-weight: 600; }

/* ---------------------------------------------------------------- video cards */
.vgrid { display: grid; gap: 22px 18px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.vcard { display: flex; flex-direction: column; gap: 4px; color: var(--ink); text-decoration: none; min-width: 0; }
.vcard-thumb { position: relative; display: block; border-radius: var(--radius-sm); overflow: hidden; background: var(--surface-2); aspect-ratio: 16 / 9; }
.vcard-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
a.vcard:hover .vcard-thumb img { transform: scale(1.03); }
a.vcard:hover .vcard-title { color: var(--accent); }
.vcard-time { position: absolute; right: 8px; bottom: 8px; background: rgba(20, 16, 10, 0.78); color: #fff; font-size: 0.78rem; font-weight: 600; padding: 2px 7px; border-radius: 6px; }
.vcard-title { font-weight: 600; margin-top: 6px; line-height: 1.3; }
.vcard-meta { color: var(--muted); font-size: 0.9rem; }
.vcard-static .player { margin: 0; }

/* ---------------------------------------------------------------- player */
.player { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: #000; margin: 22px 0 10px; box-shadow: var(--shadow); }
.player-vertical { aspect-ratio: 9 / 16; max-width: 340px; margin-left: auto; margin-right: auto; }
.player-link { position: absolute; inset: 0; display: block; }
.player img { width: 100%; height: 100%; object-fit: cover; }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.play-btn {
  position: absolute; left: 50%; top: 50%; width: 66px; height: 66px; margin: -33px 0 0 -33px;
  border-radius: 50%; background: var(--accent); display: grid; place-items: center;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35); transition: transform 0.2s ease;
}
.play-btn svg { width: 28px; height: 28px; fill: var(--accent-ink); margin-left: 4px; }
.player-link:hover .play-btn { transform: scale(1.07); }
.vcard-static .play-btn { width: 50px; height: 50px; margin: -25px 0 0 -25px; }
.vcard-static .play-btn svg { width: 21px; height: 21px; }
.credit { color: var(--muted); font-size: 0.92rem; }
.credit a { white-space: nowrap; }
.credit svg { width: 13px; height: 13px; vertical-align: -1px; }

/* ---------------------------------------------------------------- lists */
.list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.list li + li { border-top: 1px solid var(--line); }
.list-row { display: flex; align-items: center; gap: 14px; padding: 12px 16px; color: var(--ink); text-decoration: none; min-height: 60px; }
.list-row:hover { background: var(--surface-2); }
.list-num {
  flex: none; width: 38px; height: 38px; display: grid; place-items: center;
  border: 1px solid var(--gold-soft); color: var(--gold); border-radius: 50%;
  font-weight: 700; font-size: 0.85rem; font-variant-numeric: tabular-nums;
}
.list-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.list-title { font-weight: 600; }
.list-sub { color: var(--muted); font-size: 0.9rem; }
.list-side { color: var(--muted); font-size: 0.9rem; font-variant-numeric: tabular-nums; }
.list-ar { font-size: 1.5rem; line-height: 1.4; color: var(--ink-2); flex: none; }
@media (min-width: 760px) {
  .surah-list { display: grid; grid-template-columns: 1fr 1fr; }
  .surah-list li + li { border-top: 0; }
  .surah-list li { border-bottom: 1px solid var(--line); }
  .surah-list li:nth-child(odd) { border-right: 1px solid var(--line); }
}

.search { position: relative; display: block; max-width: 460px; margin: 18px 0 16px; }
.search svg { position: absolute; left: 14px; top: 50%; width: 18px; height: 22px; margin-top: -9px; color: var(--muted); }
.search input {
  width: 100%; min-height: 46px; padding: 10px 14px 10px 42px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink);
  font: inherit;
}
.search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.empty { color: var(--muted); padding: 16px 0; }

/* ---------------------------------------------------------------- surah page */
.crumbs { font-size: 0.9rem; color: var(--muted); margin-bottom: 6px; }
.crumbs a { color: var(--muted); }
.surah-head { text-align: center; padding: 6px 0 0; }
.surah-star { display: block; width: 40px; height: 40px; margin: 6px auto 12px; background: var(--gold); -webkit-mask: url(/assets/star.svg) center / contain no-repeat; mask: url(/assets/star.svg) center / contain no-repeat; }
.surah-ar { font-size: clamp(2.6rem, 9vw, 3.6rem); line-height: 1.5; color: var(--gold); }
.surah-head h1 { font-size: clamp(1.7rem, 5vw, 2.3rem); }
.surah-meta { color: var(--muted); margin-top: 6px; }
.watch .player { max-width: 900px; margin: 0 auto 12px; }
.watch .player-vertical { max-width: 340px; }
.watch .credit { text-align: center; }

.reading { margin-top: 0; }
.reading .section-title { text-align: center; margin-bottom: 8px; }
.verses { list-style: none; margin: 0 auto; padding: 0; max-width: 860px; }
.verse { padding: 22px 0; border-bottom: 1px solid var(--line); display: grid; gap: 10px; }
.verse-num {
  justify-self: start; min-width: 30px; height: 30px; padding: 0 8px; border-radius: 999px;
  display: inline-grid; place-items: center; font-size: 0.8rem; font-weight: 700;
  color: var(--gold); border: 1px solid var(--gold-soft); background: var(--surface);
}
.verse-ar { font-size: clamp(1.6rem, 4.6vw, 2.05rem); line-height: 2.25; text-align: right; color: var(--ink); }
.verse-en { color: var(--ink-2); max-width: 70ch; }

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 34px auto 0; max-width: 860px; }
.pager-link { display: flex; flex-direction: column; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); text-decoration: none; font-weight: 600; min-width: 0; }
.pager-link span { color: var(--muted); font-size: 0.82rem; font-weight: 600; }
.pager-link:hover { border-color: var(--gold); }
.pager-next { text-align: right; }

.versions { margin-top: 30px; text-align: center; }

/* ---------------------------------------------------------------- duas */
.dua-tools { margin-top: 20px; }
.dua-tools .search { margin-top: 14px; }
.dua-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.dua {
  display: flex; flex-direction: column; gap: 12px; padding: 20px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); min-width: 0;
}
.dua:target { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.dua-name { font-size: 1.08rem; }
.dua-ar { font-size: 1.6rem; line-height: 2.1; text-align: right; }
.dua-en { color: var(--ink-2); flex: 1; }
.dua-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 12px; border-top: 1px solid var(--line); }
.dua-ref { color: var(--muted); font-size: 0.88rem; font-weight: 600; display: flex; flex-direction: column; }
.dua-topic { font-weight: 400; }

/* ---------------------------------------------------------------- memorial + prose */
.memorial-dua { font-family: var(--font-head); font-style: italic; color: var(--gold); margin-top: 8px; }
.prose { max-width: 720px; }
.prose h2 { font-size: 1.35rem; margin: 30px 0 10px; }
.prose h2:first-child { margin-top: 0; }
.prose p + p { margin-top: 12px; }
.about-grid { display: grid; gap: 28px; align-items: start; }
.about-logo { width: 220px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); }
@media (min-width: 760px) {
  .about-grid { grid-template-columns: 220px minmax(0, 1fr); gap: 48px; }
  .prose-cols { max-width: none; display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
}

/* ---------------------------------------------------------------- bands + geometric ornament */
.band { position: relative; background: var(--band-bg); padding: 64px 0; --band-bg: var(--bg); }
.band-plain { --band-bg: var(--bg); }
.band-alt { --band-bg: var(--band-alt); }
.band-plain, .band-alt { box-shadow: inset 0 1px 0 var(--line); }
.band > .wrap { position: relative; z-index: 1; }
.band-hero { --band-bg: var(--band-hero); padding: 30px 0 54px; z-index: 2; }
.band-hero::before, .band-memorial::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: var(--gold); opacity: 0.13;
  -webkit-mask: url(/assets/pattern.svg) 0 0 / 80px 80px repeat; mask: url(/assets/pattern.svg) 0 0 / 80px 80px repeat;
}
/* arches hanging from the hero into the band below */
.band-hero::after {
  content: ""; position: absolute; left: 0; right: 0; top: calc(100% - 1px); height: 22px;
  background: var(--band-bg);
  -webkit-mask: url(/assets/arch.svg) 0 0 / 40px 22px repeat-x; mask: url(/assets/arch.svg) 0 0 / 40px 22px repeat-x;
}
.band-hero + .band { padding-top: 76px; box-shadow: none; }
.medallion {
  position: absolute; left: 50%; top: 0; width: 46px; height: 46px; margin: -23px 0 0 -23px; z-index: 3;
  display: grid; place-items: center; border-radius: 50%;
  background: var(--band-bg); border: 1px solid var(--line);
}
.medallion::before {
  content: ""; width: 24px; height: 24px; background: var(--gold);
  -webkit-mask: url(/assets/star.svg) center / contain no-repeat; mask: url(/assets/star.svg) center / contain no-repeat;
}

.band-memorial { --band-bg: var(--band-memorial); color: var(--memorial-ink); padding: 64px 0; box-shadow: none; }
.band-memorial::before { background: var(--memorial-gold); opacity: 0.1; }
.band-memorial .medallion { border-color: rgba(216, 182, 110, 0.45); }
.band-memorial .medallion::before { background: var(--memorial-gold); }
.memorial { display: flex; align-items: center; gap: 28px; max-width: 780px; margin: 0 auto; }
.memorial-mark { flex: none; width: 96px; height: 96px; border-radius: 50%; background: #fff; padding: 6px; box-shadow: 0 0 0 6px rgba(216, 182, 110, 0.22); }
.memorial-title { font-family: var(--font-head); font-weight: 600; font-size: 1.35rem; color: #f5eddb; margin-bottom: 6px; }
.band-memorial .memorial-dua { color: var(--memorial-gold); }
@media (max-width: 640px) {
  .memorial { flex-direction: column; text-align: center; gap: 18px; }
  .band { padding: 52px 0; }
  .band-hero { padding: 24px 0 46px; }
}

/* ---------------------------------------------------------------- footer */
.site-footer { border-top: 1px solid var(--line); background: var(--surface); padding: 32px 0 40px; color: var(--muted); font-size: 0.92rem; }
.footer-inner { display: grid; gap: 14px; }
.footer-name { font-family: var(--font-head); font-weight: 600; color: var(--ink); font-size: 1.05rem; }
.footer-links { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.footer-links a { color: var(--ink-2); }
.footer-small { font-size: 0.85rem; }

/* ---------------------------------------------------------------- shorts dialog */
.short-dialog { padding: 0; border: 0; background: transparent; width: min(92vw, 380px); max-height: 92vh; overflow: visible; }
.short-dialog::backdrop { background: rgba(10, 8, 5, 0.82); }
.short-dialog form { position: absolute; top: 0; right: 0; z-index: 1; }
.short-frame { aspect-ratio: 9 / 16; max-height: 86vh; margin: 0 auto; border-radius: var(--radius); overflow: hidden; background: #000; }
.short-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.dialog-close {
  position: absolute; top: -14px; right: -14px; width: 40px; height: 40px; border-radius: 50%;
  border: 0; background: #fff; color: #111; font-size: 1.6rem; line-height: 1; cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}
@media (max-width: 440px) { .dialog-close { right: 4px; top: -48px; } }

/* ---------------------------------------------------------------- top bar: Islamic date + next prayer */
html:not(.js) .js-only { display: none !important; }
.topbar { background: var(--surface-2); border-bottom: 1px solid var(--line); font-size: 0.88rem; color: var(--ink-2); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 36px; }
.hijri { font-family: var(--font-head); font-style: italic; color: var(--gold); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 0.3em; }
.prayer-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; min-height: 30px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
  color: var(--ink); font: 600 0.86rem/1 var(--font-body); cursor: pointer; white-space: nowrap;
}
.prayer-chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); }
.prayer-chip:hover { border-color: var(--gold); }

/* ---------------------------------------------------------------- seasonal banner */
.season { background: var(--ink); color: var(--bg); }
[data-theme="dark"] .season { background: var(--gold); color: #17120a; }
.season-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 46px; padding-top: 8px; padding-bottom: 8px; }
.season p { font-size: 0.95rem; }
.season a { color: inherit; font-weight: 700; white-space: nowrap; }
.season-x { flex: none; width: 32px; height: 32px; border: 0; border-radius: 50%; background: transparent; color: inherit; font-size: 1.4rem; line-height: 1; cursor: pointer; opacity: 0.75; }
.season-x:hover { opacity: 1; background: rgba(255, 255, 255, 0.12); }

/* ---------------------------------------------------------------- today: ayah + dua of the day */
.today-date { color: var(--muted); font-weight: 600; }
.today-grid { display: grid; gap: 16px; }
@media (min-width: 860px) { .today-grid { grid-template-columns: 1fr 1fr; } }
.daily {
  display: flex; flex-direction: column; gap: 10px; padding: 24px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  position: relative; overflow: hidden;
}
.daily::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--gold); opacity: 0.7; }
.daily-label { font-weight: 700; font-size: 0.85rem; color: var(--gold); display: flex; align-items: center; gap: 8px; }
.daily-theme { font-weight: 600; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 1px 9px; font-size: 0.78rem; }
.daily-name { font-size: 1.15rem; }
.daily-ar { font-size: 1.75rem; line-height: 2.1; text-align: right; }
.daily-en { color: var(--ink-2); font-size: 1.05rem; }
.daily-ref { color: var(--muted); font-size: 0.9rem; font-weight: 600; }
.daily-reflection { font-family: var(--font-head); font-style: italic; color: var(--ink-2); border-left: 2px solid var(--gold-soft); padding-left: 12px; }
.daily-actions { margin-top: auto; padding-top: 8px; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.daily-actions .share-row { margin: 0; }
.daily-link { font-weight: 600; font-size: 0.95rem; }

/* ---------------------------------------------------------------- coming soon */
.coming-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.coming-list li {
  display: grid; grid-template-columns: 74px 1fr; grid-template-rows: auto auto; column-gap: 14px; align-items: center;
  padding: 12px 16px; border: 1px dashed var(--gold-soft); border-radius: var(--radius-sm); background: var(--surface);
}
.coming-list time {
  grid-row: span 2; display: grid; place-items: center; text-align: center; height: 52px; padding: 0 6px;
  border-radius: 8px; background: var(--gold-soft); color: var(--ink); font-weight: 700; font-size: 0.82rem; line-height: 1.2;
}
.coming-title { font-weight: 600; line-height: 1.3; }
.coming-kind { color: var(--muted); font-size: 0.85rem; }

/* ---------------------------------------------------------------- share + copy */
.share-row { display: flex; gap: 6px; margin-top: 2px; }
.mini {
  display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 5px 11px;
  border: 1px solid var(--line); border-radius: 999px; background: transparent;
  color: var(--muted); font: 600 0.82rem/1 var(--font-body); cursor: pointer;
}
.mini svg { width: 14px; height: 14px; }
.mini:hover { color: var(--ink); border-color: var(--gold); }
.verse .share-row { justify-content: flex-end; }
@media (hover: hover) {
  .verse .share-row { opacity: 0; transition: opacity 0.15s ease; }
  .verse:hover .share-row, .verse:focus-within .share-row { opacity: 1; }
}
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0;
  background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 999px;
  font-weight: 600; font-size: 0.92rem; transition: opacity 0.2s ease, transform 0.2s ease; z-index: 60; pointer-events: none;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------------------------------------------------------------- prayer times dialog */
.prayer-dialog {
  width: min(94vw, 440px); max-height: 90vh; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); color: var(--ink); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
}
.prayer-dialog::backdrop { background: rgba(10, 8, 5, 0.55); }
.pd-head { display: flex; align-items: center; justify-content: space-between; }
.pd-head h2 { font-size: 1.35rem; }
.pd-close { width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--surface-2); color: var(--ink); font-size: 1.4rem; line-height: 1; cursor: pointer; }
.pd-place { color: var(--muted); margin-top: 4px; font-size: 0.95rem; }
.pd-times { list-style: none; margin: 14px 0 0; padding: 0; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.pd-times:empty { display: none; }
.pd-times li { display: flex; justify-content: space-between; padding: 10px 14px; font-weight: 600; }
.pd-times li + li { border-top: 1px solid var(--line); }
.pd-times time { font-variant-numeric: tabular-nums; }
.pd-times .is-sunrise { color: var(--muted); font-weight: 400; font-size: 0.92rem; }
.pd-times .is-next { background: var(--gold-soft); }
.pd-times .is-next span::after { content: "Next"; margin-left: 8px; font-size: 0.72rem; font-weight: 700; color: var(--gold); text-transform: uppercase; letter-spacing: 0.06em; }
.pd-settings { display: grid; gap: 12px; margin-top: 16px; }
.pd-settings label { display: grid; gap: 4px; font-size: 0.88rem; font-weight: 600; color: var(--ink-2); }
.pd-settings select {
  min-height: 42px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--bg); color: var(--ink); font: inherit; font-weight: 400;
}
.pd-note { margin-top: 14px; font-size: 0.82rem; color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
