/* ═══════════════════════════════════════════════════════════════
   WadiMaps — app.v8.css
   Single stylesheet, written clean (Oct 2026). No !important.
   Sections: 1 tokens · 2 base · 3 app shell (bar / strip / tabs / footer)
             4 primitives (cards, buttons, forms, lists, badges, toast)
             5 pages (home, grave, memorial, cemetery, search, map,
                      account, contributors, about, order)
             6 utilities · 7 print
   ═══════════════════════════════════════════════════════════════ */

/* ── 1. TOKENS ─────────────────────────────────────────────── */
:root {
  --bg:         #0a0614;
  --bg-1:       #110a1f;
  --bg-2:       #160d28;
  --bg-deep:    #06030e;

  --gold:       #C49B39;
  --gold-hi:    #F0C830;
  --gold-soft:  rgba(196,155,57,.14);
  --gold-line:  rgba(196,155,57,.32);
  --gold-text:  rgba(226,186,86,.88);

  --ink:        #ffffff;
  --ink-90:     rgba(255,255,255,.92);
  --ink-75:     rgba(255,255,255,.75);
  --ink-60:     rgba(255,255,255,.60);
  --ink-45:     rgba(255,255,255,.45);
  --ink-30:     rgba(255,255,255,.30);

  --glass:      rgba(255,255,255,.045);
  --glass-2:    rgba(255,255,255,.07);
  --line:       rgba(255,255,255,.08);
  --line-2:     rgba(255,255,255,.13);

  --ok:         #4ade80;
  --wa:         #25D366;
  --danger:     #f87171;

  --font-ar:    'Scheherazade New', 'Noto Naskh Arabic', 'Amiri', serif;
  --font-ui:    'Tajawal', 'Noto Kufi Arabic', sans-serif;
  --font-en:    'Cinzel', Georgia, serif;

  --r-sm: 10px; --r-md: 12px; --r: 16px; --r-lg: 22px; --r-pill: 999px;
  --shadow: 0 10px 40px rgba(0,0,0,.45);
  --ease: cubic-bezier(.2,.7,.2,1);

  --bar-h: 60px;
  --strip-h: 34px;
  --tab-h: 62px;
  /* the app (Capacitor) also reports the system bars as --safe-area-inset-*; Android WebViews can leave env() at 0 */
  --sat: max(env(safe-area-inset-top, 0px), var(--safe-area-inset-top, 0px));
  --sab: max(env(safe-area-inset-bottom, 0px), var(--safe-area-inset-bottom, 0px));
  --content-max: 760px;
}

/* ── 2. BASE ───────────────────────────────────────────────── */
/* Every map keeps its layers and controls (Leaflet z-index up to 1000) inside its own box, below the app bar (50), the toast (60) and the menu sheet (80) */
.leaflet-container { position: relative; z-index: 0; isolation: isolate; }
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }   /* the attribute must beat .btn { display:inline-flex } — the sheet's sign-in button never hid (Hussein, 27 Oct) */
html { font-size: 16px; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overscroll-behavior-y: none; }
body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font-ar);
  font-size: 1.2rem;
  line-height: 1.75;
  color: var(--ink-75);
  background: var(--bg) radial-gradient(1200px 600px at 15% -10%, #1b0f33 0%, transparent 60%) no-repeat fixed;
  -webkit-font-smoothing: antialiased;
  padding-top: calc(var(--sat) + var(--bar-h) + var(--strip-h));
  padding-bottom: calc(var(--sab) + var(--tab-h) + 16px);
}
body:not(:has(.memorial-strip)) { padding-top: calc(var(--sat) + var(--bar-h)); }
/* Phones: the memorial strip lives on the home page only, and the app bar is 52px — fixed chrome drops from 157px to 114px of the screen (audit, Oct 2026) */
@media (max-width: 899px) {
  :root { --bar-h: 52px; }
  .app-bar__logo img { height: 40px; }
  body:not(.is-home) .memorial-strip { display: none; }
  body:not(.is-home) { padding-top: calc(var(--sat) + var(--bar-h)); }
  body:not(.is-home) .map-page { padding-top: calc(var(--sat) + var(--bar-h)); }
  body:not(.is-home) .map-panel { top: calc(var(--sat) + var(--bar-h) + 10px); }
}
a { color: var(--gold-hi); text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
h1,h2,h3,h4 { margin: 0; color: var(--ink-90); font-weight: 700; line-height: 1.3; }
h1 { font-size: 2.1rem; } h2 { font-size: 1.45rem; } h3 { font-size: 1.2rem; }
p { margin: 0 0 .75em; }
button { font: inherit; color: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--gold-soft); color: var(--ink); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 6px; }

.en { font-family: var(--font-en); letter-spacing: .06em; direction: ltr; unicode-bidi: isolate; }
.app-main { max-width: var(--content-max); margin: 0 auto; padding: 18px 16px 24px; }

/* ── 3. APP SHELL ──────────────────────────────────────────── */
.app-bar {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  padding-top: var(--sat);
  background: rgba(10,6,20,.78);
  backdrop-filter: saturate(140%) blur(18px);
  -webkit-backdrop-filter: saturate(140%) blur(18px);
  border-bottom: 1px solid var(--line);
}
.app-bar__inner {
  height: var(--bar-h);
  max-width: 1100px; margin: 0 auto; padding: 0 12px;
  display: grid; grid-template-columns: minmax(44px, auto) 1fr minmax(44px, auto); align-items: center; gap: 8px;
}
.app-bar__logo { justify-self: center; }
.app-bar__logo img { height: 52px; width: auto; }
.app-bar__icon, .app-bar__account {
  width: 44px; height: 44px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  color: var(--gold-text); background: transparent; transition: background .2s var(--ease);
}
.app-bar__icon:hover, .app-bar__account:hover { background: var(--glass-2); }
.app-bar__icon svg, .app-bar__account svg, .tab-bar__item svg { width: 22px; height: 22px; fill: currentColor; }
.app-bar__account span { display: none; }
.app-bar__links { display: none; }

@media (min-width: 900px) {
  .app-bar__inner { grid-template-columns: 170px 1fr auto; }
  .app-bar__logo { justify-self: start; }
  .app-bar__icon { display: none; }
  .app-bar__links { display: flex; gap: 6px; justify-content: center; }
  .app-bar__links a {
    padding: 8px 14px; border-radius: var(--r-pill); font-family: var(--font-ui); font-size: .95rem;
    color: var(--ink-60); transition: all .2s var(--ease);
  }
  .app-bar__links a:hover, .app-bar__links a[aria-current] { color: var(--gold-hi); background: var(--gold-soft); }
  .app-bar__account { width: auto; padding: 0 14px 0 10px; border-radius: var(--r-pill); border: 1px solid var(--gold-line); }
  .app-bar__account span { display: inline; font-family: var(--font-ui); font-size: .95rem; }
}

