@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@600;700;800;900&family=Inter:wght@400;500;600;700&family=Noto+Sans+Arabic:wght@400;600;700&family=Noto+Sans+Bengali:wght@400;600;700&family=Noto+Sans+Devanagari:wght@400;500;600;700;800&family=Noto+Sans+Gujarati:wght@400;600;700&family=Noto+Sans+Gurmukhi:wght@400;600;700&family=Noto+Sans+Kannada:wght@400;600;700&family=Noto+Sans+Malayalam:wght@400;600;700&family=Noto+Sans+Oriya:wght@400;600;700&family=Noto+Sans+Tamil:wght@400;600;700&family=Noto+Sans+Telugu:wght@400;600;700&family=Noto+Serif+Devanagari:wght@500;600;700;800&family=Outfit:wght@400;500;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700&family=Rozha+One&family=Yatra+One&display=swap');

:root {
  /* Spiritual Sacred Palette */
  --gold-50: #fefce8;
  --gold-100: #fef9c3;
  --gold-200: #fef08a;
  --gold-300: #fde047;
  --gold-400: #facc15;
  --gold-500: #eab308;
  --gold-600: #d97706;
  --gold-700: #b45309;
  --gold-800: #92400e;
  --gold-900: #78350f;

  --saffron-500: #ff6b35;
  --saffron-600: #e65100;
  --terracotta: #c2410c;
  --crimson-sacred: #991b1b;
  --royal-purple: #701a75;
  --royal-indigo: #4338ca;
  --vedic-cyan: #0284c7;

  /* Concept 2: The Ethereal Sanctum Design Tokens */
  --bg-sanctuary: #080604;
  --bg-glass: rgba(22, 18, 14, 0.65);
  --bg-glass-hover: rgba(35, 28, 20, 0.85);
  
  --border-gold-subtle: rgba(212, 175, 55, 0.18);
  --border-gold-hover: rgba(212, 175, 55, 0.65);
  
  --gold-primary: #D4AF37;
  --gold-glow: #F3C644;
  --gold-amber: #E08E45;
  
  --text-primary: #FBF6EB;     /* Sandalwood cream */
  --text-secondary: #BFA888;   /* Muted warm gold */
  --text-mantra: #E8C170;      /* Luminous gold */

  /* Typography */
  --font-serif-sacred: 'Cinzel Decorative', 'Rozha One', 'Cinzel', serif;
  --font-devanagari: 'Noto Sans Devanagari', -apple-system, sans-serif;
  
  /* Shadows & Effects */
  --glow-mandala: radial-gradient(circle at center, rgba(229, 169, 60, 0.18) 0%, rgba(8, 6, 4, 0) 70%);
  --shadow-card-hover: 0 12px 32px rgba(212, 175, 55, 0.22);
  --blur-glass: blur(24px);

  /* Dark Theme Tokens (Default Sanctuary Obsidian) */
  --bg-core: #080604;
  --bg-surface: #130f0a;
  --bg-surface-elevated: #1c150f;
  --bg-card: rgba(22, 16, 11, 0.88);
  --bg-card-hover: rgba(32, 24, 16, 0.95);

  --border-subtle: rgba(212, 175, 55, 0.18);
  --border-medium: rgba(212, 175, 55, 0.35);
  --border-strong: rgba(212, 175, 55, 0.65);

  --text-primary: #fcf8f2;
  --text-secondary: #e2d3be;
  --text-muted: #a3927c;
  --text-gold: #fde047;
  --text-saffron: #fb923c;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.5);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.65);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.8);
  --shadow-gold: 0 0 25px rgba(217, 119, 6, 0.25);
  --shadow-mandir: 0 12px 32px rgba(234, 179, 8, 0.22);
  --shadow-gita: 0 12px 32px rgba(112, 26, 117, 0.28);
  --shadow-vedas: 0 12px 32px rgba(2, 132, 199, 0.22);
  --shadow-shastras: 0 12px 32px rgba(194, 65, 12, 0.28);

  /* Card Background & Component Gradients (Adaptive) */
  --mantra-bg: linear-gradient(180deg, rgba(234, 179, 8, 0.1) 0%, rgba(26, 17, 10, 0.65) 100%);
  --mantra-border: rgba(234, 179, 8, 0.25);
  --mantra-text: #fde047;
  --mantra-translit: #c4b5a0;

  --resume-bg: linear-gradient(135deg, rgba(217, 119, 6, 0.18) 0%, rgba(26, 17, 10, 0.9) 100%);
  --resume-bg-hover: linear-gradient(135deg, rgba(217, 119, 6, 0.28) 0%, rgba(38, 24, 14, 0.98) 100%);
  --resume-border: rgba(234, 179, 8, 0.35);
  --resume-badge-bg: rgba(234, 179, 8, 0.22);
  --resume-badge-text: #fde047;
  --resume-badge-border: rgba(234, 179, 8, 0.4);
  --resume-arrow-bg: rgba(255, 255, 255, 0.08);
  --resume-arrow-text: #fde047;

  /* Door Gradients & Accents (Dark Mode) */
  --door-mandir-bg: linear-gradient(160deg, rgba(245, 158, 11, 0.1) 0%, rgba(20, 13, 8, 0.92) 100%);
  --door-mandir-border: rgba(245, 158, 11, 0.28);
  --door-mandir-title: #fef08a;
  --door-mandir-link: #facc15;

  --door-gita-bg: linear-gradient(160deg, rgba(147, 51, 234, 0.1) 0%, rgba(20, 13, 8, 0.92) 100%);
  --door-gita-border: rgba(168, 85, 247, 0.28);
  --door-gita-title: #e9d5ff;
  --door-gita-link: #c084fc;

  --door-vedas-bg: linear-gradient(160deg, rgba(14, 165, 233, 0.1) 0%, rgba(20, 13, 8, 0.92) 100%);
  --door-vedas-border: rgba(14, 165, 233, 0.28);
  --door-vedas-title: #bae6fd;
  --door-vedas-link: #38bdf8;

  --door-shastras-bg: linear-gradient(160deg, rgba(234, 88, 12, 0.1) 0%, rgba(20, 13, 8, 0.92) 100%);
  --door-shastras-border: rgba(249, 115, 22, 0.28);
  --door-shastras-title: #fed7aa;
  --door-shastras-link: #fb923c;

  /* Sanskrit verses & titles */
  --sanskrit-verse-color: #fef08a;
  --heading-sanskrit-color: #fde047;
  --badge-bg: rgba(234, 179, 8, 0.18);
  --badge-text: #fde047;
  --badge-border: rgba(234, 179, 8, 0.35);

  --mandir-card-bg: radial-gradient(circle at 50% 20%, rgba(245, 158, 11, 0.18) 0%, rgba(20, 13, 8, 0.88) 100%);
  --vedas-hero-bg: linear-gradient(135deg, rgba(2, 132, 199, 0.16), rgba(20, 13, 8, 0.85));

  /* Vedic Canonical Theme Tokens */
  --saffron-primary: #ea580c;
  --saffron-light: rgba(234, 88, 12, 0.14);
  --gold-gradient: linear-gradient(135deg, #d97706 0%, #f59e0b 50%, #b45309 100%);
  --sanskrit-color: #fef08a;
  --sacred-red: #dc2626;
  --bg-secondary: rgba(255, 255, 255, 0.04);
  --bg-card-border: rgba(217, 119, 6, 0.22);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 26px;
  --radius-full: 9999px;

  /* Indic, Arabic & Universal Font Stacks with Native Fallbacks (Prevents Tofu Boxes for Odia, Urdu, Arabic) */
  --font-indic: 'Noto Sans Devanagari', 'Noto Serif Devanagari', 'Noto Sans Bengali', 'Noto Sans Gujarati', 'Noto Sans Telugu', 'Noto Sans Tamil', 'Noto Sans Kannada', 'Noto Sans Malayalam', 'Noto Sans Gurmukhi', 'Noto Sans Oriya', 'Noto Sans Arabic', 'Noto Nastaliq Urdu', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-sanskrit: 'Noto Serif Devanagari', 'Noto Sans Devanagari', serif;
  --font-heading: 'Outfit', 'Cinzel', var(--font-indic), sans-serif;
  --font-body: 'Inter', var(--font-indic), system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-base: 16px;

  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --transition: all 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Light Theme (Majestic Vedic Ivory & Sacred Sandalwood) */
[data-theme="light"] {
  --bg-sanctuary: #fcf9f2;
  --bg-glass: rgba(255, 255, 255, 0.92);
  --bg-glass-hover: #ffffff;
  --border-gold-subtle: rgba(180, 83, 9, 0.24);
  --border-gold-hover: rgba(180, 83, 9, 0.7);
  --gold-primary: #7a5200;
  --gold-glow: #92400e;
  --gold-amber: #5c4004;
  --text-primary: #1c130c;
  --text-secondary: #5c4004;
  --text-mantra: #7a5200;
  --glow-mandala: radial-gradient(circle at center, rgba(122, 82, 0, 0.12) 0%, rgba(253, 251, 247, 0) 70%);
  --shadow-card-hover: 0 12px 32px rgba(122, 82, 0, 0.16);

  --bg-core: #fbf9f4;
  --bg-surface: #f4ede1;
  --bg-surface-elevated: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #ffffff;

  --border-subtle: rgba(180, 83, 9, 0.16);
  --border-medium: rgba(180, 83, 9, 0.28);
  --border-strong: rgba(180, 83, 9, 0.55);

  --text-primary: #1c130c;
  --text-secondary: #4a3828;
  --text-muted: #5c4004;
  --text-gold: #7a5200;
  --text-saffron: #9a3412;

  /* Deep high-contrast tone mappings for light mode (WCAG 2.1 AA 4.5:1 compliant) */
  --gold-50: #78350f;
  --gold-100: #7a5200;
  --gold-200: #5c4004;
  --gold-300: #7a5200;
  --gold-400: #5c4004;
  --gold-500: #7a5200;
  --gold-600: #b45309;
  --gold-700: #92400e;
  --gold-800: #78350f;

  --shadow-sm: 0 2px 8px rgba(120, 53, 15, 0.06);
  --shadow-md: 0 8px 24px rgba(120, 53, 15, 0.09);
  --shadow-lg: 0 16px 36px rgba(120, 53, 15, 0.13);
  --shadow-gold: 0 4px 20px rgba(217, 119, 6, 0.14);
  --shadow-mandir: 0 10px 28px rgba(217, 119, 6, 0.12);
  --shadow-gita: 0 10px 28px rgba(147, 51, 234, 0.1);
  --shadow-vedas: 0 10px 28px rgba(2, 132, 199, 0.1);
  --shadow-shastras: 0 10px 28px rgba(194, 65, 12, 0.12);

  /* Clean, luminous light mode cards */
  --mantra-bg: linear-gradient(180deg, #fef8ee 0%, #fdf3e1 100%);
  --mantra-border: rgba(217, 119, 6, 0.28);
  --mantra-text: #9a3412;
  --mantra-translit: #78350f;

  --resume-bg: linear-gradient(135deg, #ffffff 0%, #fff7ed 100%);
  --resume-bg-hover: linear-gradient(135deg, #ffffff 0%, #ffedd5 100%);
  --resume-border: rgba(217, 119, 6, 0.28);
  --resume-badge-bg: #fff1e0;
  --resume-badge-text: #b45309;
  --resume-badge-border: rgba(217, 119, 6, 0.35);
  --resume-arrow-bg: #ffedd5;
  --resume-arrow-text: #c2410c;

  /* Door Gradients in Light Mode */
  --door-mandir-bg: linear-gradient(160deg, #ffffff 0%, #fffbf0 100%);
  --door-mandir-border: rgba(217, 119, 6, 0.26);
  --door-mandir-title: #9a3412;
  --door-mandir-link: #b45309;

  --door-gita-bg: linear-gradient(160deg, #ffffff 0%, #faf5ff 100%);
  --door-gita-border: rgba(147, 51, 234, 0.24);
  --door-gita-title: #6b21a8;
  --door-gita-link: #7e22ce;

  --door-vedas-bg: linear-gradient(160deg, #ffffff 0%, #f0f9ff 100%);
  --door-vedas-border: rgba(2, 132, 199, 0.24);
  --door-vedas-title: #0369a1;
  --door-vedas-link: #0284c7;

  --door-shastras-bg: linear-gradient(160deg, #ffffff 0%, #fff7ed 100%);
  --door-shastras-border: rgba(194, 65, 12, 0.24);
  --door-shastras-title: #9a3412;
  --door-shastras-link: #c2410c;

  /* Sanskrit verses & titles in Light Mode */
  --sanskrit-verse-color: #1c130c;
  --heading-sanskrit-color: #9a3412;
  --badge-bg: #fff1e0;
  --badge-text: #b45309;
  --badge-border: rgba(217, 119, 6, 0.28);

  /* Sanctuary Mandir Card in Light Mode */
  --mandir-card-bg: radial-gradient(circle at 50% 20%, #fffbeb 0%, #fef3c7 100%);
  --vedas-hero-bg: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);

  /* Vedic Canonical Theme Tokens (Light Mode) */
  --saffron-primary: #ea580c;
  --saffron-light: #ffedd5;
  --gold-gradient: linear-gradient(135deg, #d97706 0%, #f59e0b 50%, #b45309 100%);
  --sanskrit-color: #78350f;
  --sacred-red: #dc2626;
  --bg-secondary: #fef8ec;
  --bg-card-border: rgba(217, 119, 6, 0.22);
}

/* Light Theme Card & Indicator Refinements */
[data-theme="light"] .gateway-card {
  background: #ffffff;
  border-color: rgba(180, 83, 9, 0.22);
  box-shadow: 0 4px 16px rgba(180, 83, 9, 0.08);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
[data-theme="light"] .gateway-card:hover {
  background: #ffffff;
  border-color: rgba(180, 83, 9, 0.55);
  box-shadow: 0 8px 24px rgba(180, 83, 9, 0.15);
}
[data-theme="light"] .ambient-indicator,
[data-theme="light"] #dynamic-resume-card {
  background: #ffffff !important;
  border: 1px solid rgba(124, 45, 18, 0.25) !important;
  box-shadow: 0 4px 16px rgba(60, 36, 21, 0.14) !important;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
[data-theme="light"] .ambient-indicator:hover,
[data-theme="light"] #dynamic-resume-card:hover {
  background: #fffdf9 !important;
  border-color: rgba(124, 45, 18, 0.5) !important;
  box-shadow: 0 8px 24px rgba(60, 36, 21, 0.18) !important;
}
[data-theme="light"] .resume-pill-tag {
  color: #7c2d12 !important;
  font-weight: 800 !important;
}
[data-theme="light"] .resume-pill-door {
  color: #5c2408 !important;
  font-weight: 700 !important;
}
[data-theme="light"] .resume-pill-title {
  color: #1c130c !important;
  font-weight: 600 !important;
}
[data-theme="light"] .resume-pill-arrow-btn {
  background: #ffedd5 !important;
  border: 1px solid rgba(124, 45, 18, 0.24) !important;
  color: #7c2d12 !important;
}
[data-theme="light"] .ambient-indicator:hover .resume-pill-arrow-btn,
[data-theme="light"] #dynamic-resume-card:hover .resume-pill-arrow-btn {
  background: #fed7aa !important;
  border-color: #7c2d12 !important;
  color: #5c2408 !important;
}
[data-theme="light"] .header-actions .icon-btn,
[data-theme="light"] .header-actions .pill-btn.lang-toggle {
  background: #ffffff;
  border-color: rgba(180, 83, 9, 0.24);
  color: #78350f;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* Dynamic Root Font Scaling for Rem */
html {
  font-size: 16px;
}
html.font-size-sm, body.font-size-sm {
  font-size: 14px !important;
  --font-base: 14px;
}
html.font-size-md, body.font-size-md {
  font-size: 16px !important;
  --font-base: 16px;
}
html.font-size-lg, body.font-size-lg {
  font-size: 17.5px !important;
  --font-base: 17.5px;
}
html.font-size-xl, body.font-size-xl {
  font-size: 19px !important;
  --font-base: 19px;
}

/* Dedicated Reading Content Magnification across Font Sizes */
html.font-size-lg .sanskrit-verse,
body.font-size-lg .sanskrit-verse,
html.font-size-lg .verse-text,
body.font-size-lg .verse-text,
html.font-size-lg .sukta-mantra-sanskrit,
body.font-size-lg .sukta-mantra-sanskrit,
html.font-size-lg .lyrics-body,
body.font-size-lg .lyrics-body,
html.font-size-lg .aarti-lyrics-verse,
body.font-size-lg .aarti-lyrics-verse {
  font-size: 1.35rem !important;
  line-height: 1.85 !important;
}

html.font-size-xl .sanskrit-verse,
body.font-size-xl .sanskrit-verse,
html.font-size-xl .verse-text,
body.font-size-xl .verse-text,
html.font-size-xl .sukta-mantra-sanskrit,
body.font-size-xl .sukta-mantra-sanskrit,
html.font-size-xl .lyrics-body,
body.font-size-xl .lyrics-body,
html.font-size-xl .aarti-lyrics-verse,
body.font-size-xl .aarti-lyrics-verse {
  font-size: 1.52rem !important;
  line-height: 1.9 !important;
}

html.font-size-lg .translation-text,
body.font-size-lg .translation-text,
html.font-size-lg .verse-meaning,
body.font-size-lg .verse-meaning,
html.font-size-lg .sukta-meaning,
body.font-size-lg .sukta-meaning {
  font-size: 1.12rem !important;
  line-height: 1.7 !important;
}

html.font-size-xl .translation-text,
body.font-size-xl .translation-text,
html.font-size-xl .verse-meaning,
body.font-size-xl .verse-meaning,
html.font-size-xl .sukta-meaning,
body.font-size-xl .sukta-meaning {
  font-size: 1.25rem !important;
  line-height: 1.75 !important;
}

html.font-size-lg .commentary-text,
body.font-size-lg .commentary-text,
html.font-size-lg .verse-commentary,
body.font-size-lg .verse-commentary {
  font-size: 1.05rem !important;
}

html.font-size-xl .commentary-text,
body.font-size-xl .commentary-text,
html.font-size-xl .verse-commentary,
body.font-size-xl .verse-commentary {
  font-size: 1.15rem !important;
}

/* Base Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  min-height: 100%;
  background-color: var(--bg-core);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: var(--font-base);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

body, button, select, input, option, textarea {
  font-family: var(--font-body);
}

/* Indic and Sanskrit Text Classes to Guarantee Pristine Unicode Glyph Rendering */
.sanskrit-verse, .indic-text, .sanskrit-text, .translation-text, .lyrics-body, 
.aarti-dropdown, .gita-lang-dropdown, .gita-lang-dropdown option, select option, .adhyaya-filter-select, .translit-block, 
.veda-sanskrit, .veda-translation, .word-chip strong, .speaker-tag {
  font-family: 'Noto Serif Devanagari', var(--font-indic), serif, sans-serif;
  line-height: 1.8;
}

/* Ambient Aura Background */
.ambient-aura-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  opacity: 0.5;
}

.aura-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  will-change: transform, opacity;
  animation: floatOrb 18s ease-in-out infinite alternate;
}

.orb-gold {
  top: -10%;
  left: 20%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(234, 179, 8, 0.15) 0%, rgba(217, 119, 6, 0.05) 70%, transparent 100%);
}

.orb-amber {
  bottom: 10%;
  right: -5%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(249, 115, 22, 0.12) 0%, rgba(194, 65, 12, 0.04) 70%, transparent 100%);
  animation-duration: 24s;
  animation-direction: alternate-reverse;
}

.orb-crimson {
  top: 40%;
  left: -10%;
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, rgba(153, 27, 27, 0.1) 0%, transparent 70%);
  animation-duration: 20s;
}

@keyframes floatOrb {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(40px, 30px) scale(1.08); }
  100% { transform: translate(-30px, -20px) scale(0.95); }
}

/* Shell Layout */
.app-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Views Visibility & Switching */
.app-view {
  display: none !important;
  width: 100%;
  min-height: 100vh;
  flex-direction: column;
}

.app-view.active {
  display: flex !important;
  animation: fadeInSanctuary 0.28s ease-out forwards;
}

@keyframes fadeInSanctuary {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   CONCEPT 2: THE ETHEREAL SANCTUM GATEWAY (द्वार दर्शनम्)
   Zero-Scroll Single-Viewport Gateway (100dvh)
   Theme: Ethereal Sacred Obsidian & Beaten Temple Gold
   ========================================================================== */

/* Zero-scroll Container */
.gateway-sanctuary {
  height: 100vh;
  height: 100dvh;
  max-height: 100dvh;
  width: 100vw;
  max-width: 100vw;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background-color: var(--bg-sanctuary);
  position: relative;
  padding: 0 1.5rem 0.85rem 1.5rem;
  box-sizing: border-box;
}

/* Floating Top Header (60px) */
.sanctuary-header {
  height: auto;
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 10;
  padding-top: calc(10px + var(--safe-top, 0px));
  padding-bottom: 8px;
  flex-shrink: 0;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  user-select: none;
}

.om-logo {
  font-size: 1.75rem;
  color: var(--gold-primary);
  filter: drop-shadow(0 0 12px rgba(243, 198, 68, 0.45));
  font-weight: 700;
  line-height: 1;
}

.brand-title {
  font-family: var(--font-serif-sacred);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-actions .icon-btn {
  background: var(--bg-glass);
  border: 1px solid var(--border-gold-subtle);
  color: var(--gold-primary);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  font-size: 1.15rem;
  backdrop-filter: var(--blur-glass);
  -webkit-backdrop-filter: var(--blur-glass);
}

.header-actions .icon-btn:hover {
  background: var(--bg-glass-hover);
  border-color: var(--border-gold-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(212, 175, 55, 0.28);
}

.header-actions .pill-btn.lang-toggle {
  background: var(--bg-glass);
  border: 1px solid var(--border-gold-subtle);
  color: var(--text-primary);
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  backdrop-filter: var(--blur-glass);
  -webkit-backdrop-filter: var(--blur-glass);
}

.header-actions .pill-btn.lang-toggle:hover {
  background: var(--bg-glass-hover);
  border-color: var(--border-gold-hover);
  color: var(--gold-glow);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(212, 175, 55, 0.28);
}

/* Central Ethereal Sanctum (Hero Area ~48% viewport height) */
.sanctum-hero {
  position: relative;
  z-index: 1;
  text-align: center;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 0;
  padding: 0.5rem 1rem;
}

/* Mandala Ambient Background Animation */
.mandala-backdrop {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -58%);
  width: 480px;
  height: 480px;
  pointer-events: none;
  z-index: 0;
}

.mandala-svg {
  width: 100%;
  height: 100%;
  stroke: var(--gold-primary);
  stroke-width: 0.85px;
  opacity: 0.12;
  will-change: transform;
  animation: slowSpin 160s linear infinite;
}

.radial-amber-glow {
  position: absolute;
  inset: 0;
  background: var(--glow-mandala);
  pointer-events: none;
}

@keyframes slowSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
}

.shanti-mantra {
  font-family: var(--font-serif-sacred);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  color: var(--text-mantra);
  text-shadow: 0 0 30px rgba(243, 198, 68, 0.35);
  margin: 0;
  letter-spacing: 0.04em;
  line-height: 1.25;
}

.mantra-translation {
  font-size: clamp(0.9rem, 1.8vw, 1.15rem);
  color: var(--text-secondary);
  margin: 0.4rem 0 0.2rem 0;
  font-weight: 300;
  letter-spacing: 0.06em;
}

.mantra-subtext {
  font-size: clamp(0.8rem, 1.2vw, 0.95rem);
  color: var(--text-secondary);
  opacity: 0.85;
  margin: 0;
  max-width: 580px;
}

/* Symmetrical 4-Gateway Grid (~42% viewport height) */
.gateway-grid-container {
  position: relative;
  z-index: 1;
  width: 100%;
  display: flex;
  justify-content: center;
  margin: 0 auto;
  flex-shrink: 0;
}

.gateway-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
  z-index: 1;
}

/* Frosted Glass Card */
.gateway-card {
  background: var(--bg-glass);
  backdrop-filter: var(--blur-glass);
  -webkit-backdrop-filter: var(--blur-glass);
  border: 1px solid var(--border-gold-subtle);
  border-radius: 18px;
  padding: 1.25rem 1rem;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  min-height: 150px;
  justify-content: center;
  cursor: pointer;
  user-select: none;
}

.gateway-card:hover, .gateway-card:focus-visible {
  transform: translateY(-5px);
  border-color: var(--border-gold-hover);
  background: var(--bg-glass-hover);
  box-shadow: var(--shadow-card-hover);
  outline: none;
}

.gateway-card:hover .card-icon-wrapper,
.gateway-card:focus-visible .card-icon-wrapper {
  transform: scale(1.08);
  filter: drop-shadow(0 0 12px rgba(243, 198, 68, 0.6));
}

.card-icon-wrapper {
  margin-bottom: 0.75rem;
  transition: transform 0.3s ease, filter 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gold-icon {
  width: 42px;
  height: 42px;
  stroke: var(--gold-primary);
  fill: none;
  stroke-width: 1.5;
}

.card-headings {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.card-title-en {
  font-family: var(--font-devanagari);
  font-size: 1rem;
  letter-spacing: 0.12em;
  color: var(--text-primary);
  margin: 0;
  font-weight: 600;
}

.card-title-hi {
  font-size: 0.9rem;
  color: var(--gold-primary);
  margin-top: 0.2rem;
  display: block;
}

.card-subtext {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 0.4rem;
}

/* Subtle Audio / Bottom Accent (Remaining height) */
.sanctuary-footer {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  padding: 0.75rem 0 calc(0.75rem + var(--safe-bottom, 0px)) 0;
  flex-shrink: 0;
}

.ambient-indicator {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-glass);
  border: 1px solid var(--border-gold-subtle);
  border-radius: 999px;
  padding: 10px 22px 10px 18px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  user-select: none;
  width: 100%;
  max-width: 580px;
  box-sizing: border-box;
  text-align: left;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35), 0 0 12px rgba(212, 175, 55, 0.06);
}

.ambient-indicator:hover, .ambient-indicator:focus-visible {
  border-color: var(--border-gold-hover);
  background: var(--bg-glass-hover);
  box-shadow: 0 6px 26px rgba(212, 175, 55, 0.24);
  transform: translateY(-2px);
  outline: none;
}

.flame-dot {
  font-size: 1.3rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  animation: flameFlicker 2.5s ease-in-out infinite alternate;
}

@keyframes flameFlicker {
  0% { transform: scale(0.95); opacity: 0.85; filter: drop-shadow(0 0 2px #f59e0b); }
  50% { transform: scale(1.12) rotate(-2deg); opacity: 1; filter: drop-shadow(0 0 9px #f59e0b); }
  100% { transform: scale(1.02) rotate(2deg); opacity: 0.95; filter: drop-shadow(0 0 6px #eab308); }
}

.resume-pill-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
  gap: 2px;
}

.resume-pill-sub {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  line-height: 1.2;
}

.resume-pill-tag {
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold-glow);
  font-size: 0.68rem;
  white-space: nowrap;
}

.resume-pill-bullet {
  color: var(--text-muted);
  font-size: 0.65rem;
  opacity: 0.6;
}

.resume-pill-door {
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.76rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.resume-pill-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.01em;
}

.resume-pill-arrow-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 50%;
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid rgba(212, 175, 55, 0.28);
  color: var(--gold-glow);
  flex-shrink: 0;
  transition: all 0.22s ease;
}

.ambient-indicator:hover .resume-pill-arrow-btn {
  background: rgba(212, 175, 55, 0.28);
  border-color: var(--gold-primary);
  transform: translateX(3px);
}

.progress-pill {
  font-size: 0.82rem;
  color: var(--text-mantra);
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* ==========================================================================
   DISTRACTION-FREE SANCTUARY VIEW (ALL 4 DOORS)
   Rule: Zero bottom navigation bar. Locked into reading view.
   Single Home Button at Top Left (⌂ Gateway)
   ========================================================================== */
.sanctuary-view {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-core);
}

.sanctuary-top-bar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(10px + var(--safe-top)) 16px 12px 16px;
  background: var(--bg-glass);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border-subtle);
}

/* Top Left Single Exit Button (Pure Home Icon) */
.sanctuary-home-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: var(--radius-md);
  background: var(--bg-surface-elevated);
  border: 1.5px solid var(--border-subtle);
  color: var(--gold-300);
  cursor: pointer;
  transition: var(--transition);
  outline: none;
  flex-shrink: 0;
}

.sanctuary-home-btn:hover {
  background: var(--gold-500);
  color: #000;
  border-color: var(--gold-400);
  transform: translateY(-1px);
}

.sanctuary-home-btn i {
  width: 20px;
  height: 20px;
}

.sanctuary-title-group {
  text-align: center;
  flex: 1;
  padding: 0 12px;
  min-width: 0;
  overflow: visible !important;
}

.sanctuary-heading {
  font-family: var(--font-sanskrit);
  font-size: clamp(0.95rem, 3.8vw, 1.15rem) !important;
  font-weight: 700;
  line-height: 1.55 !important;
  padding-top: 4px;
  padding-bottom: 2px;
  white-space: nowrap;
  overflow: visible !important;
  color: var(--heading-sanskrit-color);
}

.sanctuary-subheading {
  font-size: clamp(0.68rem, 2.5vw, 0.78rem) !important;
  color: var(--text-muted);
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sanctuary-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.sanctuary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface-elevated);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 1.1rem;
  transition: var(--transition);
}

.sanctuary-btn:hover {
  color: var(--gold-400);
  border-color: var(--border-strong);
  transform: translateY(-1px);
}

.sanctuary-btn i {
  width: 18px;
  height: 18px;
}

/* Compact Language Dropdown with Badge Pill */
.lang-wrap-compact {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  min-width: 58px;
  border-radius: var(--radius-md);
  background: var(--bg-surface-elevated);
  border: 1.5px solid var(--border-medium);
  cursor: pointer;
  transition: var(--transition);
  box-sizing: border-box;
}

.lang-wrap-compact:hover,
.lang-wrap-compact:focus-within {
  border-color: var(--gold-400);
  box-shadow: 0 0 10px rgba(234, 179, 8, 0.25);
}

.lang-badge-display {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0 8px;
  pointer-events: none;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-primary);
  user-select: none;
}

.lang-globe-ico {
  font-size: 0.85rem;
  line-height: 1;
}

.lang-code-badge {
  font-family: var(--font-sans);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--gold-300);
  font-weight: 800;
}

.lang-arrow-ico {
  font-size: 0.65rem;
  color: var(--text-muted);
  line-height: 1;
}

/* Invisible overlay native select that triggers full picker dialog */
.lang-wrap-compact select.gita-lang-dropdown {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  font-size: 16px;
  -webkit-appearance: none;
  appearance: none;
}

/* Sanctuary Stage Wrapper (Single Scrollable Content Area with 110px Bottom Guard) */
.sanctuary-stage-wrapper {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px 16px calc(110px + var(--safe-bottom)) 16px;
  width: 100%;
  flex: 1;
}

/* ==========================================================================
   DOOR 1: MANDIR & AARTI SANCTUM
   ========================================================================== */
.mandir-sanctum-card {
  position: relative;
  border-radius: var(--radius-xl);
  padding: 12px 16px 14px 16px;
  background: var(--mandir-card-bg);
  border: 1.5px solid var(--border-medium);
  box-shadow: var(--shadow-mandir);
  text-align: center;
  margin-bottom: 14px;
  overflow: hidden;
}

.pooja-instruments-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin-bottom: 6px;
}

