/* Prayer app design system: "Mihrab" — arch-shaped hero cards with a hairline, lifted glass panels.
   Light = Midnight & Gold (ivory ground, navy arch and buttons, gold). Dark = Ink & Brass (midnight ink, gold glass
   edges and gold buttons; green only for success). Theme follows the OS, with a manual toggle (theme.js). */

/* Fonts, self-hosted (no third-party requests).
   Timeless Sans / Timeless Serif: Timeless Free Font License 1.2 (web embedding allowed; never offer the files on
   their own or put them in a public repository). Urdu and Arabic: Jameel Noori Nastaleeq, in two subsets.
   Arabic (Bismillah, prayer names, Qur'an): DigitalKhatt IndoPak (Amine Anane / Tarteel, SIL OFL 1.1), cut to the glyphs
   the app uses (dk-arabic.woff2). Urdu: "Noori Passages" for the Blessings page; "Noori Text" covers the full Urdu alphabet for
   text written by admins (large, so it is only used in .prose and only downloads when such text is on a page). */
@font-face { font-family: "Timeless Sans"; src: url("/fonts/TimelessSans-SansRegular.woff2") format("woff2"); font-weight: 300 499; font-style: normal; font-display: swap; }
@font-face { font-family: "Timeless Sans"; src: url("/fonts/TimelessSans-SansSemibold.woff2") format("woff2"); font-weight: 500 649; font-style: normal; font-display: swap; }
@font-face { font-family: "Timeless Sans"; src: url("/fonts/TimelessSans-SansBold.woff2") format("woff2"); font-weight: 650 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Timeless Serif"; src: url("/fonts/TimelessSerif-Semibold.woff2") format("woff2"); font-weight: 300 900; font-style: normal; font-display: swap; }
@font-face { font-family: "DigitalKhatt IndoPak"; src: url("/fonts/dk-arabic.woff2") format("woff2"); font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: "Noori Passages"; src: url("/fonts/noori-blessings.woff2") format("woff2"); font-display: swap; unicode-range: U+0600-06FF, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: "Noori Text"; src: url("/fonts/noori-text.woff2") format("woff2"); font-display: swap; unicode-range: U+0600-06FF, U+FB50-FDFF, U+FE70-FEFF; }

:root {
  /* Midnight & Gold (light): ivory page, white cards with navy hairlines, navy buttons with gold text,
     and a midnight-navy arch with gold lettering at the top of each page (see "light statement arch" below). */
  --bg: #f7f3ea;
  --bg-2: #ece5d6;
  --ink: #151515;
  --muted: #4a4740;          /* 8.6:1 on --bg */
  --faint: #5c5850;          /* 6.4:1 on --bg */
  --link: #7a560f;
  --accent: #14213d;
  --accent-ink: #7a560f;     /* gold as text: 5.9:1 on --bg */
  --on-accent: #f3d58a;      /* gold on navy buttons: 9.0:1 */
  --success: #14724b;
  --on-success: #ffffff;
  --hair: rgba(168, 123, 28, .6);
  --line: rgba(20, 33, 61, .14);
  --line-strong: rgba(20, 33, 61, .26);
  --bloom-1: rgba(212, 175, 55, .32);
  --bloom-2: rgba(30, 58, 138, .18);
  --glass-fill: rgba(255, 255, 255, .95);
  --glass-sheen: linear-gradient(165deg, #ffffff, #f7f6f2);
  --glass-edge: rgba(20, 33, 61, .16);
  --lift: inset 0 1px 0 #fff, 0 1px 2px rgba(0, 0, 0, .08), 0 18px 40px rgba(20, 33, 61, .12);
  --lift-sm: inset 0 1px 0 #fff, 0 1px 2px rgba(0, 0, 0, .07), 0 4px 12px rgba(20, 33, 61, .08);
  --well: #f6f3ec;
  --well-edge: rgba(20, 33, 61, .12);
  --field: #ffffff;
  --field-edge: rgba(20, 33, 61, .30);
  --now: rgba(212, 175, 55, .20);
  --now-edge: rgba(168, 123, 28, .7);
  --btn-face: linear-gradient(180deg, #1f3157, #0e1830);
  --btn-shadow: 0 6px 16px rgba(14, 24, 48, .28), inset 0 1px 0 rgba(255, 255, 255, .14);
  --btn2-fill: #ffffff;
  --tick-bg: radial-gradient(circle at 35% 30%, #3fbf86, #11653f);
  --tick-ink: #ffffff;
  --tick-glow: 0 0 0 8px rgba(212, 175, 55, .18), 0 12px 26px rgba(20, 33, 61, .25);
  --soft-bg: rgba(212, 175, 55, .18);
  --soft-ink: #7a560f;
  --warn-bg: #fff1c7;
  --warn-ink: #5c3f00;
  --warn-edge: #d9b44a;
  --danger: #a51d12;
  --danger-bg: #fde3e0;
  --chip: rgba(212, 175, 55, .24);
  --chip-ink: #5e420a;
  --focus: #14213d;
  --hero-bg: radial-gradient(420px 260px at 85% 0%, rgba(212, 175, 55, .30), transparent 70%), linear-gradient(160deg, #1c2c4f, #0a1224);
  --hero-ink: #fbf3dc;
  --hero-muted: #d8cfb8;     /* 8.9:1 on the navy arch */
  --hero-accent: #e8c66e;
  --hero-hair: rgba(232, 198, 110, .55);
  --hero-shadow: rgba(10, 18, 36, .35);
  --hero-btn: #e8c66e;
  --hero-btn-ink: #1a1407;
  --raise: #f8f5ee;
  --raise-edge: rgba(20, 33, 61, .16);
  --dock-surface: #ffffff;
  --dock-ink: rgb(21 21 21 / 88%);
  --dock-hover: rgb(20 33 61 / 6%);
  --dock-active: #7a560f;
  --dock-shadow: inset 0 1px 0 #fff, 0 0 0 1px rgba(20, 33, 61, .13), 0 2px 4px rgba(20, 33, 61, .06), 0 14px 34px rgba(20, 33, 61, .16);
  --flip-top: #ffffff;
  --flip-bottom: #f3f1ec;
  --flip-ink: #151515;
  --flip-edge: rgba(20, 33, 61, .18);
  --flip-hinge: rgba(20, 33, 61, .24);
  --font-ui: "Timeless Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --font-display: "Timeless Serif", "Iowan Old Style", Georgia, serif;
  --font-urdu: "Jameel Noori Nastaleeq", "Noto Nastaliq Urdu", serif;
  --font-arabic: "DigitalKhatt IndoPak", "Amiri Quran", "Scheherazade New", serif;   /* all Arabic: Bismillah, prayer names, Qur'an */
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-in-out: cubic-bezier(.77, 0, .175, 1);
  --t-press: 110ms;
  --t-hover: 150ms;
  --t-state: 200ms;
  --t-panel: 380ms;
  --t-reveal: 620ms;
  --radius: 22px;
  color-scheme: light;
}

/* Ink & Brass (dark) — same tokens, redefined. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #070c16; --bg-2: #0b1222; --ink: #f6f2e8; --muted: #cbc4ae; --faint: #aaa38f; --link: #ebcd88;
    --accent: #e0bd6e; --accent-ink: #ebcd88; --on-accent: #1d1406; --success: #5fd39f; --on-success: #04150d;
    --hair: rgba(224, 189, 110, .5); --line: rgba(255, 236, 190, .12); --line-strong: rgba(255, 236, 190, .22);
    --bloom-1: rgba(214, 176, 92, .30); --bloom-2: rgba(40, 150, 110, .28);
    --glass-fill: rgba(22, 30, 48, .62);
    --glass-sheen: linear-gradient(170deg, rgba(255, 240, 200, .12), rgba(255, 255, 255, .02) 50%, transparent);
    --glass-edge: rgba(255, 236, 190, .2);
    --lift: inset 0 1px 0 rgba(255, 240, 205, .28), inset 0 -1px 0 rgba(0, 0, 0, .5), 0 18px 44px rgba(0, 0, 0, .55), 0 8px 30px rgba(224, 189, 110, .14);
    --lift-sm: inset 0 1px 0 rgba(255, 240, 205, .2), 0 6px 16px rgba(0, 0, 0, .35);
    --well: rgba(0, 0, 0, .28); --well-edge: rgba(255, 255, 255, .08);
    --field: rgba(4, 8, 16, .55); --field-edge: rgba(255, 236, 190, .24);
    --now: rgba(224, 189, 110, .13); --now-edge: rgba(224, 189, 110, .5);
    --btn-face: linear-gradient(180deg, #f0d38f, #c99a3d);
    --btn-shadow: 0 8px 22px rgba(201, 154, 61, .32), inset 0 1px 0 rgba(255, 255, 255, .5);
    --btn2-fill: rgba(255, 255, 255, .06);
    --tick-bg: radial-gradient(circle at 35% 30%, #7fe3b5, #1f8f5f); --tick-ink: #04150d;
    --tick-glow: 0 0 0 6px rgba(16, 26, 44, .9), 0 0 0 7px rgba(224, 189, 110, .75), 0 10px 30px rgba(31, 143, 95, .45);
    --soft-bg: rgba(224, 189, 110, .14); --soft-ink: #ebcd88;
    --warn-bg: rgba(246, 197, 107, .14); --warn-ink: #f6d58a; --warn-edge: rgba(246, 197, 107, .45);
    --danger: #ff8a7a; --danger-bg: rgba(255, 120, 100, .12);
    --chip: rgba(224, 189, 110, .14); --chip-ink: #ebcd88; --focus: #ebcd88;
    --raise: rgba(255, 240, 205, .075); --raise-edge: rgba(255, 236, 190, .22); --dock-surface: #18223a; --dock-ink: rgb(246 242 232 / 90%); --dock-hover: rgb(255 255 255 / 7%); --dock-active: #e8c66e;
    --dock-shadow: inset 0 1px 0 rgba(255, 240, 205, .16), 0 0 0 1px rgba(255, 236, 190, .18), 0 2px 4px rgba(0, 0, 0, .3), 0 16px 36px rgba(0, 0, 0, .5);
    --flip-top: #18233a; --flip-bottom: #121b2f; --flip-ink: #f6e7bf; --flip-edge: rgba(255, 236, 190, .16); --flip-hinge: rgba(0, 0, 0, .55);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #070c16; --bg-2: #0b1222; --ink: #f6f2e8; --muted: #cbc4ae; --faint: #aaa38f; --link: #ebcd88;
  --accent: #e0bd6e; --accent-ink: #ebcd88; --on-accent: #1d1406; --success: #5fd39f; --on-success: #04150d;
  --hair: rgba(224, 189, 110, .5); --line: rgba(255, 236, 190, .12); --line-strong: rgba(255, 236, 190, .22);
  --bloom-1: rgba(214, 176, 92, .30); --bloom-2: rgba(40, 150, 110, .28);
  --glass-fill: rgba(22, 30, 48, .62);
  --glass-sheen: linear-gradient(170deg, rgba(255, 240, 200, .12), rgba(255, 255, 255, .02) 50%, transparent);
  --glass-edge: rgba(255, 236, 190, .2);
  --lift: inset 0 1px 0 rgba(255, 240, 205, .28), inset 0 -1px 0 rgba(0, 0, 0, .5), 0 18px 44px rgba(0, 0, 0, .55), 0 8px 30px rgba(224, 189, 110, .14);
  --lift-sm: inset 0 1px 0 rgba(255, 240, 205, .2), 0 6px 16px rgba(0, 0, 0, .35);
  --well: rgba(0, 0, 0, .28); --well-edge: rgba(255, 255, 255, .08);
  --field: rgba(4, 8, 16, .55); --field-edge: rgba(255, 236, 190, .24);
  --now: rgba(224, 189, 110, .13); --now-edge: rgba(224, 189, 110, .5);
  --btn-face: linear-gradient(180deg, #f0d38f, #c99a3d);
  --btn-shadow: 0 8px 22px rgba(201, 154, 61, .32), inset 0 1px 0 rgba(255, 255, 255, .5);
  --btn2-fill: rgba(255, 255, 255, .06);
  --tick-bg: radial-gradient(circle at 35% 30%, #7fe3b5, #1f8f5f); --tick-ink: #04150d;
  --tick-glow: 0 0 0 6px rgba(16, 26, 44, .9), 0 0 0 7px rgba(224, 189, 110, .75), 0 10px 30px rgba(31, 143, 95, .45);
  --soft-bg: rgba(224, 189, 110, .14); --soft-ink: #ebcd88;
  --warn-bg: rgba(246, 197, 107, .14); --warn-ink: #f6d58a; --warn-edge: rgba(246, 197, 107, .45);
  --danger: #ff8a7a; --danger-bg: rgba(255, 120, 100, .12);
  --chip: rgba(224, 189, 110, .14); --chip-ink: #ebcd88; --focus: #ebcd88;
    --raise: rgba(255, 240, 205, .075); --raise-edge: rgba(255, 236, 190, .22); --dock-surface: #18223a; --dock-ink: rgb(246 242 232 / 90%); --dock-hover: rgb(255 255 255 / 7%); --dock-active: #e8c66e;
    --dock-shadow: inset 0 1px 0 rgba(255, 240, 205, .16), 0 0 0 1px rgba(255, 236, 190, .18), 0 2px 4px rgba(0, 0, 0, .3), 0 16px 36px rgba(0, 0, 0, .5);
    --flip-top: #18233a; --flip-bottom: #121b2f; --flip-ink: #f6e7bf; --flip-edge: rgba(255, 236, 190, .16); --flip-hinge: rgba(0, 0, 0, .55);
  color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; touch-action: pan-x pan-y; }  /* no pinch or double-tap zoom on phones */
html.theme-switching *, html.theme-switching *::before, html.theme-switching *::after { transition: none !important; }
body {
  font-synthesis: none;
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.55 var(--font-ui);
  -webkit-font-smoothing: antialiased;
}
.ambient {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(520px 420px at 100% 0%, var(--bloom-1), transparent 70%),
    radial-gradient(520px 460px at 0% 85%, var(--bloom-2), transparent 70%),
    linear-gradient(180deg, var(--bg), var(--bg-2));
}
a { color: var(--link); text-underline-offset: 3px; }
img { max-width: 100%; }
h1, h2, h3 { text-wrap: balance; }
:focus-visible { outline: 2.5px solid var(--focus); outline-offset: 3px; border-radius: 10px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
[hidden] { display: none !important; }

/* ---------- surfaces ---------- */
.glass {
  position: relative;
  background-color: var(--glass-fill);
  background-image: var(--glass-sheen);
  border: 1px solid var(--glass-edge);
  box-shadow: var(--lift);
  border-radius: var(--radius);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
}
.glass-well {
  background: var(--well);
  border: 1px solid var(--well-edge);
  border-radius: 18px;
}
/* The mihrab arch: a tall rounded top with an inner hairline. */
.arch { border-radius: 170px 170px var(--radius) var(--radius); padding-top: 34px !important; }
.arch::before {
  content: ""; position: absolute; inset: 7px; pointer-events: none;
  border-radius: 163px 163px calc(var(--radius) - 5px) calc(var(--radius) - 5px);
  border: 1px solid var(--hair);
}
@media (min-width: 720px) { .arch { border-radius: 260px 260px var(--radius) var(--radius); } .arch::before { border-radius: 253px 253px calc(var(--radius) - 5px) calc(var(--radius) - 5px); } }

/* ---------- buttons ---------- */
.btn {
  -webkit-appearance: none; appearance: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 10px 18px;
  border-radius: 14px; border: 1px solid var(--line-strong);
  background-color: var(--btn2-fill);
  color: var(--ink); font: 600 15px/1.2 var(--font-ui); text-decoration: none; cursor: pointer;
  box-shadow: var(--lift-sm);
  transition: transform var(--t-press) var(--ease-out), box-shadow var(--t-hover), background-color var(--t-hover);
  touch-action: manipulation;
}
.btn:hover { background-color: var(--well); }
.btn:active { transform: translateY(1px) scale(.985); box-shadow: none; }
.btn.primary {
  border-color: transparent; color: var(--on-accent);
  background-color: var(--accent); background-image: var(--btn-face); box-shadow: var(--btn-shadow);
}
.btn.primary:hover { transform: translateY(-1px); }
.btn.primary:active { transform: translateY(1px) scale(.985); }
.btn.big { min-height: 56px; font-size: 17px; border-radius: 16px; width: 100%; }
.btn.small { min-height: 36px; padding: 6px 12px; font-size: 13.5px; border-radius: 11px; }
.btn.ghost { background: transparent; box-shadow: none; border-color: transparent; color: var(--link); }
.btn.danger { color: var(--danger); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; pointer-events: none; box-shadow: none; }
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- forms ---------- */
.field { display: grid; gap: 6px; font-weight: 600; font-size: 14px; color: var(--muted); }
.field > span:first-child { padding-left: 2px; }
input[type=text], input[type=password], input[type=search], input[type=number], input[type=date], input[type=time],
input[type=datetime-local], input[type=url], input[type=email], select, textarea {
  -webkit-appearance: none; appearance: none;
  width: 100%; min-height: 50px; padding: 12px 14px;
  border-radius: 14px; border: 1px solid var(--field-edge);
  background: var(--field); color: var(--ink);
  font: 400 16px/1.3 var(--font-ui);  /* 16px keeps iOS from zooming */
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .06);
  transition: border-color var(--t-hover), box-shadow var(--t-hover);
}
textarea { min-height: 140px; resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--now); }
.select { position: relative; display: block; }
.select::after {
  content: ""; position: absolute; right: 16px; top: 50%; width: 8px; height: 8px; margin-top: -6px; pointer-events: none;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg);
}
.select select { padding-right: 40px; }
input::placeholder, textarea::placeholder { color: var(--faint); opacity: 1; }
.alert { margin: 0; padding: 12px 14px; border-radius: 14px; background: var(--danger-bg); color: var(--danger); font-weight: 600; font-size: 14.5px; }
.notice { padding: 12px 14px; border-radius: 14px; background: var(--warn-bg); color: var(--warn-ink); border: 1px solid var(--warn-edge); font-weight: 500; }

/* ---------- member check-in ---------- */
.member .shell {
  width: 100%; max-width: 480px; margin: 0 auto;
  display: flex; flex-direction: column; gap: 16px;
  min-height: 100dvh;
  padding-block: max(14px, env(safe-area-inset-top, 0px)) max(20px, env(safe-area-inset-bottom, 0px));
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 15px; color: var(--ink); text-decoration: none; letter-spacing: -.01em; }
.brand small { display: block; font-weight: 500; font-size: 12px; color: var(--muted); letter-spacing: 0; }
.brand img { width: 30px; height: 30px; object-fit: contain; }
.mark {
  width: 30px; height: 30px; display: block; flex: none;
  border-radius: 15px 15px 7px 7px;
  background-color: var(--accent); background-image: var(--btn-face);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), 0 4px 10px rgba(0, 0, 0, .15);
}
.theme-btn {
  -webkit-appearance: none; appearance: none; width: 44px; height: 44px; border-radius: 14px; flex: none;
  display: grid; place-items: center; cursor: pointer; color: var(--ink);
  background-color: var(--glass-fill); background-image: var(--glass-sheen); border: 1px solid var(--glass-edge); box-shadow: var(--lift-sm);
  transition: transform var(--t-press) var(--ease-out);
}
.theme-btn:active { transform: scale(.94); }
.theme-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.theme-btn .i-moon { display: none; }
:root[data-theme="dark"] .theme-btn .i-sun { display: none; }
:root[data-theme="dark"] .theme-btn .i-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-btn .i-sun { display: none; }
  :root:not([data-theme="light"]) .theme-btn .i-moon { display: block; }
}

.hero { padding: 26px 20px 22px; text-align: center; }
.eyebrow {
  margin: 0 0 8px; display: inline-flex; align-items: center; gap: 7px;
  font-size: 12.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-ink);
}
.pin { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--now); }
.title { margin: 0; font: 650 clamp(26px, 7vw, 34px)/1.12 var(--font-display); letter-spacing: -.015em; }
.lede { margin: 10px auto 0; color: var(--muted); max-width: 34ch; font-size: 15.5px; }
.card { padding: 20px; }
.form { display: grid; gap: 16px; }
.privacy { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.5; }

