/* ==========================================================================
   ભાવભીની શ્રદ્ધાંજલિ - GUJJU LOVE GURU (CHANDAN RATHOD) TRIBUTE MEMORIAL
   Master Stylesheet: Sacred Floral Aesthetic (Gujarati & Hindi Bilingual)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@500;700;900&family=Mukta+Vaani:wght@300;400;600;700&family=Noto+Sans+Devanagari:wght@400;600;700&family=Noto+Sans+Gujarati:wght@300;400;600;700;800&family=Poppins:wght@300;400;500;600;700&family=Rozha+One&display=swap');

:root {
  --color-bg-dark: #0f0a0a;
  --color-bg-deep: #160d0e;
  --color-card: rgba(28, 18, 19, 0.96);
  --color-card-border: #d97706;
  --color-saffron: #f59e0b;
  --color-gold: #fbbf24;
  --color-gold-light: #fef08a;
  --color-maroon: #881337;
  --color-maroon-dark: #4c0519;
  --color-marigold: #ff8c00;
  --color-text-main: #fffbeb;
  --color-text-muted: #e2d3be;
  --color-text-accent: #fcd34d;
  --font-serif: 'Rozha One', 'Cinzel', serif;
  --font-gujarati: 'Mukta Vaani', 'Noto Sans Gujarati', sans-serif;
  --font-hindi: 'Noto Sans Devanagari', 'Mukta Vaani', sans-serif;
  --font-body: 'Poppins', 'Mukta Vaani', sans-serif;
  --shadow-glow: 0 0 25px rgba(245, 158, 11, 0.35);
  --shadow-card: 0 15px 35px rgba(0, 0, 0, 0.65);
}

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body {
  background: radial-gradient(circle at 50% 10%, #2b1114 0%, #15090a 50%, #0a0405 100%);
  background-attachment: fixed;
  color: var(--color-text-main);
  font-family: var(--font-body);
  line-height: 1.85;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  width: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-bottom: 30px;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    radial-gradient(circle at 20% 20%, rgba(245, 158, 11, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 80% 80%, rgba(225, 29, 72, 0.05) 0%, transparent 40%);
  pointer-events: none;
  z-index: 0;
}

/* Language Visibility Rules */
body.lang-gu .lang-hi { display: none !important; }
body.lang-gu .lang-gu { display: inline !important; }
body.lang-gu blockquote.lang-gu,
body.lang-gu div.lang-gu,
body.lang-gu p.lang-gu,
body.lang-gu h1.lang-gu,
body.lang-gu h2.lang-gu,
body.lang-gu h3.lang-gu,
body.lang-gu h4.lang-gu,
body.lang-gu h5.lang-gu { display: block !important; }

body.lang-hi .lang-gu { display: none !important; }
body.lang-hi .lang-hi { display: inline !important; }
body.lang-hi blockquote.lang-hi,
body.lang-hi div.lang-hi,
body.lang-hi p.lang-hi,
body.lang-hi h1.lang-hi,
body.lang-hi h2.lang-hi,
body.lang-hi h3.lang-hi,
body.lang-hi h4.lang-hi,
body.lang-hi h5.lang-hi { display: block !important; font-family: var(--font-hindi) !important; }

/* Garland Banner */
.garland-banner {
  background: linear-gradient(90deg, #92400e, #d97706, #f59e0b, #d97706, #92400e);
  color: #fff;
  text-align: center;
  padding: 6px 14px;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.5);
  position: relative;
  z-index: 100;
  font-family: var(--font-gujarati);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.garland-banner .om-sym {
  font-size: 1.25rem;
  color: var(--color-gold-light);
  animation: pulse 2s infinite ease-in-out;
  flex-shrink: 0;
}

.memorial-nav {
  position: sticky;
  top: 0;
  background: rgba(22, 13, 14, 0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 2px solid rgba(217, 119, 6, 0.45);
  padding: 10px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 999;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6);
  min-height: 64px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--color-gold);
  flex-shrink: 0;
}

