/* ================================================================
   SRI AYYAPPA POOJA VIDHANAM - VEDIC TEMPLE DEVOTIONAL THEME
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@500;700;900&family=Mandali&family=Noto+Serif+Telugu:wght@400;600;700&family=Ramabhadra&display=swap');

:root {
  --bg-main: #f8f4ec;
  --bg-texture: radial-gradient(circle at 50% 0%, #fffbf2 0%, #f4eee2 100%);
  --bg-page: #fffdf9;
  --bg-section-header: #f2e4d0;
  --border-gold: #c59b27;
  --border-gold-light: #e6c86e;
  --border-soft: #e2d2ba;
  --text-primary: #2c1810;
  --text-secondary: #5a3d31;
  --text-maroon: #801818;
  --text-gold: #b37400;
  --accent-saffron: #d96500;
  --accent-crimson: #9e1b1b;
  --accent-gold: #d4af37;
  --box-shadow: 0 10px 30px rgba(100, 50, 10, 0.08), 0 1px 3px rgba(0,0,0,0.05);
  --page-border-radius: 6px;
  --font-body: 'Noto Serif Telugu', 'Mandali', 'Gautami', 'Nirmala UI', serif;
  --font-heading: 'Ramabhadra', 'Noto Serif Telugu', serif;
  --font-english: 'Cinzel', serif;
  --font-scale: 1;
}

[data-theme="dark"] {
  --bg-main: #140f0c;
  --bg-texture: radial-gradient(circle at 50% 0%, #201713 0%, #100b09 100%);
  --bg-page: #1f1713;
  --bg-section-header: #33231c;
  --border-gold: #d4af37;
  --border-gold-light: #f3d882;
  --border-soft: #4a3429;
  --text-primary: #f5ebe1;
  --text-secondary: #d1bdae;
  --text-maroon: #ff7b7b;
  --text-gold: #f7cb65;
  --accent-saffron: #ff8533;
  --accent-crimson: #e04b4b;
  --accent-gold: #e5b945;
  --box-shadow: 0 10px 35px rgba(0, 0, 0, 0.45);
}

[data-theme="kumkum"] {
  --bg-main: #fff5f2;
  --bg-texture: radial-gradient(circle at 50% 0%, #fffaf8 0%, #fcedea 100%);
  --bg-page: #ffffff;
  --bg-section-header: #feded9;
  --border-gold: #c2410c;
  --border-gold-light: #fb923c;
  --border-soft: #fecdd3;
  --text-primary: #3b0710;
  --text-secondary: #7f1d1d;
  --text-maroon: #991b1b;
  --text-gold: #c2410c;
  --accent-saffron: #ea580c;
  --accent-crimson: #b91c1c;
  --accent-gold: #d97706;
  --box-shadow: 0 10px 30px rgba(153, 27, 27, 0.09);
}

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

body {
  font-family: var(--font-body);
  background: var(--bg-main);
  background-image: var(--bg-texture);
  color: var(--text-primary);
  line-height: 1.75;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  font-size: calc(16px * var(--font-scale));
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Header & Top Bar */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(254, 251, 246, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 2px solid var(--border-gold);
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
  transition: background 0.3s ease;
}
[data-theme="dark"] .top-nav {
  background: rgba(26, 19, 15, 0.96);
}
[data-theme="kumkum"] .top-nav {
  background: rgba(255, 245, 242, 0.96);
}

.top-nav-inner {
  max-width: 1260px;
  margin: 0 auto;
  padding: 0.5rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 58px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--text-maroon);
  font-family: var(--font-heading);
  font-weight: 700;
  flex-shrink: 0;
}

.nav-brand-om {
  font-size: 1.8rem;
  color: var(--accent-saffron);
  text-shadow: 0 2px 4px rgba(217, 101, 0, 0.2);
  line-height: 1;
}

