/* ============================================================
   Dar-e 'Abbas — theme system
   Two axes:
     html[data-mode="light"|"dark"]          — user/system choice
     html[data-occasion="neutral"|"mourning"|"celebration"]
   Mourning forces dark surfaces (the digital black drape).
   ============================================================ */

:root {
  --font-display: "Playfair Display", Georgia, serif;
  --font-body: "Inter", -apple-system, "Segoe UI", sans-serif;
  --font-arabic: "Amiri", serif;
  --radius: 14px;
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
  --maxw: 1140px;
  --header-h: 72px;
}

/* ---------- Neutral (default) ---------- */
html[data-mode="light"] {
  --bg: #faf7f1;
  --bg-soft: #f1ece2;
  --card: #ffffff;
  --text: #211d19;
  --muted: #6b6258;
  --border: #e6dfd2;
  --accent: #9f1239;        /* DA logo red */
  --accent-soft: #fdeef2;
  --gold: #a8842c;
  --gold-soft: #f7efdb;
  --hero-a: #2a1318;
  --hero-b: #5d1228;
  --on-accent: #ffffff;
}
html[data-mode="dark"] {
  --bg: #131214;
  --bg-soft: #1a191c;
  --card: #1f1d21;
  --text: #eae5dd;
  --muted: #a39c91;
  --border: #2e2b30;
  --accent: #e0526e;
  --accent-soft: #34141d;
  --gold: #d4af37;
  --gold-soft: #2a2415;
  --hero-a: #18090d;
  --hero-b: #3d0c1d;
  --on-accent: #ffffff;
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.45);
}

/* ---------- Celebration overrides ---------- */
html[data-occasion="celebration"][data-mode="light"] {
  --accent: #047857;
  --accent-soft: #e7f6ef;
  --hero-a: #062e22;
  --hero-b: #0b5e42;
}
html[data-occasion="celebration"][data-mode="dark"] {
  --accent: #34d399;
  --accent-soft: #0c2b20;
  --hero-a: #04150f;
  --hero-b: #0a3d2c;
  --on-accent: #04150f;
}

/* ---------- Mourning: always dark, silver + deep red ---------- */
html[data-occasion="mourning"] {
  --bg: #0a0a0c;
  --bg-soft: #101013;
  --card: #151518;
  --text: #d9d6d1;
  --muted: #8b8780;
  --border: #26262b;
  --accent: #b91c1c;
  --accent-soft: #220c0c;
  --gold: #9ca3af;          /* silver replaces gold in grief */
  --gold-soft: #1c1d21;
  --hero-a: #050506;
  --hero-b: #1c0a0d;
  --on-accent: #ffffff;
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
}

/* ============================================================ */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  transition: background 0.5s ease, color 0.5s ease;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 700; line-height: 1.2; }
.section { padding: 64px 0; }
.section-title { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 8px; }
.section-sub { color: var(--muted); margin-bottom: 32px; max-width: 640px; }
.eyebrow {
  display: inline-block; font-size: 0.78rem; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--gold); font-weight: 600; margin-bottom: 10px;
}

/* ---------- Announcement bar ---------- */
.announce {
  background: var(--accent); color: var(--on-accent);
  text-align: center; padding: 9px 16px; font-size: 0.9rem; font-weight: 500;
}
.announce a { color: inherit; text-decoration: underline; }