.nav-brand img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--color-gold);
  object-fit: cover;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
}

.brand-text h1 {
  font-family: var(--font-gujarati);
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--color-gold);
  line-height: 1.2;
}

.brand-text span {
  font-size: 0.7rem;
  color: var(--color-text-muted);
  letter-spacing: 1px;
  text-transform: uppercase;
  display: block;
}

.nav-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
}

/* Audio Player with Animated Soundwave Equalizer */
.khalipo-audio-bar {
  background: linear-gradient(135deg, rgba(76, 5, 25, 0.95), rgba(28, 18, 19, 0.98));
  border: 1px solid rgba(245, 158, 11, 0.5);
  border-radius: 50px;
  padding: 6px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  cursor: pointer;
  transition: all 0.25s ease;
}

.khalipo-audio-bar:hover {
  border-color: var(--color-gold);
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.45);
}

.khalipo-audio-bar.playing {
  border-color: #22c55e;
  box-shadow: 0 0 15px rgba(34, 197, 94, 0.4);
}

.btn-play-audio {
  background: var(--color-marigold);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: #120a0b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  cursor: pointer;
  transition: transform 0.2s, background 0.2s;
  flex-shrink: 0;
}

.khalipo-audio-bar.playing .btn-play-audio {
  background: #22c55e;
  color: #fff;
}

.audio-track-info {
  font-size: 0.8rem;
  color: var(--color-gold-light);
  white-space: nowrap;
  line-height: 1.2;
}

.audio-track-info small {
  color: var(--color-text-muted);
  display: block;
  font-size: 0.7rem;
}

/* Soundwave Equalizer Bars */
.sound-bars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 16px;
  margin-left: 4px;
}

.sound-bars span {
  width: 3px;
  background: var(--color-gold);
  border-radius: 2px;
  height: 4px;
  transition: height 0.2s ease;
}

.khalipo-audio-bar.playing .sound-bars span:nth-child(1) { animation: soundWave 0.8s infinite alternate ease-in-out; }
.khalipo-audio-bar.playing .sound-bars span:nth-child(2) { animation: soundWave 0.5s infinite alternate ease-in-out 0.2s; }
.khalipo-audio-bar.playing .sound-bars span:nth-child(3) { animation: soundWave 0.9s infinite alternate ease-in-out 0.4s; }

@keyframes soundWave {
  0% { height: 4px; }
  100% { height: 16px; }
}

/* Language Toggle Button */
.btn-lang-toggle {
  background: linear-gradient(135deg, #d97706, #b45309);
  color: #fff;
  border: 1px solid var(--color-gold-light);
  padding: 6px 14px;
  border-radius: 25px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.25s ease;
  box-shadow: 0 2px 10px rgba(217, 119, 6, 0.4);
}

.btn-lang-toggle:hover {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.btn-nav {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid var(--color-saffron);
  color: var(--color-gold-light);
  padding: 7px 15px;
  border-radius: 25px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.25s ease;
  text-decoration: none;
  font-family: var(--font-gujarati);
  white-space: nowrap;
}

.btn-nav:hover {
  background: var(--color-saffron);
  color: #0f0a0a;
  box-shadow: var(--shadow-glow);
  transform: translateY(-2px);
}

.btn-nav.active {
  background: var(--color-maroon);
  border-color: #f43f5e;
  color: #fff;
}

/* Container & Cards */
.container {
  max-width: 1150px;
  margin: 0 auto;
  padding: 22px 18px 40px 18px;
  position: relative;
  z-index: 10;
}

.content-card {
  background: var(--color-card);
  border-radius: 20px;
  border: 1px solid rgba(217, 119, 6, 0.4);
  box-shadow: var(--shadow-card);
  padding: 32px 35px;
  margin-bottom: 28px;
  position: relative;
  overflow: hidden;
}

.content-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #b91c1c, #f59e0b, #fbbf24, #f59e0b, #b91c1c);
}

.hero-altar-card {
  text-align: center;
}

.om-title {
  font-size: 2.6rem;
  color: var(--color-gold);
  text-shadow: 0 0 20px rgba(251, 191, 36, 0.6);
  font-family: var(--font-gujarati);
  margin-bottom: 5px;
}

.shradhanjali-badge {
  display: inline-block;
  background: linear-gradient(90deg, #991b1b, #b91c1c, #991b1b);
  border: 1px solid var(--color-gold);
  color: #fff;
  padding: 5px 22px;
  border-radius: 30px;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  margin-bottom: 12px;
  font-family: var(--font-gujarati);
  box-shadow: 0 0 15px rgba(225, 29, 72, 0.4);
}

.tribute-name {
  font-family: var(--font-gujarati);
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--color-gold);
  line-height: 1.2;
  margin-bottom: 6px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.8);
}

