:root{
  --bg:#0a0f1c;
  --bg-elevated:#111a2e;
  --bg-card:#16213a;
  --bg-card-hover:#1c2a47;
  --gold:#f2b84b;
  --gold-soft:#f7d68a;
  --ember:#e2793d;
  --text:#f1efe6;
  --text-dim:#98a2b8;
  --text-faint:#616d85;
  --border:rgba(242,184,75,0.14);
  --border-strong:rgba(242,184,75,0.32);
  --radius:14px;
  --shadow:0 20px 50px -20px rgba(0,0,0,0.6);
}
[data-theme="light"]{
  --bg:#f7f4ec;
  --bg-elevated:#ffffff;
  --bg-card:#ffffff;
  --bg-card-hover:#fdf7e9;
  --text:#1c1f27;
  --text-dim:#5a6376;
  --text-faint:#8891a3;
  --border:rgba(160,110,20,0.16);
  --border-strong:rgba(160,110,20,0.34);
  --shadow:0 20px 40px -24px rgba(60,40,0,0.25);
}
*{box-sizing:border-box; margin:0; padding:0;}
html,body{height:100%;}
body{
  background:var(--bg);
  color:var(--text);
  font-family:'Inter',sans-serif;
  -webkit-font-smoothing:antialiased;
  transition:background .35s ease, color .35s ease;
  padding-bottom:74px;
}
h1,h2,h3,.display{ font-family:'Fraunces',serif; letter-spacing:-0.01em; }
.mono{ font-family:'JetBrains Mono',monospace; }
a{color:inherit;}
button{font-family:inherit; cursor:pointer;}
::selection{ background:var(--gold); color:#161616; }

/* ---------- TOP BAR ---------- */
.topbar{
  position:sticky; top:0; z-index:40;
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 18px;
  background:rgba(10,15,28,0.82);
  backdrop-filter:blur(14px);
  border-bottom:1px solid var(--border);
}
[data-theme="light"] .topbar{ background:rgba(247,244,236,0.85); }
.brand{ display:flex; align-items:center; gap:10px; }
.logo{ width:38px; height:38px; flex:none; }
.brand-name{ font-size:15px; font-weight:600; line-height:1.15; }
.brand-name small{ display:block; font-size:10px; font-weight:400; color:var(--text-dim); letter-spacing:.08em; text-transform:uppercase; }
.icon-btn{
  width:40px; height:40px; border-radius:50%;
  border:1px solid var(--border); background:var(--bg-card);
  color:var(--text); display:flex; align-items:center; justify-content:center;
  font-size:18px; transition:.2s;
}
.icon-btn:hover{ border-color:var(--border-strong); background:var(--bg-card-hover); }
.topbar-right{ display:flex; gap:8px; align-items:center; }
.user-chip{
  display:flex; align-items:center; gap:6px;
  font-size:12px; padding:6px 10px; border-radius:20px;
  background:var(--bg-card); border:1px solid var(--border);
}
.admin-tag{ background:var(--gold); color:#191305; font-weight:700; font-size:9px; padding:2px 6px; border-radius:8px; text-transform:uppercase; letter-spacing:.05em; }

/* ---------- DRAWER ---------- */
.overlay{
  position:fixed; inset:0; background:rgba(0,0,0,0.55); z-index:49;
  opacity:0; pointer-events:none; transition:opacity .3s;
}
.overlay.open{ opacity:1; pointer-events:auto; }
.drawer{
  position:fixed; top:0; right:0; height:100%; width:min(340px, 86vw);
  background:var(--bg-elevated); z-index:50;
  transform:translateX(100%); transition:transform .35s cubic-bezier(.2,.8,.2,1);
  overflow-y:auto; border-left:1px solid var(--border);
  padding:20px 16px 100px;
}
.drawer.open{ transform:translateX(0); }
.drawer-head{ display:flex; justify-content:space-between; align-items:center; margin-bottom:18px; }
.drawer-head h2{ font-size:18px; }
.nav-group-label{
  font-size:10px; text-transform:uppercase; letter-spacing:.12em;
  color:var(--text-faint); margin:18px 6px 8px; font-weight:600;
}
.nav-item{
  display:flex; align-items:center; gap:12px;
  padding:11px 12px; border-radius:10px; font-size:14px; font-weight:500;
  color:var(--text-dim); transition:.15s;
}
.nav-item:hover{ background:var(--bg-card); color:var(--text); }
.nav-item.active{ background:var(--bg-card); color:var(--gold); border:1px solid var(--border); }
.nav-item .em{ font-size:16px; width:20px; text-align:center; }

/* ---------- BOTTOM TABS ---------- */
.tabbar{
  position:fixed; bottom:0; left:0; right:0; z-index:41;
  display:flex; justify-content:space-around;
  background:rgba(10,15,28,0.92); backdrop-filter:blur(14px);
  border-top:1px solid var(--border); padding:8px 6px 10px;
}
[data-theme="light"] .tabbar{ background:rgba(255,255,255,0.92); }
.tab{
  display:flex; flex-direction:column; align-items:center; gap:3px;
  font-size:10px; color:var(--text-faint); font-weight:600; flex:1;
  padding:4px 0; border-radius:10px;
}
.tab .em{ font-size:19px; }
.tab.active{ color:var(--gold); }

/* ---------- MAIN ---------- */
main{ max-width:760px; margin:0 auto; padding:20px 16px 40px; }
.section-title{ font-size:26px; margin-bottom:6px; }
.section-sub{ color:var(--text-dim); font-size:14px; margin-bottom:22px; line-height:1.6; }
.card{
  background:var(--bg-card); border:1px solid var(--border); border-radius:var(--radius);
  padding:18px; margin-bottom:14px; box-shadow:var(--shadow);
}
.card h3{ font-size:16px; margin-bottom:6px; }
.card p{ color:var(--text-dim); font-size:13.5px; line-height:1.6; }
.grid-2{ display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.grid-3{ display:grid; grid-template-columns:repeat(3,1fr); gap:10px; }
.pill{
  display:inline-flex; align-items:center; gap:6px; font-size:11.5px; font-weight:600;
  padding:4px 10px; border-radius:20px; background:rgba(242,184,75,0.12); color:var(--gold-soft);
  border:1px solid var(--border);
}
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  padding:12px 18px; border-radius:10px; font-weight:600; font-size:14px;
  border:none; transition:.2s;
}
.btn-primary{ background:linear-gradient(135deg,var(--gold),var(--ember)); color:#181205; }
.btn-primary:hover{ filter:brightness(1.08); transform:translateY(-1px); }
.btn-ghost{ background:transparent; border:1px solid var(--border-strong); color:var(--text); }
.btn-ghost:hover{ background:var(--bg-card); }
.btn-block{ width:100%; }
.btn-sm{ padding:8px 12px; font-size:12.5px; }

/* HERO */
.hero{
  position:relative; overflow:hidden; border-radius:20px; padding:42px 22px 30px;
  background:radial-gradient(120% 100% at 50% 0%, #17223f 0%, #0a0f1c 65%);
  border:1px solid var(--border); margin-bottom:22px; text-align:center;
}
.hero svg.rays{ position:absolute; top:-40px; left:50%; transform:translateX(-50%); width:520px; max-width:160%; opacity:.55; }
.hero-content{ position:relative; z-index:2; }
.hero .motto{ font-size:24px; line-height:1.3; margin:14px 0 6px; }
.hero .motto em{ font-style:normal; color:var(--gold); }
.hero .verse{ color:var(--text-dim); font-size:13px; margin-bottom:22px; }
.hero-actions{ display:flex; gap:10px; justify-content:center; flex-wrap:wrap; }
@keyframes pulseGlow{ 0%,100%{opacity:.4;} 50%{opacity:.85;} }
.beam{ animation:pulseGlow 5s ease-in-out infinite; }
.beam:nth-child(2){ animation-delay:1.1s; }
.beam:nth-child(3){ animation-delay:2.2s; }
.star{ animation:pulseGlow 3.6s ease-in-out infinite; }

/* schedule table */
.sched{ width:100%; border-collapse:collapse; font-size:13.5px; }
.sched th{ text-align:left; color:var(--text-faint); font-weight:600; font-size:11px; text-transform:uppercase; letter-spacing:.06em; padding-bottom:8px; }
.sched td{ padding:10px 0; border-top:1px solid var(--border); }
.sched .day{ font-weight:600; }
.sched .time{ color:var(--gold-soft); }

/* donation */
.acc-row{
  display:flex; justify-content:space-between; align-items:center;
  padding:12px 0; border-top:1px solid var(--border);
}
.acc-row:first-of-type{ border-top:none; }
.acc-bank{ font-size:13.5px; font-weight:600; }
.acc-num{ font-size:12.5px; color:var(--text-dim); }
.copy-btn{
  background:var(--bg-elevated); border:1px solid var(--border); color:var(--gold-soft);
  border-radius:8px; padding:6px 10px; font-size:11.5px; font-weight:600;
}
.copy-btn:hover{ border-color:var(--border-strong); }
.qr-box{
  width:120px; height:120px; border-radius:10px; margin:0 auto 14px;
  background:repeating-linear-gradient(45deg, var(--gold) 0 6px, transparent 6px 12px),
             repeating-linear-gradient(-45deg, var(--gold) 0 6px, transparent 6px 12px);
  background-blend-mode:multiply; opacity:.85; position:relative;
}
.qr-box::after{ content:'QR'; position:absolute; inset:0; display:flex; align-items:center; justify-content:center;
  background:var(--bg-card); font-size:11px; color:var(--text-dim); border-radius:8px; margin:38px; font-weight:700; letter-spacing:.05em; }

/* forms */
.field{ margin-bottom:14px; }
.field label{ display:block; font-size:12.5px; font-weight:600; color:var(--text-dim); margin-bottom:6px; }
.field input, .field textarea, .field select{
  width:100%; padding:11px 13px; border-radius:10px; border:1px solid var(--border);
  background:var(--bg-elevated); color:var(--text); font-size:14px; font-family:inherit;
}
.field textarea{ min-height:100px; resize:vertical; }
.field input:focus, .field textarea:focus, .field select:focus{ outline:2px solid var(--gold); outline-offset:1px; }

/* accordion */
.faq-item{ border-top:1px solid var(--border); }
.faq-item:first-child{ border-top:none; }
.faq-q{ padding:14px 2px; display:flex; justify-content:space-between; align-items:center; font-size:14px; font-weight:600; }
.faq-a{ max-height:0; overflow:hidden; transition:max-height .3s ease; color:var(--text-dim); font-size:13.5px; line-height:1.6; }
.faq-item.open .faq-a{ max-height:200px; padding-bottom:14px; }
.faq-caret{ transition:.25s; color:var(--gold); }
.faq-item.open .faq-caret{ transform:rotate(45deg); }

/* gallery placeholders */
.tile{
  aspect-ratio:1; border-radius:10px; display:flex; align-items:center; justify-content:center;
  font-size:22px; background:linear-gradient(150deg, var(--bg-card), var(--bg-elevated));
  border:1px solid var(--border);
}

/* media rows */
.media-row{ display:flex; align-items:center; gap:12px; padding:11px 0; border-top:1px solid var(--border); }
.media-row:first-of-type{ border-top:none; }
.media-ico{ width:38px; height:38px; border-radius:9px; background:var(--bg-elevated); display:flex; align-items:center; justify-content:center; font-size:16px; flex:none; }
.media-title{ font-size:13.5px; font-weight:600; }
.media-sub{ font-size:11.5px; color:var(--text-faint); }
.media-play{ margin-left:auto; width:32px; height:32px; border-radius:50%; background:var(--gold); color:#181205; display:flex; align-items:center; justify-content:center; font-size:13px; border:none; flex:none;}

/* toggle */
.toggle-row{ display:flex; justify-content:space-between; align-items:center; padding:14px 0; border-top:1px solid var(--border); }
.toggle-row:first-of-type{ border-top:none; }
.switch{ width:44px; height:24px; border-radius:20px; background:var(--bg-elevated); border:1px solid var(--border); position:relative; flex:none; }
.switch::after{ content:''; position:absolute; top:2px; left:2px; width:18px; height:18px; border-radius:50%; background:var(--text-faint); transition:.2s; }
.switch.on{ background:rgba(242,184,75,.25); border-color:var(--border-strong); }
.switch.on::after{ transform:translateX(20px); background:var(--gold); }

/* modal */
.modal-back{ position:fixed; inset:0; background:rgba(0,0,0,.6); z-index:60; display:none; align-items:center; justify-content:center; padding:20px; }
.modal-back.open{ display:flex; }
.modal{
  background:var(--bg-elevated); border:1px solid var(--border-strong); border-radius:16px;
  width:100%; max-width:380px; padding:24px; max-height:88vh; overflow-y:auto;
}
.modal h3{ margin-bottom:4px; font-size:19px; }
.modal .hint{ font-size:12px; color:var(--text-faint); margin-bottom:16px; }
.modal-close{ float:right; background:none; border:none; color:var(--text-dim); font-size:18px; }

.toast{
  position:fixed; bottom:90px; left:50%; transform:translateX(-50%) translateY(20px);
  background:var(--gold); color:#181205; padding:11px 18px; border-radius:30px;
  font-size:13px; font-weight:700; z-index:70; opacity:0; pointer-events:none; transition:.25s;
}
.toast.show{ opacity:1; transform:translateX(-50%) translateY(0); }

.social-grid{ display:grid; grid-template-columns:repeat(4,1fr); gap:10px; text-align:center;}
.social-grid a{ background:var(--bg-card); border:1px solid var(--border); border-radius:12px; padding:14px 4px; font-size:20px; display:block; }
.social-grid span{ display:block; font-size:10px; margin-top:6px; color:var(--text-dim); }

.tag-row{ display:flex; gap:8px; flex-wrap:wrap; margin-top:10px; }
::-webkit-scrollbar{ width:6px; } ::-webkit-scrollbar-thumb{ background:var(--border-strong); border-radius:4px; }
@media (min-width:600px){ .tabbar{ display:none; } body{ padding-bottom:0; } }