/* ---------- LIVE banner (channel is broadcasting) ---------- */
.live-bar {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  background: #c50f1f; color: #fff !important; text-decoration: none !important;
  padding: 9px 16px; font-weight: 700; font-size: 0.9rem; letter-spacing: 0.02em;
}
.live-bar:hover { background: #e11d2a; }
.live-bar .live-arrow { transition: transform 0.15s ease; }
.live-bar:hover .live-arrow { transform: translateX(3px); }
.live-bar .live-dot { background: #fff; margin-right: 0; }
.nav-live { display: inline-flex !important; align-items: center; gap: 6px; color: var(--accent) !important; font-weight: 700; }
.nav-live .live-dot { background: #e11d2a; margin-right: 0; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
}
.header-inner { display: flex; align-items: center; gap: 18px; width: 100%; }
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none !important; flex-shrink: 0; }
.brand-logo { height: 40px; width: 40px; object-fit: contain; flex-shrink: 0; }
.brand-text { display: flex; flex-direction: column; justify-content: center; line-height: 1.25; min-width: 0; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 50%;
  background: linear-gradient(140deg, var(--hero-b), var(--hero-a));
  color: #fff; display: grid; place-items: center;
  font-family: var(--font-arabic); font-size: 1.35rem; line-height: 1;
  border: 1.5px solid var(--gold);
}
.brand-name { font-family: var(--font-display); font-size: 1.08rem; color: var(--text); font-weight: 700; white-space: nowrap; }
.brand-sub { font-size: 0.6rem; color: var(--muted); letter-spacing: 0.14em; text-transform: uppercase; white-space: nowrap; margin-top: 1px; }
@media (max-width: 520px) {
  .brand-sub { display: none; }
  .brand-logo { height: 36px; width: 36px; }
}
.nav { margin-left: auto; display: flex; align-items: center; gap: 2px; }
.nav a {
  color: var(--text); font-size: 0.88rem; font-weight: 500;
  padding: 8px 9px; border-radius: 8px; text-decoration: none !important;
  white-space: nowrap;
}
.nav a:hover { background: var(--bg-soft); }
.nav a.active { color: var(--accent); font-weight: 600; }
.nav .btn-donate {
  background: var(--accent); color: var(--on-accent); margin-left: 6px;
}
.nav .btn-donate:hover { filter: brightness(1.1); background: var(--accent); }
.mode-btn {
  border: 1px solid var(--border); background: var(--card); color: var(--text);
  width: 38px; height: 38px; border-radius: 50%; cursor: pointer;
  display: grid; place-items: center; font-size: 1rem; margin-left: 8px;
}
.menu-btn { display: none; }

/* ---------- "Coming soon" nav / footer items ---------- */
.nav-soon {
  color: var(--muted); font-size: 0.88rem; font-weight: 500;
  padding: 8px 9px; white-space: nowrap; cursor: default;
  display: inline-flex; align-items: center; gap: 6px;
}
.nav-soon em, .footer-soon em {
  font-style: normal; font-size: 0.6rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.05em;
  background: var(--gold-soft); color: var(--gold);
  padding: 2px 6px; border-radius: 99px;
}
.footer-soon { color: var(--muted); display: inline-flex; align-items: center; gap: 6px; cursor: default; }

/* ---------- Live alerts (bell + dropdown) ---------- */
.alert-bell-wrap { position: relative; margin-left: 8px; flex-shrink: 0; }
.alert-bell {
  position: relative; border: 1px solid var(--border); background: var(--card); color: var(--text);
  width: 38px; height: 38px; border-radius: 50%; cursor: pointer;
  display: grid; place-items: center;
}
.alert-bell:hover { background: var(--bg-soft); }
.alert-badge {
  position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: var(--accent); color: var(--on-accent);
  font-size: 0.68rem; font-weight: 700; line-height: 1; display: grid; place-items: center;
  border: 2px solid var(--bg);
}
.alert-panel {
  position: absolute; top: calc(100% + 10px); right: 0; width: min(340px, 92vw);
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); z-index: 60; overflow: hidden;
}
.alert-panel-head {
  padding: 11px 16px; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted);
  background: var(--bg-soft); border-bottom: 1px solid var(--border);
}
.alert-list { max-height: 64vh; overflow-y: auto; }
.alert-item {
  display: flex; gap: 11px; padding: 13px 16px;
  border-bottom: 1px solid var(--border); border-left: 3px solid var(--gold);
}
.alert-item:last-child { border-bottom: none; }
.alert-traffic { border-left-color: var(--accent); }
.alert-parking { border-left-color: var(--gold); }
.alert-general { border-left-color: var(--muted); }
.alert-ico { font-size: 1.05rem; line-height: 1.35; flex-shrink: 0; }
.alert-body { min-width: 0; }
.alert-cat {
  font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em;
  color: var(--muted); display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap;
}
.alert-until { font-weight: 500; text-transform: none; letter-spacing: 0; }
.alert-text { font-size: 0.9rem; color: var(--text); margin-top: 4px; line-height: 1.45; }

