/* Marathi Calendar — "Paithani" design system.
   Signature: the zari border (gold narli triangles on Paithani purple) at the top and bottom of every page.
   Calendar pages borrow the Marathi wall calendar: big numerals, Sundays and holidays in red, tithi in every cell. */
:root {
  --paper: #fbf7f0; --card: #ffffff; --ink: #221a2b; --muted: #6a5f73; --line: #e8dfd0; --soft: #f4ede2;
  --paithani: #4a1a5c; --paithani-2: #f1e6f4; --rani: #b0215a; --rani-2: #fbe7ef; --zari: #b98518; --zari-2: #f6ead0;
  --mor: #0d6b5b; --mor-2: #e2f2ee; --red: #c0262d; --red-2: #fdeaea; --moon: #37468f; --moon-2: #e9ecf8;
  --shadow: 0 1px 2px rgb(34 26 43 / .06), 0 8px 24px -12px rgb(34 26 43 / .18);
  --radius: 14px; --radius-s: 8px; --wrap: 74rem; --tabbar: 64px;
  --f: "Mukta", system-ui, -apple-system, "Segoe UI", "Noto Sans Devanagari", sans-serif;
  --fd: "Tiro Devanagari Marathi", "Mukta", Georgia, serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #15101a; --card: #1e1724; --ink: #f1eaf4; --muted: #b3a8bb; --line: #33293b; --soft: #251d2c;
    --paithani: #d6a7ea; --paithani-2: #2f2139; --rani: #f47aa6; --rani-2: #3a1d2a; --zari: #e6b84e; --zari-2: #33291a;
    --mor: #59c9b0; --mor-2: #16302b; --red: #ff8a86; --red-2: #3a1c1f; --moon: #a8b5f5; --moon-2: #222844;
    --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 10px 28px -14px rgb(0 0 0 / .6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #15101a; --card: #1e1724; --ink: #f1eaf4; --muted: #b3a8bb; --line: #33293b; --soft: #251d2c;
  --paithani: #d6a7ea; --paithani-2: #2f2139; --rani: #f47aa6; --rani-2: #3a1d2a; --zari: #e6b84e; --zari-2: #33291a;
  --mor: #59c9b0; --mor-2: #16302b; --red: #ff8a86; --red-2: #3a1c1f; --moon: #a8b5f5; --moon-2: #222844;
  --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 10px 28px -14px rgb(0 0 0 / .6);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 1rem; }
body { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; margin: 0; background: var(--paper); color: var(--ink); font-family: var(--f); font-size: 1.0625rem; line-height: 1.6; overflow-x: hidden; }
img, svg { max-width: 100%; -webkit-user-drag: none; }
input, textarea, select, [contenteditable="true"] { -webkit-user-select: text; user-select: text; }
a { color: var(--rani); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--zari); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { line-height: 1.25; text-wrap: balance; }
h1 { font-family: var(--fd); font-weight: 400; font-size: clamp(1.8rem, 1.3rem + 2.2vw, 2.7rem); margin: .2em 0 .25em; letter-spacing: -.01em; }
h2 { font-family: var(--fd); font-weight: 400; font-size: clamp(1.35rem, 1.15rem + .8vw, 1.7rem); margin: 1.8em 0 .5em; }
h3 { font-size: 1.1rem; font-weight: 700; margin: 1.3em 0 .35em; }
p { margin: 0 0 1em; }
[lang="mr"] { font-family: var(--f); }
.mr { color: var(--muted); font-weight: 500; }
h1 .mr, h2 .mr { display: block; font-family: var(--fd); font-size: .62em; color: var(--rani); margin-top: .15em; letter-spacing: 0; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
@media (min-width: 700px) { .wrap { padding: 0 24px; } }
.skip { position: absolute; left: -999px; top: .5rem; background: var(--ink); color: var(--paper); padding: .5rem 1rem; z-index: 50; border-radius: 6px; }
.skip:focus { left: .5rem; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.small { font-size: .9rem; color: var(--muted); }
.lede { font-size: 1.15rem; color: var(--muted); max-width: 44rem; }
.num { font-variant-numeric: tabular-nums; }

/* Zari border — the signature */
.zari { height: 14px; background: #4a1a5c url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='14' viewBox='0 0 24 14'%3E%3Crect width='24' height='14' fill='%234a1a5c'/%3E%3Crect width='24' height='1.6' fill='%23d9a93f'/%3E%3Crect y='12.4' width='24' height='1.6' fill='%23d9a93f'/%3E%3Cpath d='M0 3.2 6 10.8 12 3.2Z' fill='%23d9a93f'/%3E%3Cpath d='M12 10.8 18 3.2 24 10.8Z' fill='%23c42a68'/%3E%3Ccircle cx='6' cy='5.4' r='1.1' fill='%234a1a5c'/%3E%3Ccircle cx='18' cy='8.6' r='1.1' fill='%23f3d98b'/%3E%3C/svg%3E") repeat-x; background-size: 24px 14px; }

/* Header */
.masthead { background: var(--card); border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; gap: 1rem; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--ink); flex-shrink: 0; }
.brand .mark { width: 40px; height: 40px; flex-shrink: 0; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font-family: var(--fd); font-weight: 400; font-size: 1.25rem; }
.brand-text span { font-size: .85rem; color: var(--rani); font-weight: 600; }
.nav { margin-left: auto; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: .15rem; }
.nav a { display: flex; flex-direction: column; align-items: center; padding: .35rem .6rem; border-radius: 10px; text-decoration: none; color: var(--ink); font-weight: 600; font-size: .95rem; line-height: 1.2; }
.nav a .mr { font-size: .78rem; font-weight: 500; }
.nav a:hover, .nav a[aria-current] { background: var(--paithani-2); color: var(--paithani); }
.bar-tools { display: flex; gap: .25rem; }
.icon-btn { width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--ink); display: grid; place-items: center; cursor: pointer; padding: 0; }
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn:hover { border-color: var(--paithani); color: var(--paithani); }
.desk-menu { display: none; }
@media (max-width: 1099px) {
  .nav { position: fixed; inset: auto 0 0 0; z-index: 40; background: var(--card); border-top: 1px solid var(--line); border-radius: 20px 20px 0 0; box-shadow: 0 -12px 40px rgb(0 0 0 / .2);
    padding: 1rem 16px calc(var(--tabbar) + 1rem + env(safe-area-inset-bottom, 0px)); transform: translateY(105%); transition: transform .25s ease; visibility: hidden; margin: 0; }
  .nav.open { transform: none; visibility: visible; }
  .nav ul { display: grid; grid-template-columns: repeat(2, 1fr); gap: .5rem; }
  .nav a { flex-direction: row; justify-content: space-between; padding: .8rem 1rem; background: var(--soft); border-radius: 12px; }
  .bar-tools { margin-left: auto; }
  .desk-menu { display: grid; }
}
@media (max-width: 1099px) and (min-width: 700px) { .nav ul { grid-template-columns: repeat(4, 1fr); } }
@media (prefers-reduced-motion: reduce) { .nav { transition: none; } }

/* Bottom tab bar (phones and the installed app) */
.tabbar { display: none; }
@media (max-width: 899px) {
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; background: var(--card); border-top: 1px solid var(--line);
    padding-bottom: env(safe-area-inset-bottom, 0px); box-shadow: 0 -6px 20px -12px rgb(0 0 0 / .25); }
  .tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; height: var(--tabbar); color: var(--muted); text-decoration: none; font-size: .78rem; font-weight: 600; background: none; border: 0; font-family: var(--f); cursor: pointer; }
  .tab svg { width: 24px; height: 24px; }
  .tab[aria-current], .tab[aria-expanded="true"] { color: var(--paithani); }
  .tab[aria-current] svg { background: var(--paithani-2); border-radius: 999px; width: 52px; padding: 0 14px; }
  body { padding-bottom: calc(var(--tabbar) + env(safe-area-inset-bottom, 0px)); }
  .desk-menu { display: none; }
}