/* memorial strip — quiet, no CTA, pauses on touch */
.memorial-strip {
  height: var(--strip-h); overflow: hidden; direction: ltr;
  border-top: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(196,155,57,.06), transparent 30%, transparent 70%, rgba(196,155,57,.06));
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.memorial-strip__track {
  display: inline-flex; align-items: center; height: 100%; white-space: nowrap;
  direction: rtl; padding-inline: 20px;
  animation: strip 60s linear infinite;
}
.memorial-strip__item { color: var(--gold-text); font-size: .95rem; }
a.memorial-strip__item:hover { color: var(--gold-hi); }
.memorial-strip__sep { color: var(--ink-30); font-size: .8rem; margin: 0 14px; }
/* The track holds two identical copies; sliding from -50% to 0 brings copy two exactly where copy one began — no gap,
   no jump. (0 → 50% left the left side empty as it moved.) Duration is set inline from the text length. */
@keyframes strip { from { transform: translateX(-50%); } to { transform: translateX(0); } }
.memorial-strip:hover .memorial-strip__track, .memorial-strip:focus-within .memorial-strip__track { animation-play-state: paused; }
a.memorial-strip__item { text-decoration: none; border-bottom: 1px dotted rgba(196,155,57,.5); padding-bottom: 1px; }
/* Reduced motion (e.g. Windows "Animation effects" off): no scrolling ticker; the strip becomes swipe/scrollable instead */
@media (prefers-reduced-motion: reduce) { .memorial-strip__track { animation: none; } .memorial-strip { overflow-x: auto; scrollbar-width: none; -webkit-mask-image: none; mask-image: none; } .memorial-strip::-webkit-scrollbar { display: none; } }

/* bottom tab bar (mobile only) */
.tab-bar {
  position: fixed; inset: auto 0 0 0; z-index: 50;
  height: calc(var(--tab-h) + var(--sab)); padding-bottom: var(--sab);
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: rgba(10,6,20,.86);
  backdrop-filter: saturate(140%) blur(18px);
  -webkit-backdrop-filter: saturate(140%) blur(18px);
  border-top: 1px solid var(--line);
}
.tab-bar__item {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--ink-45); font-family: var(--font-ui); font-size: .78rem; font-weight: 500;
  -webkit-tap-highlight-color: transparent; transition: color .15s;
}
.tab-bar__item svg { width: 24px; height: 24px; fill: currentColor; transition: transform .2s var(--ease); }
.tab-bar__item:active svg { transform: scale(.9); }
.tab-bar__item[aria-current] { color: var(--gold-hi); }
body.keyboard-open .tab-bar { transform: translateY(110%); }
@media (min-width: 900px) {
  .tab-bar { display: none; }
  body { padding-bottom: 24px; }
}

/* footer */
.app-footer { border-top: 1px solid var(--line); margin-top: 48px; background: var(--bg-deep); }
.app-footer__inner { max-width: 1100px; margin: 0 auto; padding: 32px 16px 20px; display: grid; gap: 18px; }
.app-footer__brand img { height: 56px; width: auto; opacity: .7; margin-bottom: 10px; }
.app-footer__brand p { color: var(--ink-60); font-size: .95rem; max-width: 420px; }
.app-footer__links { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.app-footer__links a { color: var(--ink-60); font-size: .95rem; display: inline-flex; align-items: center; min-height: 44px; }
.app-footer__links a:hover { color: var(--gold-hi); }
.app-footer__copy { color: var(--ink-60); font-size: .85rem; margin: 0; }
@media (min-width: 900px) { .app-footer__inner { grid-template-columns: minmax(260px, 1fr) minmax(0, 1.6fr); align-items: start; } .app-footer__links { justify-content: flex-end; } .app-footer__copy { grid-column: 1 / -1; } }

/* ── 4. PRIMITIVES ─────────────────────────────────────────── */
.card {
  background: linear-gradient(160deg, rgba(255,255,255,.055), rgba(255,255,255,.025));
  border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 20px; margin-bottom: 14px;
}
.card--gold { border-color: var(--gold-line); background: linear-gradient(160deg, rgba(196,155,57,.12), rgba(196,155,57,.03)); }
.card--quiet { background: transparent; border-style: dashed; }
.card__title { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; font-size: 1.15rem; }
.card__title::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.card__sub { color: var(--ink-45); font-size: .95rem; margin: -6px 0 14px; }

.section-label {
  display: flex; align-items: center; gap: 12px; margin: 26px 0 12px;
  font-family: var(--font-ui); font-size: .85rem; letter-spacing: .12em; color: var(--gold-text); text-transform: uppercase;
}
.section-label::after { content: ''; flex: 1; height: 1px; background: var(--line); }

.btn {
  font-weight: 500;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 10px 20px; border-radius: var(--r-pill);
  border: 1px solid var(--line-2); background: var(--glass); color: var(--ink-90);
  font-family: var(--font-ui); font-size: 1rem; line-height: 1;
  transition: transform .15s var(--ease), background .2s, border-color .2s;
  -webkit-tap-highlight-color: transparent; text-decoration: none;
}
.btn:hover { background: var(--glass-2); }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .55; cursor: default; transform: none; }
.btn--primary { background: linear-gradient(135deg, var(--gold-hi), var(--gold) 60%, #9a7622); color: #1a1206; border-color: transparent; font-weight: 700; }
.btn--primary:hover { filter: brightness(1.06); background: linear-gradient(135deg, var(--gold-hi), var(--gold) 60%, #9a7622); }
.btn--ghost { background: transparent; }
.btn--wa { background: rgba(37,211,102,.12); border-color: rgba(37,211,102,.4); color: #5ee597; }
.btn--block { width: 100%; }
.btn--sm { min-height: 44px; padding: 8px 14px; font-size: .9rem; }
.btn svg { width: 18px; height: 18px; fill: currentColor; }
.btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.btn-row--3 { grid-template-columns: repeat(3, 1fr); }

.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-family: var(--font-ui); font-size: .9rem; color: var(--ink-60); }
.input, .select, .textarea {
  width: 100%; min-height: 48px; padding: 10px 14px; border-radius: var(--r-sm);
  background: var(--glass); border: 1px solid var(--line-2); color: var(--ink-90);
  transition: border-color .2s, background .2s;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--gold); background: rgba(196,155,57,.06); }
.input:focus-visible, .select:focus-visible, .textarea:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.textarea { min-height: 120px; resize: vertical; }
.select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink-45) 50%), linear-gradient(135deg, var(--ink-45) 50%, transparent 50%); background-position: calc(14px) 55%, calc(14px + 5px) 55%; background-size: 5px 5px; background-repeat: no-repeat; padding-inline-start: 30px; }
.field-hint { color: var(--ink-45); font-size: .85rem; }