.tribute-alias {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  color: #fca5a5;
  margin-bottom: 10px;
  letter-spacing: 1px;
}

.life-dates {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.life-dates span {
  color: var(--color-gold);
  font-weight: 700;
}

/* Chapter Navigation Bar */
.chapter-nav-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(43, 17, 20, 0.85);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 14px;
  padding: 10px 18px;
  margin-bottom: 20px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.chapter-breadcrumb {
  font-size: 0.88rem;
  color: var(--color-text-muted);
  font-family: var(--font-gujarati);
  display: flex;
  align-items: center;
  gap: 6px;
}

.chapter-breadcrumb a {
  color: var(--color-gold-light);
  text-decoration: none;
}

.chapter-breadcrumb a:hover {
  text-decoration: underline;
  color: var(--color-gold);
}

.chapter-tracker-badge {
  background: linear-gradient(135deg, #d97706, #92400e);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  font-family: var(--font-gujarati);
  white-space: nowrap;
}

.card-title {
  font-family: var(--font-gujarati);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--color-gold);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
  line-height: 1.3;
}

.card-title .icon {
  font-size: 1.7rem;
  flex-shrink: 0;
}

.card-subtitle {
  font-size: 0.98rem;
  color: #fca5a5;
  margin-bottom: 18px;
  font-weight: 500;
  font-style: italic;
}

.source-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.45);
  border-radius: 20px;
  padding: 5px 14px;
  font-size: 0.84rem;
  color: var(--color-gold-light);
  margin-bottom: 22px;
  font-family: var(--font-gujarati);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Editorial 2-Column Hero Grid */
.chapter-hero-grid {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 26px;
  align-items: start;
  margin-bottom: 25px;
}

.tribute-photo-frame {
  position: relative;
  width: 100%;
  max-width: 380px;
  margin: 0 auto;
  padding: 10px;
  background: linear-gradient(145deg, #381217, #1c0b0e);
  border: 3px solid var(--color-gold);
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.8), 0 0 20px rgba(245, 158, 11, 0.3);
  text-align: center;
  transition: box-shadow 0.4s ease;
}

.tribute-photo-frame img {
  width: 100%;
  height: 310px;
  object-fit: cover;
  object-position: top center;
  border-radius: 10px;
  display: block;
}

.frame-garland-overlay {
  position: absolute;
  top: -14px;
  left: 0;
  right: 0;
  font-size: 1.4rem;
  text-shadow: 0 2px 8px rgba(0,0,0,0.8);
  pointer-events: none;
}

.frame-caption {
  margin-top: 10px;
  font-family: var(--font-gujarati);
  font-size: 0.92rem;
  color: var(--color-gold-light);
  font-weight: 600;
  line-height: 1.4;
}

