/* Majlis design system.
   Layout idea: calm ivory canvas, one deep emerald-and-navy hero with a gold khatam lattice,
   then quiet cards. Gold is the only accent; everything else stays restrained. */

:root {
  --bg: #F7F2E6;
  --surface: #FFFCF4;
  --surface-2: #EEE7D4;
  --ink: #0E2620;
  --ink-2: #485B54;
  --line: #DCD2BA;
  --primary: #0B5545;
  --on-primary: #FBF5E4;
  --accent: #B48A34;
  --gold-ink: #7A5712;
  --gold-fill: #D9B35F;
  --on-gold: #1B1708;
  --hero-a: #0A4A3E;
  --hero-b: #0E1C38;
  --hero-ink: #F7F0DC;
  --hero-ink-2: #C3CEC5;
  --hero-gold: #E0BC68;
  --hero-glass: rgba(255, 255, 255, .07);
  --hero-glass-line: rgba(255, 255, 255, .16);
  --ok: #17744A;
  --warn: #8F600A;
  --danger: #B03A2A;
  --shadow: 0 14px 34px -16px rgba(14, 38, 32, .35);
  --shadow-sm: 0 6px 18px -10px rgba(14, 38, 32, .3);
  --scrim: rgba(6, 12, 24, .62);

  --tone-emerald-a: #0A4A3E; --tone-emerald-b: #16745F; --tone-emerald-i: #F7F0DC; --tone-emerald-g: #E0BC68;
  --tone-navy-a: #0E1B36; --tone-navy-b: #23437F; --tone-navy-i: #F7F0DC; --tone-navy-g: #E0BC68;
  --tone-gold-a: #8A6418; --tone-gold-b: #D6B05B; --tone-gold-i: #1A1405; --tone-gold-g: #1A1405;
  --tone-teal-a: #0D3C47; --tone-teal-b: #20737C; --tone-teal-i: #F7F0DC; --tone-teal-g: #EBD79F;
  --tone-sand-a: #E8DBB9; --tone-sand-b: #F6EEDA; --tone-sand-i: #0B4A3E; --tone-sand-g: #8A6A22;

  --font-display: 'Instrument Serif', Georgia, 'Times New Roman', serif;
  --font-body: 'Hanken Grotesk', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-quran: 'Amiri Quran', 'Scheherazade New', 'Traditional Arabic', serif;
  --font-ar: 'Reem Kufi', 'Noto Naskh Arabic', 'Geeza Pro', 'Traditional Arabic', serif;

  --r-sm: 10px;
  --r: 16px;
  --r-lg: 24px;
  --header-h: 68px;

  --khatam: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 64 64' fill='none' stroke='black' stroke-width='1.1'%3E%3Crect x='14' y='14' width='36' height='36'/%3E%3Cpath d='M32 6.5 57.5 32 32 57.5 6.5 32z'/%3E%3Ccircle cx='32' cy='32' r='8'/%3E%3Cpath d='M0 0l5 5M64 0l-5 5M0 64l5-5M64 64l-5-5' stroke-width='.8'/%3E%3C/svg%3E");
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0A1325; --surface: #101C35; --surface-2: #16274A; --ink: #F0EAD8; --ink-2: #A9B4C0; --line: #233556;
    --primary: #D9B35F; --on-primary: #14110A; --accent: #D9B35F; --gold-ink: #E4C479;
    --hero-a: #07382F; --hero-b: #0A1428;
    --ok: #4CC38A; --warn: #E0B04A; --danger: #F08A76;
    --shadow: 0 16px 38px -16px rgba(0, 0, 0, .7); --shadow-sm: 0 6px 18px -10px rgba(0, 0, 0, .7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0A1325; --surface: #101C35; --surface-2: #16274A; --ink: #F0EAD8; --ink-2: #A9B4C0; --line: #233556;
  --primary: #D9B35F; --on-primary: #14110A; --accent: #D9B35F; --gold-ink: #E4C479;
  --hero-a: #07382F; --hero-b: #0A1428;
  --ok: #4CC38A; --warn: #E0B04A; --danger: #F08A76;
  --shadow: 0 16px 38px -16px rgba(0, 0, 0, .7); --shadow-sm: 0 6px 18px -10px rgba(0, 0, 0, .7);
  color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg); color: var(--ink);
  font-family: var(--font-body); font-size: 1rem; line-height: 1.55;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); background: var(--bg); z-index: 60; }
h1, h2, h3, h4, p, ul, dl, dd, figure { margin: 0; }
h1, h2 { font-family: var(--font-display); font-weight: 400; letter-spacing: -.01em; text-wrap: balance; }
h1 { font-size: clamp(2rem, 5vw, 3rem); line-height: 1.05; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.1rem); line-height: 1.1; }
h3 { font-size: 1.05rem; line-height: 1.3; }
h1:focus { outline: none; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img { max-width: 100%; display: block; }
ul { padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; left: 12px; top: -80px; z-index: 100; background: var(--primary); color: var(--on-primary); padding: 10px 16px; border-radius: 999px; text-decoration: none; font-weight: 600; }
.skip:focus { top: calc(env(safe-area-inset-top, 0px) + 10px); }
.i { width: 1.15em; height: 1.15em; flex: none; }
.wrap { width: 100%; max-width: 1200px; margin-inline: auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.block { padding-block: clamp(28px, 5vw, 56px); }
.block-tight { padding-top: 40px; }
.muted { color: var(--ink-2); }
.hint { color: var(--ink-2); font-size: .85rem; margin-top: 6px; }
.opt { color: var(--ink-2); font-weight: 400; font-size: .8rem; margin-left: 4px; }
.sel { user-select: all; overflow-wrap: anywhere; }
.link { background: none; border: 0; padding: 4px 0; color: var(--gold-ink); font-weight: 600; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.link:hover { text-decoration: underline; text-underline-offset: 3px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row--center { justify-content: center; }
.two { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
#view > * { animation: rise .5s ease both; }
@keyframes rise { from { opacity: .4; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- buttons, chips, pills ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 20px; border-radius: 999px; border: 1px solid transparent; font-weight: 600; text-decoration: none; transition: transform .15s ease, background .2s ease, border-color .2s ease; white-space: nowrap; }
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn--primary { background: var(--primary); color: var(--on-primary); }
.btn--primary:hover:not([disabled]) { filter: brightness(1.08); }
.btn--gold { background: var(--gold-fill); color: var(--on-gold); }
.btn--gold:hover { filter: brightness(1.06); }
.btn--ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn--ghost:hover { border-color: var(--accent); }
.btn--quiet { background: transparent; color: var(--ink-2); }
.btn--quiet:hover { color: var(--ink); background: var(--surface-2); }
.btn--danger { background: transparent; border-color: color-mix(in srgb, var(--danger) 45%, var(--line)); color: var(--danger); }
.btn--danger:hover { background: color-mix(in srgb, var(--danger) 10%, transparent); }
.btn--sm { min-height: 38px; padding: 6px 14px; font-size: .9rem; }
.btn--block { width: 100%; }
.icon-btn { width: 42px; height: 42px; display: inline-grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); background: transparent; text-decoration: none; transition: border-color .2s, background .2s; }
.icon-btn:hover { border-color: var(--accent); background: var(--surface-2); }
.icon-btn.txt { font-weight: 700; font-size: .85rem; }
.chip { display: inline-flex; align-items: center; gap: 5px; font-size: .72rem; font-weight: 600; letter-spacing: .02em; padding: 4px 10px; border-radius: 999px; background: color-mix(in srgb, var(--bg) 90%, transparent); color: var(--ink); backdrop-filter: blur(6px); }
.chip .i { width: .95em; height: .95em; }
.chip--gold { background: var(--gold-fill); color: var(--on-gold); }
.pill { display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 3px 10px; border-radius: 999px; border: 1px solid currentColor; }
.pill--published { color: var(--ok); }
.pill--pending { color: var(--warn); }
.pill--rejected { color: var(--danger); }
.badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; margin-left: 8px; border-radius: 999px; background: var(--gold-fill); color: var(--on-gold); font-size: .72rem; font-weight: 700; }
.eyebrow { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: .72rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--gold-ink); }
.eyebrow span { font-family: var(--font-ar); font-size: 1rem; letter-spacing: 0; text-transform: none; color: var(--accent); }

/* ---------- header ---------- */
.topbar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.topbar-in { display: flex; align-items: center; gap: 20px; height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.logo { width: 30px; height: 30px; color: var(--accent); }
.brand-name { font-family: var(--font-display); font-size: 1.75rem; line-height: 1; letter-spacing: -.01em; }
.brand-ar { font-family: var(--font-ar); font-size: 1.1rem; color: var(--gold-ink); padding-left: 10px; border-left: 1px solid var(--line); line-height: 1.2; }
.nav { display: none; gap: 4px; margin-left: 12px; }
.nav a { text-decoration: none; padding: 8px 14px; border-radius: 999px; font-weight: 500; color: var(--ink-2); }
.nav a:hover { color: var(--ink); background: var(--surface-2); }
.nav a[aria-current="page"] { color: var(--ink); background: var(--surface-2); }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
@media (min-width: 820px) { .nav { display: flex; } }
@media (max-width: 819px) { .hide-sm { display: none !important; } }

/* ---------- bottom tab bar (phones) ---------- */
#tabs { display: none; }
.tabbar { position: fixed; z-index: 55; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(5, 1fr); align-items: end; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(14px); border-top: 1px solid var(--line); padding: 8px max(16px, env(safe-area-inset-right, 0px)) calc(8px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
.tabbar a { min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: .7rem; font-weight: 600; color: var(--ink-2); text-decoration: none; padding: 4px 0; }
.tabbar a .i { width: 22px; height: 22px; }
.tabbar a[aria-current="page"] { color: var(--gold-ink); }
.tabbar .tab-add { width: 54px; height: 54px; margin: -22px auto 0; border-radius: 50%; background: var(--gold-fill); color: var(--on-gold); justify-content: center; box-shadow: var(--shadow); }
.tabbar .tab-add .i { width: 26px; height: 26px; }
@media (max-width: 819px) { #tabs { display: block; } .foot { padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); } }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; color: var(--hero-ink); background: linear-gradient(150deg, var(--hero-a) 0%, var(--hero-b) 100%); isolation: isolate; }
.hero-pattern { position: absolute; inset: 0; z-index: -1; }
.hero-pattern::before { content: ""; position: absolute; inset: 0; background: var(--hero-gold); opacity: .2; -webkit-mask-image: var(--khatam); mask-image: var(--khatam); -webkit-mask-size: 72px; mask-size: 72px; }
.hero-pattern::after { content: ""; position: absolute; inset: 0; background: linear-gradient(95deg, var(--hero-a) 8%, color-mix(in srgb, var(--hero-a) 70%, transparent) 42%, transparent 85%); }
.hero-grid { display: grid; gap: 28px; padding-block: clamp(36px, 7vw, 84px) clamp(28px, 4vw, 44px); align-items: center; }
.hero-copy { max-width: 700px; }
.hero-date { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: .78rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--hero-gold); margin-bottom: 18px; }
.hero-date i { width: 6px; height: 6px; background: var(--hero-gold); transform: rotate(45deg); }
.hero h1 { font-size: clamp(2.7rem, 8vw, 5rem); line-height: .98; }
.hero h1 em { color: var(--hero-gold); }
.hero-sub { margin-top: 18px; max-width: 540px; font-size: 1.1rem; color: var(--hero-ink-2); }
.nextup { display: none; position: relative; padding: 24px; border-radius: var(--r-lg); background: var(--hero-glass); border: 1px solid var(--hero-glass-line); backdrop-filter: blur(8px); overflow: hidden; }
.nextup-k { font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--hero-gold); margin-bottom: 10px; }
.nextup h2 { font-size: 1.8rem; margin-bottom: 10px; }
.nextup h2 a { text-decoration: none; }
.nextup h2 a:hover { text-decoration: underline; text-underline-offset: 4px; }
.nextup p { color: var(--hero-ink-2); font-size: .95rem; }
.nextup-ar { font-family: var(--font-ar); font-size: 4.5rem !important; line-height: 1; color: var(--hero-gold) !important; opacity: .55; margin-top: 18px; text-align: right; }
@media (min-width: 980px) { .hero-grid { grid-template-columns: minmax(0, 1.5fr) minmax(280px, 380px); gap: 56px; } .nextup { display: block; } }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding-block: 18px 26px; border-top: 1px solid var(--hero-glass-line); }
.stats dt { font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: var(--hero-ink-2); }
.stats dd { font-family: var(--font-display); font-size: clamp(1.6rem, 4vw, 2.3rem); color: var(--hero-gold); font-variant-numeric: tabular-nums; line-height: 1.2; }

/* ---------- sections, rails, cards ---------- */
.sec-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 18px; }
.sec-head > div { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.sec-ar { font-family: var(--font-ar); font-size: 1.25rem; color: var(--accent); }
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: min(84%, 330px); gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 2px 14px; scrollbar-width: thin; }
.rail > * { scroll-snap-align: start; min-width: 0; }
@media (min-width: 620px) { .rail { grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: visible; padding: 0; } }
@media (min-width: 980px) { .rail { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; } .rail--lg { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); }

.card { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); }
.card-media { position: relative; }
.datebadge { position: absolute; top: 12px; left: 12px; display: grid; justify-items: center; padding: 6px 11px 5px; border-radius: 12px; background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); line-height: 1; }
.datebadge b { font-family: var(--font-display); font-weight: 400; font-size: 1.55rem; }
.datebadge span { font-size: .64rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--gold-ink); margin-top: 3px; }
.card-tags { position: absolute; left: 12px; bottom: 12px; display: flex; gap: 6px; flex-wrap: wrap; }
.card-body { display: flex; flex-direction: column; gap: 10px; padding: 16px 18px 18px; flex: 1; }
.card-title { font-family: var(--font-display); font-weight: 400; font-size: 1.5rem; line-height: 1.12; text-wrap: balance; }
.card-title a { text-decoration: none; }
.card-title a::after { content: ""; position: absolute; inset: 0; }
.card-title a:focus-visible { outline: none; }
.card:has(.card-title a:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.meta { display: grid; gap: 6px; color: var(--ink-2); font-size: .9rem; }
.meta li { display: flex; gap: 9px; align-items: flex-start; }
.meta .i { margin-top: 2px; color: var(--accent); }
.meta span { min-width: 0; overflow-wrap: anywhere; }
.card-foot { margin-top: auto; padding-top: 12px; border-top: 1px dashed var(--line); display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.price { font-weight: 700; font-variant-numeric: tabular-nums; }
.price--free { color: var(--ok); }
.seats { font-size: .82rem; color: var(--ink-2); }
.seats--out { color: var(--danger); font-weight: 600; }
.card--lg .card-title { font-size: 1.9rem; }
.card--lg .poster { aspect-ratio: 2 / 1; }

/* ---------- posters ---------- */
.poster { --pa: var(--tone-emerald-a); --pb: var(--tone-emerald-b); --pi: var(--tone-emerald-i); --pg: var(--tone-emerald-g);
  position: relative; width: 100%; aspect-ratio: 21 / 9; overflow: hidden; display: grid; place-content: center; justify-items: center; gap: 6px; background: linear-gradient(135deg, var(--pa), var(--pb)); color: var(--pi); isolation: isolate; }
.poster::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--pg); opacity: .26; -webkit-mask-image: var(--khatam); mask-image: var(--khatam); -webkit-mask-size: 64px; mask-size: 64px; }
.poster::after { content: ""; position: absolute; inset: 10px; border: 1px solid color-mix(in srgb, var(--pg) 60%, transparent); border-radius: 10px; pointer-events: none; }
.poster-ar { font-family: var(--font-ar); font-size: 3.6rem; line-height: 1.1; color: var(--pi); }
.poster-cat { font-size: .78rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--pg); }
.tone-navy { --pa: var(--tone-navy-a); --pb: var(--tone-navy-b); --pi: var(--tone-navy-i); --pg: var(--tone-navy-g); }
.tone-gold { --pa: var(--tone-gold-a); --pb: var(--tone-gold-b); --pi: var(--tone-gold-i); --pg: var(--tone-gold-g); }
.tone-teal { --pa: var(--tone-teal-a); --pb: var(--tone-teal-b); --pi: var(--tone-teal-i); --pg: var(--tone-teal-g); }
.tone-sand { --pa: var(--tone-sand-a); --pb: var(--tone-sand-b); --pi: var(--tone-sand-i); --pg: var(--tone-sand-g); }
.poster--img { display: block; background: var(--surface-2); }
.poster--img::before, .poster--img::after { display: none; }
.poster--img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ---------- CTA, empty, notice ---------- */
.cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; padding: clamp(22px, 4vw, 36px); border-radius: var(--r-lg); color: var(--hero-ink); background: linear-gradient(135deg, var(--hero-a), var(--hero-b)); position: relative; overflow: hidden; isolation: isolate; }
.cta::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--hero-gold); opacity: .14; -webkit-mask-image: var(--khatam); mask-image: var(--khatam); -webkit-mask-size: 56px; mask-size: 56px; -webkit-mask-position: right; mask-position: right; }
.cta h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
.cta p { margin-top: 6px; color: var(--hero-ink-2); max-width: 520px; }
.empty { display: grid; justify-items: start; gap: 12px; padding: 36px clamp(20px, 4vw, 40px); border: 1px dashed var(--line); border-radius: var(--r-lg); background: color-mix(in srgb, var(--surface) 60%, transparent); }
.empty p { color: var(--ink-2); max-width: 52ch; }
.empty--sm { padding: 20px; }
.empty--done { justify-items: center; text-align: center; margin-inline: auto; max-width: 560px; border-style: solid; }
.notice { margin-top: 14px; padding: 12px 14px; border-radius: var(--r-sm); background: color-mix(in srgb, var(--warn) 12%, transparent); border: 1px solid color-mix(in srgb, var(--warn) 40%, transparent); font-size: .9rem; }
.confirm { display: grid; justify-items: center; gap: 10px; text-align: center; }
.confirm-mark { width: 56px; height: 56px; display: inline-grid; place-items: center; border-radius: 50%; background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); }
.confirm-mark .i { width: 28px; height: 28px; stroke-width: 2.2; }
.refcode { padding: 8px 14px; border-radius: 999px; background: var(--surface-2); font-variant-numeric: tabular-nums; }

/* ---------- forms ---------- */
.field { display: grid; gap: 6px; margin: 0 0 14px; border: 0; padding: 0; min-width: 0; }
.field label, .field legend, .lbl { font-weight: 600; font-size: .9rem; padding: 0; }
input, select, textarea { width: 100%; min-height: 46px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); outline: none; transition: border-color .2s, box-shadow .2s; }
textarea { resize: vertical; min-height: 120px; line-height: 1.5; }
input::placeholder, textarea::placeholder { color: color-mix(in srgb, var(--ink-2) 75%, transparent); }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 28%, transparent); }
input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--danger); }
input:disabled { opacity: .55; }
input[type="radio"], input[type="checkbox"] { width: auto; min-height: 0; }
.err { color: var(--danger); font-size: .9rem; margin-bottom: 12px; }
.segmented { display: flex; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-2); }
.seg { position: relative; flex: 1; }
.seg input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.seg span { display: block; text-align: center; padding: 8px 10px; border-radius: 999px; font-size: .88rem; font-weight: 600; color: var(--ink-2); transition: background .2s, color .2s; white-space: nowrap; }
.seg input:checked + span { background: var(--primary); color: var(--on-primary); }
.seg input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.switch { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 14px; font-weight: 600; cursor: pointer; }
.switch input { appearance: none; width: 46px; height: 28px; min-height: 0; padding: 0; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); position: relative; flex: none; cursor: pointer; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--ink-2); transition: transform .2s, background .2s; }
.switch input:checked { background: var(--primary); border-color: var(--primary); }
.switch input:checked::after { transform: translateX(18px); background: var(--on-primary); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 20px 0; overflow-x: auto; }
.tab { background: none; border: 0; padding: 10px 16px; font-weight: 600; color: var(--ink-2); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); }