/* search bar (hero + search page) */
.searchbar { display: flex; align-items: center; gap: 6px; padding: 6px 6px 6px 16px; border-radius: var(--r-pill); background: rgba(10,6,20,.6); border: 1px solid var(--gold-line); backdrop-filter: blur(10px); }
.searchbar input { flex: 1; min-width: 0; background: transparent; border: 0; color: var(--ink); font-size: 1.15rem; padding: 8px 0; }
.searchbar input::placeholder { color: var(--ink-45); }
.searchbar input:focus { outline: none; }
.searchbar:focus-within { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold); }
.searchbar button { flex: none; height: 42px; padding: 0 20px; border-radius: var(--r-pill); border: 0; background: linear-gradient(135deg, var(--gold-hi), var(--gold)); color: #1a1206; font-family: var(--font-ui); font-weight: 700; }

/* lists of graves */
.glist { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.glist__item a {
  display: grid; grid-template-columns: 1fr auto; grid-template-areas: "name year" "meta year"; align-items: center; gap: 2px 12px;
  min-height: 56px; padding: 12px 6px; border-radius: 0; background: transparent; border: 0; border-bottom: 1px solid var(--line);
  transition: background .2s, transform .15s var(--ease);
}
.glist__item:last-child a { border-bottom: 0; }
.glist__item a:hover { background: var(--gold-soft); transform: translateX(-2px); }
[dir="rtl"] .glist__item a:hover { transform: translateX(2px); }
.glist__name { grid-area: name; color: var(--ink-90); font-size: 1.2rem; font-weight: 700; }
.glist__meta { grid-area: meta; color: var(--ink-45); font-size: .85rem; display: flex; gap: 10px; flex-wrap: wrap; }
.glist__year { grid-area: year; font-family: var(--font-en); color: var(--gold-text); font-size: .95rem; }

.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: var(--r-pill); font-family: var(--font-ui); font-size: .8rem; font-weight: 500; border: 1px solid var(--line-2); color: var(--ink-60); }
.badge--verified { color: #86efac; border-color: rgba(74,222,128,.4); background: rgba(74,222,128,.08); }
.badge--source { color: var(--gold-text); border-color: var(--gold-line); }
.badge svg { width: 13px; height: 13px; fill: currentColor; }

.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat { text-align: center; padding: 14px 8px; border-radius: var(--r); background: var(--glass); border: 1px solid var(--line); }
.stat__num { display: block; font-family: var(--font-en); font-size: 1.5rem; color: var(--gold-hi); line-height: 1.1; }
.stat__label { display: block; color: var(--ink-45); font-family: var(--font-ui); font-size: .85rem; margin-top: 4px; }

.pager { display: flex; justify-content: center; gap: 6px; margin: 20px 0; flex-wrap: wrap; }
.pager a, .pager span { min-width: 40px; height: 40px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--r-sm); border: 1px solid var(--line); color: var(--ink-60); font-family: var(--font-en); font-size: .9rem; }
.pager a:hover { border-color: var(--gold-line); color: var(--gold-hi); }
.pager .is-active { background: var(--gold-soft); border-color: var(--gold-line); color: var(--gold-hi); }
.pager .is-disabled { opacity: .35; }

.empty { text-align: center; padding: 36px 16px; color: var(--ink-45); }
.empty strong { display: block; color: var(--ink-75); font-size: 1.1rem; margin-bottom: 6px; }

.toast {
  position: fixed; left: 50%; bottom: calc(var(--sab) + var(--tab-h) + 14px); z-index: 60;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  padding: 10px 18px; border-radius: var(--r-pill); background: #1c1230; border: 1px solid var(--gold-line); color: var(--ink-90);
  font-family: var(--font-ui); font-size: .95rem; box-shadow: var(--shadow);
  transition: all .25s var(--ease);
}
.toast.is-visible { transform: translate(-50%, 0); opacity: 1; }
@media (min-width: 900px) { .toast { bottom: 24px; } }

.breadcrumb { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: .9rem; color: var(--ink-45); margin-bottom: 12px; }
.breadcrumb a { color: var(--ink-60); }
.breadcrumb span::before { content: '›'; margin: 0 2px; }
[dir="rtl"] .breadcrumb span::before { content: '‹'; }

.skeleton { background: linear-gradient(90deg, var(--glass), var(--glass-2), var(--glass)); background-size: 200% 100%; animation: sk 1.2s linear infinite; border-radius: var(--r-sm); min-height: 18px; }
@keyframes sk { to { background-position: -200% 0; } }

/* ── 5. PAGES ──────────────────────────────────────────────── */

/* 5.1 HOME */
.hero {
  position: relative; margin: -18px -16px 16px; padding: 56px 20px 40px; text-align: center; overflow: hidden;
  background: linear-gradient(180deg, rgba(10,6,20,.2), var(--bg) 95%), url(/storage/site/shrine-hero.jpg) center 35% / cover no-repeat, var(--bg-2);
}
.hero__eyebrow { font-family: var(--font-en); font-size: .78rem; letter-spacing: .25em; color: var(--gold-text); margin-bottom: 10px; }
.hero h1 { font-size: clamp(2rem, 7vw, 3rem); color: var(--ink); margin-bottom: 6px; }
.hero h1 em { font-style: normal; color: var(--gold-hi); }
.hero__sub { color: var(--ink-60); margin-bottom: 20px; }
.hero .searchbar { max-width: 560px; margin: 0 auto 14px; }
.hero__links { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; font-size: .95rem; }
.hero__links a { color: var(--ink-60); border-bottom: 1px dotted var(--ink-30); display: inline-flex; align-items: center; min-height: 44px; }
.hero__links a:hover { color: var(--gold-hi); }
@media (min-width: 900px) { .hero { margin: -18px 0 20px; border-radius: var(--r-lg); padding: 80px 24px 56px; } }

.trust { display: grid; gap: 10px; margin: 16px 0; }
.trust__item { display: grid; grid-template-columns: 42px 1fr; gap: 12px; align-items: start; padding: 14px; border-radius: var(--r); background: var(--glass); border: 1px solid var(--line); }
.trust__icon { width: 42px; height: 42px; border-radius: 12px; background: var(--gold-soft); display: grid; place-items: center; color: var(--gold-hi); }
.trust__icon svg { width: 22px; height: 22px; fill: currentColor; }
.trust__item h3 { font-size: 1.02rem; margin-bottom: 2px; }
.trust__item p { color: var(--ink-60); font-size: 1.02rem; margin: 0; }
@media (min-width: 700px) { .trust { grid-template-columns: repeat(3, 1fr); } }

.map-preview { position: relative; height: 300px; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); background: var(--bg-1); }
.map-preview .leaflet-container { height: 100%; width: 100%; background: #0d0a18; filter: saturate(.7) brightness(.85); }
.map-preview__cta { position: absolute; inset: auto 12px 12px 12px; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 10px 10px 16px; border-radius: var(--r-pill); background: rgba(10,6,20,.85); border: 1px solid var(--gold-line); backdrop-filter: blur(10px); color: var(--ink-75); font-size: .95rem; z-index: 400; }

.cem-grid { display: grid; gap: 10px; }
.cem-card { display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 14px; padding: 14px 16px; border-radius: var(--r); background: var(--glass); border: 1px solid var(--line); }
.cem-card:hover { border-color: var(--gold-line); }
.cem-card__icon { width: 44px; height: 44px; border-radius: 12px; background: var(--gold-soft); display: grid; place-items: center; color: var(--gold-hi); }
.cem-card__icon svg { width: 22px; height: 22px; fill: currentColor; }
.cem-card__img { width: 56px; height: 56px; border-radius: 12px; object-fit: cover; border: 1px solid var(--gold-line); }
.cem-card:has(.cem-card__img) { grid-template-columns: 56px 1fr auto; }
.cem-card h3 { font-size: 1.1rem; }
.cem-card p { color: var(--ink-45); font-size: .9rem; margin: 0; }
.cem-card__arrow { color: var(--gold-text); font-size: 1.3rem; }

.recent-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.recent-card { padding: 16px 14px; border-radius: var(--r); background: linear-gradient(160deg, rgba(60,35,120,.22), rgba(8,5,18,.9)); border: 1px solid var(--line); }
.recent-card:hover { border-color: var(--gold-line); }
.recent-card strong { display: block; color: var(--ink-90); font-size: 1.05rem; margin-bottom: 4px; }
.recent-card span { font-family: var(--font-en); color: var(--gold-text); font-size: .85rem; }
@media (min-width: 700px) { .recent-grid { grid-template-columns: repeat(4, 1fr); } }

/* 5.2 GRAVE */
.grave-hero { text-align: center; padding: 20px 0 10px; }
.grave-photo { width: 110px; height: 110px; border-radius: 50%; object-fit: cover; margin: 0 auto 16px; border: 3px solid var(--gold-line); box-shadow: 0 0 0 7px rgba(196,155,57,.07), var(--shadow); }
.grave-photo--placeholder { display: grid; place-items: center; background: var(--bg-2); }
.grave-photo--placeholder svg { width: 44px; height: 44px; fill: rgba(196,155,57,.35); }
.grave-hero h1 { font-size: clamp(1.9rem, 7vw, 2.6rem); color: var(--ink); }
.grave-hero .en { color: var(--ink-45); font-size: .85rem; margin: 2px 0 6px; }
.grave-dates { font-family: var(--font-en); color: var(--gold-text); font-size: 1.05rem; letter-spacing: .1em; }
.grave-cem { display: inline-block; margin-top: 6px; color: var(--ink-60); font-size: .95rem; }
.grave-badges { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin-top: 12px; }

.fatiha { text-align: center; padding: 22px 18px; margin: 16px 0 14px; border-radius: var(--r-lg); background: linear-gradient(160deg, rgba(196,155,57,.14), rgba(196,155,57,.03)); border: 1px solid var(--gold-line); }
.fatiha__verse { font-size: 1.45rem; font-weight: 500; color: var(--ink-90); margin-bottom: 2px; text-wrap: balance; unicode-bidi: plaintext; }
.fatiha__ref { color: var(--ink-45); font-size: .85rem; margin-bottom: 14px; }
.fatiha__num { font-family: var(--font-en); font-size: 2.2rem; color: var(--gold-hi); line-height: 1; }
.fatiha__num.pulse { animation: pulse .4s var(--ease); }
@keyframes pulse { 50% { transform: scale(1.15); } }
.fatiha__label { color: var(--ink-60); margin: 4px 0 14px; }
.fatiha .btn--primary { min-width: 220px; font-size: 1.05rem; }

.loc { display: grid; gap: 10px; }
.loc__map { height: 280px; border-radius: var(--r); overflow: hidden; border: 1px solid var(--gold-line); background: var(--bg-1); position: relative; }
.loc__map::after { content: 'اضغط على الخريطة لتكبيرها'; position: absolute; inset-inline-end: 8px; bottom: 8px; padding: 3px 8px; border-radius: 6px; background: rgba(10,6,20,.7); color: var(--ink-60); font: 12px var(--font-ui); pointer-events: none; }
.loc__map .leaflet-control-layers { border-radius: 8px; }
.loc__map .leaflet-container { height: 100%; }
.loc__addr { display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--ink-75); }
.loc__addr b { color: var(--gold-hi); font-weight: 700; }
.loc__coords { color: var(--ink-45); font-family: var(--font-en); font-size: .8rem; direction: ltr; text-align: center; }