.nav-brand-title {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.nav-brand-title .main-txt {
  font-size: 1.12rem;
  letter-spacing: 0.2px;
  line-height: 1.25;
}

.nav-brand-title .sub-txt {
  font-size: 0.78rem;
  color: var(--text-secondary);
  font-weight: 400;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* Action buttons */
.btn-action {
  background: var(--bg-page);
  border: 1px solid var(--border-soft);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.85rem;
  padding: 0.38rem 0.65rem;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  height: 36px;
  box-sizing: border-box;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  user-select: none;
  white-space: nowrap;
}
.btn-action:hover {
  background: var(--bg-section-header);
  border-color: var(--border-gold);
  transform: translateY(-1px);
}
.btn-action.active {
  background: var(--accent-saffron);
  color: #fff;
  border-color: var(--accent-saffron);
}

/* Book controller */
.book-controller {
  background: var(--bg-section-header);
  border-bottom: 1px solid var(--border-soft);
  padding: 0.45rem 1rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.03);
}
.book-controller-inner {
  max-width: 1060px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.page-stepper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.page-select-wrap select {
  font-family: var(--font-body);
  font-size: 0.9rem;
  height: 36px;
  padding: 0 0.8rem;
  border-radius: 6px;
  border: 1.5px solid var(--border-gold);
  background: var(--bg-page);
  color: var(--text-primary);
  cursor: pointer;
  outline: none;
}

.book-controller-meta {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.page-indicator {
  font-weight: 700;
  color: var(--text-maroon);
  font-size: 0.92rem;
  white-space: nowrap;
}

.view-mode-toggle {
  display: flex;
  background: var(--bg-page);
  border-radius: 6px;
  border: 1.5px solid var(--border-soft);
  overflow: hidden;
  height: 36px;
}
.view-btn {
  border: none;
  background: transparent;
  padding: 0 0.85rem;
  font-size: 0.85rem;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font-body);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  white-space: nowrap;
  height: 100%;
}
.view-btn.active {
  background: linear-gradient(135deg, var(--text-maroon), #500a0a);
  color: #fff;
  font-weight: 700;
}

﻿/* Main Container */
.main-wrapper {
  flex: 1;
  max-width: 960px;
  width: 100%;
  margin: 1.5rem auto 3rem;
  padding: 0 1rem;
}

/* Book Page Styling (authentic replica of the PDF) */
.page-container {
  background: var(--bg-page);
  border: 1px solid var(--border-soft);
  border-radius: var(--page-border-radius);
  box-shadow: var(--box-shadow);
  margin-bottom: 2.5rem;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

/* Book border layout */
.page-inner {
  padding: 2.2rem 2.8rem;
  position: relative;
  min-height: 650px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

@media (max-width: 768px) {
  .page-inner {
    padding: 1.2rem 0.85rem;
    min-height: auto;
  }
}

/* Traditional Page Header */
.page-header-chant {
  text-align: center;
  color: var(--text-maroon);
  font-size: 0.95rem;
  font-weight: 600;
  padding-bottom: 0.4rem;
  letter-spacing: 0.5px;
}

.page-header-divider {
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, var(--border-gold) 20%, var(--border-gold) 80%, transparent 100%);
  margin: 0.2rem 0 1.2rem;
}

/* Page Titles */
.page-title-main {
  text-align: center;
  font-family: var(--font-heading);
  color: var(--text-maroon);
  font-size: 1.55rem;
  margin-bottom: 0.4rem;
  font-weight: 700;
  line-height: 1.4;
}

.page-subtitle-instruction {
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 1.2rem;
  font-style: italic;
}

/* Section Header (The shaded bar) */
.section-banner {
  background: var(--bg-section-header);
  border-left: 5px solid var(--accent-saffron);
  border-radius: 4px;
  padding: 0.45rem 0.9rem;
  margin: 1.1rem 0 0.8rem;
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--text-maroon);
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Sloka block */
.sloka-card {
  padding: 0.4rem 0.6rem;
  margin-bottom: 0.6rem;
}
.sloka-line {
  font-size: 1.02rem;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
  letter-spacing: 0.1px;
}

/* Mantras row & grid */
.mantra-row {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  padding: 0.5rem 0;
  font-weight: 600;
  color: var(--text-maroon);
}

.mantra-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem 1rem;
  padding: 0.5rem 0;
}
@media (max-width: 600px) {
  .mantra-grid-3 {
    grid-template-columns: 1fr;
  }
}
.mantra-cell {
  background: rgba(197, 155, 39, 0.05);
  border: 1px solid var(--border-soft);
  border-radius: 4px;
  padding: 0.4rem 0.6rem;
  text-align: center;
  font-size: 0.96rem;
  font-weight: 600;
  color: var(--text-primary);
}

.instruction-note {
  font-size: 0.88rem;
  color: var(--text-secondary);
  font-style: italic;
  margin: 0.4rem 0;
  line-height: 1.5;
}

/* Two-column Namavali Tables */
.namavali-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem 1.5rem;
  margin: 0.5rem 0 1rem;
}
@media (max-width: 700px) {
  .namavali-grid-2 {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.35rem !important;
  }
}

.nama-item {
  display: flex;
  align-items: baseline;
  padding: 0.32rem 0.5rem;
  border-radius: 4px;
  transition: all 0.2s;
  cursor: pointer;
  border-bottom: 1px dashed rgba(210, 180, 140, 0.25);
  user-select: none;
}
.nama-item:hover {
  background: rgba(217, 101, 0, 0.08);
}
.nama-item.chanted {
  background: rgba(34, 197, 94, 0.12);
  border-left: 3px solid #16a34a;
  text-decoration: none;
}
.nama-item.chanted .nama-text {
  color: #166534;
  font-weight: 600;
}
[data-theme="dark"] .nama-item.chanted {
  background: rgba(34, 197, 94, 0.2);
}
[data-theme="dark"] .nama-item.chanted .nama-text {
  color: #86efac;
}

.nama-text {
  font-size: 0.98rem;
  line-height: 1.6;
}

/* Lyrics & Sankeertana styling */
.lyrics-block {
  margin: 0.75rem 0 1.25rem;
}
.lyrics-pallavi {
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--text-maroon);
  margin-bottom: 0.65rem;
  line-height: 1.6;
}
.lyrics-line {
  font-size: 1rem;
  color: var(--text-primary);
  margin-bottom: 0.45rem;
  line-height: 1.65;
}

/* Box Callouts & Borders */
.ornamental-box {
  border: 2px dashed var(--border-gold);
  border-radius: 8px;
  padding: 1.2rem 1.6rem;
  margin: 1.5rem 0;
  background: rgba(245, 230, 205, 0.15);
  text-align: center;
}
.ornamental-box .box-main-text {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-maroon);
  margin-bottom: 0.35rem;
}
.ornamental-box .box-sub-text {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

/* Cover Page Specific Styles */
.cover-page {
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 1000px;
}
.cover-top-om {
  font-size: 3.5rem;
  color: var(--accent-saffron);
  line-height: 1;
  margin-top: 1rem;
}
.cover-invocation {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-maroon);
  margin: 0.8rem 0;
}
.cover-ornament {
  color: var(--border-gold);
  font-size: 1.1rem;
  letter-spacing: 0.5rem;
  margin-bottom: 2rem;
}
.cover-main-heading {
  font-family: var(--font-heading);
  font-size: 2.3rem;
  font-weight: 800;
  color: var(--text-maroon);
  margin-bottom: 0.5rem;
  letter-spacing: 0.5px;
}
.cover-sub-heading {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-saffron);
  margin-bottom: 1.5rem;
}
.cover-divider {
  width: 85%;
  height: 2px;
  margin: 1rem auto 1.5rem;
  background: linear-gradient(90deg, transparent, var(--border-gold), transparent);
}
.cover-dedication {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  max-width: 650px;
  margin: 0 auto 2rem;
  line-height: 1.6;
}

