/* All for Allah. Sand and parchment for the page, emerald for worship and action, brass only for "now".
   Arches and eight-point stars are the only ornaments. Light and dark follow the phone, the host page
   (data-theme) or the person's own choice (data-noor-theme). */

@font-face { font-family: "Amiri Quran"; src: url("fonts/AmiriQuran.woff") format("woff"); font-display: swap; }
@font-face { font-family: "El Messiri"; src: url("fonts/ElMessiri.woff") format("woff"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "Manrope"; src: url("fonts/Manrope.woff") format("woff"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Aref Ruqaa"; src: url("fonts/ArefRuqaa-Bold.woff") format("woff"); font-weight: 700; font-display: swap; }

:root {
  --sand: #f4ecdd; --parchment: #fbf7ee; --linen: #ebe0cc; --line: #dccfb6;
  --ink: #1c2b24; --muted: #686d5e; --emerald: #0b6b50; --emerald-deep: #06402f; --emerald-night: #042a20; --on-emerald: #fbf7ee;
  --emerald-soft: #dcebe0; --brass: #b98a2e; --brass-ink: #7d5a12; --brass-soft: #f1e2b8; --brass-bright: #e3c374;
  --rose: #b5475b; --danger: #a8321f; --on-danger: #fff7f2; --danger-soft: #f6ddd4;
  --shadow: 0 1px 0 rgb(255 255 255 / 0.7) inset, 0 10px 26px -14px rgb(74 52 12 / 0.28);
  --shadow-lift: 0 18px 40px -18px rgb(6 64 47 / 0.45);
  --r-xl: 30px; --r-lg: 22px; --r: 16px; --r-sm: 12px;
  --font-ui: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Arabic", "Noto Sans Devanagari", "Noto Sans Bengali", sans-serif;
  --font-display: "El Messiri", "Manrope", system-ui, "Noto Sans Devanagari", "Noto Sans Bengali", sans-serif;
  --font-quran: "Amiri Quran", "Noto Naskh Arabic", serif;
  --safe-t: var(--safe-area-inset-top, env(safe-area-inset-top, 0px));
  --safe-b: var(--safe-area-inset-bottom, env(safe-area-inset-bottom, 0px));
  --tabbar-h: 66px; --lh: 1.5;
  --girih: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 64 64'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='.07' stroke-width='1'%3E%3Crect x='18' y='18' width='28' height='28'/%3E%3Crect x='18' y='18' width='28' height='28' transform='rotate(45 32 32)'/%3E%3Cpath d='M0 32h12M52 32h12M32 0v12M32 52v12M0 0l9 9M64 0l-9 9M0 64l9-9M64 64l-9-9'/%3E%3C/g%3E%3C/svg%3E");
  --girih-ink: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 64 64'%3E%3Cg fill='none' stroke='%23b98a2e' stroke-opacity='.16' stroke-width='1'%3E%3Crect x='18' y='18' width='28' height='28'/%3E%3Crect x='18' y='18' width='28' height='28' transform='rotate(45 32 32)'/%3E%3Cpath d='M0 32h12M52 32h12M32 0v12M32 52v12M0 0l9 9M64 0l-9 9M0 64l9-9M64 64l-9-9'/%3E%3C/g%3E%3C/svg%3E");
  --arch: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M0 100V40C0 21 27 8 50 0C73 8 100 21 100 40V100Z'/%3E%3C/svg%3E");
  color-scheme: light;
}
:root[lang="ur"], :root[lang="hi"], :root[lang="bn"], :root[lang="ar"] { --lh: 1.7; }
:root[data-theme="dark"]:not([data-noor-theme="light"]), :root[data-noor-theme="dark"] {
  --sand: #0a1814; --parchment: #10231c; --linen: #173229; --line: #24443a;
  --ink: #f0e8d8; --muted: #a3ad9d; --emerald: #46c79b; --emerald-deep: #0a4a37; --emerald-night: #052a20; --on-emerald: #06231a;
  --emerald-soft: #14382d; --brass: #e3c374; --brass-ink: #e3c374; --brass-soft: #3a3115; --brass-bright: #e3c374;
  --rose: #ee8ea1; --danger: #f0a091; --on-danger: #2c0d06; --danger-soft: #3f1d15;
  --shadow: 0 10px 26px -14px rgb(0 0 0 / 0.6); --shadow-lift: 0 18px 40px -18px rgb(0 0 0 / 0.7);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-noor-theme="light"]) {
    --sand: #0a1814; --parchment: #10231c; --linen: #173229; --line: #24443a;
    --ink: #f0e8d8; --muted: #a3ad9d; --emerald: #46c79b; --emerald-deep: #0a4a37; --emerald-night: #052a20; --on-emerald: #06231a;
    --emerald-soft: #14382d; --brass: #e3c374; --brass-ink: #e3c374; --brass-soft: #3a3115; --brass-bright: #e3c374;
    --rose: #ee8ea1; --danger: #f0a091; --on-danger: #2c0d06; --danger-soft: #3f1d15;
    --shadow: 0 10px 26px -14px rgb(0 0 0 / 0.6); --shadow-lift: 0 18px 40px -18px rgb(0 0 0 / 0.7);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--sand); }
body { margin: 0; background: var(--sand); color: var(--ink); font: 500 16px/var(--lh) var(--font-ui); -webkit-tap-highlight-color: transparent; overflow-wrap: break-word; -webkit-font-smoothing: antialiased; }
body.sheet-open { overflow: hidden; }
a { color: var(--emerald); text-underline-offset: 0.18em; }
h1, h2, h3, p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
img, svg { display: block; }
b, strong { font-weight: 750; }
:focus-visible { outline: 3px solid var(--brass); outline-offset: 2px; border-radius: 8px; }
[dir="rtl"] .icon.flip { transform: scaleX(-1); }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; inset-inline-start: -9999px; top: 8px; z-index: 100; background: var(--parchment); padding: 10px 14px; border-radius: 10px; }
.skip:focus { inset-inline-start: 8px; }
.small { font-size: 0.85rem; } .muted { color: var(--muted); } .center { text-align: center; } .pad { padding: 12px 16px; }
.lede { color: var(--muted); font-size: 0.98rem; }
.h2 { font: 700 1.35rem/1.3 var(--font-display); }
.brand { font: 700 1.28rem/1.1 var(--font-display); letter-spacing: 0.01em; white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- frame ---------- */

.app { max-width: 560px; margin: 0 auto; min-height: 100dvh; position: relative; background: var(--sand); }
.screen { min-height: 100dvh; display: flex; flex-direction: column; animation: enter 0.24s ease-out; }
@keyframes enter { from { opacity: 0; transform: translateY(6px); } }
.appbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 6px; min-height: calc(60px + var(--safe-t)); padding: var(--safe-t) 10px 0;
  background: color-mix(in srgb, var(--sand) 88%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.appbar-mark { display: inline-grid; place-items: center; width: 44px; height: 44px; }
.appbar-title { flex: 1; min-width: 0; font: 700 1.3rem/1.2 var(--font-display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; outline: none; padding-inline-start: 6px; }
.appbar-actions { display: flex; align-items: center; gap: 2px; }
.content { flex: 1; display: flex; flex-direction: column; gap: 18px; padding: 8px 16px calc(var(--tabbar-h) + 40px + var(--safe-b)); outline: none; }
.no-tabs .content { padding-bottom: calc(28px + var(--safe-b)); }
.has-audio .content { padding-bottom: calc(var(--tabbar-h) + 112px + var(--safe-b)); }
.mark { display: block; flex: none; border-radius: 22%; }
.logo { display: block; width: auto; max-width: 100%; }

.tabbar { position: fixed; z-index: 20; bottom: calc(10px + var(--safe-b)); left: 50%; transform: translateX(-50%); width: min(calc(100% - 24px), 536px); height: var(--tabbar-h);
  display: grid; grid-template-columns: repeat(5, 1fr); padding: 0 6px; border-radius: 24px; border: 1px solid var(--line);
  background: color-mix(in srgb, var(--parchment) 92%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: 0 14px 34px -14px rgb(40 30 8 / 0.42); }
.tabbar a { position: relative; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--muted); text-decoration: none; font-size: 0.7rem; font-weight: 700; }
/* a label never runs into the next one: on narrow phones (360 px) "All for Allah" and "Community" touched */
.tabbar a > span:not(.tab-ic) { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 400px) { .tabbar { padding: 0 2px; } .tabbar a { font-size: 0.62rem; letter-spacing: -0.01em; } .tabbar a .tab-ic { width: 46px; } }
.tabbar a .tab-ic { display: grid; place-items: center; width: 52px; height: 30px; border-radius: 15px; transition: background 0.2s, color 0.2s; }
.tabbar a.on { color: var(--emerald); }
.tabbar a.on .tab-ic { background: var(--emerald); color: var(--on-emerald); }
.tab-dot { position: absolute; top: 9px; inset-inline-end: calc(50% - 22px); width: 9px; height: 9px; border-radius: 50%; background: var(--brass); border: 2px solid var(--parchment); }

/* ---------- controls ---------- */

.icon-btn { position: relative; display: inline-grid; place-items: center; flex: none; width: 44px; height: 44px; border: 0; border-radius: 999px; background: none; color: var(--ink); cursor: pointer; text-decoration: none; transition: transform 0.12s; }
.icon-btn:active { transform: scale(0.92); }
.icon-btn.solid { background: var(--parchment); border: 1px solid var(--line); }
.icon-btn.on { color: var(--brass-ink); }
.icon-btn.on .icon path { fill: color-mix(in srgb, var(--brass) 35%, transparent); }
.icon-btn.small { width: 34px; height: 34px; }
.icon-btn:disabled { opacity: 0.4; cursor: default; }
.badge-dot { position: absolute; top: 4px; inset-inline-end: 2px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: var(--brass); color: #231a05; font: 800 0.66rem/18px var(--font-ui); text-align: center; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 22px; border: 1px solid transparent; border-radius: 999px; font-weight: 750; font-size: 0.97rem; line-height: 1.2; text-decoration: none; cursor: pointer; text-align: center; transition: transform 0.12s, background 0.15s; }
.btn:active:not(:disabled) { transform: scale(0.97); }
.btn:disabled { opacity: 0.45; cursor: default; }
.btn[aria-busy="true"] { opacity: 0.7; }
.btn-primary { background: var(--emerald); color: var(--on-emerald); box-shadow: 0 10px 20px -12px var(--emerald); }
.btn-quiet { background: var(--parchment); border-color: var(--line); color: var(--ink); }
.btn-danger { background: var(--danger); color: var(--on-danger); }
.btn-text { background: none; color: var(--emerald); padding: 0 10px; min-height: 44px; }
.btn-brass { background: var(--brass-bright); color: #2a1f06; }
.btn.wide { width: 100%; } .btn.small { min-height: 38px; padding: 0 14px; font-size: 0.86rem; }
.btn-row { display: flex; gap: 8px; align-items: center; } .btn-row.wrap { flex-wrap: wrap; }

.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field > label, .field-label { font-weight: 700; font-size: 0.88rem; }
input, select, textarea { width: 100%; min-height: 50px; padding: 11px 15px; font-size: 16px; line-height: 1.4; border: 1px solid var(--line); border-radius: 14px; background: var(--parchment); color: var(--ink); }
textarea { min-height: 104px; resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { border-color: var(--emerald); outline: 2px solid color-mix(in srgb, var(--emerald) 28%, transparent); outline-offset: 0; }
input[type="checkbox"], input[type="radio"] { width: 22px; height: 22px; min-height: 0; padding: 0; accent-color: var(--emerald); flex: none; margin: 1px 0 0; }
input[type="range"] { padding: 0; border: 0; background: none; accent-color: var(--emerald); min-height: 44px; }
.has-error input, .has-error textarea { border-color: var(--danger); }
.hint { margin: 0; font-size: 0.84rem; color: var(--muted); }
.error-text { margin: 0; font-size: 0.9rem; color: var(--danger); font-weight: 700; }
.check, .radio { display: flex; gap: 12px; align-items: flex-start; min-height: 44px; padding: 8px 0; cursor: pointer; }
.radios { border: 0; padding: 0; margin: 0 0 8px; } .radios legend { font-weight: 700; margin-bottom: 4px; padding: 0; } .radios .radio { min-height: 40px; padding: 6px 0; }
.switch-row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; }
.switch-label { flex: 1; display: grid; gap: 2px; cursor: pointer; font-weight: 700; } .switch-label .hint { font-weight: 500; }
input.switch { appearance: none; -webkit-appearance: none; position: relative; width: 52px; height: 32px; min-height: 0; padding: 0; border: 0; border-radius: 16px; background: color-mix(in srgb, var(--muted) 38%, var(--linen)); cursor: pointer; flex: none; transition: background 0.2s; }
input.switch::before { content: ""; position: absolute; top: 4px; inset-inline-start: 4px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: inset-inline-start 0.18s; }
input.switch:checked { background: var(--emerald); } input.switch:checked::before { inset-inline-start: 24px; }
.segmented { display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--linen); overflow-x: auto; scrollbar-width: none; }
.segmented::-webkit-scrollbar, .chips::-webkit-scrollbar, .hscroll::-webkit-scrollbar { display: none; }
.segmented button { flex: 1 0 auto; min-height: 40px; padding: 0 14px; border: 0; border-radius: 999px; background: none; color: var(--muted); font-weight: 750; font-size: 0.88rem; white-space: nowrap; cursor: pointer; }
.segmented button.on { background: var(--parchment); color: var(--emerald); box-shadow: 0 2px 8px -4px rgb(40 30 8 / 0.35); }
.searchbar { display: flex; align-items: center; gap: 8px; padding: 0 6px 0 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--parchment); color: var(--muted); box-shadow: var(--shadow); }
[dir="rtl"] .searchbar { padding: 0 16px 0 6px; }
.searchbar:focus-within { border-color: var(--emerald); }
.searchbar input { flex: 1; border: 0; outline: 0; background: none; padding: 0; min-height: 52px; color: var(--ink); min-width: 0; }
.disclosure { margin: 4px 0 12px; } .disclosure summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; color: var(--emerald); font-weight: 750; cursor: pointer; list-style: none; }
.disclosure summary::-webkit-details-marker { display: none; }
.disclosure summary::after { content: ''; flex: none; width: 8px; height: 8px; margin: 0 6px 4px; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(45deg); opacity: 0.6; transition: transform 0.18s ease; }
.disclosure[open] > summary::after { transform: rotate(-135deg); margin-bottom: -2px; }
.hint.under-grid { margin: -8px 0 14px; }
.adjust-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 10px; align-items: end; }
.adjust-grid.two, .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; align-items: end; }
.grid2 > *, .adjust-grid > * { min-width: 0; }
.grid2 input, .grid2 select { min-width: 0; max-width: 100%; }
/* date and time pickers need the full width on a phone */
@media (max-width: 520px) { .grid2.dates { grid-template-columns: 1fr; } }
@media (max-width: 359px) { .grid2, .adjust-grid.two { grid-template-columns: 1fr; } .adjust-grid { grid-template-columns: 1fr 1fr; } }
.form-actions { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 8px; }
.sticky-actions { position: sticky; bottom: calc(var(--tabbar-h) + 22px + var(--safe-b)); padding-top: 8px; }
.export { font: 12px/1.45 ui-monospace, Menlo, monospace; min-height: 240px; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--parchment); color: var(--ink); font-weight: 700; font-size: 0.86rem; text-decoration: none; cursor: pointer; white-space: nowrap; flex: none; }
.chip.on { background: var(--emerald); border-color: var(--emerald); color: var(--on-emerald); }
.chips, .hscroll { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 16px; margin: 0 -16px; scroll-snap-type: x proximity; }
.tag { display: inline-block; padding: 2px 9px; border-radius: 999px; background: var(--linen); color: var(--muted); font-size: 0.72rem; font-weight: 750; }
.tag .icon { display: inline-block; vertical-align: -1.5px; }
.tag-tile { background: var(--emerald-soft); color: var(--emerald); } .tag-brass { background: var(--brass-soft); color: var(--brass-ink); }

/* ---------- groups, rows, cards ---------- */

