/* NSP Friends Youth — Vinayaka Chavithi 2026
 *
 * Design system carried over from prototype v5, with the tokens kept but the
 * data now coming from the API.
 *
 * Three homepage designs (§3), switched by data-theme on <html>:
 *   grand     black and gold, matches the logo
 *   festival  kumkum red on paper
 *   simple    large type, high contrast, light on data
 *
 * The reader is on a phone, on 4G, opening a link forwarded to a WhatsApp
 * group. Everything below is mobile-first and sized for a thumb.
 */

/* ---------------- tokens ---------------- */
:root {
  --display: 'Bricolage Grotesque', system-ui, sans-serif;
  --body: 'Work Sans', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  --pad: 18px;
  --r: 14px;
}
html[data-lang='te'] {
  --display: 'Noto Serif Telugu', serif;
  --body: 'Noto Sans Telugu', sans-serif;
}

html[data-theme='grand'] {
  --bg: #0a0a0b; --surface: #141416; --surface2: #1d1d21; --rule: #2e2e34;
  --fg: #f3f1ec; --fg-soft: #9c9aa3;
  --gold: #f5a81c; --gold-2: #ffd160; --silver: #d9dde2; --flame: #ff6a00;
  --accent: var(--gold); --onAccent: #0a0a0b;
  --in: #4ade80; --out: #ff7a5c;
  --warnbg: #2a1f06; --warnfg: #ffc13b;
  --goodbg: #0e2419; --goodfg: #6ee7a8; --infobg: #17171b;
}
html[data-theme='festival'] {
  --bg: #fffdf7; --surface: #fffdf7; --surface2: #f6efe1; --rule: #e3d6be;
  --fg: #241203; --fg-soft: #5c4630;
  --gold: #f0a202; --gold-2: #ffd98a; --silver: #8a7b63; --flame: #c1121f;
  --accent: #c1121f; --onAccent: #fff;
  --in: #2d6a4f; --out: #c1121f;
  --warnbg: #fff6e9; --warnfg: #6b4200;
  --goodbg: #edf7f1; --goodfg: #1c4a37; --infobg: #f6efe1;
}
html[data-theme='simple'] {
  --bg: #fff; --surface: #fff; --surface2: #f1f3f5; --rule: #d8dce0;
  --fg: #101418; --fg-soft: #5a646e;
  --gold: #b26a00; --gold-2: #ffe0a3; --silver: #5a646e; --flame: #b3261e;
  --accent: #0b5cab; --onAccent: #fff;
  --in: #1b7a43; --out: #b3261e;
  --warnbg: #fff4e0; --warnfg: #6b4300;
  --goodbg: #e7f5ec; --goodfg: #12522f; --infobg: #f1f3f5;
  --r: 10px;
}
html[data-theme='simple'] body { font-size: 17.5px; }