.cover-index-card {
  border: 1.5px dashed var(--border-gold);
  border-radius: 8px;
  padding: 1.5rem 1.8rem;
  text-align: left;
  max-width: 650px;
  margin: 0 auto 2.5rem;
  background: rgba(254, 243, 199, 0.15);
}
.cover-index-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-maroon);
  margin-bottom: 0.75rem;
  text-align: center;
}
.cover-index-list {
  list-style: none;
}
.cover-index-list li {
  font-size: 0.96rem;
  padding: 0.35rem 0;
  position: relative;
  padding-left: 1.3rem;
  color: var(--text-primary);
}
.cover-index-list li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--accent-saffron);
  font-weight: bold;
  font-size: 1.2rem;
}

.cover-footer {
  margin-top: auto;
  padding-top: 2rem;
}
.cover-footer-symbols {
  font-size: 1.4rem;
  color: var(--accent-saffron);
  letter-spacing: 1rem;
  margin-bottom: 0.5rem;
}
.cover-footer-text {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-maroon);
}

/* Page Footer with Page Number */
.page-footer-container {
  margin-top: auto;
  padding-top: 1.2rem;
  text-align: center;
}
.page-number-display {
  display: inline-block;
  font-family: var(--font-english);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-secondary);
  padding: 0.2rem 0.8rem;
  border-top: 1px solid var(--border-soft);
}