.chapter-highlights-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.shloka-box {
  background: linear-gradient(135deg, rgba(88, 15, 27, 0.55), rgba(43, 17, 20, 0.85));
  border-left: 5px solid var(--color-gold);
  border-radius: 0 12px 12px 0;
  padding: 16px 20px;
  font-family: var(--font-gujarati);
  font-size: 1.1rem;
  color: var(--color-gold-light);
  font-style: italic;
  line-height: 1.7;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.key-facts-card {
  background: rgba(36, 17, 20, 0.7);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 14px;
  padding: 16px 20px;
}

.key-facts-card h4 {
  font-family: var(--font-gujarati);
  color: var(--color-gold);
  font-size: 1rem;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.key-facts-card ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.key-facts-card li {
  font-family: var(--font-gujarati);
  font-size: 0.92rem;
  color: var(--color-text-main);
  line-height: 1.5;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.key-facts-card li::before {
  content: '✦';
  color: var(--color-saffron);
  font-size: 0.85rem;
  flex-shrink: 0;
  margin-top: 2px;
}

/* Prose Typography */
.tribute-text-block {
  margin-top: 15px;
  margin-bottom: 25px;
}

.prose-text {
  font-size: 1.08rem;
  color: var(--color-text-main);
  line-height: 2;
  margin-bottom: 20px;
  font-family: var(--font-gujarati);
}

.prose-text:last-child {
  margin-bottom: 0;
}

/* Photo Gallery */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(245px, 1fr));
  gap: 22px;
  margin: 25px 0;
}

.photo-card {
  background: linear-gradient(145deg, #241416, #180b0d);
  border: 2px solid rgba(245, 158, 11, 0.4);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.65);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.photo-card:hover {
  transform: translateY(-6px);
  border-color: var(--color-gold);
  box-shadow: 0 12px 30px rgba(245, 158, 11, 0.3);
}

.photo-card img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  object-position: top center;
  display: block;
  border-bottom: 1px solid rgba(245, 158, 11, 0.3);
}

.photo-caption {
  padding: 14px 16px;
  background: rgba(18, 10, 11, 0.95);
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex-grow: 1;
}

.photo-caption strong {
  color: var(--color-gold);
  font-family: var(--font-gujarati);
  font-size: 1rem;
  line-height: 1.3;
}

.photo-caption span {
  color: var(--color-text-muted);
  font-family: var(--font-gujarati);
  font-size: 0.82rem;
  line-height: 1.4;
}

/* Interactive Action Bar */
.interactive-action-bar {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  margin: 25px 0;
  padding: 18px;
  background: rgba(30, 16, 18, 0.85);
  border-radius: 16px;
  border: 1px dashed rgba(245, 158, 11, 0.4);
}

.action-btn {
  background: linear-gradient(135deg, #b91c1c, #991b1b);
  border: 1px solid var(--color-gold);
  color: #fff;
  padding: 11px 22px;
  border-radius: 30px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.25s ease;
  box-shadow: 0 4px 15px rgba(185, 28, 28, 0.4);
  font-family: var(--font-gujarati);
  text-decoration: none;
}

.action-btn:hover {
  background: linear-gradient(135deg, #d97706, #b45309);
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.5);
}

.action-btn.secondary {
  background: rgba(245, 158, 11, 0.15);
  border-color: var(--color-saffron);
  color: var(--color-gold-light);
}

/* Diya Display & Divine Light Aura */
.diya-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin: 15px 0;
  position: relative;
}

.diya-item {
  text-align: center;
  position: relative;
}

.diya-flame {
  font-size: 2.2rem;
  display: block;
  animation: flicker 1.5s infinite alternate ease-in-out;
  filter: drop-shadow(0 0 12px #f59e0b);
  transition: transform 0.3s ease, filter 0.3s ease;
}

.diya-base {
  font-size: 1.8rem;
  display: block;
  margin-top: -12px;
}

.diya-count-display {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  font-weight: 500;
  font-family: var(--font-gujarati);
  text-align: center;
}

.diya-count-num {
  color: var(--color-gold);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: 0.5px;
}

/* Diya Divine Aura Surge Effect */
.diya-aura-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.2);
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(251, 191, 36, 0.8) 0%, rgba(245, 158, 11, 0.4) 40%, transparent 70%);
  pointer-events: none;
  opacity: 0;
  z-index: 5;
  transition: all 0.8s cubic-bezier(0.1, 0.8, 0.2, 1);
}

