/* Deva Darshan – visual system
   Warm temple palette: kumkum maroon, saffron, temple gold on sandal-cream paper.
   Display type: Cormorant Garamond. Text: Inter. */

:root {
  --bg: #faf5ec;
  --paper: #fffdf8;
  --paper-2: #f6efe2;
  --ink: #2a1a12;
  --ink-2: #4a372b;
  --muted: #7b6a5c;
  --line: #eadcc6;
  --line-2: #dfcdb1;
  --maroon: #6e1d17;
  --maroon-2: #8f2a1f;
  --saffron: #d2691e;
  --gold: #b88a2e;
  --gold-2: #e9c46a;
  --gold-soft: #f6ead0;
  --good: #2f7d4f;
  --ok: #b7791f;
  --bad: #b23a2a;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow-1: 0 1px 2px rgba(60, 25, 10, .05), 0 2px 8px rgba(60, 25, 10, .05);
  --shadow-2: 0 2px 6px rgba(60, 25, 10, .06), 0 14px 40px rgba(60, 25, 10, .10);
  --display: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --text: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --max: 1200px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 130px; }
body {
  margin: 0; font-family: var(--text); font-size: 16px; line-height: 1.65; color: var(--ink);
  background:
    radial-gradient(circle at 12% -10%, rgba(233, 196, 106, .18), transparent 40%),
    radial-gradient(circle at 100% 0%, rgba(210, 105, 30, .08), transparent 35%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.12; margin: 0 0 .5rem; color: var(--ink); letter-spacing: .005em; }
h1 { font-size: clamp(2.2rem, 4.6vw, 3.6rem); }
h2 { font-size: clamp(1.5rem, 2.4vw, 1.9rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 .9rem; }
a { color: var(--maroon-2); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--saffron); }
img { max-width: 100%; display: block; }
.i { width: 1.15em; height: 1.15em; flex-shrink: 0; vertical-align: -.2em; }
.muted { color: var(--muted); }
.lead { font-size: 1.12rem; color: var(--ink-2); }

/* ── Header ─────────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 252, 245, .88); backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner { max-width: var(--max); margin: 0 auto; padding: 12px 24px 6px; display: flex; gap: 20px; align-items: center; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); flex-shrink: 0; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-size: 1.35rem; color: var(--gold-2);
  background: radial-gradient(circle at 30% 25%, var(--maroon-2), var(--maroon)); box-shadow: inset 0 0 0 2px rgba(233, 196, 106, .55), var(--shadow-1);
}
.brand-text { font-family: var(--display); font-size: 1.6rem; font-weight: 700; line-height: 1; display: flex; flex-direction: column; }
.brand-text small { font-family: var(--text); font-size: .64rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); margin-top: 4px; }
.global-search { flex: 1; max-width: 520px; margin-left: auto; position: relative; }
.global-search .i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.global-search input {
  width: 100%; padding: 11px 16px 11px 40px; border-radius: 999px; font: inherit; font-size: .95rem;
  border: 1px solid var(--line-2); background: var(--paper); color: var(--ink); transition: border-color .2s, box-shadow .2s;
}
.global-search input:focus, .search:focus, .big-search input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 4px rgba(233, 196, 106, .3); }
.nav { max-width: var(--max); margin: 0 auto; padding: 0 16px; display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a {
  white-space: nowrap; padding: 10px 12px 12px; text-decoration: none; color: var(--ink-2); font-size: .9rem; font-weight: 500;
  border-bottom: 2px solid transparent; transition: color .15s, border-color .15s;
}
.nav a:hover { color: var(--maroon); }
.nav a.active { color: var(--maroon); border-color: var(--gold); }
.trip-link { margin-left: auto; }
.count:not(:empty) { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; margin-left: 4px; border-radius: 999px; background: var(--maroon); color: #fff; font-size: .72rem; font-weight: 700; }
.menu-btn { display: none; }

main { max-width: var(--max); margin: 0 auto; padding: 28px 24px 80px; min-height: 70vh; }

/* ── Shared pieces ──────────────────────────────────── */
.eyebrow { display: inline-flex; align-items: center; gap: 6px; font-size: .74rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.eyebrow.light { color: var(--gold-2); }
.ornament { display: flex; align-items: center; justify-content: center; gap: 12px; color: var(--gold); margin: 14px auto 0; max-width: 260px; }
.ornament span { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--gold)); }
.ornament span:last-child { background: linear-gradient(90deg, var(--gold), transparent); }
.ornament .i { width: 22px; height: 22px; }
.page-head { text-align: center; max-width: 760px; margin: 28px auto 30px; }
.page-head h1 { margin-top: 6px; }
.page-head p { color: var(--muted); font-size: 1.05rem; margin: 8px auto 0; max-width: 640px; }
.band .page-head, main > .page-head:not(:first-child) { margin-top: 64px; }
.row-title { font-size: 1.8rem; margin: 52px 0 18px; display: flex; align-items: center; gap: 14px; }
.row-title::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line-2), transparent); }