/* ---------- page head, explore ---------- */
.page-head { display: flex; justify-content: space-between; align-items: end; flex-wrap: wrap; gap: 14px; margin-bottom: 24px; }
.explore-grid { display: grid; gap: 22px; }
.filters { display: none; padding: 18px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.filters.open { display: block; }
.filters-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.filters-head h2 { font-size: 1.4rem; }
.filters-toggle { display: inline-flex; }
@media (min-width: 900px) {
  .explore-grid { grid-template-columns: 280px minmax(0, 1fr); gap: 32px; align-items: start; }
  .filters { display: block; position: sticky; top: calc(var(--header-h) + env(safe-area-inset-top, 0px) + 16px); max-height: calc(100vh - var(--header-h) - 40px); overflow: auto; }
  .filters-toggle { display: none; }
}
.results { min-width: 0; }
.results-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-bottom: 18px; }
.count { color: var(--ink-2); }
.count b { color: var(--ink); font-family: var(--font-display); font-size: 1.6rem; font-weight: 400; margin-right: 2px; }
.fchips { display: flex; flex-wrap: wrap; gap: 8px; }
.fchip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px 5px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: .85rem; font-weight: 500; }
.fchip:hover { border-color: var(--accent); }
.fchip .i { width: 14px; height: 14px; }

