:root {
  --bg: #fdfbf8;
  --surface: #ffffff;
  --surface-2: #f6f1ea;
  --ink: #221f1b;
  --muted: #8a8279;
  --line: #eee6dc;
  --accent: #e2673f;
  --accent-ink: #ffffff;
  --accent-soft: #fbe8e0;
  --accent-softer: #fdf3ee;
  --ok: #1f9d55;
  --shadow: 0 1px 2px rgba(34, 31, 27, .04), 0 8px 24px -12px rgba(34, 31, 27, .12);
  --radius: 18px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #151311; --surface: #1d1a17; --surface-2: #26221e; --ink: #f3eee8; --muted: #a39a90;
    --line: #322d28; --accent: #f07a52; --accent-soft: #3a241b; --accent-softer: #2a1d17;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px -12px rgba(0,0,0,.6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #151311; --surface: #1d1a17; --surface-2: #26221e; --ink: #f3eee8; --muted: #a39a90;
  --line: #322d28; --accent: #f07a52; --accent-soft: #3a241b; --accent-softer: #2a1d17;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px -12px rgba(0,0,0,.6);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 130px; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 15px/1.6 Poppins, "Noto Sans Devanagari", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }
.accent { color: var(--accent); }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); margin-right: 6px; vertical-align: middle; }
.dot-accent { background: var(--accent); }

/* ---------- top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.topbar-row { display: flex; align-items: center; gap: 14px; height: 60px; }
.brand { display: flex; align-items: center; gap: 9px; }
.brand img { border-radius: 50%; }
.brand-name { font-size: 18px; font-weight: 500; letter-spacing: -.2px; white-space: nowrap; }
.brand-name b { font-weight: 700; }
.status-pill { display: inline-block; font-size: 12px; color: var(--muted); border: 1px solid var(--line); background: var(--surface); padding: 3px 12px; border-radius: 999px; white-space: nowrap; }
.status-pill b { color: var(--ok); font-weight: 600; margin-right: 4px; }
.nav { margin-left: auto; display: flex; gap: 26px; font-size: 14px; }
.nav a:hover { color: var(--accent); }
.icon-btn { background: none; border: 0; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; }
.icon-btn:hover { background: var(--surface-2); }
.icon-btn .sun { display: none; }
:root[data-theme="dark"] .icon-btn .sun { display: block; }
:root[data-theme="dark"] .icon-btn .moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .icon-btn .sun { display: block; }
  :root:not([data-theme="light"]) .icon-btn .moon { display: none; }
}

.chipbar { display: flex; gap: 4px; padding: 6px; margin: 0 0 10px; background: var(--surface-2); border-radius: 14px; overflow-x: auto; scrollbar-width: none; }
.chipbar::-webkit-scrollbar { display: none; }
.chip { flex: none; border: 0; background: none; padding: 5px 12px; border-radius: 10px; font-size: 13.5px; font-weight: 500; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; color: var(--ink); }
.chip:hover { background: var(--surface); }
.chip .n { font-size: 11px; color: var(--muted); font-weight: 500; }
.chip[aria-selected="true"] { background: var(--accent); color: var(--accent-ink); }
.chip[aria-selected="true"] .n { color: var(--accent-ink); opacity: .8; }
.chip-sep { flex: none; width: 1px; background: var(--line); margin: 6px 4px; }

/* ---------- hero ---------- */
.hero { text-align: center; padding-top: 34px; padding-bottom: 28px; }
.seg { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.seg a { padding: 4px 14px; border-radius: 999px; font-size: 13.5px; font-weight: 600; color: var(--accent); display: inline-flex; align-items: center; gap: 6px; }
.seg a.seg-on { background: var(--accent); color: var(--accent-ink); }
.hero h1 { font-size: clamp(32px, 6vw, 52px); line-height: 1.25; margin: 18px 0 6px; font-weight: 700; letter-spacing: -.5px; }
.hero-sub { margin: 0 auto 22px; color: var(--muted); max-width: 620px; }
.finder { display: flex; gap: 10px; max-width: 900px; margin: 0 auto; }
.finder-input, .finder-select { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 0 18px; height: 50px; box-shadow: var(--shadow); }
.finder-input { flex: 1; color: var(--muted); }
.finder-input input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font: inherit; font-size: 15.5px; color: var(--ink); }
.finder-select { width: 240px; padding-right: 12px; }
.finder-select select { width: 100%; border: 0; background: none; font: inherit; font-size: 14px; color: var(--ink); outline: 0; }
.finder-input:focus-within, .finder-select:focus-within { border-color: var(--accent); }
.btn-accent { display: inline-grid; place-items: center; padding: 0 26px; height: 50px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-weight: 600; white-space: nowrap; }
.btn-accent:hover { filter: brightness(1.05); }