/* Harivarasanam Specific */
.harivarasanam-stanza {
  margin-bottom: 1.25rem;
  text-align: center;
}
.harivarasanam-refrain {
  font-weight: 700;
  color: var(--text-maroon);
  margin-top: 0.35rem;
  font-size: 1.05rem;
}

/* Floating Japa Counter Widget */
.floating-counter-btn {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background: linear-gradient(135deg, var(--accent-saffron), #b45309);
  color: #fff;
  border: none;
  border-radius: 50px;
  padding: 0.75rem 1.25rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  box-shadow: 0 6px 20px rgba(180, 83, 9, 0.35);
  cursor: pointer;
  z-index: 900;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  transition: all 0.25s;
}
.floating-counter-btn:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 10px 25px rgba(180, 83, 9, 0.45);
}

/* Japa Counter Modal / Drawer */
.japa-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.japa-modal-backdrop.open {
  display: flex;
}
.japa-card {
  background: var(--bg-page);
  border: 2px solid var(--border-gold);
  border-radius: 12px;
  max-width: 480px;
  width: 100%;
  padding: 1.8rem;
  box-shadow: 0 20px 40px rgba(0,0,0,0.3);
  text-align: center;
  position: relative;
  animation: popUp 0.25s ease-out;
}
@keyframes popUp {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.japa-close-btn {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--text-secondary);
}
.japa-count-display {
  font-family: var(--font-heading);
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--text-maroon);
  line-height: 1;
  margin: 1rem 0 0.5rem;
}
.japa-target {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 1.2rem;
}
.japa-tap-btn {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, #f59e0b 0%, #b45309 100%);
  color: #fff;
  border: 4px solid #fef3c7;
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 auto 1.5rem;
  cursor: pointer;
  box-shadow: 0 8px 25px rgba(217, 101, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.1s;
  user-select: none;
}
.japa-tap-btn:active {
  transform: scale(0.92);
}
.japa-actions {
  display: flex;
  justify-content: center;
  gap: 0.8rem;
}

/* Sidebar Drawer */
.drawer-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(2px);
  z-index: 1500;
  display: none;
}
.drawer-backdrop.open {
  display: block;
}
.sidebar-drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: 340px;
  max-width: 85vw;
  height: 100vh;
  background: var(--bg-page);
  border-right: 2px solid var(--border-gold);
  box-shadow: 5px 0 25px rgba(0,0,0,0.25);
  z-index: 1600;
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}
.sidebar-drawer.open {
  transform: translateX(0);
}
.drawer-header {
  padding: 1.2rem;
  border-bottom: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-section-header);
}
.drawer-title {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--text-maroon);
  font-size: 1.15rem;
}
.drawer-close {
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--text-secondary);
}
.drawer-content {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 0;
}
.toc-item {
  padding: 0.65rem 1.25rem;
  display: block;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.95rem;
  border-left: 4px solid transparent;
  transition: all 0.2s;
  cursor: pointer;
}
.toc-item:hover {
  background: var(--bg-section-header);
  border-left-color: var(--accent-saffron);
}
.toc-item.active {
  border-left-color: var(--accent-saffron);
  background: rgba(217, 101, 0, 0.08);
  font-weight: 700;
  color: var(--text-maroon);
}

/* Search Modal */
.search-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(3px);
  z-index: 2100;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: 5vh;
}
.search-modal-backdrop.open {
  display: flex;
}
.search-card {
  background: var(--bg-page);
  border: 1px solid var(--border-gold);
  border-radius: 10px;
  max-width: 600px;
  width: 92%;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 15px 40px rgba(0,0,0,0.3);
  overflow: hidden;
}
.search-header {
  padding: 1rem;
  border-bottom: 1px solid var(--border-soft);
  display: flex;
  gap: 0.5rem;
}
.search-input {
  flex: 1;
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--border-gold);
  border-radius: 6px;
  background: var(--bg-main);
  color: var(--text-primary);
}
.search-results {
  flex: 1;
  overflow-y: auto;
  padding: 0.8rem;
}
.search-result-item {
  padding: 0.65rem 0.8rem;
  border-radius: 6px;
  cursor: pointer;
  margin-bottom: 0.35rem;
  transition: background 0.2s;
}
.search-result-item:hover {
  background: var(--bg-section-header);
}
.search-result-title {
  font-weight: 600;
  color: var(--text-maroon);
  font-size: 0.95rem;
}
.search-result-snippet {
  font-size: 0.86rem;
  color: var(--text-secondary);
}