/* Breadcrumbs and page heads */
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: .25rem; padding: 0; margin: 1rem 0 0; font-size: .88rem; color: var(--muted); }
.crumbs li + li::before { content: "›"; margin-right: .3rem; }
.crumbs a { color: var(--muted); }
.page-head { margin: .75rem 0 1.25rem; }
.page-head .lede { margin-top: .4rem; }
.eyebrow { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--zari); margin: 0; }

/* Buttons and chips */
.btn { display: inline-flex; align-items: center; gap: .45rem; padding: .6rem 1.1rem; border-radius: 999px; background: var(--paithani); color: var(--card); text-decoration: none; border: 1px solid transparent; cursor: pointer; font: 600 1rem var(--f); }
.btn:hover { filter: brightness(1.08); }
.btn-ghost { background: transparent; color: var(--paithani); border-color: var(--paithani); }
.btn-row { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1rem 0; }
.chip { display: inline-block; padding: .05rem .55rem; border-radius: 999px; font-size: .78rem; font-weight: 700; background: var(--soft); color: var(--muted); vertical-align: middle; }
.chip.festival { background: var(--rani-2); color: var(--rani); }
.chip.holiday { background: var(--red-2); color: var(--red); }
.chip.vrat { background: var(--mor-2); color: var(--mor); }
.chip.moon { background: var(--moon-2); color: var(--moon); }
.chip.gold { background: var(--zari-2); color: var(--zari); }