/* ---------- register board ---------- */
.board { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; align-items: start; padding-bottom: 56px; }
.board-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 6px 4px 12px; }
.board-head h2 { font-size: 20px; margin: 0; }
.group { margin-bottom: 22px; }
.group-head { display: flex; align-items: center; gap: 10px; margin: 0 4px 8px; font-weight: 600; font-size: 15px; }
.group-head .count { font-size: 12px; font-weight: 500; color: var(--muted); background: var(--surface-2); border-radius: 999px; padding: 1px 9px; }
.group-head .line { flex: 1; height: 1px; background: var(--line); }

.row { display: grid; grid-template-columns: 44px 52px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 12px 16px; border-radius: var(--radius); margin-bottom: 6px; background: var(--surface); border: 1px solid transparent; transition: background .15s, border-color .15s; }
.row:hover { border-color: var(--line); }
.rank { color: var(--muted); font-weight: 500; font-size: 15px; text-align: center; }
.avatar { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; font-weight: 700; font-size: 20px; color: #fff; overflow: hidden; }
.who { min-width: 0; }
.who .name { font-weight: 600; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who .meta { font-size: 12.5px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 8px; }
.who .meta span + span::before { content: "·"; margin-right: 8px; }
.role { font-weight: 600; color: var(--accent); font-size: 14px; text-align: right; white-space: nowrap; }
.empty { text-align: center; padding: 40px 16px; color: var(--muted); background: var(--surface); border-radius: var(--radius); }
mark { background: color-mix(in srgb, var(--accent) 25%, transparent); color: inherit; border-radius: 3px; }
.note { font-size: 13px; background: var(--surface-2); border-radius: 14px; padding: 12px 16px; margin: 8px 0 0; }

.board-side { position: sticky; top: 132px; display: grid; gap: 14px; }
.side-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.side-head { display: flex; justify-content: space-between; align-items: center; font-weight: 600; margin-bottom: 6px; }
.link { background: none; border: 0; padding: 0; color: var(--accent); font-size: 13px; font-weight: 500; }
.side-list { list-style: none; margin: 0; padding: 0; }
.side-list button { width: 100%; display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 6px 4px; background: none; border: 0; border-radius: 8px; font-size: 13.5px; text-align: left; }
.side-list button:hover { background: var(--surface-2); }
.side-list button.on { background: var(--accent-softer); }
.side-list .i { color: var(--muted); font-size: 12px; }
.side-list .t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-list .c { color: var(--accent); font-weight: 600; }
.side-stats { display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; padding: 14px 8px; }
.side-stats b { display: block; font-size: 22px; color: var(--accent); line-height: 1.2; }
.side-stats span { font-size: 12px; color: var(--muted); }

/* ---------- events + gallery ---------- */
.section-head { margin-bottom: 20px; }
.section-head h2 { font-size: clamp(24px, 4vw, 32px); margin: 4px 0 4px; letter-spacing: -.3px; }
.section-head p { margin: 0; }
.eyebrow { font-size: 13px; font-weight: 600; color: var(--accent); }
.events { padding-top: 24px; padding-bottom: 56px; border-top: 1px solid var(--line); }
.event { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 18px; margin-bottom: 20px; }
.event-head { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; align-items: start; margin-bottom: 16px; }
.datebox { background: var(--accent-soft); color: var(--accent); border-radius: 14px; padding: 8px 14px; text-align: center; font-weight: 700; line-height: 1.2; }
.datebox .d { font-size: 26px; display: block; }
.datebox .m { font-size: 12px; font-weight: 600; }
.event h3 { margin: 0 0 2px; font-size: 19px; }
.event .meta { font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.event p { margin: 0; font-size: 14px; }
.photos { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 150px; gap: 8px; }
.photos button { padding: 0; border: 0; border-radius: 12px; overflow: hidden; background: var(--surface-2); position: relative; }
.photos button:nth-child(1) { grid-column: span 2; grid-row: span 2; }
.photos button:nth-child(8n + 6) { grid-row: span 2; }
.photos img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.photos button:hover img { transform: scale(1.04); }
.photos .more { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0,0,0,.5); color: #fff; font-weight: 600; font-size: 18px; }
.show-all { margin-top: 12px; }
.btn-ghost { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 8px 18px; font-weight: 600; font-size: 14px; color: var(--accent); }
.btn-ghost:hover { background: var(--accent-softer); }


.footer { border-top: 1px solid var(--line); padding: 20px 0; font-size: 13px; }
.footer-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.footer .brand-name { font-size: 14px; }

/* ---------- name correction ---------- */
.small { font-size: 12.5px; }
.fix-btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); border-radius: 999px; padding: 5px 12px; font-size: 12.5px; font-weight: 500; white-space: nowrap; }
.fix-btn:hover { color: var(--accent); border-color: var(--accent); }
.fix-btn[data-sent] { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, var(--line)); }
.tag-fixed { font-size: 11px; font-weight: 500; color: var(--ok); margin-left: 4px; }
.row-sm { grid-template-columns: 44px minmax(0, 1fr) auto; padding: 8px 16px; }
.board-main .note { margin: 0 0 16px; }