.group { display: grid; gap: 10px; }
.group-title { font: 700 1.16rem/1.3 var(--font-display); padding-inline-start: 2px; }
.group-body { background: var(--parchment); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow); }
.group-note { font-size: 0.84rem; color: var(--muted); padding: 0 4px; }
.row { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 60px; padding: 10px 16px; border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--ink); text-decoration: none; text-align: start; cursor: pointer; }
div.row { cursor: default; }
.group-body > .row:last-child { border-bottom: 0; }
.row:active { background: color-mix(in srgb, var(--linen) 55%, transparent); }
.row.danger { color: var(--danger); }
.row-icon { display: inline-grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 13px; background: var(--emerald-soft); color: var(--emerald); }
.row.danger .row-icon { background: var(--danger-soft); color: var(--danger); }
.row.locked .row-icon { background: var(--linen); color: var(--muted); }
.row-text { flex: 1; min-width: 0; display: grid; gap: 1px; } .row-title { font-weight: 700; } .row-sub { font-size: 0.84rem; color: var(--muted); }
.row-chev { color: var(--muted); flex: none; margin-inline-start: auto; }
.group-body .tips { margin: 0; padding: 12px 16px; padding-inline-start: 34px; display: grid; gap: 6px; font-size: 0.93rem; }
.group-body .lang-list { padding: 4px 16px; display: grid; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.see-all { font-weight: 750; text-decoration: none; font-size: 0.9rem; white-space: nowrap; }
.card { background: var(--parchment); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; box-shadow: var(--shadow); }
a.card { color: var(--ink); text-decoration: none; display: block; }
.card.continue { display: flex; align-items: center; gap: 14px; color: var(--ink); text-decoration: none; }
.card.continue > .icon:first-child { color: var(--emerald); flex: none; }
.card.continue > span { flex: 1; display: grid; min-width: 0; } .card.continue small { color: var(--muted); font-size: 0.82rem; }
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r); background: var(--emerald-soft); font-size: 0.92rem; }
.notice > .icon { flex: none; color: var(--emerald); margin-top: 2px; }
.notice-warn { background: var(--brass-soft); } .notice-warn > .icon { color: var(--brass-ink); }
.empty { display: grid; justify-items: center; gap: 10px; padding: 30px 16px; text-align: center; color: var(--muted); }
.empty-icon { width: 64px; height: 72px; display: grid; place-items: center; padding-top: 10px; background: var(--emerald-soft); color: var(--emerald); -webkit-mask: var(--arch) center / 100% 100% no-repeat; mask: var(--arch) center / 100% 100% no-repeat; }
.loading { display: flex; gap: 10px; align-items: center; justify-content: center; padding: 28px 0; color: var(--muted); }
.spinner { width: 18px; height: 18px; border: 2px solid var(--line); border-top-color: var(--emerald); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.skel { border-radius: var(--r); background: linear-gradient(100deg, var(--linen) 30%, var(--parchment) 50%, var(--linen) 70%) 0 0 / 200% 100%; animation: shimmer 1.3s linear infinite; min-height: 84px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- sheets, dialogs, toasts ---------- */

.sheet-backdrop { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; background: rgb(4 20 15 / 0.55); animation: fade 0.18s; }
@keyframes fade { from { opacity: 0; } }
.sheet-backdrop.center { align-items: center; }
.sheet { width: 100%; max-width: 560px; max-height: 90dvh; overflow-y: auto; background: var(--sand); border-radius: 28px 28px 0 0; padding: 6px 16px calc(20px + var(--safe-b)); animation: rise 0.26s cubic-bezier(0.2, 0.9, 0.3, 1); outline: none; }
.sheet::before { content: ""; display: block; width: 40px; height: 4px; border-radius: 2px; background: var(--line); margin: 4px auto 0; }
.sheet-head { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 0; background: var(--sand); }
.sheet-head h2 { font: 700 1.2rem/1.3 var(--font-display); }
.dialog { width: min(92vw, 400px); background: var(--parchment); border-radius: 24px; padding: 22px; animation: rise 0.2s ease-out; }
.dialog h2 { font: 700 1.25rem/1.3 var(--font-display); margin-bottom: 8px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.menu { display: grid; padding-bottom: 6px; }
.menu-item { display: flex; align-items: center; gap: 14px; min-height: 54px; padding: 0 10px; border: 0; border-radius: 14px; background: none; color: var(--ink); text-decoration: none; text-align: start; cursor: pointer; font-weight: 700; }
.menu-item:active { background: var(--linen); } .menu-item.danger { color: var(--danger); }
.toast { position: fixed; z-index: 60; left: 50%; bottom: calc(var(--tabbar-h) + 26px + var(--safe-b)); transform: translateX(-50%); width: max-content; max-width: min(92vw, 500px); padding: 12px 18px; border-radius: 16px; background: var(--emerald-deep); color: #fbf7ee; font-weight: 700; font-size: 0.92rem; box-shadow: var(--shadow-lift); animation: toastin 0.22s ease-out; }
.no-tabs .toast { bottom: calc(20px + var(--safe-b)); }
@keyframes rise { from { transform: translateY(24px); opacity: 0; } }
@keyframes toastin { from { transform: translate(-50%, 12px); opacity: 0; } }

/* ---------- artwork ---------- */

.arch { position: relative; display: block; overflow: hidden; background: var(--emerald-night); -webkit-mask: var(--arch) center / 100% 100% no-repeat; mask: var(--arch) center / 100% 100% no-repeat; }
.arch img { width: 100%; height: 100%; object-fit: cover; }
.art-cover { width: 100%; height: 100%; object-fit: cover; }
.plate { display: grid; place-items: center; padding-top: 8px; width: 58px; height: 66px; background: var(--emerald-soft); color: var(--emerald); -webkit-mask: var(--arch) center / 100% 100% no-repeat; mask: var(--arch) center / 100% 100% no-repeat; }
.plate.brass { background: var(--brass-soft); color: var(--brass-ink); }
.plate.deep { background: var(--emerald-deep); color: var(--brass-bright); }

/* ---------- home ---------- */

.home .content { padding-top: 0; gap: 20px; }
.hero { position: relative; margin: 0 -16px; padding: calc(var(--safe-t) + 8px) 18px 18px; border-radius: 0 0 var(--r-xl) var(--r-xl); color: #f7f1e3;
  background: var(--girih), linear-gradient(165deg, #0b6b50 0%, #06402f 58%, #042a20 100%); box-shadow: var(--shadow-lift); overflow: hidden; }
.hero a { color: inherit; }
.hero-bar { display: flex; align-items: center; gap: 4px; margin: 0 -8px 6px; }
.hero-bar .brand { flex: 1; display: flex; align-items: center; gap: 8px; color: #fbf7ee; padding-inline-start: 6px; }
.hero-bar .icon-btn { color: #f7f1e3; }

.greet-hello { font: 700 1.55rem/1.25 var(--font-display); }
.greet-date { display: flex; flex-wrap: wrap; gap: 0 12px; color: #c9d8cc; font-size: 0.9rem; margin-top: 2px; }
.greet-hijri { color: var(--brass-bright); font-weight: 700; }
.hero-main { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: end; margin-top: 14px; }
.hero-next { display: grid; gap: 2px; min-width: 0; padding-bottom: 6px; }
.hero-place { display: inline-flex; align-items: center; gap: 5px; color: #c9d8cc; text-decoration: none; font-size: 0.86rem; font-weight: 700; min-height: 30px; }
.hero-label { color: #c9d8cc; font-size: 0.86rem; }
.hero-prayer { font: 700 1.5rem/1.2 var(--font-display); }
.hero-clock { font: 700 3.1rem/1 var(--font-display); letter-spacing: -0.01em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hero-clock small { font-size: 1.1rem; font-weight: 600; margin-inline-start: 4px; letter-spacing: 0; }
.hero-count { justify-self: start; margin-top: 8px; padding: 5px 12px; border-radius: 999px; background: rgb(227 195 116 / 0.16); color: var(--brass-bright); font-weight: 750; font-size: 0.86rem; }
.hero-arch { width: 132px; height: 178px; padding: 3px; background: linear-gradient(180deg, #e3c374, #9a7524); -webkit-mask: var(--arch) center / 100% 100% no-repeat; mask: var(--arch) center / 100% 100% no-repeat; }
.hero-arch .arch { width: 100%; height: 100%; }
.hero-times { list-style: none; margin: 16px 0 0; padding: 6px; display: grid; grid-template-columns: repeat(6, 1fr); gap: 2px; border-radius: 20px; background: rgb(255 255 255 / 0.08); border: 1px solid rgb(255 255 255 / 0.1); }
.hero-times li { display: grid; justify-items: center; gap: 3px; padding: 8px 2px; border-radius: 14px; min-width: 0; }
.hero-times .pi { color: #c9d8cc; }
.hero-times span { color: #c9d8cc; font-size: 0.68rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.hero-times time { font-weight: 800; font-size: 0.8rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hero-times li.next { background: #fbf7ee; color: #06402f; } .hero-times li.next span, .hero-times li.next .pi { color: #0b6b50; }
.hero-times li.past { opacity: 0.62; }
.hero-links { display: flex; gap: 8px; margin-top: 12px; }
.hero-links a { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; border-radius: 999px; background: rgb(255 255 255 / 0.1); text-decoration: none; font-weight: 750; font-size: 0.84rem; }
.hero-empty { display: grid; gap: 12px; justify-items: start; margin-top: 12px; } .hero-lede { color: #c9d8cc; }
.preview-note { display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 12px; border-radius: 14px; background: var(--emerald-soft); font-size: 0.82rem; }
.preview-note > span { flex: 1; } .preview-note > .icon { color: var(--emerald); flex: none; }

.tracker { display: grid; gap: 12px; }
.tracker-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tracker-head h2 { font: 700 1.08rem/1.3 var(--font-display); }
.streak { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; background: var(--brass-soft); color: var(--brass-ink); font-weight: 800; font-size: 0.82rem; }
.tracker-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.tick { display: grid; justify-items: center; gap: 6px; padding: 10px 2px; border: 1px solid var(--line); border-radius: 16px; background: var(--sand); color: var(--muted); font-weight: 750; font-size: 0.74rem; cursor: pointer; transition: transform 0.12s, background 0.2s; }
.tick:active { transform: scale(0.94); }
.tick .tick-ring { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; border: 2px dashed var(--line); color: transparent; }
.tick.on { background: var(--emerald-soft); border-color: transparent; color: var(--emerald); }
.tick.on .tick-ring { border: 0; background: var(--emerald); color: var(--on-emerald); animation: pop 0.3s ease-out; }
.tick.due .tick-ring { border-color: var(--brass); }
@keyframes pop { 40% { transform: scale(1.18); } }

.plates { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px 6px; }
.plates a { display: grid; justify-items: center; gap: 7px; color: var(--ink); text-decoration: none; font-size: 0.76rem; font-weight: 750; text-align: center; line-height: 1.25; transition: transform 0.12s; }
.plates a:active { transform: scale(0.94); }

.verse-card { position: relative; display: grid; gap: 12px; padding: 22px 18px 16px; border-radius: var(--r-lg); background: var(--girih-ink), var(--parchment); border: 1px solid var(--brass); outline: 1px solid var(--brass); outline-offset: -6px; box-shadow: var(--shadow); text-align: center; }
.verse-card h2 { font: 700 0.95rem/1.3 var(--font-display); color: var(--brass-ink); }
.verse-card .ayah-ar { text-align: center; font-size: 1.6rem; }
.verse-card .ayah-tr { text-align: center; }
.verse-ref { font-weight: 750; font-size: 0.88rem; text-decoration: none; }
.verse-actions { display: flex; justify-content: center; gap: 4px; }
.card.ring-card, a.card.ring-card { display: flex; align-items: center; gap: 14px; }
.ring { position: relative; flex: none; width: 58px; height: 58px; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 6; stroke: var(--linen); } .ring circle + circle { stroke: var(--emerald); stroke-linecap: round; transition: stroke-dashoffset 0.5s; }
.ring b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 0.8rem; font-variant-numeric: tabular-nums; }
.ring-card > span { flex: 1; min-width: 0; display: grid; } .ring-card small { color: var(--muted); font-size: 0.82rem; }
.art-card { position: relative; display: flex; align-items: flex-end; min-height: 150px; padding: 16px; border-radius: var(--r-lg); overflow: hidden; color: #fbf7ee; text-decoration: none; box-shadow: var(--shadow-lift); background: var(--emerald-deep); }
.art-card > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.art-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgb(4 42 32 / 0) 30%, rgb(4 42 32 / 0.86) 100%); }
.art-card > span { position: relative; z-index: 1; display: grid; gap: 2px; } .art-card b { font: 700 1.25rem/1.25 var(--font-display); } .art-card small { color: #d7e3d9; font-size: 0.86rem; }
.mini-list { display: grid; gap: 8px; }
.mini { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r); background: var(--parchment); border: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.mini .plate { width: 42px; height: 48px; padding-top: 6px; flex: none; }
.mini > span { flex: 1; min-width: 0; display: grid; } .mini small { color: var(--muted); font-size: 0.82rem; } .mini .km { color: var(--muted); font-size: 0.84rem; font-weight: 700; white-space: nowrap; }
.date-chip { display: grid; justify-items: center; flex: none; width: 48px; padding: 6px 0; border-radius: 13px; background: var(--emerald); color: var(--on-emerald); line-height: 1.1; }
.date-chip b { font: 700 1.15rem/1 var(--font-display); } .date-chip small { font-size: 0.66rem !important; font-weight: 800; color: inherit !important; }

/* ---------- onboarding ---------- */

.onboarding { background: var(--emerald-night); color: #f7f1e3; }
.onb-art { position: relative; height: 44dvh; min-height: 280px; }
.onb-art > img { width: 100%; height: 100%; object-fit: cover; }
.onb-brand .logo { height: 52px; width: auto; filter: drop-shadow(0 2px 6px rgb(0 0 0 / 0.25)); }
.onb-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgb(4 42 32 / 0.25) 0%, rgb(4 42 32 / 0) 40%, var(--emerald-night) 100%); }
.onb-brand { position: absolute; z-index: 1; top: calc(var(--safe-t) + 18px); inset-inline-start: 20px; display: flex; align-items: center; gap: 10px; color: #fbf7ee; }

.onboarding .content { margin-top: -34px; position: relative; z-index: 1; padding: 0 20px calc(24px + var(--safe-b)); gap: 16px; }
.onboarding section { display: grid; gap: 14px; }
.onb-steps { list-style: none; display: flex; gap: 6px; margin: 0; padding: 0; }
.onb-steps li { width: 26px; height: 4px; border-radius: 2px; background: rgb(255 255 255 / 0.22); transition: width 0.25s, background 0.25s; }
.onb-steps li.on { width: 44px; background: var(--brass-bright); } .onb-steps li.done { background: var(--brass-bright); }
.onb-h { font: 700 1.75rem/1.25 var(--font-display); }
.onboarding .lede, .onb-tag { color: #c9d8cc; }
.onboarding input, .onboarding .city { background: rgb(255 255 255 / 0.08); border-color: rgb(255 255 255 / 0.16); color: #f7f1e3; }
.onboarding .field > label { color: #f7f1e3; } .onboarding .hint, .onboarding .small.muted { color: #a9bdb0; }
.onboarding .btn-primary { background: var(--brass-bright); color: #2a1f06; box-shadow: none; }
.onboarding .btn-quiet { background: rgb(255 255 255 / 0.1); border-color: rgb(255 255 255 / 0.2); color: #f7f1e3; }
.onboarding .btn-text, .onboarding a { color: var(--brass-bright); }
.onboarding .notice { background: rgb(255 255 255 / 0.1); } .onboarding .notice > .icon { color: var(--brass-bright); }
.lang-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.lang-opt { min-height: 62px; border: 1px solid rgb(255 255 255 / 0.18); border-radius: 18px; background: rgb(255 255 255 / 0.07); font-size: 1.12rem; font-weight: 750; cursor: pointer; color: #f7f1e3; }
.lang-opt.on { border-color: var(--brass-bright); box-shadow: inset 0 0 0 2px var(--brass-bright); color: var(--brass-bright); }
.onb-legal { display: flex; gap: 16px; justify-content: center; margin-top: auto; }
.locpick { display: grid; gap: 4px; }
.city-results { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 6px; }
.city { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 50px; padding: 0 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--parchment); text-align: start; cursor: pointer; color: inherit; }
.city span { font-weight: 700; } .city small { color: inherit; opacity: 0.7; margin-inline-start: auto; }
.city.on { border-color: var(--emerald); box-shadow: inset 0 0 0 1px var(--emerald); } .onboarding .city.on { border-color: var(--brass-bright); box-shadow: inset 0 0 0 1px var(--brass-bright); }

/* ---------- prayer ---------- */

.place-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: 0.88rem; }
.daynav { display: flex; align-items: center; gap: 6px; padding: 6px; border-radius: var(--r-lg); background: var(--parchment); border: 1px solid var(--line); box-shadow: var(--shadow); }
.daynav-mid { flex: 1; display: grid; text-align: center; } .daynav-mid strong { font: 700 1.05rem/1.3 var(--font-display); } .daynav-mid span { font-size: 0.84rem; color: var(--brass-ink); font-weight: 700; }
.times-list { list-style: none; margin: 0; padding: 6px; display: grid; gap: 4px; border-radius: var(--r-lg); background: var(--parchment); border: 1px solid var(--line); box-shadow: var(--shadow); }
.times-list li { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 0 12px; border-radius: 16px; }
.times-list .pi { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--emerald-soft); color: var(--emerald); flex: none; }
.tl-name { flex: 1; font-weight: 750; } .tl-time { font: 700 1.2rem/1 var(--font-display); font-variant-numeric: tabular-nums; }
.tl-count { color: var(--brass-bright); font-size: 0.8rem; font-weight: 750; }
.times-list li.next { background: linear-gradient(120deg, #0b6b50, #06402f); color: #fbf7ee; } .times-list li.next .pi { background: rgb(255 255 255 / 0.14); color: var(--brass-bright); }
.times-list li.minor { color: var(--muted); } .times-list li.minor .tl-time { font-weight: 500; font-size: 1.02rem; }
.times-list .bell { color: var(--muted); } .times-list li.next .bell { color: #fbf7ee; } .times-list .bell.on { color: var(--emerald); } .times-list li.next .bell.on { color: var(--brass-bright); }
.table-wrap { overflow-x: auto; border-radius: var(--r-lg); background: var(--parchment); border: 1px solid var(--line); }
.week { width: 100%; border-collapse: collapse; font-size: 0.84rem; font-variant-numeric: tabular-nums; }
.week th, .week td { padding: 10px 7px; text-align: center; border-bottom: 1px solid var(--line); white-space: nowrap; }
.week thead th { color: var(--muted); font-weight: 750; font-size: 0.76rem; white-space: normal; line-height: 1.25; } .week tbody th { font-weight: 750; text-align: start; }
.week tr:last-child th, .week tr:last-child td { border-bottom: 0; } .week tr.today { background: var(--emerald-soft); }
.week.audit td { white-space: normal; text-align: start; font-size: 0.8rem; }
.qibla-stage { display: grid; justify-items: center; gap: 6px; padding: 22px 16px; border-radius: var(--r-xl); color: #f7f1e3; background: var(--girih), linear-gradient(165deg, #0b6b50, #042a20); box-shadow: var(--shadow-lift); }
.compass { width: min(76vw, 300px); aspect-ratio: 1; }
.compass svg { width: 100%; height: 100%; overflow: visible; }
.cp-ring { fill: rgb(255 255 255 / 0.06); stroke: rgb(255 255 255 / 0.25); stroke-width: 1.5; }
.cp-tick { stroke: rgb(255 255 255 / 0.45); stroke-width: 1; } .cp-tick.major { stroke: #fbf7ee; stroke-width: 2; }
.cp-dir { font: 800 13px var(--font-ui); fill: #c9d8cc; } .cp-dir.north { fill: var(--brass-bright); }
.cp-needle { stroke: var(--brass-bright); stroke-width: 3; stroke-linecap: round; }
.cp-kaaba { fill: #101012; stroke: var(--brass-bright); stroke-width: 1.5; } .cp-kaaba-band { stroke: var(--brass-bright); stroke-width: 3; }
.cp-hub { fill: #fbf7ee; } .cp-heading { fill: #fbf7ee; }
.qibla-deg { text-align: center; display: grid; } .qibla-deg strong { font: 700 3rem/1.05 var(--font-display); font-variant-numeric: tabular-nums; } .qibla-deg span { color: #c9d8cc; font-size: 0.88rem; }
.qibla-stage .muted { color: #c9d8cc; } .qibla-stage.aligned { background: var(--girih), linear-gradient(165deg, #b98a2e, #7d5a12); }
.cal { padding: 10px; border-radius: var(--r-lg); background: var(--parchment); border: 1px solid var(--line); box-shadow: var(--shadow); }
.cal-head, .cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-head { text-align: center; font-size: 0.74rem; font-weight: 750; color: var(--muted); padding: 4px 0 6px; }
.cal-cell { min-height: 48px; display: grid; place-content: center; text-align: center; border-radius: 13px; line-height: 1.15; }
.cal-cell b { font: 700 1.05rem/1.1 var(--font-display); } .cal-cell small { font-size: 0.66rem; color: var(--muted); }
.cal-cell.today { background: var(--emerald); color: var(--on-emerald); } .cal-cell.today small { color: inherit; opacity: 0.8; }
.cal-cell.marked { box-shadow: inset 0 0 0 2px var(--brass); } .cal-cell.fasted { background: var(--emerald-soft); }
.cal-keys { list-style: none; margin: 0; padding: 0 4px; display: grid; gap: 4px; font-size: 0.92rem; } .cal-keys b { color: var(--brass-ink); margin-inline-end: 6px; }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat { display: grid; gap: 2px; padding: 12px 10px; border-radius: var(--r); background: var(--parchment); border: 1px solid var(--line); text-align: center; }
.stat b { font: 700 1.5rem/1.1 var(--font-display); font-variant-numeric: tabular-nums; } .stat small { color: var(--muted); font-size: 0.76rem; font-weight: 700; }

/* ---------- library and Quran ---------- */

.shelf-hero { position: relative; display: grid; align-content: end; min-height: 236px; margin: 0 -16px; padding: 18px; color: #fbf7ee; text-decoration: none; overflow: hidden; border-radius: 0 0 var(--r-xl) var(--r-xl);
  background: linear-gradient(165deg, #0b6b50, #06402f 60%, #042a20); box-shadow: var(--shadow-lift); }
.shelf-hero img { position: absolute; inset: 0 -14% 0 auto; width: 80%; height: 100%; object-fit: cover; object-position: 50% 68%; -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 46%); mask-image: linear-gradient(90deg, transparent 0, #000 46%); }
[dir="rtl"] .shelf-hero img { inset: 0 auto 0 -14%; -webkit-mask-image: linear-gradient(270deg, transparent 0, #000 46%); mask-image: linear-gradient(270deg, transparent 0, #000 46%); }
.shelf-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgb(4 42 32 / 0.82) 0%, rgb(4 42 32 / 0) 64%), linear-gradient(180deg, rgb(4 42 32 / 0) 60%, rgb(4 42 32 / 0.5) 100%); }
[dir="rtl"] .shelf-hero::after { background: linear-gradient(270deg, rgb(4 42 32 / 0.82) 0%, rgb(4 42 32 / 0) 64%), linear-gradient(180deg, rgb(4 42 32 / 0) 60%, rgb(4 42 32 / 0.5) 100%); }
.shelf-hero > :not(img) { position: relative; z-index: 1; max-width: 60%; text-shadow: 0 1px 10px rgb(4 42 32 / 0.7); } .shelf-hero > p { max-width: 52%; }
.shelf-hero h2 { font: 700 1.7rem/1.2 var(--font-display); } .shelf-hero p { color: #d7e3d9; font-size: 0.9rem; margin-top: 4px; }
.shelf-hero .btn { justify-self: start; margin-top: 12px; max-width: none; }
.surah-list { list-style: none; margin: 0; padding: 0; border-radius: var(--r-lg); background: var(--parchment); border: 1px solid var(--line); overflow: hidden; box-shadow: var(--shadow); }
.surah-list a { display: flex; align-items: center; gap: 14px; min-height: 68px; padding: 8px 14px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.surah-list li:last-child a { border-bottom: 0; } .surah-list a:active { background: var(--linen); }
.star-no { position: relative; flex: none; display: inline-grid; place-items: center; width: 42px; height: 42px; }
.star-no svg { position: absolute; inset: 0; width: 100%; height: 100%; fill: var(--emerald-soft); stroke: var(--emerald); stroke-width: 1.2; }
.star-no span { position: relative; font-size: 0.76rem; font-weight: 800; color: var(--emerald); font-variant-numeric: tabular-nums; }
.sl-text { flex: 1; min-width: 0; display: grid; } .sl-text b { font-weight: 750; } .sl-text small { color: var(--muted); font-size: 0.82rem; display: flex; align-items: center; gap: 5px; }
.sl-ar { font-family: var(--font-quran); font-size: 1.4rem; color: var(--emerald); line-height: 1.6; }
.reader { --qs: 1; } .reader.size-1 { --qs: 0.85; } .reader.size-3 { --qs: 1.18; } .reader.size-4 { --qs: 1.36; } .reader.size-5 { --qs: 1.6; }
.reader.paper-sepia { --sand: #f1e4c8; --parchment: #f7ecd4; } .reader.paper-sepia .content, .reader.paper-sepia .appbar { background: #f1e4c8; }
.surah-head { position: relative; display: grid; gap: 2px; justify-items: center; text-align: center; padding: 26px 18px 20px; border-radius: var(--r-xl); color: #fbf7ee; background: var(--girih), linear-gradient(165deg, #0b6b50, #042a20); box-shadow: var(--shadow-lift); outline: 1px solid rgb(227 195 116 / 0.55); outline-offset: -7px; }
.sh-ar { font-family: var(--font-quran); font-size: 2.2rem; color: var(--brass-bright); line-height: 1.7; }
.sh-en { font: 700 1.3rem/1.3 var(--font-display); } .sh-meta { color: #c9d8cc; font-size: 0.88rem; }
.surah-head .btn { margin-top: 12px; }
.basmala { font-family: var(--font-quran); font-size: calc(1.8rem * var(--qs)); text-align: center; color: var(--emerald); line-height: 2; }
.ayahs { display: grid; }
.ayah { display: grid; gap: 10px; padding: 18px 0 4px; border-bottom: 1px solid var(--line); scroll-margin-top: calc(70px + var(--safe-t)); }
.ayah { border-radius: 14px; background-color: transparent; }
.ayah.playing { background-color: color-mix(in srgb, var(--emerald-soft) 85%, transparent); }
.ayah-ar { font-family: var(--font-quran); font-size: calc(1.65rem * var(--qs, 1)); line-height: calc(2.15 + var(--ls, 0)); text-align: right; color: var(--ink); }
.ayah-no { font-family: var(--font-quran); color: var(--brass-ink); margin-inline-start: 0.25em; white-space: nowrap; }
.sajda { color: var(--brass-ink); margin-inline-start: 0.2em; }
.ayah-tr { font-size: calc(1rem * (0.6 + var(--qs, 1) * 0.4)); line-height: 1.7; color: var(--ink); opacity: 0.88; }
.ayah-tr[dir="rtl"], .va-tr[dir="rtl"] { font-family: "Noto Nastaliq Urdu", "Noto Naskh Arabic", var(--font-ui); line-height: 2.2; text-align: right; }
.ayah-note { display: flex; gap: 6px; align-items: flex-start; padding: 8px 10px; border: 0; border-radius: 12px; background: var(--brass-soft); color: var(--ink); text-align: start; font-size: 0.9rem; white-space: pre-wrap; cursor: pointer; }
.ayah-actions { display: flex; align-items: center; margin-inline-start: -8px; color: var(--muted); } .ayah-actions .icon-btn { color: var(--muted); }
.ayah-ref { margin-inline-end: auto; padding-inline-start: 8px; color: var(--muted); font-size: 0.8rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.surah-nav { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.sources { display: grid; gap: 6px; padding-top: 12px; border-top: 1px solid var(--line); }
.size-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 14px; } .size-sample { font-family: var(--font-quran); font-size: calc(1.6rem * var(--qs, 1)); }
.results { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.results li > a { display: grid; gap: 6px; padding: 14px; border-radius: var(--r); background: var(--parchment); border: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.results li.with-action { display: flex; gap: 4px; align-items: flex-start; } .results li.with-action > a { flex: 1; min-width: 0; }
.res-ref { color: var(--emerald); font-weight: 800; font-size: 0.88rem; }
.res-text.rtl { font-family: var(--font-quran); font-size: 1.3rem; line-height: 2; text-align: right; } .res-text[lang="ur"] { font-family: "Noto Nastaliq Urdu", "Noto Naskh Arabic", var(--font-ui); font-size: 1rem; }
mark { background: var(--brass-soft); color: inherit; border-radius: 3px; padding: 0 1px; }

.audiobar { position: fixed; z-index: 19; left: 50%; transform: translateX(-50%); bottom: calc(var(--tabbar-h) + 18px + var(--safe-b)); width: min(calc(100% - 24px), 536px); display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 14px; border-radius: 20px; background: var(--emerald-deep); color: #fbf7ee; box-shadow: var(--shadow-lift); }
.no-tabs .audiobar { bottom: calc(12px + var(--safe-b)); }
.audiobar .ab-text { flex: 1; min-width: 0; display: grid; border: 0; background: none; color: inherit; text-align: start; cursor: pointer; padding: 0; } .audiobar b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 0.92rem; } .audiobar small { color: #c9d8cc; font-size: 0.76rem; }
.audiobar .icon-btn { color: #fbf7ee; } .audiobar .icon-btn.play { background: var(--brass-bright); color: #2a1f06; }
.player-art { width: 150px; height: 200px; margin: 6px auto 12px; padding: 3px; background: linear-gradient(180deg, #e3c374, #9a7524); -webkit-mask: var(--arch) center / 100% 100% no-repeat; mask: var(--arch) center / 100% 100% no-repeat; }
.player-art .arch { width: 100%; height: 100%; }
.player-ctl { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 10px 0; }
.player-ctl .play { width: 64px; height: 64px; background: var(--emerald); color: var(--on-emerald); }

/* ---------- map ---------- */

.mapscreen .content { padding: 0; gap: 0; }
.mapbox { position: relative; height: calc(100dvh - var(--tabbar-h) - 20px - var(--safe-b)); min-height: 420px; overflow: hidden; background: #cfe3dc; touch-action: none; }
.mapbox canvas.atlas { position: absolute; inset: 0; width: 100%; height: 100%; }
.mapbox .ola { position: absolute; inset: 0; }
.map-markers { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.pin { position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 38px; height: 44px; margin: -44px 0 0 -19px; padding-bottom: 8px; border: 0; background: none; color: #fbf7ee; cursor: pointer; pointer-events: auto; filter: drop-shadow(0 4px 5px rgb(4 42 32 / 0.35)); transition: scale 0.15s; transform-origin: 50% 100%; }
.pin::before { content: ""; position: absolute; inset: 0; background: var(--pin, #0b6b50); clip-path: path("M19 44C19 44 2 28 2 17A17 17 0 0 1 36 17C36 28 19 44 19 44Z"); }
.pin .icon { position: relative; } .pin.on { scale: 1.25; z-index: 3; } .pin.on::before { background: var(--brass); }
.pin.unverified::before { background: #7b8a80; } .pin.pending::before { background: #b98a2e; }
.cluster { position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 44px; height: 44px; margin: -22px 0 0 -22px; border: 3px solid #fbf7ee; border-radius: 50%; background: #0b6b50; color: #fbf7ee; font-weight: 800; font-size: 0.86rem; cursor: pointer; pointer-events: auto; box-shadow: 0 6px 14px -6px rgb(4 42 32 / 0.6); }
.me-dot { position: absolute; left: 0; top: 0; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; background: #1f7ae0; border: 3px solid #fff; box-shadow: 0 0 0 8px rgb(31 122 224 / 0.2); }
.map-top { position: absolute; z-index: 5; top: calc(var(--safe-t) + 10px); left: 12px; right: 12px; display: grid; gap: 8px; pointer-events: none; }
.map-top > * { pointer-events: auto; }
.map-top .chips { margin: 0 -12px; padding: 2px 12px; } .map-top .chip { box-shadow: 0 6px 14px -8px rgb(4 42 32 / 0.5); }
.map-suggest { list-style: none; margin: 0; padding: 6px; border-radius: 18px; background: var(--parchment); border: 1px solid var(--line); box-shadow: var(--shadow-lift); max-height: 46dvh; overflow-y: auto; }
.map-suggest button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 6px 10px; border: 0; border-radius: 12px; background: none; text-align: start; cursor: pointer; }
.map-suggest button:active { background: var(--linen); } .map-suggest small { color: var(--muted); display: block; font-size: 0.8rem; }
.map-side { position: absolute; z-index: 4; inset-inline-end: 12px; bottom: 150px; display: grid; gap: 8px; }
.map-side .icon-btn { background: var(--parchment); border: 1px solid var(--line); box-shadow: 0 8px 18px -10px rgb(4 42 32 / 0.55); width: 46px; height: 46px; }
.map-bottom { position: absolute; z-index: 5; left: 12px; right: 12px; bottom: 12px; display: grid; gap: 8px; }
.map-attrib { justify-self: start; padding: 2px 8px; border-radius: 8px; background: color-mix(in srgb, var(--parchment) 80%, transparent); font-size: 0.66rem; color: var(--muted); }
.place-card { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center; padding: 12px; border-radius: 22px; background: var(--parchment); border: 1px solid var(--line); box-shadow: var(--shadow-lift); animation: rise 0.22s ease-out; }
.place-card .arch { width: 68px; height: 84px; display: grid; place-items: center; padding-top: 12px; color: var(--brass-bright); background: linear-gradient(180deg, #0b6b50, #042a20); }
.place-card h3 { font: 700 1.1rem/1.25 var(--font-display); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.place-card p { color: var(--muted); font-size: 0.84rem; } .place-card .btn-row { grid-column: 1 / -1; }
.place-card .btn { flex: 1; }
.map-list { display: grid; gap: 8px; padding: 12px 16px calc(var(--tabbar-h) + 40px + var(--safe-b)); }
.map-toolbar { display: flex; gap: 8px; align-items: center; justify-content: space-between; }
.verified { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--emerald); color: var(--on-emerald); flex: none; } .verified .icon { stroke-width: 3.2; }
.org-cover { position: relative; height: 190px; margin: 0 -16px; overflow: hidden; border-radius: 0 0 var(--r-xl) var(--r-xl); background: var(--emerald-deep); }
.org-cover img { width: 100%; height: 100%; object-fit: cover; }
.org-head { display: flex; gap: 14px; align-items: flex-start; margin-top: -46px; position: relative; z-index: 1; }
.org-head .arch { width: 76px; height: 92px; flex: none; display: grid; place-items: center; padding-top: 14px; color: var(--brass-bright); background: linear-gradient(180deg, #0b6b50, #042a20); box-shadow: 0 0 0 4px var(--sand); }
.org-head h2 { font: 700 1.4rem/1.2 var(--font-display); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 10px 14px; padding: 14px 16px; align-items: start; } .kv .icon { color: var(--emerald); margin-top: 2px; } .kv a { word-break: break-all; }
.minimap { height: 150px; border-radius: var(--r-lg); overflow: hidden; position: relative; border: 1px solid var(--line); }
/* the essentials of MapLibre's stylesheet, for the Ola Maps canvas */
.maplibregl-map { position: relative; overflow: hidden; font: 12px/20px var(--font-ui); -webkit-tap-highlight-color: transparent; }
.maplibregl-canvas { position: absolute; left: 0; top: 0; } .maplibregl-canvas-container.maplibregl-interactive { cursor: grab; user-select: none; }
.maplibregl-ctrl-top-left, .maplibregl-ctrl-top-right, .maplibregl-ctrl-bottom-left, .maplibregl-ctrl-bottom-right { position: absolute; pointer-events: none; z-index: 2; }
.maplibregl-ctrl-top-left { top: 0; left: 0; } .maplibregl-ctrl-top-right { top: 0; right: 0; } .maplibregl-ctrl-bottom-left { bottom: 96px; left: 0; } .maplibregl-ctrl-bottom-right { bottom: 96px; right: 0; }
.maplibregl-ctrl { clear: both; pointer-events: auto; margin: 0 10px 6px; } .maplibregl-ctrl-attrib { background: rgb(255 255 255 / 0.6); padding: 0 6px; border-radius: 6px; font-size: 10px; } .maplibregl-ctrl-attrib-button { display: none; }

/* ---------- community ---------- */

.composer { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 60px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--parchment); color: var(--muted); text-align: start; cursor: pointer; box-shadow: var(--shadow); }
.composer-text { flex: 1; } .composer > .icon { color: var(--emerald); }
.fab { position: fixed; z-index: 18; inset-inline-end: max(16px, calc(50% - 264px)); bottom: calc(var(--tabbar-h) + 26px + var(--safe-b)); display: inline-flex; align-items: center; gap: 8px; min-height: 54px; padding: 0 20px; border: 0; border-radius: 999px; background: var(--emerald); color: var(--on-emerald); font-weight: 800; box-shadow: var(--shadow-lift); cursor: pointer; }
.feed { display: grid; gap: 12px; }
.post { display: grid; gap: 10px; padding: 16px 16px 4px; border-radius: var(--r-lg); background: var(--parchment); border: 1px solid var(--line); box-shadow: var(--shadow); }
.post.compact { padding-bottom: 14px; }
.post-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-inline-end: -10px; }
.post-author { display: flex; gap: 10px; min-width: 0; color: var(--ink); text-decoration: none; }
.post-who { display: grid; gap: 1px; min-width: 0; }
.name-line { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; min-width: 0; } .name { font-weight: 800; } .username { color: var(--muted); font-size: 0.84rem; }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 0.8rem; color: var(--muted); } .post-meta .icon { display: inline; vertical-align: -2px; margin-inline-end: 2px; }
.post-body { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.6; color: var(--ink); text-decoration: none; }
.post.compact .post-body { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.post-actions { display: flex; gap: 2px; margin: 0 -10px; border-top: 1px solid var(--line); padding-top: 2px; }
.act { display: inline-flex; align-items: center; gap: 6px; min-height: 46px; padding: 0 12px; border: 0; border-radius: 999px; background: none; color: var(--muted); font-weight: 750; font-size: 0.9rem; text-decoration: none; cursor: pointer; }
.act.on { color: var(--rose); } .act.on .icon path { fill: currentColor; } .act.on .icon { animation: pop 0.3s ease-out; }
.verse-att { display: grid; gap: 6px; padding: 14px; border-radius: var(--r); background: var(--girih-ink), var(--sand); border: 1px solid var(--brass-soft); color: var(--ink); text-decoration: none; }
.verse-att .ayah-ar { font-size: 1.4rem; line-height: 2; } .va-tr { font-size: 0.92rem; color: var(--muted); } .va-ref { color: var(--emerald); font-weight: 800; font-size: 0.84rem; }
.avatar { display: inline-grid; place-items: center; flex: none; border-radius: 36%; color: #fff; font-weight: 800; line-height: 1; user-select: none; font-family: var(--font-display); }
.tone-0 { background: #0b6b50; } .tone-1 { background: #b98a2e; } .tone-2 { background: #2f6f8a; } .tone-3 { background: #7a4f8f; } .tone-4 { background: #a9485a; } .tone-5 { background: #5d7a2f; }
.people ul, .people-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.people a, .people-list a, .people-list > li > div { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r); background: var(--parchment); border: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.comments { display: grid; gap: 10px; } .comments ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.comment { display: flex; gap: 10px; } .comment.reply { margin-inline-start: 40px; }
.comment-main { flex: 1; min-width: 0; padding: 9px 13px; border-radius: 6px 18px 18px 18px; background: var(--parchment); border: 1px solid var(--line); }
[dir="rtl"] .comment-main { border-radius: 18px 6px 18px 18px; }
.comment-main p { margin: 4px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.comment-head { display: flex; justify-content: space-between; gap: 8px; } .comment-head time { font-size: 0.78rem; color: var(--muted); white-space: nowrap; }
.comment-actions { display: flex; gap: 16px; }
.link { min-height: 32px; padding: 0; border: 0; background: none; color: var(--emerald); font-weight: 750; font-size: 0.85rem; cursor: pointer; }
.comment-form { position: sticky; bottom: calc(var(--tabbar-h) + 14px + var(--safe-b)); padding: 8px; margin: 0 -4px; border-radius: 28px; background: color-mix(in srgb, var(--sand) 92%, transparent); backdrop-filter: blur(10px); }
.comment-row { display: flex; gap: 6px; align-items: flex-end; } .comment-row textarea { min-height: 50px; border-radius: 25px; padding: 13px 16px; resize: none; }
.icon-btn.send { background: var(--emerald); color: var(--on-emerald); width: 50px; height: 50px; } .replying { color: var(--muted); margin-bottom: 6px; padding: 0 8px; }
.notifs { list-style: none; margin: 0; padding: 0; border-radius: var(--r-lg); background: var(--parchment); border: 1px solid var(--line); overflow: hidden; box-shadow: var(--shadow); }
.notifs a { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.notifs li:last-child a { border-bottom: 0; } .notifs a > span { flex: 1; display: grid; } .notifs time { font-size: 0.8rem; color: var(--muted); } .notifs a > .icon { color: var(--muted); }
.notifs li.unread a { background: var(--emerald-soft); }
.event-card { display: flex; align-items: flex-start; gap: 12px; padding: 12px; border-radius: var(--r-lg); background: var(--parchment); border: 1px solid var(--line); color: var(--ink); text-decoration: none; box-shadow: var(--shadow); }
.event-card > span { flex: 1; min-width: 0; display: grid; gap: 2px; } .event-card b { font: 700 1.05rem/1.3 var(--font-display); } .event-card small { color: var(--muted); font-size: 0.82rem; }
.group-card { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: var(--r-lg); background: var(--parchment); border: 1px solid var(--line); color: var(--ink); text-decoration: none; box-shadow: var(--shadow); }
.group-card > span { flex: 1; min-width: 0; display: grid; gap: 2px; } .group-card small { color: var(--muted); font-size: 0.82rem; }
.thread { display: grid; gap: 8px; padding-bottom: 8px; }
.bubble { max-width: 82%; padding: 9px 14px; border-radius: 18px 18px 18px 6px; background: var(--parchment); border: 1px solid var(--line); justify-self: start; white-space: pre-wrap; overflow-wrap: anywhere; }
.bubble.mine { justify-self: end; border-radius: 18px 18px 6px 18px; background: var(--emerald); color: var(--on-emerald); border-color: transparent; }
.bubble time { display: block; font-size: 0.68rem; opacity: 0.7; margin-top: 2px; }

/* ---------- profile ---------- */

.cover { position: relative; height: 150px; margin: 0 -16px; overflow: hidden; border-radius: 0 0 var(--r-xl) var(--r-xl); background: var(--girih), linear-gradient(165deg, #0b6b50, #042a20); }
.cover img { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.9; }
.profile-top { display: grid; justify-items: center; gap: 6px; margin-top: -52px; position: relative; z-index: 1; text-align: center; }
.profile-top .avatar { box-shadow: 0 0 0 5px var(--sand); }
.profile-top .name-line { justify-content: center; font-size: 1.2rem; } .profile-top .name { font: 700 1.4rem/1.2 var(--font-display); }
.profile-head { display: flex; align-items: center; gap: 16px; } .bio { white-space: pre-wrap; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0; border-radius: var(--r-lg); background: var(--parchment); border: 1px solid var(--line); box-shadow: var(--shadow); }
.stats div, .stats a { display: grid; text-align: center; padding: 12px 4px; color: var(--ink); text-decoration: none; } .stats dt, .stats small { order: 2; font-size: 0.78rem; color: var(--muted); font-weight: 700; } .stats dd, .stats b { margin: 0; font: 700 1.3rem/1.2 var(--font-display); font-variant-numeric: tabular-nums; }
.me-card { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: var(--r-lg); background: var(--parchment); border: 1px solid var(--line); color: var(--ink); text-decoration: none; box-shadow: var(--shadow); }
.me-card > span:not(.avatar) { flex: 1; display: grid; gap: 4px; justify-items: start; min-width: 0; }
.guest-card { display: grid; gap: 10px; justify-items: start; padding: 20px 18px; border-radius: var(--r-xl); color: #f7f1e3; background: var(--girih), linear-gradient(165deg, #0b6b50, #042a20); box-shadow: var(--shadow-lift); }
.guest-card h2 { font: 700 1.4rem/1.25 var(--font-display); } .guest-card p { color: #c9d8cc; } .guest-card .btn-quiet { background: rgb(255 255 255 / 0.12); border-color: transparent; color: #fbf7ee; } .guest-card .btn-primary { background: var(--brass-bright); color: #2a1f06; box-shadow: none; }
.version { text-align: center; }

/* ---------- tools ---------- */

.tasbih { display: grid; justify-items: center; gap: 14px; padding: 22px 16px 18px; border-radius: var(--r-xl); color: #f7f1e3; background: var(--girih), linear-gradient(165deg, #0b6b50, #042a20); box-shadow: var(--shadow-lift); }
.tasbih-ar { font-family: var(--font-quran); font-size: 2rem; line-height: 1.9; color: var(--brass-bright); text-align: center; }
.tasbih-tr { color: #c9d8cc; text-align: center; font-size: 0.92rem; }
.tasbih-hint { color: #a9c2b4; font-size: 0.8rem; text-align: center; min-height: 1.3em; }
.bead { position: relative; display: grid; place-content: center; justify-items: center; gap: 2px; width: 236px; height: 236px; border: 0; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #12835f, #06402f 70%); color: #fbf7ee; cursor: pointer; box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.08), 0 22px 40px -18px #000; transition: transform 0.08s; touch-action: manipulation; user-select: none; -webkit-tap-highlight-color: transparent; }
.bead:active { transform: scale(0.97); } .bead:disabled { cursor: default; opacity: 1; }
.bead svg { position: absolute; inset: -12px; width: calc(100% + 24px); height: calc(100% + 24px); pointer-events: none; }
.bead circle { fill: rgb(255 255 255 / 0.16); transition: fill 0.2s, r 0.2s; } .bead circle.lit { fill: var(--brass-bright); filter: drop-shadow(0 0 3px rgb(227 195 116 / 0.7)); }
.bead .digits { min-width: 2.4ch; padding: 4px 16px 6px; border-radius: 14px; background: rgb(2 22 16 / 0.55); box-shadow: inset 0 2px 6px rgb(0 0 0 / 0.5), 0 1px 0 rgb(255 255 255 / 0.08); color: #f3e2ae; font: 700 3.6rem/1 var(--font-ui); font-variant-numeric: tabular-nums; letter-spacing: 0.04em; text-align: center; }
.bead small { color: #c9d8cc; font-weight: 700; }
.kalimas { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.kalima { display: grid; gap: 7px; align-content: start; padding: 12px 8px 10px; border-radius: var(--r); border: 1px solid var(--line); background: var(--parchment); color: var(--ink); text-align: start; cursor: pointer; min-width: 0; }
.kalima.on { border-color: var(--emerald); box-shadow: 0 0 0 1.5px var(--emerald), var(--shadow); }
.kalima-name { font-weight: 800; font-size: clamp(0.7rem, 3.1vw, 0.84rem); line-height: 1.25; overflow-wrap: anywhere; }
.kalima-bar { height: 6px; border-radius: 6px; background: var(--linen); overflow: hidden; } .kalima-bar i { display: block; height: 100%; border-radius: 6px; background: var(--brass); transition: width 0.25s; }
.kalima-status { display: flex; align-items: center; gap: 4px; color: var(--muted); font-size: 0.76rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.kalima.done .kalima-bar i { background: var(--emerald); } .kalima.done .kalima-status { color: var(--emerald); }
.tasbih.done-card { padding: 34px 20px 30px; } .tasbih.done-card h2 { color: #fbf7ee; font-family: var(--font-display); font-size: 1.5rem; text-align: center; }
.done-star { display: grid; place-items: center; width: 74px; height: 74px; border-radius: 50%; background: rgb(227 195 116 / 0.16); color: var(--brass-bright); box-shadow: 0 0 0 8px rgb(227 195 116 / 0.07); }
.btn-row.center { justify-content: center; }
.dua { display: grid; gap: 10px; padding: 16px; border-radius: var(--r-lg); background: var(--parchment); border: 1px solid var(--line); box-shadow: var(--shadow); }
.dua .ayah-ar { font-size: 1.55rem; } .dua-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.quiz-q { font: 700 1.3rem/1.4 var(--font-display); }
.quiz-opts { display: grid; gap: 10px; }
.quiz-opt { display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 10px 16px; border: 1px solid var(--line); border-radius: 18px; background: var(--parchment); text-align: start; font-weight: 700; cursor: pointer; }
.quiz-opt.right { background: var(--emerald-soft); border-color: var(--emerald); } .quiz-opt.wrong { background: var(--danger-soft); border-color: var(--danger); }
.quiz-bar { height: 6px; border-radius: 3px; background: var(--linen); overflow: hidden; } .quiz-bar i { display: block; height: 100%; background: var(--emerald); border-radius: 3px; transition: width 0.3s; }
.wish-canvas { width: 100%; max-width: 360px; aspect-ratio: 4 / 5; margin: 0 auto; border-radius: 18px; box-shadow: var(--shadow-lift); display: block; }
.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.swatch { width: 42px; height: 42px; border-radius: 50%; border: 3px solid var(--parchment); box-shadow: 0 0 0 1px var(--line); cursor: pointer; } .swatch.on { box-shadow: 0 0 0 3px var(--brass); }
.tmpl { flex: none; width: 84px; display: grid; gap: 4px; justify-items: center; border: 0; background: none; font-size: 0.74rem; font-weight: 750; cursor: pointer; color: var(--ink); }
.tmpl canvas { width: 84px; height: 105px; border-radius: 12px; border: 2px solid var(--line); } .tmpl.on canvas { border-color: var(--brass); }
.ask-msg { display: grid; gap: 8px; } .ask-msg.you { justify-items: end; }
.result { display: grid; gap: 8px; padding: 18px; border-radius: var(--r-lg); background: var(--parchment); border: 1px solid var(--emerald); box-shadow: var(--shadow); }
.result-dl { display: grid; gap: 8px; margin: 0; } .result-dl div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.result-dl dt { color: var(--muted); } .result-dl dd { margin: 0; font-weight: 800; font-variant-numeric: tabular-nums; }
.result-dl .due dd { font: 700 1.6rem/1.2 var(--font-display); color: var(--emerald); } .result .big { font: 700 1.2rem/1.4 var(--font-display); }
.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 0; }
.kpis div { display: grid; padding: 12px; border-radius: var(--r); background: var(--parchment); border: 1px solid var(--line); } .kpis dt { order: 2; font-size: 0.8rem; color: var(--muted); } .kpis dd { margin: 0; font: 700 1.6rem/1.2 var(--font-display); font-variant-numeric: tabular-nums; }
.admin-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; } .admin-list .card { display: grid; gap: 8px; } .admin-list h3 { font: 700 1.08rem/1.3 var(--font-display); }
.quote { margin: 0; padding: 10px 12px; border-radius: 12px; border-inline-start: 3px solid var(--brass); background: var(--sand); display: grid; gap: 4px; }
.prose { display: grid; gap: 10px; line-height: 1.65; } .prose h2 { font: 700 1.15rem/1.3 var(--font-display); margin-top: 10px; } .prose ul { margin: 0; padding-inline-start: 1.25em; display: grid; gap: 6px; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
@media (min-width: 600px) { body { background: var(--linen); } .app { box-shadow: 0 0 0 1px var(--line); } }

/* ---------- fixed-size parts inside flexible cards ---------- */
.mini > .plate, .mini > .km, .mini > .avatar, .mini > .date-chip, .group-card > .plate, .group-card > .avatar, .group-card > .tag, .event-card > .date-chip,
.ring-card > .ring, .notifs a > .avatar, .me-card > .avatar { flex: none; }
.library .content { padding-top: 0; }
.library .shelf-hero { padding-top: calc(var(--safe-t) + 18px); min-height: calc(var(--safe-t) + 236px); }
.me .content { padding-top: 0; }
.cover .cover-bar { position: absolute; z-index: 2; top: var(--safe-t); left: 6px; right: 6px; display: flex; justify-content: flex-end; }
.cover .cover-bar .icon-btn { color: #fbf7ee; }
.map-route { position: absolute; inset: 0; width: 100%; height: 100%; }
.map-route polyline { fill: none; stroke: var(--brass-bright); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.map-route polyline.casing { stroke: #06402f; stroke-width: 8; }
.map-cross { position: absolute; left: 50%; top: 50%; z-index: 3; width: 38px; height: 44px; margin: -44px 0 0 -19px; pointer-events: none; color: #fbf7ee; display: grid; place-items: center; padding-bottom: 8px; filter: drop-shadow(0 4px 5px rgb(4 42 32 / 0.4)); }
.map-cross::before { content: ""; position: absolute; inset: 0; background: var(--brass); clip-path: path("M19 44C19 44 2 28 2 17A17 17 0 0 1 36 17C36 28 19 44 19 44Z"); }
.map-cross .icon { position: relative; }
.mapbox.mini { height: 190px; min-height: 0; border-radius: var(--r-lg); border: 1px solid var(--line); }
.mapbox.pick { height: 280px; min-height: 0; border-radius: var(--r-lg); border: 1px solid var(--line); }
.map-count { justify-self: start; display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: var(--parchment); border: 1px solid var(--line); box-shadow: 0 8px 18px -10px rgb(4 42 32 / 0.55); font-weight: 750; font-size: 0.86rem; }
.map-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.map-bar .btn { box-shadow: 0 8px 18px -10px rgb(4 42 32 / 0.55); }
.map-top .searchbar .icon-btn { width: 40px; height: 40px; }
.place-card .x { position: absolute; top: 6px; inset-inline-end: 6px; }
.place-card { position: relative; }
.bars { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; align-items: end; height: 120px; }
.unread-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--brass); flex: none; }
.bubble-wrap { display: grid; }
.bubble .link { color: inherit; text-decoration: underline; min-height: 24px; font-size: 0.74rem; }
.sub-nav { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.sub-nav a { position: relative; display: grid; justify-items: center; gap: 6px; padding: 12px 4px 10px; border-radius: var(--r); background: var(--parchment); border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: 0.76rem; font-weight: 750; text-align: center; box-shadow: var(--shadow); }
.sub-nav a .icon { color: var(--emerald); }
.sub-nav .badge-dot { top: 6px; inset-inline-end: 10px; }
.org-head > div { min-width: 0; display: grid; gap: 4px; margin-top: 54px; }

/* ---------- Quran Khani ---------- */
.khani-hero { display: block; min-height: 0; padding: 0; }
.khani-hero > img { object-position: 78% 60%; opacity: 0.55; }
.khani-hero::after { background: linear-gradient(100deg, rgb(4 42 32 / 0.94) 25%, rgb(4 42 32 / 0.45) 100%); }
[dir="rtl"] .khani-hero::after { background: linear-gradient(260deg, rgb(4 42 32 / 0.94) 25%, rgb(4 42 32 / 0.45) 100%); }
.khani-hero > div { position: relative; z-index: 1; display: grid; gap: 10px; padding: 22px 18px 18px; }
.khani-hero h2 { font: 700 1.4rem/1.25 var(--font-display); color: #fbf7ee; } .khani-hero p { color: #d7e3d9; font-size: 0.92rem; max-width: 34ch; }
.khani-hero .btn-quiet { background: rgb(255 255 255 / 0.12); color: #fbf7ee; border-color: rgb(255 255 255 / 0.28); }
.khani-card { align-items: center; gap: 14px; color: var(--ink); text-decoration: none; } .khani-card b { font-size: 1rem; line-height: 1.3; overflow-wrap: anywhere; } .khani-card > .icon { color: var(--muted); flex: none; }
.steps { margin: 0; padding: 4px 16px 6px 36px; display: grid; gap: 10px; color: var(--ink); } [dir="rtl"] .steps { padding: 4px 36px 6px 16px; } .steps li::marker { color: var(--brass); font-weight: 800; }
.khani-preview { display: flex; align-items: center; gap: 8px; margin: -4px 0 14px; padding: 10px 12px; border-radius: var(--r); background: var(--emerald-soft); color: var(--ink); font-weight: 800; overflow-wrap: anywhere; } .khani-preview .icon { color: var(--emerald); flex: none; }
.stepper { display: inline-flex; align-items: center; gap: 6px; padding: 4px; border-radius: 999px; background: var(--parchment); border: 1px solid var(--line); } .stepper b { min-width: 2.6ch; text-align: center; font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.code-input { font: 800 1.5rem/1.2 var(--font-ui); letter-spacing: 0.34em; text-align: center; text-transform: uppercase; }
.khani-invite { display: grid; gap: 8px; margin-top: 14px; } .khani-invite h2 { font: 700 1.25rem/1.3 var(--font-display); }
.khani-top { display: grid; justify-items: center; gap: 8px; padding: 22px 16px 20px; border-radius: var(--r-xl); color: #f7f1e3; text-align: center; background: var(--girih), linear-gradient(165deg, #0b6b50, #042a20); box-shadow: var(--shadow-lift); }
.khani-top h2 { font: 700 1.45rem/1.25 var(--font-display); color: #fbf7ee; overflow-wrap: anywhere; } .khani-note { color: #c9d8cc; font-size: 0.9rem; max-width: 36ch; }
.khani-sub { color: #c9d8cc; font-size: 0.86rem; } .khani-done-line { color: var(--brass-bright); font: 700 1.1rem/1.4 var(--font-display); }
.para-ring { position: relative; display: block; margin: 8px 0 2px; max-width: 62vw; aspect-ratio: 1; height: auto !important; }
.para-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.para-ring circle { fill: none; stroke-width: 12; stroke: rgb(255 255 255 / 0.13); transition: stroke 0.35s; }
.para-ring circle.reading { stroke: rgb(227 195 116 / 0.42); } .para-ring circle.done { stroke: var(--brass-bright); }
.para-ring-in { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 2px; } .para-ring-in b { font: 700 3.4rem/1 var(--font-display); font-variant-numeric: tabular-nums; } .para-ring-in small { color: #c9d8cc; font-weight: 700; } .para-ring-in .icon { color: var(--brass-bright); }
.khani-top.complete { background: var(--girih), linear-gradient(165deg, #0d7a5b, #06402f 60%, #3b3110); }
.khani-code { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; } .khani-code > div:first-child { display: grid; gap: 1px; }
.khani-code b { font: 800 1.55rem/1.2 var(--font-ui); letter-spacing: 0.24em; color: var(--emerald); } .khani-code small { color: var(--muted); font-size: 0.8rem; }
.my-para { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-top: 1px solid var(--line); } .my-para:first-child { border-top: 0; }
.my-para-no { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 12px; background: var(--brass-soft); color: var(--brass-ink); font-weight: 800; font-variant-numeric: tabular-nums; }
.my-para.done .my-para-no { background: var(--emerald); color: var(--on-emerald); } .my-para-text { flex: 1; min-width: 0; display: grid; } .my-para-text small { color: var(--muted); font-size: 0.82rem; } .my-para .ok { color: var(--emerald); }
.para-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.para { position: relative; display: grid; place-content: center; justify-items: center; gap: 1px; aspect-ratio: 1; border-radius: 14px; border: 1.5px solid var(--line); background: var(--parchment); color: var(--ink); cursor: pointer; padding: 0; min-width: 0; }
.para b { font-size: 1rem; font-variant-numeric: tabular-nums; line-height: 1.1; } .para i { font-style: normal; font-size: 0.62rem; font-weight: 800; color: var(--muted); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 3px; }
.para.reading { background: var(--brass-soft); border-color: transparent; } .para.reading i, .para.reading b { color: var(--brass-ink); }
.para.done { background: var(--emerald); border-color: transparent; color: var(--on-emerald); }
.para.mine { box-shadow: 0 0 0 2.5px var(--brass); }
.para-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; color: var(--muted); font-size: 0.78rem; } .para-legend span { display: inline-flex; align-items: center; gap: 6px; }
.para-legend i { width: 14px; height: 14px; border-radius: 5px; border: 1.5px solid var(--line); background: var(--parchment); } .para-legend i.reading { background: var(--brass-soft); border-color: transparent; } .para-legend i.done { background: var(--emerald); border-color: transparent; } .para-legend i.mine { box-shadow: 0 0 0 2px var(--brass); border-color: transparent; }
.khani-person { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-top: 1px solid var(--line); } .khani-person:first-child { border-top: 0; }
.kp-text { flex: 1; min-width: 0; display: grid; gap: 5px; } .kp-text b { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; overflow-wrap: anywhere; } .kp-text small { color: var(--muted); font-size: 0.8rem; }
.kp-bar { display: flex; height: 6px; border-radius: 6px; background: var(--linen); overflow: hidden; } .kp-bar i { display: block; height: 100%; background: var(--emerald); } .kp-bar i.reading { background: var(--brass); opacity: 0.55; }
.para-sheet { display: grid; gap: 10px; }

/* ---------- the 3D view of Makkah and Madinah ---------- */
.hero-view { position: relative; display: block; border-radius: 24px; text-decoration: none; -webkit-tap-highlight-color: transparent; }
.hero-view .hero-arch { display: block; transition: transform 0.18s ease; }
.hero-view:active .hero-arch { transform: scale(0.97); }
.hero-3d { position: absolute; left: 50%; bottom: 9px; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px 4px 8px; border-radius: 999px; background: rgb(4 42 32 / 0.8); border: 1px solid rgb(227 195 116 / 0.65); color: #e3c374; font-weight: 800; font-size: 0.74rem; line-height: 1.2; white-space: nowrap; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: invite 2.6s ease-out 1.4s 2; }
@keyframes invite { 0% { box-shadow: 0 0 0 0 rgb(227 195 116 / 0.55); } 70%, 100% { box-shadow: 0 0 0 12px rgb(227 195 116 / 0); } }

.haram { position: fixed; inset: 0; z-index: 30; overflow: hidden; background: #042a20; color: #fbf7ee; -webkit-user-select: none; user-select: none; }
.haram-stage { position: absolute; inset: 0; opacity: 0; transition: opacity 0.9s ease; }
.haram.ready .haram-stage { opacity: 1; }
.haram-shade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgb(4 42 32 / 0.58), rgb(4 42 32 / 0) 17%), radial-gradient(130% 90% at 50% 42%, rgb(0 0 0 / 0) 58%, rgb(3 26 20 / 0.32)); }
.haram-veil { position: absolute; inset: 0; pointer-events: none; background: #042a20; opacity: 0; transition: opacity 0.3s ease; }
.haram.veiled .haram-veil { opacity: 1; }
.haram-wait { position: absolute; inset: 0; display: grid; align-content: center; justify-items: center; gap: 18px; padding: 24px 28px; text-align: center; background: radial-gradient(circle at 50% 36%, #0b6b50, #042a20 72%); transition: opacity 0.8s ease; }
.haram-wait.out { opacity: 0; pointer-events: none; }
.haram-wait .arch { width: 148px; height: 200px; box-shadow: 0 0 0 3px #c9a550; }
.haram-wait p { margin: 0; max-width: 30ch; color: #d7e3d9; line-height: 1.45; }
.haram-wait p b { display: block; margin-bottom: 6px; color: #fbf7ee; font: 700 1.2rem/1.3 var(--font-display); }
.haram-wait-text { font-weight: 700; animation: breathe 1.8s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: 0.45; } }

.haram-top { position: absolute; inset: 0 0 auto 0; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: calc(var(--safe-t) + 10px) 12px 0; }
.haram-round { width: 44px; height: 44px; flex: none; display: grid; place-items: center; padding: 0; border-radius: 50%; border: 1px solid rgb(251 247 238 / 0.2); background: rgb(6 46 34 / 0.62); color: #fbf7ee; cursor: pointer; backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2); transition: transform 0.15s ease, background 0.2s ease; }
.haram-round:active { transform: scale(0.92); background: rgb(11 107 80 / 0.8); }
.haram-round.ghost { visibility: hidden; }
.haram-switch { display: flex; gap: 2px; padding: 4px; border-radius: 999px; border: 1px solid rgb(251 247 238 / 0.2); background: rgb(6 46 34 / 0.62); backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2); }
.haram-switch button { min-height: 36px; padding: 0 18px; border: 0; border-radius: 999px; background: none; color: #e6efe8; font: 700 0.98rem var(--font-display); cursor: pointer; transition: background 0.25s ease, color 0.25s ease; }
.haram-switch button.on { background: #e3c374; color: #042a20; }

.haram-bottom { position: absolute; left: 50%; bottom: calc(10px + var(--safe-b)); width: min(calc(100% - 20px), 480px); transform: translateX(-50%); animation: haram-in 0.65s cubic-bezier(0.2, 0.8, 0.2, 1) 0.3s both; }
@keyframes haram-in { from { opacity: 0; transform: translate(-50%, 28px); } }
.haram-tools { position: absolute; inset-inline-end: 2px; bottom: calc(100% + 10px); display: grid; gap: 7px; justify-items: end; }
.haram-tools .haram-round { width: 38px; height: 38px; }
.haram-hint { position: absolute; inset-inline-start: 2px; bottom: calc(100% + 12px); max-width: calc(100% - 56px); margin: 0; display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px 7px 9px; border-radius: 18px; border: 1px solid rgb(251 247 238 / 0.18); background: rgb(6 46 34 / 0.66); color: #f1ecdd; font-size: 0.78rem; font-weight: 650; line-height: 1.3; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); animation: fade 0.6s ease 1.8s both; }
.haram-hint .icon { flex: none; color: #e3c374; }
.haram-panel { display: grid; gap: 7px; padding: 8px 9px 8px; border-radius: 22px; border: 1px solid rgb(227 195 116 / 0.26); background: rgb(5 44 33 / 0.72); box-shadow: 0 12px 30px rgb(0 0 0 / 0.24); backdrop-filter: blur(16px) saturate(1.25); -webkit-backdrop-filter: blur(16px) saturate(1.25); }
.haram-spots { display: flex; gap: 5px; margin: 0 -9px; padding: 0 9px; overflow-x: auto; scrollbar-width: none; }
.haram-spots::-webkit-scrollbar { display: none; }
.haram-spots button { flex: none; min-height: 30px; padding: 0 11px; border-radius: 999px; border: 1px solid rgb(251 247 238 / 0.2); background: rgb(251 247 238 / 0.05); color: #f1ecdd; font: 700 0.78rem var(--font-ui); white-space: nowrap; cursor: pointer; transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease; }
.haram-spots button.on { background: #e3c374; border-color: #e3c374; color: #042a20; }
.haram-day { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.haram-play { width: 34px; height: 34px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: #fbf7ee; color: #06402f; cursor: pointer; transition: transform 0.15s ease; }
.haram-play:active { transform: scale(0.92); }
.haram-slider { position: relative; height: 34px; }
.haram-track { position: absolute; left: 12px; right: 12px; top: 50%; height: 6px; margin-top: -3px; border-radius: 99px; background: linear-gradient(90deg, #f2b68c 0%, #9fd0f3 22%, #cfe6ee 48%, #f9ad63 72%, #b8553f 81%, #17264a 100%); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.22); }
[dir="rtl"] .haram-track { background: linear-gradient(270deg, #f2b68c 0%, #9fd0f3 22%, #cfe6ee 48%, #f9ad63 72%, #b8553f 81%, #17264a 100%); }
.haram-tick { position: absolute; top: 50%; inset-inline-start: calc(var(--i) * 25%); width: 4px; height: 4px; margin: -2px 0 0 -2px; border-radius: 50%; background: rgb(255 255 255 / 0.75); }
.haram-tick.on { background: #e3c374; }
.haram-thumb { position: absolute; top: 50%; inset-inline-start: calc(var(--p) * (100% - 24px)); width: 24px; height: 24px; margin-top: -12px; display: grid; place-items: center; border-radius: 50%; background: #fbf7ee; color: #9a7524; box-shadow: 0 2px 6px rgb(0 0 0 / 0.35), 0 0 0 2px #e3c374; pointer-events: none; }
.haram-slider input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; -webkit-appearance: none; appearance: none; touch-action: none; }
.haram-slider input::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 34px; }
.haram-slider input::-moz-range-thumb { width: 24px; height: 34px; border: 0; }
.haram-slider:focus-within .haram-thumb { box-shadow: 0 2px 6px rgb(0 0 0 / 0.35), 0 0 0 2px #e3c374, 0 0 0 5px rgb(227 195 116 / 0.4); }
.haram-now { display: grid; justify-items: end; min-width: 58px; padding: 0 2px; border: 0; background: none; color: #e3c374; line-height: 1.15; cursor: pointer; }
.haram-now b { font: 750 0.8rem var(--font-ui); white-space: nowrap; }
.haram-now small { color: #b9cbbf; font-size: 0.64rem; white-space: nowrap; }
.haram-say { position: absolute; top: calc(var(--safe-t) + 64px); left: 50%; transform: translateX(-50%); width: min(calc(100% - 24px), 440px); display: grid; gap: 2px; padding: 8px 14px; border: 1px solid rgb(251 247 238 / 0.16); border-radius: 16px; background: rgb(6 46 34 / 0.6); color: #eef3ec; text-align: center; cursor: pointer; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); opacity: 0; transition: opacity 0.5s ease; }
.haram-say.on { opacity: 1; }
.haram-say .haram-caption { font-size: 0.82rem; line-height: 1.3; min-height: 0; padding: 0; color: #eef3ec; }
.haram-say small { color: #9fb5a8; font-size: 0.64rem; }
.haram :focus-visible { outline: 2px solid #e3c374; outline-offset: 2px; }

/* ---------- what is not open yet: a short list of tags ---------- */
.soon-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.soon-tags a { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 6px 13px; border-radius: 999px; border: 1px solid var(--line); background: var(--parchment); color: var(--muted); font-weight: 650; font-size: 0.86rem; text-decoration: none; }
.soon-tags a .icon { flex: none; opacity: 0.7; }
.haram-stage:focus-visible { outline: none; box-shadow: inset 0 0 0 3px #e3c374; }
@media (orientation: landscape) and (max-height: 520px) {
  .haram-bottom { left: auto; right: auto; inset-inline-end: 12px; bottom: calc(10px + var(--safe-b)); width: min(52%, 400px); transform: none; animation-name: fade; }
  .haram-say { display: none; }
  .haram-tools { inset-inline-end: calc(100% + 10px); bottom: 0; }
  .haram-hint { inset-inline-start: auto; inset-inline-end: 0; max-width: 100%; }
}

/* listing pictures, logo, followers */
.org-logo { width: 76px; height: 76px; flex: none; border-radius: 22px; object-fit: cover; background: var(--sand); box-shadow: 0 0 0 4px var(--sand), 0 8px 20px rgba(4, 42, 32, 0.18); }
.org-follow { margin-top: 8px; }
.place-thumb { width: 58px; height: 58px; border-radius: 16px; object-fit: cover; flex: none; }
.photo-strip { display: flex; gap: 10px; overflow-x: auto; padding: 8px 0 4px; scroll-snap-type: x mandatory; }
.photo-strip > a, .photo-strip > button { position: relative; flex: none; border: 0; padding: 0; background: none; border-radius: 16px; overflow: hidden; scroll-snap-align: start; cursor: pointer; }
.photo-strip img { display: block; width: 132px; height: 100px; object-fit: cover; }
.photo-strip .tag { position: absolute; inset-inline-start: 6px; bottom: 6px; }
.photo-big { display: block; width: 100%; max-height: 60vh; object-fit: contain; border-radius: 16px; margin-bottom: 10px; background: var(--emerald-night); }
.photo-queue { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 14px; }
.photo-queue img { width: 100%; max-height: 220px; object-fit: cover; border-radius: 14px; }

/* the spoken tour */
.haram-listen { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 12px; backdrop-filter: blur(12px); border-radius: 999px; border: 1px solid rgba(227, 195, 116, 0.5); background: rgba(4, 42, 32, 0.4); color: var(--brass-bright); font: 600 0.8rem/1 var(--font-body); cursor: pointer; }
.haram-listen.on { background: var(--brass-bright); color: var(--emerald-night); }
.tr-audio { display: grid; justify-items: center; gap: 4px; margin-top: 10px; text-align: center; }
.premium-badge { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: linear-gradient(135deg, #e3c374, #b98a2e); color: #3b2a07; flex: none; }

/* All for Allah Premium */
.premium-hero { position: relative; display: grid; gap: 6px; justify-items: start; padding: 22px 20px 20px; border-radius: var(--r-xl); color: #fbf7ee; overflow: hidden;
  background: radial-gradient(120% 90% at 100% 0%, rgba(227, 195, 116, 0.35), transparent 60%), linear-gradient(160deg, #0b6b50, #042a20); box-shadow: 0 14px 30px rgba(4, 42, 32, 0.25); }
.premium-hero h2 { font: 700 1.5rem/1.15 var(--font-display); }
.premium-hero p { opacity: 0.92; max-width: 36ch; }
.premium-hero.over { background: radial-gradient(120% 90% at 100% 0%, rgba(227, 195, 116, 0.28), transparent 60%), linear-gradient(160deg, #3b3220, #1d1810); }
.premium-crown { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 16px; background: linear-gradient(135deg, #e3c374, #b98a2e); color: #2c1f05; margin-bottom: 4px; }
.premium-meter { width: 100%; height: 6px; border-radius: 99px; background: rgba(255, 255, 255, 0.18); overflow: hidden; margin-top: 6px; }
.premium-meter span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #e3c374, #f6e3ad); }
.premium-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 16px 0; }
.premium-tile { display: grid; gap: 6px; align-content: start; padding: 16px 14px; border-radius: var(--r-lg); background: var(--parchment); color: inherit; text-decoration: none; box-shadow: var(--shadow); border: 1px solid var(--line); }
.premium-tile b { font: 700 1.02rem/1.2 var(--font-display); }
.premium-tile small { color: var(--muted); line-height: 1.35; }
.premium-tile.tile-ai { grid-column: 1 / -1; background: linear-gradient(135deg, rgba(11, 107, 80, 0.1), rgba(227, 195, 116, 0.18)); }
.premium-ic { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 14px; background: var(--emerald, #0b6b50); color: #f6e3ad; }
.pack { display: grid; gap: 12px; }
.pack-price { display: flex; align-items: baseline; gap: 8px; }
.pack-price b { font: 800 2.2rem/1 var(--font-display); color: var(--emerald, #0b6b50); }
.pack-price span { color: var(--muted); }
.pack-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pack-list li { display: flex; gap: 10px; align-items: center; }
.pack-list li svg { color: var(--brass, #b98a2e); flex: none; }
.preview-switch { display: flex; gap: 10px; align-items: center; margin: 18px 0 8px; padding: 12px 14px; border-radius: var(--r-lg); border: 1px dashed rgba(185, 138, 46, 0.5); font-size: 0.9rem; }

/* the monthly giving plan on Home */
.sip-card { display: flex; align-items: center; gap: 16px; padding: 20px 18px; border-radius: var(--r-xl); text-decoration: none; color: #2c1f05;
  background: linear-gradient(135deg, #f6e3ad, #e3c374 55%, #c99a3c); box-shadow: 0 14px 28px -14px rgba(125, 90, 18, 0.6); }
.sip-pct { font: 800 2.4rem/1 var(--font-display); color: #06402f; flex: none; }
.sip-text { display: grid; gap: 3px; flex: 1; min-width: 0; }
.sip-text b { font: 700 1.12rem/1.2 var(--font-display); color: #06402f; }
.sip-text small { color: #4a3610; line-height: 1.35; }
.sip-card .row-chev { color: #06402f; }

/* the AI assistant */
/* A study circle: a deep emerald arch to open on, questions grouped by subject, answers on parchment folios with
   a brass star, and a docked question box with the microphone. The only motion that runs by itself is the star
   turning once on arrival and while an answer is being written. */
.ask-screen .content { gap: 14px; padding-bottom: calc(118px + var(--safe-b)); }
.ask-welcome { display: grid; gap: 16px; }
.ask-hero { position: relative; display: grid; justify-items: center; gap: 6px; padding: 30px 22px 24px; text-align: center; color: #fbf7ee;
  background: var(--girih), radial-gradient(120% 90% at 50% 0%, #0f7a5b 0%, var(--emerald-deep) 55%, #042a20 100%);
  border-radius: 160px 160px var(--r-lg) var(--r-lg) / 120px 120px var(--r-lg) var(--r-lg); box-shadow: var(--shadow-lift); overflow: hidden; }
.ask-hero h2 { font: 700 clamp(1.55rem, 6.4vw, 1.95rem)/1.15 var(--font-display); letter-spacing: 0.005em; }
.ask-hero > p { max-width: 30ch; color: rgb(251 247 238 / 0.86); font-size: 1.02rem; }
.ask-hero .ask-by { display: inline-flex; align-items: center; justify-content: center; gap: 6px; margin-top: 6px; max-width: 34ch; color: #e3c374; font-size: 0.8rem; font-weight: 700; line-height: 1.35; }
.ask-hero .ask-by .icon { flex: none; }
.ask-star { width: 74px; height: 74px; color: #e3c374; margin-bottom: 6px; animation: starTurn 1.6s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.ask-star.small { width: 20px; height: 20px; margin: 0; color: var(--brass); animation: none; }
.ask-star.spin { animation: starSpin 2.4s linear infinite; }
@keyframes starTurn { from { transform: rotate(-45deg) scale(0.6); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes starSpin { to { transform: rotate(360deg); } }

.ask-topics { display: flex; gap: 8px; overflow-x: auto; margin: 0 -16px; padding: 2px 16px 4px; scrollbar-width: none; }
.ask-topics::-webkit-scrollbar { display: none; }
.ask-topics button { display: inline-flex; align-items: center; gap: 7px; flex: none; min-height: 42px; padding: 0 15px; border: 1px solid var(--line); border-radius: 999px; background: var(--parchment); color: var(--ink); font-weight: 700; font-size: 0.9rem; cursor: pointer; }
.ask-topics button .icon { color: var(--emerald); }
.ask-topics button.on { background: var(--emerald); border-color: var(--emerald); color: var(--on-emerald); }
.ask-topics button.on .icon { color: var(--on-emerald); }
.ask-ideas { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ask-ideas button { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 60px; padding: 14px 16px 14px 18px; border: 1px solid var(--line); border-inline-start: 4px solid var(--brass); border-radius: var(--r); background: var(--parchment); color: var(--ink); text-align: start; font: 650 1rem/1.35 var(--font-ui); cursor: pointer; box-shadow: var(--shadow); transition: transform 0.12s ease, border-color 0.15s ease; }
.ask-ideas button .icon { flex: none; color: var(--emerald); }
.ask-ideas button:active { transform: scale(0.985); }
@media (hover: hover) { .ask-ideas button:hover { border-color: var(--emerald); } }
.ask-more { border: 1px solid var(--line); border-radius: var(--r); background: var(--parchment); }
.ask-more summary { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 16px; font-weight: 750; cursor: pointer; list-style: none; }
.ask-more summary::-webkit-details-marker { display: none; }
.ask-more summary .icon { color: var(--emerald); }
.ask-more[open] summary { border-bottom: 1px solid var(--line); }
.ask-more > :not(summary) { margin: 12px 16px 16px; }

.ask-flow { display: grid; gap: 14px; padding-top: 4px; }
.ask-q { justify-self: end; max-width: 86%; padding: 11px 15px; border-radius: 20px 20px 6px 20px; background: var(--emerald); color: var(--on-emerald); font-weight: 600; white-space: pre-wrap; }
[dir="rtl"] .ask-q { border-radius: 20px 20px 20px 6px; }
.ask-a { position: relative; display: grid; gap: 10px; padding: 14px 16px 12px; border: 1px solid var(--line); border-radius: 6px 22px 22px 22px; background: var(--parchment); box-shadow: var(--shadow); }
[dir="rtl"] .ask-a { border-radius: 22px 6px 22px 22px; }
.ask-a header { display: flex; align-items: center; gap: 8px; color: var(--brass-ink); font-size: 0.8rem; font-weight: 800; }
.ask-a > p { white-space: pre-wrap; line-height: 1.6; font-size: 1.01rem; }
.ask-a .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ask-a footer { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 -6px; }
.ask-a footer button { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 11px; border: 0; border-radius: 999px; background: none; color: var(--muted); font-weight: 700; font-size: 0.85rem; cursor: pointer; }
.ask-a footer button .icon { color: var(--emerald); }
.ask-a footer button.on { background: var(--emerald-soft); color: var(--emerald); }
.ask-a footer button:disabled { opacity: 0.6; cursor: progress; }
.ask-a.note { background: var(--brass-soft); border-color: color-mix(in srgb, var(--brass) 45%, transparent); }
.ask-a.thinking .line { display: block; height: 11px; border-radius: 6px; background: linear-gradient(90deg, var(--linen), var(--sand), var(--linen)); background-size: 200% 100%; animation: shimmer 1.3s linear infinite; }
.ask-a.thinking .line.short { width: 60%; }
@keyframes shimmer { to { background-position: -200% 0; } }

.ask-dock { position: fixed; z-index: 20; left: 50%; bottom: calc(10px + var(--safe-b)); transform: translateX(-50%); width: min(calc(100% - 20px), 600px); display: grid; gap: 8px; }
/* toasts sit above the docked question box */
.app:has(.ask-screen) .toast { bottom: calc(92px + var(--safe-b)); }
/* the page fades out under the docked box, so text never sits half-hidden behind it */
.ask-screen::after { content: ""; position: fixed; z-index: 19; inset: auto 0 0 0; height: calc(96px + var(--safe-b)); background: linear-gradient(to bottom, transparent, var(--sand) 46%); pointer-events: none; }
.ask-dock.signed-out { justify-items: stretch; }
.ask-bar { display: flex; align-items: flex-end; gap: 6px; padding: 6px; border: 1px solid var(--line); border-radius: 28px; background: var(--parchment); box-shadow: var(--shadow-lift); }
.ask-dock.listening .ask-bar { border-color: var(--brass); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brass) 22%, transparent), var(--shadow-lift); }
.ask-bar textarea { flex: 1; min-height: 44px; max-height: 140px; padding: 10px 6px; border: 0; border-radius: 0; background: none; resize: none; line-height: 1.45; }
.ask-bar textarea:focus-visible { outline: none; }
.ask-bar:focus-within { border-color: var(--emerald); }
.ask-mic, .ask-send { flex: none; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; cursor: pointer; transition: transform 0.12s ease, background 0.15s ease; }
.ask-mic { background: var(--emerald-soft); color: var(--emerald); }
.ask-mic.on { background: var(--brass); color: #fbf7ee; animation: micPulse 1.4s ease-out infinite; }
@keyframes micPulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--brass) 55%, transparent); } 100% { box-shadow: 0 0 0 14px transparent; } }
.ask-send { background: var(--emerald); color: var(--on-emerald); }
.ask-send:disabled { background: var(--linen); color: var(--muted); cursor: default; }
.ask-mic:active, .ask-send:not(:disabled):active { transform: scale(0.92); }
.ask-hint { justify-self: center; display: inline-flex; align-items: center; gap: 10px; padding: 7px 14px; border-radius: 999px; background: var(--emerald-deep); color: #fbf7ee; font-weight: 700; font-size: 0.86rem; box-shadow: var(--shadow-lift); }
.wave { display: inline-flex; align-items: center; gap: 3px; height: 16px; }
.wave i { width: 3px; height: 100%; border-radius: 2px; background: #e3c374; animation: wave 0.9s ease-in-out infinite; }
.wave i:nth-child(2) { animation-delay: 0.12s; } .wave i:nth-child(3) { animation-delay: 0.24s; } .wave i:nth-child(4) { animation-delay: 0.36s; } .wave i:nth-child(5) { animation-delay: 0.48s; }
@keyframes wave { 0%, 100% { transform: scaleY(0.3); } 50% { transform: scaleY(1); } }
@media (prefers-reduced-motion: reduce) {
  .ask-star, .ask-star.spin, .ask-mic.on, .wave i, .ask-a.thinking .line { animation: none; }
}
.sip-btn { display: inline-flex; align-items: center; gap: 6px; flex: none; padding: 9px 14px; border-radius: 999px; background: #06402f; color: #f6e3ad; font: 700 0.86rem/1 var(--font-body); }

/* Community */
.community .comm-hero { position: relative; margin: 0 -16px 16px; padding: calc(var(--safe-t) + 8px) 18px 18px; border-radius: 0 0 var(--r-xl) var(--r-xl); color: #f7f1e3; overflow: hidden;
  background: var(--girih), linear-gradient(165deg, #0b6b50 0%, #06402f 58%, #042a20 100%); box-shadow: var(--shadow-lift); }
.comm-hero a { color: inherit; }
.comm-hero .hero-bar { display: flex; align-items: center; gap: 4px; margin: 0 -8px 6px; }
.comm-hero .hero-bar .brand { flex: 1; display: flex; align-items: center; gap: 8px; font: 700 1.28rem/1.1 var(--font-display); color: #fbf7ee; padding-inline-start: 6px; }
.comm-hero .hero-bar .icon-btn { color: #f7f1e3; }

.comm-title { margin: 8px 0 2px; font: 700 1.5rem/1.2 var(--font-display); color: #fbf7ee; }
.comm-sub { margin: 0 0 16px; color: #c9d8cc; font-size: 0.92rem; }
.comm-links { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.comm-links a { display: grid; justify-items: center; gap: 7px; text-decoration: none; font-size: 0.78rem; font-weight: 750; color: #f1ecdd; }
.comm-ic { position: relative; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 18px; background: rgb(251 247 238 / 0.1); border: 1px solid rgb(227 195 116 / 0.35); color: var(--brass-bright); transition: transform 0.15s ease, background 0.2s ease; }
.comm-links a:active .comm-ic { transform: scale(0.93); background: rgb(251 247 238 / 0.18); }
.comm-ic .badge-dot { top: -5px; inset-inline-end: -6px; }
.composer2 { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 12px 12px 12px; margin-bottom: 18px; border: 1px solid var(--line); border-radius: 22px; background: var(--parchment); color: var(--muted); text-align: start; text-decoration: none; cursor: pointer; box-shadow: var(--shadow); font: inherit; }
.composer2 .composer-text { flex: 1; min-width: 0; font-size: 0.95rem; }
.composer-go { display: inline-flex; align-items: center; gap: 6px; flex: none; padding: 9px 14px; border-radius: 999px; background: var(--emerald); color: var(--on-emerald); font: 750 0.85rem/1 var(--font-ui); }
.faces { margin-bottom: 18px; }
.faces .group-title { margin-bottom: 10px; }
.faces ul { display: flex; gap: 14px; margin: 0 -16px; padding: 2px 16px 4px; list-style: none; overflow-x: auto; scrollbar-width: none; }
.faces ul::-webkit-scrollbar { display: none; }
.faces li a { display: grid; justify-items: center; gap: 4px; width: 66px; color: var(--ink); text-decoration: none; text-align: center; }
.faces li .avatar { box-shadow: 0 0 0 2px var(--sand), 0 0 0 4px var(--brass-bright); }
.faces li span { font-size: 0.8rem; font-weight: 700; max-width: 66px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.faces li small { font-size: 0.64rem; color: var(--emerald); font-weight: 700; }
.comm-event { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; padding: 12px 14px; border-radius: 20px; background: linear-gradient(135deg, var(--brass-soft), var(--parchment)); border: 1px solid var(--line); color: var(--ink); text-decoration: none; box-shadow: var(--shadow); }
.comm-event-date { display: grid; place-items: center; width: 52px; height: 56px; flex: none; border-radius: 14px; background: var(--emerald); color: var(--on-emerald); line-height: 1.05; }
.comm-event-date b { font: 800 1.3rem var(--font-display); }
.comm-event-date small { font-size: 0.7rem; font-weight: 700; text-transform: capitalize; }
.comm-event-text { display: grid; gap: 2px; flex: 1; min-width: 0; }
.comm-event-text b { font: 700 1rem/1.25 var(--font-display); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.comm-event-text small { color: var(--muted); font-size: 0.78rem; }
.feed-tabs { position: sticky; top: calc(var(--safe-t)); z-index: 3; display: flex; gap: 4px; margin: 0 -16px 12px; padding: 6px 16px 0; overflow-x: auto; scrollbar-width: none; background: linear-gradient(var(--sand) 80%, transparent); border-bottom: 1px solid var(--line); }
.feed-tabs::-webkit-scrollbar { display: none; }
.feed-tabs button { flex: none; position: relative; min-height: 42px; padding: 0 12px; border: 0; background: none; color: var(--muted); font: 750 0.9rem var(--font-ui); cursor: pointer; white-space: nowrap; }
.feed-tabs button.on { color: var(--emerald); }
.feed-tabs button.on::after { content: ''; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 3px; border-radius: 3px 3px 0 0; background: var(--emerald); }
.community .post { border-radius: 22px; padding: 16px 16px 6px; }
.community .post-actions { justify-content: space-between; border-top: 0; margin: 0 -8px; padding-top: 0; }
.community .post-actions .act { min-height: 42px; padding: 0 10px; border-radius: 14px; }
.community .post-actions .act:active { background: var(--emerald-soft); }

/* ---------- signing in with a phone number ---------- */
.phone-input { display: flex; align-items: stretch; border: 1px solid var(--line); border-radius: 14px; background: var(--parchment); overflow: hidden; }
.phone-input:focus-within { border-color: var(--emerald); outline: 2px solid color-mix(in srgb, var(--emerald) 28%, transparent); }
.phone-input > span { display: grid; place-items: center; padding: 0 12px 0 15px; font-weight: 700; color: var(--emerald); border-inline-end: 1px solid var(--line); background: color-mix(in srgb, var(--emerald) 7%, var(--parchment)); }
.phone-input input { border: 0; border-radius: 0; background: transparent; min-width: 0; letter-spacing: 0.04em; }
.phone-input input:focus { outline: 0; }
.otp-input { text-align: center; font-size: 1.6rem; font-weight: 700; letter-spacing: 0.45em; padding-inline-start: calc(15px + 0.45em); font-variant-numeric: tabular-nums; }
.phone-links { margin-top: 6px; }
.or-line { display: flex; align-items: center; gap: 12px; margin: 16px 0; color: var(--muted); font-size: 0.85rem; }
.or-line::before, .or-line::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.confirm-code { display: grid; gap: 8px; margin-bottom: 14px; justify-items: start; }
.confirm-code .field { width: 100%; margin-bottom: 0; }

/* ---------- finding the location (first run) ---------- */
.onb-locating { display: grid; justify-items: center; gap: 18px; padding: 36px 0 12px; }
.locating-pulse { position: relative; display: grid; place-items: center; width: 76px; height: 76px; border-radius: 50%; background: var(--emerald); color: var(--on-emerald); box-shadow: var(--shadow-lift); }
.locating-pulse::before, .locating-pulse::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--emerald); animation: locate-ring 1.8s ease-out infinite; }
.locating-pulse::after { animation-delay: 0.9s; }
@keyframes locate-ring { from { transform: scale(1); opacity: 0.7; } to { transform: scale(2.1); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .locating-pulse::before, .locating-pulse::after { animation: none; } }

/* ---------- profile photo and show password ---------- */
img.avatar.photo { object-fit: cover; background: var(--linen); }
.photo-edit { display: grid; justify-items: center; gap: 10px; margin-bottom: 18px; }
.photo-edit-pic { position: relative; padding: 0; border: 0; background: none; cursor: pointer; border-radius: 36%; }
.photo-edit-pic .avatar { box-shadow: 0 0 0 4px var(--parchment), 0 0 0 5px var(--line); }
.photo-edit-cam { position: absolute; inset-inline-end: -4px; bottom: -4px; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--emerald); color: var(--on-emerald); box-shadow: 0 0 0 3px var(--sand); }
.check.show-pass { margin-top: 8px; font-size: 0.88rem; color: var(--muted); }

/* ---------- the monthly giving card on Home ---------- */
.give-card { position: relative; overflow: hidden; display: grid; gap: 14px; padding: 22px 20px 20px; border-radius: var(--r-xl); color: #2c1f05;
  background: radial-gradient(120% 90% at 100% 0%, rgb(255 255 255 / 0.45), transparent 55%), linear-gradient(140deg, #f8e7b7, #e6c578 50%, #c79636);
  box-shadow: 0 18px 34px -18px rgba(125, 90, 18, 0.7), 0 1px 0 rgb(255 255 255 / 0.6) inset; }
.give-card::before { content: ""; position: absolute; inset: 0; background: var(--girih-ink); background-size: 54px; opacity: 0.55; pointer-events: none; }
.give-card > * { position: relative; }
.give-top { display: flex; align-items: center; gap: 16px; }
.give-seal { display: grid; place-items: center; align-content: center; flex: none; width: 88px; height: 88px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #0e7a5b, #06402f 70%); color: #f6e3ad; box-shadow: 0 0 0 4px rgb(255 255 255 / 0.35), 0 10px 20px -8px rgb(6 64 47 / 0.7); }
.give-seal b { font: 800 1.7rem/1 var(--font-display); letter-spacing: -0.01em; }
.give-seal small { font-size: 0.66rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; opacity: 0.85; }
.give-words { display: grid; gap: 4px; min-width: 0; }
.give-words h2 { font: 700 1.22rem/1.22 var(--font-display); color: #06402f; }
.give-words p { color: #4a3610; font-size: 0.92rem; line-height: 1.4; }
.give-calc { display: grid; gap: 6px; padding: 12px 14px; border-radius: var(--r); background: rgb(255 255 255 / 0.55); border: 1px solid rgb(125 90 18 / 0.22); }
.give-calc span { font-size: 0.8rem; font-weight: 700; color: #6b4d10; }
.give-calc input { width: 100%; border: 0; background: transparent; font: 700 1.3rem/1.2 var(--font-display); color: #06402f; padding: 0; outline: none; }
.give-calc input::placeholder { color: rgb(6 64 47 / 0.3); }
.give-result { min-height: 1.5em; color: #4a3610; font-size: 0.95rem; transition: color 0.2s; }
.give-result.on { color: #06402f; } .give-result b { font: 800 1.2rem/1 var(--font-display); }
.give-btn { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 14px; border-radius: 999px; background: #06402f; color: #f6e3ad; text-decoration: none; font-weight: 800; box-shadow: 0 10px 18px -10px rgb(6 64 47 / 0.9); transition: transform 0.15s; }
.give-btn:active { transform: scale(0.98); }

/* ---------- nearest masjids on Home ---------- */
.section-title { display: flex; align-items: center; gap: 8px; font: 700 1.12rem/1.2 var(--font-display); color: var(--ink); }
.section-title .icon { color: var(--emerald); }
.near-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.near-list a { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r); background: var(--parchment); border: 1px solid var(--line); color: var(--ink); text-decoration: none; box-shadow: var(--shadow); }
.near-ic { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 12px; background: var(--emerald-soft); color: var(--emerald); }
.near-txt { display: grid; min-width: 0; flex: 1; } .near-txt b { font-weight: 750; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.near-txt small { color: var(--muted); font-size: 0.8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.near-km { display: inline-flex; align-items: center; gap: 4px; flex: none; font-size: 0.82rem; font-weight: 800; color: var(--emerald); font-variant-numeric: tabular-nums; }

/* ---------- the question of the day: quiet until touched ---------- */
.dq { display: grid; gap: 12px; padding: 16px; border-radius: var(--r-lg); background: var(--parchment); border: 1px dashed var(--line); }
.dq-head { display: flex; align-items: center; gap: 8px; }
.dq-head h2 { font: 700 0.95rem/1.2 var(--font-display); color: var(--muted); flex: 1; }
.dq-spark { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--brass-soft); color: var(--brass-ink); }
.dq-cat { font-size: 0.72rem; font-weight: 700; color: var(--brass-ink); padding: 3px 9px; border-radius: 999px; background: var(--brass-soft); }
.dq-q { font-weight: 700; line-height: 1.45; }
.dq-opts { display: grid; gap: 8px; }
.dq-opt { display: flex; align-items: center; justify-content: space-between; gap: 8px; text-align: start; padding: 11px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--sand); cursor: pointer; font-weight: 600; transition: background 0.25s, border-color 0.25s, transform 0.12s; }
.dq-opt:active:not(:disabled) { transform: scale(0.985); }
.dq-opt:disabled { cursor: default; opacity: 0.7; }
.dq-opt.right { opacity: 1; background: var(--emerald-soft); border-color: var(--emerald); color: var(--emerald); }
.dq-opt.wrong { opacity: 1; background: var(--danger-soft); border-color: var(--danger); }
.dq-after { display: grid; gap: 6px; font-size: 0.9rem; color: var(--muted); animation: dq-in 0.35s ease-out; }
.dq-after b { color: var(--ink); }
.dq-more { font-size: 0.85rem; font-weight: 700; color: var(--emerald); text-decoration: none; }
@keyframes dq-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ---------- Qibla: a tilted 3D dial ---------- */
.qibla-stage.q3d { gap: 10px; padding: 18px 16px 22px; overflow: hidden; position: relative; }
.qibla-stage.q3d::after { content: ""; position: absolute; inset: auto -20% -40% -20%; height: 70%; background: radial-gradient(closest-side, rgb(227 195 116 / 0.18), transparent); pointer-events: none; }
.qibla-from { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; background: rgb(255 255 255 / 0.1); color: #e7efe9; font-size: 0.8rem; font-weight: 700; }
.compass3d { position: relative; width: min(80vw, 310px); aspect-ratio: 1; perspective: 760px; margin: 8px 0 4px; }
.compass3d .dial { width: 100%; height: 100%; overflow: visible; transform: rotateX(32deg); transform-origin: 50% 60%; filter: drop-shadow(0 14px 10px rgb(0 0 0 / 0.35)); transition: transform 0.6s cubic-bezier(.2, .8, .2, 1); }
.dial-shadow { position: absolute; left: 10%; right: 10%; bottom: -2%; height: 22%; border-radius: 50%; background: radial-gradient(closest-side, rgb(0 0 0 / 0.45), transparent); }
.aligned .compass3d .dial { transform: rotateX(14deg) scale(1.03); }
.cp-needle3d { fill: var(--brass-bright); stroke: #6f4f10; stroke-width: 0.8; }
.cp-hub3d { fill: #fbf7ee; stroke: #b98a2e; stroke-width: 2; }
.cp-kaaba3d { filter: drop-shadow(0 2px 2px rgb(0 0 0 / 0.5)); }
.aligned .cp-kaaba3d { animation: kaaba-glow 1.6s ease-in-out infinite; }
@keyframes kaaba-glow { 50% { filter: drop-shadow(0 0 6px #f6e3ad); } }
.qibla-stage.aligned { background: var(--girih), radial-gradient(120% 80% at 50% 30%, #d9ad52, #7d5a12); }
.qibla-note { margin: 10px 4px 0; font-size: 0.82rem; color: var(--muted); text-align: center; }
.qibla-tips { margin-top: 12px; padding: 8px 12px; border-radius: var(--r-sm); background: var(--parchment); border: 1px solid var(--line); font-size: 0.8rem; color: var(--muted); }
.qibla-tips summary { cursor: pointer; font-weight: 700; }
.qibla-tips ul { margin: 6px 0 2px; padding-inline-start: 18px; display: grid; gap: 3px; }
@media (prefers-reduced-motion: reduce) { .compass3d .dial { transition: none; } .aligned .cp-kaaba3d { animation: none; } }

/* ---------- tasbeeh: every touch answers ---------- */
.bead { overflow: visible; }
.bead-track { fill: none; stroke: rgb(255 255 255 / 0.06); stroke-width: 3; }
.bead-arc { fill: none; stroke: var(--brass-bright); stroke-width: 3; stroke-linecap: round; transform: rotate(-90deg); transform-origin: 130px 130px; transition: stroke-dasharray 0.3s cubic-bezier(.2, .8, .2, 1); filter: drop-shadow(0 0 4px rgb(227 195 116 / 0.6)); }
.bead circle.lit.last { animation: bead-drop 0.35s ease-out; }
@keyframes bead-drop { from { r: 10; fill: #fff6d6; } }
.bead-ripple { position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgb(246 227 173 / 0.7); pointer-events: none; animation: bead-ripple 0.6s ease-out forwards; }
@keyframes bead-ripple { from { transform: scale(0.92); opacity: 0.9; } to { transform: scale(1.18); opacity: 0; } }
.bead .digits.pop { animation: digit-pop 0.22s cubic-bezier(.2, .8, .3, 1.4); }
@keyframes digit-pop { from { transform: scale(0.86); } }
.bead.full { animation: bead-glow 1.8s ease-in-out infinite; }
@keyframes bead-glow { 50% { box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.08), 0 0 0 10px rgb(227 195 116 / 0.18), 0 22px 40px -18px #000; } }
.bead:active { transform: scale(0.955); }
@media (prefers-reduced-motion: reduce) { .bead-ripple, .bead .digits.pop, .bead.full, .bead circle.lit.last { animation: none; } }

/* ---------- the rak'ah table ---------- */
.rakat-wrap { overflow-x: auto; margin: 14px 0 10px; border-radius: var(--r-lg); background: var(--parchment); border: 1px solid var(--line); box-shadow: var(--shadow); }
.rakat { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.rakat th, .rakat td { padding: 11px 6px; text-align: center; border-bottom: 1px solid var(--line); font-size: 0.92rem; }
.rakat thead th { font-size: 0.68rem; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: 0.03em; line-height: 1.2; background: var(--linen); }
.rakat tbody th { text-align: start; white-space: nowrap; font-weight: 750; padding-inline-start: 12px; }
.rakat tbody th .icon { display: inline-block; vertical-align: -3px; margin-inline-end: 6px; color: var(--emerald); }
.rakat tr:last-child th, .rakat tr:last-child td { border-bottom: 0; }
.rakat td b { display: inline-grid; place-items: center; min-width: 28px; height: 28px; border-radius: 9px; }
.rakat .rk-fard b { background: var(--emerald); color: var(--on-emerald); }
.rakat .rk-sunnah b { background: var(--emerald-soft); color: var(--emerald); }
.rakat .rk-nafl b { background: var(--linen); color: var(--ink); }
.rakat .rk-witr b { background: var(--brass-soft); color: var(--brass-ink); }
.rakat .rk-none { color: var(--line); }
.rakat .rk-total { font: 800 1.05rem/1 var(--font-display); color: var(--ink); }
.rakat .rk-fard-h { color: var(--emerald); }
.rakat-key { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-bottom: 10px; font-size: 0.8rem; color: var(--muted); }
.rakat-key span { display: inline-flex; align-items: center; gap: 6px; }
.rakat-key i { width: 12px; height: 12px; border-radius: 4px; }
.rakat-key i.rk-fard { background: var(--emerald); } .rakat-key i.rk-sunnah { background: var(--emerald-soft); border: 1px solid var(--emerald); } .rakat-key i.rk-nafl { background: var(--linen); border: 1px solid var(--line); } .rakat-key i.rk-witr { background: var(--brass-soft); border: 1px solid var(--brass); }

/* ---------- the All for Allah tab, refreshed ---------- */
.premium-hero { min-height: 210px; padding: 24px 20px 22px; align-content: end; }
.premium-hero-art { position: absolute; inset-inline-end: -18%; bottom: -8%; width: 78%; max-width: 340px; opacity: 0.34; pointer-events: none; mask-image: linear-gradient(to left, #000 40%, transparent); -webkit-mask-image: linear-gradient(to left, #000 40%, transparent); }
.premium-hero > :not(.premium-hero-art) { position: relative; }
.premium-hero::after { content: ""; position: absolute; inset: 0; background: var(--girih); opacity: 0.8; pointer-events: none; }
.premium-crown { box-shadow: 0 0 0 6px rgb(227 195 116 / 0.18), 0 10px 22px -8px rgb(227 195 116 / 0.8); animation: crown-shine 3.2s ease-in-out infinite; }
@keyframes crown-shine { 50% { box-shadow: 0 0 0 10px rgb(227 195 116 / 0.1), 0 10px 26px -6px rgb(227 195 116 / 0.95); } }
.premium-meter { height: 8px; background: rgba(255, 255, 255, 0.14); }
.premium-grid { gap: 10px; }
.premium-tile { position: relative; overflow: hidden; min-height: 132px; padding: 16px 14px 14px; transition: transform 0.15s, box-shadow 0.2s; }
.premium-tile:active { transform: scale(0.98); }
.premium-tile::before { content: ""; position: absolute; width: 120px; height: 120px; inset-inline-end: -40px; top: -40px; border-radius: 50%; background: radial-gradient(closest-side, var(--tile-glow, rgb(11 107 80 / 0.16)), transparent); }
.premium-tile > * { position: relative; }
.premium-go { position: absolute; inset-inline-end: 12px; bottom: 12px; color: var(--muted); opacity: 0.6; }
.premium-tile.tile-ai { min-height: 150px; color: #fbf7ee; border: 0; background: radial-gradient(120% 120% at 100% 0%, rgb(227 195 116 / 0.35), transparent 55%), linear-gradient(150deg, #0e7a5b, #04301f); }
.premium-tile.tile-ai small, .premium-tile.tile-ai .premium-go { color: #cfe3d8; }
.premium-tile.tile-ai .premium-ic { background: linear-gradient(135deg, #f6e3ad, #c99a3c); color: #2c1f05; }
.premium-tile.tile-cards { --tile-glow: rgb(181 71 91 / 0.2); } .premium-tile.tile-cards .premium-ic { background: linear-gradient(135deg, #c95a6e, #8c3b4e); }
.premium-tile.tile-3d { --tile-glow: rgb(47 111 138 / 0.22); } .premium-tile.tile-3d .premium-ic { background: linear-gradient(135deg, #3f86a5, #1d4d63); }
.premium-tile.tile-khani { --tile-glow: rgb(185 138 46 / 0.22); } .premium-tile.tile-khani .premium-ic { background: linear-gradient(135deg, #d6ad55, #8a6418); color: #2c1f05; }
.premium-tile.tile-badge { --tile-glow: rgb(227 195 116 / 0.3); } .premium-tile.tile-badge .premium-ic { background: linear-gradient(135deg, #f6e3ad, #b98a2e); color: #3b2a07; }
.pack { padding: 4px 0 0; }
.pack-price { padding: 14px 16px; border-radius: var(--r); background: linear-gradient(135deg, var(--brass-soft), var(--parchment)); border: 1px dashed var(--brass); }
.pack-list li { padding: 2px 0; }
@media (prefers-reduced-motion: reduce) { .premium-crown { animation: none; } }
.rakat th, .rakat td { padding: 9px 2px; font-size: 0.86rem; }
.rakat thead th { font-size: 0.58rem; letter-spacing: 0; padding: 8px 2px; }
.rakat tbody th { padding-inline-start: 10px; font-size: 0.86rem; }
.rakat td b { min-width: 24px; height: 24px; border-radius: 8px; font-size: 0.82rem; }
.rakat .rk-total { padding-inline-end: 8px; }

/* ---------- Home: the next prayer, with the time left as the big figure ---------- */
.hero-label { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--brass-bright); opacity: 0.9; margin-top: 6px; }
.hero-left { font: 700 2.2rem/1.05 var(--font-display); letter-spacing: -0.01em; font-variant-numeric: tabular-nums; margin-top: 2px; }
.hero-at { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; margin-top: 10px; padding: 6px 12px; border-radius: 999px; background: rgb(255 255 255 / 0.12); font-size: 0.9rem; font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---------- one place to sign in or join ---------- */
.welcome-card { position: relative; overflow: hidden; display: flex; align-items: flex-end; min-height: 150px; margin-bottom: 18px; padding: 18px; border-radius: var(--r-xl); background: linear-gradient(160deg, #0e7a5b, #04301f); color: #fbf7ee; }
.welcome-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.4; }
.welcome-card span { position: relative; display: grid; gap: 4px; }
.welcome-card b { font: 700 1.35rem/1.2 var(--font-display); }
.welcome-card small { font-size: 0.92rem; color: #dcebe3; }
.code-flow { display: grid; gap: 4px; }
.google-web { display: flex; justify-content: center; min-height: 44px; margin-bottom: 4px; }
.google-web:not(.ready) { border-radius: 999px; background: var(--linen); }
.google-btn .btn { background: #fff; color: #1f1f1f; border: 1px solid #dadce0; gap: 10px; }
.google-btn .btn span { display: inline-flex; align-items: center; gap: 10px; }
.join-last { display: grid; gap: 6px; animation: dq-in 0.3s ease-out; }
.join-h { font: 700 1.2rem/1.2 var(--font-display); margin-bottom: 6px; }
.pw-fold { margin-top: 18px; padding: 12px 14px; border-radius: var(--r); border: 1px solid var(--line); background: var(--parchment); }
.pw-fold summary { cursor: pointer; font-weight: 700; color: var(--muted); }
.pw-fold[open] summary { margin-bottom: 12px; }

/* Translator's footnote marks and notes */
.fn-mark { font: inherit; font-size: 0.62em; line-height: 1; vertical-align: super; color: var(--accent, #0f6b4f); background: none; border: 0; padding: 0 2px; margin: 0 1px; cursor: pointer; min-width: 0; min-height: 0; }
.fn-mark:focus-visible { outline: 2px solid currentColor; border-radius: 4px; }
.ayah-fn { margin: 6px 0 4px; padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, var(--accent, #0f6b4f) 7%, transparent); font-size: 0.86em; line-height: 1.6; }
.ayah-fn p { margin: 0 0 6px; }
.ayah-fn p:last-child { margin-bottom: 0; }
.surah-head .tr-audio .muted { color: rgba(255, 255, 255, 0.78); }

/* Read and listen: the verse being recited is in focus, the next one waits, the rest step back */
.ayahs .ayah { transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.6s ease, box-shadow 0.4s ease; }
.ayahs.reading .ayah { opacity: 0.42; }
.ayahs.reading .ayah.up-next { opacity: 0.72; }
.ayahs.reading .ayah.playing { opacity: 1; }
.ayah.playing { position: relative; padding-inline: 12px; margin-inline: -12px; box-shadow: inset 3px 0 0 var(--brass); }
[dir="rtl"] .ayah.playing { box-shadow: inset -3px 0 0 var(--brass); }
.ayah.playing .ayah-tr { color: var(--ink); }
.follow { position: relative; }
.follow .w { position: relative; z-index: 1; transition: color 0.35s ease; }
.follow .w-on { color: var(--emerald-deep); }
.follow .w-done { color: var(--emerald); }
/* the light that glides from word to word: only transform, size and opacity change, so it stays smooth */
.w-glow { position: absolute; left: 0; top: 0; z-index: 0; border-radius: 12px; pointer-events: none; opacity: 0; will-change: transform, width;
  background: radial-gradient(120% 140% at 50% 50%, color-mix(in srgb, var(--brass) 42%, transparent), color-mix(in srgb, var(--brass) 22%, transparent));
  box-shadow: 0 0 18px color-mix(in srgb, var(--brass) 35%, transparent);
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1), width 0.32s cubic-bezier(0.22, 1, 0.36, 1), height 0.32s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s ease; }
.basmala { transition: color 0.3s ease, text-shadow 0.3s ease; border-radius: 16px; }
.basmala.on { color: var(--brass-ink, var(--emerald-deep)); background: color-mix(in srgb, var(--brass) 18%, transparent); }
:root[data-theme="dark"]:not([data-noor-theme="light"]) .follow .w-on, :root[data-noor-theme="dark"] .follow .w-on { color: var(--ink); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]):not([data-noor-theme="light"]) .follow .w-on { color: var(--ink); } }
@media (prefers-reduced-motion: reduce) { .ayahs .ayah, .follow .w, .basmala, .w-glow { transition: none; } }

/* The Arabic in English letters, and the meaning while its recording plays */
.ayah-tl { font-size: 0.95rem; line-height: 1.6; color: var(--emerald); font-style: italic; letter-spacing: 0.01em; margin-top: -4px; }
.ayah-tr { transition: color 0.4s ease, background-color 0.4s ease, box-shadow 0.4s ease; border-radius: 12px; }
.ayah-tr.tr-on { color: var(--ink); background: color-mix(in srgb, var(--brass) 16%, transparent); box-shadow: 0 0 0 6px color-mix(in srgb, var(--brass) 16%, transparent); }

/* Hisn al-Muslim: read and listen, one dua at a time */
.hisn-no { min-width: 34px; height: 34px; border-radius: 50%; display: inline-grid; place-items: center; font-weight: 800; font-size: 0.85rem; color: var(--emerald); background: var(--emerald-soft); }
.hisn-head { display: grid; justify-items: start; gap: 6px; margin: 4px 0 14px; }
.hisn-list { display: grid; gap: 14px; }
.dua-card { display: grid; gap: 10px; padding: 16px; border-radius: 18px; background: var(--parchment, transparent); border: 1px solid var(--line); scroll-margin-top: calc(80px + var(--safe-t));
  transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.4s ease, border-color 0.4s ease, background-color 0.5s ease; }
.dua-card .ayah-ar { font-size: calc(1.45rem * var(--qs, 1)); line-height: 2.1; }
.hisn-list.reading .dua-card { opacity: 0.45; }
.hisn-list.reading .dua-card.up-next { opacity: 0.75; }
.dua-card.on { opacity: 1 !important; border-color: var(--brass); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brass) 25%, transparent), var(--shadow); background-color: color-mix(in srgb, var(--emerald-soft) 70%, transparent); }
.dua-repeat { font-size: 0.8rem; font-weight: 800; color: var(--brass-ink, var(--emerald)); background: color-mix(in srgb, var(--brass) 18%, transparent); padding: 4px 10px; border-radius: 999px; }
@media (prefers-reduced-motion: reduce) { .dua-card, .ayah-tr { transition: none; } }