/* Cards */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; box-shadow: var(--shadow); }
.card h2, .card h3 { margin-top: 0; }
.grid { display: grid; gap: 1rem; }
@media (min-width: 760px) { .grid-2 { grid-template-columns: 1fr 1fr; } .grid-3 { grid-template-columns: repeat(3, 1fr); } }
.cards { list-style: none; padding: 0; margin: 1rem 0; display: grid; gap: .75rem; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); }
.cards a { display: flex; flex-direction: column; gap: .15rem; height: 100%; padding: .9rem 1rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); transition: border-color .15s, transform .15s; }
.cards a:hover { border-color: var(--paithani); transform: translateY(-1px); }
.cards strong { font-size: 1.05rem; }
.cards span { color: var(--muted); font-size: .92rem; }
.cards [lang="mr"] { color: var(--rani); font-weight: 600; }

/* Today leaf: a tear-off wall calendar page */
.today { display: grid; gap: 1rem; margin: 1rem 0 1.5rem; }
@media (min-width: 860px) { .today { grid-template-columns: minmax(18rem, 22rem) 1fr; align-items: start; } }
.leaf { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; text-align: center; }
.leaf-top { background: var(--paithani); color: #fff; padding: .9rem 1rem .7rem; position: relative; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .leaf-top { background: #3a1549; } }
:root[data-theme="dark"] .leaf-top { background: #3a1549; }
.leaf-top::before, .leaf-top::after { content: ""; position: absolute; top: -6px; width: 12px; height: 22px; border-radius: 6px; background: var(--zari); box-shadow: inset 0 -3px 0 rgb(0 0 0 / .18); }
.leaf-top::before { left: 28%; } .leaf-top::after { right: 28%; }
.leaf-month { font-weight: 700; letter-spacing: .12em; text-transform: uppercase; font-size: .85rem; }
.leaf-month [lang="mr"] { display: block; letter-spacing: 0; text-transform: none; font-size: 1rem; color: #f3d98b; }
.leaf-body { padding: .6rem 1rem 1.1rem; }
.leaf-num { font-family: var(--fd); font-size: 6.5rem; line-height: 1; margin: .1rem 0 0; color: var(--ink); }
.leaf-num.sun { color: var(--red); }
.leaf-mr { font-family: var(--fd); font-size: 1.8rem; color: var(--rani); line-height: 1; }
.leaf-wd { font-weight: 700; font-size: 1.1rem; margin-top: .3rem; }
.leaf-wd [lang="mr"] { color: var(--muted); font-weight: 600; }
.leaf-tithi { margin: .8rem 0 0; padding: .7rem; border-radius: 10px; background: var(--zari-2); }
.leaf-tithi strong { display: block; font-size: 1.3rem; color: var(--ink); }
.leaf-tithi span { font-size: .92rem; color: var(--muted); }
.leaf-ev { margin-top: .7rem; display: flex; flex-wrap: wrap; gap: .3rem; justify-content: center; }

.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr)); gap: .6rem; margin: 0; }
.facts > div { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: .65rem .8rem; }
.facts dt { font-size: .8rem; color: var(--muted); font-weight: 600; }
.facts dt [lang="mr"] { color: var(--rani); }
.facts dd { margin: .1rem 0 0; font-weight: 700; font-size: 1.05rem; line-height: 1.3; }
.facts dd small { display: block; font-weight: 500; color: var(--muted); font-size: .85rem; }
.facts .warn dd { color: var(--red); }

