/* Masjid Bridge: the website's look (v3, 20 Nov 2026). App layout with a bottom tab bar.
   Brand: Teal and sand, Outfit + Inter. Light and dark follow the phone, or the choice in Settings. */
@font-face { font-family: "Outfit"; src: url("/fonts/outfit-latin.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/fonts/inter-latin.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }

:root {
  --bg: #F5F1E9;
  --bg-glass: rgba(245, 241, 233, .86);
  --surface: #FFFFFF;
  --surface-2: #EDE7DB;
  --tint: #E1EEEB;
  --ink: #0C3236;
  --muted: #5A7475;
  --line: rgba(12, 50, 54, .1);
  --accent: #0F5257;          /* teal: links, active things */
  --primary-bg: #0F5257;
  --primary-fg: #F7F1E6;
  --primary-hover: #2B7F80;
  --sun: #EC8C5E;
  --sun-text: #A84E27;
  --night: #0B3A3E;
  --deep: #072B2E;
  --sand: #F7F1E6;
  --danger: #C0352B;
  --shadow: 0 1px 2px rgba(12, 50, 54, .06), 0 8px 24px -14px rgba(12, 50, 54, .3);
  --shadow-up: 0 2px 6px rgba(12, 50, 54, .08), 0 24px 44px -18px rgba(12, 50, 54, .42);
  --display: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
  --text: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --tabbar-h: 66px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #082F32; --bg-glass: rgba(8, 47, 50, .86); --surface: #0E3E42; --surface-2: #0A3538; --tint: #14494C;
  --ink: #F3EEE4; --muted: #9DC2BD; --line: rgba(247, 241, 230, .1); --accent: #A9D0CB;
  --primary-bg: #A9D0CB; --primary-fg: #0B3A3E; --primary-hover: #C3E0DB; --sun-text: #F2A27C; --danger: #FF7B70;
  --shadow: 0 1px 2px rgba(0, 0, 0, .25), 0 10px 28px -14px rgba(0, 0, 0, .65);
  --shadow-up: 0 2px 6px rgba(0, 0, 0, .3), 0 24px 44px -18px rgba(0, 0, 0, .8);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #082F32; --bg-glass: rgba(8, 47, 50, .86); --surface: #0E3E42; --surface-2: #0A3538; --tint: #14494C;
    --ink: #F3EEE4; --muted: #9DC2BD; --line: rgba(247, 241, 230, .1); --accent: #A9D0CB;
    --primary-bg: #A9D0CB; --primary-fg: #0B3A3E; --primary-hover: #C3E0DB; --sun-text: #F2A27C; --danger: #FF7B70;
    --shadow: 0 1px 2px rgba(0, 0, 0, .25), 0 10px 28px -14px rgba(0, 0, 0, .65);
    --shadow-up: 0 2px 6px rgba(0, 0, 0, .3), 0 24px 44px -18px rgba(0, 0, 0, .8);
    color-scheme: dark;
  }
}
.only-dark { display: none !important; }
:root[data-theme="dark"] .only-light { display: none !important; }
:root[data-theme="dark"] .only-dark { display: block !important; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .only-light { display: none !important; }
  :root:not([data-theme="light"]) .only-dark { display: block !important; }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--ink); font: 400 1rem/1.55 var(--text);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
main { flex: 1; width: 100%; }
body.has-tabs main { padding-bottom: calc(var(--tabbar-h) + 28px + env(safe-area-inset-bottom)); }
@media (min-width: 720px) { body.has-tabs main { padding-bottom: 120px; } }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; border-radius: 10px; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.12; margin: 0; letter-spacing: -0.02em; }
p { margin: 0; }
button { font: inherit; color: inherit; }
.ic { width: 20px; height: 20px; flex: none; }
.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding-left: 16px; padding-right: 16px; }
@media (min-width: 720px) { .wrap { padding-left: 28px; padding-right: 28px; } }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 60; border-radius: 8px; }
.skip:focus { left: 8px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; color: var(--muted); }
@media (max-width: 719px) { .hide-sm { display: none !important; } }
@media (min-width: 720px) { .show-sm { display: none !important; } }