.diya-aura-ring.active {
  transform: translate(-50%, -50%) scale(1.6);
  opacity: 1;
}

/* Floating Divine Blessing Text */
.divine-blessing-popup {
  position: fixed;
  pointer-events: none;
  z-index: 10005;
  font-family: var(--font-gujarati);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--color-gold-light);
  text-shadow: 0 0 20px #f59e0b, 0 0 40px #fbbf24;
  animation: floatBlessing 1.8s forwards ease-out;
}

@keyframes floatBlessing {
  0% { transform: translate(-50%, 0) scale(0.8); opacity: 0; }
  25% { transform: translate(-50%, -30px) scale(1.15); opacity: 1; }
  100% { transform: translate(-50%, -100px) scale(1); opacity: 0; }
}

/* Chapter Pagination */
.chapter-pagination {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 14px;
  align-items: center;
  margin-top: 30px;
  padding-top: 22px;
  border-top: 1px solid rgba(217, 119, 6, 0.3);
}

.btn-page-nav {
  background: rgba(36, 17, 20, 0.9);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: var(--color-gold-light);
  padding: 10px 16px;
  border-radius: 12px;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  transition: all 0.25s ease;
  min-width: 0;
}

.btn-page-nav:hover {
  background: var(--color-maroon);
  border-color: var(--color-gold);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

.btn-page-nav.prev { text-align: left; }
.btn-page-nav.next { text-align: right; }

.btn-page-nav .nav-label {
  font-size: 0.72rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.btn-page-nav .nav-title {
  font-family: var(--font-gujarati);
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--color-gold);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-all-chapters {
  background: linear-gradient(135deg, #d97706, #92400e);
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  font-family: var(--font-gujarati);
  transition: all 0.25s ease;
  white-space: nowrap;
}

.btn-all-chapters:hover {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  transform: scale(1.03);
  box-shadow: var(--shadow-glow);
}

/* Modal Directory */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 10000;
  display: none;
  justify-content: center;
  align-items: center;
  padding: 16px;
}

.modal-overlay.active { display: flex; }

.chapters-modal {
  background: #180e10;
  border: 2px solid var(--color-gold);
  border-radius: 20px;
  max-width: 900px;
  width: 100%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 50px rgba(245, 158, 11, 0.4);
  overflow: hidden;
}

.modal-header {
  padding: 15px 20px;
  background: linear-gradient(90deg, #4c0519, #1c0d0e);
  border-bottom: 1px solid rgba(245, 158, 11, 0.3);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  font-family: var(--font-gujarati);
  color: var(--color-gold);
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-close-modal {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 1.6rem;
  cursor: pointer;
  line-height: 1;
}

.modal-search-box {
  padding: 12px 20px;
  background: #120a0b;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.search-input {
  width: 100%;
  background: #241416;
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-radius: 30px;
  padding: 9px 18px;
  color: #fff;
  font-size: 0.92rem;
  outline: none;
  font-family: var(--font-gujarati);
}

.modal-body {
  padding: 18px;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}

.chapter-tile {
  background: #241517;
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 12px;
  padding: 12px 14px;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.2s ease;
}

.chapter-tile:hover {
  background: var(--color-maroon);
  border-color: var(--color-gold);
  transform: translateX(3px);
}

.chapter-tile.current {
  border: 2px solid var(--color-gold);
  background: rgba(245, 158, 11, 0.2);
}

.chapter-num {
  background: var(--color-marigold);
  color: #0f0a0a;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.88rem;
  flex-shrink: 0;
}

.chapter-info { min-width: 0; }
.chapter-info h5 {
  font-family: var(--font-gujarati);
  color: var(--color-gold-light);
  font-size: 0.92rem;
  line-height: 1.3;
  margin-bottom: 2px;
}
.chapter-info span {
  font-size: 0.72rem;
  color: var(--color-text-muted);
  display: block;
}

/* Subtle Canvas Petals */
#petals-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9998;
}

/* Footer & Universal Attribution */
.memorial-footer {
  background: #0a0405;
  border-top: 2px solid rgba(217, 119, 6, 0.35);
  padding: 35px 20px 20px 20px;
  text-align: center;
  color: var(--color-text-muted);
  position: relative;
  z-index: 10;
  margin-top: 40px;
}

.footer-garland { font-size: 1.4rem; margin-bottom: 12px; letter-spacing: 8px; }
.footer-title { font-family: var(--font-gujarati); font-size: 1.35rem; color: var(--color-gold); margin-bottom: 6px; }

.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
  margin: 18px 0;
}

.footer-links a {
  color: var(--color-gold-light);
  text-decoration: none;
  font-size: 0.88rem;
  transition: color 0.2s;
  font-family: var(--font-gujarati);
}

.footer-links a:hover { color: var(--color-saffron); text-decoration: underline; }
.copyright { font-size: 0.8rem; margin-top: 14px; color: #786466; font-family: var(--font-gujarati); }

.tribute-attribution {
  font-size: 0.76rem;
  color: #a89481;
  letter-spacing: 0.6px;
  text-align: center;
  margin-top: 24px;
  padding: 8px 12px;
  border-top: 1px solid rgba(217, 119, 6, 0.2);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  opacity: 0.85;
}

/* Mobile Quick Bar */
.mobile-quick-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(20, 10, 12, 0.98);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 2px solid var(--color-gold);
  padding: 8px 10px;
  z-index: 9999;
  justify-content: space-around;
  align-items: center;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.7);
}

.mobile-quick-btn {
  background: transparent;
  border: none;
  color: var(--color-gold-light);
  font-family: var(--font-gujarati);
  font-size: 0.74rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  cursor: pointer;
  text-decoration: none;
  min-width: 50px;
}

.mobile-quick-btn span.emoji { font-size: 1.2rem; }

.mobile-quick-btn.primary {
  background: linear-gradient(135deg, #b91c1c, #991b1b);
  border: 1px solid var(--color-gold);
  padding: 4px 10px;
  border-radius: 20px;
  color: #fff;
}

/* Responsive Rules */
@media (max-width: 868px) {
  .chapter-hero-grid { grid-template-columns: 1fr; gap: 20px; }
  .tribute-photo-frame { max-width: 340px; }
  .chapter-pagination { grid-template-columns: 1fr; gap: 10px; }
  .btn-page-nav.prev, .btn-page-nav.next { text-align: center; }
}

@media (max-width: 768px) {
  body { padding-bottom: 70px; }
  .memorial-nav { padding: 8px 12px; min-height: 56px; }
  .nav-brand img { width: 36px; height: 36px; }
  .brand-text h1 { font-size: 0.95rem; }
  .brand-text span { font-size: 0.62rem; }

  .khalipo-audio-bar .audio-track-info { display: none; }
  .khalipo-audio-bar { padding: 4px 8px; border-radius: 50px; }
  .nav-controls .btn-nav:not(.active) { display: none; }
  .nav-controls .btn-nav.active { padding: 5px 10px; font-size: 0.78rem; }
  .btn-lang-toggle { padding: 4px 10px; font-size: 0.75rem; }

  .content-card { padding: 20px 16px; border-radius: 16px; }
  .tribute-name { font-size: 1.85rem; }
  .tribute-alias { font-size: 1.1rem; }
  .card-title { font-size: 1.35rem; }
  .om-title { font-size: 2rem; }
  .photo-grid { grid-template-columns: 1fr; gap: 16px; }
  .photo-card img { height: 220px; }
  .tribute-photo-frame img { height: 260px; }
  .mobile-quick-bar { display: flex; }
}