.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 11px 20px; border-radius: 999px; font: inherit; font-size: .93rem; font-weight: 600;
  text-decoration: none; cursor: pointer; border: 1px solid transparent; transition: transform .15s, box-shadow .2s, background .2s; line-height: 1.2;
}
.btn:hover { transform: translateY(-1px); }
.btn.solid { background: linear-gradient(135deg, var(--maroon-2), var(--maroon)); color: #fff; box-shadow: 0 6px 18px rgba(110, 29, 23, .25); }
.btn.solid:hover { color: #fff; box-shadow: 0 10px 24px rgba(110, 29, 23, .32); }
.btn.ghost { background: var(--paper); color: var(--maroon); border-color: var(--line-2); }
.btn.ghost:hover { border-color: var(--gold); color: var(--maroon); }
.btn.ghost[aria-pressed="true"] { background: var(--gold-soft); border-color: var(--gold); }
.btn.light { background: #fff; color: var(--maroon); }
.btn.light:hover { color: var(--maroon); box-shadow: 0 6px 18px rgba(0, 0, 0, .18); }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.btn-row.center { justify-content: center; margin-bottom: 28px; }
.link-btn { background: none; border: 0; padding: 0; color: var(--maroon-2); font: inherit; font-weight: 600; cursor: pointer; }

.chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 20px; justify-content: center; }
.chips.small { justify-content: flex-start; margin: 14px 0 18px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line-2); background: var(--paper); color: var(--ink-2);
  padding: 7px 14px; border-radius: 999px; cursor: pointer; font: inherit; font-size: .88rem; font-weight: 500; text-decoration: none;
}
.chip[aria-pressed="true"] { background: var(--maroon); border-color: var(--maroon); color: #fff; }
.tag, .pill { display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; }
.tag { background: var(--gold-soft); color: #8a5a10; }
.pill { background: rgba(255, 255, 255, .16); color: #fff; border: 1px solid rgba(255, 255, 255, .35); text-decoration: none; backdrop-filter: blur(4px); }
a.pill:hover { background: rgba(255, 255, 255, .28); color: #fff; }
.guide-tag { display: inline-flex; align-items: center; gap: 4px; font-size: .72rem; font-weight: 700; color: var(--good); letter-spacing: .02em; }
.deity-tag { font-size: .74rem; font-weight: 600; color: var(--maroon-2); background: #fbeee6; padding: 3px 10px; border-radius: 999px; }
.empty { text-align: center; color: var(--muted); padding: 40px 0; }
.verify { font-size: .84rem; color: var(--muted); margin-top: 12px; }
.verify .i { color: var(--gold); }

.loading { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 60px 0; color: var(--muted); }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: var(--maroon); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Images ─────────────────────────────────────────── */
.img, [data-img] { background-color: #e8d6bb; position: relative; overflow: hidden; }
.img > img, .hero-photo > img, .home-hero > img, .deity-portrait > img, .deity-face > img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .6s ease, transform .8s ease;
}
img.loaded { opacity: 1 !important; }
.img.noimg { background: linear-gradient(135deg, var(--gold-soft), #ecd8b8); display: grid; place-items: center; }
.noimg-mark { color: var(--gold); opacity: .7; }
.noimg-mark .i { width: 42px; height: 42px; }

/* ── Home hero ──────────────────────────────────────── */
.home-hero {
  position: relative; border-radius: 28px; overflow: hidden; min-height: 560px; display: flex; align-items: flex-end;
  background-color: var(--maroon); box-shadow: var(--shadow-2); margin-top: 4px;
}
.hero-shade {
  position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(180deg, rgba(30, 10, 5, .15) 0%, rgba(30, 10, 5, .35) 40%, rgba(40, 10, 6, .88) 100%),
    radial-gradient(circle at 15% 85%, rgba(110, 29, 23, .65), transparent 55%);
}
.home-hero-inner { position: relative; z-index: 2; padding: 56px; color: #fff; max-width: 860px; }
.home-hero h1 { color: #fff; font-size: clamp(2.6rem, 6vw, 4.6rem); font-weight: 600; margin: 12px 0 14px; text-shadow: 0 2px 30px rgba(0, 0, 0, .35); }
.home-hero h1 em { color: var(--gold-2); font-style: italic; }
.home-hero p { font-size: 1.15rem; max-width: 600px; opacity: .92; }
.big-search { display: flex; align-items: center; gap: 8px; max-width: 640px; margin: 26px 0 30px; background: #fff; padding: 7px 7px 7px 18px; border-radius: 999px; box-shadow: 0 20px 50px rgba(0, 0, 0, .3); color: var(--muted); }
.big-search input { flex: 1; min-width: 0; border: 0; padding: 10px 6px; font: inherit; font-size: 1rem; background: transparent; color: var(--ink); }
.big-search input:focus { box-shadow: none; }
.hero-stats { display: flex; gap: 36px; flex-wrap: wrap; }
.hero-stats div { display: flex; flex-direction: column; }
.hero-stats strong { font-family: var(--display); font-size: 2.2rem; font-weight: 700; color: var(--gold-2); line-height: 1; }
.hero-stats span { font-size: .78rem; text-transform: uppercase; letter-spacing: .12em; opacity: .85; margin-top: 6px; }

.tiles { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; margin: -44px 28px 0; position: relative; z-index: 5; }
.tile {
  background: var(--paper); border-radius: var(--radius); padding: 18px 18px 16px; box-shadow: var(--shadow-2); text-decoration: none; color: var(--ink);
  display: grid; gap: 2px; transition: transform .2s, box-shadow .2s; border: 1px solid var(--line);
}
.tile:hover { transform: translateY(-3px); color: var(--ink); }
.tile .i { width: 28px; height: 28px; color: var(--maroon-2); margin-bottom: 8px; }
.tile strong { font-size: 1rem; }
.tile small { color: var(--muted); font-size: .84rem; }

/* ── Cards ──────────────────────────────────────────── */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 22px; }
.grid.small { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.card {
  background: var(--paper); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: inherit; display: flex; flex-direction: column;
  border: 1px solid var(--line); box-shadow: var(--shadow-1); transition: transform .25s ease, box-shadow .25s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); color: inherit; }
.card:hover .img > img { transform: scale(1.05); }
.card .img { aspect-ratio: 4 / 3; }
.card.small .img { aspect-ratio: 16 / 10; }
.card-state { position: absolute; z-index: 2; left: 12px; top: 12px; background: rgba(255, 253, 248, .92); color: var(--maroon); font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 5px 10px; border-radius: 999px; }
.card .body { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.card h3 { font-size: 1.32rem; margin: 0 0 6px; }
.card.small h3 { font-size: 1.12rem; }
.card .meta { display: flex; gap: 6px; align-items: flex-start; font-size: .84rem; color: var(--muted); }
.card .meta .i { margin-top: 3px; color: var(--gold); }
.card p { font-size: .93rem; color: var(--ink-2); margin: 10px 0 0; }
.card-foot { margin-top: auto; padding-top: 14px; display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ── Photo heroes (temple, circuit, state) ──────────── */
.hero-photo {
  position: relative; border-radius: 26px; overflow: hidden; min-height: 460px; display: flex; align-items: flex-end;
  background-color: var(--maroon); box-shadow: var(--shadow-2);
}
.hero-photo.plain { min-height: 300px; background: linear-gradient(135deg, var(--maroon-2), var(--maroon) 60%, #4a120e); }
.hero-photo.state-hero { min-height: 380px; }
.hero-inner { position: relative; z-index: 2; padding: 40px 44px; color: #fff; max-width: 900px; }
.hero-inner h1 { color: #fff; margin: 8px 0 8px; text-shadow: 0 2px 24px rgba(0, 0, 0, .35); }
.hero-sub { font-size: 1.08rem; opacity: .92; margin: 0; }
.hero-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.crumbs { display: flex; gap: 8px; font-size: .84rem; margin-bottom: 14px; opacity: .9; }
.crumbs a { color: #fff; text-decoration: none; }
.crumbs a:hover { color: var(--gold-2); }
.crumbs.dark a { color: var(--maroon-2); }
.credit { position: absolute; z-index: 2; right: 14px; bottom: 10px; font-size: .7rem; color: rgba(255, 255, 255, .75); }
.credit a { color: inherit; }
.aka { text-align: center; color: var(--muted); font-size: .9rem; margin: -6px 0 0; }

.deity-chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 4px 14px 4px 4px; border-radius: 999px; text-decoration: none; font-weight: 600; font-size: .88rem;
  background: rgba(255, 253, 248, .95); color: var(--maroon);
}
.deity-chip:hover { color: var(--maroon); background: #fff; }
.deity-face { width: 30px; height: 30px; border-radius: 50%; display: inline-block; box-shadow: 0 0 0 2px var(--gold-2); }
.chips .deity-chip { border: 1px solid var(--line-2); }

.facts {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0; margin: -30px 30px 26px; position: relative; z-index: 5;
  background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow-2); border: 1px solid var(--line); overflow: hidden;
}
.fact { display: flex; gap: 12px; align-items: center; padding: 16px 20px; border-right: 1px solid var(--line); }
.fact:last-child { border-right: 0; }
.fact > .i { width: 26px; height: 26px; color: var(--gold); }
.fact span { display: block; font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 600; }
.fact strong { display: block; font-size: .95rem; line-height: 1.35; }

/* ── Tabs & layout ──────────────────────────────────── */
.tabs {
  position: sticky; top: 104px; z-index: 20; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none;
  background: rgba(250, 245, 236, .94); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); margin: 8px 0 28px; padding-top: 4px;
}
.tabs::-webkit-scrollbar { display: none; }
.tabs a { white-space: nowrap; padding: 12px 16px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: .92rem; border-bottom: 2px solid transparent; }
.tabs a:hover { color: var(--maroon); }
.tabs a[aria-current="page"] { color: var(--maroon); border-color: var(--gold); }

.layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 30px; align-items: start; }
.main-col { min-width: 0; }
.section { background: var(--paper); border-radius: var(--radius); padding: 28px 30px; border: 1px solid var(--line); box-shadow: var(--shadow-1); margin-bottom: 20px; }
.section h2 { margin-bottom: 14px; }
.section h3 { margin: 20px 0 6px; }
.section.sub h2 { font-size: 1.35rem; }
.section ul { padding-left: 1.2rem; margin: 0; }
.section li { margin: 6px 0; }
.lead-block p:first-child { font-size: 1.1rem; color: var(--ink-2); }
.clamp { max-height: 300px; overflow: hidden; -webkit-mask-image: linear-gradient(#000 70%, transparent); mask-image: linear-gradient(#000 70%, transparent); }

table { width: 100%; border-collapse: collapse; }
td, th { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: top; font-size: .95rem; }
tr:last-child td { border-bottom: 0; }
th { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; }
td small { color: var(--muted); display: block; font-size: .84rem; margin-top: 2px; }
.table-wrap { overflow-x: auto; }

.aside { position: sticky; top: 168px; display: grid; gap: 16px; }
.book-card {
  color: #fff; border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-2); position: relative; overflow: hidden;
  background: radial-gradient(circle at 100% 0%, rgba(233, 196, 106, .35), transparent 50%), linear-gradient(150deg, var(--maroon-2), var(--maroon) 70%);
}
.book-card p, .book-card li { opacity: .93; font-size: .94rem; }
.book-card ul { padding-left: 1.1rem; margin: 10px 0 0; }
.book-card .btn { margin-top: 6px; }
.book-card .btn + .btn { margin-left: 6px; }
.book-card .eyebrow { margin-bottom: 10px; }
.dress { background: var(--gold-soft); border-radius: var(--radius); padding: 20px 22px; border: 1px solid #eedcb0; }
.dress h3 { font-size: 1.15rem; margin: 0 0 6px; }
.dress p { margin: 0; font-size: .93rem; }
.aside-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.aside .verify { margin: 0; }

/* Quick answers */
.quick { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1px; background: var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 20px; border: 1px solid var(--line); box-shadow: var(--shadow-1); }
.quick .q { background: var(--paper); padding: 16px 18px; }
.quick .q span { display: block; font-size: .7rem; text-transform: uppercase; letter-spacing: .12em; color: var(--gold); font-weight: 700; margin-bottom: 5px; }
.quick .q p, .quick .q a { margin: 0; font-size: .95rem; }
.quick .q a { display: inline-flex; gap: 6px; align-items: center; text-decoration: none; font-weight: 600; }

/* Timelines */
.timeline { list-style: none; padding: 0 !important; margin: 0; position: relative; }
.timeline li { display: grid; grid-template-columns: 130px 1fr; gap: 18px; padding: 14px 0; border-bottom: 1px dashed var(--line); }
.timeline li:last-child { border-bottom: 0; }
.timeline .t { font-weight: 700; color: var(--maroon-2); font-size: .88rem; }
.timeline.history li { grid-template-columns: 170px 1fr; }
.timeline p { margin: 4px 0 0; }
.legend { padding: 4px 0 6px 18px; border-left: 3px solid var(--gold-2); margin: 14px 0; }
.legend h3 { margin-top: 0; }

.mini-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.mini { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px; background: var(--bg); }
.mini > .i { color: var(--maroon-2); margin-right: 4px; }
.mini p { margin: 6px 0 0; font-size: .92rem; color: var(--muted); }
.mini.link { text-decoration: none; color: var(--ink); display: block; transition: border-color .2s, transform .2s; }
.mini.link:hover { border-color: var(--gold); transform: translateY(-2px); }
.mini.link .muted { display: block; font-size: .84rem; }

/* Sevas */
.sevas { display: grid; gap: 10px; }
.seva { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg); transition: border-color .2s; }
.seva[open] { border-color: var(--gold); background: var(--paper); }
.seva summary { list-style: none; cursor: pointer; padding: 15px 18px; display: flex; justify-content: space-between; gap: 14px; align-items: center; }
.seva summary::-webkit-details-marker { display: none; }
.seva[open] summary { border-bottom: 1px solid var(--line); }
.seva-when { font-size: .85rem; color: var(--muted); }
.seva-right { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
.price { font-family: var(--display); font-weight: 700; font-size: 1.15rem; color: var(--maroon); white-space: nowrap; }
.seva-body { padding: 6px 18px 16px; }
.kv { display: grid; grid-template-columns: 160px 1fr; gap: 14px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.kv:last-child { border-bottom: 0; }
.kv span { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--gold); font-weight: 700; padding-top: 3px; }
.kv p { margin: 0; }
.numbered { padding-left: 1.3rem; margin: 0; }
.numbered li { margin: 10px 0; }
.fest { padding: 12px 0; border-bottom: 1px dashed var(--line); }
.fest:last-child { border-bottom: 0; }
.fest p { margin: 4px 0 0; color: var(--ink-2); }
.faq { border-bottom: 1px solid var(--line); padding: 14px 0; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq p { margin: 8px 0 0; color: var(--ink-2); }
.sources li { font-size: .9rem; }

/* How to reach / routes */
.mode { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px dashed var(--line); }
.mode > .i { width: 26px; height: 26px; color: var(--maroon-2); margin-top: 2px; }
.mode p { margin: 2px 0 0; color: var(--ink-2); }
.map { height: 400px; border-radius: var(--radius-sm); overflow: hidden; background: var(--paper-2); margin-bottom: 16px; z-index: 0; border: 1px solid var(--line); }
.map.tall { height: 520px; }
.map.full { height: calc(100vh - 260px); min-height: 480px; }
.route-total { display: flex; gap: 12px; align-items: center; background: var(--gold-soft); border-radius: var(--radius-sm); padding: 12px 16px; margin-bottom: 10px; }
.route-total .i { width: 24px; height: 24px; color: var(--maroon-2); }
.legs { list-style: none; padding: 0 !important; margin: 0 0 6px; }
.legs li { display: grid; grid-template-columns: 56px 1fr auto; gap: 10px; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: .92rem; align-items: center; }
.legs em { color: var(--muted); font-style: normal; }
.leg-n { font-size: .74rem; color: var(--muted); font-weight: 700; }
.leg-km { color: var(--maroon-2); font-weight: 600; white-space: nowrap; }
.num-pin { background: var(--maroon); color: var(--gold-2); border: 2px solid var(--gold-2); border-radius: 50%; display: grid !important; place-items: center; font-weight: 700; font-size: 13px; box-shadow: 0 3px 10px rgba(0, 0, 0, .3); }
.num-pin .i { width: 16px; height: 16px; }
.guide-pin { background: var(--maroon); color: var(--gold-2); border-radius: 50%; display: grid !important; place-items: center; border: 2px solid #fff; box-shadow: 0 3px 10px rgba(0, 0, 0, .35); }
.guide-pin .i { width: 17px; height: 17px; }
.dot-pin { background: var(--saffron); border: 2px solid #fff; border-radius: 50%; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); }
.cluster { background: rgba(110, 29, 23, .9); color: var(--gold-2); border-radius: 50%; display: grid !important; place-items: center; font-weight: 700; font-size: 12px; border: 3px solid rgba(233, 196, 106, .6); }
.leaflet-popup-content-wrapper { border-radius: 12px; font-family: var(--text); }
.leaflet-popup-content a { color: var(--maroon-2); font-weight: 600; }

/* Notices */
.notice { display: flex; gap: 12px; align-items: flex-start; background: #fff7e6; border: 1px solid #f0dcaa; border-radius: var(--radius-sm); padding: 14px 18px; margin-bottom: 20px; font-size: .93rem; }
.notice > .i { width: 22px; height: 22px; color: var(--gold); margin-top: 2px; }
.notice p { margin: 0; }
.notice.soft { margin-top: 20px; }
.stat-line { display: flex; gap: 8px; align-items: flex-start; font-size: .9rem; color: var(--ink-2); margin: 10px 0 0; }
.stat-line .i { color: var(--gold); margin-top: 3px; }

/* ── Road safety ────────────────────────────────────── */
.safety .lead { margin-bottom: 14px; }
.safety-meta { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; margin-bottom: 18px; }
.safety-meta p { margin: 0; color: var(--ink-2); flex: 1; min-width: 240px; }
.modes { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.mode-card { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px; background: var(--bg); }
.mode-top { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.mode-top > .i { width: 28px; height: 28px; color: var(--maroon-2); }
.mode-top small { display: block; color: var(--muted); font-size: .78rem; }
.mode-score { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: .85rem; margin-bottom: 8px; }
.mode-card p { margin: 0; font-size: .9rem; color: var(--ink-2); }
.dots { display: inline-flex; gap: 4px; }
.dots i { width: 22px; height: 7px; border-radius: 4px; background: var(--line); }
.dots.s-good i.on { background: var(--good); }
.dots.s-ok i.on { background: var(--ok); }
.dots.s-bad i.on { background: var(--bad); }
.s-good { color: var(--good); }
.s-ok { color: var(--ok); }
.s-bad { color: var(--bad); }
.rules { list-style: none; padding: 0 !important; }
.rules li { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.rules .i { color: var(--bad); margin-top: 3px; }
.risk { padding: 10px 0; border-bottom: 1px dashed var(--line); }
.risk p { margin: 4px 0 0; color: var(--ink-2); }
.safety-intro { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin-bottom: 20px; }
.mode-key { display: flex; gap: 10px; align-items: center; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; }
.mode-key .i { width: 26px; height: 26px; color: var(--maroon-2); }
.mode-key small { display: block; color: var(--muted); font-size: .76rem; }
.safety-table th { text-align: center; }
.safety-table th:first-child, .safety-table th:nth-child(2) { text-align: left; }
.safety-table th .i { display: block; margin: 0 auto 4px; width: 22px; height: 22px; color: var(--maroon-2); }
.safety-table th span { font-size: .64rem; display: block; }
.safety-table td { text-align: center; vertical-align: middle; }
.safety-table td:first-child, .safety-table td:nth-child(2) { text-align: left; }
.score-pill { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; font-weight: 700; color: #fff; }
.score-pill.s-good { background: var(--good); }
.score-pill.s-ok { background: var(--ok); }
.score-pill.s-bad { background: var(--bad); }
.bars { display: grid; gap: 6px; }
.bar-row { display: grid; grid-template-columns: 200px 1fr 130px; gap: 12px; align-items: center; font-size: .9rem; }
.bar-row a { text-decoration: none; color: var(--ink); }
.bar { height: 10px; background: var(--paper-2); border-radius: 6px; overflow: hidden; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--saffron), var(--maroon)); border-radius: 6px; }
.bar-row span { text-align: right; font-weight: 600; }
.bar-row small { color: var(--muted); font-weight: 400; }

/* ── States & A–Z ───────────────────────────────────── */
.az-bar { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; margin: 0 0 22px; position: sticky; top: 104px; z-index: 10; background: rgba(250, 245, 236, .94); backdrop-filter: blur(8px); padding: 8px 0; }
.az-bar a { min-width: 34px; height: 34px; display: grid; place-items: center; padding: 0 8px; border-radius: 10px; text-decoration: none; font-weight: 700; font-size: .88rem; color: var(--maroon); background: var(--paper); border: 1px solid var(--line); }
.az-bar a:hover { background: var(--maroon); color: #fff; }
.az-letter { font-size: 2.2rem; color: var(--gold); margin: 26px 0 10px; grid-column: 1 / -1; border-bottom: 1px solid var(--line); padding-bottom: 4px; }
.state-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.state-card {
  display: flex; flex-direction: column; gap: 4px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px;
  text-decoration: none; color: var(--ink); box-shadow: var(--shadow-1); transition: transform .2s, box-shadow .2s, border-color .2s; position: relative; overflow: hidden;
}
.state-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: linear-gradient(var(--gold-2), var(--saffron), var(--maroon)); }
.state-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); color: var(--ink); border-color: var(--line-2); }
.state-card strong { font-family: var(--display); font-size: 1.55rem; line-height: 1.1; }
.state-card p { font-size: .9rem; color: var(--muted); margin: 4px 0 8px; }
.state-card .region { font-size: .68rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); }
.state-card .counts { margin-top: auto; font-size: .85rem; color: var(--ink-2); }
.state-card .counts b { color: var(--maroon); }
.az-tools { margin-bottom: 14px; }
.search { width: 100%; padding: 13px 18px; border: 1px solid var(--line-2); border-radius: 999px; font: inherit; background: var(--paper); }
.az-group { margin-bottom: 6px; }
.az-group .az-letter { font-size: 1.9rem; margin-top: 16px; }
.az-list { list-style: none; padding: 0 !important; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 2px 24px; }
.az-list a { display: flex; flex-direction: column; padding: 9px 12px; border-radius: 10px; text-decoration: none; color: var(--ink); }
.az-list a:hover { background: var(--paper); box-shadow: var(--shadow-1); }
.az-name { font-weight: 600; font-size: .96rem; }
.az-meta { font-size: .82rem; color: var(--muted); }
.state-fold { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 8px; padding: 0 16px; }
.state-fold summary { cursor: pointer; padding: 14px 0; display: flex; justify-content: space-between; font-size: 1.05rem; }
.state-fold summary span { color: var(--muted); font-size: .9rem; }
.state-fold[open] { padding-bottom: 12px; }

.regions { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.region-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-1); }
.region-card h3 { font-size: 1.6rem; color: var(--maroon); margin-bottom: 10px; }
.region-states { display: grid; gap: 2px; }
.region-states a { display: flex; justify-content: space-between; padding: 7px 10px; border-radius: 8px; text-decoration: none; color: var(--ink); font-size: .94rem; }
.region-states a:hover { background: var(--gold-soft); }
.region-states span { color: var(--muted); font-size: .84rem; }

/* ── Deities ────────────────────────────────────────── */
.band { margin-top: 20px; }
.deity-row { display: flex; gap: 18px; overflow-x: auto; padding: 6px 4px 14px; scrollbar-width: thin; justify-content: flex-start; }
.deity-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 22px; }
.deity-card { display: flex; flex-direction: column; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); text-align: center; flex: 0 0 108px; }
.deity-card strong { font-family: var(--display); font-size: 1.2rem; line-height: 1.1; }
.deity-card span { font-size: .8rem; color: var(--muted); }
.deity-portrait {
  width: 104px; height: 104px; border-radius: 50%; box-shadow: 0 0 0 3px var(--paper), 0 0 0 5px var(--gold-2), var(--shadow-2);
  transition: transform .25s; display: grid; place-items: center; color: var(--maroon);
}
.deity-grid .deity-portrait { width: 132px; height: 132px; }
.deity-card:hover .deity-portrait { transform: scale(1.05); }
.deity-card.more .deity-portrait { background: var(--gold-soft); }
.deity-portrait > img { object-position: top center; }
.deity-portrait.big { width: 220px; height: 220px; flex-shrink: 0; }
.deity-hero { display: flex; gap: 40px; align-items: center; background: var(--paper); border: 1px solid var(--line); border-radius: 26px; padding: 40px; box-shadow: var(--shadow-1); margin-top: 6px; }
.deity-hero h1 { margin: 6px 0 10px; }
.credit-inline a { color: var(--muted); }

/* Circuits */
.circuit-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(280px, 1fr); gap: 18px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: thin; }
.circuit-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }
.circuit { position: relative; display: block; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 5; box-shadow: var(--shadow-2); color: #fff; text-decoration: none; }
.circuit .img { position: absolute; inset: 0; }
.circuit:hover .img > img { transform: scale(1.06); }
.circuit-text { position: absolute; inset: auto 0 0 0; z-index: 2; padding: 60px 20px 20px; background: linear-gradient(transparent, rgba(30, 10, 5, .92)); display: grid; gap: 4px; }
.circuit-text strong { font-family: var(--display); font-size: 1.7rem; line-height: 1.1; }
.circuit-text > span:last-child { font-size: .9rem; opacity: .9; }
.circuit:hover { color: #fff; }
.circuit-list { list-style: none; padding: 0 !important; margin: 0; }
.circuit-list li { display: flex; gap: 16px; padding: 16px 0; border-bottom: 1px dashed var(--line); align-items: flex-start; }
.circuit-list li:last-child { border-bottom: 0; }
.circuit-list p { margin: 4px 0 0; color: var(--muted); font-size: .93rem; }
.num { flex: 0 0 34px; height: 34px; border-radius: 50%; background: var(--maroon); color: var(--gold-2); display: grid; place-items: center; font-weight: 700; font-family: var(--display); font-size: 1.15rem; }
.grow { flex: 1; }
.row-actions { display: flex; gap: 4px; }
.icon-btn { border: 1px solid var(--line-2); background: var(--paper); border-radius: 10px; width: 34px; height: 34px; cursor: pointer; color: var(--ink-2); }
.icon-btn:disabled { opacity: .35; cursor: default; }

/* Plan */
.steps { counter-reset: step; list-style: none; padding: 0; max-width: 860px; margin: 0 auto 24px; }
.steps > li { counter-increment: step; position: relative; padding: 22px 24px 18px 82px; background: var(--paper); border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow-1); margin-bottom: 14px; }
.steps > li::before {
  content: counter(step); position: absolute; left: 22px; top: 20px; width: 40px; height: 40px; border-radius: 50%;
  background: var(--maroon); color: var(--gold-2); display: grid; place-items: center; font-family: var(--display); font-weight: 700; font-size: 1.3rem;
}
.steps p { margin: 0; color: var(--ink-2); }
.check { max-width: 860px; margin: 0 auto; }
.todo { display: flex; gap: 10px; align-items: baseline; padding: 10px 0; border-bottom: 1px dashed var(--line); cursor: pointer; }
.todo input { accent-color: var(--maroon); }

/* ── Footer ─────────────────────────────────────────── */
.footer { background: linear-gradient(160deg, #3a0f0b, var(--maroon) 70%); color: rgba(255, 255, 255, .85); margin-top: 40px; }
.footer-inner { max-width: var(--max); margin: 0 auto; padding: 48px 24px 24px; display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; }
.footer p { font-size: .9rem; max-width: 520px; margin-top: 16px; }
.brand.light .brand-text { color: #fff; }
.footer-links { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; align-content: start; }
.footer-links a { color: rgba(255, 255, 255, .85); text-decoration: none; }
.footer-links a:hover { color: var(--gold-2); }
.footer-fine { max-width: var(--max); margin: 0 auto; padding: 16px 24px 32px; font-size: .76rem !important; opacity: .7; border-top: 1px solid rgba(255, 255, 255, .12); }

/* ── Responsive ─────────────────────────────────────── */
@media (max-width: 1000px) {
  .tiles { grid-template-columns: repeat(3, 1fr); margin: -40px 16px 0; }
  .layout { grid-template-columns: 1fr; }
  .aside { position: static; }
}
@media (max-width: 760px) {
  html { scroll-padding-top: 70px; }
  .topbar-inner { padding: 10px 16px; gap: 12px; flex-wrap: wrap; }
  .brand-text { font-size: 1.35rem; }
  .brand-mark { width: 34px; height: 34px; font-size: 1.1rem; }
  .global-search { order: 3; max-width: none; flex-basis: 100%; }
  .menu-btn { display: grid; gap: 4px; margin-left: auto; background: none; border: 0; padding: 8px; cursor: pointer; }
  .menu-btn span { width: 22px; height: 2px; background: var(--ink); border-radius: 2px; }
  .nav { display: none; flex-direction: column; padding: 0 16px 12px; }
  .nav-open .nav { display: flex; }
  .nav a { border-bottom: 1px solid var(--line); padding: 12px 4px; }
  .trip-link { margin-left: 0; }
  main { padding: 18px 16px 60px; }
  .home-hero { min-height: 520px; border-radius: 20px; }
  .home-hero-inner { padding: 28px 22px; }
  .hero-stats { gap: 22px; }
  .hero-stats strong { font-size: 1.7rem; }
  .big-search .btn { padding: 10px 14px; }
  .tiles { grid-template-columns: repeat(2, 1fr); margin: -30px 8px 0; gap: 10px; }
  .hero-photo { min-height: 380px; border-radius: 20px; }
  .hero-inner { padding: 26px 22px; }
  .facts { margin: -20px 8px 22px; grid-template-columns: 1fr 1fr; }
  .fact { border-right: 0; border-bottom: 1px solid var(--line); padding: 12px 14px; }
  .tabs, .az-bar { top: 0; position: static; }
  .section { padding: 22px 18px; }
  .timeline li, .timeline.history li { grid-template-columns: 1fr; gap: 2px; }
  .kv { grid-template-columns: 1fr; gap: 2px; }
  .seva summary { flex-direction: column; align-items: flex-start; }
  .legs li { grid-template-columns: 1fr auto; }
  .leg-n { display: none; }
  .deity-hero { flex-direction: column; text-align: center; padding: 28px 20px; gap: 20px; }
  .bar-row { grid-template-columns: 110px 1fr 90px; font-size: .82rem; }
  .footer-inner { grid-template-columns: 1fr; }
  .az-list { grid-template-columns: 1fr; }
  .steps > li { padding: 70px 18px 18px; }
}
@media print {
  .topbar, .footer, .aside, .row-actions, [data-optimise], .map, .tabs { display: none !important; }
  .layout { grid-template-columns: 1fr; }
  .section { box-shadow: none; border: 1px solid #ddd; }
}

/* ── Mobile refinements ─────────────────────────────── */
.home-hero-inner, .hero-inner { flex: 1; min-width: 0; }
.bottom-nav { display: none; }
@media (max-width: 760px) {
  body { font-size: 15.5px; padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  h1 { font-size: 2rem; }
  .row-title { font-size: 1.45rem; margin: 36px 0 14px; }
  .page-head { margin: 14px auto 20px; }
  .page-head p { font-size: .95rem; }
  .band .page-head, main > .page-head:not(:first-child) { margin-top: 44px; }

  /* Compact sticky header: brand + menu on one row, search below */
  .topbar-inner { padding: 8px 14px 10px; row-gap: 8px; }
  .brand-text small { display: none; }
  .global-search input { padding: 9px 14px 9px 38px; font-size: 16px; } /* 16px stops iOS zooming on focus */

  /* Bottom tab bar */
  .bottom-nav {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; z-index: 60; left: 0; right: 0; bottom: 0;
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); background: rgba(255, 252, 245, .96); backdrop-filter: blur(14px);
    border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(60, 25, 10, .06);
  }
  .bottom-nav a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: .68rem; font-weight: 600; color: var(--muted); text-decoration: none; padding: 4px 0; position: relative; }
  .bottom-nav a .i { width: 22px; height: 22px; }
  .bottom-nav a.active { color: var(--maroon); }
  .bottom-nav .count:not(:empty) { position: absolute; top: 0; right: 18%; min-width: 16px; height: 16px; font-size: .6rem; margin: 0; padding: 0 4px; }

  /* Home hero */
  .home-hero { min-height: 0; border-radius: 22px; }
  .home-hero-inner { padding: 30px 20px 64px; }
  .home-hero h1 { font-size: 2.35rem; margin: 10px 0; }
  .home-hero p { font-size: 1rem; }
  .big-search { margin: 20px 0 22px; padding: 5px 5px 5px 14px; }
  .big-search input { font-size: 16px; }
  .big-search .btn { padding: 10px 14px; }
  .hero-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 20px; }
  .hero-stats strong { font-size: 1.7rem; }
  .hero-stats span { font-size: .66rem; }
  .tiles { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; margin: -40px -16px 0; padding: 0 16px 6px; gap: 10px; scrollbar-width: none; }
  .tiles::-webkit-scrollbar { display: none; }
  .tile { flex: 0 0 150px; scroll-snap-align: start; padding: 14px; }

  /* Photo heroes */
  .hero-photo { min-height: 340px; border-radius: 22px; }
  .hero-photo.state-hero { min-height: 300px; }
  .hero-inner { padding: 22px 18px 54px; }
  .hero-inner h1 { font-size: 1.95rem; }
  .hero-sub { font-size: .95rem; }
  .credit { left: 18px; right: auto; bottom: 8px; }
  .facts { margin: -36px 4px 18px; }
  .fact strong { font-size: .88rem; }
  .fact > .i { width: 22px; height: 22px; }

  /* Swipeable tabs and letter bars */
  .tabs { position: sticky; top: 0; margin: 4px -16px 20px; padding: 0 8px; }
  .tabs a { padding: 12px 12px; font-size: .88rem; }
  .az-bar { flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; margin: 0 -16px 16px; padding: 8px 16px; scrollbar-width: none; }
  .az-bar a { flex: 0 0 auto; }

  /* Cards & sections */
  .grid { grid-template-columns: 1fr; gap: 16px; }
  .grid.small { grid-template-columns: 1fr 1fr; gap: 10px; }
  .card.small h3 { font-size: 1rem; }
  .card.small .body { padding: 10px 12px 12px; }
  .card.small .meta { font-size: .76rem; }
  .section { padding: 20px 16px; border-radius: 16px; }
  .section h2 { font-size: 1.45rem; }
  .quick { grid-template-columns: 1fr 1fr; }
  .quick .q { padding: 12px 14px; }
  .quick .q p, .quick .q a { font-size: .88rem; }
  .modes { grid-template-columns: 1fr; }
  .mini-grid { grid-template-columns: 1fr; }
  td, th { padding: 10px 6px; font-size: .9rem; }
  .map { height: 300px; }
  .map.tall { height: 380px; }
  .map.full { height: calc(100vh - 290px); min-height: 380px; }
  .circuit-row { grid-auto-columns: 78%; scroll-snap-type: x mandatory; margin: 0 -16px; padding: 0 16px 8px; }
  .circuit { scroll-snap-align: start; aspect-ratio: 4 / 4.6; }
  .circuit-grid { grid-template-columns: 1fr; }
  .circuit-text strong { font-size: 1.45rem; }
  .deity-row { margin: 0 -16px; padding: 6px 16px 14px; gap: 14px; }
  .deity-card { flex: 0 0 86px; }
  .deity-row .deity-portrait { width: 82px; height: 82px; }
  .deity-card strong { font-size: 1.05rem; }
  .deity-grid { grid-template-columns: repeat(3, 1fr); gap: 16px 10px; }
  .deity-grid .deity-portrait { width: 92px; height: 92px; }
  .deity-portrait.big { width: 160px; height: 160px; }
  .state-grid { grid-template-columns: 1fr; gap: 12px; }
  .state-card { padding: 16px 18px; }
  .regions { grid-template-columns: 1fr; }
  .aside { gap: 12px; }
  .book-card { padding: 20px; }
  .btn { padding: 10px 16px; }
  .btn-row .btn { flex: 1 1 auto; justify-content: center; }
  .seva summary { padding: 13px 14px; }
  .seva-body { padding: 4px 14px 14px; }
  .steps > li { padding: 64px 16px 16px; }
  .steps > li::before { left: 16px; top: 16px; }
  .footer-inner { padding: 36px 20px 16px; gap: 24px; }
  .safety-table th span { display: none; }
  .bar-row { grid-template-columns: 96px 1fr 76px; gap: 8px; }
}
@media (max-width: 380px) {
  .grid.small { grid-template-columns: 1fr; }
  .quick { grid-template-columns: 1fr; }
  .deity-grid { grid-template-columns: repeat(2, 1fr); }
}
/* Long values (durations, timings) stay inside their box */
.fact > div { min-width: 0; }
.fact strong { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.hero-sub { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
main, .section, .card, .mini { overflow-wrap: break-word; }
/* Grid and flex children may shrink below their content width */
.sevas, .modes, .mini-grid { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 761px) { .modes { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); } .mini-grid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); } }
.seva summary > div:first-child, .grow, .az-list a, .circuit-list li > div { min-width: 0; }
@media (max-width: 1000px) { .layout { grid-template-columns: minmax(0, 1fr); } }
.price { white-space: normal; overflow-wrap: anywhere; }
.seva-right { flex-shrink: 1; min-width: 0; flex-wrap: wrap; justify-content: flex-end; text-align: right; max-width: 55%; }
@media (max-width: 760px) { .seva-right { max-width: 100%; justify-content: flex-start; text-align: left; } }

/* ── Safest way & safest route ──────────────────────── */
.safest { border: 1px solid #cfe3d6; background: linear-gradient(180deg, #f3faf5, var(--paper) 60%); }
.safest .eyebrow { color: var(--good); }
.safest-head { display: flex; gap: 14px; align-items: center; margin: 10px 0 10px; }
.safest-head > .i { width: 40px; height: 40px; padding: 8px; border-radius: 12px; background: #e3f2e8; color: var(--good); }
.safest-head h2 { margin: 0; }
.safest-head span { font-weight: 700; font-size: .85rem; }
.safest-points { list-style: none; padding: 0 !important; margin: 12px 0 0; display: grid; gap: 8px; }
.safest-points li { display: flex; gap: 10px; align-items: flex-start; margin: 0 !important; }
.safest-points .i { color: var(--good); margin-top: 3px; }
.safest-points.small { margin-top: 16px; font-size: .9rem; color: var(--ink-2); }
.safest h3 { font-size: 1.1rem; margin-top: 18px; }
.seg { display: inline-flex; padding: 4px; border-radius: 999px; background: var(--paper-2); border: 1px solid var(--line); margin-bottom: 14px; }
.seg button { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 8px 16px; border-radius: 999px; font: inherit; font-weight: 600; font-size: .9rem; color: var(--muted); cursor: pointer; }
.seg button[aria-selected="true"] { background: var(--paper); color: var(--maroon); box-shadow: var(--shadow-1); }
.route-total.safe { background: #e8f4ec; }
.route-total.safe .i { color: var(--good); }
.day-block { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 4px 14px 6px; margin-bottom: 10px; background: var(--bg); }
.day-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 10px 0 4px; border-bottom: 1px solid var(--line); }
.day-head strong { font-family: var(--display); font-size: 1.2rem; color: var(--maroon); }
.day-head span { font-size: .85rem; color: var(--muted); }
.day-block .legs li:last-child { border-bottom: 0; }
.day-block .leg-n .i { color: var(--gold); }
.leg-flags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.flag { display: inline-flex; align-items: center; gap: 4px; font-size: .74rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; }
.flag .i { width: 13px; height: 13px; }
.flag.warn { background: #fdf0e3; color: #9a4a10; }
.flag.good { background: #e3f2e8; color: var(--good); }
@media (max-width: 760px) {
  .seg { display: flex; }
  .seg button { flex: 1; justify-content: center; }
  .day-block .legs li { grid-template-columns: 1fr auto; }
}

/* ── Search tips ────────────────────────────────────── */
.search-help { max-width: 820px; margin: -10px auto 26px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0 16px; }
.search-help summary { cursor: pointer; padding: 12px 0; font-weight: 600; font-size: .9rem; color: var(--maroon-2); display: flex; gap: 8px; align-items: center; }
.search-help[open] { padding-bottom: 12px; }
.search-examples { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.search-examples a { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.search-examples a:hover { border-color: var(--gold); }
.search-examples span { font-size: .8rem; color: var(--muted); }
code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: .86em; background: var(--gold-soft); color: var(--maroon); padding: 1px 6px; border-radius: 6px; }

/* ── History ────────────────────────────────────────── */
.history-hero h2 { margin-bottom: 16px; }
.glance { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin-bottom: 20px; }
.glance > div { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; display: grid; grid-template-columns: auto 1fr; column-gap: 10px; align-items: center; }
.glance .i { grid-row: span 2; width: 26px; height: 26px; color: var(--gold); }
.glance span { font-size: .68rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 700; }
.glance strong { font-size: .95rem; line-height: 1.3; }
.era-ribbon { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.era { cursor: default; min-width: 0; }
.era-bar { position: relative; height: 34px; border-radius: 8px; background: color-mix(in srgb, var(--era) 22%, var(--paper)); border: 1px solid color-mix(in srgb, var(--era) 35%, transparent); }
.era.has .era-bar { background: color-mix(in srgb, var(--era) 38%, var(--paper)); }
.era-dot { position: absolute; top: 50%; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: var(--era); border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.3); }
.era strong { display: block; font-size: .78rem; margin-top: 6px; line-height: 1.2; color: var(--ink); }
.era span { display: block; font-size: .7rem; color: var(--muted); line-height: 1.25; }
.era.active .era-bar { outline: 3px solid var(--era); outline-offset: 1px; }
.hist-filters .era, #app .page-head + .section .era { cursor: pointer; }
.dyn-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.dyn-chips.small { margin-top: 8px; gap: 4px; }
.dyn { font-size: .74rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: #f3e8f0; color: #6b2a50; text-decoration: none; }
a.dyn:hover { background: #ead6e3; color: #6b2a50; }
.dyn-chips.small .dyn { font-size: .68rem; padding: 2px 8px; }

.vtimeline { list-style: none; padding: 0 !important; margin: 0; position: relative; }
.vtimeline::before { content: ""; position: absolute; left: 11px; top: 6px; bottom: 6px; width: 2px; background: linear-gradient(var(--gold-2), var(--maroon)); opacity: .5; }
.vtimeline li { position: relative; padding: 0 0 18px 40px; margin: 0 !important; }
.vt-mark { position: absolute; left: 3px; top: 16px; width: 18px; height: 18px; border-radius: 50%; background: var(--era); border: 3px solid var(--paper); box-shadow: 0 0 0 1px var(--era); }
.vt-card { background: var(--bg); border: 1px solid var(--line); border-left: 4px solid var(--era); border-radius: var(--radius-sm); padding: 14px 16px; }
.vt-top { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: center; }
.vt-year { font-family: var(--display); font-weight: 700; font-size: 1.15rem; color: var(--era); }
.vt-era { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: #fff; background: var(--era); padding: 2px 8px; border-radius: 999px; }
.vt-era.legend-era { background: #9b8b78; }
.vt-card h3 { margin: 6px 0 4px; font-size: 1.2rem; }
.vt-card p { margin: 0; color: var(--ink-2); }

.hist-filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0 0 20px; }
.hist-filters select { padding: 9px 12px; border: 1px solid var(--line-2); border-radius: 999px; font: inherit; background: var(--paper); max-width: 100%; }
.cent-chart { display: flex; align-items: flex-end; gap: 3px; height: 160px; overflow-x: auto; padding-bottom: 22px; }
.cent-bar { flex: 1 0 22px; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; text-decoration: none; position: relative; }
.cent-bar i { display: block; width: 100%; border-radius: 4px 4px 0 0; transition: filter .2s; }
.cent-bar:hover i { filter: brightness(1.15); }
.cent-bar span { position: absolute; bottom: -20px; font-size: .62rem; color: var(--muted); }
.hist-river { position: relative; }
.cent-group { margin: 0 0 26px; padding-left: 18px; border-left: 3px solid var(--era); }
.cent-title { display: flex; align-items: baseline; gap: 12px; font-size: 1.6rem; margin-bottom: 12px; }
.cent-title small { font-family: var(--text); font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--era); }
.cent-events { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.h-event { display: flex; flex-direction: column; gap: 3px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; text-decoration: none; color: var(--ink); transition: transform .2s, box-shadow .2s; min-width: 0; }
.h-event:hover { transform: translateY(-2px); box-shadow: var(--shadow-1); color: var(--ink); }
.h-year { font-family: var(--display); font-weight: 700; color: var(--maroon-2); }
.h-temple { font-size: .8rem; color: var(--muted); }
.legends-fold { margin-top: 10px; }
.legends-fold .cent-events { padding-bottom: 12px; }
@media (max-width: 760px) {
  .era-ribbon { grid-template-columns: repeat(7, 74px); overflow-x: auto; padding-bottom: 6px; }
  .glance { grid-template-columns: 1fr 1fr; }
  .cent-events { grid-template-columns: minmax(0, 1fr); }
  .cent-title { font-size: 1.35rem; flex-wrap: wrap; }
  .vtimeline li { padding-left: 32px; }
}

/* ── Language picker ────────────────────────────────── */
.lang { position: relative; flex-shrink: 0; }
.lang-btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line-2); background: var(--paper); color: var(--maroon); border-radius: 999px; padding: 8px 12px; font: inherit; font-weight: 700; font-size: .82rem; cursor: pointer; }
.lang-btn .i { width: 18px; height: 18px; }
.lang-menu { position: fixed; z-index: 80; width: 300px; max-width: calc(100vw - 24px); background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow-2); padding: 8px; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.lang-menu[hidden] { display: none; }
.lang-menu button { display: flex; flex-direction: column; align-items: flex-start; border: 0; background: none; padding: 8px 10px; border-radius: 8px; cursor: pointer; font: inherit; text-align: left; }
.lang-menu button:hover { background: var(--gold-soft); }
.lang-menu button[aria-current="true"] { background: var(--maroon); color: #fff; }
.lang-menu button[aria-current="true"] span { color: rgba(255,255,255,.8); }
.lang-menu strong { font-size: 1rem; }
.lang-menu span { font-size: .72rem; color: var(--muted); }
.lang-note { grid-column: 1 / -1; font-size: .74rem; color: var(--muted); margin: 6px 4px 2px; }
/* Hide Google's translate toolbar and tooltips; keep the page from shifting down */
iframe.skiptranslate, .goog-te-banner-frame, #goog-gt-tt, .goog-te-balloon-frame, .VIpgJd-ZVi9od-ORHb-OEVmcd, .VIpgJd-ZVi9od-aZ2wEe-wOHMyf { display: none !important; }
body { top: 0 !important; }
font[style] { background: none !important; box-shadow: none !important; }
@media (max-width: 760px) {
  .lang { margin-left: auto; }
  .menu-btn { margin-left: 4px; }
  .lang-btn { padding: 7px 10px; }
}

/* ── Near me & festivals strip ──────────────────────── */
.near-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.near-item { display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; column-gap: 12px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; text-decoration: none; color: var(--ink); min-width: 0; }
.near-item:hover { border-color: var(--gold); color: var(--ink); }
.near-item strong { grid-column: 1; }
.near-item span { grid-column: 1; font-size: .82rem; color: var(--muted); }
.near-item em { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-style: normal; font-weight: 700; color: var(--maroon-2); white-space: nowrap; font-size: .88rem; }
.me-pin { background: #2563eb; border: 3px solid #fff; border-radius: 50%; box-shadow: 0 0 0 6px rgba(37, 99, 235, .25); }
.fest-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
.fest-card { display: flex; flex-direction: column; gap: 4px; background: linear-gradient(160deg, #fff7e6, var(--paper)); border: 1px solid #f0dcaa; border-radius: var(--radius); padding: 16px; text-decoration: none; color: var(--ink); }
.fest-card:hover { color: var(--ink); box-shadow: var(--shadow-1); }
.fest-when { font-size: .74rem; font-weight: 700; color: var(--saffron); text-transform: uppercase; letter-spacing: .06em; display: flex; gap: 6px; align-items: center; }
.fest-card strong { font-family: var(--display); font-size: 1.25rem; line-height: 1.15; }
.fest-card > span:last-child { font-size: .84rem; color: var(--muted); }
@media (max-width: 760px) {
  .near-list { grid-template-columns: minmax(0, 1fr); }
  .fest-row { grid-auto-columns: 72%; margin: 0 -16px; padding: 0 16px 6px; }
}

/* ── Gallery & lightbox ─────────────────────────────── */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 140px; gap: 8px; }
.g-item { border: 0; padding: 0; border-radius: 10px; overflow: hidden; cursor: zoom-in; background: var(--paper-2); }
.g-item.wide { grid-column: span 2; grid-row: span 2; }
.g-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.g-item:hover img { transform: scale(1.05); }
.no-scroll { overflow: hidden; }
.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(20, 8, 4, .94); display: grid; place-items: center; padding: 20px; }
.lightbox figure { margin: 0; max-width: min(1100px, 100%); max-height: 100%; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.lightbox img { max-width: 100%; max-height: 78vh; object-fit: contain; border-radius: 8px; }
.lightbox figcaption { color: rgba(255,255,255,.9); text-align: center; font-size: .9rem; max-width: 760px; }
.lightbox figcaption strong { display: block; font-weight: 500; margin-bottom: 4px; }
.lightbox figcaption span { font-size: .78rem; opacity: .75; }
.lightbox figcaption a { color: var(--gold-2); }
.lightbox button { position: absolute; border: 0; background: rgba(255,255,255,.12); color: #fff; width: 48px; height: 48px; border-radius: 50%; font-size: 1.6rem; cursor: pointer; }
.lightbox button:hover { background: rgba(255,255,255,.25); }
.lb-close { top: 16px; right: 16px; font-size: 1.1rem !important; }
.lb-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 16px; top: 50%; transform: translateY(-50%); }

/* ── Darshan route & customs ────────────────────────── */
.route-hero .eyebrow { margin-bottom: 8px; }
.route-time { display: flex; gap: 8px; align-items: center; color: var(--ink-2); }
.route-time .i { color: var(--gold); }
.stepper { list-style: none; padding: 0 !important; margin: 18px 0 0; position: relative; }
.stepper::before { content: ""; position: absolute; left: 19px; top: 10px; bottom: 10px; width: 2px; background: repeating-linear-gradient(var(--gold) 0 6px, transparent 6px 12px); }
.stepper li { position: relative; display: flex; gap: 16px; padding: 0 0 20px; margin: 0 !important; }
.step-n { position: relative; z-index: 1; flex: 0 0 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--maroon); color: var(--gold-2); font-family: var(--display); font-weight: 700; font-size: 1.25rem; box-shadow: 0 0 0 4px var(--paper); }
.stepper li > div { flex: 1; min-width: 0; padding-top: 4px; }
.step-tag { display: inline-block; font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--saffron); margin-bottom: 2px; }
.stepper h3 { margin: 0 0 4px; font-size: 1.2rem; }
.stepper p { margin: 0; color: var(--ink-2); }
.dodont { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.dodont > div { border-radius: var(--radius-sm); padding: 14px 16px; }
.dodont h3 { margin: 0 0 8px; font-size: 1.15rem; display: flex; gap: 6px; align-items: center; }
.do { background: #eef7f1; border: 1px solid #cfe3d6; }
.do h3 { color: var(--good); }
.dont { background: #fbefec; border: 1px solid #f0d2cb; }
.dont h3 { color: var(--bad); }
.customs { display: grid; gap: 12px; }
.custom { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 18px 8px; background: var(--bg); }
.custom h3 { margin: 0 0 6px; display: flex; gap: 8px; align-items: center; color: var(--maroon); }
.custom h3 .i { color: var(--saffron); }
@media (max-width: 760px) {
  .gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 120px; }
  .dodont { grid-template-columns: minmax(0, 1fr); }
  .lb-prev, .lb-next { top: auto; bottom: 20px; transform: none; }
}
.why-card { background: linear-gradient(160deg, #fff7e6, var(--paper) 70%); border-color: #f0dcaa; }
.why-card .eyebrow { margin-bottom: 10px; }
.why-card p:first-of-type { font-size: 1.06rem; color: var(--ink-2); }

/* ── Festival calendar ──────────────────────────────── */
.fest-filters { justify-content: center; }
.year-strip { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 6px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 14px 12px; box-shadow: var(--shadow-1); position: sticky; top: 104px; z-index: 15; }
.ys-month { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; text-decoration: none; color: var(--ink); padding: 4px 0; border-radius: 10px; }
.ys-month:hover { background: var(--gold-soft); color: var(--ink); }
.ys-month.now .ys-name { color: var(--maroon); font-weight: 800; }
.ys-month.empty { opacity: .45; }
.ys-name { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.ys-bar { width: 60%; height: 54px; display: flex; align-items: flex-end; background: var(--paper-2); border-radius: 6px; overflow: hidden; }
.ys-bar i { display: block; width: 100%; background: linear-gradient(var(--saffron), var(--maroon)); border-radius: 6px 6px 0 0; }
.ys-count { font-family: var(--display); font-weight: 700; font-size: 1.05rem; color: var(--maroon); line-height: 1; }
.ys-year { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); font-size: .62rem; font-weight: 800; color: #fff; background: var(--gold); padding: 1px 6px; border-radius: 999px; }
.fest-legend { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; font-size: .82rem; color: var(--muted); margin: 12px 0 8px; }
.fest-legend span { display: inline-flex; gap: 6px; align-items: center; }
.lg { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.lg.exact { background: var(--maroon); }
.lg.lunar { background: var(--gold-soft); border: 1px solid var(--gold); }
.fmonth { margin-top: 34px; }
.fmonth-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; border-bottom: 2px solid var(--gold-2); padding-bottom: 8px; margin-bottom: 14px; }
.fmonth-head h2 { margin: 0; font-size: 2rem; }
.fmonth-head h2 span { color: var(--gold); font-weight: 500; }
.fgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; }
.fcard { display: flex; gap: 14px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px; box-shadow: var(--shadow-1); min-width: 0; }
.fdate { flex: 0 0 64px; height: 72px; border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; background: var(--gold-soft); border: 1px solid #eedcb0; color: var(--maroon); }
.fdate .i { width: 20px; height: 20px; color: var(--gold); }
.fdate strong { font-family: var(--display); font-size: 1.8rem; line-height: 1; }
.fdate span { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.fdate small { font-size: .62rem; color: var(--muted); }
.fcard.exact .fdate { background: linear-gradient(160deg, var(--maroon-2), var(--maroon)); border: 0; color: #fff; }
.fcard.exact .fdate small { color: var(--gold-2); }
.fbody { flex: 1; min-width: 0; }
.fbody h3 { margin: 0 0 4px; font-size: 1.25rem; }
.ftemple { display: block; font-size: .85rem; font-weight: 600; text-decoration: none; }
.ftemple .i { margin-right: 2px; }
.ftemple span { color: var(--muted); font-weight: 400; }
.fwhen { display: block; font-size: .78rem; color: var(--saffron); font-weight: 600; margin-top: 2px; }
.fbody p { font-size: .9rem; color: var(--ink-2); margin: 6px 0 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.factions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.btn.sm { padding: 6px 12px; font-size: .78rem; }
@media (max-width: 760px) {
  .year-strip { grid-template-columns: repeat(12, 52px); overflow-x: auto; position: static; padding-top: 18px; }
  .fgrid { grid-template-columns: minmax(0, 1fr); }
  .fmonth-head h2 { font-size: 1.6rem; }
}

/* ══ Mobile polish ══════════════════════════════════ */
html { -webkit-text-size-adjust: 100%; }
body { -webkit-tap-highlight-color: rgba(110, 29, 23, .12); }
.topbar { transition: transform .25s ease; padding-top: env(safe-area-inset-top); }
.nav-backdrop { position: fixed; inset: 0; z-index: 45; background: rgba(30, 12, 6, .45); backdrop-filter: blur(2px); }
.nav-backdrop[hidden] { display: none; }
.map { position: relative; }
.map-locked::after {
  content: "Tap the map to move it"; position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); z-index: 500;
  background: rgba(42, 26, 18, .78); color: #fff; font-size: .74rem; font-weight: 600; padding: 5px 10px; border-radius: 999px; pointer-events: none;
}

@media (max-width: 760px) {
  /* Header slides away on scroll down; sticky bars sit right under it */
  body.hdr-hidden .topbar { transform: translateY(-100%); }
  .tabs { position: sticky; top: var(--hdr-h, 0px); transition: top .25s ease; z-index: 20; }
  body.hdr-hidden .tabs { top: 0; }
  .az-bar { position: sticky; top: var(--hdr-h, 0px); transition: top .25s ease; }
  body.hdr-hidden .az-bar { top: 0; }
  .year-strip { position: sticky; top: var(--hdr-h, 0px); transition: top .25s ease; }
  body.hdr-hidden .year-strip { top: 0; }
  html { scroll-padding-top: calc(var(--hdr-h, 110px) + 50px); }

  /* Menu as a sheet */
  .nav { position: absolute; left: 0; right: 0; top: 100%; background: var(--paper); border-bottom: 1px solid var(--line); box-shadow: 0 18px 40px rgba(30, 12, 6, .18); border-radius: 0 0 20px 20px; max-height: calc(100vh - 140px); overflow-y: auto; padding: 6px 12px 14px; }
  .nav a { display: flex; justify-content: space-between; align-items: center; padding: 14px 8px; font-size: 1rem; border-bottom: 1px solid var(--line); border-left: 0; min-height: 48px; }
  .nav a::after { content: "›"; color: var(--gold); font-size: 1.3rem; }
  .nav a:last-child { border-bottom: 0; }
  .nav a.active { color: var(--maroon); background: var(--gold-soft); border-radius: 10px; }
  .menu-btn { width: 44px; height: 44px; place-content: center; }
  .lang-btn { min-height: 40px; }
  .lang-menu { position: fixed; left: 12px !important; right: 12px !important; top: auto !important; bottom: calc(76px + env(safe-area-inset-bottom)); width: auto; max-width: none; grid-template-columns: repeat(3, 1fr); z-index: 90; box-shadow: 0 -10px 40px rgba(30, 12, 6, .25); }

  /* Bottom bar respects the iPhone home indicator */
  .bottom-nav { padding-bottom: calc(6px + env(safe-area-inset-bottom)); }
  .bottom-nav a { min-height: 48px; justify-content: center; }
  .bottom-nav a:active { transform: scale(.94); }

  /* 16px form text stops iOS zooming in; comfortable tap targets */
  input, select, textarea { font-size: 16px !important; }
  .chip { min-height: 40px; padding: 8px 14px; }
  .az-bar a { min-width: 40px; height: 40px; }
  .btn { min-height: 44px; }
  .btn.sm { min-height: 36px; }
  .icon-btn { width: 40px; height: 40px; }
  .seva summary, .faq summary, .state-fold summary { min-height: 48px; }

  /* Filters: equal-width pairs */
  .hist-filters, .fest-filters { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .hist-filters select, .fest-filters select { width: 100%; min-width: 0; }
  .hist-filters .muted, .hist-filters .chip, .fest-filters .chip { grid-column: 1 / -1; justify-self: start; }
  .fest-legend { gap: 6px 14px; }

  /* Home tiles keep the page margin while swiping */
  .tiles { scroll-padding-inline: 16px; }
  .tile:first-child { margin-left: 0; }

  /* Tables become cards */
  .safety-table, .safety-table tbody, .safety-table tr, .safety-table td { display: block; }
  .safety-table tr:first-child { display: none; }
  .safety-table tr { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px 6px; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .safety-table td { border: 0; padding: 0; text-align: center; }
  .safety-table td:first-child { grid-column: 1 / -1; text-align: left; }
  .safety-table td:nth-child(2):not([data-label]) { grid-column: 1 / -1; text-align: left; font-size: .85rem; color: var(--ink-2); margin-bottom: 4px; }
  .safety-table td[data-label]::before { content: attr(data-label); display: block; font-size: .62rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: 3px; }
  .safety-table td small { display: inline; margin-left: 4px; }
  .book-table, .book-table tbody, .book-table tr, .book-table td { display: block; }
  .book-table tr:first-child { display: none; }
  .book-table tr { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .book-table td { border: 0; padding: 2px 0; }
  .book-table td[data-label]::before { content: attr(data-label) ": "; font-size: .78rem; color: var(--muted); }
  .book-table td[data-label] small { display: inline; margin-left: 4px; }

  /* Readable line lengths and spacing */
  .section p, .section li { line-height: 1.6; }
  .hero-photo h1, .home-hero h1 { overflow-wrap: anywhere; }
  .page-head h1 { font-size: 1.9rem; }
  .lightbox { padding: 12px; }
  .lightbox img { max-height: 62vh; }
}
@media (max-width: 370px) {
  .brand-text { font-size: 1.2rem; }
  .lang-btn span { display: none; }
  .hist-filters, .fest-filters { grid-template-columns: 1fr; }
  .lang-menu { grid-template-columns: repeat(2, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* ── Accounts: sign-in, My account, admin ── */
.acct-btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line-2); background: var(--paper); color: var(--maroon); border-radius: 999px; padding: 7px 12px; font-weight: 700; font-size: .82rem; text-decoration: none; min-height: 36px; }
.acct-btn .i { width: 18px; height: 18px; }
.acct-btn:has(.avatar) { padding: 3px; border-color: var(--gold); }
.avatar { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--maroon); color: #fff; font-weight: 700; font-size: .9rem; }
@media (max-width: 760px) { .acct-label { display: none; } .acct-btn { padding: 7px 9px; min-height: 40px; } }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--maroon-2); text-decoration: underline; cursor: pointer; }

.modal-wrap { position: fixed; inset: 0; z-index: 3000; background: rgba(30, 12, 6, .45); display: grid; place-items: center; padding: 16px; animation: fade .15s ease; }
.modal { position: relative; width: min(440px, 100%); max-height: calc(100dvh - 32px); overflow: auto; background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow-2); padding: 28px 24px 22px; }
.modal h2 { font-family: var(--display); color: var(--maroon); margin: 0 0 6px; font-size: 1.7rem; }
.modal-x { position: absolute; top: 10px; right: 10px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--paper-2); color: var(--ink-2); cursor: pointer; font-size: 1rem; }
@keyframes fade { from { opacity: 0; } }
@media (max-width: 760px) {
  .modal-wrap { place-items: end stretch; padding: 0; }
  .modal { width: 100%; border-radius: var(--radius) var(--radius) 0 0; padding-bottom: calc(22px + env(safe-area-inset-bottom)); max-height: 92dvh; }
}

.signin { text-align: center; }
.signin .brand-mark { display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--gold-soft); color: var(--maroon); font-size: 1.6rem; margin-bottom: 6px; }
.signin h2 { font-family: var(--display); color: var(--maroon); font-size: 1.8rem; margin: 0 0 4px; }
.signin-reason { color: var(--ink-2); margin: 0 0 8px; }
.signin-why { list-style: none; padding: 0; margin: 14px auto 18px; display: grid; gap: 8px; text-align: left; max-width: 320px; }
.signin-why li { display: flex; gap: 10px; align-items: center; color: var(--ink-2); font-size: .92rem; }
.signin-why .i { color: var(--saffron); width: 18px; height: 18px; flex: none; }
.signin form, .modal form, .aside form { display: grid; gap: 8px; text-align: left; }
.signin label, .modal label, .aside label { font-size: .8rem; font-weight: 700; color: var(--ink-2); }
.signin input, .modal textarea, .aside input, .report textarea { width: 100%; box-sizing: border-box; font: inherit; font-size: 16px; padding: 11px 12px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: #fff; color: var(--ink); }
.signin input:focus, .modal textarea:focus, .aside input:focus, .report textarea:focus { outline: 2px solid var(--gold-2); border-color: var(--gold); }
.signin .btn, .modal form .btn { justify-content: center; width: 100%; min-height: 46px; }
.btn.google { background: #fff; border: 1px solid var(--line-2); color: var(--ink); font-weight: 600; }
.btn.google .i { width: 18px; height: 18px; }
.or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .8rem; margin: 14px 0; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.signin-msg { min-height: 1.2em; font-size: .9rem; margin: 6px 0 0; }
.signin-msg.ok { color: var(--good); }
.signin-msg.err { color: var(--bad); }
.section.narrow { max-width: 480px; margin-inline: auto; }

.status { display: inline-block; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 2px 8px; border-radius: 999px; vertical-align: middle; }
.s-open { background: #fdf0d8; color: var(--ok); }
.s-resolved { background: #e3f2e8; color: var(--good); }
.s-rejected { background: var(--paper-2); color: var(--muted); }
.report-mini { border-top: 1px solid var(--line); padding: 12px 0; }
.report-mini > div { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.report-mini small { color: var(--muted); margin-left: auto; }
.report-mini p { margin: 6px 0 0; color: var(--ink-2); white-space: pre-wrap; overflow-wrap: anywhere; }
.admin-reply { background: var(--gold-soft); border-radius: 8px; padding: 8px 10px; font-size: .9rem; }
.admin-reply .i { width: 16px; height: 16px; color: var(--good); vertical-align: -3px; }
.aside > .btn { width: 100%; justify-content: center; margin-top: 10px; }

.stat-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; max-width: var(--max); margin: 0 auto 8px; padding: 0 20px; }
.stat { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px; box-shadow: var(--shadow-1); }
.stat strong { display: block; font-family: var(--display); font-size: 2rem; color: var(--maroon); line-height: 1; }
.stat span { color: var(--muted); font-size: .82rem; }
@media (max-width: 760px) { .stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 0 16px; } }
.report { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px; margin-top: 12px; background: #fff; }
.report header { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px; align-items: baseline; }
.report header > div { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; min-width: 0; }
.report header small { color: var(--muted); }
.report-msg { white-space: pre-wrap; overflow-wrap: anywhere; margin: 10px 0; }
.report textarea { font-size: 15px; margin: 4px 0 10px; }
.user-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.user-row > div { min-width: 0; }
.user-row strong, .user-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-row small { color: var(--muted); font-size: .78rem; }

/* ── Profile ── */
.avatar.lg { width: 56px; height: 56px; font-size: 1.5rem; flex: none; }
.profile-top { display: flex; align-items: center; gap: 14px; }
.profile-top > div { flex: 1; min-width: 0; }
.profile-top h2 { margin: 0; overflow-wrap: anywhere; }
.profile-top p { margin: 2px 0 0; }
.profile-top .i { width: 16px; height: 16px; vertical-align: -3px; }
.profile-bio { margin: 14px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.profile-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(130px, 40%), 1fr)); gap: 10px 16px; margin: 16px 0 6px; }
.profile-facts dt, .my-seva dt { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.profile-facts dd, .my-seva dd { margin: 2px 0 0; font-weight: 600; overflow-wrap: anywhere; }
.profile-card .chips { margin-top: 12px; }
.meter { height: 8px; border-radius: 999px; background: var(--paper-2); overflow: hidden; margin: 16px 0 6px; }
.meter span { display: block; height: 100%; background: linear-gradient(90deg, var(--saffron), var(--gold)); border-radius: inherit; }

.profile-form { max-width: 860px; margin: 0 auto; padding: 0 20px 40px; display: grid; gap: 16px; }
.profile-form fieldset { border: 1px solid var(--line); margin: 0; min-width: 0; display: grid; gap: 12px; }
.profile-form legend { font-family: var(--display); font-size: 1.5rem; font-weight: 600; color: var(--maroon); padding: 0 6px; }
.profile-form label, .field-label { display: grid; gap: 6px; font-size: .82rem; font-weight: 700; color: var(--ink-2); margin: 0; }
.field-label { margin-top: 6px; }
.profile-form input:not([type=checkbox]):not([type=radio]), .profile-form select, .profile-form textarea { width: 100%; box-sizing: border-box; font: inherit; font-size: 16px; font-weight: 400; padding: 11px 12px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: #fff; color: var(--ink); }
.profile-form input:focus, .profile-form select:focus, .profile-form textarea:focus { outline: 2px solid var(--gold-2); border-color: var(--gold); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
@media (max-width: 760px) { .form-grid { grid-template-columns: minmax(0, 1fr); } .profile-form { padding: 0 16px 32px; } }
.check-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.check-chip { position: relative; display: inline-flex !important; cursor: pointer; }
.check-chip input { position: absolute; opacity: 0; pointer-events: none; }
.check-chip span { display: inline-block; padding: 9px 14px; min-height: 20px; border: 1px solid var(--line-2); border-radius: 999px; background: #fff; font-weight: 600; font-size: .85rem; color: var(--ink-2); }
.check-chip input:checked + span { background: var(--maroon); border-color: var(--maroon); color: #fff; }
.check-chip input:focus-visible + span { outline: 2px solid var(--gold-2); outline-offset: 2px; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; position: sticky; bottom: 0; background: var(--bg); padding: 12px 0 calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
@media (max-width: 760px) { .form-actions { bottom: calc(64px + env(safe-area-inset-bottom)); } .form-actions .btn { flex: 1; justify-content: center; } }
.form-actions .signin-msg { flex-basis: 100%; margin: 0; }

.my-seva { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; background: var(--gold-soft); border: 1px solid var(--gold-2); border-radius: var(--radius-sm); padding: 14px 16px; margin: 0 0 16px; }
.my-seva strong .i, .my-seva p .i { width: 18px; height: 18px; vertical-align: -4px; color: var(--maroon); }
.my-seva dl { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 8px 0 0; }
.my-seva p { margin: 0; }
.mode-card.mine { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold-2); }
.mine-tag { margin-left: auto; background: var(--gold-soft); color: var(--maroon); }
.my-needs { border-left: 4px solid var(--gold); }
.my-needs h2 .i { width: 20px; height: 20px; vertical-align: -3px; color: var(--gold); }
.my-needs ul { padding-left: 18px; }
.my-needs li { margin: 6px 0; }

/* ── Contact details ── */
.req { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--saffron); margin-left: 4px; }
.inline-check { display: flex !important; flex-direction: row !important; align-items: flex-start; gap: 10px; font-weight: 500 !important; font-size: .9rem !important; color: var(--ink-2); cursor: pointer; }
.inline-check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--maroon); flex: none; }
.inline-check.consent { background: var(--gold-soft); border-radius: var(--radius-sm); padding: 12px; }
.wa-field[hidden] { display: none !important; }
.signin [data-contact-form] input[type=tel] { font-size: 16px; }
.user-row small a { color: var(--maroon-2); }
.stat-row { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }

/* ── Temple boards ── */
.narrow-wide { max-width: 860px; margin-inline: auto; }
.board-tools { max-width: var(--max); margin: 0 auto 14px; padding: 0 20px; display: grid; gap: 12px; }
.board-tools input { width: 100%; box-sizing: border-box; font: inherit; font-size: 16px; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--paper); }
.board-list { max-width: var(--max); margin: 0 auto 40px; padding: 0 20px; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr)); gap: 12px; }
.board-card { display: flex; align-items: center; gap: 14px; padding: 16px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow-1); color: inherit; text-decoration: none; transition: transform .15s, box-shadow .15s; min-width: 0; }
.board-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.board-card .grow { min-width: 0; display: grid; gap: 2px; }
.board-card strong { font-size: 1rem; color: var(--ink); }
.board-card .muted { font-size: .82rem; }
.board-scale { font-size: .8rem; color: var(--maroon-2); font-weight: 600; }
.board-badge { flex: none; min-width: 52px; height: 52px; padding: 0 8px; box-sizing: border-box; border-radius: 14px; display: grid; place-items: center; background: linear-gradient(135deg, var(--maroon), var(--maroon-2)); color: var(--gold-2); font-weight: 800; font-size: .78rem; letter-spacing: .02em; text-align: center; line-height: 1.1; }
.board-n { flex: none; text-align: center; font-size: .7rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.board-n strong { display: block; font-family: var(--display); font-size: 1.6rem; color: var(--maroon); letter-spacing: 0; text-transform: none; }
.board-temples { list-style: none; padding: 0; margin: 0; }
.board-temple { border-top: 1px solid var(--line); padding: 12px 0; }
.board-temple .grow { min-width: 0; }
.board-temple p { margin: 4px 0 0; color: var(--ink-2); font-size: .92rem; }
.board-temple a strong { color: var(--maroon); }
.board-state { margin: 18px 0 4px; font-size: 1.05rem; }
.board-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; padding: 8px 14px; border-radius: 999px; background: var(--gold-soft); color: var(--maroon); font-weight: 700; font-size: .88rem; text-decoration: none; }
.board-link .i { width: 16px; height: 16px; }
.chips-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips-list li { padding: 7px 12px; border-radius: 999px; background: var(--paper-2); font-size: .88rem; }
.btn.light.ghost-light { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.6); margin-top: 8px; }
.helpline { margin: 12px 0 0; font-size: .9rem; }
.helpline .i { width: 16px; height: 16px; vertical-align: -3px; }
@media (max-width: 760px) { .board-tools, .board-list { padding: 0 16px; } .board-card { padding: 14px; gap: 12px; } .board-badge { min-width: 46px; height: 46px; } }
@media (max-width: 760px) { .narrow-wide .lead { font-size: 1rem; line-height: 1.6; } }