.roles { padding-bottom: 40px; }
.roles-box { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 16px 18px; }
.roles-box summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.roles-box summary::-webkit-details-marker { display: none; }
.roles-box summary > span:first-child { display: grid; }
.roles-title { font-size: 20px; font-weight: 600; }
.roles-box[open] summary { margin-bottom: 16px; }
.roles-box[open] summary .btn-ghost { font-size: 0; }
.roles-box[open] summary .btn-ghost::after { content: "बंद करें"; font-size: 14px; }
.roles-box .row { background: var(--surface-2); }

.modal { position: fixed; inset: 0; z-index: 60; background: rgba(20, 16, 12, .5); display: grid; place-items: center; padding: 16px; }
.modal[hidden] { display: none; }
.modal-card { position: relative; width: min(500px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: var(--surface); color: var(--ink); border-radius: 22px; padding: 22px; box-shadow: 0 20px 60px -20px rgba(0,0,0,.45); }
.modal-card h3 { margin: 0 0 2px; font-size: 20px; }
.modal-x { position: absolute; top: 12px; right: 12px; }
.field { display: grid; gap: 4px; margin-top: 12px; font-size: 13px; font-weight: 500; }
.field em { color: var(--accent); font-style: normal; }
.field input, .field textarea { font: inherit; font-size: 15px; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; outline: 0; resize: vertical; }
.field input:focus, .field textarea:focus { border-color: var(--accent); }
.field input[readonly] { color: var(--muted); }
.missing { font-style: normal; opacity: .75; }
.field select { font: inherit; font-size: 15px; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; outline: 0; }
.field select:focus { border-color: var(--accent); }
.field-group { border: 1px solid var(--line); border-radius: 16px; padding: 4px 14px 14px; margin: 14px 0 0; min-width: 0; }
.field-group legend { font-size: 13px; font-weight: 600; color: var(--accent); padding: 0 6px; }
.member-fields[hidden], .field[hidden] { display: none; }
.combo { position: relative; }
.combo > label { font-size: 13px; font-weight: 500; }
.combo small { font-size: 11.5px; font-weight: 400; }
.combo-list { position: absolute; z-index: 5; left: 0; right: 0; top: 64px; margin: 0; padding: 4px; list-style: none; max-height: 240px; overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.combo-list[hidden] { display: none; }
.combo-list li { padding: 7px 10px; border-radius: 8px; cursor: pointer; display: flex; justify-content: space-between; gap: 10px; font-size: 14px; }
.combo-list li span { color: var(--muted); font-size: 12px; white-space: nowrap; }
.combo-list li b { font-weight: 500; }
.combo-list li:hover, .combo-list li.active { background: var(--accent-softer); }
.combo-list .combo-other { color: var(--accent); font-size: 13px; border-top: 1px solid var(--line); border-radius: 0 0 8px 8px; }
.combo-list .combo-empty { color: var(--muted); cursor: default; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-msg { min-height: 1em; font-size: 13.5px; margin: 8px 0 0; }
.form-msg[data-kind="ok"] { color: var(--ok); }
.form-msg[data-kind="err"] { color: #c2410c; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 14px; }
.modal-actions .btn-accent { height: 42px; border: 0; font: inherit; font-weight: 600; cursor: pointer; }
.btn-accent:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- feedback ---------- */
.fab { position: fixed; right: 20px; bottom: 20px; z-index: 30; display: inline-flex; align-items: center; gap: 8px; border: 0; border-radius: 999px; padding: 12px 18px; background: var(--accent); color: var(--accent-ink); font-weight: 600; font-size: 14px; box-shadow: 0 10px 28px -8px rgba(226, 103, 63, .6); }
.fab:hover { filter: brightness(1.06); transform: translateY(-1px); }
.kind-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.kind-chips label { cursor: pointer; }
.kind-chips input { position: absolute; opacity: 0; pointer-events: none; }
.kind-chips span { display: inline-block; border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 500; background: var(--bg); }
.kind-chips input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.kind-chips input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.field > span { font-size: 13px; font-weight: 500; }
@media (max-width: 720px) {
  .fab { right: 14px; bottom: 14px; padding: 11px 14px; }
  .footer { padding-bottom: 76px; }
}

/* ---------- lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 50; background: rgba(12, 10, 8, .92); display: grid; place-items: center; padding: 16px; }
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; max-width: min(1100px, 100%); }
.lightbox img { max-height: 82vh; border-radius: 10px; margin: 0 auto; }
.lightbox figcaption { color: #d9d2c9; text-align: center; font-size: 13px; margin-top: 10px; }
.lb-btn { position: absolute; background: rgba(255,255,255,.1); border: 0; color: #fff; width: 44px; height: 44px; border-radius: 50%; font-size: 24px; display: grid; place-items: center; }
.lb-btn:hover { background: rgba(255,255,255,.22); }
.lb-close { top: 16px; right: 16px; font-size: 18px; }
.lb-prev { left: 16px; top: 50%; translate: 0 -50%; }
.lb-next { right: 16px; top: 50%; translate: 0 -50%; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .status-pill { display: none; }
  .board { grid-template-columns: 1fr; }
  .board-side { position: static; order: -1; grid-template-columns: 1fr; }
  .board-side .side-card:first-child { display: none; }
}
@media (max-width: 720px) {
  html { scroll-padding-top: 118px; }
  .nav { display: none; }
  .icon-btn#searchJump { margin-left: auto; }
  .brand-name { font-size: 16px; }
  .finder { flex-direction: column; }
  .finder-select { width: 100%; }
  .row { grid-template-columns: 28px 44px minmax(0, 1fr); gap: 10px; padding: 10px 12px; }
  .rank { font-size: 14px; }
  .avatar { width: 44px; height: 44px; font-size: 17px; border-radius: 12px; }
  .row .fix-btn { grid-column: 3; justify-self: start; margin-top: -4px; padding: 3px 10px; }
  .row-sm { grid-template-columns: 28px minmax(0, 1fr); }
  .row-sm .fix-btn { grid-column: 2; }
  .who .name { font-size: 15px; }
  .photos { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 120px; }
  .photos button:nth-child(8n + 6) { grid-row: span 1; }
  .event { padding: 14px; }
}