.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.photo-grid img { aspect-ratio: 1; object-fit: cover; border-radius: var(--r-sm); border: 1px solid var(--line); }

.khatma-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin: 12px 0; }
.juz { aspect-ratio: 1; display: grid; place-items: center; border-radius: var(--r-sm); border: 1px solid var(--line-2); background: var(--glass); font-family: var(--font-en); font-size: .9rem; color: var(--ink-75); cursor: pointer; transition: all .15s; }
.juz:hover:not(:disabled) { border-color: var(--gold-line); color: var(--gold-hi); }
.juz:disabled { cursor: default; opacity: .9; }
.juz.is-mine { background: var(--gold-hi); border-color: var(--gold-hi); color: #1a1408; font-weight: 700; cursor: pointer; }
.juz.is-mine:hover { filter: brightness(1.08); }
.juz.is-taken { background: var(--gold-soft); border-color: var(--gold-line); color: var(--gold-hi); cursor: default; }
.juz.is-done { background: rgba(74,222,128,.12); border-color: rgba(74,222,128,.4); color: #86efac; cursor: default; }
.khatma-progress { height: 8px; border-radius: var(--r-pill); background: var(--glass-2); overflow: hidden; margin: 8px 0 4px; }
.khatma-progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold-hi)); transition: width .4s var(--ease); }
.khatma-meta { display: flex; justify-content: space-between; color: var(--ink-45); font-size: .85rem; }

.qr { display: grid; grid-template-columns: 150px 1fr; gap: 16px; align-items: center; }
.qr__code { padding: 10px; background: #fff; border-radius: var(--r-sm); width: 150px; }
.qr__code canvas, .qr__code img { width: 130px; height: 130px; }
.qr p { color: var(--ink-60); font-size: .95rem; }
@media (max-width: 420px) { .qr { grid-template-columns: 1fr; justify-items: center; text-align: center; } }

.services { margin-top: 24px; }
.services summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--ink-60); font-size: .98rem; padding: 10px 2px; }
.services summary::-webkit-details-marker { display: none; }
.services summary::after { content: '+'; font-family: var(--font-en); color: var(--gold-text); font-size: 1.3rem; }
.services[open] summary::after { content: '−'; }
.services__grid { display: grid; gap: 8px; margin: 8px 0 10px; }
.service { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px; padding: 12px 14px; border-radius: var(--r); background: var(--glass); border: 1px solid var(--line); }
.service:hover { border-color: var(--gold-line); }
.service b { display: block; color: var(--ink-90); }
.service small { color: var(--ink-45); }
.service__price { font-family: var(--font-en); color: var(--gold-text); font-size: .9rem; white-space: nowrap; }
.services__note { color: var(--ink-45); font-size: .88rem; margin: 0; }
.services__note b { color: var(--ink-75); font-weight: 400; }