.instrument-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  cursor: pointer;
}

.diya-base {
  font-size: 1.65rem;
  line-height: 1;
}

.diya-flame {
  width: 9px;
  height: 16px;
  background: radial-gradient(ellipse at 50% 80%, #fff 0%, #fef08a 25%, #f59e0b 60%, #ea580c 90%, transparent 100%);
  border-radius: 50% 50% 20% 20% / 60% 60% 40% 40%;
  margin-bottom: -3px;
  filter: drop-shadow(0 0 8px #f59e0b);
  animation: flameFlicker 1.8s infinite ease-in-out;
  transform-origin: 50% 90%;
}

@keyframes flameFlicker {
  0%, 100% { transform: scale(1) rotate(-1deg); opacity: 0.95; }
  25% { transform: scale(1.08, 0.94) rotate(1.5deg); opacity: 1; }
  50% { transform: scale(0.96, 1.05) rotate(-2deg); opacity: 0.92; }
  75% { transform: scale(1.04, 1.02) rotate(1deg); opacity: 1; }
}

.sanctum-center-badge {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle, rgba(234, 179, 8, 0.28) 0%, rgba(20, 13, 8, 0.8) 70%);
  border: 1.5px solid var(--gold-400);
  box-shadow: 0 0 16px rgba(234, 179, 8, 0.3);
}

.om-glow-symbol {
  font-family: var(--font-sanskrit);
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--gold-300);
  text-shadow: 0 0 12px rgba(253, 224, 71, 0.6);
  line-height: 1;
}

.incense-icon {
  font-size: 1.5rem;
  line-height: 1;
}

.smoke-particle {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  position: absolute;
  top: -6px;
  filter: blur(2px);
  animation: smokeRise 2.4s infinite ease-out;
}

.smoke-particle:nth-child(2) {
  animation-delay: 1.2s;
  left: 55%;
}

@keyframes smokeRise {
  0% { transform: translate(0, 0) scale(1); opacity: 0.7; }
  100% { transform: translate(-8px, -24px) scale(2.2); opacity: 0; }
}

/* Sacred Acoustic Actions inside Sanctum (Bell & Shankh) */
.sanctum-acoustic-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 6px;
}

.sanctum-acoustic-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  background: var(--bg-surface-elevated);
  border: 1.5px solid var(--border-medium);
  color: var(--text-primary);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  outline: none !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.sanctum-acoustic-btn:hover,
.sanctum-acoustic-btn:focus-visible {
  border-color: var(--gold-400);
  color: var(--gold-300);
  background: var(--bg-card-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(234, 179, 8, 0.3);
}

.sanctum-acoustic-btn:active {
  transform: scale(0.96);
}

.sanctum-acoustic-btn .acoustic-emoji {
  font-size: 1.05rem;
  line-height: 1;
}

.sanctum-acoustic-btn .acoustic-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.2px;
}

[data-theme="light"] .sanctum-acoustic-btn {
  background: #ffffff;
  border-color: rgba(180, 83, 9, 0.28);
  color: #78350f;
  box-shadow: 0 2px 8px rgba(180, 83, 9, 0.1);
}

[data-theme="light"] .sanctum-acoustic-btn:hover,
[data-theme="light"] .sanctum-acoustic-btn:focus-visible {
  background: #fef3c7;
  border-color: #b45309;
  color: #92400e;
  box-shadow: 0 4px 14px rgba(180, 83, 9, 0.22);
}

.sanctum-instruction {
  font-size: 0.74rem;
  color: var(--gold-300);
  font-weight: 500;
  margin: 0;
  line-height: 1.25;
}

/* Aarti Selector Dropdown Bar */
.aarti-picker-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  background: var(--bg-card);
  padding: 12px 16px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-medium);
  position: relative;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.picker-label {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
}

.picker-wrap {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  min-width: 0;
  max-width: 100%;
  left: 0;
  right: 0;
  box-sizing: border-box;
}

