/* 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+Devanagari: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; }

/* Cormorant Garamond's numeral 1 reads like a capital I, so digits use a clearer
   local serif (times like 10:30 and 1:00 must be unmistakable) */
@font-face {
  font-family: 'Clear Digits';
  src: local('Times New Roman'), local('Georgia'), local('Noto Serif'), local('Droid Serif');
  unicode-range: U+0030-0039;
}

body {
  font-family: 'Clear Digits', '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 Devanagari', 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; }

/* Plain Cinzel here, not Cinzel Decorative — the decorative cut draws adjacent round
   letters interlocked (the OO in FOOD reads as one glyph) */
.page-title {
  font-family: 'Cinzel', serif; font-weight: 900; color: var(--maroon);
  text-align: center; font-size: clamp(1.6rem, 4.5vw, 2.6rem); margin: 1.2rem 0 .2rem;
  letter-spacing: .08em;
  font-variant-ligatures: none;
  font-feature-settings: 'liga' 0, 'dlig' 0, 'hlig' 0, 'calt' 0;
}
.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: 'Clear Digits', '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 Devanagari', 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: collapsible days + compact dish rows ---------- */
.day-head { cursor: default; }
.day-head[data-toggle] { cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent; }
.day-head .caret { display: inline-block; font-size: .7rem; transition: transform .2s; vertical-align: middle; margin-right: .15rem; }
.day-card.open .caret { transform: rotate(90deg); }
.dish-row {
  display: flex; align-items: center; gap: .7rem; padding: .75rem 1.2rem;
  border-bottom: 1px dotted rgba(201, 150, 46, .4); cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.dish-row:hover { background: rgba(240, 199, 94, .1); }
.dish-row .dname { font-weight: 700; font-size: 1.12rem; color: var(--maroon-2); flex: 1; min-width: 0; }
.dish-row .dslot { font-size: 1rem; }
.chip {
  font-family: 'Cinzel', serif; font-size: .66rem; letter-spacing: .06em; font-weight: 700;
  padding: .28rem .65rem; border-radius: 999px; white-space: nowrap;
}
.chip.open { background: rgba(201, 150, 46, .16); border: 1px solid var(--gold); color: #8a5f14; }
.chip.filled { background: rgba(29, 92, 56, .12); border: 1px solid var(--green-2); color: var(--green-2); }
.filter-bar { display: flex; gap: .6rem; align-items: center; margin-bottom: 1rem; flex-wrap: wrap; }
.filter-chip {
  cursor: pointer; font-family: 'Cinzel', serif; font-size: .72rem; letter-spacing: .08em;
  padding: .5rem 1rem; border-radius: 999px; border: 1px solid var(--gold);
  background: transparent; color: var(--maroon-2); -webkit-tap-highlight-color: transparent;
}
.filter-chip.on { background: var(--gold); color: var(--maroon); font-weight: 700; }
.bring-bar { padding: .7rem 1.2rem .2rem; display: flex; gap: .6rem; flex-wrap: wrap; }

/* ---------- 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;
}

/* important food guideline, styled like a highlighter stroke */
.veg-note {
  display: block;
  width: fit-content;
  margin-top: .4rem;
  background: linear-gradient(100deg, rgba(240, 199, 94, .25), rgba(240, 199, 94, .65), rgba(240, 199, 94, .25));
  color: var(--maroon);
  font-weight: 700;
  border-radius: 6px;
  padding: .15rem .6rem;
  border: 1px solid var(--gold);
}

/* ---------- highlighted announcements ---------- */
.announce-highlight {
  display: block;
  background: linear-gradient(100deg,
    rgba(240, 199, 94, .14) 20%, rgba(240, 199, 94, .48) 50%, rgba(240, 199, 94, .14) 80%);
  background-size: 220% 100%;
  border: 1px solid var(--gold);
  border-left: 5px solid var(--gold);
  border-radius: 10px;
  padding: .55rem .85rem !important;
  margin: .45rem 0;
  font-size: 1.18rem;
  animation: goldShimmer 2.8s ease-in-out infinite;
}
@keyframes goldShimmer {
  0%, 100% { background-position: 0% 0; box-shadow: 0 0 0 rgba(201, 150, 46, 0); }
  50% { background-position: 100% 0; box-shadow: 0 0 16px rgba(201, 150, 46, .55); }
}
@media (prefers-reduced-motion: reduce) {
  .announce-highlight { animation: none; background: rgba(240, 199, 94, .3); }
}

/* ---------- 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 Devanagari', 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; }

/* ---------- app-style bottom tab bar (phones) ---------- */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 40; display: none;
  background: linear-gradient(0deg, var(--maroon) 0%, var(--maroon-2) 100%);
  border-top: 3px solid var(--gold);
  padding: .3rem .25rem calc(.3rem + env(safe-area-inset-bottom));
  box-shadow: 0 -4px 16px rgba(74, 13, 16, .35);
}
.bottom-nav a {
  flex: 1; text-align: center; text-decoration: none; color: var(--gold-pale);
  font-family: 'Cinzel', serif; font-size: .6rem; letter-spacing: .05em; text-transform: uppercase;
  padding: .3rem 0 .2rem; border-radius: 12px; -webkit-tap-highlight-color: transparent;
}
.bottom-nav a .bi { display: block; font-size: 1.45rem; line-height: 1.25; }
.bottom-nav a.active { color: var(--gold-bright); background: rgba(240, 199, 94, .16); }

@media (max-width: 820px) {
  .bottom-nav { display: flex; }
  nav.main { display: none; }
  body { padding-bottom: calc(4.6rem + env(safe-area-inset-bottom)); }
  .toast { bottom: calc(5.2rem + env(safe-area-inset-bottom)); max-width: 92vw; text-align: center; }
  .site-inner { padding: .7rem 1rem; }
  .admin-chip { margin-left: auto; }
}

/* ---------- phones: tables become stacked cards ---------- */
@media (max-width: 700px) {
  .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; }
  main { padding: 1rem .9rem 2.2rem; }

  .table-wrap { border: none; box-shadow: none; background: transparent; overflow: visible; }
  .table-wrap table { min-width: 0; background: transparent; display: block; }
  .table-wrap thead { display: none; }
  .table-wrap tbody { display: block; }
  .table-wrap tr {
    display: block; background: #fffdf4; border: 1px solid var(--gold-pale);
    border-left: 5px solid var(--gold); border-radius: 12px; box-shadow: var(--shadow);
    margin-bottom: .85rem; padding: .9rem 1rem;
  }
  .table-wrap tr:nth-child(even) td { background: transparent; }
  .table-wrap td { display: block; border: none; padding: .3rem 0; background: transparent !important; }
  .table-wrap td:empty { display: none; }
  .table-wrap td[data-label]::before {
    content: attr(data-label); display: block;
    font-family: 'Cinzel', serif; font-size: .62rem; letter-spacing: .12em; text-transform: uppercase;
    color: var(--green-2); margin-bottom: .12rem;
  }
  .table-wrap td.item-name {
    font-size: 1.3rem; padding-bottom: .4rem; margin-bottom: .25rem;
    border-bottom: 1px dashed rgba(201, 150, 46, .45);
  }
  /* comfortable tap targets */
  .btn.small { font-size: .8rem; padding: .6rem 1.1rem; min-height: 42px; }
  .btn.big { display: block; text-align: center; }
  .committee-grid { grid-template-columns: 1fr 1fr; gap: .7rem; }
  .committee-card { padding: .85rem .9rem; }
}