/* 5.3 MEMORIAL (shared by memorial/show) */
.memorial-cover { position: relative; margin: -18px -16px 0; padding: 48px 20px 28px; text-align: center; border-bottom: 1px solid var(--gold-line); background: radial-gradient(600px 300px at 50% 0%, rgba(196,155,57,.16), transparent 70%), linear-gradient(180deg, #1a0e33, var(--bg)); }
.memorial-cover h1 { font-size: clamp(1.8rem, 7vw, 2.6rem); color: var(--ink); }
.memorial-verse { text-align: center; padding: 18px; color: var(--ink-90); font-size: 1.15rem; text-wrap: balance; unicode-bidi: plaintext; }
.memorial-verse small { display: block; color: var(--ink-45); font-size: .85rem; margin-top: 4px; }
.memorial-bio { white-space: pre-line; color: var(--ink-75); line-height: 1.9; }

/* 5.4 CEMETERY */
.cem-hero { padding: 12px 0 6px; }
.cem-hero h1 { font-size: clamp(1.6rem, 6vw, 2.2rem); }
.cem-hero p { color: var(--ink-60); }
.cem-tools { display: grid; gap: 10px; margin: 14px 0 18px; }

/* 5.5 SEARCH */
.search-page h1 { margin-bottom: 14px; }
.filters { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0 18px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0; }
.chip { display: inline-flex; align-items: center; min-height: 40px; padding: 6px 14px; border-radius: var(--r-pill); border: 1px solid var(--line-2); color: var(--ink-60); font-size: .88rem; font-family: var(--font-ui); background: transparent; }
.chip:hover, .chip.is-active { border-color: var(--gold-line); color: var(--gold-hi); background: var(--gold-soft); }

/* 5.6 MAP PAGE (full-bleed) */
.map-page { position: fixed; inset: 0; z-index: 0; isolation: isolate; padding-top: calc(var(--sat) + var(--bar-h)); padding-bottom: calc(var(--sab) + var(--tab-h)); }
.map-page #big-map { height: 100%; width: 100%; background: #0d0a18; }
.map-page .leaflet-container { filter: saturate(.8); }
.map-panel { position: absolute; top: calc(var(--sat) + var(--bar-h) + 10px); left: 12px; right: 12px; z-index: 500; max-width: 420px; margin-inline: auto; }
.map-results { max-height: 40vh; overflow: auto; margin-top: 8px; border-radius: var(--r); background: rgba(10,6,20,.92); border: 1px solid var(--line); backdrop-filter: blur(10px); }
.map-results a { display: flex; justify-content: space-between; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); color: var(--ink-90); }
.map-results a:last-child { border-bottom: 0; }
.map-results a span:last-child { font-family: var(--font-en); color: var(--gold-text); font-size: .85rem; }
.map-legend { position: absolute; bottom: calc(var(--sab) + var(--tab-h) + 12px); left: 12px; z-index: 500; padding: 8px 12px; border-radius: var(--r-pill); background: rgba(10,6,20,.85); border: 1px solid var(--line); color: var(--ink-60); font-size: .82rem; }
@media (min-width: 900px) { .map-page { padding-bottom: 0; } .map-legend { bottom: 16px; } body:has(.map-page) .app-footer { display: none; } }
body:has(.map-page) { padding-bottom: 0; overflow: hidden; }
body:has(.map-page) .app-footer { display: none; }
.leaflet-popup-content-wrapper { background: #1c1230; color: var(--ink-90); border: 1px solid var(--gold-line); border-radius: 12px; }
.leaflet-popup-tip { background: #1c1230; }
.leaflet-popup-content { font-family: var(--font-ar); margin: 10px 14px; }
.leaflet-popup-content h4 { font-size: 1.05rem; margin-bottom: 2px; }
.leaflet-popup-content a { color: var(--gold-hi); font-size: .9rem; }
.leaflet-control-attribution { background: rgba(10,6,20,.7); color: var(--ink-45); font-size: 10px; }
.leaflet-control-attribution a { color: var(--ink-60); }
.leaflet-bar a { background: #1c1230; color: var(--ink-90); border-color: var(--line); }

/* 5.7 ACCOUNT */
.acct-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.acct-avatar { width: 56px; height: 56px; border-radius: 50%; background: var(--gold-soft); border: 1px solid var(--gold-line); display: grid; place-items: center; font-family: var(--font-en); font-size: 1.4rem; color: var(--gold-hi); }
.acct-head h1 { font-size: 1.4rem; }
.acct-head p { color: var(--ink-45); font-size: .9rem; margin: 0; }
.acct-tabs { display: flex; gap: 6px; overflow: auto; padding-bottom: 6px; margin-bottom: 12px; scrollbar-width: none; }
.acct-tabs::-webkit-scrollbar { display: none; }

/* 5.8 CONTRIBUTORS */
.contrib { display: grid; gap: 8px; }
.contrib__row { display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r); background: var(--glass); border: 1px solid var(--line); }
.contrib__avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--gold-soft); display: grid; place-items: center; font-family: var(--font-en); color: var(--gold-hi); }
.contrib__row b { color: var(--ink-90); }
.contrib__row small { display: block; color: var(--ink-45); }
.contrib__count { font-family: var(--font-en); color: var(--gold-text); }

/* 5.9 ABOUT / PROSE */
.prose h1 { margin-bottom: 6px; }
.prose .lead { color: var(--ink-60); font-size: 1.1rem; margin-bottom: 20px; }
.prose h2 { margin: 26px 0 8px; font-size: 1.25rem; color: var(--gold-hi); }
.prose p, .prose li { color: var(--ink-75); }
.prose ul { padding-inline-start: 22px; }
.prose li { margin-bottom: 4px; }
.split { display: grid; gap: 10px; }
.split__part { padding: 14px; border-radius: var(--r); background: var(--glass); border: 1px solid var(--line); text-align: center; }
.split__part b { display: block; font-family: var(--font-en); font-size: 1.5rem; color: var(--gold-hi); }
.split__part span { color: var(--ink-60); font-size: .9rem; }
@media (min-width: 600px) { .split { grid-template-columns: repeat(3, 1fr); } }

/* 5.10 AUTH */
.auth { max-width: 420px; margin: 24px auto; text-align: center; }
.auth .card { padding: 32px 24px; }
.auth h1 { font-size: 1.5rem; margin-bottom: 6px; }
.auth p { color: var(--ink-60); }
.btn--google { background: #fff; color: #3c4043; border-color: #dadce0; }
.btn--google:hover { background: #f5f5f5; }

/* 5.11 ORDER */
.order-summary { display: grid; gap: 8px; }
.order-summary div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.order-summary div:last-child { border-bottom: 0; }
.order-summary b { color: var(--ink-90); }

/* ── 6. UTILITIES ──────────────────────────────────────────── */
.muted { color: var(--ink-45); } .gold { color: var(--gold-hi); } .center { text-align: center; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; } .mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; }
.small { font-size: .9rem; } .x-small { font-size: .82rem; }
.hide-mobile { display: none; } @media (min-width: 900px) { .hide-mobile { display: initial; } .hide-desktop { display: none; } }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.grow { flex: 1; }

/* ── 7. PRINT ──────────────────────────────────────────────── */
@media print {
  body { background: #fff; color: #000; padding: 0; }
  .app-bar, .tab-bar, .app-footer, .services, .share, .toast, .memorial-strip { display: none; }
  .card { border: 1px solid #ccc; break-inside: avoid; }
}

/* ── 8. COMPAT (older views: orders, privacy) ──────────────── */
.glass-card { background: linear-gradient(160deg, rgba(255,255,255,.055), rgba(255,255,255,.025)); border: 1px solid var(--line); border-radius: var(--r-lg); }
.page-wrap { max-width: var(--content-max); margin: 0 auto; }
.static-page { max-width: var(--content-max); margin: 0 auto; }
.static-hero h1 { margin-bottom: 4px; }
.static-subtitle { color: var(--ink-45); margin-bottom: 20px; }
.static-content { display: grid; gap: 14px; }
.static-section { padding: 18px 20px; border-radius: var(--r-lg); background: var(--glass); border: 1px solid var(--line); }
.static-section h2 { font-size: 1.15rem; color: var(--gold-hi); margin-bottom: 8px; }
.static-section p { color: var(--ink-75); margin: 0 0 .5em; }
.static-section p:last-child { margin: 0; }
.static-list { padding-inline-start: 20px; color: var(--ink-75); margin: 0; }

/* ---- guest book ---- */
.gb { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.gb__item { display: grid; grid-template-columns: 28px 1fr auto; gap: 10px; align-items: start; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--glass); }
.gb__item--comment { border-color: var(--gold-line); }
.gb__ic { font-size: 1.1rem; color: var(--gold-text); text-align: center; line-height: 1.4; }
.gb__who { color: var(--ink-90); font-weight: 600; }
.gb__what { color: var(--ink-60); font-size: .95rem; }
.gb__body { margin: 4px 0 0; color: var(--ink-90); font-size: 1.1rem; line-height: 1.7; white-space: pre-line; }
.gb__when { color: var(--ink-45); font-size: .8rem; white-space: nowrap; }
.gb__when a { color: var(--ink-45); }
.gb-form textarea { width: 100%; min-height: 84px; resize: vertical; }
.gb-actions { margin-bottom: 12px; }
/* ---- manage page ---- */
.mg-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; margin: 12px 0; }
.mg-stat { padding: 12px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--glass); text-align: center; }
.mg-stat b { display: block; font-family: var(--font-en); font-size: 1.6rem; color: var(--gold-text); }
.mg-stat span { color: var(--ink-60); font-size: .85rem; }
.spark { display: flex; align-items: flex-end; gap: 2px; height: 48px; margin: 8px 0 0; }
.spark i { flex: 1; background: var(--gold-line); border-radius: 2px 2px 0 0; min-height: 2px; }
.spark i.hot { background: var(--gold); }
.mg-entry--hidden { opacity: .55; }
.mg-entry--hidden .gb__body { text-decoration: line-through; }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.switch:last-child { border-bottom: 0; }
.switch input { width: 20px; height: 20px; accent-color: var(--gold); }
.bell { position: relative; }
.bell__n { position: absolute; top: -4px; inset-inline-end: -4px; min-width: 16px; height: 16px; border-radius: 8px; background: var(--gold); color: #1a1200; font-size: .65rem; font-weight: 700; display: grid; place-items: center; padding: 0 4px; font-family: var(--font-en); }
.notif { display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--glass); text-decoration: none; color: inherit; }
.notif.is-unread { border-color: var(--gold-line); }
.notif b { color: var(--ink-90); display: block; }
.notif span { color: var(--ink-60); font-size: .95rem; }
.notif small { color: var(--ink-45); white-space: nowrap; }

/* ---- guides ---- */
.guide .card p, .guide .card li { font-size: 1.15rem; line-height: 1.9; color: var(--ink-90); }
.guide .card ul { padding-inline-start: 1.2em; margin: 0; }
.faq { border-bottom: 1px solid var(--line); padding: 8px 0; }
.faq:last-child { border-bottom: 0; }
.faq summary { cursor: pointer; font-weight: 600; color: var(--ink-90); font-size: 1.1rem; list-style: none; display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--gold-text); font-family: var(--font-en); }
.faq[open] summary::after { content: '−'; }
.faq p { margin: 8px 0 0; color: var(--ink-60); line-height: 1.8; }

/* Rich person page (notable / family tier) */
.timeline { list-style: none; margin: 0; padding: 0; border-inline-start: 2px solid var(--gold-line); }
.timeline li { position: relative; padding: 0 18px 14px 0; }
.timeline li::before { content: ''; position: absolute; inset-inline-start: -7px; top: 8px; width: 12px; height: 12px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
.timeline b { color: var(--gold-text); font-family: var(--font-en); margin-inline-end: 8px; }
.video-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.video { position: relative; aspect-ratio: 16/9; border-radius: 12px; overflow: hidden; background: #000; border: 1px solid var(--line-2); cursor: pointer; padding: 0; width: 100%; }
.video img { width: 100%; height: 100%; object-fit: cover; opacity: .8; display: block; }
.video::after { content: '▶'; position: absolute; inset: 0; display: grid; place-items: center; font-size: 2rem; color: #fff; text-shadow: 0 2px 12px rgba(0,0,0,.7); }
.video iframe { width: 100%; height: 100%; border: 0; display: block; }
.video.is-playing::after { display: none; }
.video__title { margin: 6px 0 0; font-size: .9rem; color: var(--ink-60); }
.doc-list a { display: flex; gap: 10px; align-items: center; }
.badge--rich { background: var(--gold-soft); color: var(--gold-text); border: 1px solid var(--gold-line); }
.pg-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.pg-ph { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.pg-ph img { width: 120px; height: 120px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line-2); }
.pg-row { display: flex; gap: 10px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); }
.pg-row img { border-radius: 6px; object-fit: cover; }
.pg-row span, .pg-row a { flex: 1; }
/* Gold named pin for rich pages on the map */
.pin-rich { width: 22px; height: 30px; background: linear-gradient(160deg, #F0C830, #C49B39); clip-path: path('M11 0C4.9 0 0 4.9 0 11c0 8.2 11 19 11 19s11-10.8 11-19C22 4.9 17.1 0 11 0z'); filter: drop-shadow(0 0 6px rgba(240,200,48,.85)); position: relative; }
.pin-rich::after { content: ''; position: absolute; top: 7px; left: 7px; width: 8px; height: 8px; border-radius: 50%; background: #0a0614; }
.leaflet-tooltip.pin-label { background: rgba(10,6,20,.88); color: #F0C830; border: 1px solid rgba(196,155,57,.45); border-radius: 8px; font-family: Tajawal, sans-serif; font-size: .8rem; padding: 2px 8px; box-shadow: none; }
.leaflet-tooltip.pin-label::before { display: none; }
/* Map popups — beat leaflet.css (loaded after this file) with higher specificity */
.leaflet-container .leaflet-popup-content-wrapper { background: #1c1230; color: var(--ink-90); border: 1px solid var(--gold-line); border-radius: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.5); }
.leaflet-container .leaflet-popup-tip { background: #1c1230; border: 1px solid var(--gold-line); }
.leaflet-container .leaflet-popup-content { font-family: var(--font-ar); margin: 10px 12px; line-height: 1.5; }
.leaflet-container a.leaflet-popup-close-button { color: var(--ink-60); }
.pop .leaflet-popup-content { margin: 10px; }
.pop__card { display: flex; gap: 12px; align-items: flex-start; color: var(--ink-90) !important; text-decoration: none; }
.pop__img { flex: none; width: 72px; height: 72px; border-radius: 10px; object-fit: cover; border: 1px solid var(--gold-line); background: #120a20; }
.pop__img--none { display: grid; place-items: center; color: var(--gold-text); font-size: 1.1rem; }
.pop__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pop__kicker { color: var(--gold-text); font-size: .78rem; }
.pop__name { font-size: 1.02rem; color: #fff; line-height: 1.35; }
.pop__note { color: var(--ink-60); font-size: .82rem; }
.pop__meta { color: var(--ink-45); font-size: .78rem; }
.pop__cta { color: var(--gold-hi); font-size: .85rem; margin-top: 4px; }

/* Map page sits below header + memorial strip when the strip is shown */
body:has(.memorial-strip) .map-page { padding-top: calc(var(--sat) + var(--bar-h) + var(--strip-h)); }
body:has(.memorial-strip) .map-panel { top: calc(var(--sat) + var(--bar-h) + var(--strip-h) + 10px); }
.lane-label { display: inline-block; white-space: nowrap; transform: translate(-50%, -50%); background: rgba(10,6,20,.78); color: #F0C830; border: 1px solid rgba(196,155,57,.4); border-radius: 6px; padding: 0 6px; font-family: Tajawal, sans-serif; font-size: .75rem; pointer-events: none; }
.leaflet-container .leaflet-control-layers { background: #1c1230; color: var(--ink-90); border: 1px solid var(--gold-line); border-radius: 10px; font-family: var(--font-ar); }
.leaflet-container .leaflet-control-layers-toggle { filter: invert(1) hue-rotate(180deg); }
/* Pin picker (submit form + manage page) */
#pick-map, .pick-map { height: 340px; border-radius: 12px; border: 1px solid var(--gold-line); display: none; margin-top: 10px; overflow: hidden; }
#pick-map.show, .pick-map.show { display: block; }
.btn--nav { display: inline-flex; align-items: center; gap: 8px; }
.nav-logo { width: 22px; height: 22px; object-fit: contain; border-radius: 5px; flex: none; }
/* Bell + account sit together in the last header column (they used to wrap onto a second row, over the strip) */
.app-bar__end { display: flex; align-items: center; gap: 6px; justify-self: end; }
.grid-label { display: inline-block; transform: translate(-50%, -50%); color: rgba(230,251,255,.6); font-family: var(--font-en); font-size: .7rem; text-shadow: 0 0 3px #000, 0 0 3px #000; pointer-events: none; white-space: nowrap; }
/* Map markers: one look per kind of place */
.mk { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 2px solid #0a0614; box-shadow: 0 2px 8px rgba(0,0,0,.55); }
.mk svg { width: 16px; height: 16px; fill: currentColor; }
.mk--grave { width: 12px; height: 12px; background: #F0C830; border: 2px solid #fff; box-shadow: 0 0 6px rgba(240,200,48,.8); }
.mk--shrine  { background: linear-gradient(160deg, #F0C830, #B8862B); color: #0a0614; width: 32px; height: 32px; }
.mk--maqam   { background: #fff; color: #9A7423; }
.mk--mosque  { background: #1FA187; color: #fff; }
.mk--gate    { background: #3A7BD5; color: #fff; border-radius: 8px; }
.mk--service { background: #8C8FA3; color: #fff; border-radius: 8px; }
.mk--fatha   { background: #A55EEA; color: #fff; border-radius: 6px; width: 24px; height: 24px; }
.mk--fatha svg { width: 13px; height: 13px; }
.pin-rich--mini { display: inline-block; width: 14px; height: 19px; vertical-align: middle; transform: scale(.65); }
.map-legend { padding: 0; }
.map-legend__btn { background: none; border: 0; color: var(--ink-75); font: inherit; padding: 8px 12px; cursor: pointer; }
.map-legend__list { list-style: none; margin: 0; padding: 4px 12px 10px; display: grid; gap: 6px; }
.map-legend__list li { display: flex; align-items: center; gap: 8px; font-size: .82rem; color: var(--ink-75); }
.map-legend__list .mk { width: 22px; height: 22px; flex: none; }
.map-legend__list .mk svg { width: 13px; height: 13px; }
.map-legend__list .mk--grave { width: 12px; height: 12px; margin: 0 5px; }
.lg-line { display: inline-block; width: 22px; height: 0; border-top: 3px solid #F0C830; opacity: .8; }
.lg-line--grid { border-top: 2px solid #8BE9FD; }
.map-legend { border-radius: 14px; }
.area-label { display: inline-block; transform: translate(-50%, -50%); white-space: nowrap; color: #E5D4FF; background: rgba(30,12,50,.75); border: 1px solid rgba(195,155,255,.5); border-radius: 6px; padding: 0 6px; font-family: var(--font-ui); font-size: .75rem; pointer-events: none; }
.area-label--sq { background: none; border: 0; font-family: var(--font-en); font-size: .7rem; color: rgba(229,212,255,.8); text-shadow: 0 0 3px #000; }
/* Map "go to my location": round, icon centred */
.searchbar #locate { width: 42px; height: 42px; padding: 0; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; line-height: 0; }
.searchbar #locate svg { display: block; width: 22px; height: 22px; }
.lane-edit-btn { background: #1c1230; color: var(--gold-hi); border: 1px solid var(--gold-line); border-radius: 999px; padding: 8px 14px; font-family: var(--font-ui); font-size: .85rem; cursor: pointer; box-shadow: 0 4px 14px rgba(0,0,0,.4); }
.lane-edit-btn.is-on { background: var(--gold); color: #1a1206; }

/* ── نعي (obituaries) ─────────────────────────────── */
.obit { text-align: center; border-color: var(--gold-line); background: linear-gradient(180deg, rgba(196,155,57,.07), transparent 60%), var(--glass); }
.obit__inna { font-family: var(--font-ar); color: var(--gold-text); font-size: 1.25rem; margin: 0 0 4px; }
.obit__name { font-family: var(--font-ar); font-size: 1.6rem; margin: 0 0 10px; }
.obit__photo { width: 96px; height: 96px; object-fit: cover; border-radius: 50%; border: 2px solid var(--gold-line); margin: 0 auto 10px; display: block; }
.obit__text { font-family: var(--font-ar); font-size: 1.12rem; line-height: 1.9; margin: 0 auto 12px; max-width: 36em; white-space: pre-line; }
.obit__facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; text-align: start; max-width: 30em; margin: 0 auto 10px; font-size: .95rem; }
.obit__facts dt { color: var(--ink-45); }
.obit__facts dd { margin: 0; }
.obit__majalis { text-align: start; max-width: 30em; margin: 0 auto; border-top: 1px solid var(--line); padding-top: 8px; }
.obit__majalis h3 { font-size: 1rem; color: var(--gold-text); margin: 4px 0; }
.obit .btn-row { justify-content: center; }
.obit--compact { text-align: start; }
.obit--compact .obit__inna, .obit--compact .obit__facts, .obit--compact .obit__majalis { margin-inline: 0; }
.obit--compact .obit__name { font-size: 1.15rem; font-family: var(--font-ui); }
.obit--compact .obit__text { font-size: 1rem; margin-inline: 0; }
.obit--compact .btn-row { justify-content: flex-start; }
.majlis-line { padding: 8px 0; border-bottom: 1px solid var(--line); }
.majlis-line:last-child { border-bottom: 0; }
.obit-list { display: grid; gap: 8px; }
.obit-card { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--glass); color: inherit; }
.obit-card:hover { border-color: var(--gold-line); }
.obit-card img, .obit-card__ph { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; flex: none; border: 1px solid var(--gold-line); }
.obit-card__ph { display: grid; place-items: center; color: var(--gold-text); font-family: var(--font-ar); font-size: .9rem; }
.obit-card__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.obit-card__body b { font-family: var(--font-ar); font-size: 1.08rem; }
.obit-card__majlis { color: var(--gold-text); }
.believers { padding: 6px 0; }
.believers__line { font-weight: 700; margin: 0 0 4px; }
.believers__dua { font-family: var(--font-ar); font-size: 1.15rem; color: var(--gold-text); margin: 0 auto 12px; max-width: 30em; }

/* ── guides: duas & verses ─────────────────────── */
.guide .dua { border-color: var(--gold-line); }
.guide .dua .dua__text { font-family: var(--font-ar); font-size: 1.45rem; line-height: 2.1; text-align: center; color: var(--ink); margin: 6px 0 10px; text-wrap: pretty; }
.guide .dua .dua__note { font-size: 1rem; color: var(--gold-text); text-align: center; }
.guide .dua .dua__src { font-size: .9rem; color: var(--ink-45); text-align: center; }
.guide .dua .btn-row { justify-content: center; }
.guide .steps { counter-reset: s; list-style: none; padding: 0; margin: 0; }
.guide .steps li { counter-increment: s; position: relative; padding-inline-start: 40px; margin-bottom: 12px; }
.guide .steps li::before { content: counter(s); position: absolute; inset-inline-start: 0; top: 4px; width: 28px; height: 28px; border-radius: 50%; background: var(--gold-soft); border: 1px solid var(--gold-line); color: var(--gold-hi); font-family: var(--font-en); font-size: .9rem; display: grid; place-items: center; }
.guide .toc { display: flex; flex-wrap: wrap; gap: 6px; }

/* ── Contributors (push 1): grave-page strip ─────────────── */
.contrib-strip { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 4px 0 16px; }
.contrib-strip .btn { min-height: 44px; display: inline-flex; align-items: center; gap: 6px; }
.contrib-strip__miss { flex-basis: 100%; margin: 0; font-size: .88rem; color: var(--ink-45); }
.contrib-by { margin: 0 0 6px; font-size: .9rem; color: var(--ink-60); }
a.contrib__row { color: inherit; text-decoration: none; }
.contrib__count small { display: block; font-family: var(--font-ui); font-size: .78rem; color: var(--ink-45); }
.contrib-month { display: grid; gap: 2px; text-decoration: none; color: inherit; margin-bottom: 12px; }
.contrib-month b { font-size: 1.2rem; color: var(--gold-hi); }
/* ── Scholarly layer (push 8) ── */
.cite { font-size: .72em; line-height: 0; }
.cite a { text-decoration: none; }
.cite--need { color: var(--gold-hi); white-space: nowrap; }
.sources { margin: 0; padding-inline-start: 1.4em; display: grid; gap: 8px; font-size: .92rem; }
.sources li:target { background: var(--gold-soft); border-radius: 6px; }
.cite-page__text { font-size: .9rem; background: var(--glass); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px 12px; margin: 0 0 8px; user-select: all; }

/* iPhone (26 Oct): date/time boxes keep a fixed native width and pushed two-column rows past the screen edge, so the
   whole page scrolled sideways. Let grid/flex children shrink, give the native pickers a normal block width, and never
   let a page scroll sideways. */
.filters > *, .field { min-width: 0; }
input[type="date"], input[type="time"], input[type="datetime-local"], input[type="month"] {
  -webkit-appearance: none; appearance: none; display: block; min-width: 0; max-width: 100%; width: 100%;
}
input[type="date"]::-webkit-date-and-time-value, input[type="time"]::-webkit-date-and-time-value { text-align: start; }
html, body { overflow-x: clip; max-width: 100%; }


/* ── fold for secondary content (audit, Oct 2026) ─────────── */
.more-fold { margin-top: 24px; border-top: 1px solid var(--line); padding-top: 8px; }
.more-fold > summary { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 8px 4px; color: var(--ink-90); font-family: var(--font-ui); font-weight: 600; font-size: 1rem; }
.more-fold > summary::-webkit-details-marker { display: none; }
.more-fold > summary::after { content: '+'; color: var(--gold-text); font-family: var(--font-en); font-size: 1.3rem; }
.more-fold[open] > summary::after { content: '−'; }
.more-fold[open] > summary { margin-bottom: 12px; }
.more-fold .contrib-strip--low { margin: 8px 0 16px; }
.contrib-hint { margin: -4px 0 16px; }
.contrib-hint a { white-space: nowrap; }

/* skip link */
.skip-link { position: absolute; top: -200px; inset-inline-start: 12px; z-index: 100; padding: 10px 16px; background: var(--gold); color: #1a1206; border-radius: var(--r-pill); font-family: var(--font-ui); font-weight: 700; }
.skip-link:focus-visible { top: calc(var(--sat) + 8px); outline: 2px solid #fff; }

/* place page: info card under the name (Oct 2026) */
.pl-info__dl { margin: 0 0 12px; display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 1rem; }
.pl-info__dl dt { color: var(--ink-60); font-family: var(--font-ui); font-size: .85rem; align-self: baseline; }
.pl-info__dl dd { margin: 0; }
.pl-info .btn-row { flex-wrap: wrap; }