/* Month grid — the wall calendar */
.month-nav { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin: .5rem 0 1rem; }
.month-nav a { text-decoration: none; font-weight: 600; padding: .45rem .8rem; border-radius: 999px; border: 1px solid var(--line); background: var(--card); white-space: nowrap; }
.month-nav a:hover { border-color: var(--paithani); }
.month-nav .mid { text-align: center; font-size: .9rem; color: var(--muted); }
.cal { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.cal-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; padding: .8rem 1rem; background: var(--paithani); color: #fff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .cal-head { background: #3a1549; } }
:root[data-theme="dark"] .cal-head { background: #3a1549; }
.cal-head h2 { margin: 0; font-size: 1.5rem; color: #fff; }
.cal-head h2 [lang="mr"] { color: #f3d98b; font-size: .8em; margin-left: .4rem; }
.cal-head p { margin: 0; font-size: .9rem; opacity: .9; }
.mgrid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.mgrid .wdh { text-align: center; font-size: .78rem; font-weight: 700; padding: .45rem 0; background: var(--soft); color: var(--muted); border-bottom: 1px solid var(--line); }
.mgrid .wdh:first-child { color: var(--red); }
.mgrid .wdh [lang="mr"] { display: block; font-weight: 600; }
.mgrid .day { position: relative; min-height: 5.2rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: .3rem .35rem .35rem; display: flex; flex-direction: column; min-width: 0; }
.mgrid .day:nth-child(7n) { border-right: 0; }
.mgrid .blank { background: repeating-linear-gradient(135deg, transparent 0 6px, var(--soft) 6px 7px); }
.mgrid .d { font-family: var(--fd); font-size: 1.55rem; line-height: 1; }
.mgrid .dm { font-size: .72rem; color: var(--muted); position: absolute; top: .35rem; right: .4rem; }
.mgrid .ti { font-size: .72rem; color: var(--muted); margin-top: .15rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mgrid .ev { font-size: .72rem; line-height: 1.2; margin-top: auto; font-weight: 600; color: var(--rani); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mgrid .ev.vrat { color: var(--mor); } .mgrid .ev.moon { color: var(--moon); } .mgrid .ev.minor { color: var(--muted); font-weight: 500; }
.mgrid .sun .d, .mgrid .hol .d { color: var(--red); }
.mgrid .hol { background: var(--red-2); }
.mgrid .ic { position: absolute; bottom: .3rem; right: .35rem; width: 10px; height: 10px; border-radius: 50%; }
.mgrid .ic.full { background: var(--zari); } .mgrid .ic.new { background: var(--ink); }
.mgrid a.day { text-decoration: none; color: inherit; }
.mgrid a.day:hover { background: var(--paithani-2); }
.mgrid .is-today { outline: 3px solid var(--zari); outline-offset: -3px; background: var(--zari-2); }
@media (max-width: 640px) {
  .mgrid .day { min-height: 4rem; padding: .25rem .2rem; }
  .mgrid .d { font-size: 1.2rem; }
  .mgrid .dm { display: none; }
  .mgrid .ti { font-size: .66rem; }
  .mgrid .ev { font-size: 0; margin-top: auto; }
  .mgrid .ev::before { content: ""; display: block; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
  .mgrid .ev + .ev { display: none; }
  .mgrid .wdh [lang="mr"] { display: none; }
}
.legend { display: flex; flex-wrap: wrap; gap: .4rem .9rem; font-size: .85rem; color: var(--muted); margin: .75rem 0; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: .3rem; vertical-align: middle; }

/* Year view */
.ygrid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); }
.mini { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem; text-decoration: none; color: var(--ink); display: block; }
.mini:hover { border-color: var(--paithani); }
.mini h3 { margin: 0 0 .4rem; display: flex; justify-content: space-between; font-family: var(--fd); font-weight: 400; font-size: 1.2rem; }
.mini h3 span { color: var(--rani); font-size: .9rem; font-family: var(--f); font-weight: 600; }
.mini ol { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; font-size: .8rem; gap: 2px; }
.mini li { padding: .15rem 0; border-radius: 4px; }
.mini .h { font-weight: 700; color: var(--muted); font-size: .7rem; }
.mini .s { color: var(--red); }
.mini .f { background: var(--rani-2); color: var(--rani); font-weight: 700; }
.mini .x { background: var(--red-2); color: var(--red); font-weight: 700; }

/* Event lists */
.evlist { list-style: none; padding: 0; margin: 1rem 0; display: grid; gap: .5rem; }
.evlist li { display: grid; grid-template-columns: 4.2rem 1fr; gap: .8rem; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: .55rem .8rem .55rem .55rem; }
.evlist .dt { text-align: center; border-radius: 10px; background: var(--soft); padding: .3rem 0; line-height: 1.1; }
.evlist .dt b { display: block; font-family: var(--fd); font-weight: 400; font-size: 1.6rem; }
.evlist .dt span { font-size: .72rem; font-weight: 700; text-transform: uppercase; color: var(--muted); }
.evlist .hol .dt { background: var(--red-2); } .evlist .hol .dt b { color: var(--red); }
.evlist .t { min-width: 0; }
.evlist .t strong { display: block; }
.evlist .t a { color: var(--ink); text-decoration: none; } .evlist .t a:hover { color: var(--rani); text-decoration: underline; }
.evlist .t small { color: var(--muted); display: block; font-size: .88rem; }
.evlist .t [lang="mr"] { color: var(--rani); font-weight: 600; }
.evlist .past { opacity: .55; }

/* Tables */
.tbl-wrap { overflow-x: auto; margin: 1rem 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.tbl { width: 100%; border-collapse: collapse; font-size: .95rem; }
.tbl th, .tbl td { text-align: left; padding: .6rem .8rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl thead th { background: var(--soft); font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); white-space: nowrap; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tr.is-today td { background: var(--zari-2); }
.tbl tr.past td { color: var(--muted); }
.tbl td [lang="mr"] { color: var(--rani); }
.tbl .hl { color: var(--red); font-weight: 700; }

/* Prose */
.prose { max-width: 46rem; }
.prose h2 { margin-top: 1.6em; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li { margin: .3rem 0; }
.note { border-left: 4px solid var(--zari); background: var(--zari-2); padding: .8rem 1rem; border-radius: 0 10px 10px 0; margin: 1.2rem 0; font-size: .96rem; }
.note.red { border-color: var(--red); background: var(--red-2); }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: .7rem 1rem; margin: .5rem 0; }
.faq summary { font-weight: 700; cursor: pointer; }
.faq details p { margin: .5rem 0 0; }

/* Festival hero */
.fest-hero { display: grid; gap: 1rem; margin: .5rem 0 1rem; }
@media (min-width: 900px) { .fest-hero { grid-template-columns: minmax(0, 1fr) 20rem; gap: 2.5rem; align-items: start; } .dates-side { position: sticky; top: 1rem; } }
.fest-hero .prose h2:first-of-type { margin-top: 1.2em; }
.datebox { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.datebox h2 { margin: 0; padding: .6rem 1rem; background: var(--paithani); color: #fff; font-size: 1rem; font-family: var(--f); font-weight: 700; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .datebox h2 { background: #3a1549; } }
:root[data-theme="dark"] .datebox h2 { background: #3a1549; }
.datebox ul { list-style: none; padding: .5rem 1rem; margin: 0; }
.datebox li { padding: .5rem 0; border-bottom: 1px dashed var(--line); }
.datebox li:last-child { border: 0; }
.datebox b { font-size: 1.15rem; display: block; }
.datebox small { color: var(--muted); }

/* Forms */
.form { display: flex; flex-wrap: wrap; gap: .75rem; align-items: end; margin: 1rem 0; }
.form label { display: flex; flex-direction: column; gap: .25rem; font-size: .88rem; font-weight: 600; color: var(--muted); }
.form input, .form select { font: 500 1rem var(--f); padding: .55rem .7rem; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink); min-width: 10rem; }
.result { margin: 1rem 0; }
.result .big { font-family: var(--fd); font-size: 2rem; line-height: 1.2; margin: 0 0 .2rem; color: var(--paithani); }

/* Home sections */
.sect-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin: 2rem 0 .5rem; }
.sect-head h2 { margin: 0; }
.sect-head a { font-weight: 600; white-space: nowrap; }
.install { display: grid; gap: 1rem; align-items: center; background: linear-gradient(135deg, var(--paithani-2), var(--rani-2)); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem; margin: 2rem 0; }
@media (min-width: 760px) { .install { grid-template-columns: auto 1fr auto; } }
.install .mark { width: 64px; height: 64px; }
.install h2 { margin: 0 0 .2rem; }
.install p { margin: 0; color: var(--muted); }
[data-install][hidden] { display: none; }

/* Footer */
.site-foot { margin-top: 3rem; background: var(--card); border-top: 1px solid var(--line); }
.foot-top { display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; padding: 1.5rem 0 .5rem; }
.foot-top p { margin: 0; color: var(--muted); flex: 1 1 18rem; }
.fgrid { display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); padding: 1rem 0; }
.fcol h2 { font-family: var(--f); font-size: .85rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; margin: 0 0 .5rem; color: var(--muted); }
.fcol h2 span { text-transform: none; color: var(--rani); letter-spacing: 0; }
.fcol ul { list-style: none; margin: 0; padding: 0; }
.fcol li { margin: .3rem 0; }
.fcol a { color: var(--ink); text-decoration: none; font-size: .95rem; }
.fcol a:hover { color: var(--rani); text-decoration: underline; }
.fnote, .copy { font-size: .85rem; color: var(--muted); }
.copy { padding-bottom: 1.5rem; margin: 0; }
.smap { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); }
.smap h2 { font-size: 1.1rem; }
.smap ul { padding-left: 1.1rem; font-size: .95rem; }

/* Back to top */
.to-top { position: fixed; right: 16px; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); z-index: 44; width: 46px; height: 46px; border-radius: 50%;
  border: 2px solid var(--zari); background: var(--paithani); color: var(--card); display: grid; place-items: center; cursor: pointer; padding: 0;
  box-shadow: 0 6px 18px -6px rgb(0 0 0 / .45); opacity: 0; visibility: hidden; transform: translateY(10px); transition: opacity .2s, transform .2s, visibility .2s; }
.to-top svg { width: 22px; height: 22px; }
.to-top.show { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { filter: brightness(1.1); }
#main:focus { outline: none; }
@media (max-width: 899px) { .to-top { bottom: calc(var(--tabbar) + 14px + env(safe-area-inset-bottom, 0px)); } }
@media (prefers-reduced-motion: reduce) { .to-top { transition: none; } }

/* Print: a clean month or panchang page */
@media print {
  .masthead, .site-foot, .tabbar, .to-top, .crumbs, .month-nav, .btn-row, .install, .nav { display: none !important; }
  body { background: #fff; color: #000; padding: 0; }
  .cal, .card, .leaf { box-shadow: none; }
  .mgrid .ev { font-size: 8pt; } .mgrid .ev::before { display: none; }
}

/* Show only the first few upcoming items (past ones are removed by script) */
.limit .evlist li:nth-child(n+9) { display: none; }
.evlist.one { margin: .4rem 0 .6rem; }
.evlist.one li { border: 0; padding: 0; background: none; }
.evlist.one li:nth-child(n+2) { display: none; }
.card > h2.eyebrow { font-size: .8rem; margin: 0; }
.tbl tr.hol td:first-child a { color: var(--red); font-weight: 700; }

.dates a { display: inline-block; margin: .15rem .2rem .15rem 0; padding: .2rem .6rem; border-radius: 8px; background: var(--rani-2); color: var(--rani); font-weight: 700; text-decoration: none; }
.dates a small { font-weight: 500; opacity: .8; }
.dates a:hover { background: var(--rani); color: var(--card); }

/* Home: moon phase */
.moon-card { display: flex; gap: 1rem; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: .7rem 1rem; margin-bottom: .6rem; }
.moon { width: 72px; height: 72px; flex-shrink: 0; }
.moon-dark { fill: var(--soft); stroke: var(--line); stroke-width: 1.5; }
.moon-lit { fill: var(--zari); }
.moon-card p { margin: 0; }
.moon-t { font-size: 1.15rem; }

/* Home: festival spotlight with countdown */
.spotlight { margin: 1.5rem 0; }
.spot { list-style: none; margin: 0; padding: 0; }
.spot li { display: grid; gap: 1.2rem; grid-template-columns: 1fr; background: linear-gradient(135deg, var(--paithani-2), var(--rani-2) 70%, var(--zari-2)); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem; }
@media (min-width: 700px) { .spot li { grid-template-columns: 9rem 1fr; align-items: center; padding: 1.5rem; } }
.spot.one li:nth-child(n+2) { display: none; }
.spot-count { display: flex; align-items: baseline; justify-content: center; gap: .5rem; text-align: center; background: var(--card); border-radius: 14px; padding: .8rem .5rem; border: 2px solid var(--zari); }
.spot-count b { font-family: var(--fd); font-weight: 400; font-size: 3.4rem; line-height: 1; color: var(--rani); }
.spot-count span { font-size: .85rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.spot-body h2 { margin: .1rem 0 .3rem; }
.spot-body h2 a { color: var(--ink); text-decoration: none; }
.spot-body h2 .mr { display: inline; margin-left: .4rem; font-size: .7em; }
.spot-date { margin-bottom: .4rem; }
.spot-body > p:not(.eyebrow):not(.spot-date) { color: var(--muted); }

/* Home: current month and year timeline */
.month-now { margin-top: 2rem; border-left: 5px solid var(--zari); }
.month-now h2 { margin: .2rem 0; }
.month-now h2 .mr { display: inline; margin-left: .4rem; }
.timeline { list-style: none; padding: 0; margin: 1rem 0; display: grid; gap: .5rem; grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); }
@media (max-width: 480px) { .timeline { grid-template-columns: 1fr 1fr; } .timeline a { padding: .6rem .65rem; } .timeline em { font-size: .76rem; } }
.timeline a { display: flex; flex-direction: column; gap: .1rem; height: 100%; padding: .75rem .85rem; background: var(--card); border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--ink); position: relative; }
.timeline a:hover { border-color: var(--paithani); }
.timeline strong { font-size: 1.02rem; }
.timeline [lang="mr"] { color: var(--rani); font-weight: 600; }
.timeline small { color: var(--muted); font-size: .8rem; }
.timeline em { font-style: normal; font-size: .82rem; color: var(--mor); line-height: 1.35; margin-top: .2rem; }
.timeline .now a { background: var(--zari-2); border: 2px solid var(--zari); }
.timeline .now a::after { content: "Now · आता"; position: absolute; top: .55rem; right: .6rem; font-size: .7rem; font-weight: 700; color: var(--zari); }

/* Choghadiya */
.chog { list-style: none; padding: 0; margin: .3rem 0 0; display: grid; gap: 3px; }
.chog li { display: flex; justify-content: space-between; gap: .5rem; padding: .35rem .6rem; border-radius: 8px; font-size: .9rem; background: var(--soft); }
.chog li b { font-weight: 700; white-space: nowrap; }
.chog li b span { font-weight: 500; }
.chog .good { background: var(--mor-2); } .chog .good b { color: var(--mor); }
.chog .bad { background: var(--red-2); } .chog .bad b { color: var(--red); }
.chog .now { outline: 2px solid var(--zari); }
.card h3 { margin: .6rem 0 .2rem; font-size: 1rem; }
.card h3 .mr { font-weight: 500; }

/* Proverb */
.proverb { margin: 2rem 0; text-align: center; padding: 1.6rem 1rem; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.proverb blockquote { margin: .4rem auto 0; max-width: 40rem; }
.proverb blockquote p { font-family: var(--fd); font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.3rem); color: var(--paithani); margin: 0 0 .3rem; line-height: 1.3; }
.proverb footer { color: var(--muted); }

/* Learn cards */
.learn { list-style: none; padding: 0; margin: 1rem 0; display: grid; gap: .75rem; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); }
.learn li { background: var(--card); border: 1px solid var(--line); border-top: 4px solid var(--paithani); border-radius: 12px; padding: .8rem 1rem; }
.learn h3 { margin: 0 0 .3rem; }
.learn h3 span { color: var(--rani); font-weight: 600; }
.learn p { margin: 0; font-size: .95rem; color: var(--muted); }
@media (min-width: 700px) { .spot-count { flex-direction: column; align-items: center; gap: .2rem; } }
@media (max-width: 699px) { .spot-count { padding: .5rem; } .spot-count b { font-size: 2.4rem; } }