/* ---------------- base ---------------- */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg); color: var(--fg);
  font-family: var(--body); font-size: 16px; line-height: 1.55;
  padding-bottom: 88px; overflow-x: hidden;
}
@media (min-width: 900px) { body { padding-bottom: 0; } }
img { max-width: 100%; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.hide { display: none !important; }
[hidden] { display: none !important; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------------- ornament ---------------- */
.divider { height: 20px; margin: 26px 0; background-repeat: repeat-x; background-position: center; background-size: auto 20px; }
html[data-theme='grand'] .divider { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='20'><path d='M0 10 H40 M80 10 H120' stroke='%23F5A81C' stroke-width='1' opacity='.5'/><path d='M52 10 q8-8 16 0 q-8 8-16 0z' fill='none' stroke='%23F5A81C' stroke-width='1.2'/><circle cx='60' cy='10' r='2' fill='%23F5A81C'/></svg>"); }
html[data-theme='festival'] .divider { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='40' height='20'><circle cx='4' cy='10' r='2' fill='%23C1121F'/><circle cx='20' cy='10' r='1.4' fill='%23F0A202'/><circle cx='36' cy='10' r='2' fill='%23C1121F'/><path d='M4 10 Q12 3 20 10 Q28 17 36 10' fill='none' stroke='%23E3D6BE' stroke-width='1.4'/></svg>"); }
html[data-theme='simple'] .divider { background: var(--rule); height: 1px; margin: 30px 0; }

/* ---------------- splash ---------------- */
#splash {
  position: fixed; inset: 0; z-index: 100; background: #0a0a0b;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 28px; text-align: center; color: #f3f1ec;
}
#splash .mark {
  width: 150px; height: 150px; border-radius: 50%; margin-bottom: 20px;
  display: grid; place-items: center;
  background: radial-gradient(circle at 35% 30%, #ffd160, #f5a81c);
  color: #0a0a0b; font-family: var(--display); font-weight: 800; font-size: 40px;
  box-shadow: 0 0 46px rgba(245, 168, 28, .34);
}
#splash h1 { font-family: var(--display); font-weight: 800; font-size: clamp(23px, 6.4vw, 34px); margin: 0 0 4px; letter-spacing: -.02em; }
#splash .sub { font-family: 'Noto Sans Telugu', sans-serif; font-size: 14px; color: #f5a81c; margin-bottom: 30px; }
.langbtns { display: grid; gap: 11px; width: 100%; max-width: 330px; }
.langbtn {
  border: 1.5px solid #3a3a42; background: #141416; color: #f3f1ec;
  padding: 15px; border-radius: 12px; cursor: pointer;
  font-size: 18px; font-weight: 600;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.langbtn:hover { border-color: #f5a81c; }
.langbtn small { opacity: .6; font-weight: 400; font-size: 12.5px; }
#splash .note { margin-top: 20px; font-size: 12px; opacity: .5; max-width: 320px; }

/* ---------------- header + nav ---------------- */
header { position: sticky; top: 0; z-index: 40; background: var(--bg); border-bottom: 1px solid var(--rule); }
.hrow { display: flex; align-items: center; gap: 10px; padding: 9px var(--pad); max-width: 1080px; margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 9px; min-width: 0; cursor: pointer; background: none; border: 0; padding: 0; text-align: left; font: inherit; color: inherit; }
.brand .mark {
  width: 38px; height: 38px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  background: radial-gradient(circle at 35% 30%, var(--gold-2), var(--gold));
  color: #0a0a0b; font-family: var(--display); font-weight: 800; font-size: 13px;
  box-shadow: 0 0 0 1.5px var(--gold);
}
.brand b { display: block; font-family: var(--display); font-size: 14.5px; font-weight: 800; line-height: 1.1; }
.brand span span, .brand > span > span { display: block; font-size: 10.5px; color: var(--fg-soft); letter-spacing: .05em; text-transform: uppercase; }
.hspace { flex: 1; }
.ghost {
  border: 1px solid var(--rule); background: var(--surface2); color: var(--fg);
  border-radius: 999px; padding: 7px 12px; font: 600 12.5px/1 var(--body);
  cursor: pointer; white-space: nowrap;
}
.ghost:hover { border-color: var(--gold); }

.topnav { display: none; }
@media (min-width: 900px) {
  .topnav { display: flex; gap: 3px; }
  .topnav button { background: none; border: 0; padding: 8px 11px; border-radius: 8px; font: 600 13.5px var(--body); color: var(--fg-soft); cursor: pointer; }
  .topnav button[aria-current='page'] { background: var(--surface2); color: var(--fg); }
}

nav.tabs {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 45;
  background: var(--bg); border-top: 1px solid var(--rule);
  display: grid; padding-bottom: env(safe-area-inset-bottom);
}
nav.tabs button {
  background: none; border: 0; padding: 9px 2px 10px; cursor: pointer;
  color: var(--fg-soft); font: 500 10.5px/1.3 var(--body);
  display: flex; flex-direction: column; align-items: center; gap: 3px;
}
nav.tabs button i { font-style: normal; font-size: 17px; }
nav.tabs button[aria-current='page'] { color: var(--gold); font-weight: 700; }
@media (min-width: 900px) { nav.tabs { display: none; } }

main { max-width: 1080px; margin: 0 auto; }
.wrap { padding: 0 var(--pad); }
section.page { display: none; animation: fade .22s ease; }
section.page.on { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }

/* ---------------- type ---------------- */
h2.sec { font-family: var(--display); font-weight: 800; font-size: clamp(20px, 5.2vw, 27px); letter-spacing: -.02em; margin: 0 0 4px; }
.eyebrow { font: 700 10.5px/1 var(--body); letter-spacing: .17em; text-transform: uppercase; color: var(--gold); margin: 0 0 8px; }
.lede { color: var(--fg-soft); margin: 0 0 16px; font-size: 14.5px; }

/* ---------------- hero ---------------- */
.hero { position: relative; overflow: hidden; }
html[data-theme='grand'] .hero { background: radial-gradient(120% 80% at 50% 0%, #2a1b04 0%, #0a0a0b 62%); }
html[data-theme='festival'] .hero { background: #c1121f; color: #fff; }
html[data-theme='simple'] .hero { background: var(--surface2); }
.hero-in { padding: 26px var(--pad) 24px; max-width: 1080px; margin: 0 auto; position: relative; text-align: center; }
.hero-logo {
  width: clamp(120px, 34vw, 180px); aspect-ratio: 1; border-radius: 50%; margin: 0 auto 14px;
  display: grid; place-items: center;
  background: radial-gradient(circle at 35% 30%, var(--gold-2), var(--gold));
  color: #0a0a0b; font-family: var(--display); font-weight: 800; font-size: clamp(30px, 9vw, 46px);
  box-shadow: 0 0 0 2px var(--gold), 0 0 50px rgba(245, 168, 28, .22);
}
html[data-theme='simple'] .hero-logo { width: 88px; font-size: 24px; box-shadow: none; }
.hero .kicker {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--surface2); border: 1px solid var(--rule); border-radius: 999px;
  padding: 5px 11px; font: 700 10.5px/1 var(--body);
  letter-spacing: .12em; text-transform: uppercase; color: var(--gold); margin-bottom: 12px;
}
.hero h1 { font-family: var(--display); font-weight: 800; letter-spacing: -.03em; line-height: .98; font-size: clamp(28px, 8.6vw, 56px); margin: 0; }
html[data-theme='grand'] .hero h1 { background: linear-gradient(180deg, #fff 0%, #d9dde2 42%, #f5a81c 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .place { font-family: 'Noto Serif Telugu', serif; font-size: clamp(15px, 4.2vw, 21px); color: var(--gold); margin: 9px 0 0; }
.hero .yr { font-family: var(--mono); font-size: 12px; letter-spacing: .18em; margin-top: 13px; color: var(--fg-soft); }
.hero .tagline { font-family: 'Noto Sans Telugu', sans-serif; font-size: 12.5px; color: var(--fg-soft); margin-top: 10px; }

.count { display: flex; gap: 8px; margin-top: 17px; flex-wrap: wrap; justify-content: center; }
.count .box { background: var(--surface); border: 1px solid var(--rule); border-radius: 10px; padding: 9px 14px; min-width: 74px; text-align: center; }
.count .box b { display: block; font-family: var(--mono); font-size: 21px; font-weight: 600; color: var(--gold); }
.count .box span { font-size: 10px; letter-spacing: .09em; text-transform: uppercase; color: var(--fg-soft); }

/* ---------------- live ---------------- */
.live { margin: 14px var(--pad) 6px; border: 1px solid var(--rule); border-radius: var(--r); overflow: hidden; background: var(--surface); }
.livehead { display: flex; align-items: center; gap: 9px; padding: 10px 13px; background: var(--surface2); }
.dot { width: 9px; height: 9px; border-radius: 50%; background: #ff3b30; animation: pulse 1.4s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
.livehead b { font: 800 12px var(--body); letter-spacing: .14em; text-transform: uppercase; color: #ff3b30; }
.player { aspect-ratio: 16/9; background: #000; display: grid; place-items: center; color: #888; text-align: center; padding: 16px; }
.player iframe { width: 100%; height: 100%; border: 0; }
.player .play { width: 58px; height: 58px; border-radius: 50%; background: rgba(255, 255, 255, .13); display: grid; place-items: center; font-size: 22px; color: #fff; margin: 0 auto 8px; }
.player small { display: block; font-size: 11.5px; color: #777; margin-top: 6px; }

/* ---------------- money ---------------- */
.money { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--rule); border-block: 1px solid var(--rule); }
.money div { background: var(--bg); padding: 13px 8px; text-align: center; }
.money b { display: block; font-family: var(--mono); font-weight: 600; font-size: clamp(15px, 4.4vw, 21px); }
.money span { font-size: 10px; letter-spacing: .09em; text-transform: uppercase; color: var(--fg-soft); }
.money .g b { color: var(--in); }
.money .r b { color: var(--out); }
.bar { height: 7px; background: var(--surface2); border-radius: 99px; overflow: hidden; margin: 14px 0 6px; }
.bar i { display: block; height: 100%; background: var(--accent); }
.barlab { display: flex; justify-content: space-between; font: 500 12px var(--mono); color: var(--fg-soft); }

/* ---------------- cards ---------------- */
.card { border: 1px solid var(--rule); border-radius: var(--r); background: var(--surface); overflow: hidden; }
.card + .card { margin-top: 12px; }
.card .ch { padding: 12px 14px; border-bottom: 1px solid var(--rule); display: flex; align-items: center; gap: 9px; background: var(--surface2); }
.card .ch b { font-family: var(--display); font-weight: 800; font-size: 14.5px; }
.card .cb { padding: 14px; }
.today { border-color: var(--gold); }
.today .ch { background: linear-gradient(90deg, var(--gold), var(--flame)); }
.today .ch b { color: #0a0a0b; }
.pill { font: 800 10px/1 var(--body); letter-spacing: .11em; text-transform: uppercase; padding: 5px 9px; border-radius: 999px; background: #0a0a0b; color: var(--gold); }

.slot { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--rule); }
.slot:last-child { border-bottom: 0; padding-bottom: 0; }
.slot time { font-family: var(--mono); font-size: 12.5px; color: var(--gold); font-weight: 600; width: 64px; flex: none; padding-top: 2px; }
.slot b { display: block; font-size: 14.5px; font-weight: 600; }
.tbc { font-size: 11px; color: var(--warnfg); }

.day { display: flex; gap: 13px; padding: 13px 0; border-bottom: 1px solid var(--rule); cursor: pointer; align-items: flex-start; }
.day:last-child { border-bottom: 0; }
.daynum { width: 44px; height: 44px; flex: none; border-radius: 10px; background: var(--surface2); display: grid; place-items: center; line-height: 1; text-align: center; border: 1px solid var(--rule); }
.daynum b { display: block; font-family: var(--mono); font-size: 15px; font-weight: 600; }
.daynum span { display: block; font-size: 8.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--fg-soft); }
.day.is-today .daynum { background: var(--gold); border-color: var(--gold); color: #0a0a0b; }
.day.done .daynum { opacity: .45; }
.day h4 { margin: 0; font-size: 15px; font-weight: 600; }
.day p { margin: 2px 0 0; font-size: 12.5px; color: var(--fg-soft); }

/* ---------------- rows / segments ---------------- */
.segs { display: flex; gap: 5px; background: var(--surface2); padding: 4px; border-radius: 11px; margin-bottom: 13px; }
.segs button { flex: 1; border: 0; background: none; padding: 9px; border-radius: 8px; font: 600 13.5px var(--body); color: var(--fg-soft); cursor: pointer; }
.segs button[aria-selected='true'] { background: var(--surface); color: var(--fg); box-shadow: 0 1px 3px rgba(0, 0, 0, .25); }

.row { display: flex; align-items: center; gap: 11px; padding: 11px 0; border-bottom: 1px solid var(--rule); }
.row:last-child { border-bottom: 0; }
.thumb { width: 42px; height: 42px; flex: none; border-radius: 8px; border: 1px solid var(--rule); object-fit: cover; background: var(--surface2); cursor: pointer; }
.row .m { flex: 1; min-width: 0; }
.row .m b { display: block; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .m small { color: var(--fg-soft); font-size: 11.5px; }
.amt { font-family: var(--mono); font-weight: 600; font-size: 14px; white-space: nowrap; }
.amt.in { color: var(--in); }
.amt.out { color: var(--out); }
.tag { display: inline-block; font: 600 9.5px/1 var(--body); letter-spacing: .07em; text-transform: uppercase; padding: 3px 6px; border-radius: 5px; background: var(--surface2); border: 1px solid var(--rule); color: var(--fg-soft); }

/* ---------------- donor list (amount-ranked) ---------------- */
.rank {
  width: 30px; flex: none; text-align: right;
  font-family: var(--mono); font-size: 13px; font-weight: 600; color: var(--fg-soft);
}
.donor-row:nth-child(-n+3) .rank { color: var(--gold); font-size: 15px; }
.donor-row { display: flex; align-items: center; gap: 11px; padding: 11px 0; border-bottom: 1px solid var(--rule); }
.donor-row:last-child { border-bottom: 0; }
.donor-row .m { flex: 1; min-width: 0; }
.donor-row .m b { display: block; font-size: 14.5px; font-weight: 600; }
.donor-row .m small { color: var(--fg-soft); font-size: 11.5px; }
.donor-row.top3 { background: linear-gradient(90deg, color-mix(in srgb, var(--gold) 8%, transparent), transparent); }
.private { color: var(--fg-soft); font-style: italic; font-size: 12.5px; }
.listfoot {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 14px 0 0; margin-top: 4px; border-top: 2px solid var(--rule);
  font-family: var(--mono); font-weight: 600;
}
.listfoot span { font-family: var(--body); font-size: 12px; color: var(--fg-soft); text-transform: uppercase; letter-spacing: .08em; }
.listfoot b { font-size: 18px; color: var(--in); }
pre.sharebox {
  background: var(--surface2); border: 1px solid var(--rule); border-radius: 10px;
  padding: 12px; font-family: var(--mono); font-size: 11.5px; line-height: 1.6;
  white-space: pre; overflow-x: auto; margin: 0 0 10px; color: var(--fg);
}

/* ---------------- sponsors / gallery ---------------- */
.sponsors { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 9px; }
.sp { border: 1px solid var(--rule); border-radius: 11px; padding: 11px; text-align: center; background: var(--surface); position: relative; }
.sp.top { border-color: var(--gold); }
.sp b { display: block; font-size: 13px; font-weight: 600; line-height: 1.25; }
.sp .amt { font-size: 15px; margin-top: 4px; display: block; }
.sp small { display: block; color: var(--fg-soft); font-size: 10.5px; margin-top: 3px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); gap: 8px; }
.ph { aspect-ratio: 1; border-radius: 10px; border: 1px solid var(--rule); display: grid; place-items: center; font: 600 11px var(--body); color: var(--fg-soft); text-align: center; padding: 8px; cursor: pointer; position: relative; background: var(--surface2); overflow: hidden; }
.ph img, .ph video { width: 100%; height: 100%; object-fit: cover; }
.ph .vid { position: absolute; top: 6px; right: 6px; background: rgba(0, 0, 0, .6); color: #fff; border-radius: 5px; font-size: 9px; padding: 2px 5px; }

/* ---------------- dathas (§3 primary homepage element) ---------------- */
/* Swiped, not animated. The strip bleeds to both edges of the phone so the
   card at the right is visibly cut off - which is what tells someone there is
   more to swipe, better than any arrow would. */
.datha-strip {
  position: relative; padding: 4px 0 12px;
  overflow-x: auto; overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
  margin: 0 calc(var(--pad) * -1); padding-left: var(--pad); padding-right: var(--pad);
  scrollbar-width: thin; scrollbar-color: var(--rule) transparent;
}
.datha-strip::-webkit-scrollbar { height: 5px; }
.datha-strip::-webkit-scrollbar-thumb { background: var(--rule); border-radius: 999px; }
.datha-strip::-webkit-scrollbar-track { background: transparent; }
.datha-track { display: flex; gap: 10px; width: max-content; }
.datha { scroll-snap-align: start; }

.datha { flex: none; width: 148px; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r); overflow: hidden; text-align: center; position: relative; text-decoration: none; color: inherit; }
.datha .photo { aspect-ratio: 1; width: 100%; background: var(--surface2); display: grid; place-items: center; color: var(--fg-soft); font-size: 2rem; object-fit: cover; }
.datha .body { padding: .55rem .5rem .7rem; }
.datha .slotname { font-size: 11.5px; color: var(--gold); font-weight: 600; display: block; }
.datha .donor { font-size: 13px; margin-top: 2px; word-break: break-word; }
.datha .amount { font-size: 12px; color: var(--fg-soft); font-family: var(--mono); }
.datha .chief { position: absolute; top: 6px; left: 6px; background: var(--gold); color: #0a0a0b; font: 700 9px var(--body); letter-spacing: .05em; padding: 2px 6px; border-radius: 999px; text-transform: uppercase; }
.datha.open { border-style: dashed; border-color: var(--gold); }
.datha.open .donor { color: var(--gold); font-weight: 600; }

/* ---------------- members / contacts / carry ---------------- */
.mem { display: flex; gap: 11px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--rule); }
.mem:last-child { border-bottom: 0; }
.av { width: 40px; height: 40px; border-radius: 50%; background: var(--surface2); border: 1px solid var(--rule); display: grid; place-items: center; font: 700 15px var(--display); color: var(--gold); flex: none; }
.mem b { display: block; font-size: 14px; }
.mem small { color: var(--fg-soft); font-size: 12px; }

.contact { border: 1px solid var(--rule); border-radius: 12px; padding: 12px; margin-bottom: 10px; background: var(--surface); }
.contact .crow { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.ctag { font: 700 9.5px var(--body); letter-spacing: .09em; text-transform: uppercase; color: var(--gold); background: var(--surface2); border: 1px solid var(--rule); border-radius: 5px; padding: 3px 7px; }
.st { font: 700 9.5px var(--body); letter-spacing: .08em; text-transform: uppercase; padding: 3px 7px; border-radius: 5px; }
.st.ok { background: var(--goodbg); color: var(--in); border: 1px solid var(--in); }
.st.part { background: var(--warnbg); color: var(--warnfg); border: 1px solid var(--gold); }
.st.no { background: transparent; color: var(--out); border: 1px solid var(--out); }
.contact b { display: block; font-size: 15.5px; }
.contact .meta { color: var(--fg-soft); font-size: 12px; margin-top: 2px; }
.contact .note { margin: 8px 0 0; font-size: 13px; background: var(--surface2); border-left: 3px solid var(--gold); padding: 8px 10px; border-radius: 0 7px 7px 0; }
.cbtns { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 10px; }
.cbtns a { text-decoration: none; }

.carry { border: 1px solid var(--rule); border-radius: 12px; padding: 12px; margin-bottom: 10px; background: var(--surface); }
.carry .top { display: flex; align-items: flex-start; gap: 10px; }
.carry .who { flex: 1; }
.carry b { font-size: 15px; }
.carry .meta { color: var(--fg-soft); font-size: 12px; margin-top: 2px; }
.carry .nums { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--rule); border-radius: 8px; overflow: hidden; margin-top: 10px; }
.carry .nums div { background: var(--surface2); padding: 8px 6px; text-align: center; }
.carry .nums b { display: block; font-family: var(--mono); font-size: 14px; font-weight: 600; }
.carry .nums span { font-size: 9.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--fg-soft); }

/* ---------------- work checklist ---------------- */
.task { border: 1px solid var(--rule); border-left-width: 4px; border-radius: 10px; padding: 11px 12px; margin-bottom: 9px; background: var(--surface); }
.task.s-done { border-left-color: var(--in); opacity: .7; }
.task.s-prog { border-left-color: var(--gold); }
.task.s-todo { border-left-color: var(--rule); }
.task.s-late { border-left-color: var(--out); background: var(--warnbg); }
.task .trow { display: flex; align-items: flex-start; gap: 9px; }
.task b { font-size: 14.5px; display: block; line-height: 1.3; }
.task .who { display: flex; align-items: center; gap: 6px; margin-top: 5px; font-size: 12px; color: var(--fg-soft); flex-wrap: wrap; }
.miniav { width: 20px; height: 20px; border-radius: 50%; background: var(--surface2); border: 1px solid var(--rule); display: grid; place-items: center; font: 700 10px var(--display); color: var(--gold); }
.due { font-family: var(--mono); font-size: 11.5px; padding: 2px 6px; border-radius: 5px; background: var(--surface2); border: 1px solid var(--rule); }
.due.late { background: var(--out); color: #fff; border-color: var(--out); }
.due.soon { background: var(--warnbg); color: var(--warnfg); border-color: var(--gold); }
.tick { width: 26px; height: 26px; flex: none; border-radius: 50%; border: 2px solid var(--rule); background: transparent; cursor: pointer; display: grid; place-items: center; font-size: 13px; color: transparent; padding: 0; }
.task.s-done .tick { background: var(--in); border-color: var(--in); color: #04240f; }
.trem { margin-top: 8px; display: flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--fg-soft); flex-wrap: wrap; }
.tbtns { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 9px; }
.wsum { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--rule); border: 1px solid var(--rule); border-radius: 11px; overflow: hidden; margin-bottom: 12px; }
.wsum div { background: var(--surface); padding: 11px 5px; text-align: center; cursor: pointer; }
.wsum b { display: block; font-family: var(--mono); font-size: 19px; font-weight: 600; }
.wsum span { font-size: 9.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--fg-soft); }
.wsum div[aria-pressed='true'] { background: var(--surface2); box-shadow: inset 0 -3px 0 var(--gold); }
.chipsrow { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 12px; }
.chipsrow button { white-space: nowrap; border: 1px solid var(--rule); background: var(--surface); color: var(--fg-soft); border-radius: 999px; padding: 7px 12px; font: 600 12.5px var(--body); cursor: pointer; }
.chipsrow button[aria-pressed='true'] { border-color: var(--gold); color: var(--gold); background: var(--surface2); }
.swrow { display: flex; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--rule); }
.swrow:last-child { border-bottom: 0; }
.sw { width: 44px; height: 26px; border-radius: 99px; background: var(--rule); position: relative; cursor: pointer; flex: none; border: 0; }
.sw::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: left .16s; }
.sw[aria-pressed='true'] { background: var(--in); }
.sw[aria-pressed='true']::after { left: 21px; }

/* ---------------- buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
  background: var(--accent); color: var(--onAccent); border: 0; border-radius: 11px;
  padding: 13px 16px; font: 700 15px var(--body); cursor: pointer; min-height: 46px;
}
html[data-theme='grand'] .btn { background: linear-gradient(90deg, var(--gold), var(--gold-2)); color: #0a0a0b; }
.btn:hover { filter: brightness(1.07); }
.btn.alt { background: var(--surface); color: var(--fg); border: 1.5px solid var(--rule); }
.btn.wa { background: #25d366; color: #04310f; }
.btn.ig { background: linear-gradient(90deg, #f58529, #dd2a7b, #8134af); color: #fff; }
.btn.sm { width: auto; padding: 9px 13px; font-size: 13px; border-radius: 9px; min-height: 38px; }
.btn.full { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btnrow { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.share { border: 1px solid var(--rule); background: var(--surface2); color: var(--fg-soft); border-radius: 8px; padding: 5px 9px; font: 600 11.5px var(--body); cursor: pointer; display: inline-flex; align-items: center; gap: 5px; }
.share:hover { border-color: #25d366; color: var(--fg); }

/* ---------------- forms ---------------- */
.field { margin-bottom: 12px; }
.field label { display: block; font: 600 11.5px var(--body); letter-spacing: .06em; text-transform: uppercase; color: var(--fg-soft); margin-bottom: 5px; }
.field textarea { min-height: 160px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 11px; border: 1.5px solid var(--rule); border-radius: 10px;
  background: var(--bg); font: 400 15px var(--body); color: var(--fg); min-height: 46px;
}
.field input:focus, .field select:focus { border-color: var(--gold); outline: none; }

.drop { border: 2px dashed var(--rule); border-radius: 14px; padding: 26px 16px; text-align: center; background: var(--surface2); cursor: pointer; display: block; }
.drop:hover { border-color: var(--gold); }
.drop .big { font-size: 32px; }
.drop b { display: block; margin-top: 7px; font-size: 14.5px; }
.drop small { color: var(--fg-soft); font-size: 12px; }

.scan { display: flex; gap: 13px; align-items: center; padding: 17px; background: var(--surface2); border-radius: 12px; }
.spin { width: 24px; height: 24px; border: 3px solid var(--rule); border-top-color: var(--gold); border-radius: 50%; animation: sp .8s linear infinite; flex: none; }
@keyframes sp { to { transform: rotate(360deg); } }
.steplist { margin: 0; padding: 0; list-style: none; font-size: 13px; }
.steplist li { padding: 4px 0; color: var(--fg-soft); }
.steplist li.done { color: var(--in); font-weight: 600; }
.steplist li.done::before { content: '✓ '; }
.steplist li.now { color: var(--fg); font-weight: 600; }
.steplist li.now::before { content: '› '; }
.steplist li.wait::before { content: '· '; }

.xrow { display: grid; grid-template-columns: 1fr 94px 28px; gap: 7px; align-items: center; padding: 8px 0; border-bottom: 1px dashed var(--rule); }
.xrow input { padding: 9px; border: 1.5px solid var(--rule); border-radius: 8px; width: 100%; font: 400 14px var(--body); background: var(--bg); color: var(--fg); }
.xrow input.mono { font-family: var(--mono); text-align: right; font-weight: 600; }
.xrow input.low { border-color: var(--gold); background: var(--warnbg); }
.xrow .del { border: 0; background: none; font-size: 16px; color: var(--fg-soft); cursor: pointer; }
.flagnote { font-size: 11px; color: var(--warnfg); margin-top: 3px; }

.alert { border-radius: 11px; padding: 11px 13px; font-size: 13px; display: flex; gap: 9px; align-items: flex-start; margin: 12px 0; }
.alert.warn { background: var(--warnbg); border: 1px solid var(--gold); color: var(--warnfg); }
.alert.good { background: var(--goodbg); border: 1px solid var(--in); color: var(--goodfg); }
.alert.info { background: var(--infobg); border: 1px solid var(--rule); color: var(--fg-soft); }
.alert b { display: block; margin-bottom: 2px; }

.lock { border: 1.5px dashed var(--rule); border-radius: 12px; padding: 22px 16px; text-align: center; background: var(--surface2); }
.lock .big { font-size: 30px; }
.lock b { display: block; margin-top: 8px; font-size: 15px; }
.lock small { display: block; color: var(--fg-soft); font-size: 12.5px; margin: 5px auto 14px; max-width: 330px; }

.uplist { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 10px; }
.uplist div { width: 56px; height: 56px; border-radius: 8px; border: 1px solid var(--rule); background: var(--surface2); display: grid; place-items: center; font-size: 10px; color: var(--fg-soft); position: relative; overflow: hidden; }
.uplist img, .uplist video { width: 100%; height: 100%; object-fit: cover; }
.uplist .vb { position: absolute; bottom: 2px; left: 2px; background: rgba(0, 0, 0, .7); color: #fff; font: 600 8.5px var(--body); padding: 1px 4px; border-radius: 4px; }
.uplist .x { position: absolute; top: 1px; right: 2px; background: rgba(0, 0, 0, .6); color: #fff; border: 0; border-radius: 50%; width: 16px; height: 16px; font-size: 10px; line-height: 1; cursor: pointer; padding: 0; }
.meter { font-family: var(--mono); font-size: 12px; color: var(--fg-soft); margin-top: 8px; }

/* ---------------- qr / poster ---------------- */
.qrwrap { text-align: center; }
.qrwrap canvas { border: 8px solid #fff; border-radius: 12px; width: 180px; height: 180px; }
.upi { font-family: var(--mono); font-size: 12.5px; background: var(--surface2); border: 1px dashed var(--rule); padding: 9px; border-radius: 8px; margin-top: 11px; word-break: break-all; }
.postercv { width: 100%; max-width: 330px; border-radius: 12px; border: 1px solid var(--rule); display: block; margin: 0 auto 12px; }
.tmpls { display: flex; gap: 7px; margin-bottom: 12px; flex-wrap: wrap; }
.tmpls button { border: 1.5px solid var(--rule); background: var(--surface); border-radius: 9px; padding: 8px 12px; font: 600 12.5px var(--body); cursor: pointer; color: var(--fg-soft); }
.tmpls button[aria-pressed='true'] { border-color: var(--gold); color: var(--gold); }

/* ---------------- theme picker ---------------- */
.themecards { display: grid; gap: 10px; }
.tc { display: flex; gap: 12px; align-items: center; border: 2px solid var(--rule); border-radius: 12px; padding: 11px; cursor: pointer; background: var(--surface); }
.tc[aria-pressed='true'] { border-color: var(--gold); }
.swatch { width: 62px; height: 52px; border-radius: 8px; flex: none; overflow: hidden; }
.swatch i { display: block; height: 16px; }
.swatch u { display: block; text-decoration: none; height: 8px; margin: 6px; }
.tc b { display: block; font-size: 14.5px; }
.tc small { color: var(--fg-soft); font-size: 12px; }

/* ---------------- edit mode ---------------- */
body.editing [data-edit] { outline: 1.5px dashed var(--gold); outline-offset: 3px; border-radius: 4px; cursor: text; }
body.editing [data-edit]:focus { outline: 2px solid var(--gold); background: var(--warnbg); }
.editbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 70; background: var(--gold); color: #0a0a0b; padding: 11px var(--pad); display: none; align-items: center; gap: 10px; box-shadow: 0 -6px 22px rgba(0, 0, 0, .4); }
body.editing .editbar { display: flex; }
.editbar b { font-size: 13.5px; flex: 1; }
.editbar button { border: 0; border-radius: 9px; padding: 9px 14px; font: 700 13px var(--body); cursor: pointer; }
.editbar .save { background: #0a0a0b; color: var(--gold); }
.editbar .cancel { background: rgba(0, 0, 0, .14); color: #0a0a0b; }

.fab { position: fixed; right: 14px; bottom: 96px; z-index: 50; border: 0; border-radius: 999px; padding: 12px 16px; font: 700 13px var(--body); cursor: pointer; box-shadow: 0 6px 20px rgba(0, 0, 0, .4); display: flex; align-items: center; gap: 7px; }
.fab.edit { background: var(--gold); color: #0a0a0b; bottom: 154px; }
.fab.chat { background: #25d366; color: #04310f; }
@media (min-width: 900px) { .fab.chat { bottom: 20px; } .fab.edit { bottom: 78px; } }

/* ---------------- chatbot ---------------- */
.chatpanel { position: fixed; right: 0; left: 0; bottom: 0; z-index: 75; background: var(--surface); border-top: 1px solid var(--rule); border-radius: 18px 18px 0 0; max-height: 78vh; display: none; flex-direction: column; box-shadow: 0 -10px 40px rgba(0, 0, 0, .5); }
.chatpanel.on { display: flex; }
@media (min-width: 900px) { .chatpanel { left: auto; right: 20px; bottom: 20px; width: 380px; border-radius: 16px; border: 1px solid var(--rule); } }
.chathead { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--rule); }
.chathead .av { width: 32px; height: 32px; }
.chathead b { font-size: 14px; display: block; }
.chathead small { color: var(--fg-soft); font-size: 11.5px; }
.chathead button { margin-left: auto; background: none; border: 0; color: var(--fg-soft); font-size: 20px; cursor: pointer; }
.chatlog { padding: 14px; overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 9px; min-height: 220px; }
.msg { max-width: 82%; padding: 9px 12px; border-radius: 13px; font-size: 14px; line-height: 1.45; }
.msg.bot { background: var(--surface2); border: 1px solid var(--rule); align-self: flex-start; border-bottom-left-radius: 4px; }
.msg.me { background: var(--gold); color: #0a0a0b; align-self: flex-end; border-bottom-right-radius: 4px; font-weight: 500; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; padding: 0 14px 10px; }
.chips button { border: 1px solid var(--rule); background: var(--surface2); color: var(--fg-soft); border-radius: 999px; padding: 7px 11px; font: 500 12px var(--body); cursor: pointer; }
.chips button:hover { border-color: var(--gold); color: var(--fg); }
.chatfoot { display: flex; gap: 8px; padding: 10px 14px 14px; border-top: 1px solid var(--rule); }
.chatfoot input { flex: 1; padding: 11px; border-radius: 10px; border: 1.5px solid var(--rule); background: var(--bg); color: var(--fg); font: 400 14px var(--body); }
.chatfoot button { border: 0; border-radius: 10px; background: var(--gold); color: #0a0a0b; padding: 0 15px; font: 700 14px var(--body); cursor: pointer; }

/* ---------------- overlays ---------------- */
.sheet { position: fixed; inset: 0; z-index: 85; background: rgba(0, 0, 0, .66); display: none; align-items: flex-end; justify-content: center; }
.sheet.on { display: flex; }
.sheetin { background: var(--surface); width: 100%; max-width: 480px; border-radius: 18px 18px 0 0; padding: 18px var(--pad) 26px; border-top: 1px solid var(--rule); max-height: 88vh; overflow-y: auto; }
.sheetin h3 { margin: 0 0 3px; font-family: var(--display); font-size: 17px; }
.sheetin p { margin: 0 0 14px; font-size: 13px; color: var(--fg-soft); }
.sheetin .btn { margin-bottom: 8px; }

.modal { position: fixed; inset: 0; z-index: 90; background: rgba(0, 0, 0, .8); display: none; align-items: center; justify-content: center; padding: 20px; }
.modal.on { display: flex; }
.modal img { max-width: 100%; max-height: 80vh; border-radius: 12px; background: #fff; }
.modal button { position: absolute; top: 16px; right: 16px; background: #fff; border: 0; border-radius: 50%; width: 36px; height: 36px; font-size: 18px; cursor: pointer; }

.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: 150px; z-index: 95; background: var(--in); color: #04240f; padding: 11px 18px; border-radius: 999px; font: 700 13px var(--body); opacity: 0; pointer-events: none; transition: opacity .25s; }
.toast.on { opacity: 1; }

/* ---------------- footer ---------------- */
footer { background: var(--surface); border-top: 1px solid var(--rule); margin-top: 32px; }
footer .fin { padding: 24px var(--pad) 28px; max-width: 1080px; margin: 0 auto; font-size: 12.5px; color: var(--fg-soft); text-align: center; }
footer .mark { width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 10px; display: grid; place-items: center; background: radial-gradient(circle at 35% 30%, var(--gold-2), var(--gold)); color: #0a0a0b; font: 800 20px var(--display); }
footer b { font-family: var(--display); font-size: 15px; display: block; margin-bottom: 4px; color: var(--fg); }

.table-scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: .9rem; }
th, td { text-align: left; padding: .55rem .6rem; border-bottom: 1px solid var(--rule); }
th { color: var(--fg-soft); font-weight: 600; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* ==================================================================
 * Desktop
 *
 * The site is designed for a phone first, but a committee member doing
 * data entry sits at a laptop, and the original layout left two thirds
 * of a 1440px screen empty. Below 900px nothing here applies.
 * ================================================================== */

@media (min-width: 900px) {
  main { max-width: 1180px; }
  .hrow { max-width: 1180px; padding: 11px 28px; }
  .wrap { padding: 0 28px; }
  body { padding-bottom: 0; }

  h2.sec { font-size: 30px; }
  .lede { font-size: 15.5px; max-width: 68ch; }

  /* Two columns wherever a section is a heading plus a list. The heading
   * column stays narrow so the measure of the body text does not blow out. */
  .cols {
    display: grid;
    grid-template-columns: minmax(240px, 320px) 1fr;
    gap: 40px;
    align-items: start;
  }
  .cols > .colhead { position: sticky; top: 80px; }

  .grid-3 { grid-template-columns: repeat(3, 1fr); gap: 14px; }
  .grid-4 { grid-template-columns: repeat(4, 1fr); gap: 14px; }
  .grid-5 { grid-template-columns: repeat(5, 1fr); gap: 12px; }

  .hero-in { padding: 44px 28px 38px; }
  .hero h1 { font-size: 60px; }
  .count .box { min-width: 96px; padding: 12px 18px; }

  .money div { padding: 20px 12px; }
  .money b { font-size: 26px; }

  .datha { width: 168px; }
  .gallery, .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }

  /* Ledger and donor rows get room for the columns they were always meant
   * to have, rather than stacking name over meta. */
  .donor-row { padding: 13px 4px; }
  .donor-row .m b { font-size: 15.5px; }

  .btnrow { max-width: 520px; }
  .sheetin { max-width: 560px; border-radius: 18px; margin-bottom: 6vh; }
  .sheet { align-items: center; }
}

@media (min-width: 1280px) {
  main { max-width: 1280px; }
  .grid-5 { gap: 16px; }
}

/* ---------------- hamburger + sidebar ---------------- */

.burger {
  border: 1px solid var(--rule); background: var(--surface2); color: var(--fg);
  border-radius: 10px; width: 42px; height: 42px; flex: none;
  cursor: pointer; padding: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
}
.burger:hover { border-color: var(--gold); }
.burger span {
  display: block; width: 18px; height: 2px; background: currentColor;
  border-radius: 2px; transition: transform .18s, opacity .18s;
}
/* Becomes an X while the sidebar is open, so the same button obviously closes it. */
.burger[aria-expanded='true'] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.burger[aria-expanded='true'] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded='true'] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.drawer {
  position: fixed; inset: 0; z-index: 120;
  background: rgba(0, 0, 0, .55);
  opacity: 0; pointer-events: none; transition: opacity .2s ease;
}
.drawer.on { opacity: 1; pointer-events: auto; }

.drawer-in {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: min(360px, 90vw);
  background: var(--surface); border-left: 1px solid var(--rule);
  box-shadow: -12px 0 40px rgba(0, 0, 0, .45);
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 0 0 32px;
  transform: translateX(100%); transition: transform .22s ease;
}
.drawer.on .drawer-in { transform: none; }
@media (prefers-reduced-motion: reduce) {
  .drawer, .drawer-in { transition: none; }
}

.drawer-head {
  position: sticky; top: 0; z-index: 2;
  display: flex; align-items: center; gap: 10px;
  padding: 16px var(--pad);
  background: var(--surface); border-bottom: 1px solid var(--rule);
}
.drawer-head b { font-family: var(--display); font-size: 17px; flex: 1; }
.drawer-head button {
  background: none; border: 0; color: var(--fg-soft);
  font-size: 24px; cursor: pointer; line-height: 1; padding: 0 4px;
}

/* Who is signed in, and what that lets them do. */
.drawer-who { padding: 14px var(--pad); border-bottom: 1px solid var(--rule); }
.drawer-who .whorow { display: flex; align-items: center; gap: 11px; }
.drawer-who .av { width: 42px; height: 42px; }
.drawer-who b { display: block; font-size: 15px; }
.drawer-who small { color: var(--fg-soft); font-size: 12px; }
.rolebadge {
  display: inline-block; margin-top: 3px;
  font: 700 9.5px var(--body); letter-spacing: .09em; text-transform: uppercase;
  padding: 2px 7px; border-radius: 5px;
  background: var(--surface2); border: 1px solid var(--rule); color: var(--fg-soft);
}
.rolebadge.admin { color: var(--gold); border-color: var(--gold); }

.drawer-sec {
  font: 700 10px var(--body); letter-spacing: .16em; text-transform: uppercase;
  color: var(--gold); padding: 18px var(--pad) 6px;
}

.dlink {
  display: flex; align-items: center; gap: 12px;
  padding: 13px var(--pad); width: 100%;
  color: var(--fg); text-decoration: none; font: 500 15px var(--body);
  background: none; border: 0; text-align: left; cursor: pointer;
  border-left: 3px solid transparent;
}
.dlink:hover { background: var(--surface2); }
.dlink[aria-current='page'] {
  background: var(--surface2); border-left-color: var(--gold);
  color: var(--gold); font-weight: 600;
}
.dlink i { font-style: normal; width: 24px; text-align: center; font-size: 17px; flex: none; }
.dlink small { display: block; color: var(--fg-soft); font-size: 11.5px; font-weight: 400; margin-top: 1px; }
.dlink .tail { margin-left: auto; color: var(--fg-soft); font-size: 12px; }

.drawer .btn { width: calc(100% - var(--pad) * 2); margin: 10px var(--pad) 0; }

/* ---------------- lucky draw ---------------- */

.ld-hero {
  border: 1px solid var(--gold); border-radius: var(--r);
  background: linear-gradient(135deg, color-mix(in srgb, var(--gold) 14%, var(--surface)), var(--surface));
  padding: 18px; text-align: center; margin-bottom: 14px;
}
.ld-hero h3 { font-family: var(--display); font-size: clamp(20px, 5vw, 28px); margin: 0 0 6px; color: var(--gold); }
.ld-hero p { margin: 0; color: var(--fg-soft); font-size: 14px; }

.tier {
  border: 1px solid var(--rule); border-radius: var(--r);
  background: var(--surface); padding: 16px; text-align: center;
  display: flex; flex-direction: column; gap: 6px;
}
.tier.is-sponsor { border-color: var(--in); }
.tier.is-prasadam { border-color: var(--accent); }
.tier h4 {
  margin: 0; font: 700 11px var(--body); letter-spacing: .12em;
  text-transform: uppercase; color: var(--gold);
}
.tier .big { font-family: var(--display); font-size: 26px; font-weight: 800; line-height: 1.15; }
.tier .detail { font-size: 13.5px; color: var(--fg); }
.tier .eg { font-size: 12px; color: var(--fg-soft); margin-top: auto; padding-top: 6px; }
.tier .laddu {
  font: 600 11.5px var(--body); color: var(--in);
  border-top: 1px dashed var(--rule); padding-top: 8px; margin-top: 4px;
}

.prize {
  border: 1px solid var(--rule); border-radius: 12px; background: var(--surface);
  padding: 12px 8px; text-align: center; position: relative;
}
.prize .no {
  position: absolute; top: 6px; left: 6px;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--gold); color: #0a0a0b;
  font: 700 12px var(--mono); display: grid; place-items: center;
}
.prize .pic {
  aspect-ratio: 1; border-radius: 10px; background: var(--surface2);
  display: grid; place-items: center; font-size: 30px; margin-bottom: 8px;
  overflow: hidden; padding: 12px;
}
.prize .pic svg { width: 100%; height: 100%; }
.prize .pic img { width: 100%; height: 100%; object-fit: cover; }
.prize b { font-size: 13px; display: block; line-height: 1.3; }

.token-pill {
  display: inline-flex; align-items: center; gap: 5px;
  background: color-mix(in srgb, var(--gold) 18%, transparent);
  border: 1px solid var(--gold); color: var(--gold);
  border-radius: 999px; padding: 2px 9px;
  font: 700 11.5px var(--mono); white-space: nowrap;
}

/* ---------------- sponsors ---------------- */

.sponsor {
  border: 1px solid var(--rule); border-radius: var(--r);
  background: var(--surface); padding: 14px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.sponsor .face {
  width: 76px; height: 76px; border-radius: 50%; margin-bottom: 6px;
  background: var(--surface2); border: 2px solid var(--gold);
  display: grid; place-items: center; overflow: hidden;
  font: 700 24px var(--display); color: var(--gold);
}
.sponsor .face img { width: 100%; height: 100%; object-fit: cover; }
.sponsor .role {
  font: 700 10px var(--body); letter-spacing: .1em; text-transform: uppercase;
  color: var(--gold);
}
.sponsor b { font-size: 14.5px; line-height: 1.3; }
.sponsor small { color: var(--fg-soft); font-size: 11.5px; }

/* ---------------- edit mode ---------------- */

/* Every string carries data-t, so edit mode lights up the whole page rather
 * than a handful of blessed headings. */
body.editing [data-t], body.editing [data-edit] {
  outline: 1.5px dashed var(--gold); outline-offset: 2px;
  border-radius: 3px; cursor: text;
}
body.editing [data-t]:focus, body.editing [data-edit]:focus {
  outline: 2px solid var(--gold); background: var(--warnbg);
}

/* ==================================================================
 * Responsive grids
 *
 * Defined last so they win regardless of what precedes them, and
 * mobile-first: one column on a small phone, because a tier card holds
 * a whole sentence and three across 390px is unreadable.
 * ================================================================== */

.grid-3, .grid-4, .grid-5 { display: grid; gap: 10px; }
.grid-3 { grid-template-columns: 1fr; }
.grid-4, .grid-5 { grid-template-columns: repeat(2, 1fr); }

@media (min-width: 560px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
  .grid-5 { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 900px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); gap: 14px; }
  .grid-4 { grid-template-columns: repeat(4, 1fr); gap: 14px; }
  .grid-5 { grid-template-columns: repeat(5, 1fr); gap: 12px; }
}

/* The divider tiles a motif; across a full desktop width it becomes a row of
 * identical marks, so it is held to the width of the text it breaks. */
.divider { max-width: 620px; margin-inline: auto; }

/* The drawn prize art is line-art, not a photo: it wants room around it. */
.prize .pic { padding: 14px; }
.prize .pic svg { width: 100%; height: 100%; display: block; }

/* Sub-heading inside a sidebar section.
   The committee half is long enough to need grouping of its own, but a second
   gold heading would compete with the section above it, so this reads quieter:
   softer colour, no letter-spacing shout, tighter above. */
.drawer-sub {
  font: 700 10px var(--body); letter-spacing: .12em; text-transform: uppercase;
  color: var(--fg-soft); opacity: .75;
  padding: 13px var(--pad) 5px;
}
.drawer-sec + .drawer-sub { padding-top: 4px; }

/* Sub-heading inside a section. Smaller than .sec and without its rule, so a
   two-part board reads as one thing in two parts rather than two sections. */
h3.sub {
  font: 600 15px var(--display); color: var(--fg);
  margin: 0 0 2px; letter-spacing: .01em;
}

/* A card in a committee-added section. Wider than a datha card because these
   carry a sentence or two rather than a name, and the picture is the point. */
.upd {
  flex: none; width: 240px; background: var(--surface);
  border: 1px solid var(--rule); border-radius: var(--r);
  overflow: hidden; scroll-snap-align: start;
}
.upd img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; background: var(--surface2); }
.upd-b { padding: .6rem .7rem .75rem; }
.upd-d { font: 700 10px var(--body); letter-spacing: .1em; text-transform: uppercase; color: var(--gold); }
.upd-b b { display: block; font-size: 14px; margin-top: 2px; }
.upd-b p { margin: 4px 0 0; font-size: 12.5px; color: var(--fg-soft); line-height: 1.45; }
/* In a grid the cards share the column width rather than a fixed one. */
.grid-3 .upd { width: auto; }

/* An update written as prose keeps its paragraphs. Committee announcements
   arrive as a WhatsApp message with line breaks and a numbered list, and
   collapsing that into one run-on line loses the shape of it. */
.upd-t { white-space: pre-line; }
/* A section carrying real text needs the width; a row of photo cards does not. */
.grid-3 .upd { width: auto; }
