/* Shri Vishnu Yaga: large, clear and calm design for every age */
:root {
  --bg: #FAF6EF;
  --bg-2: #F3EBDD;
  --card: #FFFFFF;
  --ink: #241A15;
  --muted: #6B5E54;
  --line: #E9DECB;
  --line-2: #D9C9AE;
  --maroon: #6E1423;
  --maroon-2: #8E1F2F;
  --maroon-deep: #3F0A13;
  --gold: #B8862F;
  --gold-2: #E2B85C;
  --gold-soft: #FBF1DA;
  --saffron: #D4650F;
  --green: #12775A;
  --green-soft: #E4F4EE;
  --orange: #C2410C;
  --orange-soft: #FDEDE2;
  --red: #B3261E;
  --blue: #1E4FD8;
  --radius: 18px;
  --shadow-sm: 0 1px 2px rgba(63, 10, 19, .06);
  --shadow: 0 1px 2px rgba(63, 10, 19, .05), 0 8px 24px -8px rgba(63, 10, 19, .16);
  --shadow-lg: 0 18px 40px -12px rgba(63, 10, 19, .35);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --display: "Marcellus", "Mukta", Georgia, serif;
  --sanskrit: "Tiro Devanagari Sanskrit", "Noto Serif Devanagari", serif;
  font-size: 19px;
}
html.size-l { font-size: 21px; }
html.size-xl { font-size: 23.5px; }

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Mukta", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  padding-bottom: calc(84px + env(safe-area-inset-bottom));
}
#app { max-width: 760px; margin: 0 auto; min-height: 100vh; }
a { color: var(--blue); }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; }
.hidden, [hidden] { display: none !important; }
svg.i { width: 1.25em; height: 1.25em; flex-shrink: 0; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -0.22em; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- motion ---------- */
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes spinBack { to { transform: rotate(-360deg); } }
@keyframes halo { 0%, 100% { opacity: .55; transform: scale(1); } 50% { opacity: .95; transform: scale(1.06); } }
@keyframes flicker {
  0%, 100% { transform: scale(1, 1) rotate(-2deg); opacity: 1; }
  25% { transform: scale(.94, 1.06) rotate(2deg); opacity: .92; }
  50% { transform: scale(1.04, .95) rotate(-1deg); opacity: 1; }
  75% { transform: scale(.97, 1.04) rotate(1.5deg); opacity: .95; }
}
@keyframes fall {
  0% { transform: translate3d(0, -10vh, 0) rotate(0deg); opacity: 0; }
  10% { opacity: 1; }
  100% { transform: translate3d(var(--drift, 40px), 105vh, 0) rotate(var(--turn, 540deg)); opacity: .9; }
}
@keyframes ring { 0%, 100% { transform: rotate(0); } 10% { transform: rotate(14deg); } 20% { transform: rotate(-12deg); } 30% { transform: rotate(8deg); } 40% { transform: rotate(-5deg); } 50% { transform: rotate(0); } }
@keyframes pop { 0% { transform: scale(.6); } 60% { transform: scale(1.18); } 100% { transform: scale(1); } }
@keyframes tickIn { from { stroke-dashoffset: 24; } to { stroke-dashoffset: 0; } }
@keyframes shimmer { from { background-position: -200% 0; } to { background-position: 200% 0; } }
@keyframes flipIn { 0% { transform: rotateX(90deg); opacity: .2; } 100% { transform: rotateX(0); opacity: 1; } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 16px) scale(.96); } to { opacity: 1; transform: translate(-50%, 0) scale(1); } }

.route-in .page > *, .route-in .hero-inner > * { animation: fadeUp .5s var(--ease) both; }
.route-in .page > *:nth-child(2) { animation-delay: .05s; }
.route-in .page > *:nth-child(3) { animation-delay: .1s; }
.route-in .page > *:nth-child(4) { animation-delay: .15s; }
.route-in .page > *:nth-child(5) { animation-delay: .2s; }
.route-in .page > *:nth-child(n+6) { animation-delay: .25s; }

/* ---------- loading ---------- */
.loading { display: grid; place-items: center; min-height: 80vh; text-align: center; color: var(--muted); gap: .6rem; }
.loading p { margin: 0; font-size: 1.05rem; }