/* ---------- Hero ---------- */
.hero {
  position: relative; color: #f3efe8; overflow: hidden;
  background: linear-gradient(150deg, var(--hero-a), var(--hero-b));
  padding: 84px 0 72px;
}
/* Shrine photograph — now given real prominence, with a scrim for legibility */
.hero .hero-photo {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image: url("../files/shrine-hero.jpg");
  background-size: cover; background-position: center 26%;
  opacity: 0.72;
}
/* Very slow Ken Burns drift — motion without video weight, and off for users
   who prefer reduced motion (and during mourning). */
@media (prefers-reduced-motion: no-preference) {
  .hero .hero-photo { animation: heroPan 32s ease-in-out infinite alternate; }
}
@keyframes heroPan { from { transform: scale(1.02); } to { transform: scale(1.1); } }
/* Legibility scrim: darken the left + bottom where the text sits, keep the
   shrine visible toward the top-right. */
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(95deg, color-mix(in srgb, var(--hero-a) 94%, transparent) 0%, color-mix(in srgb, var(--hero-a) 58%, transparent) 44%, transparent 80%),
    linear-gradient(0deg, color-mix(in srgb, var(--hero-a) 82%, transparent) 0%, transparent 54%);
}
html[data-occasion="mourning"] .hero .hero-photo { opacity: 0.5; filter: grayscale(1) brightness(0.6); animation: none; }
html[data-occasion="celebration"] .hero .hero-photo { opacity: 0.8; }