.aarti-dropdown {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  appearance: none;
  -webkit-appearance: none;
  background: var(--bg-surface-elevated);
  border: 1.5px solid var(--border-subtle);
  color: var(--text-primary);
  font-family: var(--font-sanskrit);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 10px 36px 10px 14px;
  border-radius: var(--radius-md);
  cursor: pointer;
  outline: none;
  transition: var(--transition);
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

.aarti-dropdown.compact-title {
  font-size: 0.84rem;
  padding: 10px 34px 10px 12px;
}

.aarti-dropdown:focus {
  border-color: var(--gold-400);
  box-shadow: 0 0 12px rgba(234, 179, 8, 0.2);
}

.aarti-dropdown option {
  max-width: 100%;
  box-sizing: border-box;
  background: var(--bg-surface-elevated, #1a1715);
  color: var(--text-primary, #f5f0e8);
}

.picker-chevron {
  position: absolute;
  right: 12px;
  pointer-events: none;
  width: 18px;
  height: 18px;
  color: var(--text-muted);
}

/* Aarti Lyrics Card */
.lyrics-card {
  border-radius: var(--radius-xl);
  padding: 28px 24px;
  background: var(--bg-card);
  border: 1.5px solid var(--border-subtle);
  box-shadow: var(--shadow-md);
}

.lyrics-card-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 20px;
}

.aarti-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.aarti-title {
  font-family: var(--font-sanskrit);
  font-size: clamp(1.18rem, 3.8vw, 1.45rem);
  font-weight: 700;
  color: var(--heading-sanskrit-color);
  margin: 0;
  line-height: 1.35;
  flex: 1;
  min-width: 0;
}

.aarti-deity {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin: 0;
}

.lyrics-lang-toggle {
  flex-shrink: 0;
  display: flex;
  align-items: flex-start;
  padding-top: 2px;
}

.lyrics-chip-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-medium);
  background: var(--bg-surface-elevated);
  color: var(--text-secondary);
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
  line-height: 1.2;
}

.lyrics-chip-btn:hover {
  border-color: var(--gold-400);
  color: var(--text-gold);
}

.lyrics-body {
  font-family: var(--font-sanskrit);
  font-size: 1.15rem;
  line-height: 2;
  color: var(--text-primary);
  text-align: center;
  white-space: pre-line;
}

.lyrics-verse-stanza {
  margin-bottom: 24px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  transition: background-color 0.2s;
}

.lyrics-verse-stanza:hover {
  background: rgba(234, 179, 8, 0.05);
}

/* ==========================================================================
   DOOR 2: BHAGAVAD GITA & DOOR 4: SHASTRAS CARDS
   ========================================================================== */
.chapter-nav-bar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.chapter-nav-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 48px;
  padding: 12px 16px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1.5px solid var(--border-medium);
  color: var(--text-primary);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  outline: none;
  min-width: 0;
  gap: 10px;
}

.chapter-nav-btn:hover {
  border-color: var(--gold-400);
  box-shadow: 0 0 16px rgba(234, 179, 8, 0.18);
}

.chapter-nav-btn span {
  flex: 1;
  min-width: 0;
  text-align: left;
  line-height: 1.35;
  word-break: break-word;
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.nav-compass-ico {
  width: 18px;
  height: 18px;
  color: var(--gold-400);
  flex-shrink: 0;
}

.nav-chevron-ico {
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.verse-badge {
  font-size: 0.75rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: var(--badge-bg);
  color: var(--badge-text);
  border: 1px solid var(--badge-border);
}

/* Paging Control Bar for Shastras */
.paging-control-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  position: relative;
  left: 0;
  right: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.adhyaya-filter-select {
  flex: 1;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

.adhyaya-filter-select option {
  max-width: 100%;
  box-sizing: border-box;
  background: var(--bg-surface-elevated, #1a1715);
  color: var(--text-primary, #f5f0e8);
}

.paging-info-badge {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Shloka Reading Card */
.shloka-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  padding: 30px 24px;
  background: var(--bg-card);
  border: 1.5px solid var(--border-subtle);
  box-shadow: var(--shadow-md);
  margin-bottom: 24px;
}

.card-watermark {
  position: absolute;
  top: -20px;
  right: -20px;
  width: 180px;
  height: 180px;
  color: var(--gold-500);
  opacity: 0.04;
  pointer-events: none;
}

.card-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.speaker-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-sanskrit);
  font-size: 0.85rem !important;
  font-weight: 700;
  color: var(--badge-text);
  background: var(--badge-bg);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  border: 1px solid var(--badge-border);
  white-space: nowrap !important;
  max-width: 58% !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  flex-shrink: 0;
}

.speaker-ico {
  width: 14px;
  height: 14px;
}

.card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border-radius: var(--radius-md);
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
  touch-action: manipulation;
}

.card-action-btn:hover {
  color: var(--gold-300);
  border-color: var(--border-strong);
}

.card-action-btn i {
  width: 18px;
  height: 18px;
}

/* Sanskrit Verse Block */
.sanskrit-block {
  text-align: center;
  margin-bottom: 24px;
  padding: 16px;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(234, 179, 8, 0.05) 0%, transparent 100%);
  border: 1px dashed var(--border-subtle);
}

.sanskrit-text {
  font-family: var(--font-sanskrit);
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.8;
  color: var(--sanskrit-verse-color);
  margin-bottom: 12px;
  letter-spacing: 0.5px;
}

.verse-tags-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--text-muted);
  padding-top: 8px;
  border-top: 1px solid var(--border-subtle);
}

.swipe-hint {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.swipe-hint i {
  width: 13px;
  height: 13px;
}

/* Transliteration Block */
.translit-block {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 24px;
  padding: 0 12px;
}

/* Padachheda Detail Accordion */
.detail-accordion {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface-elevated);
  margin-bottom: 22px;
  overflow: hidden;
}

.detail-acc-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.detail-acc-title {
  display: flex;
  align-items: center;
  gap: 8px;
}
.detail-acc-title i {
  width: 16px;
  height: 16px;
  color: var(--gold-400);
}

.acc-chevron {
  width: 16px;
  height: 16px;
  transition: transform 0.2s ease;
}

.detail-accordion.open .acc-chevron {
  transform: rotate(180deg);
}

.detail-acc-body {
  display: none;
  padding: 14px 16px;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

.detail-accordion.open .detail-acc-body {
  display: block;
}

.word-chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.word-chip {
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  font-size: 0.82rem;
}

.word-chip strong {
  font-family: var(--font-sanskrit);
  color: var(--gold-300);
}

/* Translation Block */
.translation-block {
  padding: 18px 20px;
  border-radius: var(--radius-lg);
  background: rgba(0, 0, 0, 0.25);
  border-left: 3px solid var(--gold-500);
  margin-bottom: 26px;
}

.translation-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--gold-400);
  margin-bottom: 8px;
}
.translation-label i {
  width: 14px;
  height: 14px;
}

.translation-text {
  font-size: 1.02rem;
  line-height: 1.7;
  color: var(--text-primary);
}

/* Card Navigation Footer & Audio Controls Upgrade */
.card-footer {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-top: 18px;
  border-top: 1px solid var(--border-subtle);
}

.footer-nav-group {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 12px;
}

.audio-controls-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding-top: 6px;
  border-top: 1px dashed var(--border-subtle);
}

.audio-tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--radius-full);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-medium);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.audio-tool-btn:hover {
  border-color: var(--gold-400);
  color: var(--gold-300);
}

.audio-tool-btn.active {
  background: rgba(234, 179, 8, 0.2);
  border-color: var(--gold-400);
  color: var(--gold-300);
  box-shadow: 0 0 12px rgba(234, 179, 8, 0.25);
}

/* Nav Bar Row & Quick Jump Direct Badge */
.nav-bar-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
  width: 100%;
}

.chapter-nav-btn {
  flex: 1;
}

.quick-jump-badge {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6px 14px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1.5px solid var(--border-medium);
  color: var(--text-primary);
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
  min-width: 78px;
}

.quick-jump-badge:hover {
  border-color: var(--gold-400);
  box-shadow: 0 0 14px rgba(234, 179, 8, 0.25);
  transform: translateY(-1px);
}

.jump-sub-tag {
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--gold-400);
  text-transform: uppercase;
  margin-top: 1px;
}

/* Transliteration Tier 1-Tap Toggle */
.translit-tier-header {
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
}

.phonetics-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: var(--radius-full);
  background: rgba(234, 179, 8, 0.1);
  border: 1px solid var(--border-medium);
  color: var(--gold-300);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.phonetics-pill-btn:hover {
  background: var(--gold-500);
  color: #000;
}

.phonetics-pill-btn:not(.active) {
  opacity: 0.55;
  background: transparent;
  color: var(--text-muted);
}

.translit-block.hidden {
  display: none !important;
}

/* Touch Friendly Vedas Tabs */
.vedas-nav-tabs {
  display: flex;
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  gap: 8px;
  padding: 8px 4px 12px 4px;
  margin-bottom: 16px;
}
.vedas-nav-tabs::-webkit-scrollbar {
  display: none;
}

.nav-btn {
  flex: 1 1 0%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  height: 48px;
  padding: 0 16px;
  border-radius: 14px;
  background: var(--bg-surface-elevated, #ffffff);
  border: 1px solid var(--border-subtle, rgba(0, 0, 0, 0.12));
  color: var(--text-primary, #2b1810);
  font-size: 0.94rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  box-sizing: border-box;
  white-space: nowrap;
}

.nav-btn:hover:not(:disabled) {
  border-color: #d97706;
  color: #d97706;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.12);
}

.nav-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none;
}

.nav-btn i,
.nav-btn svg {
  width: 18px;
  height: 18px;
  stroke-width: 2.4px;
  flex-shrink: 0;
}

/* Center Glowing Circular Speaker Button (Image 2) */
.chant-btn {
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  min-width: 48px;
  min-height: 48px;
  max-width: 48px;
  max-height: 48px;
  border-radius: 50%;
  padding: 0;
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #ffffff;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 14px rgba(217, 119, 6, 0.45), 0 0 0 3px rgba(245, 158, 11, 0.18);
  box-sizing: border-box;
  position: relative;
  z-index: 2;
}

.chant-btn:hover {
  transform: scale(1.06);
  box-shadow: 0 6px 18px rgba(217, 119, 6, 0.6), 0 0 0 4px rgba(245, 158, 11, 0.25);
}

.chant-btn.playing {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.35), 0 4px 18px rgba(220, 38, 38, 0.65);
}

.chant-btn i,
.chant-btn svg {
  width: 22px;
  height: 22px;
  stroke: #ffffff;
  stroke-width: 2.3px;
  margin: 0;
}

.chant-btn span {
  display: none !important;
}

/* ==========================================================================
   DOOR 3: THE SACRED VEDAS (चतुर्वेद दर्शनम्)
   Complete Design System matching the Canonical Portal (the-vedas)
   ========================================================================== */

/* ==========================================================================
   UNIFIED TOP CONTROLS BAR (View Dropdown + Veda Filter Dropdown + Saved Icon)
   ========================================================================== */
.vedas-top-controls-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  width: 100%;
}
.top-ctrl-dropdown-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 0;
}
.top-ctrl-dropdown-wrapper.view-dropdown-wrapper {
  flex: 1 1 50%;
}
.top-ctrl-dropdown-wrapper.filter-dropdown-wrapper {
  flex: 1 1 50%;
}
.top-ctrl-icon {
  position: absolute;
  left: 10px;
  width: 14px;
  height: 14px;
  color: var(--gold-400);
  pointer-events: none;
  z-index: 1;
}
.top-ctrl-select {
  width: 100%;
  height: 38px;
  padding: 0 10px 0 30px;
  font-size: 12.5px;
  font-weight: 600;
  font-family: inherit;
  color: var(--text-primary);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  outline: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23d97706' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  transition: all 0.2s ease;
}
.top-ctrl-select:focus {
  border-color: var(--gold-400);
  box-shadow: 0 0 0 2px var(--gold-glow);
}
.top-ctrl-saved-btn {
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface-elevated);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}
.top-ctrl-saved-btn:hover,
.top-ctrl-saved-btn.active {
  background: var(--gold-gradient);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 2px 10px var(--gold-glow);
}
.top-ctrl-saved-btn i {
  width: 16px;
  height: 16px;
}
.saved-count-bubble {
  position: absolute;
  top: -3px;
  right: -3px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: var(--radius-full);
  background: var(--sacred-red, #dc2626);
  color: #fff;
  font-size: 9.5px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

/* Vedas 4-Tab Navigation Capsule */
.vedas-tab-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 6px;
  margin-bottom: 20px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.vedas-tab-nav::-webkit-scrollbar {
  display: none;
}
.vedas-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  touch-action: manipulation;
}
.vedas-tab-btn i {
  width: 15px;
  height: 15px;
}
.vedas-tab-btn:hover {
  color: var(--text-primary);
  background: var(--bg-card-hover);
}
.vedas-tab-btn.active {
  background: var(--gold-gradient);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 3px 12px var(--gold-glow);
}

.vedas-tab-view {
  display: none;
  animation: vedasFadeIn 0.25s ease forwards;
}
.vedas-tab-view.active {
  display: block;
}
@keyframes vedasFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================
   TAB 1: 4 VEDAS OVERVIEW GRID
   ========================================== */
.vedas-hero-banner {
  text-align: center;
  padding: 14px 12px 18px;
}
.section-hero-title {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 6px;
  line-height: 1.45;
}

.section-hero-title .title-hi,
.section-hero-title .title-en,
.matrix-title .title-hi,
.matrix-title .title-en {
  display: inline;
}

@media (max-width: 768px) {
  .section-hero-title .title-en,
  .matrix-title .title-en {
    display: block !important;
    margin-top: 4px;
    font-size: 0.88em;
    font-weight: 500;
  }
}
.section-hero-desc {
  font-size: 13.5px;
  color: var(--text-secondary);
  max-width: 680px;
  margin: 0 auto;
  line-height: 1.5;
}

/* Grand Vedic Corpus Statistics Banner */
.vedic-corpus-banner {
  background: var(--bg-card);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 18px 20px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}
.vedic-corpus-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gold-gradient);
}
.corpus-banner-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.om-tag {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--gold-gradient);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-sanskrit);
  font-size: 18px;
  font-weight: bold;
  box-shadow: 0 2px 8px var(--gold-glow);
  flex-shrink: 0;
}
.corpus-header-text {
  display: flex;
  flex-direction: column;
}
.corpus-banner-title {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
}
.corpus-banner-title strong {
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-size: 18px;
}
.corpus-banner-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}
.corpus-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.corpus-stat-card {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface-elevated);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  user-select: none;
}
.corpus-stat-card:hover {
  transform: translateY(-3px);
  border-color: var(--gold-400);
  box-shadow: 0 6px 20px rgba(217, 119, 6, 0.18);
}
.corpus-stat-card:active {
  transform: translateY(-1px);
}
.corpus-stat-card .c-v-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
}
.corpus-stat-card .c-v-count {
  font-family: var(--font-heading);
  font-size: 13.5px;
  font-weight: 800;
  color: var(--saffron-primary);
}
.corpus-stat-card .c-v-detail {
  font-size: 10.5px;
  color: var(--text-muted);
  font-weight: 500;
}
.corpus-stat-card.stat-rig { border-left: 3px solid #ea580c; }
.corpus-stat-card.stat-yajur { border-left: 3px solid #7c3aed; }
.corpus-stat-card.stat-sama { border-left: 3px solid #0284c7; }
.corpus-stat-card.stat-atharva { border-left: 3px solid #059669; }

/* Vedas 4 Overview Grid */
.vedas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.veda-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease, border-color 0.25s ease;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  user-select: none;
}
.veda-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--veda-color, var(--gold-primary));
}
.veda-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(217, 119, 6, 0.16);
  border-color: var(--veda-color, var(--gold-primary));
}
.veda-card:active {
  transform: translateY(-1px);
}
.veda-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
}
.veda-icon-box {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-lg);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.veda-icon-box i {
  width: 22px;
  height: 22px;
}
.veda-title-area h3 {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}
.veda-name-sub {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
}
.veda-slogan {
  font-size: 12px;
  color: var(--saffron-primary);
  font-weight: 600;
}
.veda-stats-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}
.stat-pill i {
  width: 12px;
  height: 12px;
}
.veda-desc-text {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}
.veda-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  background: var(--bg-surface-elevated);
  padding: 10px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  font-size: 11.5px;
}
.veda-meta-item strong {
  display: block;
  color: var(--text-muted);
  font-size: 10.5px;
  text-transform: uppercase;
  margin-bottom: 2px;
}
.veda-layers-box {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11.5px;
  color: var(--text-secondary);
}
.layer-item {
  display: flex;
  align-items: baseline;
  gap: 6px;
  line-height: 1.4;
}
.layer-badge {
  font-weight: 700;
  color: var(--gold-400);
  background: var(--saffron-light);
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 10px;
  flex-shrink: 0;
}
.veda-card-actions {
  margin-top: auto;
  padding-top: 8px;
}
.veda-explore-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--veda-color, var(--gold-primary));
  background: transparent;
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.veda-explore-btn:hover {
  background: var(--veda-color, var(--gold-primary));
  color: #fff;
  box-shadow: 0 4px 12px var(--gold-glow);
}

/* ==========================================
   TAB 2: MANTRA READER SANCTUM
   ========================================== */
