/* Brighton Vinayaka Chavithi 2026 */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@500;700;900&family=Cinzel+Decorative:wght@700;900&family=Great+Vibes&family=Cormorant+Garamond:ital,wght@0,500;0,600;0,700;1,500&family=Noto+Serif+Telugu:wght@500;700&display=swap');

:root {
  --maroon: #4a0d10;
  --maroon-2: #6b1a14;
  --gold: #c9962e;
  --gold-bright: #f0c75e;
  --gold-pale: #e9d9a8;
  --green: #14452a;
  --green-2: #1d5c38;
  --cream: #fdf6e0;
  --cream-2: #f7ecc9;
  --ink: #3a2410;
  --shadow: 0 4px 18px rgba(74, 13, 16, .18);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.15rem;
  color: var(--ink);
  background: var(--cream);
  background-image:
    radial-gradient(circle at 15% 10%, rgba(240, 199, 94, .25), transparent 40%),
    radial-gradient(circle at 85% 90%, rgba(201, 150, 46, .18), transparent 45%),
    repeating-linear-gradient(45deg, transparent 0 34px, rgba(201, 150, 46, .045) 34px 35px);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---------- header / nav ---------- */
header.site {
  background: linear-gradient(160deg, var(--maroon) 0%, var(--maroon-2) 60%, #7d2b16 100%);
  color: var(--gold-pale);
  border-bottom: 4px solid var(--gold);
  box-shadow: var(--shadow);
}
.site-inner {
  max-width: 1050px; margin: 0 auto; padding: .9rem 1.2rem;
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: inherit; }
.brand .om {
  font-size: 1.9rem; line-height: 1; color: var(--gold-bright);
  text-shadow: 0 0 12px rgba(240, 199, 94, .6);
  font-family: 'Noto Serif Telugu', serif;
}
.brand-name { font-family: 'Cinzel', serif; font-weight: 700; font-size: 1.15rem; letter-spacing: .12em; }
.brand-name small { display: block; font-family: 'Great Vibes', cursive; font-size: 1.05rem; letter-spacing: .05em; color: var(--gold-bright); text-transform: none; }
nav.main { margin-left: auto; display: flex; gap: .3rem; flex-wrap: wrap; }
nav.main a {
  font-family: 'Cinzel', serif; font-size: .82rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--gold-pale); text-decoration: none; padding: .55rem .9rem; border-radius: 6px;
  border: 1px solid transparent; transition: all .2s;
}
nav.main a:hover { color: var(--gold-bright); border-color: rgba(240,199,94,.4); }
nav.main a.active { background: rgba(240,199,94,.14); border-color: var(--gold); color: var(--gold-bright); }

.admin-chip {
  font-family: 'Cinzel', serif; font-size: .72rem; letter-spacing: .1em; cursor: pointer;
  background: transparent; color: var(--gold-pale); border: 1px solid rgba(240,199,94,.45);
  padding: .45rem .8rem; border-radius: 999px; transition: all .2s;
}
.admin-chip:hover { background: rgba(240,199,94,.15); color: var(--gold-bright); }
.admin-chip.on { background: var(--gold); color: var(--maroon); border-color: var(--gold); font-weight: 700; }

/* ---------- layout ---------- */
main { flex: 1; width: 100%; max-width: 1050px; margin: 0 auto; padding: 1.6rem 1.2rem 3rem; }

.page-title {
  font-family: 'Cinzel Decorative', serif; font-weight: 900; color: var(--maroon);
  text-align: center; font-size: clamp(1.6rem, 4.5vw, 2.6rem); margin: 1.2rem 0 .2rem;
}
.page-sub {
  text-align: center; font-family: 'Great Vibes', cursive; color: var(--green-2);
  font-size: clamp(1.4rem, 3.5vw, 2rem); margin-bottom: 1.6rem;
}
.flourish { text-align: center; color: var(--gold); font-size: 1.2rem; letter-spacing: .6em; margin: .4rem 0 1.4rem; }

h2.section {
  font-family: 'Cinzel', serif; color: var(--maroon); font-size: 1.45rem; letter-spacing: .06em;
  margin: 2.4rem 0 1rem; display: flex; align-items: center; gap: .8rem;
}
h2.section::after { content: ''; flex: 1; height: 2px; background: linear-gradient(90deg, var(--gold), transparent); }

/* ---------- cards & tables ---------- */
.card {
  background: #fffdf4; border: 1px solid var(--gold-pale); border-radius: 14px;
  box-shadow: var(--shadow); padding: 1.4rem 1.5rem; margin-bottom: 1.2rem;
}
.card.green { background: linear-gradient(150deg, var(--green) 0%, var(--green-2) 100%); color: var(--cream); border-color: var(--gold); }
.card.green a { color: var(--gold-bright); }

.table-wrap { overflow-x: auto; border-radius: 14px; box-shadow: var(--shadow); border: 1px solid var(--gold-pale); }
table { width: 100%; border-collapse: collapse; background: #fffdf4; min-width: 640px; }
th {
  font-family: 'Cinzel', serif; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase;
  background: var(--maroon); color: var(--gold-pale); padding: .8rem .9rem; text-align: left;
}
td { padding: .75rem .9rem; border-bottom: 1px solid rgba(201,150,46,.25); vertical-align: top; }
tr:nth-child(even) td { background: rgba(247, 236, 201, .45); }
tr:last-child td { border-bottom: none; }
td.item-name { font-weight: 700; font-size: 1.15rem; color: var(--maroon-2); }

.claim-tag {
  display: inline-block; background: rgba(29,92,56,.1); border: 1px solid rgba(29,92,56,.35);
  color: var(--green-2); border-radius: 999px; padding: .1rem .65rem; margin: .12rem .2rem .12rem 0;
  font-size: .95rem; font-weight: 600; white-space: nowrap;
}
.claim-tag small { color: #6b7f60; font-weight: 500; }
.claim-tag .x { cursor: pointer; color: #a33; margin-left: .3rem; font-weight: 700; }

/* ---------- buttons & forms ---------- */
.btn {
  font-family: 'Cinzel', serif; font-size: .8rem; letter-spacing: .1em; cursor: pointer;
  border-radius: 8px; padding: .55rem 1.1rem; border: 1px solid var(--gold);
  background: linear-gradient(160deg, var(--gold-bright), var(--gold)); color: var(--maroon);
  font-weight: 700; transition: transform .15s, box-shadow .15s; text-decoration: none; display: inline-block;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(201,150,46,.5); }
.btn.ghost { background: transparent; color: var(--maroon-2); }
.btn.ghost:hover { background: rgba(201,150,46,.12); }
.btn.danger { background: transparent; border-color: #b34a3a; color: #b34a3a; }
.btn.small { font-size: .68rem; padding: .35rem .7rem; }
.btn.big { font-size: .95rem; padding: .8rem 1.8rem; }

input[type=text], input[type=password], textarea, select {
  font-family: 'Cormorant Garamond', serif; font-size: 1.05rem; color: var(--ink);
  background: #fffef8; border: 1px solid var(--gold); border-radius: 8px; padding: .55rem .7rem; width: 100%;
}
input:focus, textarea:focus { outline: 2px solid rgba(240,199,94,.6); }
label.f { font-family: 'Cinzel', serif; font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--maroon-2); display: block; margin: .6rem 0 .25rem; }

/* ---------- modal ---------- */
.modal-back {
  position: fixed; inset: 0; background: rgba(40, 10, 8, .55); display: none;
  align-items: center; justify-content: center; z-index: 50; padding: 1rem; backdrop-filter: blur(3px);
}
.modal-back.open { display: flex; }
.modal {
  background: var(--cream); border: 2px solid var(--gold); border-radius: 16px;
  max-width: 430px; width: 100%; padding: 1.6rem 1.7rem; box-shadow: 0 12px 40px rgba(0,0,0,.35);
}
.modal h3 { font-family: 'Cinzel', serif; color: var(--maroon); margin-bottom: .3rem; letter-spacing: .05em; }
.modal .hint { font-size: 1rem; color: #7a5b33; font-style: italic; }
.modal .err { color: #a52a1a; font-weight: 700; min-height: 1.3em; margin-top: .4rem; }
.modal .row { display: flex; gap: .6rem; justify-content: flex-end; margin-top: 1.1rem; }

/* ---------- committees ---------- */
.committee-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .9rem; }
.committee-card {
  background: #fffdf4; border: 1px solid var(--gold-pale); border-left: 5px solid var(--gold);
  border-radius: 12px; padding: 1rem 1.1rem; cursor: pointer; transition: all .2s; box-shadow: var(--shadow);
}
.committee-card:hover { transform: translateY(-2px); border-left-color: var(--maroon); }
.committee-card h4 { font-family: 'Cinzel', serif; color: var(--maroon); font-size: 1.02rem; letter-spacing: .04em; }
.committee-card .members { font-size: 1rem; color: #6d552f; font-style: italic; margin-top: .2rem; }
.committee-card .vol-badge {
  display: inline-block; margin-top: .45rem; font-size: .8rem; font-family: 'Cinzel', serif; letter-spacing: .06em;
  background: rgba(29,92,56,.12); border: 1px solid var(--green-2); color: var(--green-2);
  padding: .12rem .6rem; border-radius: 999px;
}
.committee-detail {
  border: 2px solid var(--gold); border-radius: 14px; background: #fffdf4;
  padding: 1.3rem 1.5rem; margin-top: 1rem; box-shadow: var(--shadow);
}
.committee-detail h3 { font-family: 'Cinzel', serif; color: var(--maroon); font-size: 1.4rem; }
.committee-detail .members-line { color: var(--green-2); font-weight: 700; font-size: 1.15rem; margin: .3rem 0 .7rem; }
.committee-detail .vol { background: rgba(29,92,56,.08); border-left: 4px solid var(--green-2); padding: .6rem .9rem; border-radius: 0 8px 8px 0; margin-top: .8rem; }

/* ---------- schedule (home) ---------- */
.hero {
  display: grid; grid-template-columns: minmax(260px, 420px) 1fr; gap: 2rem;
  align-items: center; margin-top: 1rem;
}
.hero img.flyer { width: 100%; border-radius: 18px; border: 3px solid var(--gold); box-shadow: 0 10px 34px rgba(74,13,16,.35); }
.hero-title { font-family: 'Cinzel Decorative', serif; font-weight: 900; color: var(--maroon); font-size: clamp(1.8rem, 4vw, 3rem); line-height: 1.1; }
.hero-script { font-family: 'Great Vibes', cursive; color: var(--green-2); font-size: clamp(2rem, 4.5vw, 3.2rem); line-height: 1; }
.hero .telugu { font-family: 'Noto Serif Telugu', serif; color: var(--maroon-2); font-size: 1.15rem; margin-top: .6rem; }
.date-pill {
  display: inline-block; font-family: 'Cinzel', serif; font-weight: 700; letter-spacing: .1em;
  background: var(--maroon); color: var(--gold-bright); border: 2px solid var(--gold);
  border-radius: 999px; padding: .55rem 1.4rem; margin: .9rem 0; font-size: 1rem;
}
.loc-line { font-size: 1.3rem; font-weight: 700; color: var(--green); }

.day-card {
  background: #fffdf4; border: 1px solid var(--gold-pale); border-radius: 14px; overflow: hidden;
  box-shadow: var(--shadow); margin-bottom: 1rem;
}
.day-card .day-head {
  background: linear-gradient(90deg, var(--maroon), var(--maroon-2)); color: var(--gold-pale);
  font-family: 'Cinzel', serif; letter-spacing: .07em; padding: .65rem 1.2rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: .4rem;
}
.day-card .day-head .tag { color: var(--gold-bright); font-size: .85rem; align-self: center; }
.day-body { display: grid; grid-template-columns: 1fr 1fr; }
.day-body .half { padding: .9rem 1.2rem; }
.day-body .half + .half { border-left: 1px dashed rgba(201,150,46,.5); }
.day-body h5 { font-family: 'Cinzel', serif; font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: var(--green-2); margin-bottom: .3rem; }
.day-body ul { list-style: none; }
.day-body li::before { content: '✦ '; color: var(--gold); }
.day-note { padding: .5rem 1.2rem .8rem; font-style: italic; color: #7a5b33; border-top: 1px solid rgba(201,150,46,.25); }

/* ---------- food page ---------- */
.food-day { margin-bottom: 1.3rem; }
.food-items li { display: flex; align-items: baseline; gap: .6rem; padding: .35rem 0; border-bottom: 1px dotted rgba(201,150,46,.4); list-style: none; }
.food-items li:last-child { border-bottom: none; }
.food-items .fname { font-weight: 700; font-size: 1.15rem; color: var(--maroon-2); }
.food-items .fby { color: var(--green-2); font-style: italic; }
.food-items .fnotes { color: #7a5b33; font-size: 1rem; }
.empty-note { font-style: italic; color: #9a7d4f; padding: .3rem 0; }

/* ---------- rules ---------- */
ol.rules { counter-reset: r; list-style: none; }
ol.rules li { counter-increment: r; position: relative; padding: .5rem 0 .5rem 2.6rem; border-bottom: 1px dotted rgba(201,150,46,.4); }
ol.rules li:last-child { border-bottom: none; }
ol.rules li::before {
  content: counter(r); position: absolute; left: 0; top: .45rem;
  width: 1.7rem; height: 1.7rem; border-radius: 50%; background: var(--gold); color: var(--maroon);
  font-family: 'Cinzel', serif; font-weight: 700; display: flex; align-items: center; justify-content: center; font-size: .85rem;
}

/* ---------- footer ---------- */
footer.site {
  background: var(--green); color: var(--gold-pale); border-top: 4px solid var(--gold);
  text-align: center; padding: 1.4rem 1rem; font-size: 1.05rem;
}
footer.site .script { font-family: 'Great Vibes', cursive; font-size: 1.5rem; color: var(--gold-bright); }
footer.site .telugu { font-family: 'Noto Serif Telugu', serif; font-size: .95rem; opacity: .9; }

.admin-only { display: none; }
body.is-admin .admin-only { display: initial; }
body.is-admin tr.admin-row { display: table-row; }
body.is-admin .admin-block { display: block; }

.toast {
  position: fixed; bottom: 1.4rem; left: 50%; transform: translateX(-50%);
  background: var(--green); color: var(--cream); border: 1px solid var(--gold);
  border-radius: 999px; padding: .6rem 1.4rem; font-family: 'Cinzel', serif; font-size: .85rem;
  letter-spacing: .06em; box-shadow: 0 6px 20px rgba(0,0,0,.3); opacity: 0; transition: opacity .3s; z-index: 60; pointer-events: none;
}
.toast.show { opacity: 1; }

@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; }
  .day-body { grid-template-columns: 1fr; }
  .day-body .half + .half { border-left: none; border-top: 1px dashed rgba(201,150,46,.5); }
  nav.main { margin-left: 0; }
  body { font-size: 1.08rem; }
}