/* ---------- event detail ---------- */
.back { margin-bottom: 14px; }
.banner { position: relative; border-radius: var(--r-lg); overflow: hidden; }
.banner .poster { aspect-ratio: 16 / 9; }
.banner .poster-cat { font-size: 1rem; }
.banner .card-tags { left: 16px; bottom: 16px; }
@media (min-width: 760px) { .banner .poster { aspect-ratio: 21 / 7; } }
.detail-head { display: grid; gap: 10px; margin: 26px 0 8px; max-width: 860px; }
.detail-head h1 { font-size: clamp(2.2rem, 5.5vw, 3.6rem); }
.by { color: var(--ink-2); }
.by b { color: var(--ink); font-weight: 600; }
.detail-grid { display: grid; gap: 28px; margin-top: 18px; }
.detail-aside { order: -1; }
@media (min-width: 900px) { .detail-grid { grid-template-columns: minmax(0, 1fr) 372px; gap: 48px; } .detail-aside { order: 0; } }
.detail-main { display: grid; gap: 36px; min-width: 0; align-content: start; }
.detail-main h2 { font-size: 1.7rem; margin-bottom: 12px; }
.prose { display: grid; gap: 14px; max-width: 66ch; font-size: 1.05rem; line-height: 1.7; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.tags button { background: var(--surface-2); border: 0; padding: 5px 12px; border-radius: 999px; font-size: .85rem; color: var(--ink-2); }
.tags button:hover { color: var(--ink); }
.mapcard { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--surface); }
.mapcard iframe { width: 100%; height: 240px; border: 0; display: block; }
.mapart { position: relative; height: 170px; background: var(--surface-2); overflow: hidden; }
.mapart svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.mp-roads { stroke: var(--surface); }
.mp-roads2 { stroke: var(--line); }
.mapart .pin { position: absolute; left: 50%; top: 52%; transform: translate(-50%, -100%); color: var(--accent); filter: drop-shadow(0 6px 6px rgba(0, 0, 0, .25)); }
.mapart .pin .i { width: 46px; height: 46px; fill: currentColor; stroke: var(--surface); stroke-width: 1.4; }
.mapcard-body { padding: 16px 18px 18px; display: grid; gap: 4px; }
.mapcard-body .row { margin-top: 10px; }
.venue { font-weight: 600; }
.addr { color: var(--ink-2); }
.orgcard { display: flex; gap: 18px; padding: 20px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.avatar { flex: none; width: 60px; height: 60px; display: grid; place-items: center; border-radius: 18px; background: linear-gradient(135deg, var(--tone-emerald-a), var(--tone-navy-b)); color: var(--hero-gold); font-family: var(--font-display); font-size: 1.5rem; }
.orgcard-body { display: grid; gap: 8px; min-width: 0; }
.orgcard-body h3 { font-size: 1.15rem; }
.contact { display: grid; gap: 6px; color: var(--ink-2); font-size: .95rem; }
.contact li { display: flex; align-items: center; gap: 9px; min-width: 0; }
.contact .i { color: var(--accent); }
.contact a { color: var(--gold-ink); overflow-wrap: anywhere; }
.sidecard { padding: 22px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-sm); display: grid; gap: 18px; }
@media (min-width: 900px) { .sidecard { position: sticky; top: calc(var(--header-h) + env(safe-area-inset-top, 0px) + 16px); } }
.side-price { display: flex; align-items: baseline; gap: 8px; }
.big { font-family: var(--font-display); font-size: 2.6rem; line-height: 1; }
.facts { display: grid; gap: 14px; }
.facts li { display: flex; gap: 12px; }
.facts .i { margin-top: 2px; color: var(--accent); }
.facts b { display: block; font-weight: 600; }
.facts .muted { font-size: .9rem; display: block; }
.cap-row { display: flex; justify-content: space-between; font-size: .85rem; color: var(--ink-2); margin-bottom: 6px; }
.bar { height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.actions { display: grid; gap: 10px; }
.share { padding-top: 16px; border-top: 1px dashed var(--line); }
.share-k { font-size: .75rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 10px; }
.share-row { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- modal ---------- */
dialog.modal { border: 0; padding: 0; background: transparent; width: min(480px, calc(100vw - 24px)); max-width: none; max-height: none; color: var(--ink); overflow: visible; }
dialog.modal::backdrop { background: var(--scrim); backdrop-filter: blur(3px); }
.modal-card { position: relative; background: var(--surface); border-radius: var(--r-lg); padding: 28px; max-height: calc(100vh - 40px); overflow: auto; box-shadow: var(--shadow); }
.modal-x { position: absolute; top: 12px; right: 12px; width: 38px; height: 38px; }
.modal-title { font-size: 2rem; margin-bottom: 4px; padding-right: 40px; }
.modal-sub { margin-bottom: 18px; }
.total { display: flex; justify-content: space-between; align-items: baseline; padding: 12px 0; margin-bottom: 8px; border-top: 1px dashed var(--line); }
.total b { font-family: var(--font-display); font-weight: 400; font-size: 1.8rem; }

/* ---------- auth ---------- */
.auth { display: grid; justify-items: center; }
.auth-card { width: min(100%, 460px); padding: clamp(22px, 4vw, 34px); border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-sm); }
.auth-card h1 { font-size: 2.3rem; margin-bottom: 6px; }
.demo-box { margin-top: 20px; padding-top: 18px; border-top: 1px dashed var(--line); display: grid; gap: 10px; }

/* ---------- submit ---------- */
.eform { display: grid; gap: 22px; max-width: 820px; }
.fs { border: 1px solid var(--line); border-radius: var(--r); padding: 20px clamp(16px, 3vw, 26px) 8px; background: var(--surface); min-width: 0; }
.fs legend { font-family: var(--font-display); font-size: 1.5rem; padding: 0 8px; margin-left: -8px; }
.err-sum { padding: 14px 18px; border-radius: var(--r-sm); border: 1px solid var(--danger); background: color-mix(in srgb, var(--danger) 9%, transparent); }
.err-sum ul { margin-top: 6px; padding-left: 18px; list-style: disc; }
.err-sum a { color: var(--danger); }
.drop { display: grid; gap: 14px; margin-bottom: 14px; }
.drop-prev { aspect-ratio: 16 / 7; border-radius: var(--r-sm); border: 1px dashed var(--line); background: var(--surface-2); display: grid; place-items: center; overflow: hidden; }
.drop-prev img { width: 100%; height: 100%; object-fit: cover; }
.drop-prev span { display: grid; justify-items: center; gap: 6px; padding: 12px; text-align: center; color: var(--ink-2); font-size: .9rem; }
.drop-prev .i { width: 28px; height: 28px; }
.drop-prev em { font-style: normal; }
.drop-ctl { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.drop-ctl .hint { flex-basis: 100%; margin: 0; }
.drop-ctl label.btn { cursor: pointer; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }

/* ---------- dashboard & admin ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 28px; }
.tiles > div { padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.tiles dt { font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.tiles dd { font-family: var(--font-display); font-size: 2.4rem; line-height: 1.15; font-variant-numeric: tabular-nums; }
.list { display: grid; gap: 12px; }
.li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 14px; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.li-main { flex: 1 1 320px; min-width: 0; display: grid; gap: 4px; }
.li-top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: .88rem; }
.li h3 { font-size: 1.1rem; }
.li h3 a { text-decoration: none; }
.li h3 a:hover { text-decoration: underline; text-underline-offset: 3px; }
.li-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.att { margin-top: 8px; }
.att summary { cursor: pointer; font-weight: 600; font-size: .9rem; color: var(--gold-ink); }
.tablewrap { overflow-x: auto; margin-top: 10px; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th { text-align: left; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); padding: 8px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.utable select { min-height: 38px; padding: 6px 10px; }
.two-col { display: grid; gap: 32px; }
.two-col h2 { font-size: 1.6rem; margin-bottom: 14px; }
@media (min-width: 900px) { .two-col { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); } }
.bars { display: grid; gap: 12px; margin-bottom: 20px; }
.bars li { display: grid; grid-template-columns: minmax(0, 1fr) 90px 28px; gap: 12px; align-items: center; font-size: .9rem; }
.bars li b { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- footer, toasts ---------- */
.foot { margin-top: 24px; border-top: 1px solid var(--line); padding-block: 36px; background: var(--surface-2); }
.foot-in { display: grid; gap: 22px; }
.foot-brand { display: grid; gap: 10px; color: var(--ink-2); max-width: 420px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.foot-links a { text-decoration: none; color: var(--ink-2); }
.foot-links a:hover { color: var(--ink); text-decoration: underline; }
.foot-note { font-size: .85rem; color: var(--ink-2); }
@media (min-width: 820px) { .foot-in { grid-template-columns: 1.2fr 1fr; align-items: start; } .foot-note { grid-column: 1 / -1; } }
.toasts { position: fixed; z-index: 90; left: 0; right: 0; bottom: calc(env(safe-area-inset-bottom, 0px) + 90px); display: grid; justify-items: center; gap: 8px; pointer-events: none; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
@media (min-width: 820px) { .toasts { bottom: calc(env(safe-area-inset-bottom, 0px) + 28px); } }
.toast { pointer-events: auto; padding: 12px 20px; border-radius: 999px; background: var(--ink); color: var(--bg); font-weight: 600; font-size: .92rem; box-shadow: var(--shadow); animation: rise .3s ease both; }
.toast--err { background: var(--danger); color: var(--bg); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
@media (max-width: 480px) {
  .brand-ar { display: none; }
  .modal-card { padding: 22px 18px; }
  .orgcard { flex-direction: column; }
}

/* ---------- home banner: glass orbs ---------- */
.hero-actions { display: flex; flex-wrap: wrap; gap: clamp(16px, 4vw, 30px); margin-top: 34px; }
.orb { --s: clamp(128px, 36vw, 164px); position: relative; width: var(--s); height: var(--s); display: grid; place-content: center; justify-items: center; gap: 3px; border-radius: 50%; text-decoration: none; color: var(--hero-ink);
  background: linear-gradient(150deg, rgba(255, 255, 255, .26), rgba(255, 255, 255, .06) 55%, rgba(255, 255, 255, .12));
  border: 1px solid rgba(255, 255, 255, .3);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), inset 0 -14px 26px rgba(0, 0, 0, .18), 0 22px 44px -16px rgba(0, 0, 0, .6);
  -webkit-backdrop-filter: blur(16px) saturate(150%); backdrop-filter: blur(16px) saturate(150%);
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease; isolation: isolate; }
.orb::before { content: ""; position: absolute; z-index: -1; top: 6px; left: 16%; right: 16%; height: 40%; border-radius: 50%; background: linear-gradient(180deg, rgba(255, 255, 255, .42), rgba(255, 255, 255, 0)); }
.orb:hover { transform: translateY(-5px) scale(1.04); border-color: var(--hero-gold); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), inset 0 -14px 26px rgba(0, 0, 0, .18), 0 28px 50px -16px rgba(0, 0, 0, .65); }
.orb:active { transform: scale(.98); }
.orb:focus-visible { outline: 2px solid var(--hero-gold); outline-offset: 5px; border-radius: 50%; }
.orb .i { width: 34px; height: 34px; color: var(--hero-gold); margin-bottom: 4px; }
.orb b { font-family: var(--font-display); font-weight: 400; font-size: 1.6rem; line-height: 1; }
.orb small { font-family: var(--font-ar); font-size: 1.05rem; color: var(--hero-ink-2); }
.btn--glass { background: var(--hero-glass); border-color: var(--hero-glass-line); color: var(--hero-ink); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.btn--glass:hover { border-color: var(--hero-gold); }

/* ---------- events grouped by date ---------- */
.dategroup { margin-bottom: 38px; }
.dg-head { position: sticky; z-index: 5; top: calc(var(--header-h) + env(safe-area-inset-top, 0px)); display: flex; align-items: center; gap: 14px; margin: 0 0 16px; padding: 12px 0; font-family: var(--font-body); font-size: 1rem; letter-spacing: 0; background: color-mix(in srgb, var(--bg) 92%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.dg-day { font-family: var(--font-display); font-weight: 400; font-size: 2.6rem; line-height: 1; min-width: 2ch; text-align: center; color: var(--gold-ink); font-variant-numeric: tabular-nums; }
.dg-meta { display: grid; gap: 1px; min-width: 0; }
.dg-meta b { font-size: 1.05rem; font-weight: 700; }
.dg-wd { font-weight: 500; color: var(--ink-2); }
.dg-meta i { font-style: normal; color: var(--ink-2); font-size: .85rem; }
.dg-count { margin-left: auto; font-size: .8rem; color: var(--ink-2); white-space: nowrap; }

/* ---------- create from flyer ---------- */
.flyer { display: grid; gap: 14px; margin-bottom: 22px; max-width: 820px; padding: clamp(18px, 3vw, 26px); border-radius: var(--r-lg); border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line)); background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 12%, var(--surface)), var(--surface) 70%); }
.flyer--hint { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 35%, transparent); }
.flyer h2 { display: flex; align-items: center; gap: 10px; font-size: 1.7rem; margin-bottom: 6px; }
.flyer h2 .i { color: var(--accent); width: 26px; height: 26px; }
.flyer-ctl { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.flyer-ctl label.btn { cursor: pointer; }
.flyer-ctl .hint { margin: 0; flex: 1 1 220px; }
.flyer-status { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 16px; border-radius: var(--r-sm); background: var(--surface-2); font-size: .95rem; }
.flyer-status .bar { flex-basis: 100%; }
.flyer-status--ok { background: color-mix(in srgb, var(--ok) 10%, var(--surface)); border: 1px solid color-mix(in srgb, var(--ok) 35%, transparent); align-items: flex-start; }
.flyer-status--warn { background: color-mix(in srgb, var(--warn) 11%, var(--surface)); border: 1px solid color-mix(in srgb, var(--warn) 38%, transparent); }
.found { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.found li { font-size: .78rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; border: 1px solid currentColor; }
.found .ok { color: var(--ok); }
.found .miss { color: var(--ink-2); border-style: dashed; text-decoration: line-through; }
.spin { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--accent); animation: spin .8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.from-flyer > label::after { content: "From flyer"; margin-left: 8px; padding: 1px 8px; border-radius: 999px; font-size: .68rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; background: var(--gold-fill); color: var(--on-gold); }
.from-flyer input, .from-flyer select, .from-flyer textarea { border-color: color-mix(in srgb, var(--accent) 60%, var(--line)); }

/* ---------- Qur'an ---------- */
.qhero { position: relative; overflow: hidden; border-radius: var(--r-lg); color: var(--hero-ink); background: linear-gradient(150deg, var(--hero-a), var(--hero-b)); isolation: isolate; margin-bottom: 24px; }
.qhero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--hero-gold); opacity: .17; -webkit-mask-image: var(--khatam); mask-image: var(--khatam); -webkit-mask-size: 64px; mask-size: 64px; -webkit-mask-position: right top; mask-position: right top; }
.qhero-in { display: grid; gap: 10px; padding: clamp(24px, 5vw, 44px); max-width: 640px; }
.qhero .eyebrow { color: var(--hero-gold); }
.qhero .eyebrow span { color: var(--hero-gold); font-family: var(--font-quran); font-size: 1.3rem; }
.qhero h1 { font-size: clamp(2.4rem, 6vw, 3.8rem); }
.qhero-sub { color: var(--hero-ink-2); max-width: 46ch; }
.continue { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; padding: 14px 18px; margin-bottom: 20px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); text-decoration: none; transition: border-color .2s, transform .2s; }
.continue:hover { border-color: var(--accent); transform: translateY(-2px); }
.continue .i { color: var(--accent); width: 26px; height: 26px; }
.continue small { display: block; color: var(--ink-2); font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; }
.bms { margin-bottom: 22px; }
.bms h2 { font-size: 1.5rem; margin-bottom: 10px; }
.bm-list { display: flex; flex-wrap: wrap; gap: 8px; }
.bm-list li { display: inline-flex; align-items: center; gap: 2px; padding-left: 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.bm-list a { text-decoration: none; font-weight: 600; font-size: .9rem; }
.bm-list .icon-btn { width: 34px; height: 34px; border: 0; }
.bm-list .icon-btn .i { width: 15px; height: 15px; }
.qsearch { max-width: 460px; margin-bottom: 18px; }
.surahs { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.surah { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); text-decoration: none; transition: border-color .2s, transform .2s, box-shadow .2s; }
.surah:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.sn, .vnum { position: relative; display: grid; place-items: center; width: 38px; height: 38px; font-size: .8rem; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--gold-ink); }
.sn::before, .sn::after, .vnum::before, .vnum::after { content: ""; position: absolute; inset: 7px; border: 1.3px solid var(--accent); }
.sn::after, .vnum::after { transform: rotate(45deg); }
.sinfo { display: grid; min-width: 0; }
.sinfo b { font-weight: 600; }
.sinfo i { font-style: normal; color: var(--ink-2); font-size: .82rem; overflow-wrap: anywhere; }
.sname-ar { font-family: var(--font-quran); font-size: 1.5rem; line-height: 1.3; color: var(--ink); }
.q-credit { margin-top: 36px; max-width: 70ch; color: var(--ink-2); font-size: .85rem; }
.q-credit a { color: var(--gold-ink); }
.reader { --fs: 1.1; }
.qhead { text-align: center; padding: clamp(22px, 4vw, 36px) 16px; margin-bottom: 20px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--surface); position: relative; overflow: hidden; isolation: isolate; }
.qhead::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--accent); opacity: .08; -webkit-mask-image: var(--khatam); mask-image: var(--khatam); -webkit-mask-size: 64px; mask-size: 64px; }
.qhead-in { display: grid; gap: 6px; justify-items: center; }
.qnum { font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; color: var(--gold-ink); }
.qtitle-ar { font-family: var(--font-quran); font-weight: 400; font-size: clamp(2.6rem, 8vw, 4.2rem); line-height: 1.3; }
.qtitle-en { font-family: var(--font-display); font-size: 1.7rem; }
.qtitle-en span { color: var(--ink-2); font-size: 1.1rem; font-family: var(--font-body); }
.qhead-act { margin-top: 10px; }
.qctl { display: grid; gap: 4px 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); align-items: end; margin-bottom: 8px; }
.stepper { display: flex; gap: 8px; }
.stepper .icon-btn b { font-family: var(--font-body); font-size: .9rem; }
.stepper .icon-btn b.lg { font-size: 1.3rem; }
.bismillah { text-align: center; font-family: var(--font-quran); font-size: calc(2rem * var(--fs)); line-height: 2; margin: 18px 0 6px; color: var(--ink); }
.verse { display: grid; gap: 10px; padding: 18px 12px; border-bottom: 1px solid var(--line); border-radius: var(--r-sm); scroll-margin-top: calc(var(--header-h) + 24px); transition: background .3s; }
.verse.is-playing, .verse.is-target { background: color-mix(in srgb, var(--accent) 11%, transparent); }
.v-top { display: flex; justify-content: space-between; align-items: center; }
.v-act { display: flex; gap: 6px; }
.v-act .icon-btn { width: 38px; height: 38px; }
.v-act .icon-btn.on { color: var(--accent); border-color: var(--accent); }
.v-act .icon-btn.on .i { fill: currentColor; }
.v-ar { font-family: var(--font-quran); font-size: calc(2rem * var(--fs)); line-height: 2.1; text-align: right; }
.v-tr { color: var(--ink-2); font-size: calc(1rem * var(--fs)); line-height: 1.7; max-width: 72ch; }
.skel { display: grid; gap: 10px; padding: 18px 12px; border-bottom: 1px solid var(--line); }
.skel i { display: block; height: 16px; border-radius: 8px; background: linear-gradient(90deg, var(--surface-2), var(--surface), var(--surface-2)); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
.skel i:nth-child(1) { height: 34px; width: 80%; margin-left: auto; }
.skel i:nth-child(3) { width: 60%; }
@keyframes shimmer { to { background-position: -200% 0; } }
.more { display: grid; justify-items: center; padding: 22px 0; }
.nextprev { display: flex; justify-content: space-between; gap: 10px; margin-top: 20px; }
.qsetup ol { padding-left: 20px; display: grid; gap: 6px; color: var(--ink-2); max-width: 60ch; list-style: decimal; }
.qsetup code { font-size: .85em; padding: 1px 6px; border-radius: 6px; background: var(--surface-2); }

/* ---- Qur'an: finder, verse of the day, jump ---- */
.finder { position: sticky; z-index: 6; top: calc(var(--header-h) + env(safe-area-inset-top, 0px)); display: grid; gap: 4px 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); align-items: end; margin: 0 0 18px; padding: 12px 0; background: color-mix(in srgb, var(--bg) 92%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.finder .qsearch { max-width: none; margin-bottom: 0; }
.votd { margin: 0 0 20px; padding: 22px 22px 18px; border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line)); border-radius: var(--r); background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 12%, var(--surface)), var(--surface) 70%); text-align: center; animation: votd-in .6s ease both; }
.votd .eyebrow { justify-content: center; gap: 12px; }
.votd .v-ar { margin: 10px 0 8px; font-size: clamp(1.5rem, 4.5vw, 2.1rem); }
.votd .v-tr { max-width: 62ch; margin: 0 auto 10px; color: var(--ink-2); }
@keyframes votd-in { from { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) { .votd { animation: none; } }
.qctl select { max-width: 100%; }
.icon-btn:disabled { opacity: .35; cursor: not-allowed; }

/* ---- Qur'an v3: finder, contents list, mushaf page ---- */
.finder { position: sticky; z-index: 6; top: calc(var(--header-h) + env(safe-area-inset-top, 0px)); display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 18px; margin: 0 0 22px; padding: 12px 0; background: color-mix(in srgb, var(--bg) 94%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.finder .qsearch { flex: 1 1 280px; max-width: none; margin: 0; }
.qseg { display: inline-flex; padding: 4px; gap: 2px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.qseg button { min-height: 40px; padding: 0 16px; border: 0; border-radius: 999px; background: transparent; color: var(--ink-2); font: inherit; font-size: .88rem; font-weight: 600; cursor: pointer; transition: background .2s, color .2s; }
.qseg button[aria-pressed="true"] { background: var(--gold-fill); color: var(--on-gold); }
.qseg button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.surahs { display: block; columns: 1; column-gap: 0; padding: 6px clamp(14px, 3vw, 28px); border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-sm); }
@media (min-width: 900px) { .surahs { columns: 2; column-gap: 56px; column-rule: 1px solid var(--line); } }
.surah { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 13px 8px; margin: 0 -8px; border: 0; border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent); border-radius: var(--r-sm); background: transparent; box-shadow: none; break-inside: avoid; text-decoration: none; transition: background .2s; }
.surah:hover { transform: none; box-shadow: none; background: color-mix(in srgb, var(--accent) 10%, transparent); }
.surah:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.sinfo b { font-family: var(--font-display); font-weight: 400; font-size: 1.28rem; line-height: 1.2; }
.sinfo i { font-size: .8rem; }
.sright { display: grid; justify-items: end; gap: 0; }
.sright small { color: var(--ink-2); font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; }
.surahs .muted { padding: 18px 8px; }

/* The reader sits on a cream mushaf page in both themes. Local tokens re-skin everything inside. */
.reader { --paper: #F7EDD2; }
.qhead--paper, .mushaf { --ink: #2A2016; --ink-2: #66553D; --line: #D8C59B; --surface: #FBF3DD; --surface-2: #F0E3C2; --accent: #9A7424; --gold-ink: #7A5712; --bg: #F7EDD2; color: var(--ink); }
.qhead--paper { border: 0; border-radius: var(--r); background: var(--paper); box-shadow: 0 0 0 1px #C9AE6E, 0 0 0 5px var(--paper), 0 0 0 6px #C9AE6E, 0 14px 34px rgba(0,0,0,.22); margin: 6px 6px 30px; }
.qhead--paper::before { opacity: .12; }
.mushaf { position: relative; margin: 8px 0 0; padding: clamp(18px, 4vw, 44px) clamp(16px, 5vw, 56px); border-radius: 6px; background:
    radial-gradient(120% 90% at 50% 0%, rgba(255,255,255,.55), transparent 60%),
    radial-gradient(90% 60% at 100% 100%, rgba(150,110,40,.14), transparent 70%),
    linear-gradient(90deg, rgba(120,85,30,.16), transparent 4%, transparent 96%, rgba(120,85,30,.16)),
    var(--paper);
  box-shadow: 0 1px 0 #fff8 inset, 0 0 0 1px #C9AE6E, 0 18px 44px rgba(0,0,0,.28); }
.mushaf::before { content: ""; position: absolute; inset: 10px; border: 1.5px solid #C9AE6E; border-radius: 3px; pointer-events: none; }
.mushaf::after { content: ""; position: absolute; inset: 15px; border: 1px solid color-mix(in srgb, #C9AE6E 55%, transparent); border-radius: 2px; pointer-events: none; }
.mushaf > * { position: relative; z-index: 1; }
.mushaf .bismillah { margin: 4px 0 10px; }
.mushaf .verse { padding: 14px 6px; border-bottom: 1px dotted #CDB57F; border-radius: 4px; }
.mushaf .verse:last-child { border-bottom: 0; }
.mushaf .verse.is-playing, .mushaf .verse.is-target { background: rgba(185,140,50,.16); }
.mushaf .v-ar { font-size: calc(2.1rem * var(--fs)); line-height: 2.2; }
.mushaf .v-tr { color: var(--ink-2); font-family: var(--font-display); font-size: calc(1.12rem * var(--fs)); line-height: 1.65; }
.mushaf .vnum { width: 32px; height: 32px; font-size: .72rem; }
.mushaf .v-act .icon-btn { background: transparent; border-color: #D8C59B; color: var(--ink-2); }
.mushaf .v-act .icon-btn:hover { border-color: var(--accent); color: var(--accent); }
.mushaf .skel i { background: linear-gradient(90deg, #EBDDB8, #F5EAD0, #EBDDB8); background-size: 200% 100%; }
.mushaf .btn--ghost { color: var(--ink); border-color: #C9AE6E; }
.mushaf .empty { background: transparent; border-color: #C9AE6E; color: var(--ink); }
.mushaf .notice, .reader > .notice { color: var(--ink); }
.more[hidden] { display: none; }

/* ---- Qur'an banner art ---- */
.qhero { display: grid; grid-template-columns: minmax(0, 1fr); align-items: center; }
.qhero-in { align-content: center; }
.qhero-art { width: min(300px, 78%); height: auto; margin: 0 auto 22px; }
@media (min-width: 760px) {
  .qhero { grid-template-columns: minmax(0, 1fr) minmax(280px, 400px); }
  .qhero-art { width: 100%; margin: 12px clamp(14px, 3vw, 36px) 12px 0; }
}
.qa-glow { animation: qa-pulse 6s ease-in-out infinite; transform-origin: 210px 185px; }
.qa-rays { animation: qa-turn 90s linear infinite; transform-origin: 210px 190px; }
.qa-book, .qa-rehal { animation: qa-float 7s ease-in-out infinite; }
.qa-rehal { animation-name: none; }
@keyframes qa-pulse { 50% { opacity: .65; transform: scale(1.04); } }
@keyframes qa-turn { to { transform: rotate(360deg); } }
@keyframes qa-float { 50% { transform: translateY(-4px); } }
@media (prefers-reduced-motion: reduce) { .qa-glow, .qa-rays, .qa-book { animation: none; } }
.qhero-art, .qhero-art * { transform-box: view-box; }

/* ---- Events page without filters ---- */
@media (min-width: 900px) { .explore-grid { grid-template-columns: minmax(0, 1fr); } }
.chip--inperson { background: color-mix(in srgb, var(--bg) 82%, transparent); color: var(--ink); }
.qhero .eyebrow { justify-content: flex-start; gap: 16px; }

/* ---- Feedback ---- */
.fb-btn { gap: 6px; }
@media (max-width: 819px) { .fb-btn { width: 40px; height: 40px; min-height: 0; padding: 0; justify-content: center; border-radius: 50%; } }
.fb-types { display: flex; flex-wrap: wrap; gap: 8px; }
.fb-type { position: relative; }
.fb-type input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.fb-type span { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; font-size: .9rem; font-weight: 600; color: var(--ink-2); background: var(--surface); transition: background .2s, color .2s, border-color .2s; }
.fb-type input:checked + span { background: var(--gold-fill); color: var(--on-gold); border-color: transparent; }
.fb-type input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.fb-row { display: grid; gap: 0 14px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.fb-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.fb-head .hint { margin: 0; }
.fb-key form { justify-content: center; margin-top: 12px; }
.fb-key input { max-width: 280px; }
.tickets { display: grid; gap: 12px; }
.ticket { padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.tk-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-bottom: 8px; }
.tk-ref { font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: .03em; }
.tk-when { margin-left: auto; font-size: .82rem; }
.tk-msg { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.6; margin-bottom: 6px; }
.tk-from { font-size: .85rem; overflow-wrap: anywhere; }
.tk-from a { color: var(--gold-ink); }
.tk-admin { display: grid; gap: 4px 14px; grid-template-columns: 180px minmax(0, 1fr); align-items: end; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); }
.tk-admin .field { margin: 0; }
.tk-btns { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
@media (max-width: 600px) { .tk-admin { grid-template-columns: minmax(0, 1fr); } }
.pill--open { color: var(--warn); }
.pill--in-progress { color: var(--accent); }
.pill--resolved { color: var(--ok); }
.tk-admin { align-items: start; }
.tk-note textarea { min-height: 46px; height: 46px; resize: vertical; }
.qseg button[aria-pressed="true"] .muted { color: inherit; opacity: .7; }

/* ---------- Prayer times and Donate ---------- */
.tabbar a span { font-size: .66rem; white-space: nowrap; }
.hero-prayer { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; margin-top: 22px; padding: 10px 16px; border-radius: 999px; border: 1px solid var(--hero-glass-line); background: var(--hero-glass); color: var(--hero-ink); text-decoration: none; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.hero-prayer:hover { border-color: var(--hero-gold); }
.hero-prayer .i { color: var(--hero-gold); }
.hero-prayer b { color: var(--hero-gold); }
.hero-prayer i { font-style: normal; color: var(--hero-ink-2); font-size: .88rem; }
.hero-actions { gap: clamp(12px, 3vw, 24px); }
.orb { --s: clamp(112px, 30vw, 150px); }

.pt-stage { position: relative; isolation: isolate; margin: 0 0 26px; padding: clamp(22px, 5vw, 48px) clamp(12px, 4vw, 40px) 20px; border-radius: var(--r-lg); background: linear-gradient(150deg, #262B3E, #1B2033); overflow: hidden; display: grid; justify-items: center; }
.pt-stage::before { content: ""; position: absolute; inset: 0; z-index: -1; background: #8A7B63; opacity: .32; -webkit-mask-image: var(--khatam); mask-image: var(--khatam); -webkit-mask-size: 84px; mask-size: 84px; }
.pt-next { margin-bottom: 18px; padding: 8px 18px; border-radius: 999px; background: var(--hero-glass); border: 1px solid var(--hero-glass-line); color: var(--hero-ink); }
.pt-next b { color: var(--hero-gold); }
.pt-board { width: min(100%, 560px); }
.pt-card { --pt-gold: #B9BA43; --pt-cream: #EAEECF; --pt-ink: #111; position: relative; margin-top: 34px; padding: 0 clamp(10px, 3vw, 18px) clamp(14px, 3vw, 22px); background: var(--pt-cream); border: 6px solid var(--pt-gold); border-radius: 44px 44px 6px 6px; box-shadow: inset 0 0 0 3px var(--pt-cream), inset 0 0 0 4px #D9DAA0, 0 24px 50px -18px rgba(0, 0, 0, .7); color: var(--pt-ink); }
.pt-crown { position: absolute; left: 22%; width: 56%; bottom: calc(100% - 6px); height: 56px; overflow: visible; }
.pt-crown path { fill: var(--pt-cream); stroke: var(--pt-gold); stroke-width: 12; vector-effect: non-scaling-stroke; stroke-width: 6px; }
.pt-crown::after { content: ""; }
.pt-date { position: relative; display: grid; justify-items: center; gap: 2px; padding: 16px 0 14px; font-size: clamp(1.05rem, 3.6vw, 1.5rem); line-height: 1.25; text-align: center; }
.pt-paper { padding: 4px; background: #fff; border: 1px solid var(--pt-gold); border-radius: 22px; overflow: hidden; }
.pt-table { width: 100%; border-collapse: collapse; table-layout: fixed; font-variant-numeric: tabular-nums; }
.pt-table th, .pt-table td { letter-spacing: 0; text-transform: none; padding: 10px 6px; border: 1px solid var(--pt-gold); text-align: center; font-size: clamp(.9rem, 3.2vw, 1.25rem); font-weight: 400; vertical-align: middle; }
.pt-table thead th { font-weight: 700; font-size: clamp(.82rem, 3vw, 1.2rem); }
.pt-table tbody th { font-weight: 700; width: 25%; }
.pt-table thead td:first-child { border-top-color: transparent; border-left-color: transparent; background: #fff; }
.pt-table tr:first-child > *:first-child { border-top-left-radius: 0; }
.pt-chg { font-size: clamp(.78rem, 2.6vw, 1rem) !important; line-height: 1.35; }
.pt-chg span { display: block; }
.pt-wide { font-size: clamp(.95rem, 3.2vw, 1.25rem); }
.pt-jum { text-align: center !important; font-size: clamp(.78rem, 2.8vw, 1.05rem) !important; line-height: 1.7; }
.pt-jum span { display: block; }
.pt-jum b { font-weight: 700; margin-right: 4px; }
.pt-table tr.is-next > * { background: #F4F1B8; box-shadow: inset 0 0 0 2px var(--pt-gold); }
.pt-foot { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; margin-top: 18px; color: var(--hero-ink-2); font-size: .92rem; }
.pt-foot a { display: inline-flex; align-items: center; gap: 6px; color: var(--hero-gold); text-decoration: none; }
.pt-foot a:hover { text-decoration: underline; text-underline-offset: 3px; }
.pt-foot .i { width: 1em; height: 1em; color: var(--hero-gold); }
.pt-note { margin-top: 8px; color: var(--hero-ink-2); text-align: center; }
.finder--plain { position: static; }
.mpicks { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.mpick { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px 16px; text-align: left; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); cursor: pointer; transition: border-color .2s, transform .2s; }
.mpick:hover { border-color: var(--accent); transform: translateY(-2px); }
.mpick:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.mpick[aria-pressed="true"] { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--surface)); }
.mpick-ic { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--gold-ink); }
.mpick-t { display: grid; min-width: 0; }
.mpick-t b { font-weight: 600; }
.mpick-t i { font-style: normal; color: var(--ink-2); font-size: .85rem; }
.mpick-s { display: inline-flex; align-items: center; gap: 4px; font-size: .8rem; font-weight: 700; color: var(--gold-ink); }
.mpick-s .i { width: 16px; height: 16px; }

.mj-trow { display: grid; grid-template-columns: 4.5rem repeat(3, minmax(0, 1fr)); gap: 8px; align-items: end; margin-bottom: 6px; }
.mj-trow b { padding-bottom: 12px; font-size: .9rem; }
.mj-trow .field { margin: 0; }
.mj-trow label { font-size: .72rem; font-weight: 600; color: var(--ink-2); }
.mj-trow input { padding-inline: 8px; }
dialog.modal:has(.mj-times) { width: min(640px, calc(100vw - 24px)); }
@media (max-width: 560px) { .mj-trow { grid-template-columns: 1fr 1fr; } .mj-trow b { grid-column: 1 / -1; padding-bottom: 0; } }
@media (max-width: 520px) {
  .pt-card { padding-inline: 8px; }
  .pt-paper { padding: 2px; border-radius: 16px; }
  .pt-table th, .pt-table td { padding: 8px 2px; font-size: .86rem; }
  .pt-table thead th { font-size: .72rem; line-height: 1.15; }
  .pt-table tbody th { width: 24%; font-size: .8rem; }
  .pt-chg { font-size: .74rem !important; }
  .pt-jum { font-size: .74rem !important; }
}
.pt-table thead th { white-space: normal; }

/* live prayer times + Georgia directory */
.pt-empty { max-width: 460px; padding: 28px 20px; text-align: center; color: var(--hero-ink-2); border: 1px dashed var(--hero-glass-line); border-radius: var(--r); }
.pt-src { display: flex; align-items: center; justify-content: center; gap: 8px; max-width: 520px; margin-top: 16px; text-align: center; font-size: .85rem; color: var(--hero-ink-2); }
.pt-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: #4CC38A; box-shadow: 0 0 0 0 rgba(76, 195, 138, .6); animation: pt-pulse 2s infinite; }
@keyframes pt-pulse { 70% { box-shadow: 0 0 0 8px rgba(76, 195, 138, 0); } 100% { box-shadow: 0 0 0 0 rgba(76, 195, 138, 0); } }
@media (prefers-reduced-motion: reduce) { .pt-dot { animation: none; } }
.mp-h { margin: 22px 0 12px; font-size: 1.5rem; }
.mp-h .muted { font-family: var(--font-body); font-size: .8rem; font-weight: 500; margin-left: 8px; }
.mj-live { display: flex; align-items: center; gap: 10px; margin: 0 0 16px; font-weight: 600; font-size: .92rem; }
.finder--plain .btn { margin-bottom: 4px; }
.paste { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 12px; margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); }
.paste .field { flex: 1 1 300px; margin: 0; }
.paste .btn { margin-bottom: 2px; }
.paste .err { flex-basis: 100%; margin: 0; }
.pt-foot .link { color: var(--hero-gold); }
.mpicker { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 16px; margin-bottom: 22px; }
.mpicker .field { flex: 1 1 320px; max-width: 520px; margin: 0; }
.mpicker .btn { margin-bottom: 2px; }
.mpicker-err { flex-basis: 100%; margin: 0; }


/* ---------- modern prayer card ---------- */
.pt-stage { background: radial-gradient(90% 70% at 15% 0%, rgba(80,120,255,.22), transparent 60%), radial-gradient(70% 60% at 100% 100%, rgba(30,190,150,.2), transparent 60%), #0E1424; }
.pt-stage::before { display: none; }
.pt-board { width: min(100%, 520px); }
.pm-card { padding: 22px clamp(14px, 4vw, 26px) 20px; border-radius: 28px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); color: #F2F4FA; box-shadow: 0 30px 60px -30px rgba(0,0,0,.7); }
.pm-head { text-align: left; padding: 0 4px 14px; }
.pm-head h2 { margin: 0; font-size: 1.7rem; font-weight: 700; letter-spacing: -.01em; color: #fff; font-family: inherit; }
.pm-head p { margin: 2px 0 0; color: #B8C0D8; font-size: .95rem; }
.pm-head .pm-hij { color: #7FE0BE; font-weight: 600; font-size: .85rem; }
.pm-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pm-row { display: grid; grid-template-columns: 1.1fr 1fr 1fr; align-items: center; gap: 4px 10px; padding: 12px 14px; border-radius: 16px; background: rgba(255,255,255,.05); font-variant-numeric: tabular-nums; }
.pm-row small { display: block; font-size: .64rem; letter-spacing: .12em; text-transform: uppercase; color: #8F9AB8; font-weight: 600; margin-bottom: 1px; }
.pm-name { font-weight: 650; font-size: 1.05rem; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pm-name em { font-style: normal; font-size: .62rem; letter-spacing: .1em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; background: #2DD4A0; color: #052A20; font-weight: 700; }
.pm-azan, .pm-iq { font-size: 1.1rem; font-weight: 600; }
.pm-iq { color: #CFE9FF; }
.pm-chg { grid-column: 2 / -1; font-size: .74rem; color: #9AA5C4; }
.pm-sun { grid-template-columns: 1.1fr 2fr; background: transparent; border: 1px dashed rgba(255,255,255,.16); }
.pm-sun .pm-azan { color: #F6D88A; }
.pm-row.is-next { background: linear-gradient(120deg, rgba(45,212,160,.28), rgba(70,130,255,.22)); box-shadow: inset 0 0 0 1.5px rgba(45,212,160,.7); }
.pm-jum { margin-top: 14px; padding: 14px; border-radius: 16px; background: rgba(246,216,138,.1); border: 1px solid rgba(246,216,138,.28); }
.pm-jum h3 { margin: 0 0 8px; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: #F6D88A; font-family: inherit; }
.pm-jum > div { display: flex; flex-wrap: wrap; gap: 8px; }
.pm-chip { display: inline-flex; gap: 8px; align-items: baseline; padding: 6px 12px; border-radius: 999px; background: rgba(255,255,255,.09); font-size: .85rem; }
.pm-chip b { color: #F6D88A; } .pm-chip i { font-style: normal; }
@media (max-width: 520px) { .pm-row { grid-template-columns: 1fr 1fr 1fr; padding: 10px 10px; } .pm-name { font-size: .95rem; } .pm-azan, .pm-iq { font-size: 1rem; } }
.pt-src { display: block; }
.pt-src .pt-dot { display: inline-block; margin-right: 8px; vertical-align: middle; }


/* ---------- white canvas ---------- */
:root { --bg: #FFFFFF; --surface: #FFFFFF; --surface-2: #F4F2EA; }

/* ---------- posters: original dark theme, curved into the white card ---------- */
.poster { padding-bottom: 22px; gap: 4px; }
.poster::after { content: ""; position: absolute; z-index: 2; inset: auto -14% -1px -14%; height: 38px; border: 0; border-radius: 50% 50% 0 0 / 100% 100% 0 0; background: var(--surface); pointer-events: none; }
.poster-ic { position: relative; z-index: 1; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; color: var(--pg); background: rgba(255,255,255,.1); border: 1.5px solid color-mix(in srgb, var(--pg) 65%, transparent); }
.poster-ic .i { width: 22px; height: 22px; }
.poster-cat { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.banner .poster-cat { position: relative; z-index: 1; width: auto; height: auto; clip: auto; font-size: .9rem; color: var(--pg); }
.banner .poster-ic { width: 56px; height: 56px; }
.banner .poster { padding-bottom: 30px; }
@media (max-width: 520px) {
  .poster { aspect-ratio: 16 / 6; padding-bottom: 16px; }
  .poster::after { height: 26px; }
  .poster-ic { width: 36px; height: 36px; }
  .poster-ic .i { width: 18px; height: 18px; }
  .datebadge { top: 8px; left: 8px; padding: 4px 8px 3px; border-radius: 10px; }
  .datebadge b { font-size: 1.2rem; }
  .datebadge span { font-size: .56rem; margin-top: 1px; }
  .card-tags .chip { font-size: .68rem; padding: 2px 8px; min-height: 0; }
  .orb .i { width: 28px; height: 28px; }
  .tabbar a .i { width: 20px; height: 20px; }
  .tabbar .tab-add { width: 48px; height: 48px; margin-top: -18px; }
  .tabbar .tab-add .i { width: 24px; height: 24px; }
  .banner .poster { aspect-ratio: 16 / 7; }
  .banner .poster-ic { width: 42px; height: 42px; }
}

/* ---------- Qur'an: fresh light theme ---------- */
.qhero { background: linear-gradient(135deg, #E4F4EC, #E1ECF8); color: var(--ink); border: 1px solid #D5E5DE; }
.qhero::before, .qhero-art { display: none; }
.qhero-in { padding: clamp(20px, 4vw, 34px); }
.qhero .eyebrow { color: var(--primary); }
.qhero h1 { color: #0B2F28; font-size: clamp(2rem, 5vw, 3rem); }
.qhero-sub { color: var(--ink-2); }
.continue { display: flex; align-items: center; gap: 14px; margin: 0 0 14px; padding: 14px 18px; border-radius: 18px; background: linear-gradient(120deg, #0B5545, #1A7F69); color: #fff; text-decoration: none; box-shadow: var(--shadow-sm); }
.continue > span:first-child { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: rgba(255,255,255,.16); }
.continue small { display: block; font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; opacity: .8; }
.continue b { font-weight: 650; }
.bms { margin: 0 0 18px; }
.bms h2 { font-size: 1.1rem; margin: 0 0 8px; }
.bm-list { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; list-style: none; margin: 0; }
.bm-list li { display: inline-flex; align-items: center; gap: 2px; padding: 2px 4px 2px 14px; border-radius: 999px; background: #EAF5F0; border: 1px solid #CFE5DB; }
.bm-list a { color: #0B5545; font-weight: 600; text-decoration: none; font-size: .9rem; }
.bm-list .icon-btn { width: 30px; height: 30px; border: 0; background: transparent; }
.reader { --paper: #FFFFFF; }
.qhead--paper, .mushaf { --ink: #12231D; --ink-2: #55655F; --line: #E3EAE6; --surface: #FFFFFF; --surface-2: #F1F6F3; --accent: #0B7A62; --gold-ink: #0B5545; --bg: #FFFFFF; }
.qhead--paper { margin: 6px 0 18px; border-radius: 24px; background: linear-gradient(135deg, #E4F4EC, #E1ECF8); box-shadow: none; border: 1px solid #D5E5DE; }
.qhead--paper::before { display: none; }
.mushaf { padding: clamp(10px, 3vw, 30px) clamp(12px, 4vw, 40px); border-radius: 24px; background: #fff; box-shadow: var(--shadow-sm); border: 1px solid var(--line); }
.mushaf::before, .mushaf::after { display: none; }
.mushaf .verse { border-bottom: 1px solid var(--line); border-radius: 12px; }
.mushaf .verse.is-playing, .mushaf .verse.is-target { background: #EAF5F0; }
.mushaf .v-act .icon-btn { border-color: var(--line); }
.mushaf .btn--ghost { border-color: var(--line); }
.mushaf .empty { border-color: var(--line); }
.mushaf .skel i { background: linear-gradient(90deg, #EEF3F0, #F8FBF9, #EEF3F0); background-size: 200% 100%; }
.qopts { display: flex; flex-wrap: wrap; gap: 10px; margin: 6px 0 12px; }
.qopt { display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px 8px 10px; border: 1px solid var(--line); border-radius: 999px; background: #fff; cursor: pointer; font-weight: 600; font-size: .9rem; }
.qopt input { position: absolute; opacity: 0; pointer-events: none; }
.qopt i { position: relative; width: 36px; height: 20px; border-radius: 999px; background: #CBD5D1; transition: background .2s; }
.qopt i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.qopt input:checked + i { background: #0B7A62; }
.qopt input:checked + i::after { transform: translateX(16px); }
.qopt input:focus-visible + i { outline: 2px solid #0B7A62; outline-offset: 2px; }
.tj-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0 0 12px; padding: 10px 14px; border-radius: 14px; background: var(--surface-2); font-size: .8rem; color: var(--ink-2); }
.tj-legend span { display: inline-flex; align-items: center; gap: 6px; }
.tj-legend i { width: 10px; height: 10px; border-radius: 50%; background: currentColor; }
.tj-hint { margin: 0 0 10px; font-size: .82rem; color: var(--ink-2); }
.v-wbw { display: flex; flex-wrap: wrap; gap: 8px 6px; justify-content: flex-start; direction: rtl; line-height: 1.4; }
.wb { display: grid; justify-items: center; gap: 2px; padding: 6px 8px; border-radius: 12px; min-width: 3.2em; text-align: center; background: #F6FAF8; }
.wb-ar { font-family: var(--font-quran); font-size: calc(1.7rem * var(--fs)); line-height: 1.8; direction: rtl; }
.wb-tr { font-size: calc(.72rem * var(--fs)); color: var(--ink-2); direction: ltr; max-width: 9em; line-height: 1.25; }
.tj-ham_wasl, .tj-slnt, .tj-laam_shamsiyah { color: #9AA3A0; }
.tj-madda_normal { color: #537FFF; } .tj-madda_permissible { color: #4050FF; } .tj-madda_necessary { color: #000EBC; } .tj-madda_obligatory { color: #2144C1; }
.tj-qalqalah { color: #DD0008; } .tj-ikhfa_shafawi { color: #D500B7; } .tj-ikhfa { color: #9400A8; } .tj-iqlab { color: #26BFFD; }
.tj-idgham_shafawi, .tj-idgham_ghunnah, .tj-idgham_wo_ghunnah, .tj-idgham_mutajanisayn, .tj-idgham_mutaqaribayn { color: #3E9B00; }
.tj-ghunnah { color: #FF7E1E; }
@media (max-width: 520px) { .qopt { font-size: .82rem; } .wb { padding: 4px 5px; min-width: 2.6em; } }

/* ===== theme-aware prayer card, qur'an controls, smaller diagonal posters ===== */
.pt-stage { --pm-card: #FFFFFF; --pm-line: #DCE7E2; --pm-row: #F3F8F5; --pm-ink: #12231D; --pm-ink2: #5A6B65; --pm-hij: #0B7A62; --pm-iq: #1D4E89; --pm-sun: #9A6B00; --pm-nextbg: linear-gradient(120deg, #D8F3E8, #DCE9FB); --pm-nextline: #19A67F; --pm-jumbg: #FFF6DD; --pm-jumline: #EBD79F; --pm-chip: #FFFFFF; --pm-tag: #0B7A62; --pm-tagink: #fff;
  --hero-ink: #12231D; --hero-ink-2: #55655F; --hero-gold: #0B5545; --hero-glass: #FFFFFF; --hero-glass-line: #D5E5DE;
  background: radial-gradient(90% 70% at 15% 0%, rgba(80,140,255,.16), transparent 60%), radial-gradient(70% 60% at 100% 100%, rgba(30,190,150,.16), transparent 60%), #F1F6F4; }
.pm-card { background: var(--pm-card); border-color: var(--pm-line); color: var(--pm-ink); box-shadow: 0 24px 50px -30px rgba(14,38,32,.35); backdrop-filter: none; -webkit-backdrop-filter: none; }
.pm-head h2 { color: var(--pm-ink); } .pm-head p { color: var(--pm-ink2); } .pm-head .pm-hij { color: var(--pm-hij); }
.pm-row { background: var(--pm-row); } .pm-row small { color: var(--pm-ink2); } .pm-iq { color: var(--pm-iq); } .pm-chg { color: var(--pm-ink2); }
.pm-sun { background: transparent; border-color: var(--pm-line); } .pm-sun .pm-azan { color: var(--pm-sun); }
.pm-row.is-next { background: var(--pm-nextbg); box-shadow: inset 0 0 0 1.5px var(--pm-nextline); }
.pm-name em { background: var(--pm-tag); color: var(--pm-tagink); }
.pm-jum { background: var(--pm-jumbg); border-color: var(--pm-jumline); } .pm-jum h3 { color: var(--pm-sun); }
.pm-chip { background: var(--pm-chip); color: var(--pm-ink); } .pm-chip b { color: var(--pm-sun); }
.pt-next { color: var(--pm-ink); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pt-stage { --pm-card: rgba(255,255,255,.07); --pm-line: rgba(255,255,255,.14); --pm-row: rgba(255,255,255,.05); --pm-ink: #F2F4FA; --pm-ink2: #9AA5C4; --pm-hij: #7FE0BE; --pm-iq: #CFE9FF; --pm-sun: #F6D88A; --pm-nextbg: linear-gradient(120deg, rgba(45,212,160,.28), rgba(70,130,255,.22)); --pm-nextline: rgba(45,212,160,.7); --pm-jumbg: rgba(246,216,138,.1); --pm-jumline: rgba(246,216,138,.28); --pm-chip: rgba(255,255,255,.09); --pm-tag: #2DD4A0; --pm-tagink: #052A20;
  --hero-ink: #F7F0DC; --hero-ink-2: #C3CEC5; --hero-gold: #E0BC68; --hero-glass: rgba(255,255,255,.07); --hero-glass-line: rgba(255,255,255,.16);
  background: radial-gradient(90% 70% at 15% 0%, rgba(80,120,255,.22), transparent 60%), radial-gradient(70% 60% at 100% 100%, rgba(30,190,150,.2), transparent 60%), #0E1424; } }
:root[data-theme="dark"] .pt-stage { --pm-card: rgba(255,255,255,.07); --pm-line: rgba(255,255,255,.14); --pm-row: rgba(255,255,255,.05); --pm-ink: #F2F4FA; --pm-ink2: #9AA5C4; --pm-hij: #7FE0BE; --pm-iq: #CFE9FF; --pm-sun: #F6D88A; --pm-nextbg: linear-gradient(120deg, rgba(45,212,160,.28), rgba(70,130,255,.22)); --pm-nextline: rgba(45,212,160,.7); --pm-jumbg: rgba(246,216,138,.1); --pm-jumline: rgba(246,216,138,.28); --pm-chip: rgba(255,255,255,.09); --pm-tag: #2DD4A0; --pm-tagink: #052A20;
  --hero-ink: #F7F0DC; --hero-ink-2: #C3CEC5; --hero-gold: #E0BC68; --hero-glass: rgba(255,255,255,.07); --hero-glass-line: rgba(255,255,255,.16);
  background: radial-gradient(90% 70% at 15% 0%, rgba(80,120,255,.22), transparent 60%), radial-gradient(70% 60% at 100% 100%, rgba(30,190,150,.2), transparent 60%), #0E1424; }

/* posters: 3/4 height, diagonal cut */
.poster { aspect-ratio: 28 / 9; padding-bottom: 14px; }
.card--lg .poster { aspect-ratio: 8 / 3; }
.banner .poster { aspect-ratio: 16 / 6.75; padding-bottom: 20px; }
@media (min-width: 760px) { .banner .poster { aspect-ratio: 28 / 7; } }
.poster::after { inset: auto 0 -1px 0; height: 30px; border-radius: 0; clip-path: polygon(0 100%, 100% 0, 100% 100%); }
.poster-ic { width: 38px; height: 38px; } .poster-ic .i { width: 19px; height: 19px; }
.banner .poster-ic { width: 46px; height: 46px; }
@media (max-width: 520px) {
  .poster { aspect-ratio: 16 / 4.5; padding-bottom: 10px; }
  .poster::after { height: 20px; }
  .poster-ic { width: 30px; height: 30px; } .poster-ic .i { width: 15px; height: 15px; }
  .banner .poster { aspect-ratio: 16 / 5.25; } .banner .poster-ic { width: 34px; height: 34px; }
  .datebadge { top: 6px; left: 6px; }
}

/* qur'an: follow the theme */
.qopt { background: var(--surface); color: var(--ink); border-color: var(--line); }
.qopt i { background: color-mix(in srgb, var(--ink-2) 45%, transparent); }
.qopt input:checked + i { background: var(--accent); }
.tj-legend { background: var(--surface-2); }
.bm-list li { background: var(--surface-2); border-color: var(--line); } .bm-list a { color: var(--gold-ink); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --qd-hero: linear-gradient(135deg, #0F2E3A, #14274D); } }
:root[data-theme="dark"] { --qd-hero: linear-gradient(135deg, #0F2E3A, #14274D); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .qhero, :root:not([data-theme="light"]) .qhead--paper { background: var(--qd-hero); border-color: var(--line); } 
  :root:not([data-theme="light"]) .qhero h1 { color: var(--ink); }
  :root:not([data-theme="light"]) .reader { --paper: var(--surface); }
  :root:not([data-theme="light"]) .qhead--paper, :root:not([data-theme="light"]) .mushaf { --ink: #F0EAD8; --ink-2: #A9B4C0; --line: #233556; --surface: #101C35; --surface-2: #16274A; --accent: #D9B35F; --gold-ink: #E4C479; --bg: #101C35; }
  :root:not([data-theme="light"]) .mushaf { background: #101C35; }
  :root:not([data-theme="light"]) .mushaf .verse.is-playing, :root:not([data-theme="light"]) .mushaf .verse.is-target { background: #16274A; }
  :root:not([data-theme="light"]) .wb { background: #16274A; } }
:root[data-theme="dark"] .qhero, :root[data-theme="dark"] .qhead--paper { background: var(--qd-hero); border-color: var(--line); }
:root[data-theme="dark"] .qhero h1 { color: var(--ink); }
:root[data-theme="dark"] .reader { --paper: var(--surface); }
:root[data-theme="dark"] .qhead--paper, :root[data-theme="dark"] .mushaf { --ink: #F0EAD8; --ink-2: #A9B4C0; --line: #233556; --surface: #101C35; --surface-2: #16274A; --accent: #D9B35F; --gold-ink: #E4C479; --bg: #101C35; }
:root[data-theme="dark"] .mushaf { background: #101C35; }
:root[data-theme="dark"] .mushaf .verse.is-playing, :root[data-theme="dark"] .mushaf .verse.is-target { background: #16274A; }
:root[data-theme="dark"] .wb { background: #16274A; }
.tj-legend span { color: var(--ink); } .tj-legend i { box-shadow: 0 0 0 1.5px rgba(255,255,255,.55); }

/* ===== ornate curved poster, half height ===== */
.poster { aspect-ratio: 42 / 9; padding: 0 12% 0 0; place-content: center end; }
.card--lg .poster { aspect-ratio: 4 / 1; }
.banner .poster { aspect-ratio: 32 / 9; padding: 0 10% 0 0; }
@media (min-width: 760px) { .banner .poster { aspect-ratio: 6 / 1; } }
.poster::after { display: none; }
.poster-curve { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; pointer-events: none; overflow: visible; }
.pc-fill { fill: var(--surface); }
.pc-line { fill: none; stroke: #D9A93F; stroke-width: 2.2; vector-effect: non-scaling-stroke; }
.pc-line2 { fill: none; stroke: #E8C877; stroke-width: 1; opacity: .8; vector-effect: non-scaling-stroke; }
.poster-ic { z-index: 3; width: 34px; height: 34px; } .poster-ic .i { width: 17px; height: 17px; }
.banner .poster-ic { width: 40px; height: 40px; }
.banner .poster-cat { z-index: 3; }
@media (max-width: 520px) {
  .poster { aspect-ratio: 16 / 3; padding-right: 10%; }
  .banner .poster { aspect-ratio: 16 / 3.5; }
  .poster-ic { width: 28px; height: 28px; } .poster-ic .i { width: 14px; height: 14px; }
  .banner .poster-ic { width: 30px; height: 30px; }
}
.datebadge, .card-tags { z-index: 4; } .card-tags { bottom: 6px; }
.card-media .card-tags { display: none; }

/* ===== round 12: image curve, tags back, fonts, mobile nav ===== */
:root { --font-display: 'Outfit', 'Plus Jakarta Sans', system-ui, sans-serif; --font-body: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; }
h1, h2, .card-title, .brand-name, .sinfo b, .orb b, .datebadge b { font-weight: 600; letter-spacing: -.02em; }
.brand-name { font-size: 1.6rem; }
.show-sm { display: none; }
@media (max-width: 819px) { .show-sm { display: inline-grid; } }

/* posters: your curve image on the left, merged into the colour pattern on the right */
.poster { padding: 0; place-content: unset; }
.poster-curve, .poster-ic { display: none; }
.poster::after { display: block; content: ""; position: absolute; z-index: 2; inset: 0 auto 0 0; width: 78%; height: 100%; border: 0; border-radius: 0; clip-path: none; pointer-events: none;
  background: url("../img/poster-curve.jpg") left center / auto 100% no-repeat;
  -webkit-mask-image: linear-gradient(90deg, #000 62%, transparent 100%); mask-image: linear-gradient(90deg, #000 62%, transparent 100%); }
.poster--img::after { display: none; }
.banner .poster::after { width: 60%; }
.card-media .card-tags { display: flex; z-index: 4; left: auto; right: 10px; bottom: 8px; top: auto; justify-content: flex-end; }
.card-media .card-tags .chip { background: rgba(255,255,255,.92); color: #0E2620; }
@media (max-width: 520px) { .card-media .card-tags { right: 8px; bottom: 6px; } .card-media .card-tags .chip { font-size: .64rem; padding: 1px 8px; } .poster::after { width: 84%; } }

/* continue-reading label */
.continue small { color: rgba(255,255,255,.88); opacity: 1; }
.continue b { color: #fff; }
.continue .i { color: #F3D58A; }

/* footer is gone */
@media (min-width: 820px) { .foot { display: none; } }
.foot { border: 0; background: transparent; margin: 0; padding-top: 0; }

/* bottom tab bar: one row, shared baseline */
.tabbar { align-items: start; padding-top: 6px; }
.tabbar a { justify-content: flex-start; min-height: 52px; gap: 0; }
.tabbar a > .i { width: 22px; height: 22px; margin: 4px 0; }
.tabbar .tab-add { width: auto; height: auto; margin: 0; border-radius: 0; background: none; box-shadow: none; color: var(--ink-2); }
.tab-plus { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--gold-fill); color: var(--on-gold); box-shadow: var(--shadow-sm); }
.tabbar .tab-add .tab-plus .i { width: 18px; height: 18px; margin: 0; }
.tabbar a span:last-child { font-size: .66rem; line-height: 1.2; }

/* home: three round buttons in one row on phones */
@media (max-width: 520px) {
  .hero-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 22px; justify-items: center; }
  .orb { --s: min(30vw, 112px); }
  .orb .i { width: 24px; height: 24px; margin-bottom: 2px; }
  .orb b { font-size: 1.05rem; }
}
@media (max-width: 520px) { .orb { --s: min(28vw, 104px); } .hero-actions { gap: 8px; } }

/* ===== round 13: smoother, gold-heavy curve; distinctive type ===== */
:root { --font-display: 'Bricolage Grotesque', 'Figtree', system-ui, sans-serif; --font-body: 'Figtree', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; }
h1, h2, .card-title, .brand-name, .sinfo b, .orb b, .datebadge b { font-weight: 650; letter-spacing: -.025em; }
.poster::after { width: 94%; background-size: cover; background-position: left center;
  -webkit-mask-image: linear-gradient(90deg, #000 0%, #000 52%, rgba(0,0,0,.82) 62%, rgba(0,0,0,.55) 74%, rgba(0,0,0,.25) 87%, transparent 100%);
  mask-image: linear-gradient(90deg, #000 0%, #000 52%, rgba(0,0,0,.82) 62%, rgba(0,0,0,.55) 74%, rgba(0,0,0,.25) 87%, transparent 100%); }
.banner .poster::after { width: 92%; }
@media (max-width: 520px) { .poster::after { width: 96%; } }
.banner .poster-cat { position: absolute; right: 6%; top: 50%; transform: translateY(-50%); z-index: 4; color: #F3D58A; text-shadow: 0 1px 6px rgba(0,0,0,.35); }

/* ===== round 14: flyer posters, auth ===== */
.poster--img { display: grid; background: linear-gradient(135deg, var(--pa), var(--pb)); }
.poster--img::before { display: block; }
.poster--img::after { display: none; }
.poster--img img { position: absolute; z-index: 2; inset: 0 auto 0 0; width: 54%; height: 100%; object-fit: cover; object-position: center top;
  -webkit-mask-image: linear-gradient(90deg, #000 0%, #000 55%, rgba(0,0,0,.6) 80%, transparent 100%); mask-image: linear-gradient(90deg, #000 0%, #000 55%, rgba(0,0,0,.6) 80%, transparent 100%); }
.banner .poster--img img { width: 50%; }
.flyer-open { margin: 8px 2px 0; }
.flyer-open .link { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.flyer-full { display: block; max-width: 100%; max-height: 78vh; margin: 0 auto; border-radius: 12px; }
.auth-forgot { display: block; margin: 12px auto 0; font-size: .9rem; }
.auth-admin { margin: 18px 0 0; text-align: center; font-size: .85rem; }
.auth-admin a { color: var(--ink-2); }
.auth--admin .auth-card { border-top: 4px solid var(--accent); }
.auth-badge { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--surface-2); color: var(--accent); margin-bottom: 6px; }

/* ===== round 15: header curve, repeating events ===== */
.topbar { overflow: hidden; }
.topbar::before { content: ""; position: absolute; z-index: 0; top: 0; bottom: 0; right: 0; width: min(62%, 560px); pointer-events: none;
  background: url("../img/poster-curve.jpg") right center / cover no-repeat;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,.55) 38%, #000 100%); mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,.55) 38%, #000 100%); opacity: .95; }
.topbar-in { position: relative; z-index: 1; }
.topbar .icon-btn, .topbar .btn--ghost { background: color-mix(in srgb, var(--surface) 92%, transparent); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .topbar::before { filter: brightness(.5) saturate(.9); } }
:root[data-theme="dark"] .topbar::before { filter: brightness(.5) saturate(.9); }
.repeat { display: grid; gap: 4px 16px; margin: 4px 0 8px; }
.daychips { display: flex; flex-wrap: wrap; gap: 6px; }
.daychip input { position: absolute; opacity: 0; pointer-events: none; }
.daychip span { display: inline-grid; place-items: center; min-width: 46px; height: 38px; padding: 0 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: .85rem; font-weight: 600; cursor: pointer; }
.daychip input:checked + span { background: var(--accent); border-color: var(--accent); color: #fff; }
.daychip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---- update17 ---- */
[hidden] { display: none !important; }
/* uploaded flyer: only the flyer, filling the poster, showing roughly its top half */
.poster.poster--img { display: block; background: var(--surface-2); padding: 0; aspect-ratio: 2 / 1; }
.poster.poster--img::before, .poster.poster--img::after { display: none !important; }
.poster.poster--img img { inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center top; -webkit-mask-image: none; mask-image: none; }
.card--lg .poster.poster--img { aspect-ratio: 2 / 1; }
.banner .poster.poster--img { aspect-ratio: 16 / 9; }
@media (min-width: 760px) { .banner .poster.poster--img { aspect-ratio: 5 / 2; } }
.chip--att { background: color-mix(in srgb, var(--accent) 88%, #000); color: #fff; }
.card-tags { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.rsvp-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.reg-done { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-weight: 600; color: var(--accent); }
.reg-done--out { color: var(--muted, #6b7280); }
.foot { padding: 22px 0 96px; }
.foot-in { display: flex; justify-content: center; align-items: center; gap: 14px; flex-wrap: wrap; font-size: .85rem; color: var(--muted, #6b7280); }
.foot-in b { color: var(--ink, inherit); }
.foot-in i { width: 5px; height: 5px; background: currentColor; transform: rotate(45deg); opacity: .5; }
.script-indopak .v-ar, .script-indopak .wb-ar { font-family: "Noto Nastaliq Urdu", "Amiri Quran", serif; line-height: 2.7; }
.script-indopak .wb-ar { line-height: 2.3; }
button.wb { border: 0; padding: 4px 6px; font: inherit; color: inherit; cursor: pointer; border-radius: 10px; -webkit-tap-highlight-color: transparent; }
button.wb:hover, button.wb.is-on { background: color-mix(in srgb, var(--accent) 14%, transparent); }
button.wb:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.qopt--sel { display: inline-flex; align-items: center; gap: 8px; }
.qopt--sel select { padding: 6px 28px 6px 10px; border-radius: 999px; min-height: 36px; }

/* ---- update18 ---- */
.poster.poster--img { aspect-ratio: 5 / 2; }
.card--lg .poster.poster--img { aspect-ratio: 5 / 2; }
.banner .poster.poster--img { aspect-ratio: 16 / 7; }
@media (min-width: 760px) { .banner .poster.poster--img { aspect-ratio: 3 / 1; } }
@media (max-width: 640px) {
  .poster.poster--img, .card--lg .poster.poster--img { aspect-ratio: 3 / 1; }
  .banner .poster.poster--img { aspect-ratio: 2 / 1; }
  .poster-cat { font-size: .66rem; letter-spacing: .12em; }
  .banner .poster-cat { font-size: .72rem; }
  .datebadge { transform: scale(.82); transform-origin: top left; }
  .card-tags .chip { font-size: .68rem; padding: 3px 8px; }
}
.btn--going { background: var(--accent); border: 1px solid var(--accent); color: #fff; }
.btn--going:hover { filter: brightness(1.08); }
.btn--out { background: var(--surface-2, #eef0ee); border: 1px solid var(--line); color: var(--ink-2, #55605c); }
.rsvp-hint { margin: 6px 0 0; }
.rsvp-row .btn { white-space: nowrap; }
.del-opts { display: grid; gap: 10px; margin-top: 14px; }
.del-opts .btn small { display: block; font-weight: 500; opacity: .85; margin-top: 2px; }
/* static stat orbs in the footer, same look as the home orbs but small */
.foot-in { gap: 18px; }
.sorb { position: relative; width: 104px; height: 104px; display: grid; place-content: center; justify-items: center; gap: 1px; border-radius: 50%; color: #F4EFE2;
  background: linear-gradient(150deg, #2c6b57, #17382e 70%); border: 1px solid rgba(255,255,255,.28);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35), inset 0 -10px 18px rgba(0,0,0,.2), 0 14px 26px -12px rgba(0,0,0,.45); isolation: isolate; }
.sorb::before { content: ""; position: absolute; z-index: -1; top: 5px; left: 16%; right: 16%; height: 38%; border-radius: 50%; background: linear-gradient(180deg, rgba(255,255,255,.34), rgba(255,255,255,0)); }
.sorb .i { width: 20px; height: 20px; color: #D9B46A; }
.sorb b { font-size: 1.15rem; line-height: 1.1; font-weight: 700; }
.sorb span { font-size: .66rem; letter-spacing: .12em; text-transform: uppercase; opacity: .85; }
.foot-in .sorb b { color: #F4EFE2; } .foot-in .sorb span { color: #F4EFE2; }

/* ---- update19 ---- */
/* flyer posters keep their earlier crop; the whole poster is just smaller */
.poster.poster--img, .card--lg .poster.poster--img { aspect-ratio: 2 / 1; }
.banner .poster.poster--img { aspect-ratio: 16 / 9; }
@media (min-width: 760px) { .banner .poster.poster--img { aspect-ratio: 5 / 2; } }
@media (max-width: 640px) {
  .poster.poster--img, .card--lg .poster.poster--img { aspect-ratio: 2 / 1; }
  .banner .poster.poster--img { aspect-ratio: 16 / 9; }
  .grid .card, .rail--lg .card { max-width: 290px; margin-inline: auto; width: 100%; }
  .rail { grid-auto-columns: min(66%, 250px); }
  .banner { max-width: 330px; margin-inline: auto; }
}
@media (min-width: 641px) { .banner { max-width: 620px; } }
.share-row { gap: 10px 8px; }
.share-it { display: grid; justify-items: center; gap: 6px; width: 64px; background: none; border: 0; padding: 0; font: inherit; font-size: .72rem; color: var(--ink-2, #55605c); text-decoration: none; cursor: pointer; }
.share-it .icon-btn { width: 54px; height: 54px; background: #fff; border: 1px solid var(--line); }
.share-it .icon-btn.brand { background: #fff; }
.share-it .icon-btn.brand .i--brand { width: 28px; height: 28px; }
.share-it:hover .icon-btn { box-shadow: 0 6px 14px -8px rgba(0,0,0,.4); transform: translateY(-1px); }

.i--brand { fill: none; stroke: none; }
.btn--going { background: #1F7A4F; border: 1px solid #1F7A4F; color: #fff; } .btn--going:hover { filter: brightness(1.1); }
.share-it .icon-btn:not(.brand) .i { width: 22px; height: 22px; }

/* ---- update20 ---- */
/* one compact row of share buttons */
.share-row { display: flex; flex-wrap: nowrap; justify-content: space-between; gap: 6px; }
.share-it { width: auto; flex: 1 1 0; min-width: 0; display: grid; place-items: center; font-size: 0; gap: 0; }
.share-it .icon-btn { width: 40px; height: 40px; min-width: 0; padding: 0; display: grid; place-items: center; border-radius: 50%; }
.share-it .icon-btn .i, .share-it .icon-btn.brand .i--brand { width: 22px; height: 22px; display: block; margin: 0; }
.share-it .icon-btn:not(.brand) .i { width: 19px; height: 19px; }
@media (max-width: 360px) { .share-it .icon-btn { width: 36px; height: 36px; } }
/* flyer posters: half the height */
.poster.poster--img, .card--lg .poster.poster--img { aspect-ratio: 4 / 1; }
.banner .poster.poster--img { aspect-ratio: 32 / 9; }
@media (min-width: 760px) { .banner .poster.poster--img { aspect-ratio: 5 / 1; } }
@media (max-width: 640px) {
  .poster.poster--img, .card--lg .poster.poster--img { aspect-ratio: 4 / 1; }
  .banner .poster.poster--img { aspect-ratio: 32 / 9; }
}
.share-it .icon-btn.brand { border: 0; background: none; box-shadow: none; }
.share-it .icon-btn.brand .i--brand { width: 40px; height: 40px; }
@media (max-width: 360px) { .share-it .icon-btn.brand .i--brand { width: 36px; height: 36px; } }

/* ---- update21: Rihly logo and wordmark ---- */
.logo { width: 38px; height: 38px; color: inherit; border-radius: 11px; }
.brand { gap: 10px; }
.brand-name { font-family: "Bricolage Grotesque", var(--font-display); font-weight: 800 !important; font-size: 1.9rem !important; letter-spacing: -.035em !important; text-transform: lowercase; color: #0A4A3E; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .brand-name { color: #F5F1E4; } }
:root[data-theme="dark"] .brand-name { color: #F5F1E4; }
@media (max-width: 640px) { .logo { width: 34px; height: 34px; } .brand-name { font-size: 1.7rem !important; } }

/* ---- update22: flyer keeps its earlier size; the whole event card is smaller ---- */
.poster.poster--img, .card--lg .poster.poster--img { aspect-ratio: 2 / 1 !important; }
.banner .poster.poster--img { aspect-ratio: 16 / 9 !important; }
@media (min-width: 760px) { .banner .poster.poster--img { aspect-ratio: 5 / 2 !important; } }
.grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); gap: 14px; }
.rail { grid-auto-columns: min(72%, 230px); gap: 12px; }
.rail--lg { grid-auto-columns: min(78%, 270px); }
.card-body { gap: 6px; padding: 10px 12px 12px; }
.card-title { font-size: 1.05rem; line-height: 1.15; font-weight: 600; }
.card--lg .card-title { font-size: 1.2rem; }
.card .muted, .card-meta, .card-body p, .card-body .chip { font-size: .78rem; }
.datebadge { top: 8px; left: 8px; padding: 4px 8px 3px; border-radius: 10px; }
.datebadge b { font-size: 1.15rem; } .datebadge span { font-size: .56rem; }
.poster:not(.poster--img) { aspect-ratio: 3 / 1; }
.poster-cat { font-size: .66rem; }
.card-tags .chip { font-size: .64rem; padding: 2px 7px; }
@media (max-width: 640px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .grid .card, .rail--lg .card { max-width: none; }
  .rail { grid-auto-columns: min(62%, 210px); }
  .card-body { padding: 8px 9px 10px; gap: 4px; }
  .card-title { font-size: .95rem; }
  .card .muted, .card-meta, .card-body p { font-size: .72rem; }
  .datebadge { transform: scale(.8); transform-origin: top left; }
}
.flyer-full { display: block; max-width: 100%; max-height: 78vh; margin: 0 auto; border-radius: 12px; }
.auth-forgot { display: block; margin: 12px auto 0; font-size: .9rem; }
.auth-admin { margin: 18px 0 0; text-align: center; font-size: .85rem; }
.auth-admin a { color: var(--ink-2); }
.auth--admin .auth-card { border-top: 4px solid var(--accent); }
.auth-badge { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--surface-2); color: var(--accent); margin-bottom: 6px; }

/* ===== round 15: header curve, repeating events ===== */
.topbar { overflow: hidden; }
.topbar::before { content: ""; position: absolute; z-index: 0; top: 0; bottom: 0; right: 0; width: min(62%, 560px); pointer-events: none;
  background: url("../img/poster-curve.jpg") right center / cover no-repeat;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,.55) 38%, #000 100%); mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,.55) 38%, #000 100%); opacity: .95; }
.topbar-in { position: relative; z-index: 1; }
.topbar .icon-btn, .topbar .btn--ghost { background: color-mix(in srgb, var(--surface) 92%, transparent); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .topbar::before { filter: brightness(.5) saturate(.9); } }
:root[data-theme="dark"] .topbar::before { filter: brightness(.5) saturate(.9); }
.repeat { display: grid; gap: 4px 16px; margin: 4px 0 8px; }
.daychips { display: flex; flex-wrap: wrap; gap: 6px; }
.daychip input { position: absolute; opacity: 0; pointer-events: none; }
.daychip span { display: inline-grid; place-items: center; min-width: 46px; height: 38px; padding: 0 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: .85rem; font-weight: 600; cursor: pointer; }
.daychip input:checked + span { background: var(--accent); border-color: var(--accent); color: #fff; }
.daychip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---- update17 ---- */
[hidden] { display: none !important; }
/* uploaded flyer: only the flyer, filling the poster, showing roughly its top half */
.poster.poster--img { display: block; background: var(--surface-2); padding: 0; aspect-ratio: 2 / 1; }
.poster.poster--img::before, .poster.poster--img::after { display: none !important; }
.poster.poster--img img { inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center top; -webkit-mask-image: none; mask-image: none; }
.card--lg .poster.poster--img { aspect-ratio: 2 / 1; }
.banner .poster.poster--img { aspect-ratio: 16 / 9; }
@media (min-width: 760px) { .banner .poster.poster--img { aspect-ratio: 5 / 2; } }
.chip--att { background: color-mix(in srgb, var(--accent) 88%, #000); color: #fff; }
.card-tags { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.rsvp-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.reg-done { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-weight: 600; color: var(--accent); }
.reg-done--out { color: var(--muted, #6b7280); }
.foot { padding: 22px 0 96px; }
.foot-in { display: flex; justify-content: center; align-items: center; gap: 14px; flex-wrap: wrap; font-size: .85rem; color: var(--muted, #6b7280); }
.foot-in b { color: var(--ink, inherit); }
.foot-in i { width: 5px; height: 5px; background: currentColor; transform: rotate(45deg); opacity: .5; }
.script-indopak .v-ar, .script-indopak .wb-ar { font-family: "Noto Nastaliq Urdu", "Amiri Quran", serif; line-height: 2.7; }
.script-indopak .wb-ar { line-height: 2.3; }
button.wb { border: 0; padding: 4px 6px; font: inherit; color: inherit; cursor: pointer; border-radius: 10px; -webkit-tap-highlight-color: transparent; }
button.wb:hover, button.wb.is-on { background: color-mix(in srgb, var(--accent) 14%, transparent); }
button.wb:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.qopt--sel { display: inline-flex; align-items: center; gap: 8px; }
.qopt--sel select { padding: 6px 28px 6px 10px; border-radius: 999px; min-height: 36px; }

/* ---- update18 ---- */
.poster.poster--img { aspect-ratio: 5 / 2; }
.card--lg .poster.poster--img { aspect-ratio: 5 / 2; }
.banner .poster.poster--img { aspect-ratio: 16 / 7; }
@media (min-width: 760px) { .banner .poster.poster--img { aspect-ratio: 3 / 1; } }
@media (max-width: 640px) {
  .poster.poster--img, .card--lg .poster.poster--img { aspect-ratio: 3 / 1; }
  .banner .poster.poster--img { aspect-ratio: 2 / 1; }
  .poster-cat { font-size: .66rem; letter-spacing: .12em; }
  .banner .poster-cat { font-size: .72rem; }
  .datebadge { transform: scale(.82); transform-origin: top left; }
  .card-tags .chip { font-size: .68rem; padding: 3px 8px; }
}
.btn--going { background: var(--accent); border: 1px solid var(--accent); color: #fff; }
.btn--going:hover { filter: brightness(1.08); }
.btn--out { background: var(--surface-2, #eef0ee); border: 1px solid var(--line); color: var(--ink-2, #55605c); }
.rsvp-hint { margin: 6px 0 0; }
.rsvp-row .btn { white-space: nowrap; }
.del-opts { display: grid; gap: 10px; margin-top: 14px; }
.del-opts .btn small { display: block; font-weight: 500; opacity: .85; margin-top: 2px; }
/* static stat orbs in the footer, same look as the home orbs but small */
.foot-in { gap: 18px; }
.sorb { position: relative; width: 104px; height: 104px; display: grid; place-content: center; justify-items: center; gap: 1px; border-radius: 50%; color: #F4EFE2;
  background: linear-gradient(150deg, #2c6b57, #17382e 70%); border: 1px solid rgba(255,255,255,.28);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35), inset 0 -10px 18px rgba(0,0,0,.2), 0 14px 26px -12px rgba(0,0,0,.45); isolation: isolate; }
.sorb::before { content: ""; position: absolute; z-index: -1; top: 5px; left: 16%; right: 16%; height: 38%; border-radius: 50%; background: linear-gradient(180deg, rgba(255,255,255,.34), rgba(255,255,255,0)); }
.sorb .i { width: 20px; height: 20px; color: #D9B46A; }
.sorb b { font-size: 1.15rem; line-height: 1.1; font-weight: 700; }
.sorb span { font-size: .66rem; letter-spacing: .12em; text-transform: uppercase; opacity: .85; }
.foot-in .sorb b { color: #F4EFE2; } .foot-in .sorb span { color: #F4EFE2; }

/* ---- update19 ---- */
/* flyer posters keep their earlier crop; the whole poster is just smaller */
.poster.poster--img, .card--lg .poster.poster--img { aspect-ratio: 2 / 1; }
.banner .poster.poster--img { aspect-ratio: 16 / 9; }
@media (min-width: 760px) { .banner .poster.poster--img { aspect-ratio: 5 / 2; } }
@media (max-width: 640px) {
  .poster.poster--img, .card--lg .poster.poster--img { aspect-ratio: 2 / 1; }
  .banner .poster.poster--img { aspect-ratio: 16 / 9; }
  .grid .card, .rail--lg .card { max-width: 290px; margin-inline: auto; width: 100%; }
  .rail { grid-auto-columns: min(66%, 250px); }
  .banner { max-width: 330px; margin-inline: auto; }
}
@media (min-width: 641px) { .banner { max-width: 620px; } }
.share-row { gap: 10px 8px; }
.share-it { display: grid; justify-items: center; gap: 6px; width: 64px; background: none; border: 0; padding: 0; font: inherit; font-size: .72rem; color: var(--ink-2, #55605c); text-decoration: none; cursor: pointer; }
.share-it .icon-btn { width: 54px; height: 54px; background: #fff; border: 1px solid var(--line); }
.share-it .icon-btn.brand { background: #fff; }
.share-it .icon-btn.brand .i--brand { width: 28px; height: 28px; }
.share-it:hover .icon-btn { box-shadow: 0 6px 14px -8px rgba(0,0,0,.4); transform: translateY(-1px); }

.i--brand { fill: none; stroke: none; }
.btn--going { background: #1F7A4F; border: 1px solid #1F7A4F; color: #fff; } .btn--going:hover { filter: brightness(1.1); }
.share-it .icon-btn:not(.brand) .i { width: 22px; height: 22px; }

/* ---- update20 ---- */
/* one compact row of share buttons */
.share-row { display: flex; flex-wrap: nowrap; justify-content: space-between; gap: 6px; }
.share-it { width: auto; flex: 1 1 0; min-width: 0; display: grid; place-items: center; font-size: 0; gap: 0; }
.share-it .icon-btn { width: 40px; height: 40px; min-width: 0; padding: 0; display: grid; place-items: center; border-radius: 50%; }
.share-it .icon-btn .i, .share-it .icon-btn.brand .i--brand { width: 22px; height: 22px; display: block; margin: 0; }
.share-it .icon-btn:not(.brand) .i { width: 19px; height: 19px; }
@media (max-width: 360px) { .share-it .icon-btn { width: 36px; height: 36px; } }
/* flyer posters: half the height */
.poster.poster--img, .card--lg .poster.poster--img { aspect-ratio: 4 / 1; }
.banner .poster.poster--img { aspect-ratio: 32 / 9; }
@media (min-width: 760px) { .banner .poster.poster--img { aspect-ratio: 5 / 1; } }
@media (max-width: 640px) {
  .poster.poster--img, .card--lg .poster.poster--img { aspect-ratio: 4 / 1; }
  .banner .poster.poster--img { aspect-ratio: 32 / 9; }
}
.share-it .icon-btn.brand { border: 0; background: none; box-shadow: none; }
.share-it .icon-btn.brand .i--brand { width: 40px; height: 40px; }
@media (max-width: 360px) { .share-it .icon-btn.brand .i--brand { width: 36px; height: 36px; } }

/* ---- update21: Rihly logo and wordmark ---- */
.logo { width: 38px; height: 38px; color: inherit; border-radius: 11px; }
.brand { gap: 10px; }
.brand-name { font-family: "Bricolage Grotesque", var(--font-display); font-weight: 800 !important; font-size: 1.9rem !important; letter-spacing: -.035em !important; text-transform: lowercase; color: #0A4A3E; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .brand-name { color: #F5F1E4; } }
:root[data-theme="dark"] .brand-name { color: #F5F1E4; }
@media (max-width: 640px) { .logo { width: 34px; height: 34px; } .brand-name { font-size: 1.7rem !important; } }

/* ---- update22: flyer keeps its earlier size; the whole event card is smaller ---- */
.poster.poster--img, .card--lg .poster.poster--img { aspect-ratio: 2 / 1 !important; }
.banner .poster.poster--img { aspect-ratio: 16 / 9 !important; }
@media (min-width: 760px) { .banner .poster.poster--img { aspect-ratio: 5 / 2 !important; } }
.grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); gap: 14px; }
.rail { grid-auto-columns: min(72%, 230px); gap: 12px; }
.rail--lg { grid-auto-columns: min(78%, 270px); }
.card-body { gap: 6px; padding: 10px 12px 12px; }
.card-title { font-size: 1.05rem; line-height: 1.15; font-weight: 600; }
.card--lg .card-title { font-size: 1.2rem; }
.card .muted, .card-meta, .card-body p, .card-body .chip { font-size: .78rem; }
.datebadge { top: 8px; left: 8px; padding: 4px 8px 3px; border-radius: 10px; }
.datebadge b { font-size: 1.15rem; } .datebadge span { font-size: .56rem; }
.poster:not(.poster--img) { aspect-ratio: 3 / 1; }
.poster-cat { font-size: .66rem; }
.card-tags .chip { font-size: .64rem; padding: 2px 7px; }
@media (max-width: 640px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .grid .card, .rail--lg .card { max-width: none; }
  .rail { grid-auto-columns: min(62%, 210px); }
  .card-body { padding: 8px 9px 10px; gap: 4px; }
  .card-title { font-size: .95rem; }
  .card .muted, .card-meta, .card-body p { font-size: .72rem; }
  .datebadge { transform: scale(.8); transform-origin: top left; }
}
/* Jumu'ah schedule */
.jm { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }
.jm-search { margin: 10px 0 14px; }
.jm-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.jm-item { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.jm-item.is-mine { border-color: #1F7A4F; box-shadow: 0 0 0 1px #1F7A4F inset; }
.jm-item h3 { margin: 0 0 6px; font-size: 1rem; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.jm-item h3 em { font-style: normal; font-size: .65rem; background: #1F7A4F; color: #fff; border-radius: 99px; padding: 2px 8px; }
.jm-slots { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.jm-slots li { display: flex; gap: 10px; font-size: .88rem; }
.jm-slots b { min-width: 70px; color: var(--gold-ink, #8a6a1c); }
.jm-none { grid-column: 1 / -1; color: var(--ink-2, #55605c); }
.jm-rem { margin-top: 16px; } .jm-rem summary { cursor: pointer; font-weight: 600; }
.jm-rem h3 { font-size: .95rem; margin: 12px 0 4px; } .jm-rem ul { margin: 0; padding-left: 18px; font-size: .88rem; }
.flyer-full { width: 100%; height: auto; border-radius: 10px; }
.drop-prev img { max-width: 100%; max-height: 220px; border-radius: 10px; }

/* ---- update22b: landscape event cards ---- */
.card, .card--lg { display: grid; grid-template-columns: 40% 1fr; flex-direction: row; min-height: 150px; }
.card .card-media { height: 100%; min-height: 150px; }
.card .poster, .card .poster.poster--img, .card--lg .poster.poster--img { aspect-ratio: auto !important; height: 100%; min-height: 150px; }
.card .poster.poster--img img { object-position: center top; }
.card .card-tags { left: 6px; right: auto; bottom: 6px; top: auto; flex-direction: column; align-items: flex-start; gap: 3px; justify-content: flex-start; }
.card .card-media .card-tags { left: 6px; right: auto; bottom: 6px; justify-content: flex-start; }
.card .card-body { padding: 10px 12px; gap: 4px; min-width: 0; justify-content: center; }
.card .card-title { font-size: 1rem; }
.card .eyebrow { font-size: .62rem; margin: 0; }
.card .meta { gap: 2px; } .card .meta li { font-size: .76rem; gap: 6px; } .card .meta .i { width: 14px; height: 14px; }
.card .card-foot { margin-top: 2px; padding-top: 4px; }
.grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); }
.rail, .rail--lg { grid-auto-columns: min(92%, 400px); }
@media (max-width: 640px) {
  .grid { grid-template-columns: 1fr; }
  .rail, .rail--lg { grid-auto-columns: min(92%, 360px); }
  .card, .card--lg { grid-template-columns: 38% 1fr; }
  .card .card-body { padding: 8px 10px; }
  .datebadge { transform: scale(.75); }
}
/* Prayer page tabs */
.pt-tabs { display: flex; gap: 4px; padding: 4px; margin: 14px 0; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-2); }
.pt-tab { flex: 1; border: 0; background: none; font: inherit; font-weight: 600; font-size: .92rem; padding: 10px 12px; border-radius: 999px; color: var(--ink-2, #55605c); cursor: pointer; }
.pt-tab[aria-selected="true"] { background: #0A4A3E; color: #fff; box-shadow: 0 4px 12px -6px rgba(0,0,0,.5); }
.card .poster:not(.poster--img)::after { display: none; }

/* ---- update24: arched crown + Jumu'ah in the prayer template ---- */
.pt-stage { padding-top: clamp(54px, 12vw, 78px); }
.pm-card { position: relative; overflow: visible; }
.pm-crown { position: absolute; left: 50%; transform: translateX(-50%); bottom: calc(100% - 1px); width: 78%; max-width: 440px; height: 46px; overflow: visible; pointer-events: none; }
.pm-crown-fill { fill: var(--pm-card); }
.pm-crown-line { fill: none; stroke: #E0A93A; stroke-width: 2.5px; vector-effect: non-scaling-stroke; stroke-linecap: round; }
.pm-card { border-top-color: #E0A93A; }
.pm-head { text-align: center; padding-top: 6px; }
.pm-head h2 { font-size: 1.35rem; letter-spacing: .06em; text-transform: uppercase; color: #C9792B; font-weight: 600; }
.jm-head h2 { font-size: 1.2rem; }
.jm-old { margin: 0 0 10px; padding: 8px 12px; border-radius: 12px; background: var(--pm-jumbg); border: 1px solid var(--pm-jumline); color: var(--pm-ink); font-size: .82rem; }
.jm-tools { display: flex; gap: 8px; margin-bottom: 12px; }
.jm-tools input { flex: 1; min-width: 0; padding: 11px 14px; border-radius: 14px; border: 1px solid var(--pm-line); background: var(--pm-row); color: var(--pm-ink); font: inherit; }
.jm-flyerbtn { display: inline-flex; align-items: center; gap: 6px; padding: 0 14px; border-radius: 14px; border: 1px solid var(--pm-jumline); background: var(--pm-jumbg); color: var(--pm-sun); font: inherit; font-weight: 600; cursor: pointer; }
.jm-flyerbtn .i { width: 16px; height: 16px; }
.jm-row { grid-template-columns: 1fr 1.25fr; align-items: start; }
.jm-slots { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.jm-slots li { display: flex; gap: 10px; font-size: .88rem; font-variant-numeric: tabular-nums; }
.jm-slots b { min-width: 68px; color: var(--pm-iq); font-size: .95rem; }
.jm-none { list-style: none; text-align: center; color: var(--pm-ink2); padding: 12px; }
.jm-rem h4 { margin: 10px 0 4px; font-size: .88rem; color: var(--pm-ink); font-family: inherit; }
.jm-rem ul { margin: 0; padding-left: 18px; font-size: .84rem; color: var(--pm-ink); display: block; }
.jm-rem.pm-jum > div { display: block; }
.pm-head, .pm-head h2, .pm-head p { text-align: center !important; }
.jm-row { grid-template-columns: 1fr; gap: 6px; }
.jm-row .pm-name { font-size: 1rem; }
.jm-slots li { align-items: baseline; }
.jm-slots b { min-width: 72px; }

/* ---- update26: arched card built from three stacked parts ---- */
.pt-stage { padding: 22px clamp(10px, 4vw, 36px) 20px; background: radial-gradient(90% 70% at 50% 0%, #0B6272, transparent 70%), linear-gradient(180deg, #06505E, #02323C); }
.pt-stage::before { display: block; background: #E0B65A; opacity: .1; }
.pt-board { width: min(100%, 520px); } .pt-board--wide { width: min(100%, 760px); }
.pm-card { container-type: inline-size; width: 100%; padding: 0; border: 0 !important; border-radius: 0; background: none; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; overflow: visible; color: #1B2B2E;
  --pm-ink: #1B2B2E; --pm-ink2: #5E6B6A; --pm-row: #FFFFFF; --pm-line: #E4D8B8; --pm-iq: #0A5A68; --pm-sun: #9A6B00; --pm-hij: #0A6B60; --pm-nextbg: #DDEFE8; --pm-nextline: #1AA486; --pm-jumbg: #FBF1D4; --pm-jumline: #E5CE8B; --pm-chip: #FFFFFF; --pm-tag: #0A5A68; --pm-tagink: #fff; --pm-card: #F2EAD7; }
.pm-card::before, .pm-card::after { content: none; }
.pm-top { position: relative; aspect-ratio: 653 / 226; background: url("../img/cap-top.webp") center bottom / 100% 100% no-repeat; margin-bottom: -1px; }
.pm-top .pm-head { position: absolute; left: 0; right: 0; top: 33%; margin: 0; padding: 0; display: grid; gap: 1px; }
.pm-mid { background: #F2EAD7; border-inline: 2px solid #D9AC48; padding: 4px clamp(12px, 4cqw, 26px) 6px; }
.pm-bot { aspect-ratio: 653 / 90; background: url("../img/cap-bot.webp") center top / 100% 100% no-repeat; margin-top: -1px; }
.pm-head, .pm-head h2, .pm-head p { text-align: center; }
.pm-head h2 { color: #0A5A68; font-size: clamp(.95rem, 4.8cqw, 1.45rem); letter-spacing: .07em; margin: 0; }
.pm-head p { color: var(--pm-ink2); font-size: clamp(.7rem, 3cqw, .9rem); margin: 0; }
.pm-head .pm-hij { color: var(--pm-hij); font-weight: 600; }
.pm-row { background: #fff; border: 1px solid var(--pm-line); }
.pm-row.is-next { background: var(--pm-nextbg); border-color: var(--pm-nextline); }
.pt-stage .pt-foot, .pt-stage .pt-foot span, .pt-stage .pt-note, .pt-stage .pt-src { color: #D5E6E4; }
/* Jumu'ah: compact rows, sticky search + time chips */
.jm-sticky { position: sticky; top: var(--header-h, 64px); z-index: 6; background: #F2EAD7; padding: 8px 0 8px; margin: 0 calc(-1 * clamp(12px, 4cqw, 26px)); padding-inline: clamp(12px, 4cqw, 26px); border-bottom: 1px solid #E4D8B8; }
.jm-tools { display: flex; gap: 8px; margin-bottom: 8px; }
.jm-tools input { flex: 1; min-width: 0; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--pm-line); background: #fff; color: var(--pm-ink); font: inherit; }
.jm-flyerbtn { display: inline-flex; align-items: center; gap: 6px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--pm-jumline); background: var(--pm-jumbg); color: var(--pm-sun); font: inherit; font-weight: 600; cursor: pointer; }
.jm-flyerbtn .i { width: 16px; height: 16px; }
.jm-chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.jm-chips::-webkit-scrollbar { display: none; }
.jm-chip { flex: none; border: 1px solid var(--pm-line); background: #fff; color: var(--pm-ink); font: inherit; font-size: .8rem; font-weight: 600; padding: 5px 12px; border-radius: 999px; cursor: pointer; }
.jm-chip.on { background: #0A5A68; border-color: #0A5A68; color: #fff; }
.jm-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; grid-template-columns: 1fr; }
@container (min-width: 600px) { .jm-list { grid-template-columns: 1fr 1fr; } }
.jm-row { display: grid; gap: 4px; padding: 9px 12px; background: #fff; border: 1px solid var(--pm-line); border-radius: 14px; }
.jm-row.is-mine { background: var(--pm-nextbg); border-color: var(--pm-nextline); }
.jm-name { font-weight: 700; font-size: .95rem; color: var(--pm-ink); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.jm-name em { font-style: normal; font-size: .6rem; letter-spacing: .08em; text-transform: uppercase; padding: 2px 8px; border-radius: 99px; background: #0A5A68; color: #fff; font-weight: 700; }
.jm-slots { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.jm-slot { font-size: .82rem; color: var(--pm-ink2); }
.jm-slot b { color: #0A5A68; margin-right: 6px; font-variant-numeric: tabular-nums; }
.jm-slot.on b { background: #0A5A68; color: #fff; padding: 1px 6px; border-radius: 6px; }
.jm-none { list-style: none; text-align: center; color: var(--pm-ink2); padding: 14px; grid-column: 1 / -1; }
.jm-old { margin: 8px 0 0; padding: 8px 12px; border-radius: 12px; background: var(--pm-jumbg); border: 1px solid var(--pm-jumline); color: var(--pm-ink); font-size: .8rem; }
.jm-rem { margin: 12px 0 4px; } .jm-rem summary { cursor: pointer; font-weight: 700; color: var(--pm-sun); }
.jm-rem h4 { margin: 10px 0 4px; font-size: .85rem; color: var(--pm-ink); font-family: inherit; }
.jm-rem ul { margin: 0; padding-left: 18px; font-size: .82rem; color: var(--pm-ink); display: block; }
.pt-board--wide { width: min(100%, 640px); }
.pm-top .pm-head { top: 38%; }
.pm-head h2 { font-size: clamp(.78rem, 3.7cqw, 1.3rem); letter-spacing: .06em; }
.pm-head p { font-size: clamp(.66rem, 2.7cqw, .85rem); }
.pt-stage { overflow: clip; }

/* ---- update28: multi-session events, clear buttons ---- */
.three { display: grid; gap: 12px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 520px) { .three { grid-template-columns: 1fr 1fr; } .three .field:first-child { grid-column: 1 / -1; } }
.sess { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; margin: 10px 0; background: var(--surface-2, transparent); display: grid; gap: 10px; }
.sess-h { display: flex; justify-content: space-between; align-items: center; }
.sess-h b { font-size: .9rem; }
.sess .field { margin: 0; }
.clr { font-size: .78rem; margin-top: 4px; justify-self: start; display: inline-block; }
.sched { margin-top: 22px; }
.sched h2 { margin-bottom: 10px; }
.sched-day { margin-bottom: 14px; }
.sched-day h3 { font-size: 1rem; margin: 0 0 6px; color: var(--gold-ink, #8a6a1c); }
.sched-day ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.sched-day li { display: grid; grid-template-columns: 8.5em 1fr; gap: 12px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.sched-time { font-weight: 700; font-variant-numeric: tabular-nums; }
.sched-what { display: grid; gap: 2px; } .sched-what em { font-style: normal; color: var(--ink-2, #55605c); font-size: .92rem; }
@media (max-width: 480px) { .sched-day li { grid-template-columns: 1fr; gap: 2px; } }
.three { align-items: start; }
.sess input[type="date"], .sess input[type="time"] { width: 100%; min-width: 0; box-sizing: border-box; height: 46px; -webkit-appearance: none; appearance: none; }
.sess .field > label { display: block; }
.grp-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.grp-list a { display: grid; grid-template-columns: 11em 1fr; gap: 12px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); text-decoration: none; color: inherit; }
.grp-list a:hover { border-color: var(--accent); }
@media (max-width: 480px) { .grp-list a { grid-template-columns: 1fr; gap: 2px; } }

/* ---- update31: Qur'an fonts hosted with the app ---- */
/* Uthmani: KFGQPC Uthmanic Script Hafs (the "QPC Hafs" style used by quran.com). IndoPak: Al-Quran IndoPak. */
@font-face { font-family: "QPC Hafs"; src: url("../fonts/qpc-hafs.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Rihly IndoPak"; src: url("../fonts/indopak.woff2") format("woff2"); font-display: swap; }
.mushaf .v-ar, .mushaf .wb-ar, .mushaf .bismillah { font-family: "QPC Hafs", "Amiri Quran", serif; font-weight: 400; }
.mushaf .v-ar { font-size: calc(2.1rem * var(--fs)); line-height: 2.25; }
.mushaf .wb-ar { font-size: calc(1.8rem * var(--fs)); line-height: 1.9; }
.mushaf.script-indopak .v-ar, .mushaf.script-indopak .wb-ar { font-family: "Rihly IndoPak", "Noto Nastaliq Urdu", serif; font-weight: 400; }
.mushaf.script-indopak .v-ar { font-size: calc(2rem * var(--fs)); line-height: 2.5; }
.mushaf.script-indopak .wb-ar { font-size: calc(1.7rem * var(--fs)); line-height: 2.1; }
.v-ar span[class^="tj-"], .wb-ar span[class^="tj-"] { font: inherit; }

/* ===== update33: event-centric home, quick filters ===== */
.hm{padding-top:1.2rem;padding-bottom:3rem}
.hm-top{margin-bottom:1rem}.hm-date{color:var(--muted,#6b7a76);font-size:.85rem;margin:0 0 .3rem}
.hm-top h1{font-size:clamp(1.6rem,6vw,2.4rem);margin:0;line-height:1.1}
.hm-top h1 span{display:block;font-size:1rem;font-weight:500;color:var(--muted,#6b7a76);margin-top:.35rem}
.hm-tiles{display:grid;grid-template-columns:repeat(2,1fr);gap:.7rem;margin:1rem 0 1.4rem}
@media(min-width:760px){.hm-tiles{grid-template-columns:repeat(4,1fr)}}
.hm-tile{display:flex;flex-direction:column;align-items:flex-start;gap:.1rem;text-align:left;padding:1rem;border-radius:18px;border:1px solid rgba(11,59,51,.14);background:var(--surface,#fff);color:inherit;cursor:pointer;font:inherit;min-height:104px}
.hm-tile b{font-size:2.1rem;line-height:1;color:#0B3B33}
.hm-tile span{font-weight:700}.hm-tile i{font-style:normal;font-size:.8rem;color:var(--muted,#6b7a76)}
.hm-tile--gold{background:linear-gradient(160deg,#FBF3DD,#EBDDB6);border-color:#C79A3E}
.hm-tile--near{background:#0B3B33;color:#fff;border-color:#0B3B33}.hm-tile--near b,.hm-tile--near i{color:#E0BC68}
.hm-tile--near svg{width:28px;height:28px;stroke:#E0BC68;fill:none;stroke-width:1.7;margin-bottom:.2rem}
.hm-sec{margin:1.6rem 0}
.hm-daily{display:grid;gap:.8rem}@media(min-width:760px){.hm-daily{grid-template-columns:1fr 1fr}}
.hm-card{border:1px solid rgba(11,59,51,.14);border-radius:18px;padding:1rem 1.1rem;background:var(--surface,#fff)}
.hm-verse{background:#0B3B33;color:#fff;border-color:#0B3B33}
.hm-k{font-size:.72rem;letter-spacing:.08em;text-transform:uppercase;font-weight:700;color:#C79A3E;margin:0 0 .5rem}
.hm-ar{font-family:'QPC Hafs','KFGQPC Uthmanic Script HAFS',serif;font-size:1.7rem;line-height:2.1;margin:.2rem 0 .5rem}
.hm-ar--sm{font-size:1.25rem;line-height:1.9}
.hm-en{margin:0 0 .7rem;line-height:1.55}.hm-skel{opacity:.6}
.hm-btns{display:flex;gap:.5rem;flex-wrap:wrap}
.hm-verse .btn--ghost{color:#fff;border-color:rgba(255,255,255,.4)}
.hm-row{display:grid;gap:.8rem;margin-top:.8rem}@media(min-width:760px){.hm-row{grid-template-columns:2fr 1fr}}
.hm-cont{display:flex;align-items:center;gap:.8rem;text-decoration:none;color:inherit}
.hm-cont svg{width:28px;height:28px;stroke:#0B3B33;fill:none;stroke-width:1.7}
.hm-cont small,.hm-streak small{display:block;color:var(--muted,#6b7a76);font-size:.78rem}
.hm-streak{display:flex;align-items:center;gap:.8rem}.hm-streak>b{font-size:2.2rem;color:#C79A3E}
.hm-links{display:grid;gap:.6rem;margin-top:1.4rem}@media(min-width:760px){.hm-links{grid-template-columns:repeat(3,1fr)}}
.hm-links a{display:flex;align-items:center;gap:.8rem;padding:.9rem 1rem;border-radius:16px;border:1px solid rgba(11,59,51,.14);text-decoration:none;color:inherit}
.hm-links svg{width:26px;height:26px;stroke:#0B3B33;fill:none;stroke-width:1.7;flex:none}.hm-links small{display:block;color:var(--muted,#6b7a76)}
.hm-foot{text-align:center;color:var(--muted,#6b7a76);font-size:.82rem;margin-top:1.6rem}
.quick{display:flex;gap:.5rem;overflow-x:auto;padding:.2rem 0 .8rem;margin:0 0 .4rem;scrollbar-width:none}.quick::-webkit-scrollbar{display:none}
.quick-chip{flex:none;display:inline-flex;align-items:center;gap:.35rem;padding:.5rem .95rem;border-radius:999px;border:1px solid rgba(11,59,51,.25);background:transparent;color:inherit;font:inherit;font-weight:600;cursor:pointer}
.quick-chip svg{width:16px;height:16px;stroke:currentColor;fill:none;stroke-width:1.8}
.quick-chip.on{background:#0B3B33;color:#fff;border-color:#0B3B33}
.near-form .err{color:#b3261e}
.hm .sec-head h2 small{font-size:.8rem;font-weight:500;color:var(--muted,#6b7a76);margin-left:.4rem}
.hm .sec-head>span{display:inline-flex;gap:1rem;align-items:center}

/* update33b: one-line strip, spotlight, readable prayer line */
.hm-top .hero-prayer{margin-top:.8rem;padding:.5rem .9rem;background:var(--surface,#fff);border:1px solid rgba(11,59,51,.22);color:inherit;backdrop-filter:none}
.hm-top .hero-prayer b{color:#8A6418}.hm-top .hero-prayer i{font-style:normal;color:inherit;opacity:.8;font-weight:600}
.hm-top .hero-prayer svg{stroke:#8A6418}
.hm-strip{display:flex;align-items:stretch;margin:.9rem 0 1.1rem;border-radius:20px;overflow:hidden;background:#0B3B33;color:#fff;box-shadow:0 6px 18px rgba(11,59,51,.18)}
.hm-cell{flex:1 1 0;min-width:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.1rem;padding:.7rem .3rem;border:0;border-left:1px solid rgba(224,188,104,.25);background:transparent;color:inherit;font:inherit;cursor:pointer;transition:background .15s}
.hm-cell:first-child{border-left:0}.hm-cell:hover,.hm-cell:focus-visible{background:rgba(224,188,104,.14)}
.hm-cell b{font-size:1.6rem;line-height:1;font-weight:800;color:#fff}
.hm-cell span{font-size:.7rem;letter-spacing:.06em;text-transform:uppercase;opacity:.85;white-space:nowrap}
.hm-cell--gold b{color:#E0BC68}.hm-cell--near{background:rgba(224,188,104,.16)}.hm-cell--near b{color:#E0BC68}
.hm-cell--near svg{width:24px;height:24px;stroke:#E0BC68;fill:none;stroke-width:1.8}
.hm-spot{display:grid;border-radius:20px;overflow:hidden;border:1px solid #C79A3E;background:linear-gradient(160deg,#FBF3DD,#EBDDB6);color:#10231f;margin-bottom:1.2rem}
@media(min-width:700px){.hm-spot{grid-template-columns:minmax(220px,36%) 1fr}}
.hm-spot-img{min-height:150px;max-height:220px;overflow:hidden}.hm-spot-img>*{width:100%;height:100%;object-fit:cover}
.hm-spot-body{padding:1rem 1.2rem}.hm-spot-body h2{font-size:1.4rem;margin:.1rem 0 .5rem}.hm-spot-body h2 a{color:inherit;text-decoration:none}
.hm-spot-meta{display:flex;gap:.5rem;align-items:center;margin:.15rem 0}.hm-spot-meta svg{width:16px;height:16px;stroke:#8A6418;fill:none;stroke-width:1.8;flex:none}
.hm-spot-foot{display:flex;flex-wrap:wrap;gap:.7rem;align-items:center;margin-top:.8rem}.hm-spot-foot .btn{margin-left:auto}
.hm-spot .hm-k{color:#8A6418}
.hm-spot-img{max-height:130px}@media(min-width:700px){.hm-spot-img{max-height:none}}

/* update34: category poster banner on top of Home; the old spotlight card is gone */
.hm-feat{position:relative;display:flex;align-items:flex-end;min-height:190px;border-radius:22px;overflow:hidden;background-size:cover;background-position:center;margin:0 0 1rem;box-shadow:0 8px 24px rgba(11,59,51,.2)}
.hm-feat::before{content:"";position:absolute;inset:0;background:linear-gradient(0deg,rgba(6,28,24,.82) 0%,rgba(6,28,24,.35) 55%,rgba(6,28,24,0) 100%)}
.hm-feat-in{position:relative;padding:1.1rem 1.2rem;color:#fff;width:100%}
.hm-feat-k{font-size:.72rem;letter-spacing:.12em;text-transform:uppercase;font-weight:700;color:#E0BC68;margin:0 0 .3rem}
.hm-feat h2{font-size:clamp(1.35rem,5vw,2.1rem);line-height:1.15;margin:0 0 .8rem;max-width:22ch;text-shadow:0 2px 8px rgba(0,0,0,.45)}
@media(min-width:760px){.hm-feat{min-height:260px}}

/* ===== update35: Eventeesy brand, header info + merged menu, new home ===== */
@font-face { font-family: "Poppins"; font-weight: 600; font-style: normal; font-display: swap; src: url("../fonts/poppins-600.woff2") format("woff2"); }
.brand { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; color: var(--ink, #10231f); }
.logo-ez { width: 36px; height: 36px; border-radius: 10px; display: block; }
.brand-word { display: block; height: 20px; aspect-ratio: 724 / 144; background: currentColor; -webkit-mask: url(../img/wordmark.png) center / contain no-repeat; mask: url(../img/wordmark.png) center / contain no-repeat; }
.hd-info { margin-left: auto; display: inline-flex; flex-direction: column; align-items: flex-start; gap: 0; padding: 4px 10px; border-radius: 12px; text-decoration: none; color: inherit; font-size: .72rem; line-height: 1.25; position: relative; padding-left: 26px; }
.hd-info .i { position: absolute; left: 6px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; stroke: #8A6418; fill: none; stroke-width: 1.8; }
.hd-info .hd-d { opacity: .75; font-weight: 500; }
.hd-info .hd-p { font-weight: 700; color: #8A6418; }
@media (min-width: 820px) { .hd-info { flex-direction: row; gap: 8px; align-items: center; font-size: .85rem; } }
.top-actions { margin-left: 0; }
.umenu { position: relative; }
.umenu .icon-btn .i, .umenu .icon-btn svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; }
.umenu-panel { position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; min-width: 190px; padding: 6px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface, #fff); box-shadow: 0 14px 34px rgba(0,0,0,.18); display: flex; flex-direction: column; gap: 2px; }
.umenu-panel[hidden] { display: none; }
.um-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 0; border-radius: 10px; background: transparent; color: inherit; font: inherit; font-weight: 600; text-align: left; text-decoration: none; cursor: pointer; }
.um-item:hover, .um-item:focus-visible { background: var(--surface-2, rgba(11,59,51,.08)); }
.um-item .i { width: 18px; height: 18px; }
.fb-btn { display: none; }

.hm { padding-top: 1rem; padding-bottom: 3rem; }
.hm-hello h1 { font-size: clamp(1.7rem, 7vw, 2.6rem); margin: 0; line-height: 1.05; }
.hm-wow { margin: .55rem 0 0; }
.hm-wow span { display: inline; font-family: "Poppins", system-ui, sans-serif; font-weight: 600; font-size: clamp(.95rem, 3.8vw, 1.15rem); line-height: 1.9; color: #5b2a86; padding: .25em .6em; border-radius: 10px; background: linear-gradient(100deg, rgba(224,188,104,.55), rgba(245,196,220,.55)); -webkit-box-decoration-break: clone; box-decoration-break: clone; }
:root[data-theme="dark"] .hm-wow span { color: #ffe9b3; background: linear-gradient(100deg, rgba(199,154,62,.35), rgba(150,90,200,.35)); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hm-wow span { color: #ffe9b3; background: linear-gradient(100deg, rgba(199,154,62,.35), rgba(150,90,200,.35)); } }
.hm .hm-strip { display: flex; gap: .5rem; margin: 1rem 0 1.1rem; background: transparent; box-shadow: none; border-radius: 0; overflow: visible; color: inherit; }
.hm .hm-cell { flex: 1 1 0; min-width: 0; padding: .6rem .2rem; border: 1px solid rgba(11,59,51,.18); border-left: 1px solid rgba(11,59,51,.18); border-radius: 16px; background: rgba(255,255,255,.45); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: 0 2px 10px rgba(11,59,51,.07); color: inherit; }
.hm .hm-cell:hover, .hm .hm-cell:focus-visible { background: rgba(224,188,104,.22); border-color: #C79A3E; }
.hm .hm-cell b { color: #0B3B33; font-size: 1.55rem; }
.hm .hm-cell span { font-size: .64rem; opacity: .8; }
.hm .hm-cell--gold { border-color: rgba(199,154,62,.6); }
.hm .hm-cell--gold b { color: #A87A1A; }
.hm .hm-cell--near { background: rgba(255,255,255,.45); border-color: rgba(11,59,51,.18); }
.hm .hm-cell--near b { color: #0B3B33; }
.hm .hm-cell--near svg { stroke: #A87A1A; }
:root[data-theme="dark"] .hm .hm-cell { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.18); }
:root[data-theme="dark"] .hm .hm-cell b { color: #fff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hm .hm-cell { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.18); } :root:not([data-theme="light"]) .hm .hm-cell b { color: #fff; } }

.hm .hm-feat { position: relative; display: block; width: 100vw; margin: 0 0 1.2rem calc(50% - 50vw); min-height: 0; border-radius: 0; overflow: hidden; box-shadow: none; background: #10231f; isolation: isolate; }
.hm .hm-feat::before { content: ""; position: absolute; inset: -30px; z-index: 0; background: var(--bg) center / cover; filter: blur(26px) saturate(1.3); transform: scale(1.1); }
.hm-feat-img { position: relative; z-index: 1; display: block; width: 100%; height: auto; max-height: 420px; object-fit: contain; margin: 0 auto; filter: saturate(1.12) contrast(1.04); }
.hm .hm-feat::after { content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; background: linear-gradient(115deg, rgba(255,255,255,.28) 0%, rgba(255,255,255,0) 38%, rgba(255,255,255,0) 70%, rgba(255,255,255,.12) 100%); }
.hm-feat-glass { position: absolute; z-index: 3; left: 0; right: 0; bottom: 0; padding: .9rem 1.1rem; color: #fff; background: rgba(8,32,28,.34); -webkit-backdrop-filter: blur(14px) saturate(1.5); backdrop-filter: blur(14px) saturate(1.5); border-top: 1px solid rgba(255,255,255,.35); display: flex; flex-wrap: wrap; align-items: center; gap: .3rem 1rem; }
.hm-feat-glass .hm-feat-k { flex: 1 0 100%; margin: 0; }
.hm-feat-glass h2 { flex: 1 1 14ch; margin: 0; font-size: clamp(1.1rem, 4.4vw, 1.7rem); line-height: 1.15; text-shadow: 0 1px 6px rgba(0,0,0,.45); max-width: none; }
.hm-feat-glass .btn { flex: none; }
@media (min-width: 900px) { .hm-feat-img { max-height: 380px; } .hm-feat-glass { padding: 1rem max(1.5rem, calc(50vw - 560px)); } }

.hm-nearask { display: flex; align-items: center; gap: .8rem; width: 100%; padding: .9rem 1rem; border-radius: 16px; border: 1px dashed #C79A3E; background: rgba(224,188,104,.12); color: inherit; font: inherit; text-align: left; cursor: pointer; }
.hm-nearask svg { width: 26px; height: 26px; stroke: #A87A1A; fill: none; stroke-width: 1.7; flex: none; }
.hm-nearask small { display: block; color: var(--muted, #6b7a76); }
.hm-none { margin: 0; }
.hm-trivia { background: linear-gradient(160deg, #FBF3DD, #F2E6C4); border-color: #C79A3E; color: #10231f; margin-bottom: .8rem; }
.hm-trivia .hm-k { color: #8A6418; }
.tv-q { font-size: 1.15rem; line-height: 1.35; margin: 0 0 .8rem; color: #10231f; }
.tv-opts { display: grid; gap: .5rem; }
@media (min-width: 640px) { .tv-opts { grid-template-columns: 1fr 1fr; } }
.tv-opt { padding: .75rem 1rem; text-align: left; border-radius: 14px; border: 1px solid rgba(11,59,51,.25); background: rgba(255,255,255,.7); color: #10231f; font: inherit; font-weight: 600; cursor: pointer; }
.tv-opt:hover, .tv-opt:focus-visible { border-color: #0B3B33; background: #fff; }
.tv-note, .tv-locked, .tv-why, .tv-next, .tv-score { font-size: .88rem; margin: .7rem 0 0; color: #3b4a45; }
.tv-score { display: inline-block; margin-top: .6rem; font-weight: 600; color: #8A6418; }
.tv-ans { margin: .2rem 0 .3rem; font-size: 1.05rem; padding: .6rem .8rem; border-radius: 12px; background: rgba(255,255,255,.7); }
.tv-ans.is-ok { background: rgba(46,160,90,.18); } .tv-ans.is-no { background: rgba(190,70,60,.14); }
.tv-verse { margin-top: .8rem; padding-top: .8rem; border-top: 1px dashed rgba(11,59,51,.25); }
.tv-verse:empty { display: none; }
.tv-verse .hm-ar { color: #10231f; }
.tv-moti { margin: .8rem 0 0; font-weight: 600; color: #10231f; }
.tv-next { display: flex; align-items: center; gap: .5rem; font-weight: 700; color: #0B3B33; }
.tv-next svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; flex: none; }
.hm-daily { margin-top: .8rem; display: grid; gap: .8rem; }
/* update35b: caption sits under the poster (poster stays fully visible) */
.hm .hm-feat { display: flex; flex-direction: column; }
.hm .hm-feat::after { display: none; }
.hm .hm-feat .hm-feat-glass { position: relative; left: auto; right: auto; bottom: auto; background: rgba(8,32,28,.38); }
.hm .hm-feat-img { max-height: 340px; }
.hm .sec-head > span { white-space: nowrap; }
.hm .sec-head .link { white-space: nowrap; }
.hm .sec-head { flex-wrap: wrap; gap: .3rem 1rem; }
.hm .hm-feat { align-items: stretch; }
.hm .hm-feat-img { width: auto; max-width: 100%; }
@media (max-width: 899px) { .hm .hm-feat-img { width: 100%; } }

/* ===== update36: compact home, working menu, verse-based trivia ===== */
.topbar { overflow: visible; }
.topbar::before { max-width: 100%; }
.hm { padding-top: .6rem; padding-bottom: 2rem; }
.hm-sal { margin: 0; font-family: "Poppins", system-ui, sans-serif; font-weight: 600; font-size: .8rem; color: #8A6418; letter-spacing: .02em; }
.hm .hm-hello h1 { font-size: clamp(1.35rem, 5.6vw, 2rem); margin: .1rem 0 0; line-height: 1.12; }
.hm .hm-wow { margin: .4rem 0 0; }
.hm .hm-wow span { font-size: .85rem; line-height: 1.6; padding: .2em .6em; }
.hm .hm-strip { margin: .7rem 0 .7rem; gap: .4rem; }
.hm .hm-cell { padding: .4rem .2rem; border-radius: 14px; }
.hm .hm-cell b { font-size: 1.3rem; }
.hm .hm-feat { flex-direction: row; margin-bottom: .8rem; }
.hm .hm-feat-img { width: auto; max-width: 45%; height: 116px; max-height: none; flex: none; object-fit: contain; margin: 0; }
.hm .hm-feat .hm-feat-glass { flex: 1; min-width: 0; border-top: 0; border-left: 1px solid rgba(255,255,255,.35); padding: .55rem .85rem; flex-direction: column; align-items: flex-start; justify-content: center; gap: .2rem; flex-wrap: nowrap; }
.hm .hm-feat-glass .hm-feat-k { flex: none; font-size: .62rem; }
.hm .hm-feat-glass h2 { flex: none; font-size: 1rem; line-height: 1.2; }
.hm .hm-feat-glass .btn { padding: .4rem .8rem; font-size: .82rem; min-height: 0; margin-top: .2rem; }
@media (min-width: 900px) { .hm .hm-feat-img { height: 150px; } .hm .hm-feat .hm-feat-glass { padding: .8rem 1.4rem; } .hm .hm-feat-glass h2 { font-size: 1.3rem; } }
.hm .hm-sec { margin: 1rem 0; }
.tv-read { margin: 0 0 .3rem; font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #5b2a86; }
.hm-trivia .tv-verse { margin: 0 0 .8rem; padding: .7rem .8rem; border-radius: 14px; background: rgba(255,255,255,.6); border: 1px solid rgba(11,59,51,.15); }
.hm-trivia .tv-verse .hm-ar { font-size: 1.45rem; line-height: 2; margin: .1rem 0 .3rem; color: #10231f; }
.hm-trivia .tv-verse .hm-en { font-size: .95rem; margin: 0 0 .3rem; color: #10231f; }
.tv-thanks { margin: .8rem 0 0; padding: .7rem .9rem; border-radius: 14px; font-size: 1rem; line-height: 1.5; color: #fff; background: linear-gradient(120deg, #6a2fa0, #2a7f8f); }
.tv-thanks b { color: #ffe08a; }

/* ===== update37: gold dot, tinted poster + tagline, splash tiles, stylish trivia ===== */
.brand-wm { position: relative; display: block; padding-top: 7px; }
.brand-dot { position: absolute; left: 89%; top: 0; width: 10.4%; aspect-ratio: 1; border-radius: 50%; background: #D9B35F; }
.hm .hm-wow span { color: var(--tint-d, #5b2a86); background: var(--tint, #f2dfa8); }
:root[data-theme="dark"] .hm .hm-wow span { color: var(--tint-d, #5b2a86); background: var(--tint, #f2dfa8); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hm .hm-wow span { color: var(--tint-d, #5b2a86); background: var(--tint, #f2dfa8); } }

/* tiles: no box, a small splash of colour behind each number */
.hm .hm-strip { gap: .2rem; }
.hm .hm-cell, .hm .hm-cell:hover, .hm .hm-cell:focus-visible { background: transparent; border: 0; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; position: relative; isolation: isolate; padding: .55rem .2rem .35rem; }
.hm .hm-cell::before { content: ""; position: absolute; z-index: -1; left: 50%; top: 42%; width: 66px; height: 54px; transform: translate(-50%, -52%) rotate(-8deg); border-radius: 58% 42% 63% 37% / 46% 58% 42% 54%; background: var(--sp, #b3d8f7); opacity: .85; transition: transform .25s; }
.hm .hm-cell:hover::before { transform: translate(-50%, -52%) rotate(8deg) scale(1.08); }
.hm .hm-cell:nth-child(1) { --sp: #bfe6d8; }
.hm .hm-cell:nth-child(2) { --sp: #bcd4f5; }
.hm .hm-cell:nth-child(3) { --sp: #f6dc9b; }
.hm .hm-cell:nth-child(4) { --sp: #f4c3d8; }
.hm .hm-cell--gold, .hm .hm-cell--near { border: 0; background: transparent; }
.hm .hm-cell b, .hm .hm-cell--gold b, .hm .hm-cell--near b { color: #10231f; }
.hm .hm-cell--near svg { stroke: #7a1f4d; }
:root[data-theme="dark"] .hm .hm-cell { background: transparent; border: 0; }
:root[data-theme="dark"] .hm .hm-cell span { color: #e8efe9; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hm .hm-cell { background: transparent; border: 0; } :root:not([data-theme="light"]) .hm .hm-cell span { color: #e8efe9; } }

/* trivia cards: deep jewel backgrounds with a gold geometric pattern */
.hm-trivia { position: relative; overflow: hidden; color: #f6f1e0; border: 1px solid rgba(224,188,104,.55); background-color: #0B3B33;
  background-image: 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='%23E0BC68' stroke-opacity='.16' stroke-width='1'%3E%3Cpath d='M32 4l6 14 14-6-6 14 14 6-14 6 6 14-14-6-6 14-6-14-14 6 6-14-14-6 14-6-6-14 14 6z'/%3E%3C/g%3E%3C/svg%3E"),
    linear-gradient(135deg, #0B3B33 0%, #17306b 58%, #4a2a7a 100%);
  box-shadow: 0 10px 28px rgba(23,48,107,.28); }
.hm-trivia--h { background-image: 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='%23E0BC68' stroke-opacity='.16' stroke-width='1'%3E%3Cpath d='M32 4l6 14 14-6-6 14 14 6-14 6 6 14-14-6-6 14-6-14-14 6 6-14-14-6 14-6-6-14 14 6z'/%3E%3C/g%3E%3C/svg%3E"),
    linear-gradient(135deg, #4a2a7a 0%, #7a2f5e 55%, #0B3B33 100%); }
.hm-trivia::after { content: ""; position: absolute; right: -40px; top: -40px; width: 140px; height: 140px; border-radius: 50%; background: radial-gradient(circle, rgba(224,188,104,.4), transparent 70%); pointer-events: none; }
.hm-trivia > * { position: relative; z-index: 1; }
.hm-trivia .hm-k { color: #E0BC68; }
.hm-trivia .tv-q { color: #fff; }
.hm-trivia .tv-note, .hm-trivia .tv-why, .hm-trivia .tv-next, .hm-trivia .tv-locked { color: rgba(255,255,255,.82); }
.hm-trivia .tv-next { color: #E0BC68; }
.hm-trivia .tv-score { color: #ffe08a; }
.hm-trivia .tv-moti { color: #fff; }
.hm-trivia .tv-verse { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.22); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.hm-trivia .tv-verse .hm-ar, .hm-trivia .tv-verse .hm-en { color: #fff; }
.hm-trivia .tv-read { color: #ffe08a; }
.hm-trivia .tv-verse .link { color: #ffe08a; }
.hm-trivia .tv-opt { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.35); color: #fff; }
.hm-trivia .tv-opt:hover, .hm-trivia .tv-opt:focus-visible { background: rgba(224,188,104,.28); border-color: #E0BC68; }
.hm-trivia .tv-ans { background: rgba(255,255,255,.14); color: #fff; }
.hm-trivia .tv-ans.is-ok { background: rgba(60,190,110,.35); } .hm-trivia .tv-ans.is-no { background: rgba(230,90,80,.3); }
.hm-trivia .tv-thanks { background: linear-gradient(120deg, #E0BC68, #f6d98a); color: #3b2a05; }
.hm-trivia .tv-thanks b { color: #6a2fa0; }
.hm-trivia .hm-skel { color: rgba(255,255,255,.7); }
.tv-scroll { max-height: 150px; overflow-y: auto; padding-right: .3rem; }
.hm-trivia .hm-card + .hm-card { margin-top: .8rem; }

/* ===== update38: tinted top section, watercolour-splash tiles ===== */
.hm .hm-top2 { position: relative; width: 100vw; margin: 0 0 .8rem calc(50% - 50vw); padding: .8rem max(16px, calc(50vw - 560px)) .5rem; color: #10231f; background: linear-gradient(180deg, var(--tint, #f2dfa8) 0%, color-mix(in srgb, var(--tint, #f2dfa8) 45%, #fff) 100%); }
.hm .hm-top2 h1, .hm .hm-top2 .hm-sal { color: var(--tint-d, #10231f); }
.hm .hm-top2 .hm-wow span { color: var(--tint-d, #5b2a86); background: rgba(255,255,255,.65); }
.hm .hm-top2 .hm-strip { margin: .5rem 0 .2rem; }
.hm .hm-cell { color: #10231f; }
.hm .hm-cell span { color: #10231f; opacity: .9; font-weight: 600; }
.hm .hm-cell::before { width: 96px; height: 80px; border-radius: 0; background: var(--sp) center / contain no-repeat; transform: translate(-50%, -54%); opacity: 1; top: 44%; }
.hm .hm-cell:hover::before { transform: translate(-50%, -54%) scale(1.08) rotate(4deg); }
.hm .hm-cell:nth-child(1) { --sp: url(../img/splash-green.webp); }
.hm .hm-cell:nth-child(2) { --sp: url(../img/splash-blue.webp); }
.hm .hm-cell:nth-child(3) { --sp: url(../img/splash-orange.webp); }
.hm .hm-cell:nth-child(4) { --sp: url(../img/splash-pink.webp); }
.hm .hm-cell b, .hm .hm-cell--gold b, .hm .hm-cell--near b { color: #10231f; text-shadow: 0 0 6px rgba(255,255,255,.6); }
.hm .hm-cell { padding: .7rem .2rem .55rem; }

/* ===== update39: poster-pattern band + matching header, solid header, compact pages ===== */
html, body { overflow-x: clip; }
.topbar { background: var(--bg); -webkit-backdrop-filter: none; backdrop-filter: none; }
.topbar.poster-hdr { background: linear-gradient(rgba(8,24,44,.52), rgba(8,24,44,.64)), var(--pbg) center / cover; border-bottom-color: transparent; color: #fff; }
.topbar.poster-hdr::before { display: none; }
.topbar.poster-hdr .brand, .topbar.poster-hdr .nav a, .topbar.poster-hdr .hd-info { color: #fff; }
.topbar.poster-hdr .hd-info .hd-p { color: #ffe08a; }
.topbar.poster-hdr .hd-info .i { stroke: #ffe08a; }
.hm .hm-top2 { background: linear-gradient(rgba(8,24,44,.52), rgba(8,24,44,.64)), var(--pbg, none) center / cover, #17306b; color: #fff; }
.hm .hm-top2 h1 { color: #fff; }
.hm .hm-top2 .hm-wow span { color: var(--tint-d, #1b1030); background: rgba(255,255,255,.9); }
.hm .hm-cell span { color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.7); opacity: 1; }
.hm .hm-cell::before { top: 38%; width: 88px; height: 70px; }
.hm .hm-cell b, .hm .hm-cell--gold b, .hm .hm-cell--near b { text-shadow: 0 0 8px rgba(255,255,255,.8); }
.hm .hm-cell--near svg { stroke: #fff; filter: drop-shadow(0 1px 2px rgba(0,0,0,.6)); }

/* compact everywhere: smaller type scale, tighter blocks, smaller heroes */
:root { --header-h: 58px; }
@media (max-width: 819px) { html { font-size: 15px; } }
h1 { font-size: clamp(1.5rem, 4.6vw, 2.4rem); }
h2 { font-size: clamp(1.25rem, 3vw, 1.7rem); }
.block { padding-block: clamp(12px, 2.5vw, 28px); }
.page-head { margin-bottom: 12px; gap: 8px; }
.qhero { margin-bottom: 12px; }
.qhero-in { padding: clamp(14px, 3.5vw, 26px) clamp(16px, 4vw, 28px); gap: 6px; }
.qhero h1 { font-size: clamp(1.6rem, 5vw, 2.3rem); }
.qhero-sub { font-size: .92rem; line-height: 1.4; }
.qhero-art { display: none; }
@media (min-width: 900px) { .qhero-art { display: block; width: 190px; margin: 0 24px 0 auto; } .qhero { grid-template-columns: 1fr auto; } }
.continue { padding: 9px 14px; margin-bottom: 10px; gap: 10px; }
.continue .i { width: 22px; height: 22px; }
.votd { margin-bottom: 12px; padding: 12px 14px 10px; }
.votd .v-ar { font-size: clamp(1.25rem, 4vw, 1.7rem); margin: 6px 0; line-height: 1.9; }
.votd .v-tr { font-size: .9rem; margin-bottom: 6px; }
.finder { margin-bottom: 12px; padding: 8px 0; }
.mpicker { margin-bottom: 8px; }
.pt-stage { padding: clamp(12px, 3vw, 28px) clamp(10px, 3vw, 28px) 12px; margin-bottom: 14px; }
.pt-tabs { margin-bottom: 10px; }
.back { margin-bottom: 8px; }
.banner .poster { aspect-ratio: 16 / 5.5; padding-bottom: 14px; }
.flyer-open { margin: 4px 0 0; }
.detail-head { margin: 12px 0 4px; gap: 6px; }
.detail-head h1 { font-size: clamp(1.5rem, 5vw, 2.4rem); line-height: 1.1; }
.detail-grid { gap: 14px; margin-top: 10px; }
.detail-main { gap: 18px; }
.detail-main h2 { font-size: 1.2rem; margin-bottom: 6px; }
.prose { font-size: 1rem; line-height: 1.55; gap: 10px; }
.sidecard { padding: 14px; gap: 10px; }
.big { font-size: 2rem; }
.facts { gap: 8px; }
.orgcard { padding: 14px; gap: 12px; }
.avatar { width: 46px; height: 46px; border-radius: 14px; }
.mapcard iframe { height: 170px; }
.mapart { height: 120px; }
.mapcard-body { padding: 10px 14px 12px; }
.tags { margin-top: 10px; }
.card-body { padding-block: 12px; }
.sec-head { margin-bottom: 8px; }
.dategroup { margin-bottom: 10px; }
.hm .hm-card { padding: .8rem .9rem; }
html, body { margin: 0; padding: 0; }
.hm { padding-top: 0; }
.hm .hm-top2 { margin-bottom: 0; padding-top: .7rem; }
.hm .hm-feat { margin-top: 0; }
.topbar.poster-hdr .icon-btn { color: #10231f; }

/* ===== update40: header back to the light style; greeting band is a flat colour from the poster ===== */
.topbar, .topbar.poster-hdr { background: color-mix(in srgb, var(--bg) 96%, transparent); color: var(--ink); border-bottom: 1px solid var(--line); }
.topbar::before, .topbar.poster-hdr::before { display: block; }
.topbar.poster-hdr .brand, .topbar.poster-hdr .nav a, .topbar.poster-hdr .hd-info { color: inherit; }
.topbar .hd-info .hd-p { color: #8A6418; } .topbar .hd-info .i { stroke: #8A6418; }
.umenu .icon-btn { color: var(--ink); background: var(--surface); }
.umenu-panel { color: var(--ink); }
.um-item { color: var(--ink); }
.hm .hm-top2 { background: linear-gradient(120deg, var(--tint-d, #17306b) 0%, color-mix(in srgb, var(--tint-d, #17306b) 62%, var(--tint, #b3c1f7)) 100%); }

/* update41: greeting line without the highlight */
.hm .hm-top2 .hm-wow span { background: transparent; color: #fff; padding: 0; border-radius: 0; box-decoration-break: slice; -webkit-box-decoration-break: slice; font-size: .95rem; line-height: 1.4; text-shadow: 0 1px 3px rgba(0,0,0,.35); }