/* Toast Message */
.toast-msg {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--text-maroon);
  color: #fff;
  padding: 0.6rem 1.4rem;
  border-radius: 30px;
  font-size: 0.9rem;
  box-shadow: 0 6px 20px rgba(0,0,0,0.25);
  z-index: 3000;
  transition: transform 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28), opacity 0.3s;
  opacity: 0;
  pointer-events: none;
}
.toast-msg.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* Print Stylesheet */
@media print {
  .top-nav,
  .book-controller,
  .floating-counter-btn,
  .japa-modal-backdrop,
  .sidebar-drawer,
  .drawer-backdrop,
  .search-modal-backdrop,
  .toast-msg {
    display: none !important;
  }
  
  body {
    background: #fff !important;
    color: #000 !important;
    font-size: 11pt !important;
  }
  
  .main-wrapper {
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  
  .page-container {
    box-shadow: none !important;
    border: none !important;
    margin-bottom: 0 !important;
    page-break-after: always !important;
    break-after: page !important;
    min-height: 100vh !important;
  }
  
  .page-inner {
    padding: 0.5in !important;
    min-height: 9.5in !important;
  }
  
  .section-banner {
    background: #f0f0f0 !important;
    color: #801818 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}

﻿/* PDF Download Button & Modal Styles */
.btn-download {
  background: linear-gradient(135deg, #d96500, #b45309) !important;
  color: #ffffff !important;
  border-color: #b45309 !important;
  font-weight: 700;
  box-shadow: 0 3px 8px rgba(217, 101, 0, 0.3) !important;
}
.btn-download:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(217, 101, 0, 0.45) !important;
}

.pdf-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(4px);
  z-index: 2200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.pdf-modal-backdrop.open {
  display: flex;
}
.pdf-card {
  background: var(--bg-page);
  border: 2px solid var(--border-gold);
  border-radius: 12px;
  max-width: 520px;
  width: 100%;
  padding: 2rem;
  box-shadow: 0 20px 45px rgba(0,0,0,0.35);
  text-align: center;
  position: relative;
  animation: popUp 0.25s ease-out;
}
.pdf-card-badge {
  display: inline-block;
  background: var(--bg-section-header);
  color: var(--text-maroon);
  padding: 0.25rem 0.8rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.8rem;
  border: 1px solid var(--border-soft);
}
.pdf-card h3 {
  font-family: var(--font-heading);
  color: var(--text-maroon);
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
}
.pdf-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1.4rem;
}
.pdf-options-list {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  margin-bottom: 1.5rem;
  text-align: left;
}
.pdf-option-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.2rem;
  border: 1.5px solid var(--border-soft);
  border-radius: 8px;
  background: rgba(254, 243, 199, 0.1);
  text-decoration: none;
  color: var(--text-primary);
  transition: all 0.2s;
  cursor: pointer;
}
.pdf-option-item:hover {
  border-color: var(--border-gold);
  background: var(--bg-section-header);
  transform: translateY(-2px);
}
.pdf-option-info {
  display: flex;
  flex-direction: column;
}
.pdf-option-title {
  font-weight: 700;
  color: var(--text-maroon);
  font-size: 1rem;
}
.pdf-option-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
}
.pdf-option-btn {
  background: var(--accent-saffron);
  color: #fff;
  border-radius: 6px;
  padding: 0.4rem 0.85rem;
  font-size: 0.88rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.pdf-print-tips {
  background: rgba(217, 101, 0, 0.06);
  border-radius: 6px;
  padding: 0.75rem 1rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
  text-align: left;
  border-left: 3px solid var(--accent-saffron);
}

@media screen {
  .print-only-book {
    display: none !important;
  }
}

/* ================================================================
   MOBILE WEB APP & DESKTOP ENHANCEMENTS & VIEW ALL BUTTON STYLES
   ================================================================ */

/* Prominent View All Buttons */
.btn-view-all {
  background: linear-gradient(135deg, var(--text-maroon), #500a0a) !important;
  color: #ffffff !important;
  border-color: var(--text-maroon) !important;
  font-weight: 700;
  box-shadow: 0 3px 8px rgba(128, 24, 24, 0.25) !important;
}
.btn-view-all:hover, .btn-view-all.active {
  background: linear-gradient(135deg, var(--accent-saffron), #b45309) !important;
  border-color: var(--accent-saffron) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(217, 101, 0, 0.35) !important;
}

/* Cover Page Interactive Quick Action Hub */
.cover-quick-actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
  max-width: 720px;
  margin: 1.5rem auto 2.2rem;
  width: 100%;
}
.cover-action-card {
  background: var(--bg-page);
  border: 1.5px solid var(--border-gold);
  border-radius: 10px;
  padding: 0.85rem 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 3px 10px rgba(0,0,0,0.04);
  text-align: left;
  user-select: none;
  min-height: 70px;
  box-sizing: border-box;
}
.cover-action-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-saffron);
  box-shadow: 0 6px 18px rgba(217, 101, 0, 0.18);
  background: var(--bg-section-header);
}
.cover-action-card.primary {
  background: linear-gradient(135deg, rgba(217, 101, 0, 0.1), rgba(197, 155, 39, 0.15));
  border-color: var(--accent-saffron);
}
.cover-action-card.primary:hover {
  background: linear-gradient(135deg, var(--accent-saffron), #b45309);
  color: #ffffff;
}
.cover-action-card.primary:hover .cover-action-title,
.cover-action-card.primary:hover .cover-action-subtitle {
  color: #ffffff;
}
.cover-action-icon {
  font-size: 1.65rem;
  line-height: 1;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  background: rgba(197, 155, 39, 0.12);
  border-radius: 8px;
}
.cover-action-text {
  display: flex;
  flex-direction: column;
  flex: 1;
}
.cover-action-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.98rem;
  color: var(--text-maroon);
  line-height: 1.3;
}
.cover-action-subtitle {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.35;
  margin-top: 0.15rem;
}