.mantra-sanctum {
  max-width: 820px;
  margin: 0 auto;
}
.reader-corpus-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 14px;
  margin-bottom: 12px;
  border-radius: var(--radius-md);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  font-size: 12px;
}
.rc-left {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-primary);
  font-weight: 600;
}
.rc-om {
  color: var(--gold-400);
  font-family: var(--font-sanskrit);
  font-size: 14px;
  font-weight: bold;
}
.rc-left strong {
  color: var(--saffron-primary);
  font-weight: 800;
}
.rc-breakdown {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
}
.rc-item.rig { color: #ea580c; font-weight: 700; }
.rc-item.yajur { color: #7c3aed; font-weight: 700; }
.rc-item.sama { color: #0284c7; font-weight: 700; }
.rc-item.atharva { color: #059669; font-weight: 700; }
.rc-sep { opacity: 0.4; }

.veda-filter-pills {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 10px;
  margin-bottom: 12px;
  scrollbar-width: none;
}
.veda-filter-pills::-webkit-scrollbar {
  display: none;
}
.filter-pill {
  flex-shrink: 0;
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface-elevated);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.filter-pill:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}
.filter-pill.active {
  background: var(--gold-gradient);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 2px 8px var(--gold-glow);
}

.holy-mantra-card {
  position: relative;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 20px 24px;
  box-shadow: var(--shadow-md);
  margin-bottom: 24px;
  overflow: hidden;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.card-watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 320px;
  height: 320px;
  opacity: 0.04;
  pointer-events: none;
  z-index: 0;
  color: var(--gold-primary);
}
[data-theme="dark"] .card-watermark {
  opacity: 0.06;
}
.mantra-card-header {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 12px;
}
.veda-picker-banner {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  cursor: pointer;
  color: var(--text-primary);
  transition: all 0.2s;
}
.veda-picker-banner:hover {
  background: var(--bg-card-hover);
  border-color: var(--gold-400);
}
.banner-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.banner-left i {
  width: 16px;
  height: 16px;
  color: var(--gold-400);
  flex-shrink: 0;
}
.banner-title-stack {
  display: flex;
  flex-direction: column;
  text-align: left;
  min-width: 0;
}
.banner-main-title {
  font-family: var(--font-heading);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--saffron-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.banner-sub-title {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.banner-right {
  display: flex;
  align-items: center;
  gap: 6px;
}
.counter-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 12px;
  background: var(--gold-gradient);
  color: #fff;
}

/* Streamlined Scripture Control Toolbar: Dropdown on Left + Numbers Selection on Right */
.sukta-control-toolbar,
.sukta-selection-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin: 10px 0 14px;
}

.sukta-select-wrapper {
  position: relative;
  flex: 1 1 260px;
  min-width: 200px;
  display: flex;
  align-items: center;
}

.sukta-select-icon,
.sukta-select-ico {
  position: absolute;
  left: 10px;
  width: 15px;
  height: 15px;
  color: var(--gold-400);
  pointer-events: none;
}

.sukta-select-dropdown,
.vedas-sukta-select {
  width: 100%;
  padding: 8px 10px 8px 32px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface-elevated);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sukta-select-dropdown:hover, .sukta-select-dropdown:focus,
.vedas-sukta-select:hover, .vedas-sukta-select:focus {
  border-color: var(--gold-400);
  outline: none;
  box-shadow: 0 0 0 2px rgba(217, 119, 6, 0.15);
}

/* Shloka Number Pills Row Sitting Directly to the Right of Dropdown */
.sukta-shloka-pills-row {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding: 4px 0;
}
.sukta-shloka-pills-row::-webkit-scrollbar {
  display: none;
}
.sukta-shloka-pill {
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  min-width: 38px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm, 8px);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface-elevated);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  touch-action: manipulation;
}
.sukta-shloka-pill:hover {
  border-color: var(--gold-400);
  color: var(--text-primary);
  background: var(--bg-card-hover);
}
.sukta-shloka-pill.active {
  background: var(--gold-gradient);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 2px 6px var(--gold-glow);
}

/* Row 2: Metadata Subheader on Left + Action Icons on Right */
.mantra-meta-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11.5px;
  line-height: 1.3;
  padding-top: 0;
  border-top: none;
}
.meta-tags-streamlined {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}

.sukta-tools-cluster {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.sukta-tool-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  padding: 8px;
  border-radius: 50%;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface-elevated);
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
  touch-action: manipulation;
}
.sukta-tool-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--gold-400);
  color: var(--text-primary);
}
.sukta-tool-btn i {
  width: 16px;
  height: 16px;
  color: var(--gold-400);
}
.meta-tag-highlight {
  font-weight: 700;
  color: var(--saffron-primary);
  background: var(--saffron-light);
  padding: 1px 7px;
  border-radius: 4px;
  font-size: 11px;
}
.meta-tag-sep {
  color: var(--text-muted);
  font-size: 10px;
  opacity: 0.6;
}
.meta-tag-sub {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 11.5px;
  white-space: nowrap;
}
.meta-counter-box {
  flex-shrink: 0;
}

/* All Verses Continuous Scroll View */
.all-mantras-view {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 10px;
}
.sukta-full-verse-card {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.sukta-full-verse-card:hover {
  border-color: var(--gold-400);
  box-shadow: 0 3px 12px rgba(217, 119, 6, 0.08);
}
.sfv-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px dashed var(--border-subtle);
}
.sfv-badge {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--gold-400);
  background: rgba(217, 119, 6, 0.1);
  padding: 2px 8px;
  border-radius: 10px;
}
.sfv-dive-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid var(--border-subtle);
  padding: 3px 8px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
}
.sfv-dive-btn:hover {
  color: var(--saffron-primary);
  border-color: var(--saffron-primary);
  background: var(--bg-card-hover);
}
.sfv-sanskrit {
  font-family: var(--font-sanskrit);
  font-size: 19px;
  line-height: 1.7;
  color: var(--sanskrit-color);
  font-weight: 500;
  text-align: center;
  margin-bottom: 8px;
  white-space: pre-line;
}
.sfv-translit {
  font-size: 12.5px;
  color: var(--text-muted);
  font-style: italic;
  text-align: center;
  margin-bottom: 10px;
  line-height: 1.5;
  white-space: pre-line;
}
.sfv-meaning {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-card);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border-left: 3px solid var(--gold-400);
}

.mantra-meta-chips {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.meta-tags-left {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
}
.meta-chip {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}
.meta-chip.chip-accent {
  background: var(--saffron-light);
  color: var(--saffron-primary);
  border-color: rgba(234, 88, 12, 0.3);
}
.meta-actions-right {
  display: flex;
  align-items: center;
  gap: 6px;
}
.action-icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface-elevated);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.action-icon-btn i {
  width: 15px;
  height: 15px;
}
.action-icon-btn:hover {
  color: var(--saffron-primary);
  border-color: var(--saffron-primary);
  background: var(--bg-card-hover);
}
.action-icon-btn.bookmarked {
  background: var(--saffron-primary);
  color: #fff;
  border-color: transparent;
}

/* Sanskrit Verse */
.sanskrit-verse-block {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 16px 12px 14px;
}
.sanskrit-verse-block .sanskrit-text {
  font-family: var(--font-sanskrit);
  font-size: 22px;
  line-height: 1.8;
  color: var(--sanskrit-color);
  font-weight: 500;
  letter-spacing: 0.5px;
  white-space: pre-line;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
.transliteration-box {
  position: relative;
  z-index: 1;
  font-family: var(--font-heading);
  font-size: 13.5px;
  color: var(--text-secondary);
  text-align: center;
  line-height: 1.6;
  font-style: italic;
  white-space: pre-line;
  padding: 0 12px 16px;
}
.translation-box {
  position: relative;
  z-index: 1;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  margin-bottom: 18px;
}
.translation-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--gold-400);
  text-transform: uppercase;
  margin-bottom: 6px;
}
.translation-label i {
  width: 14px;
  height: 14px;
}
.translation-body {
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.6;
}

/* Mantra Controls (Prev / Recite / Next) — Image 2 Standard */
.mantra-controls-row {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  width: 100%;
}
.nav-arrow-btn {
  flex: 1 1 0%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  height: 48px;
  padding: 0 16px;
  border-radius: 14px;
  border: 1px solid var(--border-subtle, rgba(0, 0, 0, 0.12));
  background: var(--bg-surface-elevated, #ffffff);
  color: var(--text-primary, #2b1810);
  font-size: 0.94rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  box-sizing: border-box;
  white-space: nowrap;
}
.nav-arrow-btn i,
.nav-arrow-btn svg {
  width: 18px;
  height: 18px;
  stroke-width: 2.4px;
  flex-shrink: 0;
}
.nav-arrow-btn:hover:not(:disabled) {
  border-color: #d97706;
  color: #d97706;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.12);
}
.nav-arrow-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none;
}
.chant-audio-btn {
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  min-width: 48px;
  min-height: 48px;
  max-width: 48px;
  max-height: 48px;
  padding: 0;
  margin: 0;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(217, 119, 6, 0.45), 0 0 0 3px rgba(245, 158, 11, 0.18);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
  position: relative;
  z-index: 2;
}
.chant-audio-btn i,
.chant-audio-btn svg {
  width: 22px;
  height: 22px;
  stroke: #ffffff;
  stroke-width: 2.3px;
  margin: 0;
}
.chant-audio-btn:hover {
  transform: scale(1.06);
  box-shadow: 0 6px 18px rgba(217, 119, 6, 0.6), 0 0 0 4px rgba(245, 158, 11, 0.25);
}
.chant-audio-btn.playing {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.35), 0 4px 18px rgba(220, 38, 38, 0.65);
}
.chant-audio-btn span {
  display: none !important;
}

/* Accordions */
.accordion-box {
  position: relative;
  z-index: 1;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-surface-elevated);
  margin-bottom: 10px;
  overflow: hidden;
  transition: all 0.2s;
}
.accordion-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
}
.accordion-trigger-left {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-primary);
}
.accordion-trigger-left i {
  color: var(--gold-400);
  width: 16px;
  height: 16px;
}
.accordion-chevron {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  transition: transform 0.25s ease;
}
.accordion-box.open .accordion-chevron {
  transform: rotate(180deg);
}
.accordion-panel {
  display: none;
  padding: 12px 14px 14px;
  border-top: 1px solid var(--border-subtle);
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-secondary);
}
.accordion-box.open .accordion-panel {
  display: block;
}
.padapatha-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.padapatha-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  line-height: 1.5;
}
.pada-word {
  font-weight: 700;
  color: var(--saffron-primary);
  font-family: var(--font-sanskrit);
  font-size: 14px;
}
.pada-meaning {
  color: var(--text-primary);
}

/* Animations for Next/Prev card transitions */
.slide-left {
  transform: translateX(-40px);
  opacity: 0;
}
.slide-right {
  transform: translateX(40px);
  opacity: 0;
}
.slide-in-right {
  animation: slideInRight 0.22s ease-out forwards;
}
.slide-in-left {
  animation: slideInLeft 0.22s ease-out forwards;
}
@keyframes slideInRight {
  from { transform: translateX(35px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
@keyframes slideInLeft {
  from { transform: translateX(-35px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ==========================================
   TAB 3: THE 4 MAHAVAKYAS GRID
   ========================================== */
.mahavakyas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.mahavakya-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 18px 20px 16px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.25s ease,
              border-color 0.25s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  user-select: none;
}
.mahavakya-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold-400), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.mahavakya-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(217, 119, 6, 0.12);
  border-color: var(--gold-400);
}
.mahavakya-card:hover::before,
.mahavakya-card.card-open::before {
  opacity: 1;
}
.mahavakya-card.card-open {
  border-color: rgba(217, 119, 6, 0.45);
  box-shadow: 0 10px 28px rgba(217, 119, 6, 0.15);
}

.mv-card-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mv-top-badge {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.mv-veda-badge {
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  background: var(--saffron-light);
  color: var(--saffron-primary);
  display: flex;
  align-items: center;
  gap: 5px;
}
.mv-veda-badge i {
  width: 13px;
  height: 13px;
}
.mv-type-badge {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-muted);
}
.mv-sanskrit {
  font-family: var(--font-sanskrit);
  font-size: 26px;
  color: var(--sanskrit-color);
  line-height: 1.3;
  margin-top: 4px;
}
.mv-translit {
  font-family: var(--font-heading);
  font-size: 15px;
  font-style: italic;
  color: var(--gold-400);
}

/* Accordion Drawer Using CSS Grid Template Rows */
.mv-details-drawer {
  display: grid;
  grid-template-rows: 0fr;
  overflow: hidden;
  transition: grid-template-rows 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.25s ease,
              margin 0.25s ease;
  opacity: 0;
  margin-top: 0;
}
.mv-details-drawer.expanded {
  grid-template-rows: 1fr;
  overflow: visible;
  opacity: 1;
  margin-top: 4px;
}
.mv-details-inner {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mv-meaning-box {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 12px;
}
.mv-meaning-main {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}
.mv-meaning-sub {
  font-size: 12px;
  color: var(--text-muted);
}
.mv-citation-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 11.5px;
  color: var(--text-secondary);
}
.mv-wisdom-box {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-secondary);
  border-top: 1px solid var(--border-subtle);
  padding-top: 8px;
}
.mv-wisdom-box strong {
  display: block;
  font-size: 11px;
  color: var(--gold-400);
  margin-bottom: 2px;
}

/* Fancy Expand / Collapse Button */
.mv-fancy-expand-btn {
  margin-top: auto;
  padding: 8px 14px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.08) 0%, rgba(217, 119, 6, 0.04) 100%);
  border: 1px solid rgba(217, 119, 6, 0.25);
  border-radius: var(--radius-md, 12px);
  color: var(--gold-primary, #d97706);
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}
.mv-fancy-expand-btn:hover {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.16) 0%, rgba(217, 119, 6, 0.1) 100%);
  border-color: var(--gold-400);
  color: var(--gold-600, #b45309);
  box-shadow: 0 4px 14px rgba(217, 119, 6, 0.18);
  transform: translateY(-1px);
}
.mv-fancy-expand-btn:active {
  transform: translateY(0);
}
.mv-fancy-expand-btn.expanded {
  background: linear-gradient(135deg, rgba(217, 119, 6, 0.14) 0%, rgba(180, 83, 9, 0.08) 100%);
  border-color: var(--gold-500);
}
.mv-btn-sparkle {
  font-size: 11px;
  color: var(--gold-400);
  transition: transform 0.3s ease;
}
.mv-fancy-expand-btn:hover .mv-btn-sparkle {
  transform: rotate(45deg) scale(1.15);
}
.mv-btn-icon-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(217, 119, 6, 0.12);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.mv-chevron-icon {
  width: 13px;
  height: 13px;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.mv-fancy-expand-btn.expanded .mv-chevron-icon {
  transform: rotate(180deg);
}
.mv-fancy-expand-btn.expanded .mv-btn-icon-wrapper {
  background: rgba(217, 119, 6, 0.25);
}

/* ==========================================
   TAB 4: UNIVERSAL BOOKMARKS / SAVED
   ========================================== */
.bookmarks-hero-banner {
  text-align: center;
  margin-bottom: 20px;
  padding: 18px 14px;
  background: radial-gradient(circle at 50% 20%, rgba(234, 179, 8, 0.12) 0%, rgba(20, 13, 8, 0.7) 100%);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
}

.bookmarks-filter-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.bm-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.bm-filter-btn:hover {
  border-color: var(--gold-400);
  color: var(--gold-200);
  transform: translateY(-1px);
}

.bm-filter-btn.active {
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.25), rgba(217, 119, 6, 0.15));
  border-color: var(--gold-400);
  color: var(--gold-300);
  box-shadow: 0 0 12px rgba(234, 179, 8, 0.2);
}

.bm-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.bm-filter-btn.active .bm-count {
  background: var(--gold-500);
  color: #000;
}

.bookmarks-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.bookmark-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px;
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bookmark-card:hover {
  transform: translateY(-2px);
  border-color: var(--gold-400);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 16px rgba(212, 175, 55, 0.18);
}

.bookmark-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.bookmark-meta-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}

.bookmark-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.bookmark-badge.badge-gita {
  background: rgba(168, 85, 247, 0.2);
  color: #d8b4fe;
  border: 1px solid rgba(168, 85, 247, 0.4);
}

.bookmark-badge.badge-vedas {
  background: rgba(14, 165, 233, 0.2);
  color: #7dd3fc;
  border: 1px solid rgba(14, 165, 233, 0.4);
}

.bookmark-badge.badge-shastras {
  background: rgba(249, 115, 22, 0.2);
  color: #fdba74;
  border: 1px solid rgba(249, 115, 22, 0.4);
}

.bookmark-badge.badge-mandir {
  background: rgba(234, 179, 8, 0.2);
  color: #fde047;
  border: 1px solid rgba(234, 179, 8, 0.4);
}

.bookmark-citation-pill {
  font-size: 12px;
  font-weight: 700;
  color: var(--gold-300);
  background: rgba(234, 179, 8, 0.12);
  border: 1px solid rgba(234, 179, 8, 0.25);
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.delete-bookmark-btn {
  background: transparent;
  border: 1px solid transparent;
  color: #ef4444;
  cursor: pointer;
  padding: 6px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.delete-bookmark-btn i,
.delete-bookmark-btn svg {
  width: 16px;
  height: 16px;
}

.delete-bookmark-btn:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.3);
  transform: scale(1.1);
}

.bookmark-title {
  font-family: var(--font-heading);
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 2px;
}

.bookmark-sanskrit {
  font-family: var(--font-sanskrit);
  font-size: 16.5px;
  color: var(--sanskrit-verse-color);
  line-height: 1.6;
  margin-top: 4px;
}

.bookmark-translit {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-top: 2px;
}

.bookmark-tap-hint {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--gold-400);
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.empty-state-box {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px 16px;
  background: var(--bg-card);
  border: 1.5px dashed var(--border-medium);
  border-radius: var(--radius-xl);
  color: var(--text-muted);
}

.empty-state-box i,
.empty-state-box svg {
  width: 48px;
  height: 48px;
  color: var(--gold-400);
  margin-bottom: 14px;
}

.empty-state-box h3 {
  font-family: var(--font-heading);
  font-size: 19px;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.empty-state-box p {
  font-size: 14px;
  line-height: 1.6;
  max-width: 460px;
  margin: 0 auto;
}

/* Drawer Bookmark Badge */
.drawer-count-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: var(--radius-full);
  background: var(--gold-500);
  color: #000;
  font-size: 11px;
  font-weight: 800;
  margin-left: auto;
  box-shadow: 0 0 8px rgba(234, 179, 8, 0.4);
}

/* Active Bookmarked Button Highlighting across all modules */
.card-action-btn.bookmarked,
.sukta-tool-btn.bookmarked {
  background: linear-gradient(135deg, #f59e0b, #d97706) !important;
  color: #0b0908 !important;
  border-color: #fde047 !important;
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.45) !important;
}

.card-action-btn.bookmarked svg,
.card-action-btn.bookmarked i,
.sukta-tool-btn.bookmarked svg,
.sukta-tool-btn.bookmarked i {
  fill: currentColor !important;
  stroke: currentColor !important;
}

/* ==========================================
   QUICK MATRIX MODAL (1-Click Jump)
   ========================================== */