/* ---------- round icon buttons ---------- */
.round-btn {
  flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  border: 0; background: var(--surface); color: var(--ink); box-shadow: var(--shadow); cursor: pointer; padding: 0;
}
.round-btn .ic { width: 21px; height: 21px; }
.round-btn:disabled { opacity: .35; cursor: default; box-shadow: none; }
.round-btn-glass {
  background: rgba(247, 241, 230, .16); color: var(--sand); box-shadow: inset 0 0 0 1px rgba(247, 241, 230, .18);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.round-btn-solid { background: var(--surface-2); box-shadow: none; width: 52px; height: 52px; }

/* ---------- bottom tab bar ---------- */
.tabbar {
  position: fixed; z-index: 40; left: 0; right: 0; bottom: 0;
  display: grid; grid-template-columns: repeat(3, 1fr);
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  background: var(--bg-glass); -webkit-backdrop-filter: blur(20px) saturate(1.5); backdrop-filter: blur(20px) saturate(1.5);
  border-top: 1px solid var(--line);
}
.tab {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--muted); font: 600 .72rem/1 var(--text); letter-spacing: .01em;
}
.tab .ic { width: 50px; height: 30px; padding: 4px 13px; border-radius: 999px; transition: background-color .2s ease; }
.tab[aria-current] { color: var(--accent); }
.tab[aria-current] .ic { background: var(--tint); }
@media (min-width: 720px) {
  .tabbar {
    left: 50%; right: auto; bottom: 20px; transform: translateX(-50%);
    height: auto; padding: 6px; gap: 4px; display: flex; border-radius: 999px;
    border: 1px solid var(--line); box-shadow: var(--shadow-up);
  }
  .tab { flex-direction: row; gap: 8px; padding: 10px 18px; border-radius: 999px; font-size: .9rem; }
  .tab .ic { width: 20px; height: 20px; padding: 0; background: none !important; }
  .tab[aria-current] { background: var(--tint); }
  .tab:hover { color: var(--ink); }
}
@media (prefers-reduced-motion: reduce) { .tab .ic { transition: none; } }

/* ---------- home ---------- */
.home-head {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding-top: calc(22px + env(safe-area-inset-top)); padding-bottom: 14px;
}
.brand-big { display: block; }
.brand-big img { width: min(74vw, 330px); height: auto; }
@media (min-width: 720px) { .home-head { padding-top: 36px; padding-bottom: 20px; } .brand-big img { width: 380px; } }

.filterbar {
  position: sticky; top: 0; z-index: 20; padding: 10px 0;
  background: var(--bg-glass); -webkit-backdrop-filter: blur(16px) saturate(1.4); backdrop-filter: blur(16px) saturate(1.4);
}
.chips { display: flex; align-items: center; gap: 8px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; display: inline-flex; align-items: center; height: 38px; padding: 0 16px; border-radius: 999px;
  background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); font-weight: 500; font-size: .9rem; white-space: nowrap;
}
.chip:hover { background: var(--surface-2); }
.chip[aria-current] { background: var(--primary-bg); color: var(--primary-fg); box-shadow: none; font-weight: 600; }
.chip-sep { flex: none; width: 1px; height: 22px; background: var(--line); margin: 0 2px; }

.feed { padding-top: 14px; }
.feed-tight { padding-top: 4px; }
.section-label { font: 600 1.1rem/1.2 var(--display); color: var(--ink); letter-spacing: -0.01em; margin: 26px 0 12px; }
.feed > .section-label:first-child, .feed-tight > .section-label:first-child { margin-top: 8px; }