/* Shrine feature panel */
.shrine-panel {
  position: relative; border-radius: var(--radius); overflow: hidden;
  min-height: 380px; display: flex; align-items: flex-end;
  background: linear-gradient(150deg, var(--hero-a), var(--hero-b));
  box-shadow: var(--shadow);
}
.shrine-panel img.photo {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
html[data-occasion="mourning"] .shrine-panel img.photo { filter: grayscale(0.85) brightness(0.75); }
.shrine-panel .overlay {
  position: relative; z-index: 1; width: 100%; padding: 28px;
  background: linear-gradient(transparent, rgba(0,0,0,0.30) 28%, rgba(0,0,0,0.88));
  color: #f3efe8;
}
.shrine-panel .salam {
  font-family: var(--font-arabic); font-size: clamp(1.35rem, 2.7vw, 2rem);
  color: var(--gold); margin-bottom: 10px; line-height: 1.85;
  display: inline-block; padding: 8px 18px; border-radius: 12px;
  background: rgba(14,7,9,0.55);
  border: 1px solid color-mix(in srgb, var(--gold) 45%, transparent);
  backdrop-filter: blur(4px);
  text-shadow: 0 1px 5px rgba(0,0,0,0.95);
}
html[data-occasion="mourning"] .shrine-panel .salam {
  color: #e7e7ea; border-color: rgba(255,255,255,0.28);
}
.shrine-panel .salam-tr { font-size: 0.9rem; opacity: 0.95; text-shadow: 0 1px 3px rgba(0,0,0,0.9); }
.shrine-panel .credit { font-size: 0.68rem; opacity: 0.6; margin-top: 10px; text-shadow: 0 1px 2px rgba(0,0,0,0.85); }
.shrine-panel .credit a { color: inherit; }
.hero::after {  /* subtle geometric lattice */
  content: ""; position: absolute; inset: 0; z-index: 1; opacity: 0.06; pointer-events: none;
  background-image:
    repeating-linear-gradient(45deg, #fff 0 1px, transparent 1px 26px),
    repeating-linear-gradient(-45deg, #fff 0 1px, transparent 1px 26px);
}
.hero-inner { position: relative; z-index: 2; max-width: 760px; }
.hero .bismillah {
  font-family: var(--font-arabic); font-size: 1.7rem; color: var(--gold);
  margin-bottom: 18px; opacity: 0.95;
}
/* ---------- Building-fund band ---------- */
.buildfund {
  background: var(--gold-soft); border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border); padding: 38px 0;
}
.buildfund-inner { display: flex; align-items: center; gap: 30px; flex-wrap: wrap; }
.buildfund-img {
  width: 250px; max-width: 100%; border-radius: 12px; flex-shrink: 0;
  box-shadow: var(--shadow);
}
.buildfund-body { flex: 1; min-width: 260px; }
.buildfund-title { font-size: clamp(1.4rem, 3vw, 1.95rem); margin: 4px 0 8px; }
.buildfund-body p { color: var(--muted); margin-bottom: 16px; max-width: 580px; }
@media (max-width: 700px) {
  .buildfund { padding: 30px 0; }
  .buildfund-img { width: 100%; }
}

.hero h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); margin-bottom: 16px; }
.hero p.lead { font-size: 1.08rem; opacity: 0.88; max-width: 600px; margin-bottom: 28px; }
.hero-badges { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 30px; }
.badge {
  border: 1px solid rgba(255,255,255,0.25); border-radius: 99px;
  padding: 6px 14px; font-size: 0.82rem; backdrop-filter: blur(4px);
}
.badge strong { color: var(--gold); }
.btn {
  display: inline-block; padding: 13px 26px; border-radius: 10px;
  font-weight: 600; font-size: 0.95rem; cursor: pointer; border: none;
  text-decoration: none !important; transition: transform 0.15s ease, filter 0.15s ease;
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.08); }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-ghost { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,0.4); }
.btn-gold { background: var(--gold); color: #1c1408; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }

/* occasion ribbon */
.occasion-ribbon {
  display: none; align-items: center; gap: 10px;
  margin: 0 0 22px; padding: 10px 16px; border-radius: 10px;
  font-size: 0.92rem; border: 1px solid;
}
html[data-occasion="mourning"] .occasion-ribbon.mourning,
html[data-occasion="celebration"] .occasion-ribbon.celebration { display: inline-flex; }
.occasion-ribbon.mourning { background: rgba(0,0,0,0.45); border-color: #3f3f46; color: #d4d4d8; }
.occasion-ribbon.celebration { background: rgba(255,255,255,0.1); border-color: var(--gold); color: #fff; }

/* ---------- Cards / grids ---------- */
.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow);
}
.card h3 { font-size: 1.15rem; margin-bottom: 10px; }
.card .icon { font-size: 1.6rem; margin-bottom: 14px; display: block; }
.card p { color: var(--muted); font-size: 0.94rem; }
.card a.more { display: inline-block; margin-top: 14px; font-weight: 600; font-size: 0.9rem; }

/* ---------- Prayer times widget ---------- */
.prayer-strip {
  margin-top: -38px; position: relative; z-index: 5;
}
.prayer-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 22px 26px;
  display: flex; align-items: center; gap: 26px; flex-wrap: wrap;
}
.prayer-meta { min-width: 210px; }
.prayer-meta .greg { font-weight: 600; }
.prayer-meta .hijri { color: var(--accent); font-weight: 700; font-size: 1.02rem; }
.prayer-meta .loc { color: var(--muted); font-size: 0.8rem; margin-top: 2px; }
.prayer-times { display: flex; gap: 8px; flex: 1; flex-wrap: wrap; }
.ptime {
  flex: 1; min-width: 86px; text-align: center; padding: 10px 8px;
  border-radius: 10px; background: var(--bg-soft); border: 1px solid var(--border);
}
.ptime.next { background: var(--accent-soft); border-color: var(--accent); }
.ptime .label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.ptime.next .label { color: var(--accent); font-weight: 700; }
.ptime .time { font-weight: 700; font-size: 1.02rem; margin-top: 2px; }

