/* ==========================================================================
   Dharmic Path: design tokens
   Cream and gold by day; midnight navy and gold, or lamp-lit gold, by night. Editorial serif for display, Inter for UI,
   Noto Serif Devanagari for scripture.
   ========================================================================== */
:root {
  --bg: #faf5e9;
  --surface: #fffdf6;
  --surface-2: #f4e9cf;
  --ink: #211a0e;
  --ink-2: #4f4430;
  --muted: #74674c;
  --line: rgba(150, 108, 20, 0.15);
  --line-strong: rgba(150, 108, 20, 0.26);
  --gold: #8c6410;
  --gold-soft: rgba(212, 160, 40, 0.15);
  --kumkum: #9a2e1f;
  --night: #121b31;
  --night-2: #1d2b4b;
  --night-ink: #f8ecca;
  --night-muted: #bcc2d3;
  --night-gold: #ecc865;
  --night-glow: rgba(236, 200, 101, 0.2);
  --fill: linear-gradient(180deg, #a57a16, #8c6410);
  --fill-edge: #8c6410;
  --on-fill: #fffdf6;
  --shadow: 0 1px 2px rgba(120, 86, 10, 0.05), 0 8px 24px rgba(120, 86, 10, 0.07);
  --radius: 20px;
  --radius-sm: 14px;
  --display: "Cormorant Garamond", "Cormorant", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --deva: "Noto Serif Devanagari", "Tiro Devanagari Sanskrit", serif;
  color-scheme: light;
}

/* Dark: midnight navy with gold. */
:root[data-theme="dark"] {
  --bg: #0c1424;
  --surface: #13203a;
  --surface-2: #1b2b4a;
  --ink: #f6e9c6;
  --ink-2: #e0cd9d;
  --muted: #a6aec2;
  --line: rgba(233, 196, 106, 0.14);
  --line-strong: rgba(233, 196, 106, 0.26);
  --gold: #e9c46a;
  --gold-soft: rgba(233, 196, 106, 0.14);
  --kumkum: #f08a76;
  --night: #09101e;
  --night-2: #1a2a4a;
  --night-ink: #f8ecca;
  --night-muted: #b3bacb;
  --night-gold: #f0cf7a;
  --night-glow: rgba(240, 207, 122, 0.22);
  --fill: linear-gradient(180deg, #f0cf7a, #e2b955);
  --fill-edge: #e2b955;
  --on-fill: #0c1424;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.28);
  color-scheme: dark;
}

/* Dark gold: warm, lamp-lit gold. */
:root[data-theme="gold"] {
  --bg: #1a150b;
  --surface: #251e10;
  --surface-2: #2f2614;
  --ink: #f7ebcf;
  --ink-2: #e3d2a8;
  --muted: #bba987;
  --line: rgba(234, 192, 99, 0.15);
  --line-strong: rgba(234, 192, 99, 0.28);
  --gold: #eac063;
  --gold-soft: rgba(234, 192, 99, 0.15);
  --kumkum: #ef8c78;
  --night: #110d05;
  --night-2: #33280f;
  --night-ink: #f9edd0;
  --night-muted: #c9b893;
  --night-gold: #f2cf73;
  --night-glow: rgba(242, 207, 115, 0.24);
  --fill: linear-gradient(180deg, #f2cf73, #e2b24e);
  --fill-edge: #e2b24e;
  --on-fill: #1a150b;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.28);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { font-size: 15.5px; }
/* Text size, chosen under You: everything sized in rem grows together. */
html[data-text="lg"] { font-size: 17.5px; }
html[data-text="xl"] { font-size: 19.5px; }
html, body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
body { font-size: 1rem; }
a { color: inherit; }
button { font: inherit; color: inherit; }

.app {
  max-width: 600px;
  margin: 0 auto;
  min-height: 100vh;
  padding-bottom: calc(84px + env(safe-area-inset-bottom));
}

/* ---------- Top bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: calc(12px + env(safe-area-inset-top)) 18px 12px;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.topbar.scrolled { border-bottom-color: var(--line); }
.brand {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.32rem;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.brand .mark {
  flex: none;
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid var(--gold);
  color: var(--gold);
  font-family: var(--deva);
  font-size: 0.95rem;
  line-height: 1;
}
.icon-btn {
  flex: none;
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}
.icon-btn svg, .tabbar svg, .ico {
  width: 20px; height: 20px;
  fill: none; stroke: currentColor; stroke-width: 1.5;
  stroke-linecap: round; stroke-linejoin: round;
}

/* ---------- Tab bar ---------- */
.tabbar {
  position: fixed;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 100%; max-width: 600px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-top: 1px solid var(--line);
  z-index: 20;
}
.tabbar a {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 4px 0;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.04em;
}
.tabbar a.active { color: var(--ink); }
.tabbar a.active svg { stroke: var(--gold); }
.tabbar a.active::before {
  content: "";
  position: absolute;
  top: -9px;
  width: 18px; height: 2px;
  border-radius: 2px;
  background: var(--gold);
}

/* ---------- Layout & type ---------- */
main { padding: 6px 18px 28px; outline: none; }
.section { margin-top: 30px; }
.section-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  margin: 0 2px 12px;
}
.section-title {
  margin: 0;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.45rem;
  letter-spacing: 0.005em;
}
.section-head a, .link {
  color: var(--gold);
  font-size: 0.8rem;
  font-weight: 500;
  text-decoration: none;
  letter-spacing: 0.02em;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.66rem;
  font-weight: 600;
  color: var(--gold);
}
.lede { color: var(--ink-2); margin: 4px 2px 18px; }
.meta { color: var(--muted); font-size: 0.8rem; }
.page-title {
  font-family: var(--display);
  font-weight: 600;
  font-size: 2.1rem;
  line-height: 1.1;
  margin: 10px 2px 6px;
}
.page-sub { color: var(--muted); margin: 0 2px 18px; font-size: 0.9rem; }

.greeting { margin: 10px 2px 0; }
.greeting .date { color: var(--muted); font-size: 0.82rem; letter-spacing: 0.02em; }
.greeting h2 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 2rem;
  line-height: 1.12;
  margin: 2px 0 4px;
}
.greeting .hindu { color: var(--gold); font-size: 0.82rem; letter-spacing: 0.02em; }
.greeting .timing-line { display: inline-block; margin-top: 4px; color: var(--ink-2); font-size: 0.76rem; text-decoration: none; }

/* ---------- Surfaces ---------- */
.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 14px;
}
a.card { display: block; text-decoration: none; color: inherit; }
.card.flush { padding: 0; overflow: hidden; }

.night {
  position: relative;
  overflow: hidden;
  color: var(--night-ink);
  background:
    radial-gradient(120% 90% at 85% 0%, var(--night-glow), transparent 55%),
    radial-gradient(90% 80% at 0% 100%, rgba(212, 160, 40, 0.1), transparent 60%),
    linear-gradient(160deg, var(--night-2), var(--night));
  border-radius: 24px;
  padding: 26px 22px;
  box-shadow: 0 18px 40px rgba(18, 27, 49, 0.2);
  text-decoration: none;
  display: block;
  margin-bottom: 14px;
}
.night .eyebrow { color: var(--night-gold); }
.night .meta { color: var(--night-muted); }
.night .mandala {
  position: absolute;
  right: -70px; top: -70px;
  width: 260px; height: 260px;
  color: var(--night-gold);
  opacity: 0.16;
  pointer-events: none;
}
.night > *:not(.mandala) { position: relative; }

.verse-hero .deva-text {
  font-family: var(--deva);
  color: var(--night-gold);
  font-size: 1.04rem;
  line-height: 1.85;
  margin: 14px 0 12px;
  white-space: pre-line;
}
.verse-hero blockquote {
  margin: 0 0 14px;
  font-family: var(--display);
  font-style: italic;
  font-weight: 500;
  font-size: 1.42rem;
  line-height: 1.32;
}
.verse-hero .cite { font-size: 0.78rem; color: var(--night-muted); letter-spacing: 0.04em; }

/* ---------- Ornament ---------- */
.orn { display: flex; align-items: center; gap: 10px; margin: 26px 0; color: var(--gold); }
.orn::before, .orn::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--line-strong), transparent); }
.orn span { width: 6px; height: 6px; transform: rotate(45deg); border: 1px solid currentColor; }

/* ---------- Seal: Devanagari monogram ---------- */
.seal {
  flex: none;
  width: 50px; height: 50px;
  display: grid; place-items: center;
  border-radius: 15px;
  background: var(--gold-soft);
  color: var(--gold);
  font-family: var(--deva);
  font-weight: 500;
  font-size: 1.05rem;
  line-height: 1;
  text-align: center;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--gold) 22%, transparent);
}
.seal.m { font-size: 0.82rem; }
.seal.s { font-size: 0.66rem; }
.seal.lg { width: 64px; height: 64px; border-radius: 18px; font-size: 1.35rem; }
.seal.lg.m { font-size: 1.05rem; }
.seal.lg.s { font-size: 0.85rem; }
.night .seal { background: rgba(212, 176, 106, 0.12); color: var(--night-gold); border-color: rgba(212, 176, 106, 0.3); }

/* ---------- Grouped lists ---------- */
.list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; margin-bottom: 14px; }
.row {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px;
  color: inherit;
  text-decoration: none;
  border-top: 1px solid var(--line);
}
.list > .row:first-child { border-top: 0; }
.row .body { flex: 1; min-width: 0; }
.row h3 {
  margin: 0;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.12rem;
  line-height: 1.25;
}
.row p { margin: 2px 0 0; color: var(--muted); font-size: 0.82rem; line-height: 1.45; }
.row .chev { color: var(--muted); font-size: 1.1rem; }
a.row:active { background: var(--surface-2); }

.tag {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  color: var(--ink-2);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.tag.gold { border-color: color-mix(in srgb, var(--gold) 45%, transparent); color: var(--gold); }
.night .tag { border-color: rgba(243, 234, 217, 0.25); color: var(--night-ink); }

/* ---------- Date block ---------- */
.dateblock {
  flex: none;
  width: 50px;
  text-align: center;
  line-height: 1;
}
.dateblock .d { display: block; font-family: var(--display); font-weight: 600; font-size: 1.7rem; }
.dateblock .m { display: block; margin-top: 4px; font-size: 0.6rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); }

/* ---------- Chips & buttons ---------- */
.chips { display: flex; gap: 8px; overflow-x: auto; margin: 0 -18px; padding: 2px 20px 6px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips.wrap { flex-wrap: wrap; overflow: visible; margin: 0; padding: 0; }
.chip {
  flex: none;
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink-2);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}
.chip .dv { font-family: var(--deva); color: var(--gold); font-size: 0.85rem; }
.chip.active { background: var(--fill); border-color: var(--fill-edge); color: var(--on-fill); }
.chip.active .dv { color: var(--bg); opacity: 0.8; }
.night .chip { background: transparent; color: var(--night-ink); border-color: rgba(243, 234, 217, 0.22); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--fill-edge);
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  background: var(--fill);
  color: var(--on-fill);
  cursor: pointer;
  text-decoration: none;
}
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn.gold { background: var(--night-gold); border-color: var(--night-gold); color: #1a140d; }
.night .btn.ghost { color: var(--night-ink); border-color: rgba(243, 234, 217, 0.28); }
.btn[disabled] { opacity: 0.5; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }

.segmented {
  display: flex;
  padding: 3px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  gap: 2px;
  margin-bottom: 14px;
}
.segmented button {
  flex: 1;
  border: 0;
  border-radius: 999px;
  padding: 7px 8px;
  background: transparent;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
}
.segmented button.active { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08); }

.search {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  padding: 11px 16px 11px 40px;
  font: inherit;
  font-size: 0.9rem;
  outline: none;
}
.search:focus { border-color: var(--gold); }
.search-wrap { position: relative; margin-bottom: 12px; }
.search-wrap .ico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); width: 17px; height: 17px; }

/* ---------- Calendar ---------- */
.cal-head { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.cal-head .title { flex: 1; }
.cal-head h3 { margin: 0; font-family: var(--display); font-weight: 600; font-size: 1.4rem; line-height: 1.1; }
.cal-head .meta { margin-top: 3px; }
.cal-nav {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  color: var(--ink);
  text-decoration: none;
}
.cal-nav.off { opacity: 0.25; pointer-events: none; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.cal-grid .wd { font-size: 0.62rem; font-weight: 600; letter-spacing: 0.12em; color: var(--muted); padding-bottom: 8px; }
.cell {
  position: relative;
  aspect-ratio: 1 / 1.02;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  border-radius: 12px;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.cell.out { visibility: hidden; }
.cell.past { color: var(--muted); }
.cell .moon { position: absolute; top: 2px; right: 4px; font-size: 0.58rem; color: var(--muted); line-height: 1; }
.cell .dots { display: flex; gap: 3px; height: 5px; margin-top: 3px; }
.cell .dots i { width: 4px; height: 4px; border-radius: 50%; background: var(--muted); opacity: 0.55; }
.cell .dots i.f { background: var(--gold); opacity: 1; }
.cell.fest .n { color: var(--gold); font-weight: 700; }
.cell.today { background: var(--fill); color: var(--on-fill); }
.cell.today .n, .cell.today .moon { color: var(--on-fill); }
.cell.today .dots i { background: var(--on-fill); }
.cal-legend { display: flex; gap: 16px; justify-content: center; margin-top: 12px; color: var(--muted); font-size: 0.7rem; flex-wrap: wrap; }
.cal-legend span { display: inline-flex; align-items: center; gap: 6px; }
.cal-legend i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); }
.cal-legend i.f { background: var(--gold); }

.loc-line { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; color: var(--muted); font-size: 0.78rem; margin: 2px 2px 14px; }
.loc-line a { color: var(--gold); text-decoration: none; font-weight: 500; }

/* Day hero */
.day-hero { text-align: center; padding: 28px 54px; }
.day-hero .big { font-family: var(--display); font-weight: 600; font-size: 4.4rem; line-height: 1; margin: 8px 0 2px; }
.day-hero .month { font-family: var(--display); font-size: 1.3rem; }
.day-hero .hindu { margin-top: 12px; color: var(--night-gold); font-size: 0.86rem; letter-spacing: 0.03em; }
.day-hero .sun { display: flex; justify-content: center; gap: 18px; margin-top: 10px; font-size: 0.76rem; color: var(--night-muted); }
.day-hero .nav { position: absolute; top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; border: 1px solid rgba(243, 234, 217, 0.22); color: var(--night-ink); text-decoration: none; }
.day-hero .nav.prev { left: 12px; }
.day-hero .nav.next { right: 12px; }

/* ---------- Prose ---------- */
.prose p { margin: 0 0 12px; }
.prose p:last-child { margin-bottom: 0; }
.prose h3 { font-family: var(--display); font-weight: 600; font-size: 1.3rem; margin: 22px 0 8px; }
.prose h3:first-child { margin-top: 0; }
.prose ul, .prose ol { padding-left: 1.15rem; margin: 0 0 12px; }
.prose li { margin-bottom: 7px; }
.prose li::marker { color: var(--gold); }
.prose strong { font-weight: 600; }
.steps { counter-reset: step; list-style: none; padding: 0 !important; }
.steps li { counter-increment: step; position: relative; padding-left: 40px; margin-bottom: 14px; }
.steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: 0;
  width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--gold);
  color: var(--gold);
  font-family: var(--display);
  font-weight: 600; font-size: 0.95rem;
}