#vedas-matrix-modal-overlay .matrix-modal-card {
  max-width: 580px;
}
.modal-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: none;
}
.modal-tabs::-webkit-scrollbar {
  display: none;
}
.modal-tab {
  flex-shrink: 0;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface-elevated);
  color: var(--text-secondary);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.modal-tab.active {
  background: var(--gold-gradient);
  color: #fff;
  border-color: transparent;
}
.modal-mantras-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 52vh;
  overflow-y: auto;
}
.modal-mantra-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface-elevated);
  cursor: pointer;
  transition: all 0.2s;
}
.modal-mantra-item:hover, .modal-mantra-item.selected {
  background: var(--bg-card-hover);
  border-color: var(--gold-400);
  transform: translateX(2px);
}
.item-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.item-citation {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--saffron-primary);
}
.item-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}
.item-sanskrit {
  font-family: var(--font-sanskrit);
  font-size: 12px;
  color: var(--text-muted);
}
.item-veda-pill {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

@media (max-width: 768px) {
  .corpus-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .vedas-grid {
    grid-template-columns: 1fr;
  }
  .mahavakyas-grid {
    grid-template-columns: 1fr;
  }
  .bookmarks-container {
    grid-template-columns: 1fr;
  }
}

/* Door 4: Shastras Historical Banner */
.shastras-context-banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 18px;
  border-radius: var(--radius-lg);
  background: rgba(194, 65, 12, 0.12);
  border: 1px solid rgba(194, 65, 12, 0.3);
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--text-secondary);
  margin-bottom: 18px;
}

.context-ico {
  width: 20px;
  height: 20px;
  color: #fb923c;
  flex-shrink: 0;
  margin-top: 2px;
}

/* ==========================================================================
   CHAPTER & VERSE MATRIX MODALS
   ========================================================================== */
.matrix-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.matrix-modal-overlay.open {
  display: flex;
  animation: fadeInModal 0.2s ease-out;
}

@keyframes fadeInModal {
  from { opacity: 0; }
  to { opacity: 1; }
}

.matrix-modal-card {
  width: 100%;
  max-width: 620px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-xl);
  background: var(--bg-surface-elevated);
  border: 1.5px solid var(--border-medium);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.matrix-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-card);
}

.matrix-title {
  font-family: var(--font-sanskrit);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--gold-200);
}

.modal-close-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}

.modal-close-btn:hover {
  color: #fff;
  border-color: var(--gold-400);
}

.modal-close-btn i {
  width: 18px;
  height: 18px;
}

.matrix-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

.matrix-section-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.chapters-chip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 8px;
}

.chapter-chip {
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  touch-action: manipulation;
}

.chapter-chip:hover {
  border-color: var(--gold-400);
  color: var(--gold-300);
}

.chapter-chip.active {
  background: linear-gradient(135deg, var(--gold-600), var(--gold-800));
  color: #fff;
  border-color: var(--gold-400);
}

.verse-chips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(44px, 1fr));
  gap: 8px;
}

.verse-chip {
  min-width: 44px;
  min-height: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  touch-action: manipulation;
}

.verse-chip:hover {
  border-color: var(--gold-400);
  color: var(--gold-300);
}

.verse-chip.active {
  background: var(--gold-500);
  color: #000;
  border-color: var(--gold-300);
  font-weight: 800;
}

/* Toast System */
.toast {
  position: fixed;
  bottom: calc(24px + var(--safe-bottom));
  left: 50%;
  transform: translateX(-50%) translateY(30px);
  padding: 10px 20px;
  border-radius: var(--radius-full);
  background: rgba(20, 13, 8, 0.94);
  border: 1.5px solid var(--gold-400);
  color: var(--gold-200);
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: var(--shadow-lg), 0 0 20px rgba(234, 179, 8, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.25s ease, opacity 0.25s ease;
  z-index: 200;
  white-space: nowrap;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ======================================================================
   MOBILE GLASSMORPHISM NAVIGATION DRAWER (Per System Rules)
   ====================================================================== */
/* Lock background page scrolling when mobile nav drawer is open */
html.drawer-open,
body.drawer-open {
  overflow: hidden !important;
  height: 100% !important;
  max-height: 100% !important;
  overscroll-behavior: none !important;
}

.mobile-nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  justify-content: flex-end;
  overflow: hidden !important;
}

.mobile-nav-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-nav-menu {
  width: min(92vw, 360px);
  max-width: 360px;
  height: 100% !important;
  height: 100dvh !important;
  max-height: 100% !important;
  box-sizing: border-box !important;
  background: var(--bg-surface-elevated);
  border-left: 1.5px solid var(--border-medium);
  box-shadow: -10px 0 35px rgba(0, 0, 0, 0.85);
  display: flex !important;
  flex-direction: column !important;
  padding: calc(16px + var(--safe-top)) 16px calc(36px + var(--safe-bottom)) 16px !important;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-x: hidden !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
  overscroll-behavior: contain !important;
  touch-action: pan-y !important;
  scrollbar-width: thin;
  scrollbar-color: var(--gold-400) rgba(0, 0, 0, 0.15);
}

.mobile-nav-menu::-webkit-scrollbar {
  width: 5px;
  display: block !important;
}

.mobile-nav-menu::-webkit-scrollbar-track {
  background: transparent;
}

.mobile-nav-menu::-webkit-scrollbar-thumb {
  background: var(--gold-400);
  border-radius: 4px;
}

.mobile-nav-overlay.open .mobile-nav-menu {
  transform: translateX(0);
}

.mobile-nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 16px;
}

.mobile-nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mobile-nav-title {
  font-family: var(--font-sanskrit);
  font-size: 1.25rem;
  font-weight: 700;
  background: linear-gradient(135deg, #fde047, #f59e0b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.mobile-nav-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1.5px solid var(--border-medium);
  color: var(--gold-300);
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  outline: none !important;
}

.mobile-nav-close:hover,
.mobile-nav-close:focus-visible {
  color: var(--gold-200);
  border-color: var(--gold-400);
  background: var(--bg-card-hover);
  transform: rotate(90deg);
}

.mobile-nav-header {
  flex-shrink: 0 !important;
}

.mobile-nav-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: none !important;
  flex-shrink: 0 !important;
}

.mobile-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  text-align: left;
  cursor: pointer;
  transition: var(--transition);
  width: 100%;
  box-sizing: border-box;
  overflow: visible !important;
}

.mobile-nav-item:hover, .mobile-nav-item:active {
  border-color: var(--gold-400);
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.16), rgba(217, 119, 6, 0.08));
  transform: translateX(3px);
}

.mobile-nav-item .item-icon {
  font-size: 1.25rem;
  line-height: 1;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-nav-item .item-title {
  font-family: var(--font-sanskrit);
  font-size: 14.8px !important;
  font-weight: 700;
  color: var(--gold-300);
  line-height: 1.55 !important;
  padding-top: 4px;
  padding-bottom: 2px;
  white-space: nowrap;
  overflow: visible !important;
  flex: 1;
  min-width: 0;
}

@media (max-width: 360px) {
  .mobile-nav-item .item-title {
    font-size: 13.5px !important;
  }
}

.mobile-nav-footer {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.mobile-nav-lang-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  min-width: 0;
}

.nav-control-label {
  font-size: 13px !important;
  font-weight: 700;
  color: var(--gold-400);
  letter-spacing: 0.3px;
  white-space: nowrap;
  flex-shrink: 0;
}

.nav-control-select,
.nav-control-select option,
.gita-lang-dropdown,
.gita-lang-dropdown option,
.aarti-dropdown,
.aarti-dropdown option {
  font-family: "Noto Sans", "Noto Sans Devanagari", "Noto Sans Bengali", "Noto Sans Tamil", "Noto Sans Telugu", "Noto Sans Gujarati", "Noto Sans Kannada", "Noto Sans Malayalam", "Noto Sans Gurmukhi", "Noto Sans Oriya", "Noto Sans Arabic", system-ui, -apple-system, sans-serif !important;
}

.nav-control-select {
  flex: 1;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  background: var(--bg-surface-elevated);
  border: 1.5px solid var(--border-medium);
  color: var(--text-primary);
  font-size: 13px !important;
  font-weight: 600;
  cursor: pointer;
  outline: none !important;
  transition: var(--transition);
  text-overflow: ellipsis;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.nav-control-select:focus,
.nav-control-select:focus-visible {
  border-color: var(--gold-400);
  box-shadow: 0 0 10px rgba(234, 179, 8, 0.25);
  outline: none !important;
}

/* 2x2 Concise Quick Action Grid (Pill Shaped & Home-Page Styled) */
.mobile-nav-actions-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.mobile-nav-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 8px;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  border: 1.5px solid var(--border-medium);
  color: var(--text-primary);
  font-size: 12.5px !important;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  width: 100%;
  min-width: 0;
  white-space: nowrap;
  box-sizing: border-box;
  overflow: hidden;
  outline: none !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.mobile-nav-action-btn i,
.mobile-nav-action-btn svg {
  width: 14px !important;
  height: 14px !important;
  flex-shrink: 0 !important;
}

.mobile-nav-action-btn span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-nav-action-btn:focus,
.mobile-nav-action-btn:active {
  outline: none !important;
}

@media (hover: hover) and (pointer: fine) {
  .mobile-nav-action-btn:not(.playing):hover {
    border-color: var(--gold-400);
    color: var(--gold-300);
    background: var(--bg-card-hover);
    box-shadow: 0 3px 12px rgba(234, 179, 8, 0.25);
    transform: translateY(-1px);
  }
}

.mobile-nav-action-btn.playing {
  border-color: #eab308 !important;
  color: #facc15 !important;
  background: rgba(234, 179, 8, 0.18) !important;
  box-shadow: 0 0 12px rgba(234, 179, 8, 0.35) !important;
  font-weight: 700 !important;
  animation: omDronePulseDark 2.4s ease-in-out infinite;
}

@keyframes omDronePulseDark {
  0%, 100% {
    box-shadow: 0 0 8px rgba(234, 179, 8, 0.25);
  }
  50% {
    box-shadow: 0 0 16px rgba(234, 179, 8, 0.55);
  }
}

.mobile-nav-action-btn svg,
.mobile-nav-action-btn i {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.mobile-nav-action-btn .om-btn-icon {
  font-size: 0.95rem;
  line-height: 1;
  flex-shrink: 0;
}

.report-issue-action-btn {
  background: rgba(239, 68, 68, 0.08) !important;
  border-color: rgba(239, 68, 68, 0.28) !important;
  color: #f87171 !important;
}

.report-issue-action-btn:hover,
.report-issue-action-btn:focus-visible {
  background: rgba(239, 68, 68, 0.18) !important;
  border-color: #ef4444 !important;
  color: #fff !important;
  outline: none !important;
}

/* Light Theme Overrides matching the Home Page Sandalwood & Gold Aesthetic */
[data-theme="light"] .mobile-nav-close {
  background: #ffffff;
  color: #78350f;
  border-color: rgba(180, 83, 9, 0.24);
}

[data-theme="light"] .mobile-nav-close:hover,
[data-theme="light"] .mobile-nav-close:focus-visible {
  background: #fef3c7;
  color: #92400e;
  border-color: #b45309;
}

[data-theme="light"] .nav-control-select {
  background: #ffffff;
  border-color: rgba(180, 83, 9, 0.28);
  color: #78350f;
  box-shadow: 0 2px 6px rgba(180, 83, 9, 0.08);
}

[data-theme="light"] .nav-control-select:focus,
[data-theme="light"] .nav-control-select:focus-visible {
  border-color: #b45309;
  box-shadow: 0 0 10px rgba(180, 83, 9, 0.25);
  outline: none !important;
}

[data-theme="light"] .mobile-nav-action-btn {
  background: #ffffff;
  border-color: rgba(180, 83, 9, 0.24);
  color: #78350f;
  box-shadow: 0 2px 6px rgba(180, 83, 9, 0.08);
  outline: none !important;
}

[data-theme="light"] .mobile-nav-action-btn:focus,
[data-theme="light"] .mobile-nav-action-btn:focus-visible {
  background: #ffffff !important;
  border-color: #b45309 !important;
  color: #78350f !important;
  box-shadow: 0 0 0 2px rgba(180, 83, 9, 0.18) !important;
  outline: none !important;
}

@media (hover: hover) and (pointer: fine) {
  [data-theme="light"] .mobile-nav-action-btn:not(.playing):hover {
    background: #fffdf5 !important;
    border-color: rgba(180, 83, 9, 0.45) !important;
    color: #78350f !important;
    box-shadow: 0 3px 10px rgba(180, 83, 9, 0.12) !important;
    transform: translateY(-1px);
  }
}

[data-theme="light"] .mobile-nav-action-btn.playing {
  background: #fef3c7 !important;
  border-color: #b45309 !important;
  color: #92400e !important;
  font-weight: 700 !important;
  box-shadow: 0 0 12px rgba(180, 83, 9, 0.3) !important;
  animation: omDronePulseLight 2.4s ease-in-out infinite;
}

@media (hover: hover) and (pointer: fine) {
  [data-theme="light"] .mobile-nav-action-btn.playing:hover {
    background: #fde68a !important;
    border-color: #78350f !important;
    color: #78350f !important;
  }
}

@keyframes omDronePulseLight {
  0%, 100% {
    box-shadow: 0 0 8px rgba(180, 83, 9, 0.22);
  }
  50% {
    box-shadow: 0 0 16px rgba(180, 83, 9, 0.45);
  }
}

[data-theme="light"] .report-issue-action-btn {
  background: #fff1f2 !important;
  border-color: rgba(239, 68, 68, 0.35) !important;
  color: #dc2626 !important;
}

[data-theme="light"] .report-issue-action-btn:hover,
[data-theme="light"] .report-issue-action-btn:focus-visible {
  background: #fee2e2 !important;
  border-color: #ef4444 !important;
  color: #b91c1c !important;
  outline: none !important;
}

/* Hide floating canvas report bar since it is now cleanly in the hamburger menu */
.report-issue-footer-bar {
  display: none !important;
}

.hamburger-btn {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gold-400);
  line-height: 1;
}

.hamburger-btn:hover {
  color: var(--gold-300);
  border-color: var(--gold-400);
}

.hamburger-icon {
  font-size: 1.25rem;
  line-height: 1;
}

/* ======================================================================
   SEARCH BAR IN MOBILE DRAWER & HEADER
   ====================================================================== */
.mobile-nav-search-box {
  padding: 0 0 14px 0;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 12px;
}

.drawer-search-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  color: var(--text-muted);
  font-size: 0.82rem;
  cursor: pointer;
  transition: var(--transition);
  text-align: left;
}

.drawer-search-btn:hover,
.drawer-search-btn:focus-visible {
  border-color: var(--gold-400);
  color: var(--gold-200);
  background: rgba(234, 179, 8, 0.08);
}

.drawer-search-btn svg,
.drawer-search-btn i {
  color: var(--gold-400);
  width: 16px;
  height: 16px;
}

.search-trigger-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-400);
  transition: var(--transition);
}

.search-trigger-btn:hover {
  color: var(--gold-300);
  border-color: var(--gold-400);
}

/* ======================================================================
   GLOBAL GRANTH SEARCH MODAL
   ====================================================================== */
.search-modal-card {
  max-width: 620px;
  width: min(92vw, 620px);
  max-height: 84vh;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  border-radius: 20px;
  background: var(--bg-surface-elevated);
  border: 1.5px solid var(--border-gold-hover, var(--border-medium));
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85);
}

.search-modal-header {
  padding: 16px 18px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.search-input-wrapper {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
}

.search-input-icon {
  position: absolute;
  left: 14px;
  width: 18px;
  height: 18px;
  color: var(--gold-400);
  pointer-events: none;
}

.granth-search-input {
  width: 100%;
  box-sizing: border-box;
  padding: 11px 40px 11px 42px;
  border-radius: var(--radius-full);
  background: var(--bg-core);
  border: 1.5px solid var(--border-medium);
  color: var(--text-primary);
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  transition: var(--transition);
}

.granth-search-input:focus {
  border-color: var(--gold-400);
  box-shadow: 0 0 16px rgba(234, 179, 8, 0.25);
}

.search-clear-btn {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1rem;
  padding: 4px;
}

.search-clear-btn:hover {
  color: var(--gold-300);
}

.search-category-pills {
  display: flex;
  gap: 8px;
  padding: 10px 18px;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(0, 0, 0, 0.15);
  overflow-x: auto;
  scrollbar-width: none;
}

.search-category-pills::-webkit-scrollbar {
  display: none;
}

.search-pill {
  padding: 5px 12px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
}

.search-pill.active,
.search-pill:hover {
  background: rgba(234, 179, 8, 0.2);
  border-color: var(--gold-400);
  color: var(--gold-200);
}

.search-results-list {
  flex: 1;
  overflow-y: auto;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 52vh;
  scrollbar-width: thin;
  scrollbar-color: var(--border-medium) transparent;
}

.search-result-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: var(--transition);
  text-align: left;
}

.search-result-item:hover,
.search-result-item:focus-visible {
  border-color: var(--gold-400);
  background: var(--bg-card-hover);
  transform: translateX(3px);
  outline: none;
}

.search-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.search-item-door-badge {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: rgba(234, 179, 8, 0.18);
  color: var(--gold-300);
  border: 1px solid rgba(234, 179, 8, 0.3);
}

.search-item-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary);
}

.search-item-sanskrit {
  font-family: 'Noto Serif Devanagari', serif;
  font-size: 0.88rem;
  color: var(--gold-200);
  line-height: 1.5;
}

.search-item-snippet {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.search-highlight {
  background: rgba(234, 179, 8, 0.28);
  color: var(--gold-300);
  border-radius: 3px;
  padding: 0 3px;
  font-weight: 700;
}

[data-theme="light"] .search-highlight {
  background: rgba(202, 138, 4, 0.22);
  color: #854d0e;
}

.search-empty-state {
  padding: 32px 16px;
  text-align: center;
  color: var(--text-muted);
}

.search-empty-state i,
.search-empty-state svg {
  width: 38px;
  height: 38px;
  color: var(--gold-500);
  margin-bottom: 10px;
  opacity: 0.8;
}

.search-modal-footer {
  padding: 10px 18px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.1);
}

/* ======================================================================
   IN-APP REPORT ISSUE MODAL
   ====================================================================== */
.report-modal-card {
  max-width: 520px;
  width: min(92vw, 520px);
  border-radius: 20px;
  background: var(--bg-surface-elevated);
  border: 1.5px solid var(--border-medium);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85);
  padding: 20px;
}

.report-form-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 14px;
}

.report-form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  text-align: left;
}

.report-form-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.report-form-group input,
.report-form-group textarea,
.report-form-group select {
  box-sizing: border-box;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1.5px solid var(--border-medium);
  background: var(--bg-core);
  color: var(--text-primary);
  font-size: 0.85rem;
  font-family: inherit;
  outline: none;
  transition: var(--transition);
}