/* ---------- Events ---------- */
.event-list { display: grid; gap: 12px; }
.event-row {
  display: grid; grid-template-columns: 92px 1fr auto; gap: 18px; align-items: center;
  background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 16px 20px;
}
.event-date {
  text-align: center; border-right: 2px solid var(--border); padding-right: 16px;
}
.event-date .d { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; color: var(--accent); line-height: 1; }
.event-date .m { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
.event-body .title { font-weight: 600; }
.event-body .meta { font-size: 0.85rem; color: var(--muted); margin-top: 2px; }
.event-hijri {
  font-size: 0.8rem; color: var(--gold); font-weight: 600; white-space: nowrap;
  background: var(--gold-soft); padding: 5px 12px; border-radius: 99px;
}
.countdown-box {
  background: linear-gradient(150deg, var(--hero-a), var(--hero-b)); color: #f3efe8;
  border-radius: var(--radius); padding: 30px; text-align: center; margin-bottom: 28px;
}
.countdown-box .next-title { font-family: var(--font-display); font-size: 1.3rem; margin: 6px 0 14px; }
.countdown { display: flex; gap: 14px; justify-content: center; }
.cd-unit { min-width: 70px; background: rgba(255,255,255,0.1); border-radius: 10px; padding: 10px; }
.cd-unit .n { font-size: 1.6rem; font-weight: 700; font-family: var(--font-display); }
.cd-unit .l { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em; opacity: 0.8; }

/* ---------- Live ---------- */
.video-wrap {
  position: relative; padding-top: 56.25%; border-radius: var(--radius);
  overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow); background: #000;
}
.video-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.live-dot {
  display: inline-block; width: 9px; height: 9px; border-radius: 50%;
  background: #ef4444; margin-right: 8px; animation: pulse 1.6s infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }

/* ---------- Tables / prose ---------- */
.prose p { margin-bottom: 16px; }
.prose ul { margin: 0 0 16px 22px; }
.prose strong { color: var(--text); }
table.simple { width: 100%; border-collapse: collapse; font-size: 0.93rem; }
table.simple th, table.simple td { padding: 11px 14px; border-bottom: 1px solid var(--border); text-align: left; }
table.simple th { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }

/* ---------- Footer ---------- */
.site-footer {
  margin-top: 72px; border-top: 1px solid var(--border); background: var(--bg-soft);
  padding: 48px 0 28px; font-size: 0.9rem;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.4fr; gap: 32px; margin-bottom: 30px; }
.site-footer h4 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 12px; color: var(--muted); }
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 7px; }
.site-footer a { color: var(--text); }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 18px; color: var(--muted); font-size: 0.8rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }

/* ---------- Page hero (inner pages) ---------- */
.page-hero {
  background: linear-gradient(150deg, var(--hero-a), var(--hero-b));
  color: #f3efe8; padding: 56px 0 48px;
}
.page-hero h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.page-hero p { opacity: 0.85; margin-top: 8px; max-width: 640px; }

/* ---------- Forms / admin ---------- */
input, textarea, select {
  width: 100%; padding: 11px 14px; border-radius: 9px; border: 1px solid var(--border);
  background: var(--bg); color: var(--text); font-family: inherit; font-size: 0.93rem;
}
label { font-size: 0.82rem; font-weight: 600; display: block; margin: 14px 0 5px; color: var(--muted); }
.admin-table td input { padding: 7px 9px; font-size: 0.85rem; }
.toast {
  position: fixed; bottom: 24px; right: 24px; z-index: 99;
  background: var(--text); color: var(--bg); padding: 13px 20px; border-radius: 10px;
  font-size: 0.9rem; box-shadow: var(--shadow); opacity: 0; transform: translateY(8px);
  transition: all 0.25s ease; pointer-events: none;
}
.toast.show { opacity: 1; transform: none; }

/* ---------- Mobile quick-action bar ---------- */
.mobile-actions { display: none; }
@media (max-width: 700px) {
  body { padding-bottom: calc(62px + env(safe-area-inset-bottom, 0px)); }
  .mobile-actions {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 80;
    background: var(--card); border-top: 1px solid var(--border);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.12);
  }
  .ma-item {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
    padding: 9px 4px 8px; text-decoration: none !important;
    color: var(--muted); font-size: 0.66rem; font-weight: 600;
  }
  .ma-item.active { color: var(--accent); }
  .ma-ico svg { width: 22px; height: 22px; display: block; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1340px) {
  .nav {
    position: fixed; inset: var(--header-h) 0 auto 0; flex-direction: column;
    background: var(--bg); border-bottom: 1px solid var(--border);
    padding: 14px 20px 20px; display: none; align-items: stretch;
    box-shadow: var(--shadow);
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px; font-size: 0.95rem; }
  .menu-btn {
    display: grid; place-items: center; margin-left: auto;
    border: 1px solid var(--border); background: var(--card); color: var(--text);
    width: 38px; height: 38px; border-radius: 9px; cursor: pointer; font-size: 1.1rem;
  }
  .mode-btn { margin-left: 0; }
}
@media (max-width: 900px) {
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .event-row { grid-template-columns: 70px 1fr; }
  .event-hijri { display: none; }
}