/* Mobile Bottom Navigation Bar */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: rgba(254, 251, 246, 0.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 2px solid var(--border-gold);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.12);
  z-index: 1100;
  justify-content: space-around;
  align-items: center;
  padding: 0 0.2rem;
  transition: background 0.3s ease;
}
[data-theme="dark"] .mobile-bottom-nav {
  background: rgba(26, 19, 15, 0.96);
}
[data-theme="kumkum"] .mobile-bottom-nav {
  background: rgba(255, 245, 242, 0.96);
}

.nav-item-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  flex: 1;
  height: 100%;
  padding: 0.25rem 0;
  transition: all 0.2s ease;
  user-select: none;
  position: relative;
}
.nav-item-btn .nav-icon {
  font-size: 1.3rem;
  line-height: 1;
  transition: transform 0.2s ease;
}
.nav-item-btn.active {
  color: var(--accent-saffron);
}
.nav-item-btn.active .nav-icon {
  transform: scale(1.18);
}
.nav-item-btn.active::after {
  content: '';
  position: absolute;
  top: 0;
  left: 30%;
  right: 30%;
  height: 3px;
  background: var(--accent-saffron);
  border-radius: 0 0 3px 3px;
}

/* Scroll To Top Button */
.scroll-top-btn {
  position: fixed;
  bottom: 1.5rem;
  left: 1.5rem;
  background: var(--bg-page);
  border: 1.5px solid var(--border-gold);
  color: var(--text-maroon);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  box-shadow: 0 6px 18px rgba(0,0,0,0.18);
  cursor: pointer;
  z-index: 950;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}
.scroll-top-btn.visible {
  opacity: 1;
  visibility: visible;
}
.scroll-top-btn:hover {
  background: var(--accent-saffron);
  color: #ffffff;
  border-color: var(--accent-saffron);
  transform: translateY(-3px);
  box-shadow: 0 10px 22px rgba(217, 101, 0, 0.35);
}

