:root {
  --bg: #faf5ec;
  --paper: #fffdf8;
  --ink: #2b1d16;
  --muted: #7b6a5e;
  --line: #eadfcd;
  --maroon: #7a2418;
  --maroon-dark: #5c1a10;
  --saffron: #e2882b;
  --gold: #f4b740;
  --soft: #f6ead6;
  --danger: #b3261e;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(60, 30, 10, .06), 0 6px 20px rgba(60, 30, 10, .06);
  --sans: "Noto Sans", "Noto Sans Devanagari", system-ui, sans-serif;
  --serif: "Noto Serif Devanagari", Georgia, serif;
  --display: "Yatra One", "Noto Serif Devanagari", Georgia, serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 var(--sans); min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; padding-top: 28px; padding-bottom: 64px; outline: none; }
a { color: var(--maroon); }
img, video { max-width: 100%; }
.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
h1, h2, h3 { font-family: var(--serif); line-height: 1.25; margin: 0 0 .4em; }
h1 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); }
h2 { font-size: 1.35rem; }

/* header */
.site-header { background: var(--maroon); color: #fff; position: sticky; top: 0; z-index: 20; box-shadow: 0 2px 10px rgba(0,0,0,.12); }
.site-header::after { content: ""; display: block; height: 4px; background: linear-gradient(90deg, var(--saffron), var(--gold), var(--saffron)); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; }
.brand-mark { width: 40px; height: 40px; display: block; flex: none; filter: drop-shadow(0 1px 3px rgba(0,0,0,.25)); }
.brand-text { font-family: var(--display); font-size: 1.45rem; letter-spacing: .3px; }
.brand-text em { font-style: normal; color: var(--gold); }
.nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.nav a, .nav button { color: #fff; text-decoration: none; padding: 8px 12px; border-radius: 999px; font: 500 .95rem var(--sans); background: none; border: 0; cursor: pointer; }
.nav a:hover, .nav button:hover { background: rgba(255,255,255,.12); }
.nav .cta { background: var(--gold); color: var(--maroon-dark); font-weight: 700; }
.nav .cta:hover { background: #ffc95a; }
.nav .who { opacity: .85; font-size: .9rem; padding: 8px 6px; }

/* footer */
.site-footer { border-top: 1px solid var(--line); padding: 20px 0; font-size: .9rem; }
.site-footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }

/* buttons & inputs */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; border-radius: 999px; border: 1px solid transparent; font: 600 .95rem var(--sans); cursor: pointer; text-decoration: none; background: var(--maroon); color: #fff; transition: background .15s, transform .05s; }
.btn:hover { background: var(--maroon-dark); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--maroon); border-color: var(--line); }
.btn.ghost:hover { background: var(--soft); }
.btn.saffron { background: var(--saffron); }
.btn.saffron:hover { background: #c97319; }
.btn.danger { background: transparent; color: var(--danger); border-color: #efc9c4; }
.btn.danger:hover { background: #fbecea; }
.btn.small { padding: 6px 12px; font-size: .85rem; }
.btn.rec { background: #c62828; }
label { font-weight: 600; font-size: .92rem; display: block; margin-bottom: 6px; }
input[type=text], input[type=password], input[type=email], input[type=url], input[type=search], input[type=date], input[type=time], input[type=month], select, textarea {
  width: 100%; padding: 11px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); font: inherit; color: inherit;
}
input:focus, select:focus, textarea:focus, .editor:focus { outline: 2px solid var(--saffron); outline-offset: 1px; border-color: transparent; }
textarea { min-height: 90px; resize: vertical; }
.field { margin-bottom: 18px; }
.hint { font-size: .85rem; color: var(--muted); margin-top: 6px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.grid-2 { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; }
@media (max-width: 640px) { .grid-2 { grid-template-columns: 1fr; } }

/* hero & search */
.hero { background: radial-gradient(120% 140% at 100% 0%, #fbe3bd 0%, transparent 55%), var(--paper); border: 1px solid var(--line); border-radius: 22px; padding: clamp(22px, 4vw, 40px); box-shadow: var(--shadow); margin-bottom: 26px; position: relative; overflow: hidden; }
.hero h1 { font-family: var(--display); font-weight: 400; color: var(--maroon); }
.hero p { margin: 0 0 20px; color: var(--muted); max-width: 60ch; }
.hero::after { content: "ॐ"; position: absolute; right: -10px; bottom: -70px; font-family: var(--serif); font-size: 260px; color: rgba(226, 136, 43, .09); pointer-events: none; }
.search { display: grid; grid-template-columns: 1fr 190px auto; gap: 10px; position: relative; z-index: 1; }
.search input { font-size: 1.05rem; padding: 13px 16px; }
@media (max-width: 700px) { .search { grid-template-columns: 1fr; } }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; align-items: center; position: relative; z-index: 1; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); font: 500 .85rem var(--sans); cursor: pointer; text-decoration: none; }
.chip:hover { border-color: var(--saffron); }
.chip.on { background: var(--maroon); color: #fff; border-color: var(--maroon); }
.filters select { width: auto; padding: 6px 10px; border-radius: 999px; font-size: .85rem; }

.layout { display: grid; grid-template-columns: 1fr 300px; gap: 26px; align-items: start; }
@media (max-width: 900px) { .layout { grid-template-columns: 1fr; } .layout aside { order: -1; } }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.panel h3 { font-family: var(--sans); font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 12px; }
.tagcloud { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; background: var(--soft); color: var(--maroon-dark); font-size: .82rem; text-decoration: none; border: 1px solid transparent; }
.tag:hover { border-color: var(--saffron); }
.tag small { color: var(--muted); }
.active-filter { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; font-size: .95rem; }

.results-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; gap: 10px; flex-wrap: wrap; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; text-decoration: none; color: inherit; transition: transform .15s, box-shadow .15s; }
.card:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(60, 30, 10, .12); }
.thumb { aspect-ratio: 16 / 9; background: linear-gradient(135deg, var(--maroon), #a8361f 60%, var(--saffron)); display: grid; place-items: center; overflow: hidden; position: relative; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb .letter { font-family: var(--serif); font-size: 2rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: rgba(255,255,255,.92); text-shadow: 0 2px 10px rgba(0,0,0,.2); padding: 0 16px; text-align: center; line-height: 1.1; }
.thumb .play { position: absolute; width: 46px; height: 46px; border-radius: 50%; background: rgba(0,0,0,.55); display: grid; place-items: center; color: #fff; font-size: 18px; }
.card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-title { font-family: var(--serif); font-weight: 600; font-size: 1.12rem; line-height: 1.3; }
.card-meta { font-size: .82rem; color: var(--muted); }
.card .snippet { font-size: .86rem; color: #5a4a40; background: #fff7e8; border-left: 3px solid var(--gold); padding: 6px 8px; border-radius: 4px; white-space: pre-line; }
mark { background: #ffe08a; color: inherit; padding: 0 1px; border-radius: 2px; }
.badges { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; padding-top: 6px; }
.badge { font-size: .74rem; padding: 2px 8px; border-radius: 6px; background: #f1ece4; color: #5d4d42; font-weight: 600; }
.badge.y { background: #fde8e7; color: #b3261e; }
.pager { display: flex; justify-content: center; gap: 10px; margin-top: 28px; align-items: center; }
.empty { text-align: center; padding: 50px 20px; color: var(--muted); }
.empty .big { font-family: var(--serif); font-size: 3rem; color: var(--saffron); }

/* bhajan page */
.bhajan-head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: flex-start; margin-bottom: 10px; }
.bhajan-head h1 { color: var(--maroon); }
.meta { color: var(--muted); font-size: .92rem; display: flex; gap: 6px 14px; flex-wrap: wrap; margin-bottom: 12px; }
.section { margin-top: 26px; }
.section > h2 { display: flex; align-items: center; gap: 10px; }
.section > h2::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.lyrics { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(18px, 4vw, 36px); font-family: var(--serif); font-size: 1.15rem; line-height: 1.9; box-shadow: var(--shadow); overflow-wrap: anywhere; }
.lyrics h1, .lyrics h2, .lyrics h3 { color: var(--maroon); }
.lyrics blockquote { margin: 12px 0; padding: 4px 16px; border-left: 4px solid var(--gold); background: #fff8ea; }
.lyrics img { max-width: 100%; height: auto; }
.lyrics p { margin: 0 0 .7em; }
.yt { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: #000; box-shadow: var(--shadow); }
.yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.media-list { display: grid; gap: 16px; }
.media-item { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; box-shadow: var(--shadow); }
.media-item video { width: 100%; border-radius: 10px; background: #000; max-height: 70vh; }
.media-item audio { width: 100%; }
.media-cap { font-size: .85rem; color: var(--muted); margin-top: 6px; display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.pdf-frame { width: 100%; height: 80vh; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.doc-preview { max-height: 75vh; overflow: auto; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.gallery button { padding: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; cursor: zoom-in; background: #fff; aspect-ratio: 3 / 4; }
.gallery img { width: 100%; height: 100%; object-fit: cover; display: block; }
pre.plain { white-space: pre-wrap; font-family: var(--serif); font-size: 1.05rem; line-height: 1.8; margin: 0; }

/* comments */
.comments { display: grid; gap: 12px; }
.comment { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.comment-head { display: flex; justify-content: space-between; gap: 8px; font-size: .86rem; color: var(--muted); margin-bottom: 4px; }
.comment-head b { color: var(--ink); }
.comment p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.comment-form textarea { min-height: 80px; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--saffron); color: #fff; display: inline-grid; place-items: center; font-weight: 700; font-size: .85rem; flex: none; }
.link-btn { background: none; border: 0; color: var(--danger); cursor: pointer; font: inherit; font-size: .8rem; padding: 0; }

/* form page */
.form-page { max-width: 860px; margin: 0 auto; }
.step { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 18px; box-shadow: var(--shadow); }
.step > h2 { font-size: 1.15rem; display: flex; align-items: center; gap: 10px; }
.step > h2 .num { width: 28px; height: 28px; border-radius: 50%; background: var(--maroon); color: #fff; display: inline-grid; place-items: center; font: 700 .9rem var(--sans); }
.step > p.muted { margin-top: -4px; font-size: .92rem; }
.tag-input { display: flex; flex-wrap: wrap; gap: 6px; padding: 7px 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); align-items: center; }
.tag-input:focus-within { outline: 2px solid var(--saffron); }
.tag-input input { border: 0; outline: 0; flex: 1; min-width: 140px; padding: 4px; background: transparent; }
.tag-input .tag button { border: 0; background: none; cursor: pointer; color: var(--maroon); padding: 0 0 0 2px; font-size: 1rem; line-height: 1; }
.toolbar { display: flex; flex-wrap: wrap; gap: 4px; padding: 6px; border: 1px solid var(--line); border-bottom: 0; border-radius: 10px 10px 0 0; background: #fbf4e8; }
.toolbar button, .toolbar select { border: 1px solid transparent; background: transparent; border-radius: 6px; padding: 5px 9px; cursor: pointer; font: 600 .88rem var(--sans); color: var(--ink); width: auto; }
.toolbar button:hover { background: #fff; border-color: var(--line); }
.toolbar .sep { width: 1px; background: var(--line); margin: 2px 4px; }
.toolbar .swatch { width: 22px; height: 22px; padding: 0; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); }
.editor { min-height: 260px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 0 0 10px 10px; background: #fff; font-family: var(--serif); font-size: 1.12rem; line-height: 1.85; overflow-wrap: anywhere; }
.editor:empty::before { content: attr(data-placeholder); color: #b2a294; }
.editor blockquote { margin: 10px 0; padding: 4px 14px; border-left: 4px solid var(--gold); background: #fff8ea; }
.dropzone { border: 2px dashed #dccbb1; border-radius: 12px; padding: 26px; text-align: center; background: #fffaf2; cursor: pointer; transition: background .15s, border-color .15s; }
.dropzone.over { background: #fff1d8; border-color: var(--saffron); }
.dropzone strong { color: var(--maroon); }
.file-list { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 8px; }
.file-list li { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font-size: .92rem; }
.file-list li .name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-list li.removed { opacity: .5; text-decoration: line-through; }
.file-list .k { font-size: .72rem; font-weight: 700; padding: 2px 7px; border-radius: 5px; background: var(--soft); color: var(--maroon-dark); text-transform: uppercase; }
.recorder { margin-top: 14px; border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: #fff; }
.recorder video { width: 100%; max-height: 360px; background: #111; border-radius: 10px; }
.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: #c62828; display: inline-block; animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .25; } }
.yt-list { display: grid; gap: 8px; margin-top: 10px; }
.yt-row { display: flex; gap: 12px; align-items: center; border: 1px solid var(--line); border-radius: 10px; padding: 8px; background: #fff; }
.yt-row img { width: 96px; aspect-ratio: 16/9; object-fit: cover; border-radius: 6px; background: #ddd; }
.yt-row span { flex: 1; font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.submit-bar { position: sticky; bottom: 0; background: linear-gradient(transparent, var(--bg) 30%); padding: 20px 0 10px; display: flex; gap: 12px; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
.progress { flex: 1; min-width: 160px; height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; }
.progress div { height: 100%; width: 0; background: linear-gradient(90deg, var(--saffron), var(--gold)); transition: width .2s; }
.error { color: var(--danger); background: #fbecea; border: 1px solid #efc9c4; padding: 10px 14px; border-radius: 10px; margin-bottom: 14px; }

/* auth */
.auth { max-width: 420px; margin: 20px auto; }
.auth .panel { padding: 28px; }
.auth h1 { font-family: var(--display); font-weight: 400; color: var(--maroon); }

/* profile */
.profile-head { display: flex; gap: 16px; align-items: center; margin-bottom: 20px; }
.profile-head .avatar { width: 64px; height: 64px; font-size: 1.6rem; }

/* toast & lightbox */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 999px; opacity: 0; transition: .25s; pointer-events: none; z-index: 60; font-size: .95rem; }
.toast.show { opacity: 1; transform: translateX(-50%); }
.lightbox { position: fixed; inset: 0; background: rgba(20, 10, 5, .9); display: grid; place-items: center; z-index: 50; padding: 20px; }
.lightbox[hidden] { display: none; }
.lightbox img { max-height: 92vh; max-width: 96vw; border-radius: 6px; }
.lightbox-close { position: absolute; top: 14px; right: 18px; font-size: 2.2rem; color: #fff; background: none; border: 0; cursor: pointer; }
.loading { padding: 60px 0; text-align: center; color: var(--muted); }

@media (max-width: 640px) {
  .header-inner { flex-direction: column; align-items: stretch; gap: 0; padding: 8px 0 6px; }
  .brand-text { font-size: 1.25rem; }
  .brand-mark { width: 32px; height: 32px; }
  .nav { flex-wrap: nowrap; overflow-x: auto; gap: 2px; margin: 0 -4px; scrollbar-width: none; }
  .nav a, .nav button { white-space: nowrap; padding: 6px 10px; font-size: .88rem; }
}

/* moderation */
.notice { background: #fff4dc; border: 1px solid #f1d79c; color: #6b4a0f; padding: 12px 16px; border-radius: 10px; }
.admin-link { position: relative; }
.admin-link .count { margin-left: 6px; background: var(--gold); color: var(--maroon-dark); border-radius: 999px; padding: 0 7px; font-size: .75rem; font-weight: 700; }
.muted-link { color: var(--muted); }
.btn.danger-solid { background: var(--danger); color: #fff; }
.btn.danger-solid:hover { background: #8f1d17; }
.dialog { border: 0; border-radius: 16px; padding: 24px; width: min(480px, 92vw); box-shadow: 0 20px 60px rgba(0,0,0,.25); background: var(--paper); color: var(--ink); }
.dialog::backdrop { background: rgba(30, 15, 5, .45); }
.reasons { border: 0; padding: 0; margin: 0 0 14px; display: grid; gap: 8px; }
.radio { font-weight: 500; display: flex; gap: 8px; align-items: center; margin: 0; cursor: pointer; }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 18px; }
.admin-list { display: grid; gap: 14px; }
.report-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.report-target { border-left: 3px solid var(--line); padding: 2px 0 2px 12px; margin: 8px 0 10px; display: grid; gap: 6px; }
.report-target p { margin: 0; }
.quote { white-space: pre-wrap; background: #faf6ef; padding: 8px 10px; border-radius: 8px; }
.report-reasons { margin: 0 0 12px; padding-left: 18px; font-size: .92rem; display: grid; gap: 4px; }
.pill { display: inline-block; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 2px 8px; border-radius: 6px; background: var(--soft); color: var(--maroon-dark); margin-left: 4px; }
.pill.admin { background: #e7efe1; color: #2e5d1f; }
.pill.pending { background: #fff1cf; color: #7a5600; }
.pill.banned { background: #fbe1df; color: #a42019; }
.user-row { display: grid; gap: 8px; }

/* ---------- panchang ---------- */
.small { font-size: .86rem; }
.small-input { width: auto; padding: 7px 10px; font-size: .9rem; }
.pill { display: inline-block; font-size: .7rem; font-weight: 700; padding: 2px 8px; border-radius: 6px; background: var(--soft); color: var(--maroon-dark); vertical-align: middle; }
.pc-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.pc-head h1 { font-family: var(--display); font-weight: 400; color: var(--maroon); margin: 0; }
.pc-place { display: flex; gap: 8px; align-items: center; }
.pc-place select { width: auto; max-width: 240px; padding: 8px 12px; }
.pc-hero { display: flex; gap: 22px; align-items: center; background: linear-gradient(135deg, #2b1a14, #5c1a10 60%, #7a2418); color: #fff; border-radius: 20px; padding: 22px 26px; box-shadow: var(--shadow); margin-bottom: 18px; position: relative; overflow: hidden; }
.pc-hero::after { content: ""; position: absolute; inset: auto -40px -60px auto; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, rgba(244,183,64,.25), transparent 70%); }
.pc-hero h2 { font-family: var(--serif); font-size: clamp(1.5rem, 3vw, 2.1rem); margin: 4px 0 2px; color: #fff; }
.pc-hero .muted { color: #f1d9c9; }
.pc-hero .pill { background: rgba(255,255,255,.15); color: #fff; }
.pc-live { font-size: .85rem; color: var(--gold); font-weight: 600; display: flex; align-items: center; gap: 8px; }
.pc-live .dot { width: 8px; height: 8px; border-radius: 50%; background: #5ee08a; box-shadow: 0 0 0 0 rgba(94,224,138,.6); animation: livepulse 2s infinite; }
@keyframes livepulse { 0% { box-shadow: 0 0 0 0 rgba(94,224,138,.6); } 70% { box-shadow: 0 0 0 8px rgba(94,224,138,0); } 100% { box-shadow: 0 0 0 0 rgba(94,224,138,0); } }
.pc-today-fest { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.fest-pill { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: .82rem; font-weight: 600; background: var(--gold); color: var(--maroon-dark); }
.fest-pill.ekadashi { background: #e7efe1; color: #2e5d1f; }
.fest-pill.purnima, .fest-pill.amavasya, .fest-pill.sankranti { background: #f1ece4; color: #5d4d42; }
.fest-pill.pradosh, .fest-pill.chaturthi, .fest-pill.shivaratri { background: #e9e6f5; color: #3f347a; }
.pc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 14px; }
.pc-grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .pc-grid { grid-template-columns: repeat(2, 1fr); } .pc-grid-3 { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .pc-grid { grid-template-columns: 1fr; } .pc-hero { flex-direction: column; text-align: center; } .pc-live { justify-content: center; } .pc-today-fest { justify-content: center; } }
.pc-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.pc-label { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; margin-bottom: 6px; }
.pc-value { font-family: var(--serif); font-size: 1.3rem; font-weight: 600; color: var(--maroon); }
.pc-value .muted { font-family: var(--sans); font-size: .85rem; font-weight: 500; }
.pc-bar { height: 5px; background: var(--line); border-radius: 99px; margin: 10px 0 6px; overflow: hidden; }
.pc-bar div { height: 100%; background: linear-gradient(90deg, var(--saffron), var(--gold)); }
.pc-sub { font-size: .88rem; }
.pc-next { font-size: .82rem; color: var(--muted); margin-top: 6px; border-top: 1px dashed var(--line); padding-top: 6px; }
.pc-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.pc-list li { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; border-bottom: 1px solid #f3ebdd; font-size: .92rem; }
.pc-list li:last-child { border-bottom: 0; }
.pc-list li span:last-child { font-weight: 600; text-align: right; }
.periods li { padding: 6px 8px; border-radius: 8px; border-bottom: 0; }
.periods li.good { background: #f1f7ec; }
.periods li.bad { background: #fcf0ee; }
.periods li.live { outline: 2px solid var(--saffron); }
.now-pill { background: var(--saffron); color: #fff; font-size: .68rem; padding: 1px 6px; border-radius: 6px; margin-left: 4px; }
.key { display: inline-block; width: 10px; height: 10px; border-radius: 3px; vertical-align: middle; margin: 0 4px 0 8px; }
.key.good { background: #cfe5c1; } .key.bad { background: #f3cbc5; }
.key.purnima { background: #fbe7b0; } .key.amavasya { background: #3a2a22; } .key.ekadashi { background: #cfe5c1; }
.pc-upcoming { display: grid; gap: 10px; }
.pc-up { display: flex; align-items: center; gap: 14px; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; }
.pc-up-date { width: 52px; text-align: center; background: var(--soft); border-radius: 10px; padding: 4px 0; line-height: 1.1; flex: none; }
.pc-up-date b { display: block; font-size: 1.3rem; color: var(--maroon); font-family: var(--serif); }
.pc-up-date span { font-size: .75rem; text-transform: uppercase; color: var(--muted); }
.pc-up-main { flex: 1; min-width: 0; }
.pc-up-name { font-weight: 600; }
.small-chip { padding: 4px 10px; font-size: .8rem; white-space: nowrap; }
.moon { display: block; flex: none; }

/* calendar */
.cal-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal-dow { text-align: center; font-size: .78rem; font-weight: 700; color: var(--muted); text-transform: uppercase; padding: 4px 0; }
.cal-cell { min-height: 108px; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 6px 7px; text-align: left; font: inherit; color: inherit; cursor: pointer; display: flex; flex-direction: column; gap: 2px; overflow: hidden; }
.cal-cell:hover { border-color: var(--saffron); }
.cal-cell.empty { background: transparent; border: 0; cursor: default; }
.cal-cell.today { outline: 2px solid var(--maroon); }
.cal-cell.purnima { background: #fff8e6; }
.cal-cell.amavasya { background: #f4efe8; }
.cal-top { display: flex; justify-content: space-between; align-items: center; }
.cal-num { font-weight: 700; font-size: 1.05rem; }
.cal-tithi { font-size: .78rem; color: var(--maroon-dark); font-weight: 600; }
.cal-nak { font-size: .72rem; color: var(--muted); }
.cal-fest { font-size: .74rem; background: var(--gold); color: var(--maroon-dark); border-radius: 5px; padding: 1px 5px; font-weight: 600; line-height: 1.3; }
.cal-vrat { font-size: .72rem; border-radius: 5px; padding: 1px 5px; background: #f1ece4; color: #5d4d42; line-height: 1.3; }
.cal-vrat.ekadashi { background: #e7efe1; color: #2e5d1f; }
.cal-more { font-size: .7rem; color: var(--muted); }
.t-short { display: none; }
@media (max-width: 700px) {
  .cal-grid { gap: 3px; }
  .cal-cell { min-height: 70px; padding: 4px; }
  .cal-nak, .cal-vrat { display: none; }
  .cal-tithi { font-size: .62rem; }
  .cal-fest { font-size: .6rem; padding: 0 3px; }
  .cal-top .moon { display: none; }
  .t-long { display: none; }
  .t-short { display: inline; }
  .cal-fest { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .pc-place { width: 100%; }
  .pc-place select { flex: 1; max-width: none; }
  .geo-label { display: none; }
}
.day-dialog { width: min(640px, 94vw); max-height: 90vh; overflow: auto; }
.pc-table { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: .92rem; }
.pc-table th { text-align: left; width: 34%; color: var(--muted); font-weight: 600; vertical-align: top; padding: 7px 8px 7px 0; }
.pc-table td { padding: 7px 0; }
.pc-table tr { border-bottom: 1px solid #f3ebdd; }

/* festival list */
.fest-controls { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin-bottom: 8px; }
.fest-month h2 { margin-top: 22px; }
.fest-list { display: grid; gap: 8px; }
.fest-row { display: flex; align-items: center; gap: 14px; background: var(--paper); border: 1px solid var(--line); border-left: 4px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.fest-row.major { border-left-color: var(--saffron); }
.fest-row.ekadashi { border-left-color: #7bb36a; }
.fest-row.purnima { border-left-color: var(--gold); }
.fest-row.amavasya { border-left-color: #3a2a22; }
.fest-row.past { opacity: .55; }
.fest-row.next { outline: 2px solid var(--saffron); }
.fest-date { width: 46px; text-align: center; flex: none; line-height: 1.1; }
.fest-date b { display: block; font-size: 1.35rem; font-family: var(--serif); color: var(--maroon); }
.fest-date span { font-size: .72rem; text-transform: uppercase; color: var(--muted); }
.fest-main { flex: 1; min-width: 0; }
.fest-name { font-weight: 600; }
.fest-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 640px) { .fest-row { flex-wrap: wrap; } .fest-actions { width: 100%; justify-content: flex-start; padding-left: 60px; } }

/* PDF viewer */
.pdf-view { background: #ede6da; border-radius: 10px; padding: 10px; max-height: 85vh; overflow: auto; }
.pdf-bar { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; position: sticky; top: -10px; background: #ede6da; padding: 4px 0; z-index: 2; }
.pdf-pages { display: grid; gap: 12px; }
.pdf-page { position: relative; width: 100%; max-width: 900px; margin: 0 auto; background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,.15); }
.pdf-page canvas { display: block; width: 100%; height: 100%; }
.pdf-link { position: absolute; display: block; border-radius: 3px; z-index: 1; }
.pdf-link:hover, .pdf-link:focus-visible { background: rgba(226,136,43,.18); outline: 2px solid rgba(226,136,43,.6); }

/* ---------- events ---------- */
.ev-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
@media (max-width: 960px) { .ev-layout { grid-template-columns: 1fr; } }
.ev-cell { cursor: default; min-height: 96px; }
.ev-cell.past { opacity: .7; }
.ev-add { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; text-decoration: none; color: var(--muted); font-weight: 700; opacity: 0; }
.ev-cell:hover .ev-add { opacity: 1; background: var(--soft); color: var(--maroon); }
.cal-festnote { font-size: .66rem; color: #8a5a00; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev-chip { display: block; font-size: .74rem; background: var(--maroon); color: #fff; border-radius: 5px; padding: 2px 5px; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.35; }
.ev-chip:hover { background: var(--maroon-dark); }
.ev-chip.cancelled { background: #bbb; text-decoration: line-through; }
.ev-time { opacity: .8; font-size: .68rem; }
.ev-list { display: grid; gap: 10px; }
.ev-card { display: flex; gap: 12px; align-items: center; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; text-decoration: none; color: inherit; box-shadow: var(--shadow); }
.ev-card:hover { border-color: var(--saffron); }
.ev-card.cancelled { opacity: .6; }
.ev-card-date { width: 50px; text-align: center; background: var(--maroon); color: #fff; border-radius: 10px; padding: 5px 0; line-height: 1.1; flex: none; }
.ev-card-date b { display: block; font-size: 1.35rem; font-family: var(--serif); }
.ev-card-date span { font-size: .72rem; text-transform: uppercase; color: var(--gold); }
.ev-card-main { flex: 1; min-width: 0; }
.ev-card-title { font-weight: 600; font-family: var(--serif); font-size: 1.05rem; }
.ev-card-stats { display: grid; gap: 4px; justify-items: end; }
.pill.potluck { background: #fff1d8; color: #8a5a00; }
.ev-mini { display: grid; gap: 8px; }
.ev-mini a { display: grid; text-decoration: none; color: inherit; padding: 6px 8px; border-radius: 8px; background: #fbf6ee; }
.ev-mini a:hover { background: var(--soft); }
.ev-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; margin-top: 10px; }
@media (max-width: 820px) { .ev-grid { grid-template-columns: 1fr; } }
.ev-row { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid #f3ebdd; }
.ev-row:last-child { border-bottom: 0; }
.ev-ico { font-size: 1.2rem; width: 26px; flex: none; text-align: center; }
.ev-desc { white-space: pre-wrap; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.ev-counts { display: flex; gap: 18px; font-size: 1.05rem; margin-bottom: 12px; }
.ev-counts b { font-size: 1.5rem; color: var(--maroon); font-family: var(--serif); }
.rsvp-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.ev-people { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 8px; max-height: 320px; overflow: auto; }
.ev-people li { display: flex; gap: 8px; align-items: flex-start; font-size: .92rem; }
.potluck { display: grid; gap: 10px; }
.dish { display: flex; gap: 14px; align-items: center; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.dish.full { background: #f7fbf3; border-color: #d6e8cb; }
.dish-main { flex: 1; min-width: 0; }
.dish-name { font-weight: 600; }
.dish-bar { height: 6px; background: var(--line); border-radius: 99px; margin: 6px 0 4px; overflow: hidden; max-width: 260px; }
.dish-bar div { height: 100%; background: linear-gradient(90deg, #7bb36a, #a6d18f); }
.dish-people { list-style: none; padding: 0; margin: 6px 0 0; font-size: .88rem; display: grid; gap: 2px; }
.dish-people .link-btn { margin-left: 8px; }
.other-dish { margin-top: 16px; background: var(--paper); border: 1px dashed #dccbb1; border-radius: 12px; padding: 14px; }
.other-dish input { min-width: 0; }
.ev-when { display: grid; grid-template-columns: 1.2fr 1fr 1fr 1.6fr; gap: 12px; }
@media (max-width: 700px) { .ev-when { grid-template-columns: 1fr 1fr; } }
.menu-rows { display: grid; gap: 8px; }
.menu-row { display: flex; gap: 8px; align-items: center; }
.menu-row input { flex: 1; }
@media (max-width: 640px) { .dish { flex-wrap: wrap; } .other-dish .row { flex-wrap: wrap !important; } }

/* ---------- installable app / mobile shell ---------- */
.site-header { padding-top: env(safe-area-inset-top); }
.app-back { display: none; background: none; border: 0; color: #fff; font-size: 2rem; line-height: 1; padding: 0 10px 4px 0; cursor: pointer; }
.app-back:not([hidden]) { display: block; }
.header-inner { position: relative; }
.tabbar { display: none; }
.tab-dot { position: absolute; top: 6px; right: 14%; width: 9px; height: 9px; border-radius: 50%; background: var(--gold); border: 2px solid #fff; }
.tab-dot[hidden] { display: none; }
.net-banner { position: fixed; left: 0; right: 0; top: 0; z-index: 70; background: #3a2a22; color: #fff; text-align: center; font-size: .85rem; padding: calc(6px + env(safe-area-inset-top)) 12px 6px; }
.net-banner[hidden] { display: none; }
.app-banner { position: fixed; left: 12px; right: 12px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 55; max-width: 520px; margin: 0 auto; display: flex; gap: 12px; align-items: center;
  background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 10px 12px; box-shadow: 0 10px 30px rgba(60,30,10,.2); }
.app-banner[hidden] { display: none; }
.app-banner img { width: 44px; height: 44px; border-radius: 10px; flex: none; }
.app-banner > div { flex: 1; min-width: 0; }
.ios-share { display: inline-block; transform: rotate(-90deg); }
.me-page { max-width: 560px; margin: 0 auto; }
.me-list { display: grid; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.me-list a, .me-list button { display: flex; align-items: center; gap: 10px; padding: 15px 16px; border: 0; border-bottom: 1px solid #f3ebdd; background: none; font: 500 1rem var(--sans); color: var(--ink); text-decoration: none; text-align: left; cursor: pointer; }
.me-list a:last-child, .me-list button:last-child { border-bottom: 0; }
.me-list a:hover, .me-list button:hover { background: #fbf6ee; }
.me-list .count { background: var(--gold); color: var(--maroon-dark); border-radius: 999px; padding: 0 7px; font-size: .75rem; font-weight: 700; margin-left: auto; }
.me-list .count[hidden] { display: none; }
.danger-text { color: var(--danger) !important; }

@media (max-width: 700px) {
  .site-header .nav { display: none; }
  .header-inner { min-height: 54px; justify-content: flex-start; flex-direction: row; align-items: center; padding: 0; gap: 4px; }
  .app-back { order: -1; }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    background: rgba(255, 253, 248, .97); backdrop-filter: blur(8px); border-top: 1px solid var(--line); padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 5px 0; text-decoration: none; color: var(--muted); font-size: .68rem; font-weight: 600; }
  .tabbar a.on { color: var(--maroon); }
  .tabbar .ti { font-size: 1.25rem; line-height: 1.2; filter: grayscale(.6); }
  .tabbar a.on .ti { filter: none; }
  .tabbar .tab-create { justify-content: center; }
  .tabbar .tab-create .ti { width: 46px; height: 46px; border-radius: 50%; background: var(--saffron); color: #fff; display: grid; place-items: center; font-size: 1.6rem; margin-top: -18px; box-shadow: 0 4px 12px rgba(226,136,43,.45); filter: none; }
  .tab-avatar { width: 24px; height: 24px; border-radius: 50%; background: var(--saffron); color: #fff; display: inline-grid; place-items: center; font-size: .75rem; }
  body { padding-bottom: calc(66px + env(safe-area-inset-bottom)); }
  .site-footer { display: none; }
  .app-banner { bottom: calc(76px + env(safe-area-inset-bottom)); }
  .toast { bottom: calc(84px + env(safe-area-inset-bottom)); }
  .submit-bar { bottom: calc(60px + env(safe-area-inset-bottom)); }
  main { padding-top: 16px; }
}
/* Installed app: no hover-only affordances, no text-selection highlight on taps. */
@media (display-mode: standalone) {
  body { -webkit-tap-highlight-color: transparent; overscroll-behavior-y: none; }
}

/* public / private files */
.vis-select { width: auto; padding: 5px 8px; font-size: .82rem; border-radius: 8px; }
.file-list li.is-private { background: #f6f3fb; border-color: #dcd3ee; }
.pill.private { background: #ece6f7; color: #4b3a7a; text-transform: none; font-size: .74rem; }
.vis-hint { background: #faf6ef; border-radius: 8px; padding: 8px 10px; }
.gallery button { position: relative; }
.gallery button.is-private { outline: 2px dashed #a99ad1; outline-offset: -2px; }
.lock-badge { position: absolute; top: 6px; right: 6px; background: rgba(255,255,255,.9); border-radius: 6px; padding: 1px 5px; font-size: .85rem; }
@media (max-width: 640px) { .file-list li { flex-wrap: wrap; } .file-list li .name { flex-basis: 60%; } }

/* ---------- Namaste greeting & Bhagavad Gita verse of the day ---------- */
.hero p.namaste { margin: 0 0 6px; color: var(--maroon); font-size: 1.05rem; }
.hero p.namaste strong { font-weight: 600; }
/* Gita verse card sits at the top of the right-hand column */
.gita { text-align: center; background: linear-gradient(180deg, #fff8ec, var(--paper)); border-top: 3px solid var(--saffron); }
.gita-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 8px; }
.gita-label { font-family: var(--serif); color: var(--maroon); font-size: .95rem; font-weight: 600; line-height: 1.3; }
.gita-ref { color: var(--muted); font-size: .76rem; line-height: 1.35; }
.gita-nav { flex: none; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line); background: #fff; color: var(--maroon); font-size: 1.1rem; line-height: 1; cursor: pointer; padding: 0; }
.gita-nav:hover, .gita-nav:focus-visible { background: #fbe3bd; }
.gita-speaker { font-family: var(--serif); color: var(--saffron); font-size: .82rem; margin-bottom: 2px; }
.gita-sa { margin: 0 0 6px; font-family: "Noto Serif Devanagari", "Tiro Devanagari Sanskrit", var(--serif); font-size: .98rem; line-height: 1.6; color: var(--maroon-dark); }
.gita-tr { margin: 0 0 8px; font-style: italic; color: var(--muted); font-size: .78rem; line-height: 1.45; }
.gita-meaning { margin: 0 0 8px; font-size: .88rem; line-height: 1.5; }
.gita-ex { text-align: left; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; font-size: .84rem; }
.gita-ex summary { cursor: pointer; color: var(--maroon); font-weight: 600; }
.gita-ex p { margin: 6px 0 2px; line-height: 1.5; }
.gita-foot { margin-top: 8px; display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
