/* ==========================================================================
   SRI CHAITANYA MAHAPRABHU - BHAKTI SANCTUARY
   UI Architecture based on Template (Swiggy Curved Tabs, 3D Flip Tiles,
   Universal Search, Quick Nav Drawer & Chrome PWA Install Modals)
   ========================================================================== */

:root {
  --bg-base: #f8fafc;
  --bg-surface: #ffffff;
  --bg-card: #ffffff;
  --bg-alt: #f1f5f9;
  --border-card: rgba(226, 232, 240, 0.95);

  --gold-primary: #d97706;
  --gold-bright: #f59e0b;
  --gold-dark: #b45309;
  --gold-glow: rgba(245, 158, 11, 0.28);

  --text-main: #0f172a;
  --text-muted: #334155;
  --text-dim: #64748b;

  --bg-gradient:
    radial-gradient(circle at 12% 14%, rgba(245, 158, 11, 0.10) 0%, transparent 45%),
    radial-gradient(circle at 88% 20%, rgba(14, 165, 233, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 50% 55%, rgba(217, 119, 6, 0.06) 0%, transparent 48%),
    radial-gradient(circle at 78% 85%, rgba(244, 63, 94, 0.06) 0%, transparent 42%),
    linear-gradient(180deg, #fffdf8 0%, #f8fafc 45%, #edf2f7 100%);

  --font-heading: 'Cinzel', Georgia, serif;
  --font-body: 'Plus Jakarta Sans', 'Noto Sans Tamil', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-tamil: 'Noto Sans Tamil', 'Plus Jakarta Sans', sans-serif;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 10px 25px rgba(15, 23, 42, 0.07);
  --shadow-lg: 0 18px 45px rgba(15, 23, 42, 0.10);
}

body.theme-dark {
  --bg-base: #070d1e;
  --bg-surface: #0f172a;
  --bg-card: #111e38;
  --bg-alt: #0b1428;
  --border-card: rgba(245, 158, 11, 0.24);
  --text-main: #f8fafc;
  --text-muted: #cbd5e1;
  --text-dim: #94a3b8;
  --bg-gradient:
    radial-gradient(circle at 12% 14%, rgba(245, 158, 11, 0.14) 0%, transparent 45%),
    radial-gradient(circle at 88% 20%, rgba(14, 165, 233, 0.10) 0%, transparent 40%),
    linear-gradient(180deg, #070d1e 0%, #0c1630 50%, #050a17 100%);
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 10px 28px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 20px 45px rgba(0, 0, 0, 0.65);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
  font-size: 16px;
  overflow-x: clip;
}

body {
  font-family: var(--font-body);
  background: var(--bg-base);
  background-image: var(--bg-gradient);
  background-attachment: fixed;
  color: var(--text-main);
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: clip;
}

.tamil-text { font-family: var(--font-tamil); }
.hidden { display: none !important; }
.text-center { text-align: center; }
.text-amber { color: var(--gold-bright); }
.text-danger { color: #dc2626 !important; }
.container { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 1.25rem; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.7rem 1.3rem; font-size: 0.92rem; font-weight: 700;
  border-radius: var(--radius-md); cursor: pointer; border: 1px solid transparent;
  transition: all 0.22s ease; text-decoration: none; white-space: nowrap; font-family: inherit;
}
.btn-primary {
  background: linear-gradient(135deg, #f59e0b, #d97706); color: #ffffff;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.32);
}
.btn-primary:hover { background: linear-gradient(135deg, #fbbf24, #f59e0b); transform: translateY(-2px); }
.btn-secondary { background: var(--bg-card); color: var(--text-main); border-color: #cbd5e1; box-shadow: var(--shadow-sm); }
.btn-secondary:hover { border-color: var(--gold-bright); transform: translateY(-2px); }
.btn-outline { background: var(--bg-card); color: var(--gold-dark); border: 1.5px solid rgba(245, 158, 11, 0.48); }
body.theme-dark .btn-outline { color: #fbbf24; }
.btn-outline:hover { background: rgba(245, 158, 11, 0.12); transform: translateY(-1px); }
.btn-gold { background: #fbbf24; color: #0f172a; font-weight: 800; }
.btn-install-hero { background: linear-gradient(135deg, #1e3a8a, #0f172a); color: #ffffff; }
.btn-install-hero:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(30, 58, 138, 0.35); }
.btn-lg { padding: 0.85rem 1.45rem; font-size: 0.98rem; }
.btn-sm { padding: 0.45rem 0.9rem; font-size: 0.82rem; border-radius: 10px; }
.shadow-glow { box-shadow: 0 6px 24px rgba(245, 158, 11, 0.35); }

/* Offline Indicator */
#offline-indicator {
  background: #0f172a; color: #fde68a; text-align: center; padding: 0.45rem 1rem;
  font-size: 0.82rem; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 0.5rem;
}

/* ==========================================================================
   MAIN NAVBAR (Swiggy-Style Curved Tabs + Universal Search + Actions)
   ========================================================================== */
.navbar {
  position: sticky; top: 0; z-index: 1000;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border-bottom: 1.5px solid var(--border-card);
  padding: 0.42rem 0 0.16rem 0;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
}
body.theme-dark .navbar { background: rgba(11, 20, 40, 0.94); }

.nav-container {
  display: flex; align-items: center; justify-content: space-between; gap: 0.65rem;
  max-width: 1560px !important; padding: 0 1rem;
}

.brand-identity { display: flex; align-items: center; gap: 0.65rem; flex-shrink: 0; text-decoration: none; }
.brand-crest img {
  width: 42px; height: 42px; border-radius: 12px; display: block;
  box-shadow: 0 3px 12px rgba(217, 119, 6, 0.35); border: 1.5px solid rgba(245, 158, 11, 0.6);
}
.brand-text { display: flex; flex-direction: column; }
.brand-acronym {
  font-family: var(--font-heading); font-weight: 800; font-size: 1.05rem;
  letter-spacing: 0.08em; color: var(--text-main); line-height: 1.15; white-space: nowrap;
}
.brand-sub { font-size: 0.7rem; color: var(--gold-dark); font-weight: 700; white-space: nowrap; }
body.theme-dark .brand-sub { color: #fbbf24; }

/* Universal Search Box with Marquee */
.universal-search-wrapper { position: relative; flex: 0 1 285px; min-width: 185px; }
.universal-search-box {
  display: flex; align-items: center; gap: 0.45rem; height: 38px;
  background: var(--bg-alt); border: 1.5px solid var(--border-card);
  border-radius: 999px; padding: 0 0.7rem; transition: all 0.2s ease;
}
.universal-search-box:focus-within { border-color: var(--gold-bright); box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.18); background: var(--bg-card); }
.universal-search-icon { color: var(--gold-dark); font-size: 0.85rem; }
.universal-search-field { position: relative; flex: 1; min-width: 0; height: 100%; display: flex; align-items: center; overflow: hidden; }
.universal-search-input {
  width: 100%; border: none; outline: none; background: transparent; color: var(--text-main);
  font-size: 0.84rem; font-weight: 600; position: relative; z-index: 2; font-family: inherit;
}
.universal-search-marquee {
  position: absolute; inset: 0; display: flex; align-items: center; overflow: hidden;
  pointer-events: none; z-index: 1; color: var(--text-dim); font-size: 0.78rem;
}
.universal-search-marquee.is-hidden { opacity: 0; }
.universal-search-marquee-track { display: flex; gap: 2rem; white-space: nowrap; animation: searchMarquee 18s linear infinite; }
@keyframes searchMarquee { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
.universal-search-clear { background: none; border: none; color: var(--text-dim); cursor: pointer; padding: 2px 4px; }
.universal-search-kbd {
  font-size: 0.68rem; font-weight: 700; padding: 1px 6px; border-radius: 5px;
  background: var(--bg-card); border: 1px solid var(--border-card); color: var(--text-dim);
}
.universal-search-dropdown {
  position: absolute; top: calc(100% + 8px); left: 0; width: min(440px, 92vw);
  max-height: 410px; overflow-y: auto; background: var(--bg-card);
  border: 1.5px solid rgba(245, 158, 11, 0.45); border-radius: 16px;
  box-shadow: var(--shadow-lg); z-index: 2000; padding: 0.5rem;
}
.search-res-item {
  display: flex; align-items: flex-start; gap: 0.65rem; padding: 0.6rem 0.75rem;
  border-radius: 10px; cursor: pointer; transition: background 0.15s; text-align: left; width: 100%; border: none; background: transparent; color: var(--text-main); font-family: inherit;
}
.search-res-item:hover { background: rgba(245, 158, 11, 0.12); }
.search-res-badge {
  font-size: 0.68rem; font-weight: 800; padding: 0.18rem 0.5rem; border-radius: 999px;
  background: rgba(245, 158, 11, 0.15); color: var(--gold-dark); white-space: nowrap;
}
body.theme-dark .search-res-badge { color: #fbbf24; }

/* Swiggy-Style Curved Tabs Strip */
/* Navbar Horizontal Scroll Container & Arrows */
.nav-tabs-scroller {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
  gap: 0.2rem;
}
.nav-scroll-arrow {
  flex: 0 0 auto;
  width: 26px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border-card);
  background: var(--bg-card);
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.72rem;
  transition: all 0.18s ease;
  box-shadow: var(--shadow-sm);
}
.nav-scroll-arrow:hover:not(:disabled) {
  background: rgba(245, 158, 11, 0.16);
  color: var(--gold-dark);
  border-color: rgba(245, 158, 11, 0.55);
}
.nav-scroll-arrow:disabled { opacity: 0.32; cursor: default; }
body.theme-dark .nav-scroll-arrow { background: #1e293b; color: #cbd5e1; border-color: #334155; }
body.theme-dark .nav-scroll-arrow:hover:not(:disabled) { color: #fbbf24; }

.swiggy-nav-tabs {
  display: flex; align-items: stretch; gap: 0.34rem; padding: 0.14rem 0.2rem;
  min-width: 0; flex: 1 1 auto; overflow-x: auto; overflow-y: hidden;
  scrollbar-width: thin; scrollbar-color: rgba(217, 119, 6, 0.45) transparent;
  cursor: grab; user-select: none; scroll-behavior: smooth;
}
.swiggy-nav-tabs::-webkit-scrollbar { height: 4px; }
.swiggy-nav-tabs::-webkit-scrollbar-thumb { background: rgba(217, 119, 6, 0.45); border-radius: 999px; }
.swiggy-nav-tabs::-webkit-scrollbar-track { background: transparent; }

.swiggy-tab {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 0.34rem 0.68rem 0.28rem 0.68rem; min-width: 66px; text-decoration: none;
  background: rgba(255, 255, 255, 0.78); border: 1px solid var(--border-card);
  border-radius: 14px 14px 10px 10px; transition: all 0.2s ease; cursor: pointer; flex-shrink: 0;
}
body.theme-dark .swiggy-tab { background: rgba(17, 30, 56, 0.85); }
.swiggy-tab:hover { transform: translateY(-2px); border-color: rgba(245, 158, 11, 0.55); box-shadow: var(--shadow-sm); }
.swiggy-tab.active {
  background: var(--bg-card); border-top: 3px solid var(--gold-bright);
  border-color: rgba(245, 158, 11, 0.65); box-shadow: 0 4px 14px rgba(245, 158, 11, 0.2);
}
.swiggy-tab.active .tab-text { color: var(--gold-dark); font-weight: 800; }
body.theme-dark .swiggy-tab.active .tab-text { color: #fbbf24; }

.swiggy-tab-menu {
  position: sticky; left: 0; z-index: 30;
  background: linear-gradient(180deg, #fffbeb 0%, #ffffff 100%);
  border: 1.5px solid rgba(245, 158, 11, 0.55);
  box-shadow: 4px 0 12px rgba(15, 23, 42, 0.08);
}
body.theme-dark .swiggy-tab-menu { background: #162340; }

.tab-icon-badge {
  width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem; margin-bottom: 0.16rem; box-shadow: 0 3px 8px rgba(0, 0, 0, 0.16); color: #ffffff;
}
.tab-text { font-size: 0.7rem; font-weight: 600; color: var(--text-muted); white-space: nowrap; }

.badge-menu { background: radial-gradient(circle at 30% 30%, #fef08a, #f59e0b 65%, #b45309); color: #0f172a; }
.badge-home { background: radial-gradient(circle at 30% 30%, #fcd34d, #d97706); color: #0f172a; }
.badge-mantra { background: radial-gradient(circle at 30% 30%, #fb923c, #c2410c); }
.badge-ekadasi { background: radial-gradient(circle at 30% 30%, #818cf8, #4338ca); }
.badge-tulasi { background: radial-gradient(circle at 30% 30%, #34d399, #047857); }
.badge-vigraha { background: radial-gradient(circle at 30% 30%, #f472b6, #be185d); }
.badge-sravanam { background: radial-gradient(circle at 30% 30%, #38bdf8, #0369a1); }
.badge-kirtanam { background: radial-gradient(circle at 30% 30%, #c084fc, #7e22ce); }
.badge-baladev { background: radial-gradient(circle at 30% 30%, #fbbf24, #b45309); }

/* Right Actions Group */
.nav-actions-group { display: flex; align-items: center; gap: 0.35rem; flex-shrink: 0; }
.nav-action-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 0.25rem 0.45rem; border-radius: 12px; border: 1px solid var(--border-card);
  background: var(--bg-card); cursor: pointer; transition: all 0.2s; min-width: 46px; font-family: inherit;
}
.nav-action-btn:hover { transform: translateY(-2px); border-color: var(--gold-bright); }
.action-icon-badge {
  width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem; margin-bottom: 2px; color: #ffffff;
}
.badge-japa-act { background: linear-gradient(135deg, #f59e0b, #d97706); }
.badge-wa-act { background: linear-gradient(135deg, #22c55e, #15803d); }
.badge-theme-act { background: linear-gradient(135deg, #334155, #0f172a); }
.install-icon-badge { background: linear-gradient(135deg, #2563eb, #1d4ed8); }
.action-btn-text, .install-text { font-size: 0.65rem; font-weight: 700; color: var(--text-main); white-space: nowrap; }
.btn-install-app { background: linear-gradient(135deg, #fffbeb, #fef3c7); border-color: rgba(245, 158, 11, 0.6); }
body.theme-dark .btn-install-app { background: #1e293b; }
.install-text-compact { display: none; }

/* Announcement & Darshan Marquee Bars */
.announcement-bar {
  background: linear-gradient(90deg, #fffbeb 0%, #fef3c7 50%, #fffbeb 100%);
  border-bottom: 1px solid rgba(245, 158, 11, 0.35); padding: 0.48rem 0; font-size: 0.84rem; color: #1e293b;
}
body.theme-dark .announcement-bar { background: linear-gradient(90deg, #1e1b4b, #312e81, #1e1b4b); color: #fef3c7; }
.announcement-content { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 0.65rem; text-align: center; }
.announcement-content .badge {
  background: var(--gold-dark); color: #ffffff; padding: 0.18rem 0.65rem;
  border-radius: 999px; font-size: 0.72rem; font-weight: 800;
}
.announcement-link { color: var(--gold-dark); font-weight: 800; }
body.theme-dark .announcement-link { color: #fde047; }
.announcement-wa-btn {
  background: #16a34a; color: #ffffff; border: none; border-radius: 999px; padding: 0.2rem 0.7rem;
  font-size: 0.76rem; font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; gap: 0.35rem;
}

.memories-top-marquee-bar {
  background: var(--bg-card); border-bottom: 1px solid var(--border-card); padding: 0.4rem 0.85rem;
}
.memories-marquee-container { max-width: 1520px; margin: 0 auto; display: flex; align-items: center; gap: 0.75rem; }
.memories-marquee-tag { display: flex; align-items: center; gap: 0.4rem; font-size: 0.74rem; font-weight: 800; color: var(--text-main); white-space: nowrap; }
.memories-live-dot { width: 8px; height: 8px; border-radius: 50%; background: #f59e0b; animation: pulseDot 1.6s infinite; }
@keyframes pulseDot { 0%,100%{transform:scale(1);opacity:1} 50%{transform:scale(1.4);opacity:0.5} }
.memories-marquee-track-wrapper { flex: 1; overflow: hidden; min-width: 0; }
.memories-marquee-track { display: flex; gap: 0.65rem; width: max-content; animation: darshanScroll 34s linear infinite; }
.memories-marquee-track-wrapper:hover .memories-marquee-track { animation-play-state: paused; }
@keyframes darshanScroll { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
.darshan-chip {
  display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.22rem 0.6rem 0.22rem 0.25rem;
  background: var(--bg-alt); border: 1px solid var(--border-card); border-radius: 999px; cursor: pointer;
  font-size: 0.76rem; font-weight: 700; color: var(--text-main); white-space: nowrap;
}
.darshan-chip img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; }
.btn-memories-marquee-cta {
  background: linear-gradient(135deg, #f59e0b, #d97706); color: #ffffff; border: none; border-radius: 999px;
  padding: 0.32rem 0.78rem; font-size: 0.76rem; font-weight: 700; cursor: pointer; white-space: nowrap;
}

/* ==========================================================================
   HERO & 3D INTERACTIVE FLIP TILES HUB (From Template)
   ========================================================================== */
.hero-section { padding: 2.5rem 0 3.2rem 0; }
.hero-grid { display: grid; grid-template-columns: 1.25fr 0.85fr; gap: 2rem; align-items: center; }
.hero-tag {
  display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.35rem 0.95rem;
  border-radius: 999px; background: rgba(245, 158, 11, 0.14); border: 1px solid rgba(245, 158, 11, 0.4);
  color: var(--gold-dark); font-size: 0.8rem; font-weight: 800; margin-bottom: 1rem;
}
body.theme-dark .hero-tag { color: #fde047; }
.hero-tag .dot { width: 8px; height: 8px; border-radius: 50%; background: #f59e0b; }
.hero-title {
  font-family: var(--font-heading); font-size: clamp(1.9rem, 3.6vw, 2.95rem);
  line-height: 1.15; margin-bottom: 0.9rem; color: var(--text-main);
}
.hero-title-accent {
  background: linear-gradient(135deg, #d97706, #b45309, #1e3a8a);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
body.theme-dark .hero-title-accent {
  background: linear-gradient(135deg, #fef08a, #f59e0b, #38bdf8);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.hero-subtitle { color: var(--text-muted); font-size: 1rem; margin-bottom: 1.4rem; max-width: 660px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-bottom: 1.6rem; }

.hero-stats {
  display: flex; flex-wrap: wrap; align-items: center; gap: 1.15rem; padding: 1rem 1.35rem;
  background: var(--bg-card); border: 1.5px solid var(--border-card); border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}
.stat-number { font-family: var(--font-heading); font-size: 1.28rem; font-weight: 800; color: var(--gold-dark); }
body.theme-dark .stat-number { color: #fbbf24; }
.stat-label { font-size: 0.75rem; font-weight: 600; color: var(--text-dim); }
.stat-divider { width: 1px; height: 32px; background: var(--border-card); }

.hero-darshan-frame {
  position: relative; border-radius: var(--radius-lg); overflow: hidden; cursor: pointer;
  border: 2.5px solid rgba(245, 158, 11, 0.6); box-shadow: var(--shadow-lg);
  background: #0f172a; max-height: 440px;
}
.hero-darshan-img { width: 100%; height: 420px; object-fit: cover; object-position: top center; display: block; transition: transform 0.4s ease; }
.hero-darshan-frame:hover .hero-darshan-img { transform: scale(1.03); }
.hero-darshan-caption {
  position: absolute; inset: auto 0 0 0; padding: 1.1rem;
  background: linear-gradient(180deg, transparent 0%, rgba(15, 23, 42, 0.92) 65%); color: #ffffff;
  display: flex; flex-direction: column; gap: 0.2rem;
}
.darshan-pill {
  align-self: flex-start; font-size: 0.68rem; font-weight: 800; background: #f59e0b; color: #0f172a;
  padding: 0.14rem 0.55rem; border-radius: 999px;
}
.hero-darshan-caption small { color: #cbd5e1; font-size: 0.74rem; }

/* 3D Flip Tiles Hub */
.home-swiggy-hub {
  margin-top: 2.2rem; padding: 1.4rem; background: var(--bg-card);
  border: 1.5px solid var(--border-card); border-radius: var(--radius-lg); box-shadow: var(--shadow-md);
}
.home-swiggy-hub-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.6rem; margin-bottom: 1.15rem; }
.home-swiggy-hub-badge {
  background: rgba(245, 158, 11, 0.14); color: var(--gold-dark); border: 1px solid rgba(245, 158, 11, 0.4);
  padding: 0.28rem 0.78rem; border-radius: 999px; font-size: 0.78rem; font-weight: 800;
}
body.theme-dark .home-swiggy-hub-badge { color: #fbbf24; }
.home-swiggy-hub-title { font-family: var(--font-heading); font-size: 1.3rem; }
.home-swiggy-hub-subtitle { font-size: 0.84rem; color: var(--text-dim); }

.quick-tiles-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.tile-flip-card { perspective: 1100px; height: 170px; cursor: pointer; }
.tile-flip-inner { position: relative; width: 100%; height: 100%; transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1); transform-style: preserve-3d; }
.tile-flip-card:hover .tile-flip-inner { transform: rotateY(180deg); }
.tile-face {
  position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  border-radius: 16px; padding: 1rem; display: flex; flex-direction: column; justify-content: space-between;
  border: 1.5px solid var(--border-card); background: var(--bg-surface); box-shadow: var(--shadow-sm);
}
.tile-front-header { display: flex; align-items: center; justify-content: space-between; gap: 0.4rem; }
.tile-front-icon {
  width: 38px; height: 38px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
  font-size: 1.05rem; background: rgba(245, 158, 11, 0.15); color: var(--gold-dark);
}
body.theme-dark .tile-front-icon { color: #fbbf24; }
.tile-front-badge { font-size: 0.66rem; font-weight: 800; padding: 0.16rem 0.5rem; border-radius: 999px; background: var(--bg-alt); color: var(--text-muted); }
.tile-flip-cue { font-size: 0.68rem; color: var(--text-dim); }
.tile-front-title { font-size: 0.98rem; font-weight: 800; margin-bottom: 0.2rem; color: var(--text-main); }
.tile-front-sub { font-size: 0.77rem; color: var(--text-dim); line-height: 1.35; }
.tile-back {
  transform: rotateY(180deg);
  background: linear-gradient(135deg, #7c2d12, #1e1b4b); color: #ffffff; border-color: rgba(251, 191, 36, 0.6);
}
.tile-back-category { font-size: 0.72rem; font-weight: 800; color: #fde047; }
.tile-back-desc { font-size: 0.78rem; color: #e2e8f0; margin-top: 0.35rem; line-height: 1.4; }
.tile-back-action { display: flex; align-items: center; justify-content: space-between; font-size: 0.8rem; font-weight: 800; color: #fbbf24; border-top: 1px solid rgba(255,255,255,0.16); padding-top: 0.45rem; }

/* ==========================================================================
   SECTIONS, CARDS, JAPA MALA, EKADASI, VIGRAHA, BOOKS, KIRTANAM, GALLERY
   ========================================================================== */
.section { padding: 3.75rem 0; }
.section-alt { background: rgba(241, 245, 249, 0.65); border-top: 1px solid var(--border-card); border-bottom: 1px solid var(--border-card); }
body.theme-dark .section-alt { background: rgba(11, 20, 40, 0.65); }

.section-badge {
  display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.32rem 0.95rem;
  background: rgba(245, 158, 11, 0.12); border: 1px solid rgba(245, 158, 11, 0.4);
  border-radius: 999px; color: var(--gold-dark); font-size: 0.78rem; font-weight: 800; margin-bottom: 0.7rem;
}
body.theme-dark .section-badge { color: #fbbf24; }
.section-title { font-family: var(--font-heading); font-size: clamp(1.55rem, 2.8vw, 2.2rem); margin-bottom: 0.5rem; }
.section-description { color: var(--text-muted); max-width: 760px; margin: 0 auto 2rem auto; font-size: 0.96rem; }

.card-panel {
  background: var(--bg-card); border: 1.5px solid var(--border-card); border-radius: var(--radius-lg);
  padding: 1.35rem; box-shadow: var(--shadow-sm);
}
.card-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; margin-bottom: 1rem; flex-wrap: wrap; }
.pill-tag { font-size: 0.72rem; font-weight: 800; padding: 0.2rem 0.6rem; border-radius: 999px; background: rgba(245, 158, 11, 0.15); color: var(--gold-dark); }
body.theme-dark .pill-tag { color: #fbbf24; }

.mantra-split-grid, .two-col-grid, .ekadasi-rules-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.35rem; }
.cards-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.cards-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.1rem; }

/* Japa Counter */
.japa-mantra-display {
  background: linear-gradient(135deg, #fffbeb, #fef3c7); border: 1.5px solid rgba(245, 158, 11, 0.45);
  border-radius: 14px; padding: 1rem; text-align: center; margin-bottom: 1rem; color: #78350f;
}
body.theme-dark .japa-mantra-display { background: linear-gradient(135deg, #1e1b4b, #312e81); color: #fef3c7; }
.japa-sanskrit { font-weight: 800; font-size: 1.02rem; margin-bottom: 0.35rem; }
.japa-tamil { font-weight: 700; font-size: 0.94rem; }

.japa-stats-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.65rem; margin-bottom: 0.9rem; }
.japa-stat-box { background: var(--bg-alt); border: 1px solid var(--border-card); border-radius: 12px; padding: 0.65rem; text-align: center; }
.japa-stat-box.highlight { border-color: var(--gold-bright); background: rgba(245, 158, 11, 0.12); }
.japa-stat-label { display: block; font-size: 0.72rem; font-weight: 700; color: var(--text-dim); }
.japa-stat-val { font-family: var(--font-heading); font-size: 1.45rem; color: var(--gold-dark); }
body.theme-dark .japa-stat-val { color: #fbbf24; }

.japa-progress-wrap { width: 100%; height: 10px; background: var(--bg-alt); border-radius: 999px; overflow: hidden; margin-bottom: 1rem; }
.japa-progress-bar { height: 100%; background: linear-gradient(90deg, #f59e0b, #d97706, #16a34a); transition: width 0.2s ease; }

.japa-tap-bead-btn {
  width: 100%; padding: 1.3rem 1rem; border-radius: 16px; border: none; cursor: pointer;
  background: linear-gradient(135deg, #f59e0b 0%, #b45309 100%); color: #ffffff;
  display: flex; flex-direction: column; align-items: center; gap: 0.3rem; font-family: inherit;
  box-shadow: 0 10px 25px rgba(217, 119, 6, 0.35); transition: transform 0.1s ease; margin-bottom: 0.9rem;
}
.japa-tap-bead-btn:active { transform: scale(0.97); }
.japa-tap-bead-btn i { font-size: 1.6rem; }
.japa-tap-bead-btn strong { font-size: 1.05rem; letter-spacing: 0.04em; }
.japa-controls-row { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; }
.sound-toggle { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.82rem; font-weight: 700; cursor: pointer; }

.vishnu-calc-box {
  background: rgba(245, 158, 11, 0.08); border: 1.5px solid rgba(245, 158, 11, 0.35);
  border-radius: 14px; padding: 1rem; margin-bottom: 1rem;
}
.merit-list { list-style: none; display: grid; gap: 0.3rem; font-size: 0.88rem; margin: 0.5rem 0; }
.merit-list .highlight-li { color: var(--gold-dark); font-size: 0.95rem; }
body.theme-dark .merit-list .highlight-li { color: #fde047; }
.tamil-quote { font-size: 0.84rem; color: var(--text-muted); border-left: 3px solid var(--gold-bright); padding-left: 0.75rem; margin-top: 0.6rem; }

.accordion-stack { display: grid; gap: 0.65rem; }
.info-accordion { background: var(--bg-alt); border: 1px solid var(--border-card); border-radius: 12px; padding: 0.7rem 0.95rem; }
.info-accordion summary { font-weight: 700; cursor: pointer; font-size: 0.92rem; display: flex; align-items: center; gap: 0.5rem; }
.compact-ol, .compact-ul { padding-left: 1.25rem; margin-top: 0.5rem; display: grid; gap: 0.32rem; font-size: 0.86rem; color: var(--text-muted); }

/* Filter Bar & Cards */
.filter-bar-card {
  background: var(--bg-card); border: 1.5px solid var(--border-card); border-radius: 16px;
  padding: 1rem; margin-bottom: 1.35rem; display: flex; flex-wrap: wrap; gap: 0.85rem; align-items: center; justify-content: space-between;
}
.search-input-wrap {
  flex: 1 1 280px; display: flex; align-items: center; gap: 0.55rem; background: var(--bg-alt);
  border: 1px solid var(--border-card); border-radius: 999px; padding: 0.5rem 0.95rem;
}
.search-input-wrap input { width: 100%; border: none; outline: none; background: transparent; color: var(--text-main); font-family: inherit; font-size: 0.9rem; }
.filter-chips { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.filter-chip {
  padding: 0.38rem 0.85rem; border-radius: 999px; border: 1px solid var(--border-card);
  background: var(--bg-alt); color: var(--text-muted); font-size: 0.8rem; font-weight: 700; cursor: pointer; font-family: inherit;
}
.filter-chip.active { background: linear-gradient(135deg, #f59e0b, #d97706); color: #ffffff; border-color: transparent; }

.ekadasi-card, .book-card {
  background: var(--bg-card); border: 1.5px solid var(--border-card); border-radius: 16px;
  padding: 1.1rem; display: flex; flex-direction: column; justify-content: space-between; gap: 0.65rem;
  box-shadow: var(--shadow-sm); transition: transform 0.2s, border-color 0.2s;
}
.ekadasi-card:hover, .book-card:hover { transform: translateY(-3px); border-color: var(--gold-bright); }
.ekadasi-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.5rem; }
.ekadasi-month { font-size: 0.72rem; font-weight: 800; color: var(--gold-dark); background: rgba(245, 158, 11, 0.14); padding: 0.16rem 0.55rem; border-radius: 999px; }
body.theme-dark .ekadasi-month { color: #fbbf24; }
.ekadasi-rules-grid { margin-top: 1.5rem; }
.rule-card-avoid { border-left: 4px solid #dc2626; }
.rule-card-allow { border-left: 4px solid #16a34a; }
.resource-btn-row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.85rem; }

/* Tulasi & Vigraha */
.sloka-block { display: grid; gap: 0.85rem; }
.sloka-verse { background: var(--bg-alt); border-left: 3px solid #16a34a; padding: 0.7rem 0.9rem; border-radius: 0 10px 10px 0; font-size: 0.88rem; }
.pranam-highlight { margin-top: 1rem; padding: 0.9rem; border-radius: 12px; background: rgba(22, 163, 74, 0.1); border: 1px solid rgba(22, 163, 74, 0.35); font-size: 0.88rem; }
.checklist-box { display: grid; gap: 0.65rem; }
.check-step { display: flex; align-items: flex-start; gap: 0.65rem; padding: 0.65rem; background: var(--bg-alt); border-radius: 10px; font-size: 0.87rem; cursor: pointer; }
.check-step input { margin-top: 4px; width: 18px; height: 18px; accent-color: #16a34a; flex-shrink: 0; }
.mini-darshan-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem; margin-top: 1rem; }
.mini-darshan-pair img { width: 100%; height: 145px; object-fit: cover; border-radius: 12px; cursor: pointer; border: 1.5px solid rgba(245, 158, 11, 0.45); }

.subtab-bar { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; margin-bottom: 1.35rem; }
.subtab-btn {
  padding: 0.55rem 1.05rem; border-radius: 999px; border: 1.5px solid var(--border-card);
  background: var(--bg-card); color: var(--text-main); font-weight: 700; font-size: 0.86rem; cursor: pointer; font-family: inherit;
}
.subtab-btn.active { background: linear-gradient(135deg, #f59e0b, #d97706); color: #ffffff; border-color: transparent; }

.mantra-sanskrit { font-weight: 800; color: var(--gold-dark); margin: 0.5rem 0; line-height: 1.55; }
body.theme-dark .mantra-sanskrit { color: #fde047; }
.mantra-meaning { font-size: 0.86rem; color: var(--text-muted); }

.steps-timeline { display: grid; gap: 0.7rem; margin-top: 0.85rem; }
.step-card { display: flex; gap: 0.85rem; align-items: flex-start; padding: 0.75rem; background: var(--bg-alt); border-radius: 12px; font-size: 0.88rem; }
.step-card span {
  width: 30px; height: 30px; border-radius: 50%; background: var(--gold-bright); color: #0f172a;
  font-weight: 800; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}

/* Bhajans & Darshan Gallery */
.bhajan-links-grid { display: grid; gap: 0.55rem; }
.bhajan-link-card {
  display: flex; align-items: center; justify-content: space-between; gap: 0.65rem;
  padding: 0.68rem 0.9rem; background: var(--bg-alt); border: 1px solid var(--border-card);
  border-radius: 12px; text-decoration: none; color: var(--text-main); font-weight: 700; font-size: 0.88rem;
}
.bhajan-link-card:hover { border-color: var(--gold-bright); background: rgba(245, 158, 11, 0.1); }

.mm-poster-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.85rem; margin-top: 0.65rem; }
.mm-poster-card {
  background: var(--bg-alt); border: 1.5px solid var(--border-card); border-radius: 14px;
  overflow: hidden; cursor: pointer; transition: transform 0.2s, border-color 0.2s;
}
.mm-poster-card:hover { transform: translateY(-3px); border-color: var(--gold-bright); }
.mm-poster-card img { width: 100%; height: 270px; object-fit: cover; object-position: top center; display: block; }
.mm-poster-card figcaption { padding: 0.65rem 0.8rem; font-size: 0.82rem; }
@media (max-width: 560px) { .mm-poster-pair { grid-template-columns: 1fr; } }

.darshan-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.darshan-card {
  background: var(--bg-card); border: 1.5px solid var(--border-card); border-radius: 16px;
  overflow: hidden; cursor: pointer; box-shadow: var(--shadow-sm); transition: transform 0.22s;
}
.darshan-card:hover { transform: translateY(-4px); border-color: var(--gold-bright); }
.darshan-card img { width: 100%; height: 210px; object-fit: cover; object-position: top center; display: block; }
.darshan-card-body { padding: 0.75rem; }
.darshan-card-body strong { display: block; font-size: 0.9rem; }
.darshan-card-body small { color: var(--text-dim); font-size: 0.76rem; }

/* Footer */
.footer { background: #0f172a; color: #e2e8f0; padding: 1.5rem 0; margin-top: 2rem; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }
.footer-actions { display: flex; gap: 0.6rem; }

/* ==========================================================================
   QUICK NAV DRAWER, LIGHTBOX & CHROME PWA INSTALL MODALS (From Template)
   ========================================================================== */
.drawer-overlay { position: fixed; inset: 0; background: rgba(15, 23, 42, 0.55); z-index: 9990; opacity: 0; pointer-events: none; transition: opacity 0.25s; }
.drawer-overlay.active { opacity: 1; pointer-events: auto; }
.quick-nav-drawer {
  position: fixed; top: 0; left: 0; bottom: 0; width: min(330px, 88vw); background: var(--bg-card);
  z-index: 9995; transform: translateX(-105%); transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  display: flex; flex-direction: column; box-shadow: var(--shadow-lg);
}
.quick-nav-drawer.active { transform: translateX(0); }
.drawer-header { padding: 1rem; border-bottom: 1px solid var(--border-card); display: flex; align-items: center; justify-content: space-between; }
.drawer-brand { display: flex; align-items: center; gap: 0.65rem; }
.drawer-title { font-family: var(--font-heading); font-weight: 800; font-size: 1rem; }
.drawer-sub { font-size: 0.74rem; color: var(--text-dim); }
.drawer-close-btn { background: none; border: none; font-size: 1.7rem; cursor: pointer; color: var(--text-main); }
.drawer-body { padding: 1rem; overflow-y: auto; flex: 1; }
.drawer-section-heading { font-size: 0.72rem; font-weight: 800; color: var(--text-dim); letter-spacing: 0.06em; margin: 0.75rem 0 0.5rem 0; }
.drawer-action-cards { display: grid; gap: 0.5rem; margin-bottom: 0.85rem; }
.drawer-action-card {
  display: flex; align-items: center; gap: 0.75rem; padding: 0.72rem; border-radius: 12px;
  border: 1px solid rgba(245, 158, 11, 0.55); background: #fffbeb; cursor: pointer; text-align: left; font-family: inherit;
}
.drawer-action-card strong { display: block; font-size: 0.88rem; color: #0f172a; }
.drawer-action-card p { margin: 0; font-size: 0.74rem; color: #475569; }
.drawer-menu-list { list-style: none; display: grid; gap: 0.45rem; }
.drawer-link {
  display: flex; align-items: center; gap: 0.75rem; padding: 0.55rem 0.65rem; border-radius: 12px;
  text-decoration: none; color: var(--text-main); transition: background 0.15s;
}
.drawer-link:hover { background: var(--bg-alt); }
.drawer-icon-box { width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center; color: #ffffff; flex-shrink: 0; }
.drawer-link-title { display: block; font-weight: 700; font-size: 0.88rem; }
.drawer-link-sub { display: block; font-size: 0.73rem; color: var(--text-dim); }

/* Floating PWA Install Banner */
#pwa-install-banner {
  position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 9500;
  max-width: 420px; width: calc(100% - 2rem); background: var(--bg-card);
  border: 1.5px solid rgba(245, 158, 11, 0.55); border-radius: 20px;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.2); padding: 1.15rem;
  display: flex; flex-direction: column; gap: 0.85rem; overflow: hidden;
}
.banner-top-accent { position: absolute; top: 0; left: 0; right: 0; height: 4px; background: linear-gradient(90deg, #f59e0b, #d97706, #1e3a8a); }
.banner-header { display: flex; align-items: flex-start; gap: 0.85rem; }
.banner-icon-wrap { position: relative; flex-shrink: 0; }
.banner-app-icon { border-radius: 12px; border: 1px solid rgba(245, 158, 11, 0.4); }
.banner-verified-badge { position: absolute; bottom: -3px; right: -3px; background: #fff; color: #059669; border-radius: 50%; font-size: 0.8rem; }
.banner-title-row { display: flex; align-items: center; gap: 0.45rem; flex-wrap: wrap; }
.banner-title { font-family: var(--font-heading); font-size: 1.02rem; }
.banner-pwa-pill { font-size: 0.65rem; font-weight: 800; background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; padding: 0.1rem 0.45rem; border-radius: 999px; }
.banner-sub { font-size: 0.8rem; color: var(--text-dim); margin-top: 0.2rem; }
.banner-close-btn { background: none; border: none; font-size: 1.3rem; color: var(--text-dim); cursor: pointer; margin-left: auto; }
.banner-perks { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.perk-pill { font-size: 0.73rem; background: var(--bg-alt); border: 1px solid var(--border-card); padding: 0.2rem 0.55rem; border-radius: 999px; }
.banner-actions { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.banner-primary-btn { flex: 1.2; background: linear-gradient(135deg, #f59e0b, #d97706) !important; color: #ffffff !important; border: none !important; }
.banner-guide-btn { flex: 1; }
.banner-later-btn { background: none; border: none; color: var(--text-dim); font-weight: 700; cursor: pointer; padding: 0.4rem 0.5rem; }

.pwa-reopen-pill {
  position: fixed; bottom: 1rem; right: 1rem; z-index: 9400;
  background: linear-gradient(135deg, #1e3a8a, #0f172a); color: #ffffff;
  padding: 0.62rem 1rem; border-radius: 999px; border: 1.5px solid rgba(245, 158, 11, 0.7);
  display: inline-flex; align-items: center; gap: 0.45rem; font-weight: 800; font-size: 0.82rem; cursor: pointer;
  box-shadow: var(--shadow-lg);
}

/* Chrome Install Modal & Lightbox */
.ios-modal-backdrop, .modal-backdrop {
  position: fixed; inset: 0; background: rgba(15, 23, 42, 0.75); backdrop-filter: blur(4px);
  z-index: 10000; display: flex; align-items: center; justify-content: center; padding: 1rem;
}
.ios-modal-card {
  position: relative; background: var(--bg-card); border-radius: 22px; max-width: 480px; width: 100%;
  padding: 1.45rem; box-shadow: var(--shadow-lg); border: 1.5px solid rgba(245, 158, 11, 0.45);
  max-height: 92vh; overflow-y: auto;
}
.chrome-install-close-btn { position: absolute; top: 0.8rem; right: 1rem; background: none; border: none; font-size: 1.6rem; color: var(--text-dim); cursor: pointer; }
.chrome-dots-pointer-hint {
  background: #eff6ff; border: 1px solid #bfdbfe; color: #1e3a8a; border-radius: 12px;
  padding: 0.5rem 0.75rem; font-size: 0.8rem; display: flex; align-items: center; gap: 0.5rem; margin-bottom: 1rem;
}
.ios-app-header { text-align: center; margin-bottom: 1rem; }
.ios-app-icon { border-radius: 16px; margin-bottom: 0.5rem; box-shadow: var(--shadow-sm); }
.ios-modal-title { font-family: var(--font-heading); font-size: 1.2rem; margin-bottom: 0.25rem; }
.pwa-guide-tabs { display: flex; gap: 0.35rem; background: var(--bg-alt); padding: 0.3rem; border-radius: 12px; margin-bottom: 1rem; }
.pwa-guide-tab { flex: 1; padding: 0.5rem 0.3rem; border: none; background: transparent; border-radius: 8px; font-weight: 700; font-size: 0.76rem; color: var(--text-dim); cursor: pointer; }
.pwa-guide-tab.active { background: var(--bg-card); color: var(--text-main); box-shadow: var(--shadow-sm); }
.ios-steps { display: grid; gap: 0.7rem; margin-bottom: 1.1rem; }
.ios-step-item { display: flex; align-items: flex-start; gap: 0.7rem; background: var(--bg-alt); padding: 0.7rem; border-radius: 12px; font-size: 0.85rem; }
.step-num { width: 26px; height: 26px; border-radius: 50%; background: var(--gold-bright); color: #0f172a; font-weight: 800; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }

.lightbox-card {
  position: relative; background: #0f172a; border-radius: 18px; max-width: 780px; width: 100%;
  overflow: hidden; border: 2px solid rgba(245, 158, 11, 0.7);
}
.lightbox-card img { width: 100%; max-height: 74vh; object-fit: contain; display: block; background: #020617; }
.lightbox-caption { padding: 0.9rem 1.2rem; color: #f8fafc; }
.lightbox-caption p { color: #cbd5e1; font-size: 0.85rem; margin-top: 0.2rem; }
.lightbox-close { position: absolute; top: 0.65rem; right: 0.85rem; background: rgba(15,23,42,0.75); color: #fff; border: 1px solid rgba(255,255,255,0.3); width: 34px; height: 34px; border-radius: 50%; font-size: 1.3rem; cursor: pointer; }

.pwa-toast {
  position: fixed; bottom: 5.5rem; left: 50%; transform: translateX(-50%) translateY(20px);
  background: #0f172a; color: #fef08a; padding: 0.7rem 1.2rem; border-radius: 999px;
  font-size: 0.85rem; font-weight: 700; z-index: 10050; opacity: 0; transition: all 0.3s;
  box-shadow: var(--shadow-lg); border: 1px solid rgba(245, 158, 11, 0.5);
}
.pwa-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Interactive Book & Comic Viewer + Bilingual Siksastaka */
.english-siksastaka-box {
  background: var(--bg-alt);
  border-left: 3px solid var(--gold-bright);
  padding: 0.55rem 0.75rem;
  border-radius: 0 8px 8px 0;
  font-size: 0.83rem;
  line-height: 1.55;
  color: var(--text-muted);
}

.mm-subsection-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  color: var(--text-main);
  padding-bottom: 0.35rem;
  border-bottom: 1.5px solid rgba(245, 158, 11, 0.25);
}

.book-launcher-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.book-launcher-card {
  display: flex;
  gap: 0.9rem;
  background: var(--bg-alt);
  border: 1.5px solid rgba(245, 158, 11, 0.35);
  border-radius: 16px;
  padding: 0.85rem;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  align-items: center;
}
.book-launcher-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.book-launcher-card img {
  width: 118px;
  height: 94px;
  object-fit: cover;
  border-radius: 10px;
  flex-shrink: 0;
  border: 1px solid rgba(245, 158, 11, 0.4);
}
.book-launcher-body {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.book-launcher-body h4 { margin: 0; font-size: 1rem; color: var(--text-main); }
.book-launcher-body p { margin: 0; font-size: 0.8rem; color: var(--text-muted); line-height: 1.4; }

.book-viewer-card {
  position: relative;
  background: #0f172a;
  border-radius: 20px;
  max-width: 920px;
  width: 100%;
  padding: 1rem 1.2rem;
  border: 2px solid rgba(245, 158, 11, 0.75);
  box-shadow: var(--shadow-lg);
  color: #f8fafc;
}
.book-viewer-header { padding-right: 2.5rem; margin-bottom: 0.75rem; }
.book-viewer-header h3 { font-family: var(--font-heading); font-size: 1.15rem; margin: 0.3rem 0 0.15rem; color: #fef08a; }
.book-viewer-header p { font-size: 0.8rem; color: #cbd5e1; margin: 0; }
.book-viewer-stage {
  background: #020617;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.book-viewer-stage img {
  width: 100%;
  max-height: 68vh;
  object-fit: contain;
  display: block;
}
.book-viewer-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.85rem;
}

@media (max-width: 760px) {
  .book-launcher-grid { grid-template-columns: 1fr; }
}

/* Responsive Breakpoints */
@media (max-width: 1100px) {
  .quick-tiles-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .darshan-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cards-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .nav-container { flex-wrap: wrap; padding: 0 0.6rem; gap: 0.4rem; }
  .brand-identity { order: 1; }
  .nav-actions-group { order: 2; margin-left: auto; }
  .universal-search-wrapper { order: 3; flex: 1 1 100%; }
  .nav-tabs-scroller { order: 4; flex: 1 1 100%; padding-bottom: 0.2rem; }
  .nav-scroll-arrow { width: 22px; height: 34px; }
  .hero-grid, .mantra-split-grid, .two-col-grid, .ekadasi-rules-grid, .cards-grid-2 { grid-template-columns: 1fr; }
  .hero-darshan-img { height: 300px; }
  .install-text-full { display: none; }
  .install-text-compact { display: inline; }
}

/* ==========================================================================
   ISKCON TILAK EMBLEM SVG, TAB SUBPAGE INDICATORS, SINGLE-VIEW & OFFLINE JAPA
   ========================================================================== */
.tilak-svg {
  width: 1.05em;
  height: 1.15em;
  display: inline-block;
  vertical-align: -0.18em;
  flex-shrink: 0;
  fill: currentColor;
}

/* Top Navigation Tab Wrapper + Side Colorful 3D Dropdown Trigger */
.nav-tab-item {
  display: inline-flex;
  align-items: stretch;
  flex-shrink: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--border-card);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
body.theme-dark .nav-tab-item {
  background: rgba(17, 30, 56, 0.88);
}
.nav-tab-item:hover {
  transform: translateY(-2px);
  border-color: rgba(245, 158, 11, 0.55);
  box-shadow: var(--shadow-sm);
}
.nav-tab-item.has-active-tab {
  background: var(--bg-card);
  border-color: rgba(245, 158, 11, 0.72);
  border-top: 3px solid var(--gold-bright);
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.22);
}
.nav-tab-item .swiggy-tab {
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  transform: none !important;
  border-radius: 13px 0 0 13px;
  padding: 0.34rem 0.52rem 0.3rem 0.62rem;
  min-width: 58px;
}

/* Colorful 3D Subpage Dropdown Button beside each Nav Tab */
.nav-dropdown-3d-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 24px;
  margin: 4px 4px 4px 0;
  padding: 2px 0;
  border: none;
  border-radius: 10px;
  color: #ffffff;
  font-family: inherit;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.65),
    inset 0 -2px 3px rgba(0, 0, 0, 0.28),
    0 3px 6px rgba(15, 23, 42, 0.22);
  border-bottom: 2px solid rgba(0, 0, 0, 0.35);
  transition: transform 0.14s ease, filter 0.16s ease, box-shadow 0.14s ease;
}
.nav-dropdown-3d-btn:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}
.nav-dropdown-3d-btn:active,
.nav-dropdown-3d-btn.is-open {
  transform: translateY(1px);
  box-shadow:
    inset 0 2px 3px rgba(0, 0, 0, 0.3),
    0 1px 2px rgba(15, 23, 42, 0.18);
}
.nav-dropdown-3d-btn i {
  font-size: 0.65rem;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.35));
  transition: transform 0.2s ease;
}
.nav-dropdown-3d-btn.is-open i {
  transform: rotate(180deg);
}
.nav-drop-mini-count {
  font-size: 0.55rem;
  font-weight: 800;
  line-height: 1;
  background: rgba(15, 23, 42, 0.28);
  padding: 1px 4px;
  border-radius: 999px;
}

.drop-home { background: linear-gradient(145deg, #fde047, #f59e0b 55%, #b45309); color: #1e1b4b; }
.drop-mantra { background: linear-gradient(145deg, #fdba74, #ea580c 55%, #9a3412); }
.drop-ekadasi { background: linear-gradient(145deg, #a5b4fc, #4f46e5 55%, #312e81); }
.drop-tulasi { background: linear-gradient(145deg, #6ee7b7, #059669 55%, #064e3b); }
.drop-vigraha { background: linear-gradient(145deg, #f9a8d4, #db2777 55%, #831843); }
.drop-sravanam { background: linear-gradient(145deg, #7dd3fc, #0284c7 55%, #0c4a6e); }
.drop-kirtanam { background: linear-gradient(145deg, #d8b4fe, #9333ea 55%, #581c87); }
.drop-baladev { background: linear-gradient(145deg, #fde68a, #d97706 55%, #78350f); }

/* Floating Colorful 3D Subpage Dropdown Popover */
.nav-subpage-popover {
  position: fixed;
  z-index: 2500;
  min-width: 268px;
  max-width: min(330px, calc(100vw - 16px));
  background: var(--bg-card);
  border: 2px solid rgba(245, 158, 11, 0.65);
  border-radius: 16px;
  padding: 0.65rem;
  box-shadow:
    0 18px 40px rgba(15, 23, 42, 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.45);
  animation: popDropIn 0.16s ease-out;
}
body.theme-dark .nav-subpage-popover {
  background: #0f1b33;
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.6);
}
@keyframes popDropIn {
  from { opacity: 0; transform: translateY(-6px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.nav-popover-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.25rem 0.4rem 0.5rem 0.4rem;
  margin-bottom: 0.4rem;
  border-bottom: 1px solid var(--border-card);
  font-size: 0.76rem;
  font-weight: 800;
  color: var(--gold-dark);
}
body.theme-dark .nav-popover-header { color: #fde047; }
.nav-popover-close {
  border: none;
  background: var(--bg-alt);
  color: var(--text-muted);
  width: 22px;
  height: 22px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 800;
  line-height: 1;
}
.nav-popover-list {
  display: flex;
  flex-direction: column;
  gap: 0.34rem;
  max-height: 62vh;
  overflow-y: auto;
}
.nav-popover-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.58rem;
  padding: 0.48rem 0.58rem;
  border-radius: 11px;
  border: 1px solid transparent;
  background: var(--bg-alt);
  color: var(--text-main);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: all 0.14s ease;
}
.nav-popover-item:hover {
  border-color: rgba(245, 158, 11, 0.55);
  background: rgba(245, 158, 11, 0.12);
  transform: translateX(2px);
}
.nav-popover-icon {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 0.78rem;
  flex-shrink: 0;
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.5), 0 2px 5px rgba(0,0,0,0.18);
}
.nav-popover-text strong {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.25;
}
.nav-popover-text small {
  display: block;
  font-size: 0.69rem;
  color: var(--text-dim);
  line-height: 1.2;
}

/* Srila Prabhupada Maha Mantra Audio Sanctuary Card */
.prabhupada-japa-player {
  background: linear-gradient(135deg, rgba(254, 243, 199, 0.85), rgba(253, 230, 138, 0.45));
  border: 1.5px solid rgba(217, 119, 6, 0.5);
  border-radius: 14px;
  padding: 0.78rem 0.88rem;
  margin-bottom: 0.9rem;
}
body.theme-dark .prabhupada-japa-player {
  background: linear-gradient(135deg, rgba(49, 46, 129, 0.75), rgba(30, 27, 75, 0.85));
}
.pj-player-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.55rem;
}
.pj-player-title {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.84rem;
  font-weight: 800;
  color: #78350f;
}
body.theme-dark .pj-player-title { color: #fde047; }
.pj-play-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.42rem 0.88rem;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, #f59e0b, #b45309);
  color: #ffffff;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(217, 119, 6, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
.pj-play-btn.is-playing {
  background: linear-gradient(135deg, #16a34a, #15803d);
  box-shadow: 0 3px 10px rgba(22, 163, 74, 0.38);
}
.pj-player-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  justify-content: space-between;
}
.pj-select {
  flex: 1 1 180px;
  padding: 0.32rem 0.55rem;
  border-radius: 8px;
  border: 1px solid rgba(217, 119, 6, 0.45);
  background: var(--bg-card);
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 700;
}
.pj-speed-group {
  display: inline-flex;
  gap: 0.25rem;
}
.pj-speed-btn {
  padding: 0.24rem 0.5rem;
  border-radius: 7px;
  border: 1px solid rgba(217, 119, 6, 0.4);
  background: var(--bg-card);
  color: var(--text-main);
  font-size: 0.7rem;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
}
.pj-speed-btn.active {
  background: #d97706;
  color: #ffffff;
  border-color: transparent;
}
.pj-status-line {
  margin-top: 0.42rem;
  font-size: 0.71rem;
  font-weight: 600;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
}

/* Single-View Active Section Control */
.page-section-hidden {
  display: none !important;
}
.page-section-active {
  animation: sectionReveal 0.24s ease-out;
}
@keyframes sectionReveal {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Interactive Subpage Map Strip Shown Inside Each Section */
.section-subpages-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  margin: 0 auto 1.35rem auto;
  padding: 0.6rem 0.9rem;
  background: var(--bg-card);
  border: 1.5px solid var(--border-card);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
}
.subpage-bar-label {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-right: 0.25rem;
}
.subpage-jump-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  padding: 0.32rem 0.72rem;
  border-radius: 999px;
  border: 1px solid var(--border-card);
  background: var(--bg-alt);
  color: var(--text-main);
  font-size: 0.76rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.16s ease;
}
.subpage-jump-chip:hover,
.subpage-jump-chip.active {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #ffffff;
  border-color: transparent;
}
.subpage-home-chip {
  background: rgba(30, 58, 138, 0.08);
  color: #1e3a8a;
  border-color: rgba(30, 58, 138, 0.25);
}
body.theme-dark .subpage-home-chip {
  background: rgba(56, 189, 248, 0.12);
  color: #7dd3fc;
  border-color: rgba(56, 189, 248, 0.3);
}

/* ==========================================================================
   FULL OFFLINE TAP-TO-CHANT JAPA MALA SANCTUARY STYLES
   ========================================================================== */
.japa-offline-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 0.2rem 0.58rem;
  border-radius: 999px;
  background: rgba(22, 163, 74, 0.14);
  color: #15803d;
  border: 1px solid rgba(22, 163, 74, 0.35);
}
body.theme-dark .japa-offline-pill {
  background: rgba(34, 197, 94, 0.18);
  color: #86efac;
}
.japa-panchatattva-banner {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.14), rgba(217, 119, 6, 0.08));
  border: 1.5px dashed rgba(217, 119, 6, 0.55);
  border-radius: 12px;
  padding: 0.65rem 0.85rem;
  margin-bottom: 0.85rem;
  text-align: center;
  font-size: 0.8rem;
  line-height: 1.45;
}
.japa-panchatattva-banner strong {
  display: block;
  color: #b45309;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.2rem;
}
body.theme-dark .japa-panchatattva-banner strong { color: #fde047; }

.japa-stats-row-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.japa-daily-goal-box {
  background: var(--bg-alt);
  border: 1px solid var(--border-card);
  border-radius: 12px;
  padding: 0.75rem 0.9rem;
  margin-bottom: 0.85rem;
}
.japa-daily-goal-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  font-size: 0.78rem;
  font-weight: 700;
}
.japa-target-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.32rem;
}
.japa-target-chip {
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--border-card);
  background: var(--bg-card);
  color: var(--text-main);
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
}
.japa-target-chip.active {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #ffffff;
  border-color: transparent;
}
.japa-goal-bar-wrap {
  width: 100%;
  height: 8px;
  background: rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  overflow: hidden;
}
.japa-goal-bar {
  height: 100%;
  background: linear-gradient(90deg, #16a34a, #22c55e, #f59e0b);
  transition: width 0.25s ease;
}

/* 27x4 Bead Dot Mala Tracker */
.japa-mala-dots {
  display: grid;
  grid-template-columns: repeat(18, minmax(0, 1fr));
  gap: 4px;
  padding: 0.55rem;
  background: var(--bg-alt);
  border: 1px solid var(--border-card);
  border-radius: 12px;
  margin-bottom: 0.85rem;
}
.japa-bead-dot {
  height: 7px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.32);
  transition: background 0.15s ease, transform 0.15s ease;
}
.japa-bead-dot.chanted {
  background: linear-gradient(135deg, #f59e0b, #d97706);
}
.japa-bead-dot.milestone {
  background: #16a34a;
  box-shadow: 0 0 6px rgba(22, 163, 74, 0.5);
}
.japa-bead-dot.current {
  background: #dc2626;
  transform: scale(1.25);
}

/* Audio, Auto-Chant, Vibration & WakeLock Controls */
.japa-options-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
  margin-bottom: 0.85rem;
}
.japa-opt-box {
  background: var(--bg-alt);
  border: 1px solid var(--border-card);
  border-radius: 10px;
  padding: 0.5rem 0.7rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.japa-opt-label {
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.japa-opt-select {
  width: 100%;
  padding: 0.32rem 0.5rem;
  border-radius: 8px;
  border: 1px solid var(--border-card);
  background: var(--bg-card);
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 700;
}
.japa-toggles-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.9rem;
}
.japa-toggle-pill {
  flex: 1 1 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.42rem 0.65rem;
  border-radius: 999px;
  border: 1.5px solid var(--border-card);
  background: var(--bg-alt);
  color: var(--text-main);
  font-size: 0.75rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.16s ease;
}
.japa-toggle-pill.active {
  background: rgba(245, 158, 11, 0.18);
  border-color: #d97706;
  color: #b45309;
}
body.theme-dark .japa-toggle-pill.active {
  color: #fde047;
}

.japa-tap-bead-btn {
  position: relative;
  overflow: hidden;
}
.japa-tap-ripple {
  animation: japaPulseBtn 0.26s ease-out;
}
@keyframes japaPulseBtn {
  0% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.65); }
  100% { box-shadow: 0 0 0 18px rgba(245, 158, 11, 0); }
}

.japa-history-panel {
  margin-top: 0.95rem;
  padding: 0.85rem;
  border-radius: 12px;
  background: var(--bg-alt);
  border: 1px solid var(--border-card);
}
.japa-history-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
  margin-bottom: 0.6rem;
}
.japa-history-bars {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.4rem;
  align-items: end;
  height: 76px;
  padding-top: 0.4rem;
}
.japa-day-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.22rem;
  height: 100%;
  justify-content: flex-end;
}
.japa-day-bar-wrap {
  width: 100%;
  flex: 1;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(148, 163, 184, 0.14);
  border-radius: 6px;
  overflow: hidden;
}
.japa-day-bar {
  width: 100%;
  background: linear-gradient(180deg, #f59e0b, #d97706);
  border-radius: 6px 6px 0 0;
  min-height: 3px;
}
.japa-day-val { font-size: 0.66rem; font-weight: 800; color: var(--text-main); }
.japa-day-lbl { font-size: 0.63rem; color: var(--text-dim); font-weight: 700; }

@media (max-width: 560px) {
  .japa-stats-row-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .japa-options-grid { grid-template-columns: 1fr; }
  .japa-mala-dots { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .nav-dropdown-3d-btn { width: 22px; }
}

@media (max-width: 560px) {
  .cards-grid-3, .darshan-grid { grid-template-columns: 1fr; }
  .quick-tiles-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.65rem; }
  .tile-flip-card { height: 155px; }
  .brand-sub { display: none; }
  .nav-action-btn { min-width: 38px; padding: 0.2rem 0.3rem; }
  #pwa-install-banner { left: 0.75rem; right: 0.75rem; bottom: 0.75rem; width: auto; }
}