/* Responsive Rules for Mobile Web App */
@media (max-width: 768px) {
  .btn-desktop-only {
    display: none !important;
  }
  .mobile-bottom-nav {
    display: flex;
    height: 56px;
    padding: 0 0.15rem;
    align-items: center;
    justify-content: space-around;
  }
  .nav-item-btn {
    font-size: 0.68rem;
    gap: 0.1rem;
    padding: 0.2rem 0;
  }
  .nav-item-btn .nav-icon {
    font-size: 1.15rem;
  }
  .main-wrapper {
    padding-bottom: 5rem;
    margin-top: 0.5rem;
    padding: 0 0.6rem;
  }
  .floating-counter-btn {
    bottom: 4.8rem;
    right: 0.8rem;
    padding: 0.5rem 0.85rem;
    font-size: 0.82rem;
  }
  .scroll-top-btn {
    bottom: 4.8rem;
    left: 0.8rem;
    width: 40px;
    height: 40px;
    font-size: 1.1rem;
  }
  .top-nav-inner {
    padding: 0.35rem 0.65rem;
    gap: 0.35rem;
    min-height: 52px;
    flex-wrap: nowrap;
  }
  .nav-brand-title .main-txt {
    font-size: 0.95rem;
    white-space: nowrap;
  }
  .nav-brand-title .sub-txt {
    display: none;
  }
  .nav-brand-om {
    font-size: 1.45rem;
  }
  .nav-actions {
    gap: 0.25rem;
    flex-wrap: nowrap;
  }
  .btn-action {
    padding: 0.32rem 0.5rem;
    font-size: 0.78rem;
    height: 32px;
  }
  .btn-action span.btn-label-text {
    font-size: 0.74rem;
  }
  .book-controller {
    padding: 0.35rem 0.5rem;
  }
  .book-controller-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 0.4rem;
  }
  .page-stepper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 0.35rem;
  }
  .page-stepper .btn-action {
    padding: 0.3rem 0.6rem;
    flex-shrink: 0;
  }
  .stepper-btn-label {
    display: none;
  }
  .page-select-wrap {
    flex: 1;
  }
  .page-select-wrap select {
    width: 100%;
    font-size: 0.85rem;
    height: 34px;
    padding: 0 0.5rem;
  }
  .book-controller-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
  }
  .page-indicator {
    font-size: 0.82rem;
  }
  .view-mode-toggle {
    height: 30px;
  }
  .view-mode-toggle .view-btn {
    font-size: 0.76rem;
    padding: 0 0.5rem;
  }
  .page-inner {
    padding: 1.2rem 0.85rem;
    min-height: auto;
  }
  .page-header-chant-bar {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.4rem;
  }
  .page-header-chant {
    text-align: center;
    font-size: 0.92rem;
  }
  .page-header-quick-btns {
    justify-content: center;
    width: 100%;
  }
  .page-footer-nav-btns {
    gap: 0.35rem;
  }
  .btn-footer-action {
    padding: 0.35rem 0.6rem;
    font-size: 0.8rem;
  }
  .cover-quick-actions {
    grid-template-columns: 1fr;
    gap: 0.6rem;
  }
  .namavali-grid-2 {
    grid-template-columns: 1fr !important;
    gap: 0.25rem !important;
  }
  .nama-item {
    padding: 0.45rem 0.55rem;
    min-height: 40px;
    align-items: center;
  }
  .nama-text {
    font-size: 0.98rem;
  }
}