.part-switch { display: flex; gap: 8px; overflow-x: auto; margin: 10px -18px 0; padding: 4px 18px 6px; scrollbar-width: none; }
.part-switch::-webkit-scrollbar { display: none; }
.part-switch .chip { flex: none; white-space: nowrap; text-decoration: none; }
.detail-head { display: flex; gap: 16px; align-items: center; margin: 12px 2px 20px; }
.detail-head h2 { margin: 2px 0 2px; font-family: var(--display); font-weight: 600; font-size: 1.85rem; line-height: 1.1; }
.detail-head p { margin: 0; color: var(--muted); font-size: 0.86rem; }

/* ---------- Prayers ---------- */
.moment-card .title { font-family: var(--display); font-weight: 600; font-size: 1.75rem; line-height: 1.15; margin: 6px 0 2px; }
.moment-card .deva-line { font-family: var(--deva); color: var(--night-gold); font-size: 1rem; margin: 14px 0 0; white-space: pre-line; line-height: 1.85; }
.mini-list { margin-top: 18px; border-top: 1px solid rgba(243, 234, 217, 0.14); }
.mini-list a { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 11px 0; border-bottom: 1px solid rgba(243, 234, 217, 0.1); color: var(--night-ink); text-decoration: none; font-size: 0.92rem; }
.mini-list a:last-child { border-bottom: 0; padding-bottom: 0; }
.mini-list a span:last-child { color: var(--night-muted); font-size: 0.74rem; white-space: nowrap; }

.stanza { padding: 22px 0; border-bottom: 1px solid var(--line); }
.stanza:first-child { padding-top: 6px; }
.stanza:last-child { border-bottom: 0; padding-bottom: 4px; }
.stanza .label { display: block; margin-bottom: 8px; }
.stanza .dev { font-family: var(--deva); font-size: calc(1.12rem * var(--scale, 1)); line-height: 1.95; color: var(--ink); white-space: pre-line; margin: 0; }
.stanza .rom { font-style: italic; color: var(--ink-2); white-space: pre-line; margin: 8px 0 0; font-size: calc(0.92rem * var(--scale, 1)); line-height: 1.65; }
.stanza .en { font-family: var(--display); font-size: calc(1.16rem * var(--scale, 1)); line-height: 1.5; color: var(--ink); margin: 10px 0 0; }
.stanza.refrain .dev { color: var(--gold); }
.hide-dev .stanza .dev, .hide-rom .stanza .rom, .hide-en .stanza .en { display: none; }

/* ---------- Japa ---------- */
.japa { text-align: center; }
.japa-dev { font-family: var(--deva); color: var(--gold); font-size: 1.2rem; line-height: 1.85; margin: 12px 0 0; white-space: pre-line; }
.japa-say { font-family: var(--display); font-weight: 600; font-size: 1.6rem; line-height: 1.25; margin: 6px 0 0; white-space: pre-line; }
.japa-mean { font-family: var(--display); font-style: italic; font-size: 1.12rem; line-height: 1.45; color: var(--ink-2); margin: 10px auto 16px; max-width: 30em; }
.japa-ring {
  position: relative;
  width: 232px; height: 232px;
  margin: 18px auto 10px;
  border-radius: 50%;
  border: 0;
  background:
    radial-gradient(circle at 50% 38%, rgba(212, 176, 106, 0.22), transparent 60%),
    linear-gradient(160deg, var(--night-2), var(--night));
  color: var(--night-ink);
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  box-shadow: 0 18px 40px rgba(22, 18, 14, 0.25), inset 0 0 0 1px rgba(212, 176, 106, 0.35);
  transition: transform 0.08s;
}
.japa-ring .count { position: relative; display: block; font-family: var(--display); font-weight: 600; font-size: 4.2rem; line-height: 1; }
.japa-ring .of { position: relative; display: block; margin-top: 6px; font-size: 0.68rem; letter-spacing: 0.18em; color: var(--night-muted); }
.japa-ring svg { position: absolute; inset: 10px; width: calc(100% - 20px); height: calc(100% - 20px); transform: rotate(-90deg); }
.japa-ring circle { fill: none; stroke-width: 2; }
.japa-ring:active { transform: scale(0.985); }
select.chip {
  appearance: none; -webkit-appearance: none;
  padding-right: 32px;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 17px) 52%, calc(100% - 12px) 52%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
}

/* ---------- Tiles ---------- */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tile {
  position: relative;
  display: flex; flex-direction: column; justify-content: space-between; gap: 18px;
  min-height: 128px;
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
  overflow: hidden;
}
.tile .dv { font-family: var(--deva); color: var(--gold); font-size: 1.45rem; line-height: 1.2; }
.tile h3 { margin: 0; font-family: var(--display); font-weight: 600; font-size: 1.22rem; line-height: 1.15; }
.tile p { margin: 3px 0 0; color: var(--muted); font-size: 0.76rem; line-height: 1.4; }

/* Book cards */
.book { padding: 0; overflow: hidden; }
.book .cover { margin: 0; border-radius: 0; box-shadow: none; padding: 24px 22px 22px; }
.book .cover .dv { font-family: var(--deva); font-size: 1.5rem; color: var(--night-gold); line-height: 1.3; }
.book .cover h3 { margin: 6px 0 2px; font-family: var(--display); font-weight: 600; font-size: 1.75rem; line-height: 1.1; }
.book .cover p { margin: 0; color: var(--night-muted); font-size: 0.84rem; }
.book .foot { padding: 14px 20px 18px; }

.progress { height: 3px; border-radius: 3px; background: var(--line); overflow: hidden; margin-top: 10px; }
.progress span { display: block; height: 100%; background: var(--gold); }

/* ---------- Reader ---------- */
.section-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); gap: 8px; margin-top: 8px; }
.sec-tile {
  display: grid; place-items: center;
  min-height: 46px; padding: 4px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  text-decoration: none;
  font-weight: 600; font-size: 0.78rem;
  text-align: center;
}
.sec-tile.here { background: var(--fill); color: var(--on-fill); border-color: var(--fill-edge); }