.report-form-group input:focus,
.report-form-group textarea:focus,
.report-form-group select:focus {
  border-color: var(--gold-400);
  box-shadow: 0 0 10px rgba(234, 179, 8, 0.2);
}

.report-readonly-input {
  background: rgba(234, 179, 8, 0.08) !important;
  border-color: rgba(234, 179, 8, 0.25) !important;
  color: var(--gold-300) !important;
  font-weight: 600;
  cursor: default;
}

.report-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

@media (max-width: 480px) {
  .report-form-row {
    grid-template-columns: 1fr;
  }
}

.report-textarea {
  resize: vertical;
  min-height: 80px;
}

.report-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 6px;
}

.btn-cancel-report {
  padding: 8px 18px;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-cancel-report:hover {
  background: var(--bg-surface-elevated);
  color: var(--text-primary);
}

.btn-submit-report {
  padding: 8px 22px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--gold-600), var(--gold-700));
  border: 1px solid var(--gold-400);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 14px rgba(217, 119, 6, 0.3);
}

.btn-submit-report:hover {
  background: linear-gradient(135deg, var(--gold-500), var(--gold-600));
  transform: translateY(-1px);
}

.report-alert-box {
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 0.82rem;
  line-height: 1.4;
  text-align: left;
}

.report-alert-box.success {
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.4);
  color: #4ade80;
}

.report-alert-box.error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #f87171;
}

/* ======================================================================
   RESPONSIVE DESIGN & COMPREHENSIVE MOBILE OPTIMIZATIONS
   ====================================================================== */
@media (max-width: 768px) {
  /* Concept 2: The Ethereal Sanctum Mobile Adaptations */
  .gateway-sanctuary {
    padding: 0 1rem calc(96px + env(safe-area-inset-bottom, 0px)) 1rem;
    min-height: 100vh;
    min-height: 100dvh;
    height: auto;
    max-height: none;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
  }
  
  .sanctuary-header {
    height: auto;
    min-height: 52px;
    padding: calc(20px + var(--safe-top, 0px)) 0 8px 0;
  }

  .header-brand {
    gap: 6px;
    min-width: 0;
  }

  .om-logo {
    font-size: 1.35rem;
  }

  .brand-title {
    font-size: clamp(0.85rem, 3.2vw, 1.05rem);
    white-space: nowrap;
  }

  .header-actions {
    gap: 6px;
    flex-shrink: 0;
  }

  .header-actions .icon-btn {
    width: 32px;
    height: 32px;
    min-width: 32px;
    font-size: 0.95rem;
  }

  .header-actions .pill-btn.lang-toggle {
    padding: 4px 8px;
    font-size: 0.72rem;
    white-space: nowrap;
  }
  
  .mandala-backdrop {
    width: 190px;
    height: 190px;
    transform: translate(-50%, -55%);
    opacity: 0.65;
  }
  
  .sanctum-hero {
    padding: 0.35rem 0.5rem 0.6rem 0.5rem;
    min-height: 130px;
    flex-shrink: 0;
  }

  .shanti-mantra {
    font-size: 1.25rem;
  }

  .mantra-translation {
    font-size: 0.8rem;
  }

  .mantra-subtext {
    font-size: 0.72rem;
    display: none; /* Hide long subtext on narrow mobile to keep hero compact */
  }
  
  .gateway-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    max-width: 580px;
    width: 100%;
    margin: 0 auto;
  }
  
  .gateway-grid > .gateway-card:nth-child(3):last-child {
    grid-column: 1 / -1;
    max-width: 280px;
    margin: 0 auto;
    width: 100%;
  }
  
  .gateway-card {
    padding: 16px 12px;
    min-height: 124px;
    border-radius: 16px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }
  
  .card-icon-wrapper {
    margin-bottom: 0.45rem;
  }

  .gold-icon {
    width: 32px;
    height: 32px;
  }
  
  .card-title-en {
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: 0.08em;
  }
  
  .card-title-hi {
    font-size: 0.82rem;
    margin-top: 0.15rem;
  }
  
  .card-subtext {
    display: block;
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
    line-height: 1.3;
  }

  .ambient-indicator {
    padding: 8px 16px 8px 14px;
    gap: 12px;
    width: 100%;
    max-width: 580px;
    box-sizing: border-box;
  }

  .flame-dot {
    font-size: 1.18rem;
  }

  .resume-pill-sub {
    font-size: 0.68rem;
    gap: 6px;
  }

  .resume-pill-tag {
    font-size: 0.65rem;
  }

  .resume-pill-door {
    font-size: 0.72rem;
  }

  .resume-pill-title {
    font-size: 0.88rem;
  }

  .resume-pill-arrow-btn {
    width: 28px;
    height: 28px;
    min-width: 28px;
  }

  .resume-pill-arrow-btn svg {
    width: 11px;
    height: 11px;
  }

  .progress-pill {
    font-size: 0.72rem;
  }

  /* Sanctuary Top Bar - Clean Mobile Proportions */
  .sanctuary-top-bar {
    padding: calc(20px + var(--safe-top)) 10px 10px 10px;
    gap: 8px;
  }
  .sanctuary-home-btn {
    width: 38px;
    height: 38px;
    min-width: 38px;
  }
  .sanctuary-title-group {
    padding: 0 4px;
    min-width: 0;
    flex: 1;
    text-align: center;
    overflow: visible !important;
  }
  .sanctuary-heading {
    font-size: 1.05rem;
    line-height: 1.55 !important;
    padding-top: 4px;
    padding-bottom: 2px;
    white-space: nowrap;
    overflow: visible !important;
  }
  .sanctuary-subheading {
    display: none;
  }
  .sanctuary-actions {
    gap: 6px;
    flex-shrink: 0;
  }

  /* On mobile screens, hide duplicate header buttons that are inside ☰ menu or on stage */
  #gita-font-btn,
  #vedas-font-btn,
  #shastras-font-btn,
  #mandir-font-btn,
  #gita-matrix-open-btn {
    display: none;
  }

  /* Mobile Dropdown & Layout Fixes */
  .aarti-picker-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 10px 12px;
  }
  .picker-label {
    white-space: normal;
    font-size: 0.8rem;
  }
  .picker-wrap {
    width: 100%;
    max-width: 100%;
  }
  .aarti-dropdown {
    font-size: 0.88rem;
    min-height: 44px;
  }
  .aarti-dropdown.compact-title {
    font-size: 0.8rem;
  }
  .paging-control-bar {
    width: 100%;
    max-width: 100%;
    left: 0;
    right: 0;
    box-sizing: border-box;
  }
  .chapter-nav-btn {
    min-height: 46px;
    padding: 8px 10px;
    font-size: 0.82rem;
  }
  .chapter-nav-btn span {
    font-size: 0.82rem;
  }

  /* Shloka Card & Typography on Mobile */
  .shloka-card {
    padding: 20px 16px;
    margin-bottom: 18px;
  }
  .sanskrit-text {
    font-size: 1.25rem;
    line-height: 1.8;
  }
  .translit-block {
    font-size: 0.95rem;
    padding: 12px 14px;
  }
  .translation-block {
    padding: 14px 16px;
    margin-bottom: 20px;
  }
  .translation-text {
    font-size: 0.98rem;
    line-height: 1.65;
  }

  /* Reading Navigation Bar */
  .quick-jump-badge {
    padding: 4px 10px;
  }
  .footer-nav-group .nav-btn {
    padding: 10px 14px;
    font-size: 0.88rem;
    min-height: 44px;
    flex: 1 1 0%;
  }
  .chant-btn {
    flex: 0 0 46px;
    width: 46px;
    height: 46px;
    min-width: 46px;
    min-height: 46px;
    border-radius: 50%;
    padding: 0;
  }

  /* Aarti & Mandir on Mobile */
  .mandir-sanctum-card {
    padding: 10px 14px 12px 14px;
    margin-bottom: 12px;
  }
  .pooja-instruments-row {
    gap: 18px;
    margin-bottom: 5px;
  }
  .aarti-title {
    font-size: clamp(1.1rem, 4.2vw, 1.28rem);
  }
  .lyrics-card {
    padding: 16px 14px;
  }
  .lyrics-chip-btn {
    padding: 4px 10px;
    font-size: 0.74rem;
  }
  .lyrics-body {
    font-size: 1.05rem;
    line-height: 2.1;
  }

  /* Top bar compact on mobile */
  .sanctuary-top-bar {
    padding: calc(20px + var(--safe-top)) 10px 8px 10px;
  }
  .sanctuary-title-group {
    padding: 0 6px;
    overflow: visible !important;
  }
  .sanctuary-heading {
    font-size: 0.95rem;
    line-height: 1.55 !important;
    padding-top: 4px;
    overflow: visible !important;
  }
  .sanctuary-subheading {
    font-size: 0.65rem;
  }
  .sanctuary-btn, .sanctuary-home-btn {
    width: 36px;
    height: 36px;
    min-width: 36px;
  }

  /* Floating safe bottom padding (Guarantees bottom lines of translations & word-analysis scroll clear of sticky audio controls) */
  .sanctuary-stage-wrapper {
    padding: 16px 12px calc(110px + env(safe-area-inset-bottom, 0px)) 12px;
  }
  .doors-section {
    padding: 0 14px calc(96px + env(safe-area-inset-bottom, 0px)) 14px;
  }
  .shloka-card {
    padding: 20px 16px;
    margin-bottom: 32px;
  }
}

@media (max-width: 380px) {
  .gateway-header {
    padding: calc(8px + var(--safe-top)) 10px 8px 10px;
  }
  .sanctuary-heading {
    font-size: 0.92rem;
  }
  .hdr-btn, .sanctuary-btn {
    width: 35px;
    height: 35px;
    min-width: 35px;
  }
}

/* Light Theme Overrides for Search & Report Modals */
[data-theme="light"] .search-modal-card,
[data-theme="light"] .report-modal-card {
  background: #ffffff;
  border-color: rgba(180, 83, 9, 0.35);
  box-shadow: 0 20px 50px rgba(180, 83, 9, 0.15);
}

[data-theme="light"] .granth-search-input,
[data-theme="light"] .report-form-group input,
[data-theme="light"] .report-form-group textarea,
[data-theme="light"] .report-form-group select {
  background: #fbf9f4;
  border-color: rgba(180, 83, 9, 0.25);
  color: #1c130c;
}

[data-theme="light"] .search-pill {
  background: #f4ede1;
  border-color: rgba(180, 83, 9, 0.2);
  color: #78350f;
}

[data-theme="light"] .search-pill.active,
[data-theme="light"] .search-pill:hover {
  background: #ffedd5;
  border-color: #b45309;
  color: #9a3412;
}

[data-theme="light"] .search-result-item {
  background: #ffffff;
  border-color: rgba(180, 83, 9, 0.18);
}

[data-theme="light"] .search-result-item:hover {
  background: #fffbf0;
  border-color: #b45309;
}

[data-theme="light"] .search-item-door-badge {
  background: #fff1e0;
  color: #b45309;
  border-color: rgba(180, 83, 9, 0.3);
}

[data-theme="light"] .search-item-sanskrit {
  color: #9a3412;
}

[data-theme="light"] .search-item-snippet {
  color: #4a3828;
}

[data-theme="light"] .drawer-search-btn {
  background: #f4ede1;
  border-color: rgba(180, 83, 9, 0.24);
  color: #78350f;
}

[data-theme="light"] .drawer-search-btn:hover {
  background: #ffedd5;
  border-color: #b45309;
  color: #9a3412;
}

/* ==========================================================================
   SANATAN GRANTH QA TICKETS REFINEMENTS (SG-03, SG-04, SG-05, SG-07, SG-08, SG-09, SG-10b)
   ========================================================================== */

/* SG-03: Light Mode Translation Box WCAG AA Contrast Fix */
[data-theme="light"] .translation-block,
[data-theme="light"] .translation-box,
[data-theme="light"] .bg-secondary {
  background-color: #f3ece1 !important;
  border: 1px solid #e2d5c1 !important;
  border-left: 4px solid var(--gold-600) !important;
  color: #2c1a0e !important;
}

[data-theme="light"] .translation-block .translation-text,
[data-theme="light"] .translation-box .translation-body,
[data-theme="light"] .translation-text {
  color: #2c1a0e !important;
}

[data-theme="light"] .translation-label {
  color: #8c4a00 !important;
}

/* SG-04: Light Mode Vedas Tab Buttons Contrast Fix */
[data-theme="light"] .vedas-tab-btn:not(.active),
[data-theme="light"] #view-vedas .tab-btn:not(.active) {
  color: #5a3e28 !important;
  background-color: rgba(60, 36, 21, 0.06) !important;
  border: 1px solid rgba(60, 36, 21, 0.18) !important;
}

[data-theme="light"] .vedas-tab-btn:not(.active):hover,
[data-theme="light"] #view-vedas .tab-btn:not(.active):hover {
  color: #1c130c !important;
  background-color: rgba(60, 36, 21, 0.12) !important;
  border-color: rgba(60, 36, 21, 0.35) !important;
}

[data-theme="light"] .vedas-tab-btn.active,
[data-theme="light"] #view-vedas .tab-btn.active {
  background: var(--gold-gradient) !important;
  color: #ffffff !important;
  box-shadow: 0 3px 12px rgba(180, 83, 9, 0.3) !important;
}

/* SG-05: Desktop Header Search Button Clickability */
.header-search-btn,
#gw-search-btn {
  pointer-events: auto !important;
  cursor: pointer !important;
  z-index: 20 !important;
}

/* SG-07: Symmetrical Gateway Cards & Text Wrapping */
.card-title-hi,
.card-title-en,
.card-subtext {
  overflow-wrap: anywhere;
  word-break: break-word;
  hyphens: auto;
}

.gateway-grid {
  grid-auto-rows: 1fr;
}

.gateway-card {
  height: 100%;
}



/* SG-08: Mobile Vedas Tab Strip 2x2 Clean Grid Wrapping */
@media (max-width: 640px) {
  /* Replaced legacy tabs with modern controls, keep filter pills accessible */
  .vedas-tab-nav,
  .reader-corpus-bar {
    display: none !important;
  }

  /* Unified Top Controls Bar on Mobile */
  .vedas-top-controls-bar {
    gap: 6px !important;
    margin-bottom: 10px !important;
  }
  .top-ctrl-select {
    height: 34px !important;
    font-size: 11.5px !important;
    padding: 0 8px 0 24px !important;
  }
  .top-ctrl-icon {
    left: 7px !important;
    width: 12px !important;
    height: 12px !important;
  }
  .top-ctrl-saved-btn {
    width: 34px !important;
    height: 34px !important;
    flex: 0 0 34px !important;
  }

  /* Compact Scripture Control Toolbar on Mobile */
  .mantra-card-header {
    gap: 6px !important;
    margin-bottom: 10px !important;
    padding-bottom: 8px !important;
  }
  .sukta-control-toolbar {
    gap: 6px !important;
  }
  .sukta-control-toolbar {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .sukta-select-wrapper {
    flex: 1 1 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
  }
  .sukta-select-dropdown {
    font-size: 12px !important;
    padding: 6px 10px 6px 28px !important;
    height: 36px !important;
    width: 100% !important;
  }
  .sukta-select-icon {
    left: 8px !important;
    width: 14px !important;
    height: 14px !important;
  }
  .sukta-shloka-pills-row {
    flex: 1 1 100% !important;
    width: 100% !important;
    max-width: 100% !important;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    white-space: nowrap !important;
    gap: 6px !important;
    padding: 4px 2px !important;
    box-sizing: border-box !important;
  }
  .sukta-shloka-pill {
    flex: 0 0 38px !important;
    min-width: 38px !important;
    width: 38px !important;
    height: 38px !important;
    font-size: 12px !important;
    padding: 0 !important;
    box-sizing: border-box !important;
  }
  .sukta-tools-cluster {
    gap: 8px !important;
  }
  .sukta-tool-btn {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    padding: 10px !important;
    border-radius: 50% !important;
    box-sizing: border-box !important;
    touch-action: manipulation !important;
  }
  .sukta-tool-btn i {
    width: 18px !important;
    height: 18px !important;
  }
  .chant-audio-btn {
    width: 44px !important;
    height: 44px !important;
    flex: 0 0 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    box-sizing: border-box !important;
  }
  .chant-audio-btn i {
    width: 18px !important;
    height: 18px !important;
  }
  .chant-audio-btn i {
    width: 18px !important;
    height: 18px !important;
  }

  /* Mobile holy mantra card and text sizing */
  .holy-mantra-card {
    padding: 12px 10px !important;
    border-radius: 14px !important;
    margin-bottom: 16px !important;
  }
  .sanskrit-verse-block {
    padding: 8px 2px 6px !important;
  }
  .sanskrit-text {
    font-size: 1.15rem !important;
    line-height: 1.7 !important;
  }
  .transliteration-box {
    font-size: 0.85rem !important;
    line-height: 1.45 !important;
    padding: 0 2px 8px !important;
  }
  .translation-box {
    padding: 10px 10px !important;
    margin-bottom: 10px !important;
  }
  .translation-body {
    font-size: 0.88rem !important;
    line-height: 1.55 !important;
  }
  .meta-tags-streamlined .meta-tag-sub:last-of-type,
  .meta-tags-streamlined .meta-tag-sep:last-of-type {
    display: none !important; /* Hide meter on very narrow screens */
  }
}

/* SG-09: Indic Font Family Fallback for Select and Options (Prevent Tofu Boxes) */
select,
option,
.nav-control-select,
.nav-control-select option {
  font-family: 'Noto Sans', 'Noto Sans Devanagari', 'Noto Sans Bengali', 'Noto Sans Tamil', 'Noto Sans Telugu', 'Noto Sans Gujarati', 'Noto Sans Kannada', 'Noto Sans Malayalam', 'Noto Sans Gurmukhi', 'Noto Sans Oriya', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif !important;
}

/* SG-10b: Hash Route Smooth Opacity Transitions & Flash Elimination */
.app-view {
  transition: opacity 150ms ease-in-out !important;
}

/* ==========================================================================
   QA AUDIT STANDARDIZATION & MOBILE RESPONSIVE FIXES (v15)
   ========================================================================== */

/* 1. Header Typography Standardization & Universal Matra Protection */
.sanctuary-title-group {
  text-align: center;
  flex: 1;
  padding: 0 10px;
  min-width: 0;
  overflow: visible !important;
}

.sanctuary-heading {
  font-family: var(--font-sanskrit);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.55 !important;
  padding-top: 4px;
  padding-bottom: 2px;
  white-space: nowrap;
  overflow: visible !important;
  color: var(--heading-sanskrit-color);
  margin: 0;
}

.sanctuary-subheading {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.25;
  margin-top: 2px;
}

/* Universal Matra Protection: Guarantee upper and lower Indic diacritics are never clipped */
.sanctuary-heading,
.brand-title,
.card-title-hi,
.aarti-title,
.chapter-title,
.sukta-title,
.mobile-nav-title,
.mobile-nav-item .item-title,
.item-title,
.shanti-mantra,
.mandir-title,
.gita-title,
.vedas-title,
.shastras-title {
  line-height: 1.55 !important;
  overflow: visible !important;
  padding-top: 4px;
}

@media (max-width: 480px) {
  .sanctuary-heading {
    font-size: 1rem !important;
  }
  .sanctuary-subheading {
    font-size: 0.72rem !important;
  }
}

/* 2. Unified Transliteration / Phonetics Toggle Pill */
.translit-tier-header {
  display: flex;
  justify-content: center;
  margin-bottom: 14px;
}

.translit-tier-header.vedas-translit-header {
  margin-top: 8px;
  margin-bottom: 10px;
}

.translit-toggle-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 14px;
  min-height: 34px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-medium);
  background: rgba(234, 179, 8, 0.12);
  color: var(--gold-300);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.translit-toggle-pill:hover,