/* animated diya (pure CSS) */
.diya { position: relative; width: 64px; height: 64px; display: inline-block; }
.diya .bowl { position: absolute; bottom: 4px; left: 6px; right: 6px; height: 22px; border-radius: 0 0 40px 40px; background: linear-gradient(180deg, #E2A04A, #9A4E12); box-shadow: inset 0 3px 0 rgba(255,255,255,.25); }
.diya .bowl::before { content: ""; position: absolute; top: -5px; left: -3px; right: -3px; height: 9px; border-radius: 50%; background: linear-gradient(180deg, #F2C36B, #C27A24); }
.diya .flame { position: absolute; left: 50%; bottom: 24px; width: 16px; height: 30px; margin-left: -8px; border-radius: 50% 50% 50% 50% / 62% 62% 38% 38%; background: radial-gradient(ellipse at 50% 80%, #FFF7D1 0%, #FFD45A 35%, #FF8A1F 70%, rgba(255,80,0,0) 100%); transform-origin: 50% 90%; animation: flicker 1.3s ease-in-out infinite; filter: drop-shadow(0 0 10px rgba(255,170,40,.9)); }
.diya.sm { width: 40px; height: 40px; }
.diya.sm .bowl { height: 14px; bottom: 2px; left: 4px; right: 4px; }
.diya.sm .flame { width: 10px; height: 19px; margin-left: -5px; bottom: 15px; }

/* falling petals */
.petals { position: fixed; inset: 0; pointer-events: none; z-index: 90; overflow: hidden; }
.petals.inline { position: absolute; z-index: 0; }
.petal {
  position: absolute; top: 0; width: 14px; height: 18px; border-radius: 80% 0 80% 0;
  background: linear-gradient(135deg, #FFB547, #F07A12); opacity: 0;
  animation: fall var(--dur, 9s) linear var(--delay, 0s) infinite;
}
.petal.rose { background: linear-gradient(135deg, #F6A2B0, #C2304A); }
.petal.gold { background: linear-gradient(135deg, #FFE08A, #D9A12B); }
.petals.burst .petal { animation-iteration-count: 1; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: .6rem;
  padding: .55rem 1rem; min-height: 64px;
  background: rgba(250, 246, 239, .92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  color: var(--maroon); border-bottom: 1px solid var(--line);
}
.topbar::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: linear-gradient(90deg, transparent, var(--gold-2), transparent); opacity: .7; }
.topbar h1 { font-family: var(--display); font-weight: 400; font-size: 1.3rem; letter-spacing: .01em; margin: 0; flex: 1; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; color: var(--maroon); }
.topbar .back, .topbar .tb-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .35rem;
  min-height: 46px; min-width: 46px; padding: 0 .85rem; border-radius: 14px; cursor: pointer;
  font-weight: 700; white-space: nowrap; text-decoration: none; transition: background .2s, transform .1s;
}
.topbar .back { background: #fff; color: var(--maroon); border: 1px solid var(--line); }
.topbar .back:hover { background: var(--gold-soft); }
.topbar .tb-btn { background: var(--maroon); color: #fff; border: 1px solid var(--maroon); }
.topbar .tb-btn.ghost { background: #fff; color: var(--maroon); border: 1px solid var(--line); }
.topbar .back:active, .topbar .tb-btn:active { transform: scale(.96); }

.page { padding: 1rem 1rem 6.5rem; }
.section-title {
  font-family: var(--display); font-weight: 400; font-size: 1.28rem; margin: 1.7rem 0 .7rem; color: var(--maroon);
  display: flex; align-items: center; gap: .55rem;
}
.section-title .grow { flex: 1; }
.section-title svg.i { color: var(--gold); }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.center { text-align: center; }

.ornament { display: flex; align-items: center; justify-content: center; gap: .7rem; color: var(--gold); margin: 1.8rem 0 1rem; }
.ornament::before, .ornament::after { content: ""; height: 1px; flex: 1; background: linear-gradient(90deg, transparent, var(--gold-2), transparent); }
.ornament span { font-family: var(--display); color: var(--maroon); font-size: 1.3rem; }

/* ---------- cards & lists ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.1rem; margin-bottom: 1rem; }
.list { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; margin-bottom: 1rem; }
.row {
  display: flex; align-items: center; gap: .85rem; padding: .9rem 1rem; min-height: 72px;
  border: 0; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; background: none;
  width: 100%; text-align: left; cursor: pointer; transition: background .15s;
}
.row:last-child { border-bottom: 0; }
.row:hover { background: #FDFAF4; }
.row:active { background: var(--gold-soft); }
.row .grow { flex: 1; min-width: 0; }
.row .title { font-weight: 700; overflow-wrap: anywhere; line-height: 1.3; }
.row .sub { color: var(--muted); font-size: .88rem; overflow-wrap: anywhere; }
.row .right { text-align: right; flex-shrink: 0; font-size: .86rem; line-height: 1.25; }
.row .right b { display: block; font-size: 1.08rem; }
.row .chev { color: var(--line-2); }
.icon-box {
  width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center;
  font-size: 1.55rem; background: var(--gold-soft); flex-shrink: 0; border: 1px solid #F1E2BD;
}
.icon-box.green { background: var(--green-soft); border-color: #CBEBDD; color: var(--green); }
.avatar {
  width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0;
  font-weight: 800; color: #fff; font-size: 1.1rem; box-shadow: inset 0 -3px 0 rgba(0,0,0,.12), 0 0 0 3px #fff, 0 0 0 4px var(--line);
}
.datebox { width: 44px; text-align: center; color: var(--muted); flex-shrink: 0; line-height: 1.1; }
.datebox .m { font-size: .72rem; text-transform: uppercase; font-weight: 700; letter-spacing: .04em; }
.datebox .d { font-size: 1.3rem; font-weight: 800; color: var(--ink); }
.month-head { padding: .5rem 1rem; background: var(--bg-2); font-weight: 800; font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }

.pos { color: var(--green); }
.neg { color: var(--orange); }
.zero { color: var(--muted); }

/* ---------- buttons ---------- */
.btn {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 56px; padding: .6rem 1.25rem; border-radius: 16px; border: 2px solid transparent;
  font-weight: 700; font-size: 1.02rem; cursor: pointer; text-decoration: none; text-align: center; line-height: 1.2;
  background: var(--maroon); color: #fff;
  box-shadow: 0 6px 14px -10px rgba(110,20,35,.7); transition: transform .12s, box-shadow .2s, filter .2s;
}
.btn:hover { filter: brightness(1.05); }
.btn:active { transform: scale(.97); }
.btn.green { background: var(--green); box-shadow: 0 6px 14px -10px rgba(18,119,90,.8); }
.btn.orange { background: var(--saffron); box-shadow: 0 6px 14px -10px rgba(212,101,15,.8); }
.btn.light { background: #fff; color: var(--maroon); border-color: var(--line-2); box-shadow: var(--shadow-sm); }
.btn.ghost { background: transparent; color: var(--maroon); border-color: var(--line); box-shadow: none; }
.btn.danger { background: #fff; color: var(--red); border-color: #F0C4C0; box-shadow: none; }
.btn.block { width: 100%; }
.btn.sm { min-height: 46px; padding: .35rem .95rem; font-size: .92rem; border-radius: 13px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn .ripple { position: absolute; border-radius: 50%; transform: scale(0); background: rgba(255,255,255,.45); animation: rip .6s ease-out; pointer-events: none; }
.btn.light .ripple, .btn.ghost .ripple, .btn.danger .ripple { background: rgba(110,20,35,.15); }
@keyframes rip { to { transform: scale(3); opacity: 0; } }
.btn-row { display: flex; gap: .7rem; flex-wrap: wrap; }
.btn-row > .btn { flex: 1 1 140px; padding-left: .75rem; padding-right: .75rem; gap: .4rem; }

.fab {
  position: fixed; right: max(1rem, calc(50% - 380px + 1rem)); bottom: calc(98px + env(safe-area-inset-bottom)); z-index: 30;
  background: var(--maroon); color: #fff; border: 0; border-radius: 999px; min-height: 62px; padding: 0 1.4rem;
  font-weight: 800; font-size: 1.05rem; box-shadow: 0 10px 24px -8px rgba(110,20,35,.55); cursor: pointer;
  display: inline-flex; align-items: center; gap: .5rem; text-decoration: none; animation: fadeUp .5s var(--ease) .2s both;
}
.fab:active { transform: scale(.96); }

/* ---------- tab bar ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: flex; justify-content: center; background: rgba(255,255,255,.96); backdrop-filter: blur(10px);
  border-top: 1px solid var(--line); box-shadow: 0 -8px 24px -12px rgba(63,10,19,.25);
  padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
}
.tabbar a {
  position: relative; flex: 1; max-width: 150px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 62px; text-decoration: none; color: var(--muted); font-size: .8rem; font-weight: 700; gap: 3px; border-radius: 14px;
  transition: color .2s, background .2s;
}
.tabbar a svg.i { width: 26px; height: 26px; transition: transform .25s var(--ease); }
.tabbar a.on { color: var(--maroon); background: var(--gold-soft); }
.tabbar a.on svg.i { transform: translateY(-2px); stroke-width: 2.3; }
.tabbar .dot { position: absolute; top: 8px; right: calc(50% - 20px); width: 11px; height: 11px; border-radius: 50%; background: var(--red); border: 2px solid #fff; animation: pop .4s var(--ease); }

/* ---------- forms ---------- */
label.lbl { display: block; font-weight: 700; margin: 1.15rem 0 .4rem; }
.hint { color: var(--muted); font-size: .86rem; margin-top: .3rem; }
.input, select.input, textarea.input {
  width: 100%; min-height: 56px; padding: .6rem .95rem; border: 2px solid var(--line-2); border-radius: 14px; background: #fff;
  transition: border-color .2s, box-shadow .2s;
}
textarea.input { min-height: 104px; resize: vertical; }
.input:focus { outline: 0; border-color: var(--gold); box-shadow: 0 0 0 4px rgba(226,184,92,.3); }
.amount-wrap { display: flex; align-items: center; border: 2px solid var(--line-2); border-radius: 16px; background: #fff; overflow: hidden; transition: border-color .2s, box-shadow .2s; }
.amount-wrap:focus-within { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(226,184,92,.3); }
.amount-wrap span { padding: 0 .4rem 0 1rem; font-size: 1.8rem; font-weight: 700; color: var(--gold); }
.amount-wrap input { border: 0; outline: 0; font-size: 2.1rem; font-weight: 800; width: 100%; min-height: 76px; padding: 0 .6rem 0 0; background: transparent; }
.mini-amount { display: flex; align-items: center; border: 2px solid var(--line-2); border-radius: 12px; background: #fff; width: 118px; flex-shrink: 0; }
.mini-amount span { padding-left: .55rem; color: var(--muted); font-weight: 700; }
.mini-amount input { border: 0; outline: 0; width: 100%; min-height: 48px; padding: 0 .55rem; background: transparent; font-weight: 700; text-align: right; }
.mini-amount:focus-within { border-color: var(--gold); }

.seg { display: flex; flex-wrap: wrap; gap: .45rem; padding: .3rem; background: var(--bg-2); border-radius: 16px; }
.seg button {
  flex: 1 1 auto; min-height: 50px; padding: .35rem .8rem; border-radius: 12px; border: 0;
  background: transparent; font-weight: 700; cursor: pointer; color: var(--muted); transition: background .2s, color .2s, box-shadow .2s;
}
.seg button.on { background: #fff; color: var(--maroon); box-shadow: var(--shadow); }

.chips { display: flex; flex-wrap: wrap; gap: .45rem; }
.chip {
  border: 2px solid var(--line); background: #fff; border-radius: 999px; min-height: 46px; padding: .3rem .95rem;
  font-weight: 600; cursor: pointer; font-size: .92rem; transition: all .2s;
}
.chip.on { background: var(--gold-soft); border-color: var(--gold); color: #6B4A00; animation: pop .3s var(--ease); }

.check-row { display: flex; align-items: center; gap: .8rem; padding: .7rem .95rem; border-bottom: 1px solid var(--line); min-height: 66px; cursor: pointer; }
.check-row:last-child { border-bottom: 0; }
.check-row .grow { flex: 1; min-width: 0; font-weight: 700; }
.check-row .calc { color: var(--muted); font-size: .9rem; min-width: 70px; text-align: right; }
.check-row .calc-under { display: block; color: var(--green); font-size: .86rem; font-weight: 700; }
.bigcheck { width: 30px; height: 30px; accent-color: var(--green); flex-shrink: 0; cursor: pointer; }
.split-msg { padding: .85rem 1rem; font-weight: 700; border-top: 1px solid var(--line); background: #FCF8F1; transition: background .2s, color .2s; }
.split-msg.err { color: var(--red); background: #FEF1F0; }
.split-msg.ok { color: var(--green); background: var(--green-soft); }
.errbox { background: #FEF1F0; color: var(--red); border: 2px solid #F0C4C0; border-radius: 14px; padding: .85rem 1rem; font-weight: 700; margin-top: 1rem; animation: fadeUp .3s var(--ease); }
.switch-row { display: flex; align-items: center; gap: .85rem; padding: .8rem 0; cursor: pointer; }
.switch-row .grow { flex: 1; }

/* ---------- home hero: the countdown ---------- */
@keyframes roll { from { transform: translateY(-55%); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes breathe { 0%, 100% { transform: scale(.94); opacity: .55; } 50% { transform: scale(1.04); opacity: .95; } }
@keyframes riseIn { from { opacity: 0; transform: translateY(18px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes drawRing { from { stroke-dashoffset: var(--full); } }

.hero {
  position: relative; text-align: center; overflow: hidden; isolation: isolate;
  padding: calc(1.4rem + env(safe-area-inset-top)) 1rem 1.6rem; color: var(--ink);
  background:
    radial-gradient(80% 45% at 50% 50%, #FFE5C2 0%, rgba(255,229,194,0) 72%),
    linear-gradient(180deg, #F6ECDC 0%, var(--bg) 100%);
}
.hero-inner { position: relative; z-index: 2; }
.hero .hello { font-size: .95rem; color: var(--muted); font-weight: 600; }
.om-big { font-family: var(--sanskrit); font-size: 2.2rem; line-height: 1; color: var(--gold); margin-top: .45rem; display: inline-block; }
.hero h1 { font-family: var(--sanskrit); font-weight: 400; font-size: 2.45rem; margin: .1rem 0 0; line-height: 1.25; color: var(--maroon); }
.hero .en { font-family: var(--display); font-size: .9rem; letter-spacing: .36em; color: var(--gold); margin-top: .1rem; padding-left: .36em; }
.hero .dates {
  display: inline-flex; align-items: center; gap: .45rem; margin-top: .9rem; padding: .4rem 1.05rem; border-radius: 999px;
  background: #fff; border: 1px solid var(--line-2); color: var(--maroon); font-weight: 700; box-shadow: var(--shadow-sm);
}
.hero .dates svg.i { color: var(--gold); }
.route-in .hero-inner > * { animation: riseIn .7s var(--ease) both; }
.route-in .hero-inner > *:nth-child(2) { animation-delay: .06s; }
.route-in .hero-inner > *:nth-child(3) { animation-delay: .12s; }
.route-in .hero-inner > *:nth-child(4) { animation-delay: .18s; }
.route-in .hero-inner > *:nth-child(5) { animation-delay: .24s; }
.route-in .hero-inner > *:nth-child(n+6) { animation-delay: .32s; }

/* the ring */
.ring-wrap { position: relative; width: min(300px, 82vw); aspect-ratio: 1; margin: 1.5rem auto .4rem; }
.ring-wrap .mandala { position: absolute; inset: -14%; z-index: 0; pointer-events: none; opacity: .5; }
.ring-wrap .mandala svg { width: 100%; height: 100%; }
.ring-wrap .mandala .m1 { animation: spin 160s linear infinite; }
.ring-wrap .mandala .m2 { animation: spinBack 220s linear infinite; }
.ring-wrap .aura { position: absolute; inset: 6%; border-radius: 50%; z-index: 0; background: radial-gradient(circle, rgba(255,196,110,.5), rgba(255,196,110,0) 68%); animation: breathe 6s ease-in-out infinite; }
.ring-face { position: absolute; inset: 9%; border-radius: 50%; z-index: 1; background: radial-gradient(circle at 50% 35%, #FFFFFF 0%, #FFF8EC 70%, #FBEFD9 100%); box-shadow: 0 22px 44px -22px rgba(110,20,35,.45), inset 0 0 0 1px rgba(201,160,78,.35); }
.ring { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; overflow: visible; }
.ring .tick { stroke: #E3D3B4; stroke-width: 1.4; stroke-linecap: round; transition: stroke .4s; }
.ring .tick.major { stroke: #CDB68A; stroke-width: 2; }
.ring .tick.on { stroke: var(--saffron); }
.ring .track { fill: none; stroke: #F1E4CC; stroke-width: 7; }
.ring .prog { fill: none; stroke: url(#ringGrad); stroke-width: 7; stroke-linecap: round; transform: rotate(-90deg); transform-origin: 150px 150px; transition: stroke-dashoffset 1s linear; --full: 716; animation: drawRing 1.4s var(--ease); }
.ring .prog.snap { transition: none; }
.ring-center { position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring-center .big { font-family: var(--display); font-size: 5.6rem; line-height: .95; color: var(--maroon); font-variant-numeric: tabular-nums; }
.ring-center .big.roll { animation: roll .6s var(--ease); }
.ring-center .unit { font-size: .82rem; letter-spacing: .26em; text-transform: uppercase; color: var(--gold); font-weight: 700; margin-top: .35rem; padding-left: .26em; }
.ring-center .diya { margin-top: .5rem; }

/* hours, minutes, seconds */
.hms { display: flex; justify-content: center; align-items: stretch; gap: .5rem; margin: 1.1rem auto 0; max-width: 360px; }
.hms .u { flex: 1; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: .65rem .2rem .55rem; box-shadow: var(--shadow-sm); overflow: hidden; }
.hms .n { display: inline-block; font-family: var(--display); font-size: 2rem; line-height: 1.05; color: var(--maroon); font-variant-numeric: tabular-nums; }
.hms .n.roll { animation: roll .5s var(--ease); }
.hms .l { font-size: .68rem; text-transform: uppercase; letter-spacing: .16em; color: var(--muted); font-weight: 700; margin-top: .15rem; }
.hms .sep { align-self: center; font-family: var(--display); font-size: 1.6rem; color: var(--gold-2); }
.count-caption { margin-top: 1rem; font-weight: 600; color: var(--muted); }

/* the three days */
.days3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin: 1.1rem auto 0; max-width: 360px; }
.days3 .d { border-radius: 16px; padding: .55rem .3rem; background: rgba(255,255,255,.65); border: 1px dashed var(--line-2); color: var(--muted); line-height: 1.15; }
.days3 .d b { display: block; font-family: var(--display); font-weight: 400; font-size: 1.55rem; color: var(--maroon); }
.days3 .d span { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 700; }
.days3 .d.today { background: var(--maroon); border: 1px solid var(--maroon); color: #FFE9B8; box-shadow: 0 10px 24px -12px rgba(110,20,35,.7); }
.days3 .d.today b { color: #fff; }
.days3 .d.done { opacity: .55; }

.greet { font-family: var(--display); font-size: 1.45rem; color: var(--maroon); margin: 1.3rem 0 .2rem; }
.summary { display: grid; grid-template-columns: 1fr 1fr; gap: .65rem; }
.summary .box { border-radius: 16px; padding: .85rem .6rem; text-align: center; font-weight: 600; }
.summary .box b { display: block; font-size: 1.45rem; font-weight: 800; }
.summary .box.o { background: var(--orange-soft); color: var(--orange); }
.summary .box.g { background: var(--green-soft); color: var(--green); }
.info-line { display: flex; gap: .6rem; align-items: flex-start; margin: 0 0 .8rem; }
.info-line svg.i { color: var(--gold); margin-top: .2rem; }

/* ---------- announcement ---------- */
.news { position: relative; padding: 1.1rem 1.1rem 1rem; overflow: hidden; }
.news.important { border-color: #F0C4C0; background: linear-gradient(180deg, #FFF6F4, #fff 60%); }
.news.important::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--red); }
.news.pinned:not(.important)::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--gold); }
.news h3 { font-family: var(--display); font-weight: 400; font-size: 1.32rem; margin: .5rem 0 .3rem; color: var(--maroon); line-height: 1.3; overflow-wrap: anywhere; }
.news .body { white-space: pre-wrap; overflow-wrap: anywhere; }
.news .by { display: flex; align-items: center; gap: .6rem; }
.news .by .avatar { width: 38px; height: 38px; font-size: .9rem; }
.news .tags { display: flex; gap: .35rem; flex-wrap: wrap; }
.news-bell { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--gold-soft); color: var(--maroon); }
.news-bell svg.i { animation: ring 2.6s ease-in-out infinite; transform-origin: 50% 10%; }

/* ---------- shloka ---------- */
.shloka {
  position: relative; text-align: center; margin-bottom: 1.1rem; padding: 1.5rem 1.1rem 1.2rem; border-radius: 22px;
  background: radial-gradient(120% 80% at 50% 0%, #FFF9EA, #FFF2D6 70%); border: 1px solid #EBCB85;
  box-shadow: var(--shadow), inset 0 0 0 6px rgba(255,255,255,.6), inset 0 0 0 7px rgba(226,184,92,.35);
}
.shloka .tag { display: inline-block; background: var(--maroon); color: #FFE9B8; border-radius: 999px; padding: .2rem .9rem; font-size: .8rem; font-weight: 700; letter-spacing: .03em; margin-bottom: .8rem; }
.shloka .sk { font-family: var(--sanskrit); font-size: 1.32rem; line-height: 1.95; color: var(--maroon-deep); }
.shloka .tr { font-style: italic; color: #6B4A00; margin-top: .7rem; font-size: .93rem; }
.shloka .mean { margin-top: .9rem; text-align: left; border-top: 1px dashed #DDB868; padding-top: .8rem; }
.shloka .src { margin-top: .55rem; font-size: .82rem; color: var(--muted); }
.benefits { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.benefits li { display: flex; gap: .7rem; align-items: flex-start; }
.benefits li::before { content: ""; flex-shrink: 0; width: 10px; height: 10px; margin-top: .5rem; border-radius: 50% 0; background: var(--gold); transform: rotate(45deg); }

/* ---------- expense detail ---------- */
.detail-head { text-align: center; padding: 1.4rem 1rem 1.1rem; }
.detail-head .icon-box { margin: 0 auto .7rem; width: 76px; height: 76px; font-size: 2.3rem; border-radius: 22px; animation: pop .45s var(--ease); }
.detail-head h2 { font-family: var(--display); font-weight: 400; margin: 0; overflow-wrap: anywhere; }
.detail-head .amt { font-size: 2.3rem; font-weight: 800; }
.deleted-banner { background: #FEF1F0; color: var(--red); border: 2px solid #F0C4C0; border-radius: 14px; padding: .9rem; text-align: center; font-weight: 700; margin: 0 1rem 1rem; }
.receipt-img { width: 100%; border-radius: 14px; border: 1px solid var(--line); animation: fadeIn .4s; }
.comment { padding: .75rem 1rem; border-bottom: 1px solid var(--line); }
.comment:last-child { border-bottom: 0; }

/* ---------- bars ---------- */
.bar-row { padding: .75rem 1rem; border-bottom: 1px solid var(--line); }
.bar-row:last-child { border-bottom: 0; }
.bar-top { display: flex; justify-content: space-between; gap: .5rem; font-weight: 700; }
.bar { height: 14px; background: var(--bg-2); border-radius: 99px; margin-top: .4rem; overflow: hidden; }
.bar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold-2), var(--saffron)); border-radius: 99px; transform-origin: left; animation: grow .9s var(--ease) both; }
@keyframes grow { from { transform: scaleX(0); } }

/* ---------- to-do ---------- */
.progress { height: 12px; background: var(--bg-2); border-radius: 99px; overflow: hidden; margin-top: .45rem; }
.progress > i { display: block; height: 100%; background: linear-gradient(90deg, #1A9C78, var(--green)); border-radius: 99px; transform-origin: left; animation: grow .9s var(--ease) both; }
.todo { display: flex; align-items: flex-start; gap: .85rem; padding: .9rem 1rem; border-bottom: 1px solid var(--line); min-height: 70px; transition: background .3s; }
.todo:last-child { border-bottom: 0; }
.todo .tick {
  width: 42px; height: 42px; border-radius: 12px; border: 2.5px solid #B5A48B; background: #fff; flex-shrink: 0;
  display: grid; place-items: center; color: #fff; cursor: pointer; margin-top: 1px; transition: background .2s, border-color .2s, transform .1s;
}
.todo .tick:active { transform: scale(.9); }
.todo .tick svg { width: 26px; height: 26px; stroke: #fff; stroke-width: 3.2; fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 24; }
.todo.done .tick { background: var(--green); border-color: var(--green); }
.todo.done .tick svg { animation: tickIn .35s var(--ease) both; }
.todo.just .tick { animation: pop .4s var(--ease); }
.todo .body { flex: 1; min-width: 0; cursor: pointer; text-decoration: none; color: inherit; }
.todo .t { font-weight: 700; overflow-wrap: anywhere; }
.todo.done .t { text-decoration: line-through; text-decoration-color: rgba(0,0,0,.35); color: var(--muted); }
.todo .meta { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .3rem; }
.badge { display: inline-flex; align-items: center; gap: .25rem; font-size: .78rem; font-weight: 700; padding: .12rem .6rem; border-radius: 999px; background: var(--bg-2); color: #4A3F35; }
.badge svg.i { width: 14px; height: 14px; }
.badge.star { background: #FFF0C2; color: #6B4A00; }
.badge.late, .badge.red { background: #FDE4E1; color: var(--red); }
.badge.who { background: #E7EEFF; color: #1E3A8A; }
.badge.gold { background: var(--gold-soft); color: #6B4A00; }
.add-bar { display: flex; gap: .55rem; }
.add-bar .input { flex: 1; min-width: 0; }

/* ---------- misc ---------- */
.empty { text-align: center; padding: 2.2rem 1rem; color: var(--muted); }
.empty .art { width: 84px; height: 84px; margin: 0 auto .6rem; border-radius: 28px; display: grid; place-items: center; background: var(--gold-soft); color: var(--gold); animation: float 3.5s ease-in-out infinite; }
.empty .art svg.i { width: 40px; height: 40px; }
.search { position: relative; margin-bottom: 1rem; }
.search .input { padding-left: 3rem; }
.search svg.i { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: var(--muted); }
.toast {
  position: fixed; left: 50%; bottom: calc(104px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 100;
  display: flex; align-items: center; gap: .55rem;
  background: #2A1E18; color: #fff; padding: .9rem 1.3rem; border-radius: 16px; font-weight: 700;
  max-width: calc(100% - 32px); box-shadow: var(--shadow-lg); animation: toastIn .3s var(--ease);
}
.toast.err { background: var(--red); }
.pin-screen { min-height: 92vh; display: flex; flex-direction: column; justify-content: center; align-items: stretch; padding: 1.5rem; text-align: center; max-width: 460px; margin: 0 auto; }
.pin-screen h1 { font-family: var(--display); font-weight: 400; color: var(--maroon); margin: .5rem 0 .2rem; font-size: 1.9rem; }
.pin-screen .input { text-align: center; font-size: 2rem; letter-spacing: .35em; font-weight: 800; min-height: 70px; }
.who-grid { display: grid; grid-template-columns: 1fr; gap: .75rem; margin-top: 1.3rem; }
.who-grid button {
  min-height: 78px; border-radius: 20px; border: 1px solid var(--line); background: #fff; font-weight: 700; font-size: 1.25rem; cursor: pointer;
  display: flex; align-items: center; gap: 1rem; padding: .6rem 1.1rem; text-align: left; box-shadow: var(--shadow);
  transition: transform .15s var(--ease), border-color .2s; animation: fadeUp .5s var(--ease) both;
}
.who-grid button:nth-child(2) { animation-delay: .06s; } .who-grid button:nth-child(3) { animation-delay: .12s; }
.who-grid button:nth-child(4) { animation-delay: .18s; } .who-grid button:nth-child(5) { animation-delay: .24s; }
.who-grid button:hover { border-color: var(--gold); transform: translateX(4px); }
.who-grid button .grow { flex: 1; }
.who-grid button svg.i { color: var(--line-2); }
.kv { display: flex; justify-content: space-between; gap: 1rem; padding: .7rem 1rem; border-bottom: 1px solid var(--line); }
.kv:last-child { border-bottom: 0; }
.tabs { display: flex; gap: .3rem; margin-bottom: 1rem; padding: .3rem; background: var(--bg-2); border-radius: 16px; }
.tabs button { flex: 1; min-height: 50px; border-radius: 12px; border: 0; background: transparent; font-weight: 700; cursor: pointer; color: var(--muted); transition: all .2s; }
.tabs button.on { background: #fff; color: var(--maroon); box-shadow: var(--shadow); }
.foot { text-align: center; color: var(--muted); font-size: .85rem; padding: 1.5rem 1rem 1rem; }
.foot .sk { font-family: var(--sanskrit); color: var(--maroon); font-size: 1.15rem; }

@media (max-width: 380px) {
  :root { font-size: 17.5px; }
  .countdown .n { font-size: 1.7rem; }
  .hero h1 { font-size: 2rem; }
}
@media (min-width: 640px) {
  .who-grid { grid-template-columns: 1fr 1fr; }
  .tiles { grid-template-columns: repeat(4, 1fr); }
}
/* ================= Home sections ================= */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

.lotus { display: block; width: 74px; height: 38px; margin: 0 auto; }
.lotus-divider { display: flex; align-items: center; gap: .8rem; margin: 1.2rem 0 1.1rem; }
.lotus-divider::before, .lotus-divider::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--gold-2), transparent); }
.lotus-divider .lotus { width: 52px; height: 26px; margin: 0; }
.sec-head { text-align: center; margin-bottom: 1.1rem; }
.sec-head .kicker { font-size: .74rem; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); font-weight: 700; }
.sec-head h2 { font-family: var(--display); font-weight: 400; font-size: 1.65rem; color: var(--maroon); margin: .1rem 0 0; line-height: 1.25; }
.sec-head p { margin: .25rem 0 0; color: var(--muted); }

/* the shloka */
.manuscript {
  position: relative; text-align: center; padding: 2rem 1.3rem 1.7rem; border-radius: 24px; overflow: hidden;
  background: linear-gradient(180deg, #FFFCF5, #FFF4E0);
  border: 1px solid #EBD3A0;
  box-shadow: var(--shadow), inset 0 0 0 7px #fff, inset 0 0 0 8px rgba(201,160,78,.45);
}
.manuscript .corner { position: absolute; width: 40px; height: 40px; opacity: .55; color: var(--gold); }
.manuscript .corner.tl { top: 16px; left: 16px; }
.manuscript .corner.tr { top: 16px; right: 16px; transform: scaleX(-1); }
.manuscript .corner.bl { bottom: 16px; left: 16px; transform: scaleY(-1); }
.manuscript .corner.br { bottom: 16px; right: 16px; transform: scale(-1, -1); }
.manuscript .tag { display: inline-block; background: var(--gold-soft); color: var(--maroon); border: 1px solid #EBD3A0; border-radius: 999px; padding: .2rem .95rem; font-size: .8rem; font-weight: 700; letter-spacing: .04em; margin: .6rem 0 1rem; }
.manuscript .sk { font-family: var(--sanskrit); font-size: 1.5rem; line-height: 2; color: var(--maroon-deep); }
.manuscript .sk .ln, .manuscript .tr .ln { display: block; white-space: nowrap; }
.manuscript .sk { font-size: clamp(1.02rem, 4.7vw, 1.5rem); }
.manuscript .tr { font-size: clamp(.8rem, 3.6vw, .95rem); }
.manuscript .tr { font-style: italic; color: #7A5A1A; margin-top: .8rem; font-size: .95rem; line-height: 1.7; }
.manuscript .mean { margin: 1.1rem auto 0; max-width: 520px; text-align: left; border-top: 1px dashed #D9B66A; padding-top: .95rem; }
.manuscript .why { margin: .8rem auto 0; max-width: 520px; text-align: left; color: var(--muted); }
.manuscript .src { margin-top: .9rem; font-size: .85rem; color: var(--muted); }

/* card that opens the Sahasranama */
.stotra-card {
  display: flex; align-items: center; gap: 1rem; margin-top: 1.1rem; padding: 1.05rem 1.1rem; border-radius: 22px; text-decoration: none; color: inherit;
  background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); transition: transform .15s var(--ease);
}
.stotra-card:active { transform: scale(.98); }
.stotra-card .om-tile { width: 60px; height: 60px; border-radius: 18px; flex-shrink: 0; display: grid; place-items: center; font-family: var(--sanskrit); font-size: 2rem; color: #FFE9B8; background: linear-gradient(150deg, var(--maroon-2), var(--maroon-deep)); box-shadow: 0 10px 20px -12px rgba(110,20,35,.8); }
.stotra-card .grow { flex: 1; min-width: 0; }
.stotra-card .t1 { font-family: var(--sanskrit); font-size: 1.2rem; color: var(--maroon); line-height: 1.3; }
.stotra-card .t2 { font-weight: 700; }
.stotra-card .t3 { color: var(--muted); font-size: .86rem; }
.stotra-card svg.i { color: var(--gold); }

/* programme timeline (Announcements page) */
.timeline { position: relative; padding-left: 1.7rem; }
.timeline::before { content: ""; position: absolute; left: .5rem; top: 1rem; bottom: 1rem; width: 2px; background: linear-gradient(var(--gold-2), var(--saffron)); }
.tl-day { position: relative; margin-bottom: .9rem; }
.tl-day:last-child { margin-bottom: 0; }
.tl-day::before { content: ""; position: absolute; left: -1.5rem; top: 1.4rem; width: 14px; height: 14px; border-radius: 50%; background: var(--saffron); box-shadow: 0 0 0 4px var(--bg), 0 0 0 5px var(--gold-2); }
.tl-day .card { margin: 0; display: flex; gap: 1rem; align-items: flex-start; }
.tl-date { text-align: center; min-width: 58px; line-height: 1.1; padding-right: .9rem; border-right: 1px solid var(--line); }
.tl-date b { display: block; font-family: var(--display); font-weight: 400; font-size: 2rem; color: var(--maroon); }
.tl-date span { font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 700; }
.tl-text { flex: 1; white-space: pre-wrap; overflow-wrap: anywhere; }
.tl-text h3 { margin: 0 0 .15rem; font-size: 1.05rem; }

/* ================= Vishnu Sahasranama page ================= */
.st-tools { position: sticky; top: calc(64px + env(safe-area-inset-top)); z-index: 15; display: flex; align-items: center; gap: .5rem; padding: .55rem 1rem; background: rgba(250,246,239,.94); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.st-tools select.input { min-height: 46px; flex: 1; min-width: 0; font-size: .95rem; padding-top: .3rem; padding-bottom: .3rem; }
.st-tools .sz { display: flex; border: 1px solid var(--line-2); border-radius: 12px; overflow: hidden; background: #fff; flex-shrink: 0; }
.st-tools .sz button { width: 48px; min-height: 44px; border: 0; background: transparent; font-weight: 800; color: var(--maroon); cursor: pointer; }
.st-tools .sz button + button { border-left: 1px solid var(--line); }
.st-head { text-align: center; padding: 1.6rem 1rem .4rem; }
.st-head .om-big { font-size: 2.4rem; }
.st-head h1 { font-family: var(--sanskrit); font-weight: 400; color: var(--maroon); font-size: 1.85rem; margin: .2rem 0 .2rem; line-height: 1.35; }
.st-head p { margin: 0; color: var(--muted); }
.st-continue { display: flex; align-items: center; gap: .7rem; margin: 1rem; padding: .8rem 1rem; border-radius: 16px; background: var(--gold-soft); border: 1px solid #EED9AA; }
.st-continue .grow { flex: 1; font-weight: 600; }
.st-sec { margin: 1.6rem 1rem 0; }
.st-sec-h { text-align: center; margin-bottom: .9rem; scroll-margin-top: calc(130px + env(safe-area-inset-top)); }
.st-sec-h .sa { font-family: var(--sanskrit); font-size: 1.4rem; color: var(--maroon); }
.st-sec-h .en { font-size: .78rem; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); font-weight: 700; }
.st-sec-h .sub { color: var(--muted); font-size: .9rem; }
.st-verses { background: #fff; border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow-sm); padding: .4rem 0; }
.st-verse { padding: .85rem 1.1rem; border-bottom: 1px solid #F3EADB; font-family: var(--sanskrit); font-size: var(--st-size, 1.3rem); line-height: 1.9; color: var(--ink); text-align: center; }
.st-verse:last-child { border-bottom: 0; }
.st-verse.speaker { font-family: "Mukta", sans-serif; font-size: .9rem; font-weight: 700; letter-spacing: .08em; color: var(--gold); padding: .7rem 1rem .1rem; border-bottom: 0; }
.st-verse .ln { display: block; }
.st-foot { text-align: center; color: var(--muted); font-size: .8rem; padding: 1.5rem 1rem 1rem; }
.st-foot a { color: var(--muted); }

/* ================= iPhone and phone polish ================= */
button, select, textarea, input:not([type=checkbox]):not([type=radio]) { -webkit-appearance: none; appearance: none; }
select.input { background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236E1423' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right .9rem center / 20px; padding-right: 2.6rem; }
input[type=date].input { display: block; text-align: left; line-height: 1.3; }
input[type=date]::-webkit-date-and-time-value { text-align: left; }
input[type=date]::-webkit-calendar-picker-indicator { opacity: .6; }
.page, .hero { padding-left: max(1rem, env(safe-area-inset-left)); padding-right: max(1rem, env(safe-area-inset-right)); }
#app { overflow-x: clip; min-height: 100dvh; }
.topbar { padding-top: calc(.55rem + env(safe-area-inset-top)); }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .petals { display: none; }
}