.reader-head { padding: 12px 2px 16px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.reader-head h2 { font-family: var(--display); font-weight: 600; font-size: 2.1rem; margin: 4px 0 2px; line-height: 1.1; }
.reader-head .meta { margin: 0; }
.reader-tools { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.reader { font-size: calc(1.08rem * var(--read-scale, 1)); line-height: 1.75; }
.reader .verse { padding: 20px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 80px; }
.reader .verse.highlight { background: var(--gold-soft); border-radius: 16px; padding: 20px 14px; border-bottom-color: transparent; }
.reader .vnum { font-size: 0.66rem; font-weight: 600; letter-spacing: 0.16em; color: var(--gold); }
.reader .sanskrit { font-family: var(--deva); font-size: 1.04em; line-height: 1.9; margin: 8px 0 2px; white-space: pre-line; }
.reader .translit { font-style: italic; color: var(--ink-2); font-size: 0.84em; margin: 0 0 8px; white-space: pre-line; }
.reader .vtext { margin: 8px 0 0; font-family: var(--display); font-size: 1.14em; line-height: 1.55; }
.reader .para { font-family: var(--display); font-size: 1.14em; line-height: 1.6; margin: 0 0 1em; }
.reader .para.sub { font-family: var(--sans); font-size: 0.84em; color: var(--muted); font-style: italic; text-align: center; }
.reader .para.fn { font-family: var(--sans); font-size: 0.76em; color: var(--muted); margin-bottom: 0.5em; }
.reader-nav { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 28px 0 10px; }
.read-progress { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(66px + env(safe-area-inset-bottom)); width: 100%; max-width: 600px; height: 2px; z-index: 21; }
.read-progress span { display: block; height: 100%; width: 0; background: var(--gold); transition: width 0.2s; }

.empty { text-align: center; color: var(--muted); padding: 34px 10px; }
.footer-note { text-align: center; color: var(--muted); font-size: 0.76rem; margin-top: 28px; }
.fade-in { animation: fade 0.35s ease both; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

@media (min-width: 640px) {
  main { padding-left: 24px; padding-right: 24px; }
  .chips { margin: 0 -24px; padding-left: 26px; padding-right: 26px; }
}

[id] { scroll-margin-top: 76px; }

/* ---------- Audio ---------- */
.player { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 4px 0 12px; }
.btn .ico { width: 16px; height: 16px; margin-left: -4px; }
.btn.on { background: var(--gold); border-color: var(--gold); color: #1a140d; }
.stanza.playing { position: relative; }
.stanza.playing::before {
  content: "";
  position: absolute;
  left: -20px; top: 18px; bottom: 18px;
  width: 2px;
  border-radius: 2px;
  background: var(--gold);
}
.stanza.playing .dev { color: var(--gold); }
.voice-panel { margin: 0 0 14px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.voice-panel[hidden] { display: none; }
.voice-panel .vrow { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; min-width: 0; }
.voice-panel select.chip { flex: 1 1 0; width: 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.credit { text-align: center; color: var(--muted); font-size: 0.66rem; letter-spacing: 0.08em; opacity: 0.8; margin: 6px 0 0; }

/* ---------- Scripture extras ---------- */
.reader .para.intro { font-family: var(--sans); font-size: 0.86em; line-height: 1.65; color: var(--ink-2); }
.reader .para.intro:last-of-type { padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.reader .vhead { margin: 26px 0 0; font-size: 0.68rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.reader .vnote { margin: 12px 0 0; padding-left: 14px; border-left: 2px solid var(--line-strong); }
.reader .vnote p { margin: 0 0 8px; font-family: var(--sans); font-size: 0.82em; line-height: 1.65; color: var(--ink-2); }
.reader.hide-notes .vnote { display: none; }

/* ---------- Search ---------- */
.row p.where { color: var(--gold); font-size: 0.72rem; letter-spacing: 0.04em; margin-top: 1px; }
.row p.snip { color: var(--ink-2); margin-top: 4px; }
mark { background: var(--gold-soft); color: inherit; border-radius: 3px; padding: 0 1px; box-shadow: inset 0 -1px 0 var(--gold); }
button.row.more { width: 100%; justify-content: center; border: 0; border-top: 1px solid var(--line); background: transparent; color: var(--gold); font-weight: 600; font-size: 0.84rem; cursor: pointer; }

/* ---------- Sheets, toasts, marks ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(92px + env(safe-area-inset-bottom));
  transform: translate(-50%, 20px); opacity: 0;
  background: var(--ink); color: var(--bg);
  padding: 10px 18px; border-radius: 999px; font-size: 0.84rem; font-weight: 500;
  z-index: 60; pointer-events: none; transition: opacity 0.2s, transform 0.2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.sheet-backdrop { position: fixed; inset: 0; z-index: 50; background: rgba(15, 12, 9, 0); transition: background 0.2s; display: flex; align-items: flex-end; justify-content: center; }
.sheet-backdrop.open { background: rgba(15, 12, 9, 0.45); }
.sheet {
  width: 100%; max-width: 600px; max-height: 86vh; overflow-y: auto;
  background: var(--surface); border-radius: 24px 24px 0 0;
  padding: 10px 20px calc(20px + env(safe-area-inset-bottom));
  transform: translateY(100%); transition: transform 0.22s ease;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.18);
}
.sheet-backdrop.open .sheet { transform: none; }
.sheet .grip { width: 38px; height: 4px; border-radius: 4px; background: var(--line-strong); margin: 0 auto 14px; }
.sheet-deva { font-family: var(--deva); color: var(--gold); white-space: pre-line; line-height: 1.85; margin: 10px 0 0; }
.sheet-preview { font-family: var(--display); font-size: 1.12rem; line-height: 1.45; margin: 8px 0 12px; }
.sheet-note { width: 100%; border: 1px solid var(--line-strong); border-radius: 14px; background: var(--bg); color: var(--ink); font: inherit; font-size: 0.92rem; padding: 10px 12px; resize: vertical; outline: none; }
.sheet-note:focus { border-color: var(--gold); }
.sheet-actions { display: grid; gap: 8px; margin-top: 12px; }
.sheet-actions .btn { width: 100%; }
.reader .verse, .reader .para:not(.intro), #stanzas .stanza { cursor: pointer; }
.reader .is-hl .vtext, .reader .para.is-hl { background: linear-gradient(transparent 8%, var(--gold-soft) 8%, var(--gold-soft) 92%, transparent 92%); box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.reader .para.is-hl { border-radius: 4px; }
.reader .is-bm { position: relative; }
.reader .is-bm::after { content: ""; position: absolute; right: -2px; top: 18px; width: 10px; height: 16px; background: var(--gold); clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 72%, 0 100%); }
.reader .para.is-bm::after { top: 4px; right: -14px; }
.mnote { margin: 10px 0 1em; padding: 10px 12px; border-radius: 12px; background: var(--gold-soft); font-family: var(--sans); font-size: 0.8em; line-height: 1.55; color: var(--ink); white-space: pre-line; }
.mnote::before { content: "Your note · "; font-weight: 600; color: var(--gold); }
.note-snip { font-style: italic; color: var(--ink) !important; margin-top: 4px !important; }
.note-snip::before { content: "Note: "; font-style: normal; color: var(--gold); font-weight: 600; }
.hl-snip { background: var(--gold-soft); border-radius: 4px; padding: 0 3px; }
.hero-wrap { position: relative; }
.hero-wrap .night { margin-bottom: 14px; }
.hero-share { position: absolute; top: 16px; right: 16px; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; border: 1px solid rgba(243, 234, 217, 0.25); background: rgba(22, 18, 14, 0.4); color: var(--night-ink); cursor: pointer; }
.hero-share .ico { width: 18px; height: 18px; }

/* ---------- Aarti mode ---------- */
body.immersive .topbar, body.immersive .tabbar { display: none; }
body.immersive { overflow: hidden; }
.aarti {
  position: fixed; inset: 0; z-index: 40;
  display: flex; flex-direction: column;
  color: var(--night-ink);
  background:
    radial-gradient(80% 50% at 50% 0%, rgba(212, 176, 106, 0.16), transparent 70%),
    radial-gradient(90% 70% at 0% 100%, rgba(142, 43, 32, 0.22), transparent 65%),
    linear-gradient(170deg, var(--night-2), var(--night));
  padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom);
  user-select: none; -webkit-user-select: none;
}
.aarti .eyebrow { color: var(--night-gold); }
.aarti-top { display: flex; align-items: center; gap: 12px; padding: 12px 14px 0; max-width: 980px; width: 100%; margin: 0 auto; }
.aarti-title { flex: 1; min-width: 0; text-align: center; }
.aarti-title .eyebrow { font-size: 0.62rem; }
.aarti-title h2 { margin: 2px 0 0; font-family: var(--display); font-weight: 600; font-size: 1.3rem; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aarti-icon {
  width: 42px; height: 42px; flex: none; display: grid; place-items: center;
  border-radius: 50%; border: 1px solid rgba(243, 234, 217, 0.18); background: rgba(243, 234, 217, 0.04);
  color: var(--night-ink); cursor: pointer;
}
.aarti-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.aarti-icon.lg { width: 54px; height: 54px; }
.aarti-icon.lg svg { width: 24px; height: 24px; }
.aarti-icon.active { background: rgba(212, 176, 106, 0.18); border-color: rgba(212, 176, 106, 0.5); color: var(--night-gold); }
.aarti-opts { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; padding: 12px 16px 0; }
.aarti-opts .chip { background: transparent; color: var(--night-ink); border-color: rgba(243, 234, 217, 0.22); }
.aarti-opts .chip.active { background: var(--night-gold); border-color: var(--night-gold); color: #1a140d; }

.diya { position: relative; width: 64px; height: 58px; margin: 10px auto 0; flex: none; }
.diya .halo { position: absolute; left: 50%; top: 10px; width: 120px; height: 120px; margin-left: -60px; margin-top: -40px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 196, 92, 0.32), rgba(255, 160, 60, 0.08) 45%, transparent 70%); animation: halo 3.2s ease-in-out infinite; }
.diya .flame {
  position: absolute; left: 50%; top: 2px; width: 16px; height: 28px; margin-left: -8px;
  border-radius: 50% 50% 50% 50% / 62% 62% 38% 38%;
  background: radial-gradient(ellipse at 50% 78%, #fff6d6 0%, #ffd27a 32%, #f29a3a 62%, rgba(214, 90, 30, 0.85) 82%, transparent 100%);
  transform-origin: 50% 90%;
  box-shadow: 0 0 18px 4px rgba(255, 170, 70, 0.45);
  animation: flicker 2.4s ease-in-out infinite;
}
.diya .wick { position: absolute; left: 50%; top: 28px; width: 2px; height: 6px; margin-left: -1px; background: #3b2a1a; border-radius: 1px; }
.diya .bowl { position: absolute; left: 50%; bottom: 6px; width: 60px; height: 22px; margin-left: -30px; border-radius: 0 0 30px 30px / 0 0 22px 22px; background: linear-gradient(180deg, #d4b06a, #8a6630); box-shadow: inset 0 3px 0 rgba(255, 236, 190, 0.35); }
.diya .bowl::before { content: ""; position: absolute; left: 4px; right: 4px; top: -3px; height: 6px; border-radius: 50%; background: #5a4123; }
@keyframes flicker {
  0%, 100% { transform: scale(1, 1) skewX(0deg); opacity: 1; }
  20% { transform: scale(0.94, 1.06) skewX(2deg); }
  40% { transform: scale(1.04, 0.96) skewX(-2deg); opacity: 0.92; }
  60% { transform: scale(0.97, 1.08) skewX(1deg); }
  80% { transform: scale(1.02, 0.97) skewX(-1deg); opacity: 0.96; }
}
@keyframes halo { 0%, 100% { opacity: 0.85; transform: scale(1); } 50% { opacity: 1; transform: scale(1.06); } }

.aarti-stage {
  --fs: 34px;
  flex: 1; min-height: 0; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  padding: 8px 22px; cursor: pointer;
}
.aarti-verse { width: 100%; max-width: 920px; text-align: center; animation: fade 0.4s ease both; }
.aarti-verse .eyebrow { margin-bottom: calc(var(--fs) * 0.45); }
.aarti-verse .dev { font-family: var(--deva); font-size: var(--fs); line-height: 1.7; white-space: pre-line; margin: 0; color: var(--night-ink); }
.aarti-verse .rom { font-family: var(--display); font-style: italic; font-size: calc(var(--fs) * 0.72); line-height: 1.4; white-space: pre-line; margin: calc(var(--fs) * 0.4) 0 0; color: var(--night-ink); opacity: 0.88; }
.aarti-verse .en { font-family: var(--sans); font-size: max(13px, calc(var(--fs) * 0.42)); line-height: 1.55; margin: calc(var(--fs) * 0.55) auto 0; max-width: 40em; color: var(--night-muted); }
.aarti-verse.refrain .dev, .aarti-verse.refrain .rom { color: var(--night-gold); }
.aarti.hide-dev .aarti-verse .dev, .aarti.hide-rom .aarti-verse .rom, .aarti.hide-en .aarti-verse .en { display: none; }
.aarti.hide-dev .aarti-verse .rom { font-size: calc(var(--fs) * 0.95); margin-top: 0; }
.aarti-end .dev { color: var(--night-gold); }
.aarti-end .btn-row { justify-content: center; margin-top: 26px; }
.aarti-end .btn { font-size: 0.9rem; }
.aarti-end .btn.ghost { color: var(--night-ink); border-color: rgba(243, 234, 217, 0.28); }
.aarti-end .btn:not(.ghost) { background: var(--night-gold); border-color: var(--night-gold); color: #1a140d; }

.aarti-foot { flex: none; width: 100%; max-width: 560px; margin: 0 auto; padding: 6px 18px 18px; }
.aarti-progress { height: 3px; border-radius: 3px; background: rgba(243, 234, 217, 0.12); overflow: hidden; margin-bottom: 14px; }
.aarti-progress span { display: block; height: 100%; width: 0; background: var(--night-gold); border-radius: 3px; transition: width 0.35s ease; }
.aarti-controls { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.aarti-play { min-width: 132px; padding: 14px 22px; font-size: 0.95rem; background: var(--night-gold); border-color: var(--night-gold); color: #1a140d; }
.aarti-play.on { background: transparent; color: var(--night-gold); }
.aarti-hint { color: var(--night-muted); font-size: 0.8rem; }
@media (prefers-reduced-motion: reduce) {
  .diya .flame, .diya .halo { animation: none; }
  .aarti-verse { animation: none; }
}

/* ---------- Practice ---------- */
:root {
  --hm-0: var(--surface-2);
  --hm-1: #f0d58c;
  --hm-2: #d9ac3e;
  --hm-3: #a87b17;
  --hm-4: #6e4f0a;
}
:root[data-theme="dark"], :root[data-theme="gold"] {
  --hm-0: var(--surface-2);
  --hm-1: color-mix(in srgb, var(--gold) 28%, var(--surface-2));
  --hm-2: color-mix(in srgb, var(--gold) 52%, var(--surface-2));
  --hm-3: color-mix(in srgb, var(--gold) 76%, var(--surface-2));
  --hm-4: var(--gold);
}
a.card.practice-card { display: flex; align-items: center; gap: 16px; padding: 16px 18px; margin-bottom: 0; }
.pc-num { flex: none; width: 64px; text-align: center; }
.pc-num strong { display: block; font-family: var(--display); font-size: 2.6rem; font-weight: 600; line-height: 1; color: var(--ink); }
.pc-num span { font-size: 0.72rem; color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; }
.pc-body { flex: 1; min-width: 0; }
.pc-body .meta { margin: 6px 0 0; font-size: 0.8rem; }
.practice-card .chev { color: var(--muted); }
.week-dots { display: flex; gap: 8px; margin-top: 8px; }
.wd { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.wd i { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid var(--line-strong); }
.wd.on i { background: var(--gold); border-color: var(--gold); }
.wd.today i { box-shadow: 0 0 0 2px var(--surface), 0 0 0 3.5px var(--gold-soft); }
.wd b { font-size: 0.6rem; font-weight: 600; color: var(--muted); }
.wd.today b { color: var(--ink); }
.night .wd i { border-color: rgba(243, 234, 217, 0.3); }
.night .wd.on i { background: var(--night-gold); border-color: var(--night-gold); }
.night .wd.today i { box-shadow: 0 0 0 2px var(--night-2), 0 0 0 3.5px rgba(212, 176, 106, 0.35); }
.night .wd b { color: var(--night-muted); }
.night .wd.today b { color: var(--night-ink); }
.practice-hero .streak-num { font-family: var(--display); font-size: 4.2rem; font-weight: 600; line-height: 1; margin: 8px 0 6px; }
.practice-hero .streak-num span { font-size: 1.1rem; font-weight: 500; margin-left: 8px; color: var(--night-muted); }
.practice-hero .meta { margin: 0 0 14px; max-width: 30em; }
.practice-hero .week-dots { gap: 12px; }
.practice-hero .wd i { width: 18px; height: 18px; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow); padding: 14px 16px; min-width: 0; }
.stat-v { font-family: var(--sans); font-size: 1.9rem; font-weight: 600; line-height: 1.1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stat-l { font-size: 0.82rem; font-weight: 600; margin-top: 2px; }
.stat-s { font-size: 0.72rem; color: var(--muted); margin-top: 2px; }
.heatmap { padding: 16px 16px 14px; }
.hm-months, .hm-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 3px; }
.hm-months { margin-left: 34px; margin-bottom: 4px; }
.hm-months span { font-size: 0.64rem; color: var(--muted); white-space: nowrap; overflow: visible; }
.hm-body { display: flex; gap: 6px; }
.hm-days { width: 28px; flex: none; display: grid; grid-template-rows: repeat(7, 1fr); gap: 3px; }
.hm-days span { font-size: 0.6rem; color: var(--muted); display: flex; align-items: center; }
.hm-grid { flex: 1; }
.hm-col { display: grid; grid-template-rows: repeat(7, 1fr); gap: 3px; }
.hm-cell { display: block; aspect-ratio: 1; width: 100%; max-width: 30px; border: 0; padding: 0; border-radius: 4px; background: var(--hm-0); cursor: pointer; }
.hm-cell.future { background: transparent; cursor: default; }
.hm-cell.l1 { background: var(--hm-1); }
.hm-cell.l2 { background: var(--hm-2); }
.hm-cell.l3 { background: var(--hm-3); }
.hm-cell.l4 { background: var(--hm-4); }
.hm-cell.today { box-shadow: 0 0 0 1.5px var(--ink); }
.hm-cell:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
.hm-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; flex-wrap: wrap; }
.hm-readout { margin: 0; font-size: 0.8rem; color: var(--ink-2); flex: 1 1 200px; min-height: 1.3em; }
.hm-key { display: flex; align-items: center; gap: 3px; font-size: 0.66rem; color: var(--muted); }
.hm-key .hm-cell { width: 11px; height: 11px; border-radius: 3px; cursor: default; }
.hm-key .hm-cell:first-of-type { margin-left: 4px; }
.hm-key .hm-cell:last-of-type { margin-right: 4px; }
.row.static { cursor: default; }

/* ---------- Reminders ---------- */
.remind-times { padding: 4px 18px; }
.rt { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); cursor: pointer; }
.rt:first-child { border-top: 0; }
.rt span { flex: 1; font-size: 0.92rem; }
.rt input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--gold); margin: 0; flex: none; }
.time-input {
  font: inherit; font-size: 0.86rem; font-variant-numeric: tabular-nums;
  color: var(--ink); background: var(--bg); border: 1px solid var(--line-strong); border-radius: 10px;
  padding: 6px 8px; min-width: 0; color-scheme: inherit;
}
.time-input:focus { outline: none; border-color: var(--gold); }
.card-h { font-family: var(--display); font-weight: 600; font-size: 1.3rem; margin: 4px 0 6px; }
.small-note { font-size: 0.76rem; margin: 12px 0 0; }
.row.tomorrow .eyebrow { color: var(--kumkum); }

/* ---------- Your recordings ---------- */
.recorder audio, .rec-row audio { width: 100%; height: 40px; margin-top: 8px; display: block; }
.rec-live { display: flex; align-items: center; gap: 14px; }
.rec-live strong { font-size: 1.8rem; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.1; }
.rec-dot { width: 16px; height: 16px; border-radius: 50%; background: #c8402e; flex: none; box-shadow: 0 0 0 0 rgba(200, 64, 46, 0.5); animation: recpulse 1.4s ease-out infinite; }
.rec-dot.sm { width: 10px; height: 10px; animation: none; box-shadow: none; }
@keyframes recpulse { 0% { box-shadow: 0 0 0 0 rgba(200, 64, 46, 0.5); } 100% { box-shadow: 0 0 0 14px rgba(200, 64, 46, 0); } }
.btn.ghost.danger { color: var(--kumkum); }
.rec-row { align-items: flex-start; }
.rec-row .body a { text-decoration: none; color: inherit; }
.rec-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
@media (prefers-reduced-motion: reduce) { .rec-dot { animation: none; } }

/* ---------- Academy: courses and lessons ---------- */
.plate {
  margin: 0; position: relative; overflow: hidden; border-radius: 22px; aspect-ratio: 16 / 10;
  background:
    radial-gradient(120% 90% at 85% 0%, var(--night-glow), transparent 55%),
    radial-gradient(90% 80% at 0% 100%, rgba(212, 160, 40, 0.1), transparent 60%),
    linear-gradient(160deg, var(--night-2), var(--night));
  box-shadow: 0 14px 34px rgba(22, 18, 14, 0.16);
}
.plate img { color: transparent; display: block; width: 100%; height: 100%; object-fit: cover; }
.plate::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; box-shadow: inset 0 0 0 1px rgba(255, 236, 200, 0.08); }
.plate.lesson-art img, .plate.rite-hero img, .plate.course-hero img { animation: plate-drift 40s ease-in-out infinite alternate; transform-origin: 50% 60%; }
@keyframes plate-drift { from { transform: scale(1); } to { transform: scale(1.07); } }
@media (prefers-reduced-motion: reduce) { .plate img { animation: none !important; } }
.plate.thumb { flex: none; width: 74px; height: 74px; aspect-ratio: auto; border-radius: 16px; box-shadow: none; }
.plate.mini { flex: none; width: 64px; height: 64px; aspect-ratio: auto; border-radius: 14px; box-shadow: none; border: 1px solid rgba(243, 234, 217, 0.12); }
.course-row { align-items: flex-start; }
.course-row .course-meta { color: var(--gold); font-size: 0.74rem; margin-top: 4px; }
.continue-lesson { display: flex; align-items: center; gap: 14px; padding: 16px; margin: 4px 0 22px; }
.continue-lesson .body { flex: 1; min-width: 0; }
.continue-lesson h3 { margin: 2px 0 2px; font-family: var(--display); font-weight: 600; font-size: 1.22rem; line-height: 1.2; }
.continue-lesson .chev { color: var(--night-muted); }
.course-hero { margin: 8px 0 18px; }
.course-head { margin: 0 2px 18px; }
.course-head .page-title { margin-top: 6px; }
.course-head .page-sub { margin-bottom: 10px; }
.course-progress { margin: 6px 0 6px; }
.lesson-row .num {
  flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--line-strong); font-size: 0.8rem; font-weight: 600; color: var(--ink-2);
}
.lesson-row.done .num { background: var(--gold); border-color: var(--gold); color: var(--surface); }
.lesson-row h3 { font-size: 1.08rem; }
.lesson-page { padding-top: 6px; }
.lesson-page .course-link, .rite-page .course-link { text-decoration: none; display: inline-block; }
.lesson-title { font-family: var(--display); font-weight: 600; font-size: 2.15rem; line-height: 1.08; margin: 8px 0 6px; letter-spacing: -0.01em; }
.lesson-meta { margin: 0 0 18px; }
.lesson-art { margin: 0 0 8px; }
.caption { color: var(--muted); font-size: 0.78rem; font-style: italic; margin: 0 4px 22px; text-align: center; }
.lesson-art + .lesson-body { margin-top: 22px; }
.lesson-body { font-size: 1.02rem; line-height: 1.72; color: var(--ink); margin-bottom: 22px; }
.lesson-body p { margin: 0 0 14px; }
.lesson-body h3 { font-size: 1.42rem; margin: 26px 0 8px; }
.lesson-body li { margin-bottom: 9px; }
.lesson-body em { color: var(--ink-2); }
.lesson-body blockquote { margin: 18px 0; padding: 4px 0 4px 18px; border-left: 2px solid var(--gold); font-family: var(--display); font-size: 1.22rem; line-height: 1.45; color: var(--ink); }
.lesson-body blockquote .deva { display: block; font-family: var(--deva); font-size: 0.86em; color: var(--gold); margin-bottom: 6px; }
.terms dl { margin: 10px 0 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.terms dt { font-family: var(--display); font-weight: 600; font-size: 1.12rem; line-height: 1.2; }
.terms dd { margin: 2px 0 0; color: var(--ink-2); font-size: 0.9rem; }
.practice { background: var(--gold-soft); border-color: transparent; box-shadow: none; }
.practice p { margin: 8px 0 0; font-family: var(--display); font-size: 1.18rem; line-height: 1.45; }
.sources ul { margin: 10px 0 0; padding-left: 18px; font-size: 0.92rem; color: var(--ink-2); }
.sources li { margin-bottom: 7px; }
.review-line { margin: 12px 0 0; font-size: 0.86rem; color: var(--ink-2); }
.review-line b { display: inline-block; margin-right: 6px; padding: 1px 8px; border-radius: 999px; background: var(--gold-soft); color: var(--ink); font-size: 0.74rem; font-weight: 600; }
.sources .review-line { padding-top: 10px; border-top: 1px solid var(--line); }
.lesson-links { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 14px; }
.lesson-links .row:first-child { border-top: 0; }
.lesson-links h3 { font-size: 1.02rem; }
.lesson-done { margin: 22px 0 14px; }
.lesson-done .btn { width: 100%; padding: 14px 18px; font-size: 0.92rem; }
.lesson-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 10px; }
.lesson-nav a { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); text-decoration: none; color: var(--ink); min-width: 0; }
.lesson-nav a span:last-child { font-family: var(--display); font-weight: 600; font-size: 1rem; line-height: 1.25; }
.lesson-nav a.next { text-align: right; }
@media (min-width: 640px) {
  .lesson-title { font-size: 2.5rem; }
}

/* ---------- Rites of passage ---------- */
.rites-hero-card { padding: 24px 22px 20px; margin-bottom: 12px; }
.rites-hero-card h3 { font-family: var(--display); font-weight: 600; font-size: 1.65rem; line-height: 1.15; margin: 8px 0 8px; max-width: 16em; }
.rites-hero-card p { margin: 0 0 14px; color: var(--night-muted); font-size: 0.9rem; max-width: 30em; }
.rhc-cta { color: var(--night-gold); font-weight: 600; font-size: 0.86rem; }
.rite-strip { display: flex; gap: 10px; overflow-x: auto; padding: 2px 2px 8px; margin: 0 -2px 14px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.rite-strip::-webkit-scrollbar { display: none; }
.rite-chip { flex: none; width: 132px; scroll-snap-align: start; text-decoration: none; color: inherit; display: flex; flex-direction: column; gap: 8px; }
.rite-chip .plate.mini { width: 132px; height: 92px; border-radius: 16px; }
.rite-chip b { display: block; font-family: var(--display); font-weight: 600; font-size: 1.02rem; line-height: 1.2; }
.rite-chip small { display: block; color: var(--muted); font-size: 0.72rem; margin-top: 2px; }

.rites-top { padding: 26px 22px 22px; margin-top: 8px; }
.rites-top h2 { font-family: var(--display); font-weight: 600; font-size: 2.3rem; line-height: 1.05; margin: 8px 0 10px; }
.rites-top p { margin: 0; color: var(--night-muted); max-width: 32em; }
.rt-stats { display: flex; gap: 18px; margin-top: 16px; font-size: 0.8rem; color: var(--night-muted); }
.rt-stats b { font-family: var(--display); font-size: 1.6rem; color: var(--night-gold); margin-right: 6px; font-weight: 600; }

.journey { position: relative; margin: 8px 0 10px; padding-left: 26px; }
.journey::before { content: ""; position: absolute; left: 9px; top: 14px; bottom: 30px; width: 2px; border-radius: 2px; background: linear-gradient(var(--gold), var(--gold-soft)); opacity: 0.6; }
.stage { margin-bottom: 18px; }
.stage-head { display: flex; align-items: center; gap: 12px; margin: 0 0 10px -26px; position: relative; }
.stage-dv { flex: none; width: 20px; height: 20px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 4px var(--bg); font-size: 0; }
.stage-head h3 { font-family: var(--display); font-weight: 600; font-size: 1.45rem; line-height: 1.1; margin: 0; }
.stage-head p { margin: 2px 0 0; color: var(--muted); font-size: 0.82rem; }
.rite-node { position: relative; display: flex; align-items: center; gap: 14px; padding: 12px 14px; margin-bottom: 10px; text-decoration: none; color: inherit; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.rite-node::before { content: ""; position: absolute; left: -21px; top: 50%; width: 10px; height: 10px; margin-top: -5px; border-radius: 50%; background: var(--bg); border: 2px solid var(--gold); }
.rite-node .plate.thumb { width: 70px; height: 70px; }
.rite-node .body { flex: 1; min-width: 0; }
.rite-node .when { display: block; color: var(--gold); font-size: 0.7rem; font-weight: 600; letter-spacing: 0.03em; }
.rite-node h4 { margin: 2px 0 2px; font-family: var(--display); font-weight: 600; font-size: 1.2rem; line-height: 1.15; }
.rite-node p { margin: 0; color: var(--muted); font-size: 0.8rem; }
.rite-node .dv, .rite-sanskrit .dv { font-family: var(--deva); color: var(--gold); }
.rite-node .chev { color: var(--muted); }

.rite-page { padding-top: 4px; }
.rite-hero { margin: 4px 0 18px; }
.rite-sanskrit { margin: 0 0 10px; color: var(--ink-2); font-size: 0.92rem; }
.rite-sanskrit .dv { font-size: 1.05rem; margin-right: 6px; }
.rite-summary { font-family: var(--display); font-size: 1.3rem; line-height: 1.4; margin: 0 0 18px; color: var(--ink); }
.glance { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 8px; }
.glance div { background: var(--surface); padding: 12px 14px; min-width: 0; }
.glance span { display: block; font-size: 0.66rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); }
.glance b { display: block; font-weight: 500; font-size: 0.86rem; line-height: 1.4; margin-top: 3px; color: var(--ink); }
.glance small { display: block; font-size: 0.72rem; color: var(--ink-2); margin-top: 2px; }
.glance.timings + .meta { margin: 8px 2px 0; }
.rite-verse { text-align: center; padding: 24px 20px; margin: 4px 0 6px; }
.rite-verse .v-dev { font-family: var(--deva); color: var(--night-gold); font-size: 1.15rem; line-height: 1.8; margin: 0; }
.rite-verse .v-rom { font-style: italic; color: var(--night-muted); font-size: 0.86rem; margin: 6px 0 10px; }
.rite-verse .v-en { font-family: var(--display); font-size: 1.3rem; line-height: 1.35; margin: 0 0 8px; }
.rite-verse .meta { margin: 0; }
.need-list { padding: 4px 16px; }
.need { display: flex; align-items: flex-start; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); cursor: pointer; font-size: 0.92rem; line-height: 1.45; }
.need:first-child { border-top: 0; }
.need input { flex: none; width: 19px; height: 19px; margin: 1px 0 0; accent-color: var(--gold); }
.need input:checked + span { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--gold); }
.phase { font-family: var(--display); font-weight: 600; font-size: 1.25rem; margin: 6px 0 10px; color: var(--gold); }
.rite-steps { list-style: none; margin: 0 0 16px; padding: 0; position: relative; }
.rite-steps::before { content: ""; position: absolute; left: 15px; top: 16px; bottom: 16px; width: 1px; background: var(--line-strong); }
.rite-steps li { position: relative; display: flex; gap: 14px; padding: 0 0 16px; }
.rite-steps .n { flex: none; position: relative; width: 31px; height: 31px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--gold); color: var(--gold); font-weight: 600; font-size: 0.82rem; }
.rite-steps h4 { margin: 4px 0 3px; font-family: var(--display); font-weight: 600; font-size: 1.15rem; line-height: 1.2; }
.rite-steps p { margin: 0; color: var(--ink-2); font-size: 0.92rem; line-height: 1.6; }
.m-jump { margin: 6px 0 4px; white-space: normal; text-align: left; color: var(--ink); border-color: var(--gold); }
#riteMantras { scroll-margin-top: 76px; }
.mantra-basis { margin: 0 4px 16px; color: var(--ink-2); font-size: 0.92rem; line-height: 1.6; }
.mantra-list { margin-bottom: 18px; }
.mantra { padding: 16px 18px; margin-bottom: 12px; }
.mantra .m-at { display: flex; align-items: center; gap: 10px; }
.mantra .n { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--gold); color: var(--gold); font-weight: 600; font-size: 0.74rem; }
.mantra h4 { margin: 0; flex: 1; font-family: var(--display); font-weight: 600; font-size: 1.12rem; line-height: 1.25; }
.mantra .m-use { flex: none; font-size: 0.66rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; border-radius: 999px; padding: 3px 8px; }
.mantra .m-use.core { background: var(--gold); color: var(--bg); }
.mantra .m-use.some { border: 1px solid var(--line-strong); color: var(--muted); }
.mantra .m-do { margin: 8px 0 12px; color: var(--ink-2); font-size: 0.9rem; line-height: 1.55; }
.mantra .m-sa { margin: 0 0 4px; font-family: var(--deva); font-size: 1.08rem; line-height: 1.85; white-space: pre-line; color: var(--ink); }
.mantra .m-tr { margin: 0 0 10px; font-style: italic; color: var(--ink-2); font-size: 0.84rem; line-height: 1.6; white-space: pre-line; }
.mantra .m-en { margin: 0 0 10px; line-height: 1.6; }
.mantra .m-src { margin: 0; padding-top: 10px; border-top: 1px solid var(--line); font-size: 0.76rem; line-height: 1.5; color: var(--muted); }
.mantra .m-src a { color: var(--gold); text-decoration: none; font-weight: 500; white-space: nowrap; }
.customs .row h3 { font-size: 1.02rem; }
.customs .row p { color: var(--ink-2); }
.rite-notes { display: grid; gap: 12px; margin: 6px 0 4px; }
.rite-notes .card { margin: 0; }
.rite-notes p { margin: 8px 0 0; color: var(--ink-2); font-size: 0.92rem; }
@media (min-width: 560px) { .rite-notes { grid-template-columns: 1fr 1fr; } }

/* ---------- Backup and restore ---------- */
.bk-have { margin: 6px 0 4px; color: var(--ink); line-height: 1.6; }
.bk-have span { white-space: nowrap; }
.bk-rec { display: flex; align-items: center; gap: 12px; margin: 14px 0 0; font-size: 0.92rem; color: var(--ink); cursor: pointer; }
.bk-rec input { flex: none; width: 19px; height: 19px; margin: 0; accent-color: var(--gold); }
.card.notice { border-color: var(--gold); }
.card.notice p { margin: 6px 0 0; color: var(--ink-2); font-size: 0.92rem; }
.footer-note a, .card.notice a { color: var(--gold); }

/* ---------- Remembering dates ---------- */
.person .glance { margin: 0; }
.person .glance > div:only-child { grid-column: 1 / -1; }
.form-grid { display: grid; gap: 12px; margin-top: 8px; }
.form-grid label { display: grid; gap: 6px; font-size: 0.82rem; font-weight: 600; color: var(--ink-2); }
.form-grid input, .form-grid select { font: inherit; font-size: 1rem; font-weight: 400; color: var(--ink); background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: 10px 12px; min-width: 0; }
@media (min-width: 560px) { .form-grid { grid-template-columns: 1fr 1fr; } }

/* ---------- Following a rite in Aarti mode ---------- */
.aarti-verse .at { font-family: var(--display); font-size: max(16px, calc(var(--fs) * 0.5)); color: var(--night-gold); margin: 0 0 calc(var(--fs) * 0.2); }
.aarti-verse .do { font-family: var(--sans); font-size: max(12px, calc(var(--fs) * 0.32)); line-height: 1.5; color: var(--night-muted); max-width: 40em; margin: 0 auto calc(var(--fs) * 0.45); }
.aarti.hide-en .aarti-verse .do { display: none; }
.rite-tools { margin: 10px 0 0; }

/* ---------- Booklet for guests ---------- */
.form-grid input[type="checkbox"] { padding: 0; width: 18px; height: 18px; accent-color: var(--gold); }
.bk-opts { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.form-grid .bk-opt { display: flex; align-items: center; gap: 8px; font-weight: 500; color: var(--ink); font-size: 0.92rem; }
.booklet { background: #fffdf8; color: #2a2117; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 22px; margin: 6px 0 24px; font-family: var(--sans); line-height: 1.6; }
.booklet h1, .booklet h2, .booklet h3, .booklet h4 { font-family: var(--display); color: #2a2117; font-weight: 600; }
.booklet .dv, .booklet .bk-deva { font-family: var(--deva); white-space: pre-line; }
.booklet .rom { font-style: italic; white-space: pre-line; }
.booklet .src, .booklet cite { font-size: 0.78rem; color: #7a6a55; font-style: normal; }
.bk-cover { text-align: center; padding: 18px 0 30px; border-bottom: 1px solid #e6dccb; }
.bk-om { font-family: var(--deva); font-size: 3rem; color: #a0742a; line-height: 1; }
.bk-deva { font-size: 1.4rem; color: #a0742a; margin: 12px 0 0; }
.bk-cover h1 { font-size: 2rem; margin: 6px 0 2px; }
.bk-sanskrit { font-style: italic; color: #7a6a55; margin: 0; }
.bk-who { font-family: var(--display); font-size: 1.4rem; margin: 22px 0 0; }
.bk-when { margin: 8px 0 0; color: #5a4a35; }
.bk-welcome { max-width: 30em; margin: 22px auto 0; color: #5a4a35; font-size: 0.92rem; }
.bk-part { padding-top: 22px; }
.bk-part h2 { font-size: 1.4rem; margin: 0 0 10px; color: #8a5f1c; }
.bk-part h3 { font-size: 1.05rem; margin: 18px 0 6px; }
.bk-part ol { padding-left: 1.4em; margin: 0; }
.bk-part li { margin: 0 0 8px; }
.bk-lead { font-weight: 600; }
.bk-verse { margin: 16px 0 0; padding: 14px 16px; border-left: 3px solid #c79a4a; background: #f8f1e4; }
.bk-verse p { margin: 0 0 6px; }
.bk-mantra { padding: 12px 0; border-top: 1px solid #efe6d6; break-inside: avoid; }
.bk-mantra h4 { margin: 0 0 6px; font-size: 0.98rem; }
.bk-mantra p { margin: 0 0 4px; }
.bk-mantra .dv { font-size: 1.08rem; }
.bk-mantra .en { color: #4a3d2c; }
.bk-end { text-align: center; padding: 26px 0 0; border-top: 1px solid #e6dccb; margin-top: 18px; }
.bk-end p { margin: 0 0 4px; }

@media print {
  @page { margin: 16mm 14mm; }
  body { background: #fff !important; }
  .topbar, .tabbar, .no-print, .toast, .update-banner { display: none !important; }
  #view, main { padding: 0 !important; margin: 0 !important; max-width: none !important; }
  .booklet { border: 0; padding: 0; margin: 0; background: #fff; font-size: 11pt; }
  .bk-cover { min-height: 85vh; display: flex; flex-direction: column; justify-content: center; border: 0; break-after: page; }
  .bk-part h2 { break-after: avoid; }
  .bk-part h3 { break-after: avoid; }
}

/* ---------- Listening in the reader ---------- */
.reader .speaking { background: var(--gold-soft); border-radius: 16px; box-shadow: 0 0 0 10px var(--gold-soft); transition: background 0.3s; }
.chip.listen .ico { width: 14px; height: 14px; margin-right: 4px; vertical-align: -2px; }
.chip.listen.on { position: fixed; z-index: 21; bottom: calc(86px + env(safe-area-inset-bottom)); right: max(16px, calc(50% - 284px)); padding: 10px 18px; background: var(--gold); color: #fff; border-color: var(--gold); box-shadow: 0 6px 20px rgba(0, 0, 0, 0.22); }
@media print { .chip.listen { display: none; } }

/* ---------- A section's translation in prose (the Ramcharitmanas) ---------- */
.reader .trans-head { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); }
.reader .para.trans { font-size: 1.06em; }
.reader .para.trans-with { font-family: var(--sans); font-size: 0.84em; color: var(--muted); font-style: italic; margin-top: 18px; }

/* ---------- Reading plans ---------- */
.plan-day { display: flex; align-items: center; gap: 8px; }
.plan-day .need { flex: 1; }
.plan-day .need b { font-weight: 600; margin-right: 4px; }
.plan-go { color: var(--gold); text-decoration: none; font-size: 1.3rem; padding: 4px 8px; }

/* ---------- Report a mistake ---------- */
.linkish { background: none; border: 0; padding: 0; font: inherit; color: var(--gold); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }

/* ---------- Quizzes ---------- */
.quiz-progress { height: 4px; background: var(--line); border-radius: 2px; overflow: hidden; margin: 10px 0 6px; }
.quiz-progress span { display: block; height: 100%; background: var(--gold); }
.quiz-q { font-family: var(--display); font-size: 1.45rem; line-height: 1.3; margin: 8px 0 16px; }
.quiz-options { display: grid; gap: 10px; }
.quiz-opt { text-align: left; font: inherit; font-size: 1rem; padding: 14px 16px; border-radius: var(--radius); border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); cursor: pointer; }
.quiz-opt:hover:not(:disabled) { border-color: var(--gold); }
.quiz-opt.right { border-color: #2f8a4a; background: color-mix(in srgb, #2f8a4a 14%, var(--surface)); }
.quiz-opt.wrong { border-color: #b8342a; background: color-mix(in srgb, #b8342a 12%, var(--surface)); }
.quiz-opt.dim { opacity: .55; }
.quiz-why { margin-top: 14px; }
.quiz-why.ok .eyebrow { color: #2f8a4a; }
.quiz-why.no .eyebrow { color: #b8342a; }
.quiz-why p { margin: 6px 0 10px; }
.quiz-done { text-align: center; }
.quiz-score { font-family: var(--display); font-size: 3.2rem; color: var(--gold); }
.quiz-score span { font-size: 1.2rem; color: var(--ink-2); }

/* ---------- Learning verses by heart ---------- */
.mem-card { text-align: center; padding: 24px 18px; }
.mem-card .mem-sa, .mem-row .mem-sa { font-family: var(--deva); font-size: 1.15rem; line-height: 1.7; white-space: pre-line; margin: 10px 0 0; }
.mem-card .mem-sa.full { font-size: 1.25rem; }
.mem-card .mem-tr { font-style: italic; white-space: pre-line; color: var(--ink-2); margin: 8px 0 0; }
.mem-card .mem-en { font-family: var(--display); font-size: 1.08rem; margin: 10px 0 0; }
.mem-ask { margin-top: 16px !important; }
.mem-row .mem-sa { font-size: 1rem; margin: 2px 0 4px; }
.mem-dots { display: inline-flex; gap: 3px; vertical-align: middle; }
.mem-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); }
.mem-dots i.on { background: var(--gold); }

/* ---------- Stories for children ---------- */
.story-text p { font-family: var(--display); font-size: 1.22rem; line-height: 1.65; margin: 0 0 1em; }
.story-text p.speaking { background: var(--gold-soft); border-radius: 12px; box-shadow: 0 0 0 8px var(--gold-soft); }
.story-ask { margin: 8px 0 0; padding-left: 1.2em; }
.story-ask li { margin: 0 0 6px; }

/* ---------- Rites: then and now ---------- */
.then-now h4 { font-family: var(--display); font-size: 1.12rem; margin: 0 0 8px; }
.then-now .tn-row { padding: 8px 0 0; border-top: 1px solid var(--line); margin-top: 8px; }
.then-now .tn-row:first-of-type { border-top: 0; margin-top: 0; padding-top: 0; }
.then-now .tn-row p { margin: 4px 0 0; }

/* ---------- You: the profile page ---------- */
.me-btn { position: relative; }
.me-btn.active { border-color: var(--gold); color: var(--gold); }
.me-btn.alert::after {
  content: ""; position: absolute; top: 1px; right: 1px;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--kumkum); border: 2px solid var(--bg);
}
.me-head { display: flex; align-items: center; gap: 16px; margin: 8px 0 18px; }
.me-avatar {
  flex: none; width: 64px; height: 64px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--gold-soft); border: 1.5px solid var(--gold); color: var(--gold);
  font-family: var(--display); font-size: 1.9rem; font-weight: 600;
}
.me-hello { flex: 1; min-width: 0; }
.me-name { display: flex; align-items: center; gap: 8px; margin-top: 6px; font-size: 0.8rem; color: var(--muted); }
.me-name input {
  flex: 1; min-width: 0; padding: 7px 10px; border-radius: 10px;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font: inherit; font-size: 0.9rem;
}
.safe-card { border: 1.5px solid var(--gold); background: linear-gradient(160deg, var(--gold-soft), var(--surface) 60%); }
.safe-card.warn { border-color: color-mix(in srgb, var(--kumkum) 55%, transparent); background: linear-gradient(160deg, color-mix(in srgb, var(--kumkum) 9%, transparent), var(--surface) 60%); }
.safe-top { display: flex; align-items: center; gap: 12px; }
.safe-ico { flex: none; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--gold-soft); color: var(--gold); }
.warn .safe-ico { background: color-mix(in srgb, var(--kumkum) 12%, transparent); color: var(--kumkum); }
.safe-ico svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.safe-row { display: flex; align-items: center; gap: 12px; padding: 14px 0 0; margin-top: 14px; border-top: 1px solid var(--line); }
.safe-row .btn { flex: none; display: inline-flex; align-items: center; gap: 8px; }
.safe-label { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 0.92rem; }
.safe-label span { color: var(--muted); font-size: 0.8rem; }
.safe-links { margin-top: 14px; font-size: 0.82rem; color: var(--muted); }
.ico.g { width: 18px; height: 18px; stroke: none; fill: currentColor; }
a.safe-link { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 14px 16px; border: 1.5px solid var(--gold); }
a.safe-link.warn { border-color: color-mix(in srgb, var(--kumkum) 55%, transparent); }
a.safe-link .body { flex: 1; min-width: 0; }
a.safe-link h3 { margin: 0; font-size: 0.98rem; }
a.safe-link p { margin: 2px 0 0; color: var(--muted); font-size: 0.82rem; }
.row .chips { margin: 0; padding: 0; flex: none; }

/* ---------- Theme picker ---------- */
.theme-row { flex-wrap: wrap; }
.theme-pick { display: flex; gap: 8px; flex-basis: 100%; padding-left: 64px; margin-top: -4px; }
.theme-swatch { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 4px; border: 1.5px solid transparent; border-radius: 12px; background: none; cursor: pointer; font-size: 0.7rem; color: var(--muted); min-width: 52px; }
.theme-swatch i { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line-strong); }
.theme-swatch.light i { background: linear-gradient(135deg, #fffdf6 50%, #d9ac3e 50%); }
.theme-swatch.dark i { background: linear-gradient(135deg, #13203a 50%, #e9c46a 50%); }
.theme-swatch.gold i { background: linear-gradient(135deg, #251e10 50%, #eac063 50%); }
.theme-swatch.active { border-color: var(--gold); color: var(--ink); }

/* ---------- QR codes for guests ---------- */
.qr-block { display: flex; align-items: center; gap: 16px; margin-top: 14px; }
.qr-code { flex: none; width: 132px; height: 132px; padding: 8px; background: #fff; border-radius: 12px; border: 1px solid var(--line); }
.qr-code svg { display: block; width: 100%; height: 100%; }
.qr-code svg path, .qr-code svg rect[fill="black"] { fill: #0c1424; }
.qr-say { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.qr-say b { font-size: 0.98rem; }
.qr-say span { color: var(--muted); font-size: 0.84rem; line-height: 1.45; }
.qr-say small { color: var(--gold); font-size: 0.74rem; word-break: break-all; }
details.qr-card summary { cursor: pointer; font-weight: 600; color: var(--gold); list-style: none; }
details.qr-card summary::-webkit-details-marker { display: none; }
details.qr-card summary::after { content: " ›"; }
details.qr-card[open] summary::after { content: " ⌄"; }
.aarti-qr { position: absolute; inset: 0; z-index: 5; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  background: linear-gradient(170deg, var(--night-2), var(--night)); color: var(--night-ink); text-align: center; padding: 24px; }
.aarti-qr .btn.ghost { color: var(--night-ink); border-color: rgba(243, 234, 217, 0.4); }
.aarti-qr[hidden] { display: none; }
.aarti-qr .qr-code { width: min(70vw, 300px); height: min(70vw, 300px); padding: 14px; }
.aarti-qr p { margin: 0; font-family: var(--display); font-size: 1.4rem; }
.bk-qr { justify-content: center; margin: 22px auto 0; max-width: 460px; text-align: left; }
@media print { .bk-qr .qr-code { border: 1px solid #ccc; } .qr-say small { color: #333; } }
.reader.poetry .vtext { white-space: pre-line; }

/* ---------- Light mode: strokes of midnight navy beside the gold ---------- */
:root[data-theme="light"] { --navy: #1f3a73; --navy-soft: rgba(31, 58, 115, 0.08); --navy-line: rgba(31, 58, 115, 0.2); }
:root[data-theme="light"] .brand,
:root[data-theme="light"] .page-title,
:root[data-theme="light"] .section-title,
:root[data-theme="light"] .greeting h2,
:root[data-theme="light"] .detail-head h2,
:root[data-theme="light"] .reader-head h2,
:root[data-theme="light"] .lesson-title,
:root[data-theme="light"] .card-h,
:root[data-theme="light"] .tile h3 { color: var(--gold); }
:root[data-theme="light"] .icon-btn { color: var(--navy); border-color: var(--navy-line); }
:root[data-theme="light"] .tabbar a.active { color: var(--navy); }
:root[data-theme="light"] .tabbar a.active svg { stroke: var(--navy); }
:root[data-theme="light"] .seal { background: var(--navy-soft); color: var(--navy); border-color: var(--navy-line); }
:root[data-theme="light"] .btn.ghost { color: var(--navy); border-color: var(--navy-line); }
:root[data-theme="light"] .night .seal { background: rgba(236, 200, 101, 0.12); color: var(--night-gold); border-color: rgba(236, 200, 101, 0.3); }
:root[data-theme="light"] .night .btn.ghost { color: var(--night-ink); border-color: rgba(243, 234, 217, 0.28); }

/* The logo's Om is an SVG shape, centred in its circle. */
svg.om { display: block; fill: currentColor; }
.brand .mark svg.om { width: 60%; height: 60%; }
.me-avatar svg.om { width: 56%; height: 56%; }

/* ---------- Mandir finder ---------- */
.mandir-list .mandir { padding: 14px 16px; border-bottom: 1px solid var(--line); }
.mandir-list .mandir:last-child { border-bottom: 0; }
.mandir-list .mandir[hidden] { display: none; }
.mandir-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.mandir h3 { margin: 0; font-size: 1rem; font-weight: 600; line-height: 1.3; }
.mandir .tag { flex: none; }
.mandir .meta { margin: 3px 0 0; font-size: 0.82rem; }
.mandir-local { margin: 2px 0 0; font-family: var(--deva); color: var(--gold); font-size: 0.9rem; }
.mandir-links { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px; font-size: 0.82rem; font-weight: 600; }
.mandir-links a { color: var(--gold); text-decoration: none; }
#mandirFilter { width: 100%; margin: 0 0 10px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font: inherit; }

/* ---------- Animations (all off when the phone asks for reduced motion) ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* A lotus blooms when a lesson or quiz is finished */
.bloom { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; pointer-events: none;
  background: color-mix(in srgb, var(--bg) 45%, transparent);
  animation: bloom-in 0.3s ease both; }
.bloom.out { animation: bloom-out 0.55s ease both; }
.bloom-card { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 26px 34px 22px;
  border-radius: 28px; background: var(--surface); border: 1px solid color-mix(in srgb, var(--gold) 35%, transparent);
  box-shadow: 0 24px 60px rgba(12, 20, 36, 0.22); animation: card-in 0.45s cubic-bezier(.2, .8, .3, 1.1) both; }
@keyframes card-in { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: none; } }
.bloom svg { width: 150px; height: auto; overflow: visible; filter: drop-shadow(0 6px 18px rgba(201, 149, 47, 0.35)); }
.bloom .petal { fill: url(#bloomGold); stroke: rgba(140, 100, 16, 0.35); stroke-width: 0.8;
  transform-box: view-box; transform-origin: 0 14px; transform: rotate(var(--r)) scale(1);
  animation: petal 0.9s cubic-bezier(.2, .9, .3, 1.15) both; animation-delay: calc(var(--i) * 70ms + 80ms); }
.bloom .petal.back { opacity: 0.72; }
.bloom .bloom-base { fill: #c9952f; opacity: 0.55; animation: bloom-in 0.4s ease both; }
.bloom p { margin: 0; font-family: var(--display); font-weight: 600; font-size: 1.5rem; color: var(--gold);
  animation: rise 0.6s ease both; animation-delay: 0.45s; }
@keyframes petal { from { transform: rotate(0deg) scale(0.15); opacity: 0; } to { transform: rotate(var(--r)) scale(1); } }
@keyframes bloom-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes bloom-out { from { opacity: 1; } to { opacity: 0; transform: translateY(-8px); } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Japa: 108 beads round the counter, and the guru bead at the top */
.japa-ring circle.bead { fill: rgba(212, 176, 106, 0.2); stroke: none; transform-box: fill-box; transform-origin: center; transition: fill 0.25s; }
.japa-ring circle.bead.on { fill: var(--night-gold); }
.japa-ring circle.bead.now { animation: bead 0.5s ease-out; }
.japa-ring circle.meru { fill: var(--night-gold); stroke: none; }
.japa-ring.full { animation: mala-glow 1.5s ease-out; }
@keyframes bead { 0% { transform: scale(2.2); } 100% { transform: scale(1); } }
@keyframes mala-glow {
  0% { box-shadow: 0 18px 40px rgba(22, 18, 14, 0.25), inset 0 0 0 1px rgba(212, 176, 106, 0.35), 0 0 0 0 rgba(236, 200, 101, 0.55); }
  40% { box-shadow: 0 18px 40px rgba(22, 18, 14, 0.25), inset 0 0 0 2px rgba(236, 200, 101, 0.9), 0 0 0 22px rgba(236, 200, 101, 0); }
  100% { box-shadow: 0 18px 40px rgba(22, 18, 14, 0.25), inset 0 0 0 1px rgba(212, 176, 106, 0.35), 0 0 0 0 rgba(236, 200, 101, 0); }
}

/* Aarti: verses rise softly into place; a warm glow breathes while the chant plays */
.aarti-verse { animation: verse-in 0.6s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes verse-in { from { opacity: 0; transform: translateY(14px); filter: blur(2px); } to { opacity: 1; transform: none; filter: none; } }
.aarti-glow { position: absolute; left: 50%; top: 42%; width: 120vmin; height: 120vmin; transform: translate(-50%, -50%) scale(0.9);
  border-radius: 50%; pointer-events: none; z-index: -1; opacity: 0; transition: opacity 1.2s;
  background: radial-gradient(circle, rgba(236, 200, 101, 0.22), rgba(236, 200, 101, 0.07) 40%, transparent 65%); }
.aarti.chanting .aarti-glow { opacity: 1; animation: breathe 6s ease-in-out infinite; }
@keyframes breathe { 0%, 100% { transform: translate(-50%, -50%) scale(0.9); } 50% { transform: translate(-50%, -50%) scale(1.08); } }

/* Opening a page: the Om traces itself in gold */
.loader { display: grid; place-items: center; min-height: 40vh; }
.loader-om { width: 64px; height: 64px; color: var(--gold); }
.loader-om svg.om { width: 100%; height: 100%; fill: currentColor; fill-opacity: 0; stroke: currentColor; stroke-width: 18;
  stroke-dasharray: 9000; stroke-dashoffset: 9000; animation: om-draw 2.4s ease-in-out infinite; }
@keyframes om-draw {
  0% { stroke-dashoffset: 9000; fill-opacity: 0; }
  55% { stroke-dashoffset: 0; fill-opacity: 0; }
  75%, 90% { stroke-dashoffset: 0; fill-opacity: 1; }
  100% { stroke-dashoffset: 0; fill-opacity: 0; opacity: 0.4; }
}

@media (prefers-reduced-motion: reduce) {
  .bloom, .bloom-card, .japa-ring.full, .japa-ring circle.bead.now, .aarti.chanting .aarti-glow, .aarti-verse { animation: none; }
  .loader-om svg.om { animation: none; stroke-dashoffset: 0; fill-opacity: 1; }
}

/* ---------- Journey map: the World of the Ramayana ---------- */
.jmap { position: relative; margin: 6px -18px 12px; border-radius: 0; overflow: hidden; background: var(--night); }
@media (min-width: 640px) { .jmap { margin: 6px 0 12px; border-radius: 24px; } }
.jmap > img { display: block; width: 100%; height: auto; }
.jmap svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.jmap .trail-all { fill: none; stroke: rgba(255, 244, 220, 0.6); stroke-width: 5; stroke-dasharray: 3 16; stroke-linecap: round; }
.jmap .trail-gold { fill: none; stroke: #f2cf73; stroke-width: 7; stroke-linecap: round;
  filter: drop-shadow(0 0 4px rgba(242, 207, 115, 0.9)); }
.jnode { position: absolute; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 7px; padding: 8px 14px 8px 8px;
  border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.45); background: rgba(20, 28, 54, 0.38); color: #fff8ea;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); font: 600 0.84rem/1 var(--display); letter-spacing: 0.01em;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3); cursor: pointer; white-space: nowrap; transition: transform 0.2s, background 0.2s, border-color 0.2s; }
.jnode .jname { font-family: var(--display); font-size: 1.02rem; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6); }
.jnode .jring { width: 20px; height: 20px; border-radius: 50%; flex: none;
  background: conic-gradient(#f2cf73 calc(var(--p) * 1%), rgba(255, 255, 255, 0.25) 0); -webkit-mask: radial-gradient(circle, transparent 5.5px, #000 6px); mask: radial-gradient(circle, transparent 5.5px, #000 6px); }
.jnode.reached { border-color: rgba(242, 207, 115, 0.85); }
.jnode.here { background: rgba(242, 207, 115, 0.28); animation: jpulse 2.6s ease-in-out infinite; }
.jnode.picked { transform: translate(-50%, -50%) scale(1.08); background: rgba(242, 207, 115, 0.4); border-color: #f2cf73; }
@keyframes jpulse { 0%, 100% { box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3), 0 0 0 0 rgba(242, 207, 115, 0.5); } 50% { box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3), 0 0 0 10px rgba(242, 207, 115, 0); } }
.jsheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; display: flex; justify-content: center; pointer-events: none; }
.jsheet-card { position: relative; width: 100%; max-width: 600px; margin: 0 auto; padding: 0 0 calc(84px + env(safe-area-inset-bottom));
  background: var(--surface); border-radius: 24px 24px 0 0; box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.3); pointer-events: auto;
  transform: translateY(100%); transition: transform 0.35s cubic-bezier(.2, .8, .2, 1); overflow: hidden; }
.jsheet.open .jsheet-card { transform: none; }
.jsheet .plate.jsheet-art { margin: 0; width: 100%; max-width: none; border-radius: 0; box-shadow: none; aspect-ratio: auto; max-height: 150px; overflow: hidden; }
.jsheet-art img { width: 100%; height: 150px; object-fit: cover; display: block; }
.jsheet-body { padding: 14px 20px 6px; }
.jsheet-body h3 { margin: 4px 0 0; font-family: var(--display); font-size: 1.6rem; line-height: 1.1; color: var(--gold); }
.jsheet-body h3 .dv { font-family: var(--deva); font-size: 1rem; color: var(--muted); margin-left: 6px; }
.jsheet-en { margin: 2px 0 10px; color: var(--muted); font-style: italic; font-family: var(--display); font-size: 1.05rem; }
.jsheet-close { position: absolute; top: 10px; right: 12px; z-index: 2; width: 34px; height: 34px; border-radius: 50%; border: 0;
  background: rgba(12, 20, 36, 0.55); color: #fff; font-size: 1.3rem; line-height: 1; cursor: pointer; }
.jbar { height: 6px; border-radius: 6px; background: var(--surface-2); overflow: hidden; }
.jbar span { display: block; height: 100%; background: var(--fill); border-radius: 6px; }
a.card.jpromo { display: flex; align-items: center; gap: 14px; padding: 12px; }
a.card.jpromo img { width: 64px; height: 84px; object-fit: cover; object-position: top; border-radius: 12px; flex: none; }
a.card.jpromo .body { flex: 1; min-width: 0; }
a.card.jpromo h3 { margin: 2px 0; font-family: var(--display); font-size: 1.2rem; }
a.card.jpromo p { margin: 0; color: var(--muted); font-size: 0.82rem; }
.moments { margin: 0; padding-left: 22px; }
.moments li { margin: 6px 0; line-height: 1.5; }
.moments li::marker { color: var(--gold); font-weight: 600; }
.rasa-row { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px 6px; }
.rasa { display: grid; grid-template-columns: auto; justify-items: center; text-align: center; gap: 3px; min-width: 64px; }
.rasa i { font-style: normal; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: var(--c); color: #fff;
  font-family: var(--deva); font-size: 0.78rem; box-shadow: 0 4px 12px color-mix(in srgb, var(--c) 40%, transparent); }
.rasa b { font-size: 0.8rem; }
.rasa small { font-size: 0.68rem; color: var(--muted); max-width: 80px; line-height: 1.25; }
.rasa-arrow { color: var(--muted); align-self: start; margin-top: 14px; }
@media (prefers-reduced-motion: reduce) { .jnode.here { animation: none; } .jsheet-card { transition: none; } }
/* places map: the painting larger, labelled pins, a dark sheet (after VedaPath's story map) */
.jplaces-link { margin-bottom: 14px; }
.keyloc-names i, .pchip i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.5); flex: none; }
.keyloc { position: relative; display: flex; flex-direction: column; justify-content: flex-end; height: 150px; padding: 14px 16px; border-radius: 20px;
  background-size: 100% auto; background-repeat: no-repeat; overflow: hidden; color: #fff8e8; text-decoration: none; box-shadow: var(--shadow); }
.keyloc::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 30%, rgba(8, 14, 28, 0.78)); }
.keyloc > * { position: relative; }
.keyloc-names { display: flex; flex-wrap: wrap; gap: 4px 14px; font: 600 0.98rem/1.3 var(--display); text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7); }
.keyloc-names span { display: inline-flex; align-items: center; gap: 6px; }
.keyloc-more { margin-top: 2px; font-size: 0.82rem; opacity: 0.85; }
.pmap-page { margin: -6px -18px 0; background: #17120b; color: #f4e6c4; padding-bottom: 8px; }
@media (min-width: 640px) { .pmap-page { margin: 0; border-radius: 24px; overflow: hidden; } }
.pmap-title { text-align: center; padding: 12px 16px; font-family: var(--display); font-variant: small-caps; letter-spacing: 0.12em; font-size: 1.15rem; color: #e9c87a; }
.pmap-title .dv { font-family: var(--deva); letter-spacing: 0; font-variant: normal; }
.pmap-title small { display: block; font-size: 0.78rem; letter-spacing: 0.08em; color: #b9a57c; }
.pmap-wrap { position: relative; }
.pmap { height: 66vh; min-height: 360px; overflow: auto; overscroll-behavior: contain; scrollbar-width: none; background: #2f6fae; touch-action: pan-x pan-y; -webkit-user-select: none; user-select: none; }
.pmap img { -webkit-user-drag: none; pointer-events: none; }
@media (pointer: fine) { .pmap { cursor: grab; } .pmap:active { cursor: grabbing; } }
.pmap-zoom { position: absolute; right: 12px; bottom: 12px; display: flex; flex-direction: column; gap: 6px; }
.pmap-zoom button { width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(233, 200, 122, 0.6); background: rgba(23, 18, 11, 0.78); color: #f2d48a; font-size: 1.3rem; line-height: 1; cursor: pointer; }
.pmap::-webkit-scrollbar { display: none; }
.pmap-inner { position: relative; width: 100%; margin: 0 auto; }
.pmap-inner img { display: block; width: 100%; height: auto; }
.ppin { position: absolute; transform: translate(-50%, calc(-100% + 9px)); display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 4px; border: 0; background: none; cursor: pointer; }
.ppin span { padding: 0 6px; border-radius: 6px; background: rgba(24, 16, 6, 0.5); font-family: var(--display); font-variant: small-caps; letter-spacing: 0.1em; font-size: 0.95rem; color: #fff4dc; white-space: nowrap;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9), 0 0 10px rgba(0, 0, 0, 0.6); }
.ppin i { position: relative; width: 18px; height: 18px; border-radius: 50%; border: 2px solid #fff4dc; background: radial-gradient(circle, var(--c) 0 38%, rgba(20, 14, 6, 0.55) 42%); box-shadow: 0 1px 6px rgba(0, 0, 0, 0.6); }
.ppin.focus i::after { content: ""; position: absolute; inset: -7px; border-radius: 50%; border: 2px solid var(--c); animation: pin-pulse 2.2s ease-out infinite; }
.ppin.edge-l { transform: translate(-9px, calc(-100% + 9px)); align-items: flex-start; }
.ppin.edge-r { transform: translate(calc(-100% + 9px), calc(-100% + 9px)); align-items: flex-end; }
.ppin.quiet { opacity: 0.55; }
.ppin.quiet span { font-size: 0.8rem; }
.ppin.picked { opacity: 1; }
.ppin.picked i { background: var(--c); box-shadow: 0 0 0 3px rgba(255, 244, 220, 0.4), 0 0 22px 6px var(--c); }
@keyframes pin-pulse { from { transform: scale(0.7); opacity: 1; } to { transform: scale(1.9); opacity: 0; } }
.pmap-locs { padding: 12px 18px 4px; text-align: center; }
.pmap-locs .eyebrow { color: #b9a57c; letter-spacing: 0.18em; }
.pmap-locs .chips { justify-content: center; margin: 8px 0; }
.pchip { display: inline-flex; align-items: center; gap: 7px; background: rgba(255, 240, 210, 0.06); color: #f4e6c4; border-color: rgba(233, 200, 122, 0.4); }
.pchip.active { background: color-mix(in srgb, var(--c) 30%, transparent); border-color: var(--c); color: #fff; }
.pmap-locs .meta, .pmap-locs .meta a { color: #b9a57c; }
.jsheet.dark .jsheet-card { background: #1d160d; color: #ecdcb8; border: 1px solid rgba(233, 200, 122, 0.45); border-bottom: 0; max-height: 70vh; overflow-y: auto; }
.jsheet-card.place .place-head { padding: 22px 20px 12px; background: linear-gradient(180deg, #4a3512, #2c2010); border-bottom: 1px solid rgba(233, 200, 122, 0.3); }
.place-head h3 { margin: 0; font-family: var(--display); font-variant: small-caps; letter-spacing: 0.06em; font-size: 1.7rem; line-height: 1.1; color: #f2d48a; }
.place-head .dv { font-family: var(--deva); font-style: italic; color: #c9a75e; font-size: 1rem; }
.jsheet.dark .jsheet-close { background: rgba(255, 240, 210, 0.12); color: #f4e6c4; }
.jsheet.dark .jsheet-body p { line-height: 1.55; }
.jsheet.dark .meta { color: #b9a57c; }
.jsheet.dark .btn.ghost { color: #f2d48a; border-color: rgba(233, 200, 122, 0.5); }
.ptags { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 12px; }
.ptag { padding: 3px 11px; border-radius: 999px; font-size: 0.72rem; font-variant: small-caps; letter-spacing: 0.08em; font-weight: 600;
  color: #b9e0a8; background: rgba(90, 140, 70, 0.22); border: 1px solid rgba(120, 180, 100, 0.45); }
.ptag.first { color: #fff; background: color-mix(in srgb, var(--c) 30%, #1d160d); border-color: color-mix(in srgb, var(--c) 70%, transparent); }
.pstory { font-family: var(--display); font-style: italic; font-size: 1.08rem; line-height: 1.5; color: #d9c69c; border-top: 1px solid rgba(233, 200, 122, 0.25); padding-top: 12px; }
.pstory .om { font-style: normal; color: var(--c); margin-right: 8px; font-family: var(--deva); }
@media (prefers-reduced-motion: reduce) { .ppin.focus i::after { animation: none; } }
.mandir-wait { display: flex; align-items: center; gap: 14px; }
.mandir-wait p { margin: 0; }
.loader-om.small { width: 34px; height: 34px; flex: none; }
.mandir-tier { margin: 6px 4px 8px; font-family: var(--display); font-size: 1.15rem; color: var(--gold); }
.mandir-tier span, .mandir-more summary span { font: 600 0.75rem var(--sans, inherit); color: var(--muted); margin-left: 6px; }
.mandir-more { margin-top: 14px; }
.mandir-more summary { cursor: pointer; margin: 0 4px 8px; font-family: var(--display); font-size: 1.1rem; color: var(--ink-2); }
.map-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 4px; margin: 0 0 12px; border-radius: 16px; background: var(--surface-2, rgba(0, 0, 0, 0.05)); }
.map-tabs a { display: flex; flex-direction: column; align-items: center; padding: 8px 6px; border-radius: 12px; text-decoration: none; color: var(--ink-2); font-weight: 600; font-size: 0.95rem; }
.map-tabs a small { font-weight: 400; font-size: 0.72rem; color: var(--muted); }
.map-tabs a.active { background: var(--surface); color: var(--gold); box-shadow: var(--shadow); }
.pmap-tabs { padding: 0 14px; }
.pmap-tabs .map-tabs { background: rgba(255, 240, 210, 0.07); }
.pmap-tabs .map-tabs a { color: #d9c69c; }
.pmap-tabs .map-tabs a small { color: #a8956c; }
.pmap-tabs .map-tabs a.active { background: rgba(233, 200, 122, 0.18); color: #f2d48a; box-shadow: none; }
.map-story-link { margin-top: 10px; }
.map-story-link img { width: 54px; height: 54px; border-radius: 12px; object-fit: cover; object-position: 50% 40%; flex: none; }
.home-mandirs .mini-list { margin-top: 10px; border-top-color: var(--line, rgba(0, 0, 0, 0.08)); }
.home-mandirs .mini-list a { color: var(--ink); border-bottom-color: var(--line, rgba(0, 0, 0, 0.08)); }
.home-mandirs .mini-list a span:first-child { font-weight: 600; }
.home-mandirs .mini-list a span:last-child { color: var(--muted); white-space: nowrap; }
.home-mandirs .btn-row { margin-top: 14px; }
/* central figures */
.fig-row { display: flex; gap: 12px; overflow-x: auto; margin: 0 -18px; padding: 2px 18px 8px; scroll-snap-type: x proximity; scrollbar-width: none; }
.fig-row::-webkit-scrollbar { display: none; }
.fig-card { flex: none; width: 112px; display: flex; flex-direction: column; text-decoration: none; color: var(--ink); scroll-snap-align: start; }
.fig-card img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 16px; box-shadow: var(--shadow); }
.fig-card b { margin-top: 8px; font-family: var(--display); font-size: 1.08rem; line-height: 1.1; text-align: center; }
.fig-card small { color: var(--muted); font-size: 0.74rem; text-align: center; margin-top: 2px; }
.fig-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 16px 12px; }
.fig-grid .fig-card { width: auto; }
.figure-hero { margin: 4px auto 14px; width: min(62%, 260px); }
.figure-hero img { width: 100%; height: auto; border-radius: 22px; box-shadow: 0 14px 40px color-mix(in srgb, var(--fc) 45%, transparent); }
.figure-page .lesson-title .dv { font-family: var(--deva); font-size: 1.2rem; color: var(--muted); margin-left: 6px; }
.fig-tags { margin: 6px 0 4px; }
.fig-moments a { color: inherit; text-decoration: none; display: block; }
.fig-moments small { display: block; color: var(--gold); font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; }
.pgroups { padding: 4px 0 2px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.pgroups .chip { flex: none; background: rgba(255, 240, 210, 0.07); color: #e8d6ac; border-color: rgba(233, 200, 122, 0.35); }
.pgroups .chip.active { background: rgba(233, 200, 122, 0.25); color: #fff2cc; border-color: #e9c87a; }
.pgroup-about { margin: 4px 18px 10px; color: #cbb88c; font-size: 0.9rem; line-height: 1.45; }
.map-list img { width: 54px; height: 54px; border-radius: 12px; object-fit: cover; object-position: 50% 30%; flex: none; }
/* the place and kanda cards rise gently: the card glides up and fades in, then its parts follow;
   moving to another place crossfades the new card in */
.jsheet-card { transition: transform 0.55s cubic-bezier(.22, 1, .36, 1), opacity 0.4s ease; opacity: 0; }
.jsheet.open .jsheet-card { opacity: 1; animation: sheet-rise 0.65s cubic-bezier(.22, 1, .36, 1) both; }
.jsheet.open .jsheet-card > *, .jsheet.open .jsheet-body > * { animation: sheet-part 0.6s cubic-bezier(.22, 1, .36, 1) both; }
.jsheet.open .jsheet-card > .jsheet-art, .jsheet.open .jsheet-card > .place-head { animation-delay: 0.08s; }
.jsheet.open .jsheet-body > :nth-child(1) { animation-delay: 0.16s; }
.jsheet.open .jsheet-body > :nth-child(2) { animation-delay: 0.22s; }
.jsheet.open .jsheet-body > :nth-child(3) { animation-delay: 0.28s; }
.jsheet.open .jsheet-body > :nth-child(n+4) { animation-delay: 0.34s; }
.jsheet.open .jsheet-card > .jsheet-body { animation: none; }
@keyframes sheet-rise { from { transform: translateY(48px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes sheet-part { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .jsheet.open .jsheet-card, .jsheet.open .jsheet-card > *, .jsheet.open .jsheet-body > * { animation: none; }
  .jsheet-card { transition: opacity 0.2s; }
}
.why-list { display: grid; gap: 10px; }
.card.why { margin: 0; }
.card.why h4 { margin: 4px 0 6px; font-family: var(--display); font-size: 1.2rem; color: var(--ink); }
.card.why p { margin: 0; color: var(--ink-2); line-height: 1.55; }
.card.why.science { border-left: 3px solid #4f8fc0; }
.card.why.science .eyebrow { color: #3f7fb0; }
.card.why.meaning { border-left: 3px solid var(--gold); }

/* ---------- Library switch, Temples and the slimmer Today ---------- */
.lib-switch { display: flex; gap: 4px; padding: 4px; margin: 4px 0 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.lib-switch::-webkit-scrollbar { display: none; }
.lib-switch a { flex: 1 0 auto; text-align: center; padding: 9px 8px; border-radius: 10px; font-size: 0.82rem; font-weight: 600; color: var(--muted); white-space: nowrap; text-decoration: none; transition: background .2s, color .2s; }
.lib-switch a.active { background: var(--gold); color: var(--surface); }
.lib-switch + .night.rites-top { margin-top: 0; }
.wisdom-hero blockquote { font-family: var(--display); font-size: 1.35rem; line-height: 1.35; }
.wisdom-hero .reflection { margin: 12px 0 0; color: var(--night-muted); font-size: 0.9rem; line-height: 1.5; position: relative; }
.story-world { margin-top: 0; margin-bottom: 22px; }
.story-world .btn-row { margin-top: 10px; flex-wrap: wrap; }
a.card.jworld { display: flex; align-items: center; gap: 14px; padding: 12px; }
a.card.jworld img { width: 72px; height: 94px; object-fit: cover; object-position: top; border-radius: 12px; flex: none; }
a.card.jworld .body { flex: 1; min-width: 0; }
a.card.jworld h3 { margin: 2px 0; font-family: var(--display); font-size: 1.25rem; }
a.card.jworld p { margin: 0; color: var(--muted); font-size: 0.82rem; }
a.night.sacred-card { display: flex; align-items: stretch; gap: 0; padding: 0; overflow: hidden; text-decoration: none; }
a.night.sacred-card img { width: 38%; max-width: 160px; object-fit: cover; object-position: 50% 30%; flex: none; }
a.night.sacred-card .body { padding: 18px 16px; display: flex; flex-direction: column; justify-content: center; }
a.night.sacred-card h3 { font-family: var(--display); font-weight: 600; font-size: 1.45rem; margin: 6px 0 4px; color: var(--night-ink, #f4ead2); }
a.night.sacred-card p { margin: 0; color: var(--night-muted); font-size: 0.86rem; }
.story-who { display: flex; gap: 8px; overflow-x: auto; margin: 6px -18px 16px; padding: 2px 18px 4px; scrollbar-width: none; }
.story-who::-webkit-scrollbar { display: none; }
.story-who .who { flex: 0 0 auto; max-width: 168px; display: flex; flex-direction: column; gap: 1px; padding: 9px 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.story-who .dv { font-family: var(--deva); color: var(--gold); font-size: 0.9rem; }
.story-who b { font-family: var(--display); font-size: 1.05rem; font-weight: 600; }
.story-who small { color: var(--muted); font-size: 0.74rem; line-height: 1.3; }
.story-fest { margin: 10px 0 0; }
.btn.gcal { display: inline-flex; align-items: center; gap: 6px; }
.btn.gcal .ico, #subscribe .btn .ico { width: 17px; height: 17px; }
a.card.gcal-card { display: flex; align-items: center; gap: 14px; margin-top: 14px; }
a.card.gcal-card > .ico { width: 28px; height: 28px; flex: none; stroke: var(--gold); }
a.card.gcal-card .body { flex: 1; }
a.card.gcal-card h3 { margin: 0 0 2px; font-family: var(--display); font-size: 1.15rem; }
a.card.gcal-card p { margin: 0; color: var(--muted); font-size: 0.84rem; }

/* ---------- Ask ---------- */
a.card.home-ask { display: flex; align-items: center; gap: 12px; padding: 14px 16px; margin: 16px 0 0; }
a.card.home-ask > .ico { width: 22px; height: 22px; stroke: var(--gold); flex: none; }
a.card.home-ask .body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
a.card.home-ask b { font-family: var(--display); font-size: 1.15rem; font-weight: 600; }
a.card.home-ask .body span { color: var(--muted); font-size: 0.86rem; }
.ask-row .ask-q { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-family: var(--display); font-weight: 600; font-size: 1.2rem; color: var(--gold); background: var(--gold-soft); }
.ask-row p { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
a.row.ask-row.best { background: var(--surface); border: 1px solid var(--line-strong); border-radius: 16px; }
details.ask-topic { margin: 0 0 10px; }
details.ask-topic > summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; padding: 12px 4px; font-family: var(--display); font-size: 1.3rem; font-weight: 600; }
details.ask-topic > summary::-webkit-details-marker { display: none; }
details.ask-topic > summary span { font-family: var(--sans, inherit); font-size: 0.8rem; color: var(--muted); font-weight: 500; }
details.ask-topic > summary::after { content: "›"; margin-left: 8px; color: var(--muted); transition: transform .2s; }
details.ask-topic[open] > summary::after { transform: rotate(90deg); }
.ask-answer p:first-child { font-size: 1.05rem; }
a.card.ask-when { display: flex; align-items: center; gap: 14px; }
a.card.ask-when .body { flex: 1; }
a.card.ask-when h3 { margin: 2px 0; font-family: var(--display); font-size: 1.2rem; }
a.card.ask-when p { margin: 0; color: var(--muted); font-size: 0.86rem; }
a.card.ask-more { display: block; margin-top: 16px; color: var(--ink-2); font-size: 0.92rem; }

/* ---------- Science ---------- */
a.night.sci-feature { display: block; padding: 22px 20px; margin: 0 0 16px; text-decoration: none; position: relative; overflow: hidden; }
a.night.sci-feature h3 { position: relative; font-family: var(--display); font-weight: 600; font-size: 1.5rem; line-height: 1.15; margin: 8px 0 8px; color: var(--night-ink); }
a.night.sci-feature p { position: relative; margin: 0 0 10px; color: var(--night-muted); font-size: 0.92rem; line-height: 1.5; }
a.night.sci-feature .meta { position: relative; color: var(--gold); }
a.row.sci-course { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; margin-bottom: 8px; }
.sci-field-head { display: flex; align-items: center; gap: 12px; margin: 0 2px 10px; }
.sci-field-head .section-title { margin: 0; }
.sci-field-head .meta { margin: 2px 0 0; }
.sci-who { color: var(--muted); margin: -2px 2px 16px; font-size: 0.9rem; }
.sci-who .dv { font-family: var(--deva); color: var(--gold); margin-right: 8px; }
.discovery .card p { margin: 6px 0 0; line-height: 1.6; }
.sci-found { border-left: 3px solid var(--gold); }
.sci-source { margin: 4px 4px 0; font-style: italic; }
@media (max-width: 520px) {
  .lib-switch { flex-wrap: wrap; }
  .lib-switch a { flex: 1 1 22%; padding: 9px 4px; }
}


/* ---------- Easier reading (chosen under You): firmer, darker text, sturdier small headings ---------- */
html[data-clear] body { font-weight: 500; -webkit-font-smoothing: auto; }
html[data-clear] { --muted: #4f4430; --ink-2: #2e2618; --night-muted: #e2e5ee; }
html[data-clear][data-theme="dark"], html[data-clear][data-theme="gold"] { --muted: #d4d8e4; --ink-2: #f2e4bc; }
html[data-clear] .row h3, html[data-clear] .card h3, html[data-clear] .card-h, html[data-clear] .rite-node h4,
html[data-clear] .fig-card b, html[data-clear] .story-who b, html[data-clear] .lesson-nav span:last-child {
  font-family: var(--sans); font-weight: 600; letter-spacing: 0; font-size: 1rem;
}
html[data-clear] .meta, html[data-clear] .page-sub, html[data-clear] .lede, html[data-clear] .row p { color: var(--ink-2); }
html[data-clear] .prose p, html[data-clear] .lesson-body p, html[data-clear] .story-text p { line-height: 1.7; }
.text-pick { display: flex; gap: 6px; flex: none; }
.text-pick button { min-width: 44px; height: 40px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font-family: var(--display); font-weight: 600; cursor: pointer; }
.text-pick button.active { background: var(--gold); color: var(--surface); border-color: var(--gold); }
/* At the largest text size, settings rows put their buttons on a line of their own. */
html[data-text="xl"] .row.static { flex-wrap: wrap; }
html[data-text="xl"] .row.static > .body { flex: 1 1 60%; }
html[data-text="xl"] .row.static > .text-pick, html[data-text="xl"] .row.static > .theme-pick, html[data-text="xl"] .row.static > .chip { margin-left: 62px; }

/* ---------- Install card ---------- */
.card.install-card { margin-top: 16px; border: 1px solid var(--line-strong); }
.install-steps { margin: 10px 0 8px; padding-left: 22px; }
.install-steps li { margin: 6px 0; line-height: 1.5; }
.install-steps .share-ico { width: 18px; height: 18px; vertical-align: -3px; stroke: var(--gold); }
.install-card .linkish { margin-top: 4px; }

/* ---------- Greeting cards ---------- */
.card-occ { margin-bottom: 14px; }
.card-preview { display: flex; justify-content: center; }
.card-preview canvas { width: min(100%, 360px); height: auto; aspect-ratio: 1080 / 1350; border-radius: 16px; box-shadow: 0 10px 30px rgba(0,0,0,.25); background: #0c1428; }
.card-actions { justify-content: center; margin-top: 14px; }
.card-actions .btn .ico { width: 18px; height: 18px; margin-right: 6px; vertical-align: -3px; }
.card-arts { display: flex; gap: 10px; overflow-x: auto; margin: 0 -18px; padding: 2px 18px 6px; scrollbar-width: none; }
.card-art { flex: none; width: 110px; height: 72px; padding: 0; border-radius: 12px; overflow: hidden; border: 3px solid transparent; background: none; cursor: pointer; }
.card-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-art.active { border-color: var(--gold); }
button.row.card-msg { width: 100%; text-align: left; font: inherit; background: none; border: 0; cursor: pointer; color: var(--ink); }
button.row.card-msg p { margin: 0; color: var(--ink-2); }
button.row.card-msg.active { background: var(--gold-soft); }
.card-field { display: block; margin: 14px 2px 0; }
.card-field span { display: block; font-size: .85rem; color: var(--muted); margin-bottom: 6px; }
.card-field textarea, .card-field input { width: 100%; font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 12px; padding: 10px 12px; }
a.card.home-cardsend { display: flex; align-items: center; gap: 12px; padding: 10px 14px 10px 10px; margin-top: 16px; }
a.card.home-cardsend img { width: 64px; height: 64px; object-fit: cover; border-radius: 12px; flex: none; }
a.card.home-cardsend .body { flex: 1; display: flex; flex-direction: column; gap: 1px; }
a.card.home-cardsend b { font-family: var(--display); font-size: 1.15rem; font-weight: 600; }
a.card.home-cardsend .body > span:last-child { color: var(--muted); font-size: .84rem; }

/* Vrat kathas */
.next-katha { border: 1px solid var(--gold); background: var(--gold-soft); border-radius: 18px; margin-bottom: 8px; }
.katha-page .detail-head { margin-bottom: 14px; }
.katha-page > .list { margin-bottom: 14px; }

/* Puja guides */
.vidhi-page .detail-head { margin-bottom: 10px; }
.vidhi-note { margin: 2px 4px 16px; }
.samagri .sam-group { font-family: var(--display); font-size: 1.15rem; margin: 16px 0 6px; color: var(--gold); }
.sam-list { list-style: none; margin: 0; padding: 0; }
.sam-item { display: flex; gap: 12px; align-items: flex-start; width: 100%; text-align: left; background: none; border: 0; padding: 9px 2px; font: inherit; color: inherit; cursor: pointer; border-bottom: 1px solid var(--line); }
.sam-list li:last-child .sam-item { border-bottom: 0; }
.sam-item .box { flex: none; width: 22px; height: 22px; border-radius: 6px; border: 1.5px solid var(--gold); margin-top: 1px; position: relative; }
.sam-item.on .box { background: var(--gold); }
.sam-item.on .box::after { content: ""; position: absolute; left: 7px; top: 3px; width: 5px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.sam-item.on > span:last-child { color: var(--muted); text-decoration: line-through; }
.vidhi-steps { list-style: none; counter-reset: st; margin: 0; padding: 0; }
.vidhi-steps li { counter-increment: st; position: relative; padding: 0 0 18px 46px; }
.vidhi-steps li::before { content: counter(st); position: absolute; left: 0; top: 0; width: 32px; height: 32px; border-radius: 50%; background: var(--gold-soft); color: var(--gold); font-weight: 600; display: grid; place-items: center; }
.vidhi-steps li:not(:last-child)::after { content: ""; position: absolute; left: 15.5px; top: 36px; bottom: 4px; width: 1px; background: var(--line); }
.vidhi-steps h3 { margin: 4px 0 4px; font-size: 1.05rem; }
.vidhi-steps p { margin: 0 0 8px; line-height: 1.6; }

/* Navratri day by day */
.nav-today { background: var(--gold-soft); }
.nav-mantra { padding: 20px 22px; margin: 0 0 16px; text-align: center; }
.nav-mantra .deva-line { font-family: var(--deva); color: var(--night-gold); font-size: 1.35rem; margin: 10px 0 4px; }
.nav-mantra .rom { color: rgba(255, 255, 255, .78); font-style: italic; }
.nav-page .prose { margin-bottom: 14px; }

/* First steps */
.starter-invite { border: 1px solid var(--gold); background: var(--gold-soft); }
.starter-invite h3 { font-family: var(--display); font-size: 1.35rem; margin: 6px 0 4px; }
.starter-invite p { margin: 0 0 4px; }
.starter-dots { display: flex; gap: 8px; margin: 0 4px 14px; }
.starter-dots span { flex: 1; height: 6px; border-radius: 3px; background: var(--line-strong); }
.starter-dots span.on { background: var(--gold); }
.starter-page .prose { margin-bottom: 14px; }
.starter-steps { margin-bottom: 14px; }
.step-n { flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--gold-soft); color: var(--gold); font-weight: 600; display: grid; place-items: center; }

/* Download for offline */
.btn.small { padding: 7px 14px; font-size: .86rem; min-height: 0; flex: none; }
.dl-row { align-items: center; }
.dl-row .tag { flex: none; }
.dl-all h3 { font-family: var(--display); font-size: 1.4rem; margin: 6px 0 10px; }
.dl-all .progress { margin-bottom: 8px; }
.puja-practice { margin-bottom: 14px; }

/* Regional festivals and traditions */
.trad-line { margin-top: -6px; }
.trad-head { font-family: var(--display); font-size: 1.2rem; margin: 18px 4px 8px; }
.trad-head small { font-family: var(--sans, inherit); font-size: .78rem; color: var(--muted); font-weight: 400; margin-left: 6px; }
.trad-row { width: 100%; text-align: left; font: inherit; color: inherit; background: none; border: 0; cursor: pointer; align-items: flex-start; }
.trad-row .box { flex: none; width: 22px; height: 22px; border-radius: 6px; border: 1.5px solid var(--gold); margin-top: 3px; position: relative; }
.trad-row.on .box { background: var(--gold); }
.trad-row.on .box::after { content: ""; position: absolute; left: 7px; top: 3px; width: 5px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.trad-row .meta { margin-top: 4px; font-size: .82rem; }
dl.rituals { margin: 0; }
dl.rituals dt { font-weight: 600; margin-top: 10px; }
dl.rituals dd { margin: 2px 0 0; line-height: 1.6; }

/* Welcome guide */
body.welcome-open { overflow: hidden; }
.welcome { position: fixed; inset: 0; z-index: 200; background: var(--bg); overflow-y: auto; -webkit-overflow-scrolling: touch; padding: max(20px, env(safe-area-inset-top)) 16px max(24px, env(safe-area-inset-bottom)); animation: wlIn .35s ease; }
@keyframes wlIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.wl-card { max-width: 520px; margin: 0 auto; min-height: 100%; display: flex; flex-direction: column; }
.wl-body { flex: 1; display: flex; flex-direction: column; }
.wl-body h2 { font-family: var(--display); font-size: 2rem; line-height: 1.15; margin: 10px 0 10px; color: var(--gold); }
.wl-lede { font-size: 1.05rem; line-height: 1.6; margin: 0 0 16px; }
.wl-hero { display: grid; place-items: center; margin: 6vh 0 10px; }
.wl-om { width: 110px; height: 110px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle, var(--gold-soft), transparent 70%); }
.wl-om .om { width: 64px; height: 64px; fill: var(--gold); }
.wl-points { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 8px; }
.wl-points li { padding-left: 26px; position: relative; }
.wl-points li::before { content: "✓"; position: absolute; left: 4px; color: var(--gold); font-weight: 700; }
.wl-nav { display: flex; gap: 10px; margin-top: auto; padding-top: 20px; }
.wl-nav .btn { flex: 1; justify-content: center; }
.wl-skip { align-self: center; margin-top: 14px; }
.wl-dots { display: flex; gap: 6px; margin: 4px 0 8px; }
.wl-dots span { flex: 1; height: 4px; border-radius: 2px; background: var(--line-strong); }
.wl-dots span.on, .wl-dots span.done { background: var(--gold); }
.wl-label { display: block; font-weight: 600; margin: 14px 0 6px; }
.wl-label small { font-weight: 400; color: var(--muted); }
.wl-input { width: 100%; box-sizing: border-box; font: inherit; font-size: 1.05rem; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line-strong); background: var(--surface); color: inherit; }
select.wl-input { appearance: auto; margin-bottom: 8px; }
.wl-trads { display: flex; flex-wrap: wrap; gap: 8px; }
.wl-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.wl-row small { display: block; color: var(--muted); font-size: .82rem; }
.wl-themes { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.wl-tour { display: grid; gap: 14px; }
.wl-tab { display: flex; gap: 14px; align-items: flex-start; }
.wl-tab .ico { flex: none; width: 44px; height: 44px; border-radius: 12px; background: var(--gold-soft); display: grid; place-items: center; }
.wl-tab .ico svg { width: 24px; height: 24px; fill: none; stroke: var(--gold); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.wl-tab p { margin: 2px 0 0; color: var(--muted); line-height: 1.5; }
.wl-starts .row { width: 100%; text-align: left; font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
.wl-again { text-align: center; margin-top: 12px; }
button.row.wl-open { width: 100%; text-align: left; font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

/* Tab tips */
.coach { position: fixed; inset: 0; z-index: 190; }
.coach-hole { position: fixed; border-radius: 18px; box-shadow: 0 0 0 9999px rgba(10, 14, 28, .62); transition: all .25s ease; pointer-events: none; outline: 2px solid var(--night-gold); }
.coach-tip { position: fixed; left: 16px; right: 16px; max-width: 460px; margin: 0 auto; background: var(--surface); color: var(--ink); border-radius: 18px; padding: 16px 18px 12px; box-shadow: 0 12px 40px rgba(0, 0, 0, .3); transition: top .25s ease; }
.coach-tip h3 { font-family: var(--display); font-size: 1.3rem; margin: 4px 0 6px; }
.coach-tip p { margin: 0 0 10px; line-height: 1.55; }
.coach-btns { display: flex; justify-content: space-between; align-items: center; }

/* Sacred marks */
.mark-section { margin: 26px 0 8px; scroll-margin-top: 80px; }
.mark-hero { display: flex; gap: 16px; align-items: center; margin-bottom: 12px; }
.mark-photo { position: relative; flex: none; width: 150px; aspect-ratio: 4 / 5; border-radius: 18px; overflow: hidden; box-shadow: 0 8px 22px rgba(18, 27, 49, .18); }
.mark-photo .mark-svg { width: 100%; height: 100%; display: block; }
.mark-photo .mark-svg { aspect-ratio: auto; }
.mark-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mark-title .dv { font-family: var(--deva); color: var(--gold); font-size: 1.15rem; }
.mark-title h2 { font-family: var(--display); font-size: 2rem; margin: 2px 0; }
.mark-kinds { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin: 14px 0; }
.mark-kind { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 10px 12px 12px; }
.mark-kind .mark-svg { width: 100%; border-radius: 12px; display: block; margin-bottom: 8px; }
.mark-kind h3 { font-size: 1rem; margin: 0 0 2px; }
.mark-kind p { margin: 4px 0 0; font-size: .9rem; line-height: 1.45; }

/* Paintings that appear once their file is added */
.photo-slot:not(.ok) { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; pointer-events: none; }
.trad-all { background: var(--gold-soft); }
.trad-all h3 { font-size: 1.15rem; }
.wl-all { display: flex; gap: 12px; align-items: flex-start; width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer;
  background: var(--surface); border: 1.5px solid var(--line-strong); border-radius: 16px; padding: 14px 16px; }
.wl-all.on { border-color: var(--gold); background: var(--gold-soft); }
.wl-all b { display: block; font-size: 1.08rem; }
.wl-all small { display: block; color: var(--muted); margin-top: 2px; line-height: 1.4; }
.wl-all .box, .trad-all .box { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--gold); margin-top: 2px; position: relative; }
.wl-all.on .box, .trad-all.on .box { background: var(--gold); }
.wl-all.on .box::after, .trad-all.on .box::after { content: ""; position: absolute; left: 7px; top: 3px; width: 5px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.starter-mark { width: 100%; margin-top: 16px; }
.starter-done { display: flex; align-items: center; gap: 8px; margin: 16px 0 0; color: var(--gold); font-weight: 600; }
.starter-done .tick { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--gold); color: var(--bg, #fff); font-size: 0.8rem; }
.starter-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.pager { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: 14px; color: var(--ink); text-decoration: none; min-width: 0; }
.pager > span:not(.arr) { display: flex; flex-direction: column; min-width: 0; }
.pager.next { justify-content: flex-end; text-align: right; }
.pager b { font-weight: 600; font-size: 0.88rem; line-height: 1.3; }
.pager .arr { flex: none; font-size: 1.3rem; line-height: 1; color: var(--gold); }
.pager.next.on { background: var(--gold); border-color: var(--gold); color: #fff; }
.pager.next.on .arr, .pager.next.on .eyebrow { color: #fff; }
.pager:active { background: var(--surface-2); }
/* Gita chapter guides */
.gita-about { display: block; margin: 0 0 16px; color: var(--ink); text-decoration: none; border: 1px solid color-mix(in srgb, var(--gold) 45%, transparent); background: var(--gold-soft); }
.gita-about p { margin: 4px 0 6px; font-family: var(--display); font-size: 1.1rem; line-height: 1.35; }
.gita-about-more { color: var(--gold); font-size: .82rem; font-weight: 600; }
.gita-guide .section-title { margin-top: 22px; }
.gg-verses .row h3 { font-family: inherit; font-size: .95rem; font-weight: 600; }
.gg-text { font-style: italic; }
.gg-qs { display: grid; gap: 10px; }
.gg-q summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.gg-q summary::-webkit-details-marker { display: none; }
.gg-q summary::after { content: "+"; color: var(--gold); font-size: 1.2rem; line-height: 1; }
.gg-q[open] summary::after { content: "−"; }
.gg-q p { margin: 10px 0 0; color: var(--ink-2); line-height: 1.55; }
.gita-guide .practice { margin-top: 16px; }
/* Hear it sung: a tap-to-load YouTube player and links to YouTube Music and Spotify */
.listen-elsewhere .btn-row { margin-top: 10px; }
.yt-facade { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; margin-top: 10px; padding: 0; border: 0; border-radius: 12px; overflow: hidden; background: #000; cursor: pointer; }
.yt-facade img { width: 100%; height: 100%; object-fit: cover; opacity: .85; }
.yt-play { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; }
.yt-play svg { width: 56px; height: 56px; padding: 14px; border-radius: 50%; background: rgba(200, 30, 30, .9); }
.yt-frame { display: block; width: 100%; aspect-ratio: 16 / 9; min-height: 200px; margin-top: 10px; border: 0; border-radius: 12px; }
.yt-note { margin: 6px 2px 0; }
/* Ask about this chapter */
.gg-ask { margin-top: 16px; }
.gg-ask textarea { width: 100%; margin-top: 8px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface, #fff); color: var(--ink); font: inherit; resize: vertical; }
.gg-ask .btn-row { margin-top: 10px; }
.gg-answer { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line-strong); }
.gg-answer p { line-height: 1.55; }
.gg-q-echo { font-weight: 600; }
.gg-ask-note { margin: 12px 0 0; font-size: .78rem; }
.ask-ai { margin-top: 16px; }
.ask-ai p { margin: 6px 0 0; }
.ask-ai .btn-row { margin-top: 10px; }
/* Two Navratris */
.two-navratris { margin: 14px 0; }
.nav-compare { width: 100%; border-collapse: collapse; margin: 10px 0; font-size: .86rem; }
.nav-compare th, .nav-compare td { text-align: left; vertical-align: top; padding: 7px 6px; border-top: 1px solid var(--line-strong); }
.nav-compare tr:first-child th { border-top: 0; color: var(--gold); font-weight: 600; }
.nav-compare tr th:first-child { color: var(--muted); font-weight: 600; width: 22%; }
/* Language */
.lang-card { margin-top: 14px; }
.dev.ta-script { font-family: "Noto Sans Tamil", "Tamil Sangam MN", "Latha", system-ui, sans-serif; line-height: 1.7; }
.dev.script-gu { font-family: "Noto Sans Gujarati", "Shruti", system-ui, sans-serif; line-height: 1.7; }
.dev.script-bn { font-family: "Noto Sans Bengali", "Vrinda", system-ui, sans-serif; line-height: 1.7; }
.dev.script-te { font-family: "Noto Sans Telugu", "Gautami", system-ui, sans-serif; line-height: 1.7; }
.dev.script-ml { font-family: "Noto Sans Malayalam", "Kartika", system-ui, sans-serif; line-height: 1.7; }
.beta-tag { margin-left: 4px; padding: 0 5px; border-radius: 6px; font-size: .62rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; background: var(--gold-soft); color: var(--gold); }
/* Choghadiya */
.chog-card { margin: 12px 0; }
.chog-card summary { cursor: pointer; font-weight: 600; }
.chog-list { display: grid; gap: 4px; margin-top: 6px; }
.chog { display: flex; justify-content: space-between; gap: 10px; padding: 6px 10px; border-radius: 8px; font-size: .86rem; }
.chog.good { background: color-mix(in srgb, #2f9a4a 14%, transparent); }
.chog.fair { background: var(--surface-2, rgba(0,0,0,.04)); }
.chog.bad { background: color-mix(in srgb, #c8302a 12%, transparent); }
.chog span { font-weight: 600; }
.city-group[hidden], #cityList .row[hidden] { display: none; }
/* Today's two minutes */
.daily-card { margin-top: 14px; }
.daily-card.all-done { border: 1px solid color-mix(in srgb, var(--gold) 45%, transparent); background: var(--gold-soft); }
.daily-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.daily-head h3 { font-family: var(--display); font-size: 1.2rem; margin: 2px 0 0; }
.daily-streak { flex: none; padding: 3px 10px; border-radius: 999px; background: var(--gold-soft); color: var(--gold); font-size: .78rem; font-weight: 600; }
.daily-steps { display: grid; gap: 8px; margin-top: 12px; }
.daily-step { display: flex; align-items: center; gap: 12px; }
.daily-tick { flex: none; width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--line-strong); background: transparent; color: #fff; font-weight: 700; cursor: pointer; }
.daily-step.done .daily-tick { background: var(--gold); border-color: var(--gold); }
.daily-step a { display: flex; flex-direction: column; color: var(--ink); text-decoration: none; min-width: 0; }
.daily-step a span { color: var(--muted); font-size: .82rem; }
.daily-step.done a b { text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--gold) 60%, transparent); }
.daily-remind { display: inline-block; margin-top: 10px; color: var(--gold); font-size: .85rem; font-weight: 600; text-decoration: none; }
.path-row .progress { margin-top: 8px; }
.path-step .path-tick { flex: 0 0 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--line-strong); display: grid; place-items: center; font-size: 0.8rem; font-weight: 700; color: var(--gold); }
.path-step.done .path-tick { background: var(--gold-soft); border-color: transparent; }
.path-step.done h3 { color: var(--ink-2); }
.path-progress .progress { margin-top: 8px; }