.translit-toggle-pill:focus-visible {
  background: var(--gold-500);
  color: #000;
  border-color: var(--gold-400);
  box-shadow: 0 4px 12px rgba(234, 179, 8, 0.3);
}

.translit-toggle-pill:not(.active) {
  opacity: 0.6;
  background: transparent;
  color: var(--text-muted);
  border-color: var(--border-subtle);
  box-shadow: none;
}

[data-theme="light"] .translit-toggle-pill {
  background: #fef3c7;
  border-color: rgba(180, 83, 9, 0.35);
  color: #92400e;
}

[data-theme="light"] .translit-toggle-pill:hover {
  background: #f59e0b;
  color: #ffffff;
  border-color: #d97706;
}

[data-theme="light"] .translit-toggle-pill:not(.active) {
  opacity: 0.65;
  background: transparent;
  color: #78350f;
  border-color: rgba(180, 83, 9, 0.2);
}

/* 3. Card Utility Action Icons Accessibility (>= 40x40px) */
.card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-action-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  min-height: 44px !important;
  padding: 10px !important;
  border-radius: var(--radius-md) !important;
  background: var(--bg-surface-elevated) !important;
  border: 1px solid var(--border-subtle) !important;
  color: var(--text-muted) !important;
  cursor: pointer !important;
  transition: var(--transition) !important;
  touch-action: manipulation !important;
  box-sizing: border-box !important;
}

.card-action-btn:hover {
  color: var(--gold-300) !important;
  border-color: var(--border-strong) !important;
  background: var(--bg-card-hover) !important;
}

.card-action-btn i {
  width: 18px !important;
  height: 18px !important;
}

.sukta-tool-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  min-height: 44px !important;
  padding: 10px !important;
  border-radius: 50% !important;
  border: 1px solid var(--border-subtle) !important;
  background: var(--bg-surface-elevated) !important;
  color: var(--text-secondary) !important;
  cursor: pointer !important;
  transition: var(--transition) !important;
  touch-action: manipulation !important;
  box-sizing: border-box !important;
}

.sukta-tool-btn:hover {
  background: var(--bg-card-hover) !important;
  border-color: var(--gold-400) !important;
  color: var(--text-primary) !important;
}

.sukta-tool-btn i {
  width: 18px !important;
  height: 18px !important;
  color: var(--gold-400) !important;
}

/* 4. Reflow Bottom Audio Controls on Small Mobile (< 380px) */
@media (max-width: 380px) {
  .card-footer {
    gap: 10px !important;
    padding-top: 14px !important;
  }
  .footer-nav-group {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    gap: 8px !important;
  }
  .nav-btn {
    padding: 8px 10px !important;
    min-height: 44px !important;
    font-size: 0.8rem !important;
    flex: 1 1 0% !important;
  }
  .chant-btn {
    flex: 0 0 44px !important;
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    border-radius: 50% !important;
    padding: 0 !important;
    justify-content: center !important;
  }
  .audio-controls-row {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    width: 100% !important;
    padding-top: 8px !important;
  }
  .audio-tool-btn {
    min-height: 40px !important;
    padding: 6px 14px !important;
    font-size: 0.78rem !important;
  }
}

/* 5. Horizontal Table & Grid Overflow Prevention (Vedas Overview & Mobile Cards) */
#tab-vedas,
.vedas-tab-view,
.vedic-corpus-banner,
.vedas-grid {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  overflow-x: hidden !important;
}

.vedic-corpus-banner {
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch !important;
}

@media (max-width: 640px) {
  .corpus-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }
  .vedas-grid {
    grid-template-columns: 1fr !important;
    min-width: 0 !important;
    width: 100% !important;
    gap: 12px !important;
  }
  .veda-card {
    min-width: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 14px !important;
  }
}

@media (max-width: 480px) {
  .corpus-stats-grid {
    grid-template-columns: 1fr !important;
    gap: 6px !important;
  }
  .corpus-stat-card {
    min-width: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .veda-card {
    padding: 12px !important;
    border-radius: var(--radius-lg, 12px) !important;
  }
  /* Stack 4 Vedas Overview comparison tables/metadata into single-column cards */
  .veda-meta-grid {
    grid-template-columns: 1fr !important;
    gap: 6px !important;
  }
  .veda-meta-item {
    min-width: 0 !important;
    word-break: break-word !important;
    overflow-wrap: anywhere !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 2px !important;
  }
  .veda-layers-box {
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .layer-item {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 3px !important;
    padding: 8px 10px !important;
    background: var(--bg-surface-elevated) !important;
    border-radius: var(--radius-sm, 6px) !important;
    border: 1px solid var(--border-subtle) !important;
    word-break: break-word !important;
    overflow-wrap: anywhere !important;
    font-size: 11.5px !important;
    line-height: 1.4 !important;
  }
  .layer-badge {
    align-self: flex-start !important;
  }
  .veda-stats-row {
    gap: 4px !important;
  }
  .stat-pill {
    font-size: 10.5px !important;
    padding: 3px 6px !important;
  }
  .pooja-instruments-row {
    gap: 14px !important;
  }
}

/* ==========================================================================
   AUTHENTIC VEDIC HUMAN VOICE AUDIO PLAYER BAR
   ========================================================================== */
.vedic-human-player-bar {
  position: relative;
  z-index: 2;
  margin: 12px 0 16px;
  padding: 14px 16px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.08) 0%, rgba(217, 119, 6, 0.12) 100%);
  border: 1.5px solid rgba(217, 119, 6, 0.35);
  border-radius: var(--radius-lg, 14px);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 4px 20px rgba(217, 119, 6, 0.15);
  animation: vhpSlideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes vhpSlideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.vhp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.vhp-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(217, 119, 6, 0.2);
  border: 1px solid rgba(217, 119, 6, 0.45);
  padding: 3px 10px;
  border-radius: 9999px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--gold-800, #b45309);
  letter-spacing: 0.02em;
}

[data-theme="dark"] .vhp-badge {
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.18);
  border-color: rgba(245, 158, 11, 0.4);
}

.vhp-dot-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ea580c;
  box-shadow: 0 0 0 0 rgba(234, 88, 12, 0.7);
  animation: vhpPulse 1.6s infinite;
}

@keyframes vhpPulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(234, 88, 12, 0.7); }
  70% { transform: scale(1.15); box-shadow: 0 0 0 6px rgba(234, 88, 12, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(234, 88, 12, 0); }
}

.vhp-track-info {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted, #78716c);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 60%;
}

.vhp-timeline-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.vhp-time {
  font-size: 0.75rem;
  font-family: monospace;
  font-weight: 600;
  color: var(--text-muted, #78716c);
  min-width: 32px;
}

.vhp-seekbar {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 5px;
  border-radius: 9999px;
  background: rgba(217, 119, 6, 0.25);
  outline: none;
  cursor: pointer;
  transition: background 0.2s;
}

.vhp-seekbar::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ea580c;
  box-shadow: 0 2px 6px rgba(234, 88, 12, 0.4);
  cursor: pointer;
  transition: transform 0.15s;
}

.vhp-seekbar::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.vhp-controls-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.vhp-action-btn {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border-medium, rgba(217, 119, 6, 0.3));
  background: var(--bg-core, #ffffff);
  color: var(--text-primary, #292524);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.vhp-action-btn:hover {
  background: var(--bg-card-hover, rgba(217, 119, 6, 0.1));
  border-color: #ea580c;
  transform: scale(1.05);
}

.vhp-action-btn i {
  width: 15px;
  height: 15px;
}

.vhp-btn-sub {
  font-size: 0.6rem;
  font-weight: 700;
  line-height: 1;
  margin-top: 1px;
}

.vhp-play-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 9999px;
  background: linear-gradient(135deg, #ea580c 0%, #d97706 100%);
  color: #fff;
  border: none;
  font-size: 0.85rem;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(234, 88, 12, 0.35);
  cursor: pointer;
  transition: all 0.2s;
}

.vhp-play-pill-btn:hover {
  transform: scale(1.03);
  box-shadow: 0 6px 18px rgba(234, 88, 12, 0.45);
}

.vhp-play-pill-btn i {
  width: 16px;
  height: 16px;
}

.vhp-action-btn.active {
  background: #ea580c;
  color: #fff;
  border-color: #ea580c;
}

.vhp-close-btn {
  margin-left: 6px;
  opacity: 0.7;
}

.vhp-close-btn:hover {
  opacity: 1;
  color: #ef4444;
}

/* ==========================================================================
   ENHANCEMENTS: AARTI VOCAL & AUTO-SCROLL, 4 CANONICAL LAYERS, 3-TIER BAR & MOBILE NAV
   ========================================================================== */

/* Aarti Vocal Recitation & Auto-Scroll */
.aarti-vocal-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: linear-gradient(135deg, rgba(217, 119, 6, 0.15), rgba(180, 83, 9, 0.1));
  border: 1px solid var(--gold-primary);
  color: var(--text-gold);
  padding: 6px 12px;
  border-radius: 9999px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}
.aarti-vocal-btn.active {
  background: var(--gold-primary);
  color: #fff;
  box-shadow: 0 0 12px rgba(217, 119, 6, 0.4);
}
.aarti-vocal-btn i {
  width: 14px;
  height: 14px;
}

.aarti-autoscroll-control {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-medium);
  border-radius: 9999px;
  padding: 2px 4px 2px 8px;
  gap: 4px;
}
.autoscroll-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 9999px;
}
.autoscroll-toggle-btn.active {
  color: #10b981;
  font-weight: 700;
}
.scroll-speed-select {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  color: var(--text-primary);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 4px;
  outline: none;
  cursor: pointer;
}

/* 4 Canonical Layers Interactive Switcher Ribbon */
.veda-layer-switcher {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 0 12px;
  margin-bottom: 10px;
  scrollbar-width: none;
}
.veda-layer-switcher::-webkit-scrollbar {
  display: none;
}
.layer-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: 9999px;
  padding: 6px 14px;
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.layer-tab-btn:hover {
  background: var(--bg-surface-elevated);
  border-color: var(--gold-primary);
  color: var(--text-primary);
}
.layer-tab-btn.active {
  background: linear-gradient(135deg, var(--gold-600), var(--gold-700));
  border-color: var(--gold-400);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(217, 119, 6, 0.25);
}
.layer-tab-btn .l-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.2);
  font-size: 0.7rem;
  font-weight: 700;
}
.layer-tab-btn.active .l-num {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
}

/* 3-Tier Dynamic Navigation & Offline Download Toolbar */
.veda-3tier-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: 14px;
  padding: 8px 12px;
  margin-bottom: 12px;
}
.tier-select-wrap {
  flex: 1;
  min-width: 140px;
}
.tier-select-wrap.tier-flex {
  flex: 2;
  min-width: 200px;
}
.tier-select {
  width: 100%;
  background: var(--bg-core);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 6px 10px;
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s;
}
.tier-select:focus {
  border-color: var(--gold-primary);
}
.veda-download-offline-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(5, 150, 105, 0.1));
  border: 1px solid #10b981;
  border-radius: 8px;
  color: #10b981;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 6px 12px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}
.veda-download-offline-btn:hover {
  background: #10b981;
  color: #fff;
}
.veda-download-offline-btn.downloaded {
  background: rgba(16, 185, 129, 0.25);
  border-color: #059669;
  color: #059669;
}
.veda-download-offline-btn i {
  width: 14px;
  height: 14px;
}

/* Persistent Mobile Bottom Navigation Bar (< 768px) */
.mobile-bottom-nav {
  display: none;
}
@media (max-width: 768px) {
  .mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 56px;
    padding-bottom: env(safe-area-inset-bottom);
    display: flex;
    align-items: center;
    justify-content: space-around;
    background: rgba(18, 16, 14, 0.94);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 998;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4);
  }
  [data-theme="light"] .mobile-bottom-nav {
    background: rgba(252, 249, 242, 0.96);
    border-top: 1px solid rgba(180, 83, 9, 0.2);
    box-shadow: 0 -4px 20px rgba(120, 53, 15, 0.08);
  }
  .mobile-bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 700;
    padding: 6px 12px;
    cursor: pointer;
    transition: all 0.2s ease;
  }
  .mobile-bottom-nav-item.active {
    color: var(--gold-primary);
  }
  .mobile-bottom-nav-item .b-icon {
    font-size: 1.25rem;
    line-height: 1;
  }
  
  /* Resume pill clearance: positioned right above the 56px bottom bar */
  .sanctuary-footer {
    padding-bottom: calc(64px + env(safe-area-inset-bottom)) !important;
  }
  #dynamic-resume-card.floating-resume {
    bottom: calc(64px + env(safe-area-inset-bottom)) !important;
  }
  
  /* Bottom Safe-Area Clearance across views */
  main.app-view,
  .sanctuary-stage-wrapper,
  .vedas-tab-view {
    padding-bottom: calc(64px + env(safe-area-inset-bottom)) !important;
  }
}

/* Desktop Line-Length Constraint (70ch max-width) on 1280px+ */
@media (min-width: 1280px) {
  .verse-content,
  .sanskrit-verse-text,
  .sanskrit-text,
  .translation-text,
  .translation-body,
  .padapatha-container,
  .lyrics-body,
  .veda-desc-text {
    max-width: 70ch;
    margin-inline: auto;
  }
}




/* ==========================================================================
   UNIFIED VEDIC NAVIGATOR & SINGLE BREADCRUMB BAR UI (REFACTOR)
   Reference: Single Sticky Breadcrumb + Unified Vedic Navigator (Drawer / Bottom Sheet)
   ========================================================================== */

/* 1. Single Compact Sticky Breadcrumb Bar (max-height: 52px) */
.vedas-breadcrumb-bar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  height: 52px;
  max-height: 52px;
  padding: 0 16px;
  margin: 0 0 10px 0;
  background: rgba(22, 19, 16, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  box-sizing: border-box;
}

[data-theme="light"] .vedas-breadcrumb-bar {
  background: rgba(252, 249, 242, 0.96);
  border-bottom: 1px solid rgba(217, 119, 6, 0.18);
  box-shadow: 0 2px 10px rgba(180, 83, 9, 0.05);
}

.bc-desktop-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.bc-desktop-group::-webkit-scrollbar {
  display: none;
}


/* Breadcrumb Dropdown Wrappers & Menus */
.bc-dropdown-wrap {
  position: relative;
  display: inline-flex;
}

.bc-popover-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 290px;
  max-width: 350px;
  background: var(--bg-surface-elevated, #231d17);
  border: 1px solid var(--border-medium, rgba(217, 119, 6, 0.3));
  border-radius: 12px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.55);
  padding: 6px;
  z-index: 1045;
  flex-direction: column;
  gap: 2px;
}

[data-theme="light"] .bc-popover-menu {
  background: #ffffff;
  border-color: rgba(217, 119, 6, 0.25);
  box-shadow: 0 12px 36px rgba(120, 53, 15, 0.16);
}