.badge-icon { width: 84px; height: 84px; margin: 0 auto 14px; border-radius: 50%; display: grid; place-items: center; }
.badge-icon svg { width: 44px; height: 44px; fill: none; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.badge-icon.tick { background: var(--tick-bg); box-shadow: var(--tick-glow); }
.badge-icon.tick svg { stroke: var(--tick-ink); }
.badge-icon.soft { background: var(--soft-bg); box-shadow: inset 0 0 0 1px var(--now-edge); }
.badge-icon.soft svg { stroke: var(--soft-ink); stroke-width: 3; }
.badge-icon .faint { opacity: .45; }
.badge-icon .dot { fill: var(--soft-ink); stroke: none; }
.who { margin: 0; font: 650 clamp(25px, 7vw, 30px)/1.15 var(--font-display); letter-spacing: -.015em; }
.who.small { font-size: clamp(21px, 5.6vw, 25px); }
.what { margin: 10px 0 0; color: var(--muted); font-size: 16px; line-height: 1.5; }
.what b { color: var(--ink); font-weight: 650; }
.hint { margin: 10px 0 0; font-size: 13.5px; color: var(--faint); }

.sec { margin: 6px 4px -6px; font-size: 12px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
.rows { list-style: none; margin: 0; padding: 6px; display: flex; flex-direction: column; gap: 2px; }
.rows li { display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 8px 12px; border-radius: 13px; font-size: 15px; }
.rows .t { margin-left: auto; font-variant-numeric: tabular-nums; color: var(--muted); font-size: 14.5px; }
.rows .dot { width: 20px; height: 20px; border-radius: 50%; flex: none; display: grid; place-items: center; border: 1.5px solid var(--line-strong); }
.rows .ok .dot { background: var(--success); border-color: transparent; }
.rows .ok .dot::after { content: ""; width: 8px; height: 4.5px; border: 2px solid var(--on-success); border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.rows .now { background: var(--now); box-shadow: inset 0 0 0 1px var(--now-edge); }
.rows .now .n { font-weight: 700; }
.foot { margin-top: auto; padding-top: 8px; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 14.5px; }
.foot a { font-weight: 600; text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.foot span { color: var(--muted); }
.switch { text-align: center; }
.switch form { display: inline; }

/* ---------- motion (base styles above are the finished state) ---------- */
@keyframes rise-in { from { opacity: 0; translate: 0 12px; } }
@keyframes pop-in { from { opacity: 0; scale: .6; } }
@keyframes draw { from { stroke-dashoffset: 40; } }
@keyframes ring { from { opacity: .55; scale: 1; } to { opacity: 0; scale: 1.9; } }
@media (prefers-reduced-motion: no-preference) {
  .rise { animation: rise-in var(--t-reveal) var(--ease-out) backwards; }
  .r2 { animation-delay: 70ms; } .r3 { animation-delay: 140ms; } .r4 { animation-delay: 210ms; } .r5 { animation-delay: 280ms; }
  .result { animation: rise-in .5s var(--ease-out) backwards; }
  .result .badge-icon { animation: pop-in .55s var(--ease-out) .08s backwards; }
  .result .who { animation: rise-in .55s var(--ease-out) .22s backwards; }
  .result .what, .result .hint { animation: rise-in .55s var(--ease-out) .3s backwards; }
  .result.ok .draw { stroke-dasharray: 40; animation: draw .5s cubic-bezier(.65, 0, .35, 1) .28s backwards; }
  .result.celebrate .badge-icon { position: relative; }
  .result.celebrate .badge-icon::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--success); pointer-events: none; opacity: 0; animation: ring 1.4s var(--ease-out) .5s 2; }
  .rows li { animation: rise-in .45s var(--ease-out) backwards; }
  .rows li:nth-child(1) { animation-delay: .32s; } .rows li:nth-child(2) { animation-delay: .37s; } .rows li:nth-child(3) { animation-delay: .42s; }
  .rows li:nth-child(4) { animation-delay: .47s; } .rows li:nth-child(n+5) { animation-delay: .52s; }
}

/* ---------- public site ---------- */
.site .topnav {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  padding-block: 10px;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.site .topnav .inner {
  max-width: 1120px; margin: 0 auto; display: flex; align-items: center; gap: 14px; justify-content: space-between;
  padding: 8px 8px 8px 14px; border-radius: 20px;
}
.navlinks { display: flex; gap: 2px; list-style: none; margin: 0; padding: 0; }
.navlinks a {
  position: relative; display: inline-flex; align-items: center; min-height: 40px; padding: 8px 14px; border-radius: 12px;
  color: var(--muted); font-weight: 600; font-size: 14.5px; text-decoration: none; transition: color var(--t-hover), background-color var(--t-hover);
}
.navlinks a:hover { color: var(--ink); background: var(--well); }
.navlinks a[aria-current="page"] { color: var(--ink); }
.navlinks a[aria-current="page"]::before {
  content: ""; position: absolute; inset: 0; border-radius: 12px; z-index: -1;
  background: var(--now); box-shadow: inset 0 0 0 1px var(--now-edge); view-transition-name: navpill;
}
.navlinks a { isolation: isolate; }
.tabbar { display: none; }
@media (max-width: 1020px) {
  .site .topnav .navlinks { display: none; }
  .tabbar {
    display: grid; grid-template-columns: repeat(7, minmax(0, 1fr));
    position: fixed; z-index: 30; left: 0; right: 0; bottom: 0;
    padding: 6px max(6px, env(safe-area-inset-left, 0px)) max(8px, env(safe-area-inset-bottom, 0px)) max(6px, env(safe-area-inset-right, 0px));
    border-radius: 22px 22px 0 0; border-bottom: 0;
  }
  .tabbar a {
    position: relative; isolation: isolate; display: grid; justify-items: center; gap: 2px; padding: 7px 2px 6px; min-height: 52px;
    color: var(--muted); text-decoration: none; font-size: 11px; font-weight: 600; border-radius: 14px;
  }
  .tabbar svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .tabbar a[aria-current="page"] { color: var(--accent-ink); }
  .tabbar a[aria-current="page"]::before {
    content: ""; position: absolute; inset: 2px 3px; border-radius: 14px; z-index: -1;
    background: var(--now); box-shadow: inset 0 0 0 1px var(--now-edge); view-transition-name: tabpill;
  }
  .site main { padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)) !important; }
}
.site main {
  max-width: 1120px; margin: 0 auto; display: grid; gap: 22px;
  padding-block: 8px 48px;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.pagehead { padding: 30px clamp(26px, 7vw, 40px) 26px; text-align: center; }
.pagehead .title { font-size: clamp(27px, 7vw, 46px); }
.pagehead .lede { max-width: 52ch; }
/* Pre-shaped from DigitalKhatt IndoPak (scratchpad bsvg.py): Safari drops this font's marks, so the Bismillah is drawn as a mask. */
.bismillah { width: clamp(210px, 54vw, 290px); aspect-ratio: 7867 / 1549; margin: 6px 0 10px; color: var(--accent-ink); background-color: currentColor;
  -webkit-mask: url("/img/bismillah.svg") center / contain no-repeat; mask: url("/img/bismillah.svg") center / contain no-repeat; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 10px 4px -4px; flex-wrap: wrap; }
.section-title h2 { margin: 0; font: 650 clamp(21px, 4vw, 26px)/1.2 var(--font-display); letter-spacing: -.01em; }
.section-title a { font-weight: 600; font-size: 14.5px; }
.grid-cards { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.grid-3 { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); }

/* next prayer */
.nextcard { padding: 22px; display: grid; gap: 16px; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; padding: 5px; border-radius: 16px; background: var(--well); border: 1px solid var(--well-edge); }
.seg button {
  -webkit-appearance: none; appearance: none; flex: 1 1 auto; min-height: 40px; padding: 6px 12px; border: 0; border-radius: 12px; cursor: pointer;
  background: transparent; color: var(--muted); font: 600 14px var(--font-ui); transition: color var(--t-hover), background-color var(--t-state), box-shadow var(--t-state);
}
.seg button[aria-pressed="true"] { color: var(--ink); background-color: var(--glass-fill); background-image: var(--glass-sheen); box-shadow: var(--lift-sm); }
.next-main { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.next-name { font: 650 clamp(30px, 7vw, 44px)/1.05 var(--font-display); margin: 2px 0 0; letter-spacing: -.02em; }
.next-at { color: var(--muted); font-size: 15px; margin: 6px 0 0; }
/* Flip clock */
.countdown { display: flex; align-items: flex-start; gap: 6px; }
.countdown .unit { display: grid; justify-items: center; gap: 6px; }
.countdown .digits { display: flex; gap: 4px; }
.countdown small { font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.countdown .colon { font: 600 26px/52px var(--font-display); color: var(--muted); padding: 0 1px; }
.flip {
  --fh: 54px; position: relative; display: block; width: 38px; height: var(--fh); perspective: 260px;
  font: 600 34px/var(--fh) var(--font-display); font-variant-numeric: tabular-nums; color: var(--flip-ink);
  border-radius: 9px; box-shadow: 0 6px 14px rgba(0, 0, 0, .18), 0 0 0 1px var(--flip-edge);
}
.flip .half { position: absolute; left: 0; right: 0; height: 50%; overflow: hidden; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.flip .half > span { display: block; height: var(--fh); text-align: center; }
.flip .top, .flip .flap-top { top: 0; border-radius: 9px 9px 0 0; background: var(--flip-top); }
.flip .bottom, .flip .flap-bottom { bottom: 0; border-radius: 0 0 9px 9px; background: var(--flip-bottom); }
.flip .bottom > span, .flip .flap-bottom > span { margin-top: calc(var(--fh) / -2); }
.flip .flap-top { transform-origin: 50% 100%; z-index: 2; }
.flip .flap-bottom { transform-origin: 50% 0; z-index: 2; transform: rotateX(90deg); }
.flip::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; margin-top: -.5px; background: var(--flip-hinge); z-index: 3; }
.flip.go .flap-top { animation: flap-down .28s cubic-bezier(.55, 0, .9, .5) both; }
.flip.go .flap-bottom { animation: flap-up .32s cubic-bezier(.1, .5, .35, 1.15) .28s both; }
@keyframes flap-down { from { transform: rotateX(0); } to { transform: rotateX(-90deg); filter: brightness(.7); } }
@keyframes flap-up { from { transform: rotateX(90deg); filter: brightness(1.25); } to { transform: rotateX(0); } }
@media (max-width: 380px) { .flip { --fh: 46px; width: 31px; font-size: 28px; } .countdown .colon { line-height: 44px; font-size: 22px; } }
.mini-times { display: grid; grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); gap: 8px; }
.mini-times div { padding: 10px 8px; border-radius: 14px; text-align: center; background: var(--well); border: 1px solid var(--well-edge); }
.mini-times .is-next { background: var(--now); box-shadow: inset 0 0 0 1px var(--now-edge); }
.mini-times span { display: block; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.mini-times b { font-variant-numeric: tabular-nums; font-size: 15.5px; }

/* prayer time cards */
.pcard { padding: 22px 20px 18px; display: grid; gap: 16px; align-content: start; }
.pcard header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.pcard h3 { margin: 0; font: 650 22px/1.2 var(--font-display); letter-spacing: -.01em; }
.pcard .sub { margin: 3px 0 0; color: var(--muted); font-size: 14px; }
.ptiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.ptile {
  position: relative; padding: 14px 12px 12px; border-radius: 60px 60px 16px 16px; text-align: center;
  background: var(--well); border: 1px solid var(--well-edge);
}
.ptile .pn { display: block; font-size: 13px; font-weight: 700; color: var(--muted); letter-spacing: .02em; }
.ptile .ar { display: block; font-family: var(--font-arabic); font-size: 19px; color: var(--accent-ink); line-height: 1.8; margin-top: -2px; }
.ptile .pt { display: block; margin-top: 6px; font: 650 22px/1.1 var(--font-display); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.ptile .pt small { font: 600 12px var(--font-ui); color: var(--muted); margin-left: 3px; }
.ptile.is-next { background-color: var(--now); box-shadow: inset 0 0 0 1.5px var(--now-edge), 0 8px 24px rgba(0, 0, 0, .08); }
.ptile .tag { position: absolute; top: -9px; left: 50%; translate: -50% 0; white-space: nowrap; padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; background-color: var(--accent); background-image: var(--btn-face); color: var(--on-accent); }
.ptile.is-past { opacity: .62; }
.pmeta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 13.5px; color: var(--muted); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: var(--chip); color: var(--chip-ink); font-size: 12.5px; font-weight: 700; }
.chip.warn { background: var(--warn-bg); color: var(--warn-ink); }
.changes { margin: 0; padding: 10px 12px; border-radius: 14px; background: var(--warn-bg); color: var(--warn-ink); border: 1px solid var(--warn-edge); font-size: 13.5px; }
.sunstrip { display: flex; flex-wrap: wrap; gap: 10px 22px; justify-content: center; padding: 14px 18px; font-size: 14px; color: var(--muted); }
.sunstrip b { color: var(--ink); font-variant-numeric: tabular-nums; }

/* locations */
.lcard { padding: 20px; display: grid; gap: 12px; align-content: start; }
.lcard h3 { margin: 0; font: 650 21px/1.2 var(--font-display); }
.lcard address { font-style: normal; color: var(--muted); font-size: 14.5px; }
.lcard .held { display: flex; flex-wrap: wrap; gap: 6px; }
.lcard .actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }

/* events */
.ecard { padding: 16px; display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: start; }
.datetile {
  width: 70px; padding: 12px 6px 10px; border-radius: 40px 40px 14px 14px; text-align: center;
  background-color: var(--accent); background-image: var(--btn-face); color: var(--on-accent); box-shadow: var(--btn-shadow);
}
.datetile .mo { display: block; font-size: 11.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.datetile .dd { display: block; font: 700 30px/1 var(--font-display); }
.datetile .dw { display: block; font-size: 11px; font-weight: 600; opacity: .9; }
.ecard h3 { margin: 0; font: 650 19px/1.25 var(--font-display); }
.ecard .when { margin: 4px 0 0; font-size: 14px; color: var(--muted); }
.ecard .desc { margin: 8px 0 0; font-size: 15px; white-space: pre-line; overflow-wrap: anywhere; }
.ecard .eimg { grid-column: 1 / -1; width: 100%; border-radius: 14px; max-height: 420px; object-fit: cover; }
.ecard .actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.empty { padding: 26px 20px; text-align: center; color: var(--muted); }
.empty b { display: block; color: var(--ink); font: 650 19px var(--font-display); margin-bottom: 4px; }

/* newsletter */
.ncard { padding: 12px; display: grid; gap: 12px; text-decoration: none; color: inherit; transition: transform var(--t-hover) var(--ease-out); }
.ncard:hover { transform: translateY(-3px); }
.ncard:active { transform: translateY(0) scale(.99); }
.ncover { aspect-ratio: 8.5 / 11; border-radius: 12px; overflow: hidden; display: grid; place-items: center; background: var(--well); border: 1px solid var(--well-edge); }
.ncover img { width: 100%; height: 100%; object-fit: cover; }
.ncover .pdf { font: 700 15px var(--font-ui); color: var(--accent-ink); display: grid; justify-items: center; gap: 8px; text-align: center; padding: 10px; }
.ncover .pdf svg { width: 44px; height: 44px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.ncard h3 { margin: 0 4px; font: 650 17px/1.3 var(--font-display); }
.ncard p { margin: -6px 4px 4px; color: var(--muted); font-size: 13.5px; }

/* prose (blessings page) */
.prose { padding: clamp(22px, 5vw, 44px); font-size: 17px; line-height: 1.75; }
.prose > * { max-width: 68ch; margin-left: auto; margin-right: auto; }
.prose h2 { font: 650 26px/1.25 var(--font-display); margin: 1.6em auto .5em; }
.prose h3 { font: 650 20px/1.3 var(--font-display); margin: 1.4em auto .4em; }
.prose blockquote { margin: 1.2em auto; padding: 14px 18px; border-radius: 16px; background: var(--well); border: 1px solid var(--well-edge); border-left: 3px solid var(--accent); }
.prose blockquote p { margin: 0; }
.prose .ar { font-family: "Noori Text", "Jameel Noori Nastaleeq", "Noto Nastaliq Urdu", serif; font-size: 1.3em; line-height: 2.3; direction: rtl; text-align: right; color: var(--accent-ink); }

/* home */
.home-hero { padding: 34px 22px 30px; text-align: center; display: grid; justify-items: center; gap: 10px; }
.home-hero .title { font-size: clamp(30px, 7vw, 52px); max-width: 18ch; }
.home-hero .cta { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 8px; }
.tiles { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.tile { padding: 18px; display: grid; gap: 4px; text-decoration: none; color: inherit; transition: transform var(--t-hover) var(--ease-out); }
.tile:hover { transform: translateY(-3px); }
.tile b { font: 650 18px var(--font-display); }
.tile span { color: var(--muted); font-size: 14px; }
.tile svg { width: 28px; height: 28px; fill: none; stroke: var(--accent-ink); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 6px; }
.sitefoot { text-align: center; color: var(--faint); font-size: 13px; padding: 10px 0 0; }

/* ---------- motion: page transitions, reveals, micro-interactions ----------
   Base styles are the finished state; hidden "from" states exist only in keyframes or behind
   prefers-reduced-motion: no-preference + the reveal-on class (set before paint, removed if JS fails). */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  .site .topnav { view-transition-name: topnav; }
  .mm-dock { view-transition-name: mmenu; }
  ::view-transition-old(topnav), ::view-transition-new(topnav),
  ::view-transition-old(mmenu), ::view-transition-new(mmenu) { animation: none; }
  ::view-transition-group(navpill) { animation-duration: var(--t-panel); animation-timing-function: var(--ease-out); }

  /* Phones: one short crossfade of the page. Morphs and slides of large areas stutter on mobile GPUs. */
  ::view-transition-old(root) { animation: .1s linear both vt-fade-out; }
  ::view-transition-new(root) { animation: .16s ease-out both vt-fade-in; }

  /* Desktop: page body slides with the tab direction and the arch header morphs. */
  @media (min-width: 1021px) {
    .site main { view-transition-name: page; }
    .site .pagehead, .site .home-hero { view-transition-name: hero; }
    ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
    ::view-transition-group(hero) { animation-duration: .32s; animation-timing-function: var(--ease-out); }
    ::view-transition-old(hero) { animation: .12s ease both vt-fade-out; }
    ::view-transition-new(hero) { animation: .26s var(--ease-out) .04s both vt-fade-in; }
    ::view-transition-old(page) { animation: .12s ease both vt-fade-out; }
    ::view-transition-new(page) { animation: .26s var(--ease-out) both vt-rise-in; }
    html:active-view-transition-type(forward)::view-transition-old(page) { animation: .14s ease both vt-out-left; }
    html:active-view-transition-type(forward)::view-transition-new(page) { animation: .28s var(--ease-out) both vt-in-right; }
    html:active-view-transition-type(back)::view-transition-old(page) { animation: .14s ease both vt-out-right; }
    html:active-view-transition-type(back)::view-transition-new(page) { animation: .28s var(--ease-out) both vt-in-left; }
  }

  /* Theme switch: the new theme opens as a circle from the sun/moon button. */
  html[data-vt="theme"] * { view-transition-name: none !important; }
  html[data-vt="theme"]::view-transition-old(root) { animation: none; }
  html[data-vt="theme"]::view-transition-new(root) { animation: vt-circle .45s cubic-bezier(.4, 0, .2, 1); }

  .stagger > * { animation: rise-in .5s var(--ease-out) backwards; }
  .stagger > :nth-child(2) { animation-delay: 60ms; } .stagger > :nth-child(3) { animation-delay: 120ms; }
  .stagger > :nth-child(4) { animation-delay: 180ms; } .stagger > :nth-child(n+5) { animation-delay: 240ms; }

  /* Scroll reveal (app.js adds .revealed as each card enters the screen). */
  html.reveal-on :is(.grid-cards, .grid-3, .tiles) > *,
  html.reveal-on :is(.nextcard, .sunstrip, .brochure, .mapcard, .prose, .section-title) {
    transition: opacity .42s var(--ease-out) var(--rd, 0ms), translate .42s var(--ease-out) var(--rd, 0ms), transform var(--t-hover) var(--ease-out);
  }
  html.reveal-on :is(.grid-cards, .grid-3, .tiles) > :not(.revealed),
  html.reveal-on :is(.nextcard, .sunstrip, .brochure, .mapcard, .prose, .section-title):not(.revealed) { opacity: 0; translate: 0 16px; }

  /* The next prayer: three soft pulses, then rest. */
  .ptile.is-next::after {
    content: ""; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none;
    box-shadow: 0 0 0 2px var(--now-edge); opacity: 0; animation: tile-ping 1.8s var(--ease-out) .6s 3;
  }
  .ptile .tag:not([hidden]) { animation: pop-in .45s var(--ease-out) .3s backwards; }

  /* Cards lift on hover (pointer devices only); tabs and seg buttons answer a press. */
  @media (hover: hover) {
    .pcard, .lcard, .ecard, .ncard, .tile { transition: transform var(--t-hover) var(--ease-out), box-shadow var(--t-hover) var(--ease-out); }
    .pcard:hover, .lcard:hover, .ecard:hover { transform: translateY(-3px); }
  }
  .tabbar a, .seg button, .navlinks a { transition: transform var(--t-press) var(--ease-out), color var(--t-hover), background-color var(--t-hover); }
  .tabbar a:active, .seg button:active { transform: scale(.93); }
  .tabbar a svg { transition: transform var(--t-state) var(--ease-out); }
  .tabbar a[aria-current="page"] svg { transform: translateY(-1px) scale(1.06); }
}
@keyframes vt-fade-out { to { opacity: 0; } }
@keyframes vt-fade-in { from { opacity: 0; } }
@keyframes vt-rise-in { from { opacity: 0; translate: 0 14px; } }
@keyframes vt-out-left { to { opacity: 0; translate: -40px 0; } }
@keyframes vt-in-right { from { opacity: 0; translate: 36px 0; } }
@keyframes vt-out-right { to { opacity: 0; translate: 40px 0; } }
@keyframes vt-in-left { from { opacity: 0; translate: -36px 0; } }
@keyframes vt-circle { from { clip-path: circle(0 at var(--vt-x, 50%) var(--vt-y, 0)); } to { clip-path: circle(150% at var(--vt-x, 50%) var(--vt-y, 0)); } }
@keyframes tile-ping { 0% { opacity: .9; transform: scale(1); } 100% { opacity: 0; transform: scale(1.08); } }
@keyframes digit-tick { from { opacity: .2; translate: 0 -6px; } }
@media (prefers-reduced-motion: reduce) { ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; } }

@media print {
  .ambient, .topnav, .tabbar, .theme-btn { display: none !important; }
  .glass { box-shadow: none; backdrop-filter: none; background: #fff; border-color: #ccc; }
}
.gap-b { margin-bottom: 12px !important; } .gap-t { margin: 12px 0 0; }

/* ---------- donate + brochure viewer ---------- */
.navlinks a.nav-donate { color: var(--on-accent); background-color: var(--accent); background-image: var(--btn-face); box-shadow: var(--btn-shadow); margin-left: 6px; }
.navlinks a.nav-donate:hover { color: var(--on-accent); transform: translateY(-1px); }
.navlinks a.nav-donate[aria-current="page"]::before { display: none; }
.donate-hero .cta { display: flex; justify-content: center; margin-top: 18px; }
.donate-btn { width: auto; min-width: min(100%, 280px); padding-inline: 28px; }
.pagehead .hint { margin-top: 10px; }
.brochure { padding: 18px; display: grid; gap: 14px; }
.brochure-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.brochure-head h2 { margin: 0; font: 650 clamp(21px, 4vw, 26px)/1.2 var(--font-display); }
.brochure-head .sub { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.brochure-mode { flex: 0 0 auto; }
.viewer { position: relative; }
.track {
  display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  padding: 6px 2px 10px; overscroll-behavior-x: contain; scrollbar-width: none; border-radius: 16px;
}
.track::-webkit-scrollbar { display: none; }
.slide { margin: 0; flex: none; scroll-snap-align: center; display: grid; gap: 8px; justify-items: center; }
.slide.panel { width: min(78vw, 300px); }
.slide.spread { width: 100%; }
.slide figcaption { font-size: 13px; font-weight: 700; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; }
.zoom { -webkit-appearance: none; appearance: none; padding: 0; border: 0; background: #000; border-radius: 14px; overflow: hidden; cursor: zoom-in; display: block; width: 100%;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .28), 0 0 0 1px var(--line); transition: transform var(--t-hover) var(--ease-out); }
.zoom:hover { transform: translateY(-2px); }
.zoom:active { transform: scale(.99); }
.zoom img { display: block; width: 100%; height: auto; }
.nav-arrow {
  position: absolute; top: 50%; translate: 0 -50%; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  color: var(--ink); background-color: var(--glass-fill); background-image: var(--glass-sheen); border: 1px solid var(--glass-edge); box-shadow: var(--lift);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); transition: opacity var(--t-state), transform var(--t-press);
}
.nav-arrow:active { transform: scale(.92); }
.nav-arrow svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.nav-arrow.prev { left: -6px; } .nav-arrow.next { right: -6px; }
.nav-arrow[disabled] { opacity: 0; pointer-events: none; }
@media (hover: none) and (max-width: 600px) { .nav-arrow { display: none; } }
.dots { display: flex; justify-content: center; gap: 7px; }
.dots i { width: 7px; height: 7px; border-radius: 999px; background: var(--line-strong); transition: width var(--t-state) var(--ease-out), background-color var(--t-state); }
.dots i.on { width: 22px; background: var(--accent); }
.brochure-foot { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.lightbox { padding: 0; border: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none; background: #05070c; color: #fff; }
.lightbox::backdrop { background: rgba(0, 0, 0, .85); }
.lightbox[open] { display: grid; }
.lb-scroll { overflow: auto; width: 100%; height: 100%; display: grid; place-items: center; touch-action: pan-x pan-y pinch-zoom; }
.lb-scroll img { max-width: 100%; max-height: 100dvh; object-fit: contain; cursor: zoom-in; }
.lb-scroll.zoomed { place-items: start; }
.lb-scroll.zoomed img { max-width: none; max-height: none; width: 220%; cursor: zoom-out; }
.lb-close { position: fixed; top: max(14px, env(safe-area-inset-top, 0px)); right: max(14px, env(safe-area-inset-right, 0px)); color: #fff; background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .25); font-size: 18px; }
.lb-hint { position: fixed; bottom: max(14px, env(safe-area-inset-bottom, 0px)); left: 0; right: 0; text-align: center; margin: 0; font-size: 13px; color: rgba(255, 255, 255, .7); pointer-events: none; }
@media (prefers-reduced-motion: no-preference) {
  .lightbox[open] img { animation: pop-in .35s var(--ease-out) backwards; }
}
@media (prefers-reduced-motion: reduce) { .track { scroll-behavior: auto; } }
/* Grid children must be allowed to shrink, or a wide row (the brochure track) widens the whole page. */
.site main { grid-template-columns: minmax(0, 1fr); }
.brochure { grid-template-columns: minmax(0, 1fr); }
.viewer, .track { min-width: 0; }
.nextcard .seg { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); }

/* Copyright footer */
.copyright { text-align: center; color: var(--faint); font-size: 12.5px; line-height: 1.5; margin: 6px 0 0; text-wrap: balance; }
.sitefoot .links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 14px; }
@media (max-width: 380px) {
  .tabbar a { font-size: 10px; padding-inline: 0; letter-spacing: -.01em; }
  .tabbar svg { width: 21px; height: 21px; }
}

/* ---------- locations map ---------- */
.mapcard { padding: 8px; overflow: hidden; }
.centers-map { height: clamp(340px, 58vh, 560px); border-radius: calc(var(--radius) - 6px); background: #0d1a14; z-index: 0; }
.leaflet-container { font-family: var(--font-ui); }
.map-pin-wrap { background: none; border: 0; }
.map-pin { position: relative; display: flex; align-items: center; gap: 6px; transform: translate(0, 0); white-space: nowrap; cursor: pointer; }
.map-pin-dot {
  width: 28px; height: 28px; flex: none; border-radius: 50% 50% 50% 4px; transform: rotate(-45deg);
  background: linear-gradient(135deg, #f0d38f, #c99a3d); border: 2.5px solid #fff; box-shadow: 0 4px 12px rgba(0, 0, 0, .45);
}
.map-pin-dot { position: relative; }
.map-pin-dot::after { content: ""; position: absolute; left: 50%; top: 50%; width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; border-radius: 50%; background: #0f3d29; }
.map-pin-label {
  padding: 4px 10px; border-radius: 999px; font: 700 13px/1.2 var(--font-ui); color: #fff;
  background: rgba(7, 12, 22, .82); box-shadow: 0 2px 10px rgba(0, 0, 0, .4), inset 0 0 0 1px rgba(255, 236, 190, .35);
}
.map-pin:hover .map-pin-label, .map-pin:focus .map-pin-label { background: rgba(15, 61, 41, .92); }
.map-popup .leaflet-popup-content-wrapper {
  border-radius: 18px; color: var(--ink); background-color: var(--glass-fill); background-image: var(--glass-sheen);
  border: 1px solid var(--glass-edge); box-shadow: var(--lift); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
}
.map-popup .leaflet-popup-tip { background: var(--bg); box-shadow: none; }
.map-popup .leaflet-popup-content { margin: 14px 16px; font-size: 14.5px; line-height: 1.45; }
.map-popup a.leaflet-popup-close-button { color: var(--muted); width: 32px; height: 32px; font-size: 22px; line-height: 30px; top: 4px; right: 4px; }
.map-pop h3 { margin: 0 24px 2px 0; font: 600 18px/1.25 var(--font-display); }
.map-pop .sub { margin: 0 0 4px; color: var(--muted); font-size: 13.5px; }
.map-pop address { font-style: normal; color: var(--muted); margin: 4px 0 8px; }
.map-pop .held { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 10px; }
.map-pop .actions { display: flex; flex-wrap: wrap; gap: 8px; }
.map-pop .btn.primary, .map-pop .btn.primary:visited { color: var(--on-accent); }
.leaflet-control-attribution { font-size: 10px; }
.leaflet-bar a { width: 36px; height: 36px; line-height: 36px; }

/* Prayer times: all centers in one row on desktop, compact without shrinking the times much. */
.site main.wide { max-width: 1360px; }
@media (min-width: 1100px) {
  .site main.wide .topnav-spacer { display: none; }
  .times-row { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; align-items: start; }
  .times-row .pcard { padding: 18px 14px 14px; gap: 12px; }
  .times-row .pcard header { align-items: flex-start; gap: 8px; }
  .times-row .pcard h3 { font-size: 19px; }
  .times-row .pcard .sub { font-size: 13px; }
  .times-row .pcard header .btn { width: 38px; min-height: 38px; padding: 0; flex: none; border-radius: 12px; }
  .times-row .pcard header .btn .lbl { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .times-row .ptiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .times-row .ptile { padding: 12px 6px 10px; border-radius: 48px 48px 14px 14px; }
  .times-row .ptile .pn { font-size: 12.5px; }
  .times-row .ptile .ar { font-size: 16px; }
  .times-row .ptile .pt { font-size: 21px; }
  .times-row .pmeta { font-size: 12.5px; }
  .times-row .chip { font-size: 12px; padding: 3px 9px; }
  .times-row .changes { font-size: 12.5px; }
}

/* ---------- Chanda rates (Donate page) ---------- */
.rates { display: grid; gap: 14px; }
.rate-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); align-items: stretch; }
.rate-card { padding: 20px; display: grid; gap: 14px; align-content: start; }
.rate-card .eyebrow { margin: 0; }
.rate-rows { display: grid; gap: 10px; }
.rate { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 14px 16px; border-radius: 16px; background: var(--well); border: 1px solid var(--well-edge); }
.rname { font-weight: 700; font-size: 15.5px; }
.rval { font: 600 30px/1 var(--font-display); color: var(--accent-ink); text-align: right; font-variant-numeric: tabular-nums; }
.rval small { display: block; margin-top: 4px; font: 600 12px/1.2 var(--font-ui); color: var(--muted); letter-spacing: .02em; }
.money { position: relative; display: block; }
.money > span { position: absolute; left: 14px; top: 50%; translate: 0 -50%; font-weight: 700; color: var(--muted); pointer-events: none; }
.money input { padding-left: 30px; font-variant-numeric: tabular-nums; font-size: 18px; font-weight: 600; }
.calc-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.calc-table th, .calc-table td { padding: 10px 4px; border-bottom: 1px solid var(--line); text-align: right; }
.calc-table thead th { padding-top: 0; font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.calc-table tbody th, .calc-table tfoot th { text-align: left; font-weight: 600; font-size: 14.5px; color: var(--muted); }
.calc-table th small { display: block; font-size: 12px; font-weight: 600; color: var(--faint); }
.calc-table td { font-weight: 700; font-size: 15.5px; white-space: nowrap; }
.calc-table tfoot th, .calc-table tfoot td { border-bottom: 0; padding-top: 12px; }
.calc-table tfoot th { color: var(--ink); }
.calc-table tfoot td { font: 600 21px/1.1 var(--font-display); color: var(--accent-ink); }
.rate-card .hint { margin: 0; font-size: 13px; color: var(--muted); }

/* ---------- light statement arch (Midnight & Gold) ---------- */
:root[data-theme="light"] :is(.home-hero, .pagehead, .member .hero) {
  background-color: transparent; background-image: var(--hero-bg); border-color: transparent;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 22px 50px var(--hero-shadow);
}
:root[data-theme="light"] :is(.home-hero, .pagehead, .member .hero)::before { border-color: var(--hero-hair); }
:root[data-theme="light"] :is(.home-hero, .pagehead, .member .hero) .title { color: var(--hero-ink); }
:root[data-theme="light"] :is(.home-hero, .pagehead, .member .hero) :is(.lede, .hint) { color: var(--hero-muted); }
:root[data-theme="light"] :is(.home-hero, .pagehead, .member .hero) :is(.eyebrow, .bismillah) { color: var(--hero-accent); }
:root[data-theme="light"] :is(.home-hero, .pagehead, .member .hero) .pin { background: var(--hero-accent); box-shadow: 0 0 0 4px rgba(232, 198, 110, .2); }
:root[data-theme="light"] :is(.home-hero, .pagehead, .member .hero) .btn.primary { background-image: none; background-color: var(--hero-btn); color: var(--hero-btn-ink); box-shadow: 0 8px 20px rgba(0, 0, 0, .25); }
:root[data-theme="light"] :is(.home-hero, .pagehead, .member .hero) .btn:not(.primary) { background-color: transparent; color: var(--hero-ink); border-color: var(--hero-hair); box-shadow: none; }
:root[data-theme="light"] :is(.home-hero, .pagehead, .member .hero) a:not(.btn) { color: var(--hero-accent); }

/* ---------- phone menu: morphing dock (layout from morphing-menu.css; colours and placement here) ---------- */
.mm-dock { display: none; }
@media (max-width: 1020px) {
  .mm-dock {
    display: flex; justify-content: center; position: fixed; z-index: 40; left: 0; right: 0;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 14px); pointer-events: none;
  }
  .mm-dock .morphing-menu { pointer-events: auto; }
  .site main { padding-bottom: calc(110px + env(safe-area-inset-bottom, 0px)) !important; }
}
.mm-dock .morphing-menu {
  --mm-surface: var(--dock-surface); --mm-ink: var(--dock-ink); --mm-hover: var(--dock-hover); --mm-count: 6;
  font-family: var(--font-ui);
}
.mm-dock .morphing-menu__shell { box-shadow: var(--dock-shadow); }
.mm-dock .morphing-menu__shortcut[aria-current="page"], .mm-dock .morphing-menu__row[aria-current="page"] { color: var(--dock-active); }
.mm-dock .morphing-menu__shortcut { position: relative; }
.mm-dock .morphing-menu__shortcut[aria-current="page"]::after {
  content: ""; position: absolute; left: 50%; bottom: 5px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: currentColor;
}
.mm-dock .morphing-menu__row[aria-current="page"] { font-weight: 700; }
.mm-dock .morphing-menu__tooltip { background: var(--bg); color: var(--ink); }

/* Performance: cards sit on a smooth, static gradient, so a backdrop blur changes almost nothing visually
   but costs GPU work on every scroll frame. Keep blur only where content actually scrolls beneath. */
.glass { -webkit-backdrop-filter: none; backdrop-filter: none; }
.site .topnav .inner { -webkit-backdrop-filter: blur(16px) saturate(140%); backdrop-filter: blur(16px) saturate(140%); }
.ambient { contain: strict; }
.rates { grid-template-columns: minmax(0, 1fr); }
.rate-card, .rate-grid > * { min-width: 0; }
@media (max-width: 360px) {
  .rate-card { padding: 16px 14px; }
  .rval { font-size: 26px; }
  .calc-table td { font-size: 14px; }
  .calc-table tfoot td { font-size: 18px; }
}

/* Dock with names under the icons (taller, slightly wider than the reference's icon-only dock). */
.mm-dock .morphing-menu { --mm-button: 56px; --mm-inset: 5px; --mm-bar-width: min(348px, calc(100vw - 24px)); --mm-panel-width: min(260px, calc(100vw - 32px)); }
.mm-dock .morphing-menu__shortcut { flex-direction: column; gap: 3px; height: var(--mm-button); border-radius: 22px; }
.mm-dock .morphing-menu__shortcut .morphing-menu__icon svg { width: 22px; height: 22px; }
.mm-cap { font-size: 10.5px; line-height: 1; font-weight: 600; letter-spacing: .01em; white-space: nowrap; }
.mm-dock .morphing-menu__shortcut[aria-current="page"]::after, .mm-dock .morphing-menu__shortcut[aria-current="true"]::after { display: none; }
.mm-dock .morphing-menu__shortcut[aria-current="true"] { color: var(--dock-active); }
.mm-dock .morphing-menu__shortcut[aria-current="page"] .mm-cap { font-weight: 800; }
.mm-dock .morphing-menu__shortcut[data-menu-item="more"] circle { fill: currentColor; stroke: none; }
@media (max-width: 1020px) { .site main { padding-bottom: calc(120px + env(safe-area-inset-bottom, 0px)) !important; } }
.mm-dock .morphing-menu svg .fill { fill: currentColor; stroke: none; }
.mm-dock .morphing-menu svg .nostroke { stroke: none; }

/* The hidden list must never scroll: its resting rows sit 16px low, which made the panel scrollable and some
   phone browsers drew a thin scrollbar between Donate and More. */
.mm-dock .morphing-menu__panel { scrollbar-width: none; }
.mm-dock .morphing-menu__panel::-webkit-scrollbar { display: none; }
.mm-dock .morphing-menu__panel[aria-hidden="true"] { overflow: hidden; }
.income-mode { display: grid; grid-template-columns: 1fr 1fr; }
.income-mode button { min-height: 38px; font-size: 13.5px; }

/* Center picker and time tiles: clear selection and real lift from the card in both themes. */
.seg { border-color: var(--line-strong); }
.seg button { color: var(--ink); font-weight: 600; }
.seg button[aria-pressed="true"] {
  color: var(--on-accent); background-color: var(--accent); background-image: var(--btn-face); box-shadow: var(--btn-shadow);
}
.mini-times div { background: var(--raise); border-color: var(--raise-edge); box-shadow: var(--lift-sm); }
.mini-times span { color: var(--muted); }
.mini-times .is-next { background: var(--now); box-shadow: inset 0 0 0 1.5px var(--now-edge), var(--lift-sm); }

/* ---------- check-in pages: same look as the home page ---------- */
.member .bar.glass { padding: 8px 8px 8px 12px; border-radius: 20px; }
.member .bar .brand { text-decoration: none; }
:root[data-theme="light"] .member .hero :is(.who, .what b) { color: var(--hero-ink); }
:root[data-theme="light"] .member .hero .what { color: var(--hero-muted); }
:root[data-theme="light"] .member .hero .badge-icon.soft { background: rgba(232, 198, 110, .14); box-shadow: inset 0 0 0 1px rgba(232, 198, 110, .5); }
:root[data-theme="light"] .member .hero .badge-icon.soft svg { stroke: var(--hero-accent); }
:root[data-theme="light"] .member .hero .badge-icon .dot { fill: var(--hero-accent); }
:root[data-theme="light"] .member .hero .badge-icon.tick { box-shadow: 0 0 0 7px rgba(232, 198, 110, .16), 0 0 0 8px rgba(232, 198, 110, .55), 0 12px 26px rgba(0, 0, 0, .35); }
.member .rows { padding: 0; gap: 8px; background: none; border: 0; }
.member .rows li { min-height: 54px; border-radius: 16px; background: var(--raise); border: 1px solid var(--raise-edge); box-shadow: var(--lift-sm); }
.member .rows .now { background: var(--now); border-color: transparent; box-shadow: inset 0 0 0 1.5px var(--now-edge), var(--lift-sm); }
.member .rows .t { color: var(--ink); font-weight: 600; }
.member .sec { margin-top: 10px; }

/* ---------- Blessings of Salat: compiled passages ---------- */
.bl-toc { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.bl-toc .chip { text-decoration: none; padding: 7px 14px; font-size: 13.5px; }
.bl-section { display: grid; gap: 14px; scroll-margin-top: 90px; }
.bl-head { display: flex; align-items: center; gap: 20px; padding: 18px 20px; }
.bl-portrait { margin: 0; flex: none; width: 112px; aspect-ratio: 4 / 5; border-radius: 56px 56px 14px 14px; overflow: hidden;
  background: var(--well); box-shadow: inset 0 0 0 1px var(--hair), 0 10px 24px rgba(0, 0, 0, .25); position: relative; }
.bl-portrait::after { content: ""; position: absolute; inset: 4px; border-radius: 52px 52px 11px 11px; border: 1px solid rgba(232, 198, 110, .55); pointer-events: none; }
.bl-portrait img { width: 100%; height: 100%; object-fit: cover; object-position: center top; display: block; }
.bl-portrait.emblem { display: grid; place-items: center; background: var(--now); }
.bl-emblem svg { width: 60px; height: 60px; fill: none; stroke: var(--accent-ink); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.bl-head-text { min-width: 0; }
.bl-head-text .eyebrow { margin: 0 0 4px; }
.bl-head h2 { margin: 0; font: 600 clamp(22px, 4.6vw, 30px)/1.15 var(--font-display); letter-spacing: -.01em; }
.bl-name { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.bl-credit { margin: 4px 0 0; color: var(--faint); font-size: 12px; }
.bl-credit a { color: inherit; }
.bl-items { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr)); align-items: start; }
.bl-card { padding: 20px; display: grid; gap: 14px; min-width: 0; }
.bl-card h3 { margin: 0; display: flex; gap: 10px; align-items: baseline; font: 600 19px/1.3 var(--font-display); }
.bl-num { flex: none; display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; font: 700 13px/1 var(--font-ui);
  color: var(--on-accent); background-color: var(--accent); background-image: var(--btn-face); translate: 0 -2px; }
.bl-orig { margin: 0; text-align: right; color: var(--accent-ink); overflow-wrap: anywhere; }
.bl-orig.ar { font-family: var(--font-arabic); font-size: 26px; line-height: 2.1; }
.bl-orig.ur { font-family: "Noori Passages", "Noori Text", "Jameel Noori Nastaleeq", serif; font-size: 21px; line-height: 2.25;
  padding: 10px 14px; border-radius: 14px; background: var(--raise); border: 1px solid var(--raise-edge); }
.bl-en { margin: 0; padding: 12px 16px; border-radius: 14px; background: var(--well); border: 1px solid var(--well-edge); border-left: 3px solid var(--accent-ink); }
.bl-en p { margin: 0; font-size: 16px; line-height: 1.65; }
.bl-en p + p { margin-top: 10px; }
.bl-ref { margin: 0; font-size: 13.5px; color: var(--muted); }
.bl-ref span { display: block; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); margin-bottom: 2px; }
.bl-ref a { color: var(--link); }
.bl-links { display: flex; flex-wrap: wrap; gap: 8px; }
.bl-links .btn { font-size: 13px; }
.bl-links .btn svg { width: 14px; height: 14px; }
.bl-note { text-align: center; color: var(--faint); font-size: 13px; margin: 4px 0 0; }
@media (max-width: 480px) {
  .bl-head { gap: 14px; padding: 14px; }
  .bl-portrait { width: 86px; }
  .bl-card { padding: 16px; }
  .bl-orig.ar { font-size: 22px; }
  .bl-orig.ur { font-size: 19px; }
}

/* Full name in the top bar: wraps cleanly instead of pushing the theme button off narrow phones. */
.brand-text { min-width: 0; line-height: 1.2; text-wrap: balance; }
.brand { min-width: 0; }
@media (max-width: 400px) { .brand-text { font-size: 14px; } .brand-text small { font-size: 11.5px; } }
@media (max-width: 350px) { .brand-text { font-size: 12.5px; white-space: nowrap; } .brand-text small { font-size: 11px; } }
@media (min-width: 1021px) and (max-width: 1180px) { .site .topnav .brand-text { font-size: 13.5px; } .navlinks a { padding-inline: 10px; font-size: 13.5px; } }
/* Portraits: no gold line drawn over the photograph (the Qur'an emblem keeps its frame). */
.bl-portrait:not(.emblem)::after { display: none; }

/* Safari (iPhone, iPad, Mac) cannot shape Jameel Noori Nastaleeq correctly: it was built for Windows text engines,
   and letters come out unjoined in Apple's CoreText. Apple devices ship a working Nastaliq font, so use that there.
   `font: -apple-system-body` is only understood by WebKit on Apple platforms. */
@supports (font: -apple-system-body) {
  .bl-orig.ur, .prose .ar { font-family: "Noto Nastaliq Urdu", "Jameel Noori Nastaleeq", serif; line-height: 2.4; }
}