/* ---------- event cards ---------- */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 14px; }
@media (min-width: 720px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px 24px; } }
@media (min-width: 1080px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px 28px; } }
.card-link { display: block; color: inherit; border-radius: 20px; }
.card-media { position: relative; border-radius: 20px; box-shadow: var(--shadow); transition: transform .25s ease, box-shadow .25s ease; }
.card-link:hover .card-media { transform: translateY(-4px); box-shadow: var(--shadow-up); }
.card-link:active .card-media { transform: scale(.985); }
@media (prefers-reduced-motion: reduce) { .card-media { transition: none; } .card-link:hover .card-media, .card-link:active .card-media { transform: none; } }
.poster { position: relative; aspect-ratio: 4 / 5; border-radius: 20px; overflow: hidden; background: var(--night); isolation: isolate; }
.poster::before {
  content: ""; position: absolute; inset: -30px; z-index: -1;
  background: var(--img) center / cover no-repeat; filter: blur(26px) saturate(1.3) brightness(.82);
}
.poster img { width: 100%; height: 100%; object-fit: contain; }
.poster-none { display: flex; align-items: flex-end; padding: 18px; background: linear-gradient(160deg, #2B7F80, var(--night)); }
.poster-none span { font: 600 1.35rem/1.05 var(--display); color: var(--sand); letter-spacing: -0.02em; }
.poster-none.tall { aspect-ratio: 4 / 5; border-radius: 20px; }
.badge {
  position: absolute; top: 9px; left: 9px; z-index: 2; display: inline-flex; align-items: center; gap: 4px;
  padding: 6px 10px; border-radius: 999px; font: 600 .76rem/1 var(--text);
  background: rgba(255, 255, 255, .9); color: var(--night);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: 0 2px 8px rgba(0, 0, 0, .16);
}
.badge .ic { width: 13px; height: 13px; stroke-width: 2.6; }
.badge-today { background: var(--sun); color: var(--night); }
.badge-going { left: auto; right: 9px; background: var(--night); color: var(--sand); }
.badge-cancelled { left: auto; right: 9px; background: var(--danger); color: #fff; }
.card-body { padding: 12px 3px 0; }
.card-title {
  font-size: 1.06rem; line-height: 1.22; color: var(--ink); letter-spacing: -0.015em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
@media (min-width: 720px) { .card-title { font-size: 1.2rem; } }
.card-time, .card-place { display: flex; gap: 6px; align-items: flex-start; font-size: .84rem; line-height: 1.35; margin-top: 6px; }
.card-time { color: var(--ink); font-weight: 500; }
.card-time .ic { color: var(--sun-text); }
.card-place { color: var(--muted); margin-top: 4px; }
.card-time .ic, .card-place .ic { width: 15px; height: 15px; margin-top: 1px; }
.card-place span { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.card-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 9px; }
.card-chips span { font-size: .7rem; font-weight: 600; padding: 4px 8px; border-radius: 999px; background: var(--tint); color: var(--accent); }
.is-cancelled .poster img { filter: grayscale(1); opacity: .55; }
.is-cancelled .card-title { text-decoration: line-through; text-decoration-thickness: 2px; }

.empty { text-align: center; padding: 56px 16px; max-width: 420px; margin: 0 auto; }
.empty > .ic { width: 64px; height: 64px; padding: 16px; border-radius: 22px; background: var(--tint); color: var(--accent); margin: 0 auto 16px; }
.empty h2 { font-size: 1.45rem; }
.empty p { color: var(--muted); margin: 8px 0 22px; }

/* ---------- screen headings ---------- */
.page-head { padding-top: calc(14px + env(safe-area-inset-top)); padding-bottom: 6px; }
@media (min-width: 720px) { .page-head { padding-top: 28px; } }
.page-head-bar { display: flex; justify-content: space-between; align-items: center; min-height: 44px; }
.large-title { margin-top: 12px; font-size: clamp(2.1rem, 8vw, 3rem); line-height: 1.02; letter-spacing: -0.035em; text-wrap: balance; max-width: 20ch; }
.page-sub { margin-top: 10px; font-size: 1.05rem; color: var(--muted); max-width: 54ch; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 20px; border-radius: 999px; border: 0;
  background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line);
  font: 600 .95rem/1.2 var(--text); text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .15s ease, transform .15s ease;
}
.btn:hover { background: var(--surface-2); }
.btn:active { transform: scale(.98); }
.btn .ic { width: 19px; height: 19px; }
.btn-primary { background: var(--primary-bg); color: var(--primary-fg); box-shadow: none; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-sun { background: var(--sun); color: var(--night); box-shadow: none; }
.btn-sun:hover { background: #F29C73; }
.btn-glass {
  background: rgba(247, 241, 230, .13); color: var(--sand); box-shadow: inset 0 0 0 1px rgba(247, 241, 230, .2);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.btn-glass:hover { background: rgba(247, 241, 230, .22); }
.btn-ghost { background: transparent; box-shadow: none; color: var(--muted); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-small { min-height: 36px; padding: 7px 14px; font-size: .875rem; }
.btn-block { width: 100%; }
.btn-danger { background: transparent; color: var(--danger); box-shadow: inset 0 0 0 1px var(--danger); }
.btn[hidden] { display: none; }
.going-open.is-going { background: var(--tint); color: var(--accent); }
.btn-sun.going-open.is-going { background: var(--sand); color: var(--night); }
@media (prefers-reduced-motion: reduce) { .btn { transition: none; } .btn:active { transform: none; } }

/* ---------- event detail ---------- */
.ev-hero { position: relative; isolation: isolate; overflow: hidden; background: var(--night); color: var(--sand); }
.ev-hero::before {
  content: ""; position: absolute; inset: -80px; z-index: -2;
  background: var(--img, none) center / cover no-repeat; filter: blur(60px) saturate(1.5); transform: scale(1.15);
}
.ev-hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(7, 43, 46, .4) 0%, rgba(7, 43, 46, .7) 55%, rgba(7, 43, 46, .92) 100%);
}
.ev-top { position: relative; z-index: 3; display: flex; justify-content: space-between; align-items: center; padding-top: calc(12px + env(safe-area-inset-top)); }
.ev-hero-inner { display: grid; gap: 24px; padding-top: 12px; padding-bottom: 32px; }
.ev-poster { justify-self: center; width: min(74vw, 340px); }
.ev-poster a { display: block; }
.ev-poster img { margin: 0 auto; max-height: 62vh; width: auto; }
.ev-poster img, .ev-poster .poster-none { border-radius: 18px; box-shadow: 0 30px 60px -22px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 255, 255, .08); }
@media (min-width: 900px) {
  .ev-hero-inner { grid-template-columns: minmax(0, 440px) minmax(0, 1fr); gap: 64px; align-items: center; padding-top: 16px; padding-bottom: 64px; }
  .ev-poster { width: 100%; }
  .ev-poster img { max-height: min(76vh, 740px); }
}
.ev-status {
  display: inline-block; margin-bottom: 12px; padding: 6px 12px; border-radius: 999px;
  background: rgba(236, 140, 94, .2); color: #FFCBB0; font-weight: 600; font-size: .85rem;
  box-shadow: inset 0 0 0 1px rgba(236, 140, 94, .35);
}
.ev-status-cancelled { background: var(--danger); color: #fff; box-shadow: none; }
.ev-main h1 { font-size: clamp(2.2rem, 7vw, 3.8rem); line-height: 1.02; letter-spacing: -0.035em; color: #fff; text-wrap: balance; }
.ev-meta { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 14px; }
.ev-meta li { display: flex; gap: 14px; align-items: center; }
.ev-meta li > .ic {
  width: 42px; height: 42px; padding: 10px; border-radius: 14px; color: var(--sand);
  background: rgba(247, 241, 230, .12); box-shadow: inset 0 0 0 1px rgba(247, 241, 230, .14);
}
.ev-meta strong { display: block; font-weight: 600; font-size: 1.05rem; line-height: 1.3; }
.ev-meta strong a { color: inherit; text-decoration: underline; text-decoration-color: rgba(247, 241, 230, .4); text-underline-offset: 3px; }
.ev-meta span { display: block; color: rgba(247, 241, 230, .75); font-size: .925rem; margin-top: 1px; }
.ev-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
@media (max-width: 719px) {
  .ev-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 8px; }
  .ev-actions .btn { padding: 10px 8px; font-size: .86rem; gap: 6px; }
  .band-actions { display: flex; }
}
.menu { position: relative; }
.menu summary { list-style: none; }
.menu summary::-webkit-details-marker { display: none; }
.menu summary.btn { width: 100%; }
.menu-list {
  position: absolute; z-index: 10; top: calc(100% + 8px); left: 0; min-width: 240px;
  background: var(--surface); color: var(--ink); border-radius: 16px; padding: 6px; box-shadow: var(--shadow-up);
}
.menu-list a { display: block; padding: 12px 14px; border-radius: 10px; color: var(--ink); font-weight: 500; }
.menu-list a:hover { background: var(--surface-2); }

.ev-info { display: grid; gap: 12px; margin-top: 24px; }
@media (min-width: 720px) { .ev-info { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 36px; } }
@media (min-width: 1080px) { .ev-info { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.info { display: flex; gap: 14px; align-items: flex-start; background: var(--surface); border-radius: 20px; padding: 18px; box-shadow: var(--shadow); }
.info-wide { grid-column: 1 / -1; }
.info-ic { flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 14px; background: var(--tint); color: var(--accent); }
.info-label { font-size: .8rem; font-weight: 600; color: var(--muted); margin-bottom: 3px; }
.info-value { font-size: 1rem; line-height: 1.5; overflow-wrap: anywhere; }
.info-value .line { display: block; }
.info-value p + p { margin-top: 10px; }
.info-value a { text-decoration: underline; text-underline-offset: 3px; }
.report-link { margin-top: 24px; margin-bottom: 8px; font-size: .875rem; }
.report-link a { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.report-link .ic { width: 15px; height: 15px; }
.more { margin-top: 44px; padding-bottom: 40px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.section-head h2 { font-size: clamp(1.35rem, 4vw, 1.75rem); letter-spacing: -0.03em; }
.section-head a { font-weight: 600; }

/* the bottom bar on an event: share + I'm going */
.action-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: flex; gap: 10px; align-items: center;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: var(--bg-glass); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); border-top: 1px solid var(--line);
}
.action-bar .btn-block { min-height: 52px; font-size: 1rem; }
@media (max-width: 719px) { body.has-action-bar main { padding-bottom: calc(84px + env(safe-area-inset-bottom)); } }

/* the "I'm going" sheet */
.sheet {
  border: 0; padding: 10px 20px calc(20px + env(safe-area-inset-bottom)); width: 100%; max-width: 100%;
  margin: auto 0 0; border-radius: 28px 28px 0 0; background: var(--surface); color: var(--ink);
  box-shadow: 0 -10px 40px rgba(0, 0, 0, .25);
}
.sheet[open] { animation: sheet-up .3s cubic-bezier(.2, .8, .2, 1); }
.sheet::backdrop { background: rgba(7, 43, 46, .55); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
@media (min-width: 720px) { .sheet { margin: auto; max-width: 440px; border-radius: 28px; padding: 24px; } .sheet-grip { display: none; } }
@keyframes sheet-up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .sheet[open] { animation: none; } }
.sheet-grip { width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto 14px; }
.sheet-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.sheet-head h2 { font-size: 1.45rem; letter-spacing: -0.025em; }
.sheet-head .round-btn { width: 38px; height: 38px; box-shadow: none; background: var(--surface-2); }
.sheet-sub { color: var(--muted); font-size: .9rem; margin-top: 6px; }
.steppers { display: grid; gap: 10px; margin: 20px 0 14px; }
.stepper { display: grid; grid-template-columns: 1fr 48px 44px 48px; align-items: center; gap: 6px; padding: 8px 8px 8px 16px; border-radius: 18px; background: var(--bg); }
.stepper-label { font-weight: 600; }
.stepper button {
  width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--surface); color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--line); font: 500 1.45rem/1 var(--text); cursor: pointer;
}
.stepper output { text-align: center; font: 600 1.35rem var(--display); }
.sheet-note { font-size: .85rem; color: var(--muted); margin-bottom: 16px; }
.sheet .btn-block + .btn-block { margin-top: 8px; }
.going-status { margin-top: 10px; text-align: center; font-weight: 600; color: var(--accent); min-height: 1.3em; }

/* ---------- masjid detail (dark band) ---------- */
.band { position: relative; isolation: isolate; overflow: hidden; background: var(--night); color: var(--sand); }
.band::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(180deg, rgba(11, 58, 62, .3), rgba(11, 58, 62, .78)); }
.glow { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.glow img { position: absolute; width: 70%; max-width: 700px; filter: blur(70px) saturate(1.6); opacity: .65; }
.glow .g0 { left: -15%; top: -40%; }
.glow .g1 { right: -15%; top: -20%; }
.glow .g2 { left: 20%; bottom: -70%; opacity: .45; }
.glow .g3 { right: 0; bottom: -80%; opacity: .4; }
.band .ev-top, .band-inner { position: relative; z-index: 2; }
.band-inner { padding-top: 16px; padding-bottom: 32px; }
@media (min-width: 720px) { .band-inner { padding-top: 24px; padding-bottom: 48px; } }
.band-ic { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 18px; background: rgba(247, 241, 230, .14); box-shadow: inset 0 0 0 1px rgba(247, 241, 230, .16); margin-bottom: 16px; }
.band-ic .ic { width: 28px; height: 28px; }
.band-title { font-size: clamp(2.1rem, 7.5vw, 3.4rem); line-height: 1.02; letter-spacing: -0.035em; color: #fff; }
.band-sub { margin-top: 10px; font-size: 1.05rem; color: rgba(247, 241, 230, .8); }

/* ---------- calendar ---------- */
.cal-wrap { padding-top: 4px; }
@media (min-width: 960px) {
  .cal-wrap { display: grid; grid-template-columns: 380px minmax(0, 1fr); grid-template-rows: auto 1fr; grid-template-areas: "plans agenda" "cal agenda"; gap: 0 40px; align-items: start; }
  .cal-card { grid-area: cal; position: sticky; top: 20px; }
  .plans { grid-area: plans; }
  .agenda { grid-area: agenda; }
}
.plans-empty {
  display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 20px;
  border: 1.5px dashed var(--line); color: var(--muted);
}
.plans-empty .ic { width: 40px; height: 40px; padding: 9px; border-radius: 13px; background: var(--tint); color: var(--accent); }
.plans-empty strong { color: var(--ink); }
.rows { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.row {
  display: flex; align-items: center; gap: 14px; padding: 10px 14px 10px 10px; border-radius: 20px;
  background: var(--surface); color: var(--ink); box-shadow: var(--shadow); transition: transform .2s ease;
}
.row:active { transform: scale(.99); }
.row-thumb { flex: none; width: 58px; height: 72px; border-radius: 12px; overflow: hidden; background: var(--night); }
.row-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.row-text { flex: 1; min-width: 0; display: grid; gap: 1px; }
.row-text strong { font: 600 1.02rem/1.25 var(--display); letter-spacing: -0.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-text span { font-size: .84rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-text span:first-of-type { color: var(--ink); font-weight: 500; }
.row-going { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--sun); color: var(--night); }
.row-going .ic { width: 16px; height: 16px; stroke-width: 2.6; }
.row.is-cancelled strong { text-decoration: line-through; }
.cal-card { margin-top: 22px; background: var(--surface); border-radius: 24px; padding: 14px 12px 12px; box-shadow: var(--shadow); }
.cal-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cal-top h2 { font-size: 1.15rem; }
.cal-top .round-btn { width: 38px; height: 38px; box-shadow: none; background: var(--surface-2); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal-wd { text-align: center; font-size: .72rem; font-weight: 600; color: var(--muted); padding: 6px 0; }
.cal-cell {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center;
  height: 44px; border-radius: 14px; color: var(--ink); font-size: .95rem; font-variant-numeric: tabular-nums;
}
.cal-cell.is-empty { visibility: hidden; }
.cal-cell.is-past { color: var(--muted); opacity: .45; }
.cal-cell.has-events { font-weight: 700; }
.cal-cell.has-events:hover { background: var(--surface-2); }
.cal-cell i { position: absolute; bottom: 6px; width: 5px; height: 5px; border-radius: 50%; background: var(--sun); }
.cal-cell.is-today { box-shadow: inset 0 0 0 2px var(--accent); }
.cal-cell.has-going { background: var(--sun); color: var(--night); }
.cal-cell.has-going i { background: var(--night); }
.cal-cell.is-picked { background: var(--primary-bg); color: var(--primary-fg); }
.cal-cell.is-picked i { background: var(--primary-fg); }
.agenda { margin-top: 6px; }
.agenda-day { scroll-margin-top: 16px; }
.agenda-day h3 { font: 500 .95rem var(--text); color: var(--muted); margin: 22px 0 10px; letter-spacing: 0; }
.agenda-day h3 span { font: 600 1.05rem var(--display); color: var(--ink); margin-right: 4px; }
.agenda-day.is-flash .rows { animation: flash 1.2s ease; border-radius: 22px; }
@keyframes flash { 0% { box-shadow: 0 0 0 4px var(--sun); } 100% { box-shadow: 0 0 0 4px transparent; } }
@media (prefers-reduced-motion: reduce) { .agenda-day.is-flash .rows { animation: none; } }

/* ---------- masjids list ---------- */
.masjid-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
@media (min-width: 720px) { .masjid-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; } }
.masjid-card { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 20px; background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.masjid-card:active { transform: scale(.99); }
.masjid-ic { flex: none; display: grid; place-items: center; width: 50px; height: 50px; border-radius: 16px; background: var(--tint); color: var(--accent); }
.masjid-ic .ic { width: 25px; height: 25px; }
.masjid-text { flex: 1; min-width: 0; }
.masjid-text strong { display: block; font: 600 1.08rem/1.2 var(--display); letter-spacing: -0.01em; }
.masjid-text span { display: block; color: var(--muted); font-size: .85rem; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.masjid-count { flex: none; display: grid; place-items: center; min-width: 28px; height: 28px; padding: 0 8px; border-radius: 999px; background: var(--sun); color: var(--night); font-weight: 700; font-size: .85rem; }
.masjid-go { color: var(--muted); }
.masjid-go .ic { width: 18px; height: 18px; }

/* ---------- settings ---------- */
.settings { max-width: 640px; padding-top: 4px; }
.set-group .section-label { font: 600 .82rem var(--text); color: var(--muted); margin: 24px 4px 8px; letter-spacing: .01em; }
.set-card { background: var(--surface); border-radius: 20px; box-shadow: var(--shadow); overflow: hidden; }
.set-item, .set-row { display: flex; align-items: center; gap: 14px; padding: 13px 16px; color: var(--ink); width: 100%; text-align: left; }
.set-item + .set-item { border-top: 1px solid var(--line); }
.set-button { border: 0; background: none; cursor: pointer; }
.set-item:hover, .set-button:hover { background: var(--surface-2); }
.set-ic { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; background: var(--tint); color: var(--accent); }
.set-ic .ic { width: 19px; height: 19px; }
.set-text { flex: 1; min-width: 0; display: grid; gap: 1px; }
.set-text strong { font-weight: 600; }
.set-text span { font-size: .84rem; color: var(--muted); }
.set-go { color: var(--muted); width: 18px; height: 18px; }
.set-note { margin: 8px 4px 0; font-size: .875rem; color: var(--accent); font-weight: 600; min-height: 1.2em; }
.set-foot { margin: 28px 4px 0; font-size: .82rem; color: var(--muted); line-height: 1.6; }
.segmented { display: inline-flex; padding: 3px; border-radius: 12px; background: var(--surface-2); flex: none; }
.segmented button { border: 0; background: none; padding: 7px 11px; border-radius: 9px; font-size: .84rem; font-weight: 600; color: var(--muted); cursor: pointer; }
.segmented button[aria-checked="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .14); }

/* ---------- for masjids ---------- */
.step-cards { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 12px; }
@media (min-width: 720px) { .step-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; } }
.step-cards li { background: var(--surface); border-radius: 20px; padding: 22px; box-shadow: var(--shadow); }
.step-n { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 13px; background: var(--sun); color: var(--night); font: 600 1.15rem var(--display); }
.step-cards h3 { font-size: 1.25rem; margin: 14px 0 6px; }
.step-cards p { color: var(--muted); }
.split { display: grid; gap: 12px; margin-top: 14px; }
@media (min-width: 820px) { .split { grid-template-columns: 1fr 1fr; gap: 18px; } }
.panel { background: var(--surface); border-radius: 20px; padding: 24px; box-shadow: var(--shadow); }
.panel-soft { background: var(--tint); box-shadow: none; }
.panel h2 { font-size: 1.3rem; margin-bottom: 14px; }
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.ticks li { display: flex; gap: 12px; align-items: flex-start; line-height: 1.45; }
.ticks .ic { width: 24px; height: 24px; padding: 4px; border-radius: 50%; background: var(--primary-bg); color: var(--primary-fg); margin-top: -1px; }
.ticks-soon .ic { background: transparent; color: var(--accent); box-shadow: inset 0 0 0 1.5px var(--accent); }
.cta-card {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px;
  margin-top: 28px; padding: 26px; border-radius: 24px; background: var(--night); color: var(--sand);
}
.cta-card h2 { font-size: 1.5rem; }
.cta-card p { color: rgba(247, 241, 230, .78); margin-top: 6px; }

/* ---------- text pages and forms ---------- */
.prose { max-width: 760px; padding-top: 18px; padding-bottom: 40px; }
.prose h2 { font-size: 1.35rem; margin: 30px 0 10px; }
.prose p, .prose li { font-size: 1.0625rem; line-height: 1.7; max-width: 66ch; }
.prose p + p { margin-top: 14px; }
.prose ul, .prose ol { padding-left: 1.25em; margin: 10px 0; }
.prose li { margin-bottom: 6px; }
.prose a:not(.btn) { text-decoration: underline; text-underline-offset: 3px; }
.prose .lede { font-size: 1.2rem; color: var(--muted); }
.draft-note { margin-top: 32px !important; padding: 14px 16px; border-radius: 14px; background: var(--surface-2); font-size: .9rem !important; color: var(--muted); }
.narrow { max-width: 440px; }
.form { display: grid; gap: 6px; margin-top: 4px; background: var(--surface); padding: 22px; border-radius: 22px; box-shadow: var(--shadow); }
.form label { font-weight: 600; margin-top: 14px; font-size: .95rem; }
.form > label:first-child, .form > input[type="hidden"] + label { margin-top: 0; }
.form .opt { font-weight: 400; color: var(--muted); }
.form input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), .form textarea, .form select {
  width: 100%; min-height: 50px; padding: 12px 14px; border: 0; border-radius: 14px;
  background: var(--bg); color: var(--ink); font: 400 1rem var(--text); box-shadow: inset 0 0 0 1px var(--line);
}
.form input[type="file"] { padding: 14px; border-radius: 14px; background: var(--bg); box-shadow: inset 0 0 0 1px var(--line); font: inherit; width: 100%; color: var(--ink); }
.form textarea { resize: vertical; min-height: 110px; }
.form input:focus, .form textarea:focus, .form select:focus { outline: none; box-shadow: inset 0 0 0 2px var(--accent), 0 0 0 4px rgba(236, 140, 94, .35); }
.form fieldset { border: 0; padding: 0; margin: 0; }
.form legend { font-weight: 600; margin-bottom: 4px; }
.form .radio, .form .check { display: flex; align-items: center; gap: 12px; font-weight: 400; margin-top: 6px; padding: 12px 14px; border-radius: 14px; background: var(--bg); cursor: pointer; }
.form .radio input, .form .check input { width: 20px; height: 20px; accent-color: var(--primary-bg); margin: 0; flex: none; }
.form button[type="submit"] { justify-self: start; margin-top: 20px; }
.form .small { margin-top: 10px; }
.form .hint { margin: 0; font-size: .85rem; color: var(--muted); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- admin ---------- */
.admin-head { background: var(--night); }
.head-inner { max-width: 1200px; margin: 0 auto; padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.admin-head .brand img { width: 140px; }
.admin-nav { display: flex; gap: 2px; }
.admin-nav a { color: rgba(247, 241, 230, .86); font: 500 .9rem var(--text); padding: 8px 10px; border-radius: 999px; }
.admin-nav a:hover { background: rgba(247, 241, 230, .1); }
.main-admin { max-width: 1200px; margin: 0 auto; padding: 20px 16px 64px; }
@media (min-width: 720px) { .main-admin { padding: 28px 28px 64px; } .head-inner { padding: 14px 28px; } }
.main-admin .prose { padding-top: 12px; }
.main-admin .prose h1 { font-size: 2.2rem; margin-bottom: 18px; }
.admin h1 { font-size: 2.2rem; letter-spacing: -0.03em; }
.admin h2 { font-size: 1.25rem; margin: 30px 0 12px; }
.crumb { margin-bottom: 10px; font-size: .9rem; }
.crumb a { color: var(--muted); }
.admin-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.banner { padding: 14px 16px; border-radius: 14px; background: var(--tint); margin: 0 0 16px; }
.banner-cancelled { background: #FBE4E2; color: #7A1712; }
.banner-ok { background: #DDF0E4; color: #134A2A; }
.table-wrap { overflow-x: auto; border-radius: 20px; box-shadow: var(--shadow); }
.admin-table { width: 100%; border-collapse: collapse; background: var(--surface); }
.admin-table th, .admin-table td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; font-size: .95rem; }
.admin-table th { font-size: .78rem; color: var(--muted); font-weight: 600; }
.admin-table .thumb { width: 64px; }
.admin-table .thumb img { border-radius: 8px; }
.tag { display: inline-block; font-size: .75rem; font-weight: 600; padding: 5px 9px; border-radius: 999px; background: var(--surface-2); }
.tag-cancelled { background: var(--danger); color: #fff; }
.going-total { display: block; font-size: .875rem; margin-top: 4px; }
.past { margin-top: 30px; }
.past summary { cursor: pointer; font: 600 1.15rem var(--display); margin-bottom: 12px; }
.signout { margin-top: 44px; }
.form-cols { display: grid; gap: 24px; }
@media (min-width: 900px) { .form-cols { grid-template-columns: 300px 1fr; gap: 40px; } .form-poster { position: sticky; top: 20px; align-self: start; } }
.event-form { background: transparent; padding: 0; box-shadow: none; }
.form-main { background: var(--surface); padding: 24px; border-radius: 22px; box-shadow: var(--shadow); display: grid; gap: 6px; }
.form-main h2 { margin: 26px 0 0; padding-top: 18px; border-top: 1px solid var(--line); font-size: 1.15rem; }
.field { display: grid; gap: 4px; }
.field label { margin-top: 12px; }
.field-row { display: grid; gap: 0 16px; }
@media (min-width: 560px) { .field-row { grid-template-columns: 1fr 1fr; } }
.poster-preview { border-radius: 16px; background: var(--surface-2); min-height: 180px; display: flex; align-items: center; justify-content: center; overflow: hidden; margin: 4px 0 8px; color: var(--muted); }
.poster-preview img { width: 100%; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.form-status { font-weight: 600; color: var(--accent); }
.narrow-form { max-width: 580px; }
.danger { margin-top: 36px; }
.inbox-grid { display: grid; gap: 14px; }
.inbox-item { display: grid; grid-template-columns: 110px 1fr; gap: 16px; background: var(--surface); padding: 16px; border-radius: 20px; box-shadow: var(--shadow); }
.inbox-item img { border-radius: 10px; }
.inbox-item p { margin: 0 0 8px; }
.inbox-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.inbox-actions form { margin: 0; }
.note { white-space: pre-wrap; background: var(--bg); padding: 10px 12px; border-radius: 10px; }
.reports { list-style: none; padding: 0; display: grid; gap: 12px; }
.reports li { background: var(--surface); padding: 16px; border-radius: 20px; box-shadow: var(--shadow); border-left: 4px solid transparent; }
.reports li.is-concern { border-left-color: var(--danger); }
.reports p { margin: 0 0 8px; }
.is-done { opacity: .6; }