.bc-popover-menu.open {
  display: flex;
  animation: bcMenuFade 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes bcMenuFade {
  from {
    opacity: 0;
    transform: translateY(-4px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.bc-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  text-align: left;
  width: 100%;
  box-sizing: border-box;
  transition: all 0.15s ease;
}

.bc-menu-item:hover {
  background: rgba(217, 119, 6, 0.12);
  border-color: rgba(217, 119, 6, 0.2);
}

.bc-menu-item.active {
  background: rgba(217, 119, 6, 0.18);
  border-color: var(--gold-primary, #d97706);
}

.bc-menu-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
}

.bc-menu-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.bc-menu-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
}

.bc-menu-meta {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.bc-menu-divider {
  height: 1px;
  background: var(--border-subtle, rgba(255, 255, 255, 0.08));
  margin: 4px 6px;
}

[data-theme="light"] .bc-menu-divider {
  background: rgba(217, 119, 6, 0.12);
}

.bc-menu-action {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px dashed rgba(217, 119, 6, 0.35);
  background: rgba(217, 119, 6, 0.06);
  color: var(--gold-primary, #d97706);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
  box-sizing: border-box;
  transition: all 0.15s ease;
}

.bc-menu-action:hover {
  background: rgba(217, 119, 6, 0.15);
  border-color: var(--gold-primary, #d97706);
}

.bc-segment-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="light"] .bc-segment-btn {
  background: #ffffff;
  border-color: rgba(217, 119, 6, 0.2);
  color: #451a03;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.bc-segment-btn:hover {
  background: var(--bg-surface-elevated);
  border-color: var(--gold-primary);
  color: var(--gold-primary);
  transform: translateY(-1px);
}

.bc-segment-btn .bc-icon {
  font-size: 0.95rem;
}

.bc-segment-btn .bc-chevron {
  width: 14px;
  height: 14px;
  color: var(--text-muted);
  transition: transform 0.2s;
}

.bc-segment-btn:hover .bc-chevron {
  color: var(--gold-primary);
  transform: translateY(1px);
}

.bc-divider {
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 700;
  user-select: none;
  padding: 0 2px;
}

/* Mobile Breadcrumb Pill (< 768px) */
.bc-mobile-pill {
  display: none;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  max-width: 60vw;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

[data-theme="light"] .bc-mobile-pill {
  background: #ffffff;
  border-color: rgba(217, 119, 6, 0.2);
  color: #451a03;
}

.bc-mobile-pill .bc-chevron {
  width: 14px;
  height: 14px;
  color: var(--text-muted);
  flex-shrink: 0;
}

/* Action Buttons Right Group */
.bc-actions-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.bc-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.bc-overview-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-medium);
  color: var(--text-secondary);
}

.bc-overview-btn:hover {
  background: rgba(217, 119, 6, 0.12);
  border-color: var(--gold-primary);
  color: var(--gold-primary);
  transform: translateY(-1px);
}

.bc-saved-badge {
  background: linear-gradient(135deg, #b45309, #d97706);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(180, 83, 9, 0.25);
}

.bc-saved-badge:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.bc-bookmark-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 6px 10px;
}

.bc-bookmark-btn:hover {
  border-color: var(--gold-primary);
  color: var(--gold-primary);
}

.bc-bookmark-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: rgba(217, 119, 6, 0.2);
  color: var(--gold-primary);
  font-size: 0.72rem;
  font-weight: 800;
}

/* 2. Clean Mantra Number Pager Strip (Row 2) */
.mantra-pager-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 6px 0 16px 0;
  padding: 0 16px;
  width: 100%;
  box-sizing: border-box;
}

.pager-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: 1px solid transparent;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 8px;
  transition: all 0.2s;
  flex-shrink: 0;
}

.pager-nav-btn:hover {
  color: var(--gold-primary);
  background: rgba(217, 119, 6, 0.08);
}

.pager-numbers-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 4px 0;
}
.pager-numbers-wrapper::-webkit-scrollbar {
  display: none;
}

.mantra-pager-strip .sukta-shloka-pills-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
}

.mantra-pager-strip .sukta-shloka-pill {
  min-width: 36px;
  height: 36px;
  padding: 0 8px;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="light"] .mantra-pager-strip .sukta-shloka-pill {
  background: #ffffff;
  border-color: rgba(217, 119, 6, 0.18);
  color: #78350f;
}

.mantra-pager-strip .sukta-shloka-pill:hover {
  border-color: var(--gold-primary);
  color: var(--gold-primary);
  background: var(--bg-surface-elevated);
}

.mantra-pager-strip .sukta-shloka-pill.active {
  background: #b45309 !important;
  border-color: #b45309 !important;
  color: #ffffff !important;
  font-weight: 800 !important;
  box-shadow: 0 3px 10px rgba(180, 83, 9, 0.35);
  transform: translateY(-1px);
}

/* 3. Return to Reading Bar (in Overview Tab) */
.vedas-overview-return-bar {
  margin-bottom: 14px;
}
.return-to-reader-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(217, 119, 6, 0.12);
  border: 1px solid var(--gold-primary);
  border-radius: 8px;
  color: var(--gold-primary);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 8px 16px;
  cursor: pointer;
  transition: all 0.2s;
}
.return-to-reader-btn:hover {
  background: var(--gold-primary);
  color: #ffffff;
}

/* 4. Unified Vedic Navigator Drawer (Desktop) & Bottom Sheet (Mobile) */
/* Unified Vedic Navigator (Centered Modal: 80% height, 90% width) */
.vedic-navigator-backdrop {
  position: fixed !important;
  inset: 0 !important;
  background: rgba(0, 0, 0, 0.72) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  z-index: 1200 !important;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.24s ease;
}

.vedic-navigator-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.vedic-navigator-drawer {
  position: fixed !important;
  top: 50% !important;
  left: 50% !important;
  right: auto !important;
  bottom: auto !important;
  width: 90vw !important;
  max-width: 90vw !important;
  height: 80vh !important;
  max-height: 80vh !important;
  background: var(--bg-surface, #1c1815) !important;
  border: 1px solid var(--border-medium, rgba(217, 119, 6, 0.3)) !important;
  border-radius: 20px !important;
  z-index: 1210 !important;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(217, 119, 6, 0.2) !important;
  display: flex !important;
  flex-direction: column !important;
  transform: translate(-50%, -46%) scale(0.96) !important;
  opacity: 0 !important;
  pointer-events: none !important;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.22s ease !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}

[data-theme="light"] .vedic-navigator-drawer {
  background: #fdfbf7 !important;
  border: 1px solid rgba(217, 119, 6, 0.3) !important;
  box-shadow: 0 25px 70px rgba(120, 53, 15, 0.2), 0 0 0 1px rgba(217, 119, 6, 0.2) !important;
}

.vedic-navigator-drawer.open {
  transform: translate(-50%, -50%) scale(1) !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

.drawer-drag-handle {
  display: none;
  width: 44px;
  height: 5px;
  border-radius: 3px;
  background: var(--border-medium);
  margin: 10px auto 4px;
}

.navigator-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.navigator-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  font-family: var(--font-cinzel), serif;
  letter-spacing: -0.01em;
}

.navigator-close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.navigator-close-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
}

.navigator-content {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
  overscroll-behavior-y: contain !important;
  touch-action: pan-y !important;
  padding: 16px 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  scrollbar-width: thin !important;
  scrollbar-color: var(--gold-primary, #d97706) rgba(0, 0, 0, 0.08) !important;
}

.navigator-content::-webkit-scrollbar {
  width: 8px !important;
  display: block !important;
}
.navigator-content::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.06) !important;
  border-radius: 4px !important;
  margin: 6px 0 !important;
}
.navigator-content::-webkit-scrollbar-thumb {
  background: var(--gold-primary, #d97706) !important;
  border-radius: 4px !important;
}
.navigator-content::-webkit-scrollbar-thumb:hover {
  background: #b45309 !important;
}
[data-theme="light"] .navigator-content::-webkit-scrollbar-track {
  background: rgba(180, 83, 9, 0.08) !important;
}
[data-theme="light"] .navigator-content::-webkit-scrollbar-thumb {
  background: #b45309 !important;
}

/* Navigator: Veda Tabs */
.nav-veda-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 2px;
}

.nav-veda-tab {
  padding: 10px 4px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
}

.nav-veda-tab:hover {
  color: var(--text-primary);
}

.nav-veda-tab.active {
  color: var(--gold-primary);
  border-bottom-color: var(--gold-primary);
  font-weight: 800;
}

/* Navigator: Section Wrappers & Labels */
.nav-section-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nav-section-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

/* Navigator: Layer Pills */
.nav-layer-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.nav-layer-pill {
  padding: 6px 14px;
  border-radius: 9999px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s;
}

[data-theme="light"] .nav-layer-pill {
  background: #ffffff;
  border-color: rgba(217, 119, 6, 0.18);
  color: #78350f;
}

.nav-layer-pill:hover {
  border-color: var(--gold-primary);
  color: var(--text-primary);
}

.nav-layer-pill.active {
  background: #b45309 !important;
  border-color: #b45309 !important;
  color: #ffffff !important;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(180, 83, 9, 0.3);
}

/* Navigator: Division Number Grid */
.nav-number-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  max-height: 115px !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
  padding: 2px 4px 2px 2px;
  scrollbar-width: thin !important;
  scrollbar-color: var(--gold-primary, #d97706) rgba(0, 0, 0, 0.08) !important;
}

.nav-number-grid::-webkit-scrollbar {
  width: 6px !important;
  display: block !important;
}
.nav-number-grid::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.04) !important;
  border-radius: 3px !important;
}
.nav-number-grid::-webkit-scrollbar-thumb {
  background: var(--gold-primary, #d97706) !important;
  border-radius: 3px !important;
}

.nav-number-tile {
  height: 38px;
  border-radius: 8px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.18s;
}

[data-theme="light"] .nav-number-tile {
  background: #ffffff;
  border-color: rgba(217, 119, 6, 0.18);
  color: #451a03;
}

.nav-number-tile:hover {
  border-color: var(--gold-primary);
  color: var(--gold-primary);
}

.nav-number-tile.active {
  background: #b45309 !important;
  border-color: #b45309 !important;
  color: #ffffff !important;
  font-weight: 800 !important;
  box-shadow: 0 2px 8px rgba(180, 83, 9, 0.32);
}

/* Navigator: Quick Search Box */
.nav-search-wrap {
  position: relative;
  width: 100%;
}

.nav-search-input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 38px 10px 14px;
  border-radius: 10px;
  background: var(--bg-core);
  border: 1px solid var(--border-medium);
  color: var(--text-primary);
  font-size: 0.85rem;
  outline: none;
  transition: border-color 0.2s;
}

[data-theme="light"] .nav-search-input {
  background: #ffffff;
  border-color: rgba(217, 119, 6, 0.25);
  color: #1c1917;
}

.nav-search-input:focus {
  border-color: var(--gold-primary);
  box-shadow: 0 0 0 2px rgba(217, 119, 6, 0.2);
}

.nav-search-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  width: 16px;
  height: 16px;
  pointer-events: none;
}

/* Navigator: Scrollable Sukta List */
.nav-sukta-list {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  min-height: 180px !important;
  max-height: 320px !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
  background: var(--bg-surface-elevated);
  scrollbar-width: thin !important;
  scrollbar-color: var(--gold-primary, #d97706) rgba(0, 0, 0, 0.08) !important;
  flex-shrink: 0 !important;
}

.nav-sukta-list::-webkit-scrollbar {
  width: 6px !important;
  display: block !important;
}
.nav-sukta-list::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05) !important;
  border-radius: 3px !important;
}
.nav-sukta-list::-webkit-scrollbar-thumb {
  background: var(--gold-primary, #d97706) !important;
  border-radius: 3px !important;
}

[data-theme="light"] .nav-sukta-list {
  background: #ffffff;
  border-color: rgba(217, 119, 6, 0.18);
}

.nav-sukta-item {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 0.86rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.15s;
  user-select: none;
}

.nav-sukta-item:last-child {
  border-bottom: none;
}

.nav-sukta-item:hover {
  background: rgba(217, 119, 6, 0.08);
}

.nav-sukta-item.active {
  background: rgba(180, 83, 9, 0.16) !important;
  color: var(--gold-primary) !important;
  font-weight: 700 !important;
  border-left: 3px solid #b45309;
}

/* ==========================================================================
   MOBILE RESPONSIVE BREAKPOINT (< 768px)
   ========================================================================== */
@media (max-width: 768px) {
  .bc-desktop-group {
    display: none;
  }
  .bc-mobile-pill {
    display: inline-flex;
  }
  .bc-actions-group .bc-overview-btn,
  .bc-actions-group .bc-bookmark-btn {
    display: none;
  }
  .vedas-breadcrumb-bar {
    padding: 0 12px;
  }
  .mantra-pager-strip {
    padding: 0 8px;
    gap: 6px;
  }
  .pager-nav-btn span {
    display: none;
  }
  .pager-nav-btn {
    padding: 6px 8px;
  }
  .pager-numbers-wrapper {
    max-width: calc(100% - 70px);
  }

    /* Centered Modal on Mobile (< 768px): 80% height, 90% width */
  .vedic-navigator-drawer {
    top: 50% !important;
    left: 50% !important;
    right: auto !important;
    bottom: auto !important;
    width: 90vw !important;
    max-width: 90vw !important;
    height: 80vh !important;
    max-height: 80vh !important;
    border-radius: 20px !important;
    border: 1px solid var(--border-medium) !important;
    transform: translate(-50%, -46%) scale(0.96) !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.75) !important;
    padding-bottom: 0 !important;
  }

  .vedic-navigator-drawer.open {
    transform: translate(-50%, -50%) scale(1) !important;
  }

  .drawer-drag-handle {
    display: none !important;
  }

  .navigator-content {
    padding: 12px 14px 28px !important;
    gap: 10px !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .nav-number-grid {
    max-height: 105px !important;
    gap: 6px !important;
  }

  .nav-number-tile {
    height: 32px !important;
    font-size: 0.84rem !important;
  }

  .nav-sukta-list {
    min-height: 160px !important;
    max-height: 280px !important;
  }

  /* Streamlined bottom clearance: tight fit above 56px bottom bar without redundant nested stacking */
  #view-vedas {
    padding-bottom: 0 !important;
    min-height: auto !important;
  }
  #view-vedas .sanctuary-stage-wrapper {
    padding-top: 8px !important;
    padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px)) !important;
  }
  #view-vedas .vedas-tab-view {
    padding-bottom: 0 !important;
    min-height: auto !important;
  }
  #view-vedas .mantra-sanctum {
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
  }
  #view-vedas .holy-mantra-card {
    margin-bottom: 12px !important;
  }
}

/* Background scroll lock when Unified Vedic Navigator is open */
body.navigator-modal-open {
  overflow: hidden !important;
}


/* ==========================================================================
   VEDIC HIERARCHY & STRUCTURE EXPLAINER STYLES
   ========================================================================== */
.nav-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2px;
}

.nav-section-info-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(217, 119, 6, 0.12);
  border: 1px solid rgba(217, 119, 6, 0.28);
  color: var(--gold-primary, #d97706);
  cursor: pointer;
  padding: 0;
  transition: all 0.2s ease;
}

.nav-section-info-btn:hover {
  background: var(--gold-primary, #d97706);
  color: #ffffff;
  border-color: var(--gold-primary, #d97706);
  transform: scale(1.1);
  box-shadow: 0 2px 8px rgba(217, 119, 6, 0.35);
}

.nav-section-info-btn svg {
  width: 13px;
  height: 13px;
}

/* Mantra Pager Info Button */
.pager-info-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--gold-primary, #d97706);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s ease;
  flex-shrink: 0;
}

.pager-info-btn:hover {
  background: rgba(217, 119, 6, 0.15);
  border-color: var(--gold-primary, #d97706);
  transform: translateY(-1px);
}

.pager-info-btn svg {
  width: 14px;
  height: 14px;
}

/* Explainer Modal */
.vedic-structure-modal-overlay {
  z-index: 1300 !important;
}

.vedic-structure-modal-card {
  max-width: 600px !important;
  width: 92vw !important;
  max-height: 85vh !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  border-radius: 20px !important;
  border: 1px solid var(--border-medium, rgba(217, 119, 6, 0.3)) !important;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.8) !important;
}

.vedic-structure-modal-body {
  flex: 1 1 auto;
  overflow-y: auto !important;
  padding: 16px 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--gold-primary, #d97706) rgba(0, 0, 0, 0.08);
}

.vedic-structure-modal-body::-webkit-scrollbar {
  width: 6px;
}
.vedic-structure-modal-body::-webkit-scrollbar-thumb {
  background: var(--gold-primary, #d97706);
  border-radius: 3px;
}

/* Citation Decoder Box */
.hierarchy-citation-box {
  background: linear-gradient(135deg, rgba(217, 119, 6, 0.15) 0%, rgba(180, 83, 9, 0.06) 100%);
  border: 1px solid rgba(217, 119, 6, 0.35);
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hierarchy-citation-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.citation-badge {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: #b45309;
  color: #ffffff;
  padding: 2px 8px;
  border-radius: 6px;
}

.citation-example-title {
  font-size: 0.9rem;
  color: var(--text-primary);
}

.hierarchy-citation-flow {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 0.86rem;
  font-weight: 700;
}

.cite-step {
  padding: 4px 10px;
  border-radius: 8px;
  background: var(--bg-surface-elevated, #292524);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
}

[data-theme="light"] .cite-step {
  background: #ffffff;
  color: #451a03;
  border-color: rgba(217, 119, 6, 0.25);
}

.cite-sep {
  color: var(--gold-primary, #d97706);
  font-weight: 900;
  font-size: 1.1rem;
}

.hierarchy-citation-note {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* Hierarchy Cards Container */
.hierarchy-cards-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hierarchy-card {
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface-elevated, #24201c);
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 0.25s ease;
  position: relative;
}

[data-theme="light"] .hierarchy-card {
  background: #ffffff;
  border-color: rgba(217, 119, 6, 0.18);
}

.hierarchy-card.target-highlight {
  border: 2px solid var(--gold-primary, #d97706) !important;
  background: rgba(217, 119, 6, 0.09) !important;
  box-shadow: 0 0 24px rgba(217, 119, 6, 0.3) !important;
  transform: scale(1.01);
}

.h-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.h-level-badge {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gold-primary, #d97706);
}

.h-level-tag {
  font-family: var(--font-sanskrit, serif);
  font-size: 0.82rem;
  color: var(--text-muted);
}

.h-card-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
}

.h-card-desc {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.5;
  color: var(--text-secondary);
}

.h-card-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}

.h-chip {
  font-size: 0.78rem;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(217, 119, 6, 0.08);
  border: 1px solid rgba(217, 119, 6, 0.2);
  color: var(--text-primary);
}

.h-layers-list {
  margin: 0;
  padding-left: 18px;
  font-size: 0.84rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

.h-divisions-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  margin-top: 2px;
}

@media (max-width: 480px) {
  .h-divisions-grid {
    grid-template-columns: 1fr;
  }
}

.h-div-row {
  font-size: 0.8rem;
  padding: 4px 8px;
  border-radius: 6px;
  background: var(--bg-core);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

[data-theme="light"] .h-div-row {
  background: #fdfbf7;
}

.h-analogy-box {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: rgba(0, 0, 0, 0.15);
  border-left: 3px solid var(--gold-primary, #d97706);
  padding: 8px 12px;
  border-radius: 0 8px 8px 0;
  font-size: 0.82rem;
  color: var(--text-primary);
  margin-top: 4px;
}

[data-theme="light"] .h-analogy-box {
  background: rgba(217, 119, 6, 0.06);
}

.h-analogy-icon {
  font-size: 1.05rem;
  line-height: 1;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
  .pager-info-btn span {
    display: none;
  }
  .pager-info-btn {
    padding: 6px 8px;
    min-width: 34px;
    justify-content: center;
  }
  .pager-numbers-wrapper {
    max-width: calc(100% - 110px) !important;
  }
}