@media (min-width: 769px) {
  .cover-quick-actions {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ================================================================
   PAGE HEADERS & FOOTERS ACTION BUTTONS
   ================================================================ */

/* Page Header Buttons Bar */
/* Page Header Buttons Bar */
.page-header-chant-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding-bottom: 0.4rem;
  min-height: 36px;
}
.page-header-chant {
  font-weight: 700;
  color: var(--text-maroon);
  letter-spacing: 0.4px;
}
.page-header-quick-btns {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.btn-mini-header {
  background: var(--bg-section-header);
  border: 1px solid var(--border-soft);
  color: var(--text-maroon);
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.25rem 0.55rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  white-space: nowrap;
}
.btn-mini-header:hover {
  background: var(--accent-saffron);
  color: #ffffff;
  border-color: var(--accent-saffron);
}

/* Page Footer Buttons Bar */
.page-footer-container {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1.5px dashed var(--border-soft);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
}
.page-footer-nav-btns {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  width: 100%;
}
.btn-footer-action {
  background: var(--bg-main);
  border: 1px solid var(--border-gold);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  white-space: nowrap;
}
.btn-footer-action:hover {
  background: var(--bg-section-header);
  border-color: var(--accent-saffron);
  color: var(--text-maroon);
  transform: translateY(-1px);
}
.btn-footer-action.btn-highlight {
  background: linear-gradient(135deg, var(--accent-saffron), #b45309);
  color: #ffffff;
  border-color: #b45309;
}
.btn-footer-action.btn-highlight:hover {
  background: linear-gradient(135deg, var(--text-maroon), #500a0a);
  color: #ffffff;
}
.page-number-display {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem 0.9rem;
  background: var(--bg-section-header);
  border: 1px solid var(--border-gold);
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-maroon);
}

/* Global App Footer */
.app-global-footer {
  background: var(--bg-section-header);
  border-top: 2px solid var(--border-gold);
  padding: 2.5rem 1rem 4.5rem;
  margin-top: 3rem;
  text-align: center;
}
.app-global-footer-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.footer-om-symbol {
  font-size: 2.5rem;
  color: var(--accent-saffron);
  line-height: 1;
  margin-bottom: 0.3rem;
}
.footer-title {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-maroon);
  margin-bottom: 0.2rem;
}
.footer-subtitle {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}
.footer-buttons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.8rem;
  width: 100%;
  max-width: 800px;
  margin-bottom: 1.8rem;
}
.footer-btn {
  background: var(--bg-page);
  border: 1.5px solid var(--border-gold);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.25s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}
.footer-btn:hover {
  background: var(--bg-section-header);
  border-color: var(--accent-saffron);
  color: var(--text-maroon);
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(217, 101, 0, 0.15);
}
.footer-btn.primary {
  background: linear-gradient(135deg, var(--accent-saffron), #b45309);
  color: #ffffff;
  border-color: #b45309;
  font-weight: 700;
}
.footer-btn.primary:hover {
  background: linear-gradient(135deg, var(--text-maroon), #500a0a);
  color: #ffffff;
}
.footer-blessing {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-maroon);
  padding-top: 1rem;
  border-top: 1px dashed var(--border-gold);
  width: 100%;
  max-width: 600px;
}

@media print {
  .app-global-footer, .page-header-quick-btns, .page-footer-nav-btns, .offline-banner {
    display: none !important;
  }
}

/* ================================================================
   OFFLINE STATUS & PWA BADGE
   ================================================================ */
.offline-banner {
  display: none;
  background: linear-gradient(135deg, #854d0e, #713f12);
  color: #fef08a;
  padding: 0.45rem 1rem;
  font-size: 0.88rem;
  text-align: center;
  position: sticky;
  top: 0;
  z-index: 2000;
  box-shadow: 0 2px 10px rgba(0,0,0,0.25);
  font-weight: 600;
}
.offline-banner.active {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
}
.offline-banner-close {
  background: transparent;
  border: none;
  color: #fef08a;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  padding: 0 0.4rem;
}

.offline-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(180, 83, 9, 0.2);
  border: 1px solid #d97706;
  color: #b45309;
  border-radius: 9999px;
  padding: 0.2rem 0.6rem;
  font-size: 0.78rem;
  font-weight: 700;
}
[data-theme="dark"] .offline-pill {
  color: #fcd34d;
  border-color: #f59e0b;
  background: rgba(245, 158, 11, 0.15);
}

.btn-add-song {
  background: linear-gradient(135deg, #059669, #047857) !important;
  color: #ffffff !important;
  border-color: #047857 !important;
  box-shadow: 0 2px 8px rgba(5, 150, 105, 0.3);
  font-weight: 700;
}
.btn-add-song:hover {
  background: linear-gradient(135deg, #047857, #065f46) !important;
  transform: translateY(-1px);
}

/* Upload Song Page Form Styles */
.song-form-card {
  background: var(--bg-page);
  border: 1.5px solid var(--border-gold);
  border-radius: 12px;
  box-shadow: var(--box-shadow);
  padding: 1.8rem;
  max-width: 800px;
  margin: 1.5rem auto;
}
.song-form-group {
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.song-form-label {
  font-weight: 700;
  color: var(--text-maroon);
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.song-form-input, .song-form-textarea, .song-form-select {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 1.5px solid var(--border-soft);
  border-radius: 8px;
  background: var(--bg-main);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.song-form-input:focus, .song-form-textarea:focus, .song-form-select:focus {
  border-color: var(--border-gold);
  box-shadow: 0 0 0 3px rgba(197, 155, 39, 0.2);
}
.song-form-textarea {
  min-height: 200px;
  resize: vertical;
  white-space: pre-wrap;
}
.song-help-text {
  font-size: 0.82rem;
  color: var(--text-secondary);
}



