/* ==========================================================================
   LCG BIBLE STUDY HUB - NKJV BIBLE NAVIGATION & READER STYLES
   Prefix: lcg-bible- (Isolated scope to prevent style collisions)
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. CSS Custom Properties / Tokens
   -------------------------------------------------------------------------- */
:root {
  --lcg-bible-bg-overlay: rgba(8, 9, 12, 0.94);
  --lcg-bible-modal-bg: #18191d;
  --lcg-bible-card-bg: #202226;
  --lcg-bible-card-hover: #2a2c31;
  --lcg-bible-border: rgba(255, 255, 255, 0.12);
  --lcg-bible-border-focus: #8ab4f8;
  --lcg-bible-text-main: #f1f3f5;
  --lcg-bible-text-muted: #9aa0a6;
  --lcg-bible-text-dim: #6e7681;
  --lcg-bible-accent-gold: #fbbf24;
  --lcg-bible-accent-blue: #8ab4f8;
  --lcg-bible-accent-purple: #c58af9;
  --lcg-bible-accent-green: #34d399;
  --lcg-bible-red-letter: #f87171;
  
  /* Highlight swatch colors (with dark background contrast) */
  --lcg-bible-hl-yellow: rgba(251, 191, 36, 0.28);
  --lcg-bible-hl-green: rgba(52, 211, 153, 0.28);
  --lcg-bible-hl-blue: rgba(138, 180, 248, 0.28);
  --lcg-bible-hl-purple: rgba(197, 138, 249, 0.28);
  --lcg-bible-hl-pink: rgba(244, 114, 182, 0.28);
  --lcg-bible-hl-orange: rgba(251, 146, 60, 0.28);

  --lcg-bible-radius-lg: 16px;
  --lcg-bible-radius-md: 10px;
  --lcg-bible-radius-sm: 6px;
  --lcg-bible-shadow-modal: 0 24px 60px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.1);
  --lcg-bible-shadow-floating: 0 12px 32px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.15);
  --lcg-bible-verse-font-size: calc(1.05 * var(--global-reading-size, 1.0rem));
}

:root.light-theme {
  --lcg-bible-bg-overlay: rgba(240, 244, 248, 0.94);
  --lcg-bible-modal-bg: #ffffff;
  --lcg-bible-card-bg: #ffffff;
  --lcg-bible-card-hover: #f1f5f9;
  --lcg-bible-border: rgba(0, 0, 0, 0.12);
  --lcg-bible-border-focus: #2563eb;
  --lcg-bible-text-main: #0f172a;
  --lcg-bible-text-muted: #475569;
  --lcg-bible-text-dim: #64748b;
  --lcg-bible-accent-gold: #d97706;
  --lcg-bible-accent-blue: #2563eb;
  --lcg-bible-accent-purple: #9333ea;
  --lcg-bible-accent-green: #059669;
  --lcg-bible-red-letter: #dc2626;
  --lcg-bible-shadow-modal: 0 20px 40px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.08);
  --lcg-bible-shadow-floating: 0 8px 24px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.1);
  --lcg-bible-hl-yellow: rgba(251, 191, 36, 0.4);
  --lcg-bible-hl-green: rgba(52, 211, 153, 0.4);
  --lcg-bible-hl-blue: rgba(138, 180, 248, 0.4);
  --lcg-bible-hl-purple: rgba(197, 138, 249, 0.4);
  --lcg-bible-hl-pink: rgba(244, 114, 182, 0.4);
  --lcg-bible-hl-orange: rgba(251, 146, 60, 0.4);
}

/* --------------------------------------------------------------------------
   Z-Index Hierarchy Layering (Explicit high z-index & strict isolation)
   -------------------------------------------------------------------------- */
#lcgBibleReaderRoot {
  z-index: 10000 !important;
}

#lcgBibleNavModal {
  z-index: 50000 !important;
}

body.bible-nav-modal-open #lcgBibleBottomNav,
#lcgBibleNavModal.active ~ #lcgBibleBottomNav {
  display: none !important;
}

#lcgBibleBottomNav {
  z-index: 35000 !important;
}

#lcgBibleExplainDrawer {
  z-index: 10005 !important;
}

#lcgBibleSearchDrawer {
  z-index: 10005 !important;
}

#lcgBibleToast {
  z-index: 10020 !important;
}

/* --------------------------------------------------------------------------
   Dark Theme Scrollbar Styling
   -------------------------------------------------------------------------- */
#lcgBibleReaderRoot,
.lcg-bible-modal,
.lcg-bible-modal-body,
#lcgBookGridContainer,
#lcgChapterGrid,
#lcgVerseGrid,
.lcg-bible-chapter-card,
#lcgDrawerSearchResults {
  scrollbar-width: thin;
  scrollbar-color: #555555 #2d2d2d;
}

#lcgBibleReaderRoot::-webkit-scrollbar,
.lcg-bible-modal::-webkit-scrollbar,
.lcg-bible-modal-body::-webkit-scrollbar,
#lcgBookGridContainer::-webkit-scrollbar,
#lcgChapterGrid::-webkit-scrollbar,
#lcgVerseGrid::-webkit-scrollbar,
.lcg-bible-chapter-card::-webkit-scrollbar,
.lcg-bible-modal-backdrop ::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

#lcgBibleReaderRoot::-webkit-scrollbar-track,
.lcg-bible-modal::-webkit-scrollbar-track,
.lcg-bible-modal-body::-webkit-scrollbar-track,
#lcgBookGridContainer::-webkit-scrollbar-track,
#lcgChapterGrid::-webkit-scrollbar-track,
#lcgVerseGrid::-webkit-scrollbar-track,
.lcg-bible-chapter-card::-webkit-scrollbar-track,
.lcg-bible-modal-backdrop ::-webkit-scrollbar-track {
  background: #2d2d2d;
  border-radius: 4px;
}

#lcgBibleReaderRoot::-webkit-scrollbar-thumb,
.lcg-bible-modal::-webkit-scrollbar-thumb,
.lcg-bible-modal-body::-webkit-scrollbar-thumb,
#lcgBookGridContainer::-webkit-scrollbar-thumb,
#lcgChapterGrid::-webkit-scrollbar-thumb,
#lcgVerseGrid::-webkit-scrollbar-thumb,
.lcg-bible-chapter-card::-webkit-scrollbar-thumb,
.lcg-bible-modal-backdrop ::-webkit-scrollbar-thumb {
  background: #555555;
  border-radius: 4px;
  border: 2px solid #2d2d2d;
}

#lcgBibleReaderRoot::-webkit-scrollbar-thumb:hover,
.lcg-bible-modal::-webkit-scrollbar-thumb:hover,
.lcg-bible-modal-body::-webkit-scrollbar-thumb:hover,
.lcg-bible-modal-backdrop ::-webkit-scrollbar-thumb:hover {
  background: #777777;
}

/* --------------------------------------------------------------------------
   2. Modal Backdrop & Container
   -------------------------------------------------------------------------- */
.lcg-bible-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #0c0d11 !important;
  background: #0c0d11 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease, left 0.32s cubic-bezier(0.16, 1, 0.3, 1), right 0.32s cubic-bezier(0.16, 1, 0.3, 1), width 0.32s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 16px;
  box-sizing: border-box;
  isolation: isolate;
  z-index: 10000;
}

.lcg-bible-modal-backdrop.active {
  opacity: 1 !important;
  visibility: visible !important;
}

.lcg-bible-modal {
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  background-color: #0e1217 !important;
  background: #0e1217 !important;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--lcg-bible-radius-lg);
  box-shadow: var(--lcg-bible-shadow-modal);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.96) translateY(10px);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), max-width 0.32s cubic-bezier(0.16, 1, 0.3, 1);
  opacity: 1 !important;
  padding-top: env(safe-area-inset-top) !important;
  padding-bottom: env(safe-area-inset-bottom) !important;
}

.lcg-bible-modal-backdrop.active .lcg-bible-modal {
  transform: scale(1) translateY(0);
}

/* --------------------------------------------------------------------------
   3. Modal Header & 3-Tab Navigation (BOOK, CHAPTER, VERSE)
   -------------------------------------------------------------------------- */
.lcg-bible-modal-header {
  position: sticky;
  top: 0;
  z-index: 10002 !important;
  padding: 6px 14px 0;
  background-color: #0e1217 !important;
  background: #0e1217 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Top Row: Navigation Title Bar with Close, Title & View Toggle */
.lcg-bible-modal-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  position: relative;
  height: 32px;
}

.lcg-bible-modal-title {
  font-size: 1.12rem;
  font-weight: 500;
  color: #f1f5f9;
  margin: 0;
  text-align: center;
  flex: 1;
  letter-spacing: -0.01em;
}

.lcg-bible-quick-jump-wrap {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  background: #181d24;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 0 0 0 10px;
  height: 36px;
  transition: all 0.2s ease;
  box-sizing: border-box;
  overflow: hidden;
  z-index: 20;
}

.lcg-bible-quick-jump-wrap:focus-within {
  border-color: #0284c7;
  background: #1b212a;
  box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.25);
}

/* Quick Jump Auto-Predict Dropdown */
.lcg-bible-quick-jump-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 10020;
  background: #1e2025;
  border: 1px solid var(--lcg-bible-border);
  border-radius: 12px;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.08);
  max-height: 200px;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 4px 0;
  margin: 0;
  list-style: none;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.lcg-bible-quick-jump-dropdown::-webkit-scrollbar {
  width: 6px;
}

.lcg-bible-quick-jump-dropdown::-webkit-scrollbar-track {
  background: transparent;
}

.lcg-bible-quick-jump-dropdown::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

.lcg-bible-quick-jump-dropdown::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.35);
}

.lcg-bible-quick-jump-item {
  padding: 12px 16px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--lcg-bible-text-main);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.15s ease, color 0.15s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.lcg-bible-quick-jump-item:not(:last-child) {
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.lcg-bible-quick-jump-item:hover,
.lcg-bible-quick-jump-item:active,
.lcg-bible-quick-jump-item.selected {
  background: rgba(138, 180, 248, 0.14);
  color: var(--lcg-bible-accent-blue);
}

.lcg-bible-quick-jump-item-name {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lcg-bible-quick-jump-item-hint {
  font-size: 0.72rem;
  color: var(--lcg-bible-text-dim);
  margin-left: 8px;
  flex-shrink: 0;
  letter-spacing: 0.02em;
}

.lcg-bible-quick-jump-item:hover .lcg-bible-quick-jump-item-hint,
.lcg-bible-quick-jump-item.selected .lcg-bible-quick-jump-item-hint {
  color: var(--lcg-bible-accent-blue);
  opacity: 0.8;
}

.lcg-bible-quick-jump-icon {
  width: 20px;
  height: 20px;
  margin-right: 10px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}

.lcg-bible-quick-jump-input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  color: #f1f5f9;
  font-size: 0.92rem;
  font-weight: 500;
  padding: 6px 0;
  font-family: inherit;
}

.lcg-bible-quick-jump-input::placeholder {
  color: #64748b;
  font-size: 0.85rem;
}

.lcg-bible-quick-jump-btn {
  background: #007799;
  color: #ffffff;
  border: none;
  border-radius: 0 4px 4px 0;
  padding: 0 16px;
  height: 36px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: background 0.15s ease;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lcg-bible-quick-jump-btn:hover {
  background: #0284c7;
}

.lcg-bible-close-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
  padding: 0;
}

.lcg-bible-close-btn:hover {
  color: #ffffff;
}

.lcg-bible-view-toggle-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
  padding: 0;
}

.lcg-bible-view-toggle-btn:hover,
.lcg-bible-view-toggle-btn.active {
  color: #ffffff;
}

/* Bottom Row: 3 Text Tabs with Centered Rounded Indicator */
.lcg-bible-nav-tabs {
  display: flex;
  width: 100%;
  background: transparent;
  padding: 2px 0 0;
  border: none;
  gap: 0;
}

.lcg-bible-nav-tab {
  flex: 1;
  background: transparent;
  border: none !important;
  padding: 6px 4px 8px;
  border-radius: 0;
  color: #94a3b8;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin-bottom: 0;
}

.lcg-bible-nav-tab:hover:not(:disabled) {
  color: #f1f5f9;
}

.lcg-bible-nav-tab.active {
  background: transparent;
  color: #ffffff !important;
  box-shadow: none;
}

.lcg-bible-nav-tab.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 42px;
  height: 3px;
  border-radius: 9999px;
  background: #38bdf8;
}

.lcg-bible-nav-tab:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* --------------------------------------------------------------------------
   4. Tab Views & Scrollable Content
   -------------------------------------------------------------------------- */
.lcg-bible-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 4px 10px max(6px, env(safe-area-inset-bottom)) !important;
  position: relative;
  max-height: none;
}

/* Custom Sleek Scrollbar */
.lcg-bible-modal-body::-webkit-scrollbar,
.lcg-bible-reader-container::-webkit-scrollbar {
  width: 6px;
}

.lcg-bible-modal-body::-webkit-scrollbar-track,
.lcg-bible-reader-container::-webkit-scrollbar-track {
  background: transparent;
}

.lcg-bible-modal-body::-webkit-scrollbar-thumb,
.lcg-bible-reader-container::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

.lcg-bible-modal-body::-webkit-scrollbar-thumb:hover,
.lcg-bible-reader-container::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

.lcg-bible-tab-pane {
  display: none;
  animation: lcgBibleFadeIn 0.2s ease forwards;
}

.lcg-bible-tab-pane.active {
  display: block;
}

@keyframes lcgBibleFadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --------------------------------------------------------------------------
   5. Filter Pills (Hidden for Clean Screenshot 2 Layout)
   -------------------------------------------------------------------------- */
.lcg-bible-filter-bar {
  display: none !important;
}

/* --------------------------------------------------------------------------
   6. Book Selection Grid (GEN, EX, LEV, ...)
   -------------------------------------------------------------------------- */
.lcg-bible-section-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--lcg-bible-text-dim);
  letter-spacing: 0.08em;
  margin: 14px 0 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.lcg-bible-section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.06);
}

.lcg-bible-book-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: clamp(3px, 0.6vh, 6px) clamp(2px, 1vw, 5px);
  margin-bottom: 0;
  justify-items: center;
}

.lcg-bible-book-btn {
  background: #181d24;
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 50%;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.12s ease, background 0.12s ease;
  width: 100%;
  max-width: clamp(36px, 5.0vh, 46px);
  height: clamp(36px, 5.0vh, 46px);
  aspect-ratio: 1 / 1;
  margin: 0 auto;
  box-sizing: border-box;
  user-select: none;
  -webkit-user-select: none;
}

.lcg-bible-book-btn:hover {
  background: #222933;
  border-color: rgba(255, 255, 255, 0.18);
  transform: scale(1.05);
}

.lcg-bible-book-btn.selected {
  border-color: #38bdf8;
  box-shadow: 0 0 0 1.5px #38bdf8;
}

.lcg-bible-book-abbr {
  font-size: clamp(1.05rem, 2.35vh, 1.28rem);
  font-weight: 700;
  color: var(--lcg-bible-text-main);
  letter-spacing: -0.025em;
  line-height: 1;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lcg-bible-testament-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.12);
  margin: clamp(4px, 0.8vh, 8px) 2px;
  border: none;
  width: calc(100% - 4px);
}

/* --------------------------------------------------------------------------
   Categorical Text Color Classes for Bible Navigation (Screenshot 2 Match)
   -------------------------------------------------------------------------- */
.cat-pink,
.lcg-bible-book-btn.cat-pink .lcg-bible-book-abbr,
.lcg-bible-book-abbr.cat-pink {
  color: #f87171 !important;
}

.cat-blue,
.lcg-bible-book-btn.cat-blue .lcg-bible-book-abbr,
.lcg-bible-book-abbr.cat-blue {
  color: #60a5fa !important;
}

.cat-orange,
.lcg-bible-book-btn.cat-orange .lcg-bible-book-abbr,
.lcg-bible-book-abbr.cat-orange {
  color: #fb923c !important;
}

.cat-purple,
.lcg-bible-book-btn.cat-purple .lcg-bible-book-abbr,
.lcg-bible-book-abbr.cat-purple {
  color: #c084fc !important;
}

.cat-green,
.lcg-bible-book-btn.cat-green .lcg-bible-book-abbr,
.lcg-bible-book-abbr.cat-green {
  color: #34d399 !important;
}

.lcg-bible-book-btn.cat-pink:hover   { border-color: rgba(248, 113, 113, 0.5); }
.lcg-bible-book-btn.cat-blue:hover   { border-color: rgba(96, 165, 250, 0.5); }
.lcg-bible-book-btn.cat-orange:hover { border-color: rgba(251, 146, 60, 0.5); }
.lcg-bible-book-btn.cat-purple:hover { border-color: rgba(192, 132, 252, 0.5); }
.lcg-bible-book-btn.cat-green:hover  { border-color: rgba(52, 211, 153, 0.5); }

.lcg-bible-book-name-hint {
  display: none;
}

/* Optional List View Mode */
.lcg-bible-book-list-view {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.lcg-bible-book-list-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #181d24;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
  color: var(--lcg-bible-text-main);
  text-align: left;
  transition: all 0.15s ease;
}

.lcg-bible-book-list-item:hover {
  background: #222933;
  border-color: rgba(255, 255, 255, 0.15);
}

.lcg-bible-book-list-item.selected {
  border-color: #38bdf8;
  box-shadow: 0 0 0 1px #38bdf8;
}

.lcg-bible-book-list-name {
  font-size: 0.88rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* --------------------------------------------------------------------------
   7. Chapter & Verse Grid Layouts
   -------------------------------------------------------------------------- */
.lcg-bible-active-book-indicator {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.03);
  padding: 10px 14px;
  border-radius: var(--lcg-bible-radius-sm);
  border: 1px solid var(--lcg-bible-border);
  margin-bottom: 14px;
}

.lcg-bible-active-ref-text {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--lcg-bible-text-main);
}

.lcg-bible-back-link {
  background: transparent;
  border: none;
  color: var(--lcg-bible-accent-blue);
  font-size: 0.8rem;
  cursor: pointer;
  text-decoration: underline;
}

.lcg-bible-chapter-grid,
.lcg-bible-verse-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: clamp(3px, 0.6vh, 6px) clamp(2px, 1vw, 5px);
  justify-items: center;
}

.lcg-bible-num-btn {
  background: #181d24;
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 50%;
  max-width: clamp(36px, 5.0vh, 46px);
  height: clamp(36px, 5.0vh, 46px);
  width: 100%;
  aspect-ratio: 1 / 1;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(1.05rem, 2.4vh, 1.3rem);
  font-weight: 700;
  line-height: 1;
  color: var(--lcg-bible-text-main);
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.12s ease, background 0.12s ease;
  box-sizing: border-box;
  padding: 0;
  user-select: none;
  -webkit-user-select: none;
}

.lcg-bible-num-btn:hover {
  background: #222933;
  border-color: rgba(255, 255, 255, 0.18);
  color: #fff;
  transform: scale(1.05);
}

.lcg-bible-num-btn.selected {
  background: rgba(56, 189, 248, 0.2);
  border-color: #38bdf8;
  color: #38bdf8;
  font-weight: 700;
  box-shadow: 0 0 0 1.5px #38bdf8;
}

/* --------------------------------------------------------------------------
   8. Continuous Chapter Reader View
   -------------------------------------------------------------------------- */
#lcgBibleReaderRoot.lcg-bible-reader-root,
#lcgBibleReaderRoot {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100% !important;
  background-color: var(--bg-main, #131314);
  color: var(--lcg-bible-text-main, #f1f3f5);
  z-index: 10000 !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  box-sizing: border-box;
  transition: width 0.32s cubic-bezier(0.16, 1, 0.3, 1), right 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}

.lcg-bible-reader-view,
.lcg-bible-reader-container,
.reader-container,
.bible-content {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  flex-grow: 1;
  box-sizing: border-box;
  height: 100%;
  max-height: 100dvh;
  overflow: hidden !important;
}

/* Reader Toolbar Header */
.bible-top-panel,
.lcg-bible-reader-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  padding-top: max(10px, env(safe-area-inset-top)) !important;
  min-height: 60px;
  height: auto;
  background: rgba(24, 25, 29, 0.85) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--lcg-bible-border);
  position: relative !important;
  flex-shrink: 0;
  z-index: 100 !important;
  width: 100% !important;
  box-sizing: border-box;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  transition: width 0.32s cubic-bezier(0.16, 1, 0.3, 1), right 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}

:root.light-theme .bible-top-panel,
:root.light-theme .lcg-bible-reader-toolbar {
  background: rgba(255, 255, 255, 0.85) !important;
  border-bottom: 1px solid var(--lcg-bible-border);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

/* Back Chevron Button */
.lcg-bible-back-chevron-btn {
  background: transparent;
  border: 1px solid var(--lcg-bible-border);
  color: var(--lcg-bible-text-main);
  width: 36px;
  height: 36px;
  border-radius: var(--lcg-bible-radius-sm, 8px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.18s ease;
  flex-shrink: 0;
}

.lcg-bible-back-chevron-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--lcg-bible-accent-blue);
  color: var(--lcg-bible-accent-blue);
  transform: translateX(-2px);
}

:root.light-theme .lcg-bible-back-chevron-btn:hover {
  background: rgba(0, 0, 0, 0.05);
}

/* Recall Explainer Drawer Button */
.lcg-bible-recall-btn {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--lcg-bible-radius-sm, 8px);
  transition: all 0.18s ease;
  -webkit-tap-highlight-color: transparent;
}

.lcg-bible-recall-btn:hover {
  background: rgba(255, 255, 255, 0.1) !important;
  transform: scale(1.1);
}

:root.light-theme .lcg-bible-recall-btn:hover {
  background: rgba(0, 0, 0, 0.05) !important;
}

.lcg-bible-nav-trigger-btn {
  background: rgba(102, 178, 255, 0.15);
  border: 1px solid rgba(102, 178, 255, 0.3);
  border-radius: 20px;
  padding: 6px 18px;
  color: var(--lcg-bible-text-main);
  font-size: 1.1rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.lcg-bible-nav-trigger-btn strong {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
  display: inline-flex;
  align-items: center;
}

.lcg-bible-nav-trigger-btn:hover {
  background: rgba(102, 178, 255, 0.25);
  border-color: rgba(102, 178, 255, 0.5);
  color: var(--lcg-bible-text-main);
  transform: scale(1.02);
}

:root.light-theme .lcg-bible-nav-trigger-btn {
  background: rgba(37, 99, 235, 0.08);
  border-color: rgba(37, 99, 235, 0.25);
}

:root.light-theme .lcg-bible-nav-trigger-btn:hover {
  background: rgba(37, 99, 235, 0.16);
  border-color: rgba(37, 99, 235, 0.45);
}

.lcg-bible-reader-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lcg-bible-font-btn {
  background: transparent;
  border: 1px solid var(--lcg-bible-border);
  color: var(--lcg-bible-text-muted);
  width: 34px;
  height: 34px;
  border-radius: var(--lcg-bible-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.15s ease;
}

.lcg-bible-font-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--lcg-bible-text-main);
}

/* Reader View Centering Wrapper */
.lcg-bible-reader-view {
  width: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
}

/* Reader Content Body (Holding chapters and Previous/Next buttons) */
.lcg-bible-reader-body {
  transition: transform 0.3s ease-in-out;
  flex-grow: 1 !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
  padding: 24px 24px !important;
  width: 100%;
  max-width: 840px;
  margin: 0 auto !important;
  box-sizing: border-box;
}

/* Chapter Card Container */
.lcg-bible-chapter-card {
  background-color: var(--lcg-bible-card-bg, #202226) !important;
  background: var(--lcg-bible-card-bg, #202226) !important;
  border: 1px solid var(--lcg-bible-border);
  border-radius: var(--lcg-bible-radius-lg);
  padding: 32px 32px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
  box-sizing: border-box;
}

:root.light-theme .lcg-bible-chapter-card {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.lcg-bible-chapter-title-banner {
  text-align: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.lcg-bible-chapter-heading {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--lcg-bible-text-main);
  letter-spacing: -0.02em;
}

.lcg-bible-chapter-sub {
  font-size: 0.82rem;
  color: var(--lcg-bible-text-muted);
  margin-top: 4px;
}

/* Verses Layout & Typography */
.lcg-bible-verses-stream {
  font-family: 'Plus Jakarta Sans', Georgia, serif;
  font-size: var(--lcg-bible-verse-font-size, 1.05rem);
  line-height: 1.6;
  color: var(--lcg-bible-text-main);
  transition: font-size 0.1s ease;
  padding: 8px 4px;
}

/* Passage Headings (Pericopes) */
.passage-title,
.lcg-bible-heading,
h3.lcg-bible-heading,
.lcg-bible-verses-stream .passage-title,
.lcg-bible-verses-stream .lcg-bible-heading {
  font-size: 1.15rem;
  font-style: italic !important;
  font-weight: 600;
  color: #fbbf24 !important;
  margin-top: 32px !important;
  margin-bottom: 12px !important;
  display: block;
  clear: both;
  letter-spacing: -0.01em;
  line-height: 1.4;
}

.passage-title:first-child,
.lcg-bible-heading:first-child,
h3.lcg-bible-heading:first-child {
  margin-top: 4px !important;
}

/* Passage Paragraph Block (Backward-compatibility fallback) */
.lcg-bible-passage-block {
  display: block;
  margin-top: 0 !important;
  margin-bottom: 4px !important;
}

/* Verse Item (Tightened list-like block layout) */
.lcg-bible-verse-item,
.lcg-bible-verses-stream .lcg-bible-verse-item,
.lcg-bible-verses-stream .verse-block,
.lcg-bible-verses-stream .verse-container,
.lcg-bible-verses-stream p {
  display: block !important;
  margin-top: 0 !important;
  margin-bottom: 4px !important;
  padding: 2px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s ease;
  user-select: text;
  font-size: inherit;
  line-height: 1.6 !important;
}

.lcg-bible-verse-item:hover {
  background: rgba(255, 255, 255, 0.04);
}

/* Softened Selection State (Subtle background tint without heavy borders) */
.lcg-bible-verse-item.selected {
  background: rgba(255, 255, 255, 0.08) !important;
  box-shadow: none !important;
  border-radius: 6px;
}

/* Verse Numbers (Subtle muted superscript, removing bright yellow) */
.lcg-bible-verse-num {
  font-size: 0.72em !important;
  vertical-align: super !important;
  color: #a0a0a0 !important;
  font-weight: 600;
  margin-right: 6px;
  user-select: none;
  line-height: 0;
}

.lcg-bible-verse-item:first-child .lcg-bible-verse-num,
.lcg-bible-passage-block > .lcg-bible-verse-item:first-child .lcg-bible-verse-num {
  margin-left: 0;
}

/* Chapter Drop Cap */
.chapter-drop-cap,
.lcg-bible-chapter-drop-cap {
  float: left !important;
  font-size: 3.5em !important;
  line-height: 0.8 !important;
  font-weight: 700 !important;
  color: #ffffff !important;
  margin-right: 12px !important;
  margin-top: 4px !important;
  margin-bottom: -2px !important;
  font-family: 'Plus Jakarta Sans', Georgia, serif;
  user-select: none;
}

/* Red-Letter Formatting */
.red-letter,
.lcg-bible-red-letter {
  color: #ff6b6b !important;
}

/* --------------------------------------------------------------------------
   9. Multi-Color Highlight Swatches
   -------------------------------------------------------------------------- */
.lcg-bible-verse-item.hl-yellow { background: var(--lcg-bible-hl-yellow); }
.lcg-bible-verse-item.hl-green  { background: var(--lcg-bible-hl-green); }
.lcg-bible-verse-item.hl-blue   { background: var(--lcg-bible-hl-blue); }
.lcg-bible-verse-item.hl-purple { background: var(--lcg-bible-hl-purple); }
.lcg-bible-verse-item.hl-pink   { background: var(--lcg-bible-hl-pink); }
.lcg-bible-verse-item.hl-orange { background: var(--lcg-bible-hl-orange); }

.lcg-bible-swatch-palette {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: auto;
  min-height: auto;
  max-height: none;
  padding: 0;
  background: transparent;
  border: none;
  flex: 0 0 auto !important;
  flex-shrink: 0 !important;
  box-sizing: border-box;
  white-space: nowrap !important;
}

.lcg-bible-swatch-dot {
  width: 26px !important;
  height: 26px !important;
  min-width: 26px !important;
  min-height: 26px !important;
  max-width: 26px !important;
  max-height: 26px !important;
  flex: 0 0 26px !important;
  aspect-ratio: 1 / 1 !important;
  border-radius: 50% !important;
  border: 2px solid rgba(255, 255, 255, 0.45);
  cursor: pointer;
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0 !important;
  -webkit-tap-highlight-color: transparent;
}

.lcg-bible-swatch-dot:hover,
.lcg-bible-swatch-dot:focus-visible {
  transform: scale(1.15);
  border-color: #ffffff;
  outline: none;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.lcg-bible-swatch-dot.swatch-yellow { background: #fbbf24 !important; }
.lcg-bible-swatch-dot.swatch-green  { background: #34d399 !important; }
.lcg-bible-swatch-dot.swatch-blue   { background: #8ab4f8 !important; }
.lcg-bible-swatch-dot.swatch-purple { background: #c58af9 !important; }
.lcg-bible-swatch-dot.swatch-pink   { background: #f472b6 !important; }
.lcg-bible-swatch-dot.swatch-orange { background: #fb923c !important; }
.lcg-bible-swatch-dot.swatch-clear  {
  background: transparent !important;
  position: relative !important;
}
.lcg-bible-swatch-dot.swatch-clear::after {
  content: '' !important;
  position: absolute !important;
  top: 50% !important;
  left: 2px !important;
  right: 2px !important;
  height: 2px !important;
  background: #f87171 !important;
  transform: rotate(45deg) !important;
}

/* --------------------------------------------------------------------------
   10. Persistent Two-State Bottom Navigation Bar
   -------------------------------------------------------------------------- */
#lcgBibleBottomNav,
.lcg-bible-bottom-nav {
  position: relative !important;
  flex-shrink: 0;
  z-index: 35000 !important;
  width: 100% !important;
  max-width: 100vw;
  overflow: hidden;
  background: rgba(22, 23, 27, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--lcg-bible-border);
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.5);
  padding: 10px 0;
  padding-bottom: max(15px, env(safe-area-inset-bottom)) !important;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: width 0.32s cubic-bezier(0.16, 1, 0.3, 1), right 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}

:root.light-theme .lcg-bible-bottom-nav {
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid var(--lcg-bible-border);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
}

/* Strict visibility isolation classes */
.hidden,
.lcg-bible-bottom-nav .hidden,
.lcg-bible-nav-group.hidden,
#lcgBibleNavDefault.hidden,
#lcgBibleNavActive.hidden {
  display: none !important;
}

.lcg-bible-nav-group {
  overflow-x: auto !important;
  overflow-y: hidden !important;
  flex-wrap: nowrap !important;
  max-width: 100% !important;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
  justify-content: flex-start !important;
  display: flex;
  align-items: center;
  white-space: nowrap;
  box-sizing: border-box;
  -webkit-overflow-scrolling: touch;
}

.lcg-bible-nav-group::-webkit-scrollbar {
  display: none !important;
}

.lcg-bible-nav-item-btn,
.lcg-bible-action-btn,
.lcg-bible-swatch-dot {
  flex-shrink: 0 !important;
}

/* Wide Viewport Footer Centering */
@media (min-width: 768px) {
  #lcgBibleBottomNav,
  .lcg-bible-bottom-nav {
    /* display intentionally NOT forced here — JS (toggleSidebar) controls it */
    justify-content: center !important;
    align-items: center !important;
  }

  .lcg-bible-nav-group {
    justify-content: center !important;
    overflow-x: visible !important;
  }

  .lcg-bible-nav-group:not(.hidden),
  .lcg-bible-nav-default:not(.hidden),
  .lcg-bible-nav-active:not(.hidden) {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    margin: 0 auto !important;
  }
}

/* Default State (No Verse Selected): Centered Home and Search */
.lcg-bible-nav-default {
  justify-content: center;
  gap: 36px;
  padding: 0 16px;
}

.lcg-bible-nav-item-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--lcg-bible-border);
  color: var(--lcg-bible-text-main);
  padding: 10px 24px;
  border-radius: 24px;
  font-size: 0.95rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  min-height: 44px;
  transition: all 0.18s ease;
  -webkit-tap-highlight-color: transparent;
}

.lcg-bible-nav-item-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--lcg-bible-accent-blue);
  color: #ffffff;
  transform: translateY(-1px);
}

.lcg-bible-nav-item-btn:active {
  transform: translateY(0);
}

.lcg-bible-nav-icon {
  font-size: 1.15rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.lcg-bible-nav-label {
  letter-spacing: 0.01em;
}

/* Active State (Verse Selected): Horizontal Scrolling Toolbar with Hidden Scrollbar */
.lcg-bible-nav-active {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 16px;
  width: 100%;
  max-width: 100vw;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  flex-wrap: nowrap;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
  margin: 0 auto;
  padding: 4px 16px;
  box-sizing: border-box;
}

@media (min-width: 768px) {
  .lcg-bible-nav-active {
    justify-content: center !important;
    overflow-x: visible !important;
  }
}

.lcg-bible-nav-active::-webkit-scrollbar {
  display: none;
}

/* Minimal, Clickable Text/Icon Links with Transparent Background */
.lcg-bible-action-btn {
  background: transparent !important;
  border: none !important;
  color: var(--lcg-bible-text-main) !important;
  padding: 6px 10px !important;
  font-size: 0.95rem;
  font-weight: 600;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: color 0.15s ease, opacity 0.15s ease, transform 0.15s ease;
  white-space: nowrap !important;
  flex: 0 0 auto !important;
  flex-grow: 0 !important;
  flex-shrink: 0 !important;
  width: auto !important;
  max-width: fit-content !important;
  margin: 0 !important;
  height: auto !important;
  min-height: auto !important;
  max-height: none !important;
  box-shadow: none !important;
  border-radius: 6px;
  -webkit-tap-highlight-color: transparent;
  text-decoration: none;
}

.lcg-bible-action-btn:hover {
  color: var(--lcg-bible-accent-blue) !important;
  background: rgba(255, 255, 255, 0.08) !important;
  transform: translateY(-1px);
}

.lcg-bible-action-btn:active {
  transform: translateY(0);
  opacity: 0.7;
}

/* --------------------------------------------------------------------------
   10b. Chapter Navigation Footer (Previous / Next Buttons - Unified 50/50 Split)
   -------------------------------------------------------------------------- */
.lcg-bible-chapter-nav-footer {
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  box-sizing: border-box;
}

.lcg-bible-chapter-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  height: 48px;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--lcg-bible-border);
  border-radius: var(--lcg-bible-radius-md, 10px);
  color: var(--lcg-bible-text-main);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
  box-sizing: border-box;
  text-overflow: ellipsis;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}

.lcg-bible-chapter-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.14);
  border-color: var(--lcg-bible-accent-blue);
  color: #ffffff;
  transform: translateY(-1px);
}

.lcg-bible-chapter-btn:active:not(:disabled) {
  transform: translateY(0);
}

.lcg-bible-chapter-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   11. Toast Notifications
   -------------------------------------------------------------------------- */
.lcg-bible-toast {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: #1e293b;
  color: #f8fafc;
  border: 1px solid rgba(138, 180, 248, 0.3);
  padding: 10px 20px;
  border-radius: 24px;
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  z-index: 10005;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.lcg-bible-toast.show {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* --------------------------------------------------------------------------
   12. Responsive Mobile Optimizations
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  .lcg-bible-modal-backdrop {
    padding: 0;
    align-items: stretch;
    justify-content: center;
  }

  .lcg-bible-modal,
  .bible-modal {
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    max-height: 100vh !important;
    max-height: 100dvh !important;
    top: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    border-radius: 0 !important;
    border: none !important;
    transform: none !important;
  }

  .lcg-bible-modal-backdrop.active .lcg-bible-modal,
  .lcg-bible-modal-backdrop.active .bible-modal {
    transform: none !important;
  }

  .lcg-bible-modal-header {
    padding: 6px 12px 0;
    gap: 4px;
  }

  .lcg-bible-modal-top-bar {
    height: 30px;
  }

  .lcg-bible-modal-title {
    font-size: 1.1rem;
  }

  .lcg-bible-quick-jump-wrap {
    height: 36px;
    padding: 0 0 0 10px;
  }

  .lcg-bible-quick-jump-input {
    font-size: 0.92rem;
    padding: 6px 0;
  }

  .lcg-bible-quick-jump-btn {
    padding: 0 16px;
    font-size: 0.8rem;
    height: 36px;
  }

  .lcg-bible-nav-tabs {
    padding: 2px 0 0;
  }

  .lcg-bible-nav-tab {
    padding: 6px 4px 8px;
    font-size: 0.84rem;
  }

  .lcg-bible-modal-body {
    max-height: none !important;
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 4px 8px max(6px, env(safe-area-inset-bottom)) !important;
    -webkit-overflow-scrolling: touch;
  }

  .lcg-bible-book-grid {
    grid-template-columns: repeat(6, 1fr);
    gap: clamp(3px, 0.6vh, 6px) clamp(2px, 1vw, 5px);
    justify-items: center;
  }

  .lcg-bible-book-btn {
    min-height: clamp(34px, 5.0vh, 46px);
    height: clamp(34px, 5.0vh, 46px);
    max-width: clamp(34px, 5.0vh, 46px);
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    padding: 0;
    margin: 0 auto;
  }

  .lcg-bible-book-abbr {
    font-size: clamp(1.05rem, 2.35vh, 1.28rem);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.025em;
  }

  .lcg-bible-chapter-grid,
  .lcg-bible-verse-grid {
    grid-template-columns: repeat(6, 1fr);
    gap: clamp(3px, 0.6vh, 6px) clamp(2px, 1vw, 5px);
    justify-items: center;
  }

  .lcg-bible-num-btn {
    min-height: clamp(34px, 5.0vh, 46px);
    height: clamp(34px, 5.0vh, 46px);
    max-width: clamp(34px, 5.0vh, 46px);
    aspect-ratio: 1 / 1;
    font-size: clamp(1.05rem, 2.4vh, 1.3rem);
    font-weight: 700;
    line-height: 1;
    border-radius: 50%;
    padding: 0;
    margin: 0 auto;
  }

  .lcg-bible-reader-view {
    padding: 0 !important;
  }

  .lcg-bible-reader-body {
    padding: 16px 12px !important;
    flex-grow: 1 !important;
    overflow-y: auto !important;
  }

  .lcg-bible-chapter-card {
    padding: 20px 14px;
  }

  .lcg-bible-verses-stream {
    font-size: 1rem;
    line-height: 1.6 !important;
  }

  .lcg-bible-verse-item,
  .lcg-bible-verses-stream .lcg-bible-verse-item {
    margin-top: 0 !important;
    margin-bottom: 4px !important;
    line-height: 1.6 !important;
  }

  #lcgBibleBottomNav,
  .lcg-bible-bottom-nav {
    padding: 12px 0 !important;
  }

  .lcg-bible-nav-default {
    gap: 20px;
    padding: 0 16px;
  }

  .lcg-bible-nav-item-btn {
    padding: 6px 14px;
    font-size: 0.85rem;
    min-height: 38px;
  }

  .lcg-bible-nav-icon {
    font-size: 1.05rem;
  }

  .lcg-bible-nav-active {
    gap: 12px;
    padding: 0 16px;
    overflow-x: auto;
    overflow-y: hidden;
    max-width: 100vw;
    white-space: nowrap;
  }

  .lcg-bible-action-btn {
    padding: 6px 8px !important;
    font-size: 0.9rem;
    flex-shrink: 0 !important;
  }

  .lcg-bible-swatch-palette {
    flex-shrink: 0 !important;
    display: flex !important;
    gap: 16px !important;
    align-items: center !important;
    padding: 0;
  }

  .lcg-bible-swatch-dot {
    width: 26px !important;
    height: 26px !important;
    min-width: 26px !important;
    min-height: 26px !important;
    max-width: 26px !important;
    max-height: 26px !important;
    flex: 0 0 26px !important;
    aspect-ratio: 1 / 1 !important;
    border-radius: 50% !important;
    flex-shrink: 0 !important;
  }

  .lcg-bible-chapter-btn {
    min-height: 44px;
    height: 44px;
    padding: 8px 10px;
    font-size: 0.84rem;
  }
}

/* --------------------------------------------------------------------------
   13. Responsive Landscape Orientation Support (Mobile & Tablet)
   -------------------------------------------------------------------------- */
@media screen and (max-height: 600px) and (orientation: landscape) {
  .lcg-bible-modal-backdrop {
    padding: 0;
    align-items: stretch;
    justify-content: center;
  }

  .lcg-bible-modal,
  .bible-modal {
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    max-height: 100vh !important;
    max-height: 100dvh !important;
    top: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    border-radius: 0 !important;
    border: none !important;
    transform: none !important;
  }

  .lcg-bible-modal-backdrop.active .lcg-bible-modal,
  .lcg-bible-modal-backdrop.active .bible-modal {
    transform: none !important;
  }

  /* Compact Sticky Modal Header */
  .lcg-bible-modal-header {
    padding: 6px max(14px, env(safe-area-inset-right)) 0 max(14px, env(safe-area-inset-left)) !important;
    gap: 6px !important;
  }

  .lcg-bible-header-top {
    gap: 8px;
  }

  .lcg-bible-quick-jump-wrap {
    padding: 1px 4px 1px 10px;
  }

  .lcg-bible-quick-jump-input {
    padding: 4px 0;
    font-size: 0.82rem;
  }

  .lcg-bible-quick-jump-btn {
    padding: 4px 10px;
    font-size: 0.72rem;
  }

  .lcg-bible-close-btn {
    width: 26px;
    height: 26px;
    font-size: 0.85rem;
  }

  /* Compact Tabs */
  .lcg-bible-nav-tabs {
    gap: 0;
    padding: 0;
  }

  .lcg-bible-nav-tab {
    padding: 6px 4px 8px;
    font-size: 0.74rem;
  }

  /* Compact Filter Bar */
  .lcg-bible-filter-bar {
    padding-bottom: 6px;
    margin-bottom: 8px;
    gap: 6px;
  }

  .lcg-bible-filter-pill {
    padding: 3px 8px;
    font-size: 0.72rem;
  }

  /* Modal Body Full-Height Scrolling */
  .lcg-bible-modal-body {
    flex: 1 1 auto;
    height: calc(100% - 85px);
    max-height: none !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    padding: 8px max(14px, env(safe-area-inset-right)) max(24px, calc(12px + env(safe-area-inset-bottom))) max(14px, env(safe-area-inset-left));
  }

  /* Highly Flexible Landscape Grid Adaptations */
  .lcg-bible-book-grid {
    grid-template-columns: repeat(6, 1fr) !important;
    gap: 6px 4px;
    margin-bottom: 12px;
  }

  .lcg-bible-book-btn {
    min-height: 40px;
    height: 40px;
    border-radius: 20px;
    padding: 0;
  }

  .lcg-bible-book-abbr {
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.01em;
  }

  .lcg-bible-book-name {
    display: none;
  }

  .lcg-bible-chapter-grid,
  .lcg-bible-verse-grid {
    grid-template-columns: repeat(6, 1fr) !important;
    gap: 6px 4px;
  }

  .lcg-bible-num-btn {
    min-height: 40px;
    height: 40px;
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.01em;
    border-radius: 20px;
    padding: 0;
  }

  /* Compact Reader Toolbar Header */
  .lcg-bible-reader-toolbar {
    padding: 6px max(14px, env(safe-area-inset-right)) 6px max(14px, env(safe-area-inset-left)) !important;
    gap: 8px !important;
  }

  .lcg-bible-nav-trigger-btn {
    padding: 4px 10px;
    font-size: 0.82rem;
  }

  .lcg-bible-font-btn {
    width: 28px;
    height: 28px;
    font-size: 0.78rem;
  }

  /* Scrollable Reader Body in Landscape */
  #lcgBibleReaderRoot {
    height: 100% !important;
    max-height: 100vh !important;
    max-height: 100dvh !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  .lcg-bible-reader-view {
    padding: 0 !important;
  }

  .lcg-bible-reader-body {
    padding: 12px 10px !important;
    flex-grow: 1 !important;
    overflow-y: auto !important;
    max-width: 95%;
  }

  .lcg-bible-chapter-card {
    padding: 14px 16px !important;
  }

  .lcg-bible-chapter-title-banner {
    margin-bottom: 14px !important;
    padding-bottom: 8px !important;
  }

  .lcg-bible-chapter-heading {
    font-size: 1.25rem;
  }

  .lcg-bible-bottom-nav {
    padding: 6px 0;
    padding-bottom: max(6px, calc(6px + env(safe-area-inset-bottom, 0px)));
  }

  .lcg-bible-nav-default {
    gap: 24px;
    padding: 0 16px;
  }

  .lcg-bible-nav-item-btn {
    padding: 6px 16px;
    min-height: 36px;
    font-size: 0.85rem;
  }

  .lcg-bible-nav-active {
    gap: 12px;
    padding: 0 16px;
    justify-content: center;
    max-width: 100vw;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
  }

  .lcg-bible-action-btn {
    padding: 4px 6px !important;
    font-size: 0.82rem;
    flex-shrink: 0 !important;
  }

  .lcg-bible-swatch-palette {
    gap: 6px;
    padding: 0;
    flex-shrink: 0 !important;
  }

  .lcg-bible-swatch-dot {
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    min-height: 24px !important;
    max-width: 24px !important;
    max-height: 24px !important;
    flex: 0 0 24px !important;
    aspect-ratio: 1 / 1 !important;
    border-radius: 50% !important;
    flex-shrink: 0 !important;
  }
}

/* --------------------------------------------------------------------------
   14. Horizontal Slide Animations for Chapter Transitions
   -------------------------------------------------------------------------- */
#lcgBibleReaderModal,
#lcgBibleReaderModal .lcg-bible-modal,
#lcgBibleReaderRoot,
.lcg-bible-reader-view {
  overflow-x: hidden !important;
}

@keyframes lcgSlideOutLeft {
  from {
    transform: translate3d(0, 0, 0);
    opacity: 1;
  }
  to {
    transform: translate3d(-100%, 0, 0);
    opacity: 0;
  }
}

@keyframes lcgSlideInRight {
  from {
    transform: translate3d(100%, 0, 0);
    opacity: 0;
  }
  to {
    transform: translate3d(0, 0, 0);
    opacity: 1;
  }
}

@keyframes lcgSlideOutRight {
  from {
    transform: translate3d(0, 0, 0);
    opacity: 1;
  }
  to {
    transform: translate3d(100%, 0, 0);
    opacity: 0;
  }
}

@keyframes lcgSlideInLeft {
  from {
    transform: translate3d(-100%, 0, 0);
    opacity: 0;
  }
  to {
    transform: translate3d(0, 0, 0);
    opacity: 1;
  }
}

.slide-out-left,
.lcg-slide-out-left {
  animation: lcgSlideOutLeft 200ms ease-out forwards;
  will-change: transform, opacity;
  pointer-events: none;
}

.slide-in-right,
.lcg-slide-in-right {
  animation: lcgSlideInRight 200ms ease-in forwards;
  will-change: transform, opacity;
}

.slide-out-right,
.lcg-slide-out-right {
  animation: lcgSlideOutRight 200ms ease-out forwards;
  will-change: transform, opacity;
  pointer-events: none;
}

.slide-in-left,
.lcg-slide-in-left {
  animation: lcgSlideInLeft 200ms ease-in forwards;
  will-change: transform, opacity;
}

/* --------------------------------------------------------------------------
   15. Continuous Sliding Explain Drawer (AI Scripture Insights)
   -------------------------------------------------------------------------- */
#lcgBibleExplainDrawer,
.lcg-bible-explain-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  max-width: 400px;
  height: 100%;
  transform: translateX(100%);
  transition: transform 0.3s ease-in-out;
  z-index: 10005;
  background: #252525 !important;
  box-shadow: -8px 0 25px rgba(0, 0, 0, 0.7) !important;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

#lcgBibleExplainDrawer.active {
  transform: translateX(0) !important;
}

.lcg-explain-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  padding-top: max(16px, env(safe-area-inset-top)) !important;
  background: #18191d;
  border-bottom: 1px solid var(--lcg-bible-border);
  flex-shrink: 0;
}

.lcg-explain-drawer-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.lcg-explain-drawer-icon {
  font-size: 1.25rem;
  line-height: 1;
}

.lcg-explain-drawer-titles {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.lcg-explain-drawer-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--lcg-bible-text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lcg-explain-drawer-subtitle {
  font-size: 0.72rem;
  color: var(--lcg-bible-text-muted);
  font-weight: 500;
}

.lcg-explain-drawer-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.lcg-explain-font-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--lcg-bible-border);
  color: var(--lcg-bible-text-muted);
  font-size: 0.76rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: var(--lcg-bible-radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  line-height: 1.2;
}

.lcg-explain-font-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--lcg-bible-text-main);
  border-color: var(--lcg-bible-accent-blue);
}

.lcg-explain-drawer-close {
  background: transparent;
  border: none;
  color: var(--lcg-bible-text-muted);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.lcg-explain-drawer-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--lcg-bible-text-main);
}

#lcgExplainDrawerMessages,
.lcg-explain-drawer-messages {
  --chat-font-size: calc(var(--global-reading-size, 1.1rem) - 0.15rem);
  font-size: calc(var(--global-reading-size, 1.1rem) - 0.15rem);
  flex-grow: 1;
  overflow-y: auto;
  padding: 1rem;
  padding-bottom: 120px !important;
  display: flex;
  flex-direction: column;
  gap: 14px;
  scrollbar-width: thin;
  scrollbar-color: #555555 transparent;
  box-sizing: border-box;
}

#lcgExplainDrawerMessages .lcg-explain-bubble,
#lcgExplainDrawerMessages .lcg-explain-bubble p,
.lcg-explain-drawer-messages .lcg-explain-bubble,
.lcg-explain-drawer-messages .lcg-explain-bubble p {
  font-size: calc(var(--global-reading-size, 1.1rem) - 0.15rem);
}

.lcg-explain-drawer-messages::-webkit-scrollbar {
  width: 6px;
}

.lcg-explain-drawer-messages::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

.lcg-explain-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  height: 100%;
  min-height: 200px;
  color: var(--lcg-bible-text-muted);
  padding: 2rem 1rem;
  gap: 12px;
}

.lcg-explain-empty-icon {
  font-size: 2rem;
  opacity: 0.7;
}

.lcg-explain-empty-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--lcg-bible-text-main);
  margin: 0;
}

.lcg-explain-empty-desc {
  font-size: 0.8rem;
  line-height: 1.45;
  max-width: 280px;
  margin: 0;
}

/* Chat Message Bubbles */
.lcg-explain-msg {
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-sizing: border-box;
}

.lcg-explain-msg-user {
  align-self: flex-end;
  max-width: 90%;
}

.lcg-explain-msg-user .lcg-explain-bubble {
  background: #232d3f;
  border: 1px solid rgba(138, 180, 248, 0.35);
  border-radius: 14px 14px 2px 14px;
  padding: 10px 14px;
  color: #e8eaed;
  font-size: var(--chat-font-size, 0.88rem);
  line-height: 1.45;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  word-break: break-word;
}

.lcg-explain-msg-user .lcg-explain-citation-tag {
  display: block;
  font-weight: 700;
  color: var(--lcg-bible-accent-blue);
  margin-bottom: 3px;
  font-size: 0.82rem;
}

.lcg-explain-msg-assistant {
  align-self: flex-start;
  max-width: 98%;
  width: 100%;
}

.lcg-explain-msg-assistant .lcg-explain-bubble {
  background: #18191d;
  border: 1px solid var(--lcg-bible-border);
  border-radius: 14px 14px 14px 2px;
  padding: 14px 16px;
  color: #f1f3f5;
  font-size: var(--chat-font-size, 0.88rem);
  line-height: 1.55;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  word-break: break-word;
}

.lcg-explain-msg-assistant .lcg-explain-bubble h3 {
  margin: 12px 0 6px 0;
  font-size: 0.95rem;
  color: var(--lcg-bible-accent-gold);
}

.lcg-explain-msg-assistant .lcg-explain-bubble h3:first-child {
  margin-top: 0;
}

.lcg-explain-msg-assistant .lcg-explain-bubble blockquote {
  margin: 8px 0;
  padding: 8px 12px;
  border-left: 3px solid var(--lcg-bible-accent-gold);
  background: rgba(251, 191, 36, 0.08);
  border-radius: 0 6px 6px 0;
  color: #fef08a;
  font-style: normal;
}

.lcg-explain-msg-assistant .lcg-explain-bubble hr {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin: 10px 0;
}

.lcg-explain-msg-assistant .lcg-explain-bubble p {
  margin: 6px 0;
}

.lcg-explain-msg-assistant .lcg-explain-bubble ul,
.lcg-explain-msg-assistant .lcg-explain-bubble ol {
  margin: 6px 0;
  padding-left: 20px;
}

/* Reference Citations Details/Summary Dropdown */
.lcg-explain-sources-details {
  margin-top: 10px;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.lcg-explain-sources-summary {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--lcg-bible-text-muted);
  cursor: pointer;
  user-select: none;
  transition: color 0.15s ease;
  outline: none;
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 0;
}

.lcg-explain-sources-summary::-webkit-details-marker {
  display: none;
}

.lcg-explain-sources-summary::before {
  content: '▶';
  font-size: 0.62rem;
  transition: transform 0.2s ease;
  display: inline-block;
  color: var(--lcg-bible-accent-blue);
}

.lcg-explain-sources-details[open] > .lcg-explain-sources-summary::before {
  transform: rotate(90deg);
}

.lcg-explain-sources-summary:hover {
  color: var(--lcg-bible-accent-blue);
}

.lcg-explain-sources-details[open] > .lcg-explain-sources-summary {
  margin-bottom: 8px;
  color: var(--lcg-bible-accent-blue);
}

.lcg-explain-sources-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.lcg-explain-source-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 2px 8px;
  font-size: 0.72rem;
  color: var(--lcg-bible-text-muted);
}

/* Typing indicator */
.lcg-explain-typing {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: #18191d;
  border: 1px solid var(--lcg-bible-border);
  border-radius: 14px 14px 14px 2px;
  color: var(--lcg-bible-text-muted);
  font-size: 0.82rem;
  width: fit-content;
}

.lcg-explain-typing-dots {
  display: flex;
  gap: 4px;
}

.lcg-explain-typing-dot {
  width: 6px;
  height: 6px;
  background: var(--lcg-bible-accent-blue);
  border-radius: 50%;
  animation: lcgTypingAnim 1.4s infinite ease-in-out;
}

.lcg-explain-typing-dot:nth-child(1) { animation-delay: 0s; }
.lcg-explain-typing-dot:nth-child(2) { animation-delay: 0.2s; }
.lcg-explain-typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes lcgTypingAnim {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; }
}

/* Drawer Footer Form */
.lcg-explain-drawer-footer {
  padding: 12px 14px !important;
  background: #16171a;
  border-top: 1px solid var(--lcg-bible-border);
  flex-shrink: 0;
}

.lcg-explain-input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--lcg-bible-border);
  border-radius: 22px;
  padding: 4px 6px 4px 14px;
  transition: all 0.2s ease;
}

.lcg-explain-input-wrap:focus-within {
  border-color: var(--lcg-bible-accent-blue);
  background: rgba(255, 255, 255, 0.09);
  box-shadow: 0 0 0 2px rgba(138, 180, 248, 0.2);
}

.lcg-explain-input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  color: var(--lcg-bible-text-main);
  font-size: 0.88rem;
  padding: 6px 0;
  font-family: inherit;
}

.lcg-explain-input::placeholder {
  color: var(--lcg-bible-text-dim);
  font-size: 0.82rem;
}

.lcg-explain-send-btn {
  background: var(--lcg-bible-accent-blue);
  color: #121316;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.lcg-explain-send-btn:hover {
  background: #a8c7fa;
  transform: scale(1.05);
}

.lcg-explain-send-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

.explain-inline-copy {
  margin-top: 10px;
  font-size: 0.85rem;
  padding: 4px 10px;
  border-radius: 4px;
  background: var(--theme-bg-hover, rgba(255, 255, 255, 0.08));
  color: var(--theme-text, #e8eaed);
  border: 1px solid var(--lcg-bible-border, rgba(255, 255, 255, 0.1));
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
}

.explain-inline-copy:hover {
  background: rgba(255, 255, 255, 0.16) !important;
  border-color: var(--lcg-bible-accent-blue);
}

/* Main Hub Navbar - NKJV Bible Action Pill */
#bibleNavBtn,
.btn-bible-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 16px !important;
  border-radius: 20px !important;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #ffffff;
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  height: 30px;
  box-sizing: border-box;
  text-decoration: none;
}

#bibleNavBtn:hover,
#bibleNavBtn:active,
.btn-bible-nav:hover,
.btn-bible-nav:active {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.28);
  color: #ffffff;
}

:root.light-theme #bibleNavBtn,
:root.light-theme .btn-bible-nav {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.12);
  color: #1a1a1a;
}

:root.light-theme #bibleNavBtn:hover,
:root.light-theme .btn-bible-nav:hover {
  background: rgba(0, 0, 0, 0.09);
  border-color: rgba(0, 0, 0, 0.22);
}

/* Full-Text Scripture Keyword Search & Highlighting */
.highlight-gold {
  color: #FFD700;
  font-weight: 700;
}

.bible-search-summary {
  color: var(--theme-text, var(--lcg-bible-text-main, #e8eaed));
  font-size: 0.9rem;
  padding: 10px;
  text-align: center;
  font-style: italic;
  border-bottom: 1px solid var(--theme-border, var(--lcg-bible-border, #3c4043));
}

.bible-search-result-item {
  padding: 12px;
  border-bottom: 1px solid var(--theme-border, var(--lcg-bible-border, #3c4043));
  cursor: pointer;
  transition: background 0.2s;
}

.bible-search-result-item:hover {
  background: var(--theme-bg-hover, rgba(255, 255, 255, 0.08));
}

.bible-search-result-ref {
  font-size: 0.85rem;
  font-weight: bold;
  color: var(--theme-accent, #66b2ff);
  margin-bottom: 4px;
}

.bible-search-result-text {
  font-size: 1rem;
  color: var(--theme-text, var(--lcg-bible-text-main, #e8eaed));
  line-height: 1.4;
}

@media (min-width: 768px) {
  #lcgBibleNavDefault,
  #lcgBibleNavActive {
    justify-content: center !important;
    overflow-x: visible !important;
  }
}

@media (min-width: 1024px) {
  .lcg-bible-reader-body.drawer-open,
  .lcg-bible-reader-body.search-drawer-open {
    transform: none !important;
  }
}

/* --------------------------------------------------------------------------
   Left-Hand Search & Jump Drawer
   -------------------------------------------------------------------------- */
.lcg-bible-search-drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  max-width: 400px;
  height: 100%;
  transform: translateX(-100%);
  transition: transform 0.3s ease-in-out;
  z-index: 10005;
  background: var(--theme-bg, #1e1e1e);
  box-shadow: 4px 0 15px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
}

#lcgBibleSearchDrawer.active {
  transform: translateX(0) !important;
}

.search-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: #18191d;
  border-bottom: 1px solid var(--theme-border, var(--lcg-bible-border, rgba(255, 255, 255, 0.1)));
  flex-shrink: 0;
}

.search-drawer-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-drawer-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--lcg-bible-text-main, #f1f3f5);
}

.search-drawer-close-btn {
  background: transparent;
  border: none;
  color: var(--lcg-bible-text-muted, #9aa0a6);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.search-drawer-close-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--lcg-bible-text-main, #fff);
}

.search-drawer-inputs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 15px;
  border-bottom: 1px solid var(--theme-border, var(--lcg-bible-border, rgba(255, 255, 255, 0.12)));
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .search-drawer-inputs {
    flex-direction: column;
  }
}

.search-drawer-input-group {
  display: flex;
  gap: 6px;
  flex: 1;
  min-width: 0;
}

.search-drawer-input-group input {
  flex: 1;
  min-width: 0;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--theme-border, rgba(255, 255, 255, 0.15));
  border-radius: 6px;
  color: var(--theme-text, var(--lcg-bible-text-main, #f1f3f5));
  padding: 8px 10px;
  font-size: 0.85rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-drawer-input-group input:focus {
  border-color: var(--lcg-bible-border-focus, #8ab4f8);
  box-shadow: 0 0 0 2px rgba(138, 180, 248, 0.25);
}

.search-drawer-input-group button {
  background: var(--lcg-bible-accent-blue, #2563eb);
  border: 1px solid transparent;
  border-radius: 6px;
  color: #ffffff;
  padding: 8px 12px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s;
  flex-shrink: 0;
}

.search-drawer-input-group button:hover {
  filter: brightness(1.15);
}

#lcgLoadMoreSearchBtn {
  display: block;
  width: 100%;
  margin: 12px 0;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--theme-border, rgba(255, 255, 255, 0.15));
  border-radius: 6px;
  color: var(--theme-text, var(--lcg-bible-text-main, #f1f3f5));
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
}

#lcgLoadMoreSearchBtn:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--lcg-bible-accent-blue, #8ab4f8);
  color: #ffffff;
}

/* -------------------------------------------------------------
   One-Click Clip to Study Notes Actions
------------------------------------------------------------- */
.lcg-bible-verse-item {
  position: relative;
}

.lcg-verse-note-btn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  float: right;
  opacity: 0;
  margin-top: 2px;
  margin-left: 8px;
  padding: 2px 7px;
  font-size: 0.7rem;
  font-weight: 500;
  font-family: inherit;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 4px;
  color: #94a3b8;
  cursor: pointer;
  transition: opacity 0.15s ease, background 0.15s ease, color 0.15s ease, transform 0.15s ease;
  user-select: none;
  vertical-align: middle;
}

.lcg-verse-note-btn svg {
  display: block;
  flex-shrink: 0;
}

.lcg-bible-verse-item:hover .lcg-verse-note-btn,
.lcg-verse-note-btn:focus,
.lcg-bible-verse-item.selected .lcg-verse-note-btn {
  opacity: 1;
}

.lcg-verse-note-btn:hover {
  background: #3b82f6;
  border-color: #3b82f6;
  color: #ffffff;
  transform: translateY(-1px);
}

.lcg-verse-note-btn:active {
  transform: translateY(0);
}

@media (hover: none) {
  .lcg-verse-note-btn {
    opacity: 0.75;
  }
}

.explain-inline-note {
  font-family: inherit;
  font-weight: 500;
  transition: all 0.2s ease;
}

.explain-inline-note:hover {
  background: rgba(59, 130, 246, 0.15) !important;
  color: #60a5fa !important;
}

blockquote.scripture-clip {
  border-left: 4px solid #3b82f6 !important;
  padding: 8px 14px !important;
  margin: 12px 0 !important;
  background: rgba(59, 130, 246, 0.08);
  border-radius: 0 6px 6px 0;
  font-style: normal;
  color: inherit;
}

blockquote.scripture-clip strong {
  color: #60a5fa;
}

:root.light-theme blockquote.scripture-clip {
  background: #eff6ff;
  border-left-color: #2563eb !important;
}

:root.light-theme blockquote.scripture-clip strong {
  color: #1d4ed8;
}

/* --------------------------------------------------------------------------
   Dynamic Flex-Pane Resizing for Study Notes Dockable Panel
   -------------------------------------------------------------------------- */
@media (min-width: 901px) {
  #lcgBibleModuleRoot {
    transition: width 0.32s cubic-bezier(0.16, 1, 0.3, 1), left 0.32s cubic-bezier(0.16, 1, 0.3, 1), right 0.32s cubic-bezier(0.16, 1, 0.3, 1);
  }

  body.notes-drawer-open .bible-top-panel,
  body.notes-drawer-open .lcg-bible-reader-toolbar {
    width: 100% !important;
    right: auto !important;
  }

  body.notes-drawer-open #lcgBibleBottomNav,
  body.notes-drawer-open .lcg-bible-bottom-nav {
    width: 100% !important;
    right: auto !important;
  }

  /* Accommodate Left-Hand Scripture Search Drawer if open */
  body.notes-drawer-open #lcgBibleSearchDrawer,
  body.notes-drawer-open .lcg-bible-search-drawer {
    max-width: min(400px, calc(100vw - var(--notes-drawer-width, 500px))) !important;
  }

  /* Accommodate Right-Hand Explain Drawer if open */
  body.notes-drawer-open #lcgBibleExplainDrawer,
  body.notes-drawer-open .lcg-bible-explain-drawer {
    right: var(--notes-drawer-width, 500px) !important;
  }

  body.notes-drawer-open #lcgBibleReaderRoot.lcg-bible-reader-root,
  body.notes-drawer-open #lcgBibleReaderRoot {
    width: calc(100vw - var(--notes-drawer-width, 500px)) !important;
    right: var(--notes-drawer-width, 500px) !important;
  }
}

/* --------------------------------------------------------------------------
   Desktop Positioning: NKJV Search Panel Between Chat History and Notes
   -------------------------------------------------------------------------- */
@media (min-width: 1025px) {
  /* On desktop Dashboard (where left Chat History panel is present) */
  body:not(.bible-reader-active) .lcg-bible-modal-backdrop,
  body:not(.bible-reader-active) #lcgBibleNavModal {
    left: var(--bible-nav-left, var(--sidebar-width, 290px)) !important;
    right: var(--bible-nav-right, 0px) !important;
    width: var(--bible-nav-width, calc(100vw - var(--bible-nav-left, var(--sidebar-width, 290px)) - var(--bible-nav-right, 0px))) !important;
  }

  body:not(.bible-reader-active) .lcg-bible-modal {
    max-width: var(--bible-nav-max-width, min(680px, calc(100vw - var(--sidebar-width, 290px) - 32px))) !important;
  }

  body:not(.bible-reader-active).notes-drawer-open .lcg-bible-modal-backdrop,
  body:not(.bible-reader-active).notes-drawer-open #lcgBibleNavModal {
    left: var(--bible-nav-left, var(--sidebar-width, 290px)) !important;
    right: var(--bible-nav-right, var(--notes-drawer-width, 500px)) !important;
    width: var(--bible-nav-width, calc(100vw - var(--sidebar-width, 290px) - var(--notes-drawer-width, 500px))) !important;
  }

  body:not(.bible-reader-active).notes-drawer-open .lcg-bible-modal {
    max-width: var(--bible-nav-max-width, min(680px, calc(100vw - var(--sidebar-width, 290px) - var(--notes-drawer-width, 500px) - 32px))) !important;
  }
}

/* Tablet & Reader view positioning (sidebar is hidden off-screen) */
@media (max-width: 1024px) {
  body.notes-drawer-open .lcg-bible-modal-backdrop,
  body.notes-drawer-open #lcgBibleNavModal {
    left: var(--bible-nav-left, 0px) !important;
    right: var(--bible-nav-right, var(--notes-drawer-width, 400px)) !important;
    width: var(--bible-nav-width, calc(100vw - var(--bible-nav-right, var(--notes-drawer-width, 400px)))) !important;
  }

  body.notes-drawer-open .lcg-bible-modal {
    max-width: var(--bible-nav-max-width, min(680px, calc(100vw - var(--notes-drawer-width, 400px) - 32px))) !important;
  }
}

/* Reader Toolbar Notes Button Styling */
.lcg-bible-notes-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--lcg-bible-border, rgba(255, 255, 255, 0.15));
  border-radius: 16px;
  color: var(--lcg-bible-text-main, #f1f3f5);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  height: 32px;
}

.lcg-bible-notes-btn:hover,
.lcg-bible-notes-btn.active,
body.notes-drawer-open .lcg-bible-notes-btn {
  background: rgba(138, 180, 248, 0.18);
  border-color: var(--lcg-bible-accent-blue, #8ab4f8);
  color: var(--lcg-bible-accent-blue, #8ab4f8);
  box-shadow: 0 0 12px rgba(138, 180, 248, 0.25);
}

:root.light-theme .lcg-bible-notes-btn {
  background: rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.15);
  color: #1e293b;
}

:root.light-theme .lcg-bible-notes-btn:hover,
:root.light-theme .lcg-bible-notes-btn.active,
:root.light-theme body.notes-drawer-open .lcg-bible-notes-btn {
  background: rgba(37, 99, 235, 0.12);
  border-color: #2563eb;
  color: #2563eb;
}

@media (max-width: 600px) {
  .lcg-bible-notes-btn .btn-nav-action-label {
    display: none;
  }
  .lcg-bible-notes-btn {
    padding: 6px 8px;
    border-radius: 50%;
  }
}

/* Lock Bible into the Chat Workspace */
.chat-main #lcgBibleModuleRoot {
    position: absolute !important;
    top: 0 !important; left: 0 !important; right: 0 !important; bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    pointer-events: none;
    z-index: 50 !important;
}
.chat-main #lcgBibleModuleRoot > * {
    pointer-events: auto;
}

#lcgBibleReaderRoot.lcg-bible-reader-root,
#lcgBibleReaderRoot {
    position: absolute !important;
    top: 0 !important; left: 0 !important; right: 0 !important; bottom: 0 !important;
    width: 100% !important;
    z-index: 50 !important; /* Sit above chat, below modals */
}

/* Nuke the top header background and float it */
.bible-top-panel,
.lcg-bible-reader-toolbar {
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border-bottom: none !important;
    box-shadow: none !important;
    position: absolute !important;
    top: 0; left: 0; right: 0;
    justify-content: center !important;
    pointer-events: none !important; /* Allow clicking text beneath */
    padding-top: max(16px, env(safe-area-inset-top)) !important;
}

/* Re-enable clicking on the pill itself */
.bible-top-panel > * {
    pointer-events: auto !important;
}

/* Hide the old corners */
#lcgReaderBackBtn, 
.lcg-bible-header-actions {
    display: none !important;
}

/* Style the floating Chapter Pill */
.lcg-bible-nav-trigger-btn {
    background: rgba(30, 31, 34, 0.85) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border: 1px solid var(--border-color, rgba(255,255,255,0.1)) !important;
    border-radius: 30px !important;
    padding: 8px 20px !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3) !important;
    font-size: 1rem !important;
}

/* Add top padding so scrolling text doesn't hit the absolute top */
.lcg-bible-reader-view {
    padding-top: max(70px, env(safe-area-inset-top)) !important;
}

/* Glassmorphism Selection Footer */
.lcg-bible-bottom-nav {
    background: rgba(20, 21, 24, 0.65) !important;
    backdrop-filter: blur(15px) !important;
    -webkit-backdrop-filter: blur(15px) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: none !important;
}

/* Remove Redundant Home Button */
#lcgNavHomeBtn { display: none !important; }

/* Center Bible and Blend Background */
.lcg-bible-chapter-card {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
}
.lcg-bible-reader-body {
    max-width: 840px !important;
    margin: 0 auto !important;
}

/* Desktop-Only Full Page Quick-Jump Expansion */
@media (min-width: 901px) {
    .lcg-bible-modal {
        max-width: 100% !important;
        max-height: 100% !important;
        height: 100% !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        border: none !important;
        background: var(--bg-main) !important;
    }
    .lcg-bible-modal-backdrop {
        background: var(--bg-main) !important;
        padding: 0 !important; 
    }
}

/* Enforce Dead-Center Layout for Bible Text */
.lcg-bible-reader-body {
    width: 100% !important;
    max-width: 840px !important;
    margin: 0 auto !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
    box-sizing: border-box !important;
}

/* Mobile Hamburger Icon inside Bible Header */
.mobile-bible-hamburger {
    display: none !important;
    position: absolute !important;
    left: 16px !important;
    right: auto !important;
    /* Align vertically with the pill */
    top: 50% !important;
    transform: translateY(-50%) !important;
    background: transparent !important;
    border: none !important;
    color: var(--text-primary) !important;
    cursor: pointer !important;
    pointer-events: auto !important;
    z-index: 1000 !important;
    padding: 8px !important;
}
@media (max-width: 1024px) {
    .mobile-bible-hamburger {
        display: block !important;
    }
}

/* ==========================================================================
   50/50 Horizontal Layout Split for Landscape Screens
   ========================================================================== */
@media (min-width: 768px) and (orientation: landscape) {
  :root body.notes-drawer-open {
    --notes-drawer-width: 50vw !important;
  }

  /* 1. Global Notes Drawer active state */
  body.notes-drawer-open #globalNotesDrawer,
  #globalNotesDrawer.open {
    width: 50vw !important;
    right: 0 !important;
  }

  /* 2. Main Application Container active state (overriding calc(100vw - 500px)) */
  html body.notes-drawer-open #appMainContainer,
  body.notes-drawer-open #appMainContainer,
  body.notes-drawer-open .app-container,
  #appMainContainer.notes-drawer-open,
  .app-container.notes-drawer-open {
    width: 50vw !important;
    flex-shrink: 0 !important;
  }

  /* 3. Constrain fixed inner modals to left half to prevent bleed-over */
  body.notes-drawer-open #lcgBibleNavModal,
  body.notes-drawer-open .lcg-bible-modal-backdrop,
  body.notes-drawer-open #lcgBibleSearchDrawer,
  body.notes-drawer-open .lcg-bible-search-drawer {
    width: 50vw !important;
    max-width: 50vw !important;
    left: 0 !important;
    right: auto !important;
    box-sizing: border-box !important;
  }

  /* Reset search drawer translation so it bounds to [0, 50vw] */
  body.notes-drawer-open #lcgBibleSearchDrawer.active,
  body.notes-drawer-open .lcg-bible-search-drawer.active {
    transform: translateX(0) !important;
  }

  /* Constrain inner modal card inside backdrop */
  body.notes-drawer-open .lcg-bible-modal {
    max-width: calc(50vw - 32px) !important;
    height: 100% !important;
    max-height: 100% !important;
  }

  /* 4. Book Grid & Filter Bar Overflow Prevention */
  body.notes-drawer-open #lcgBibleModuleRoot .lcg-bible-book-grid,
  #lcgBibleModuleRoot .lcg-bible-book-grid,
  body.notes-drawer-open .lcg-bible-book-grid {
    grid-template-columns: repeat(auto-fit, minmax(75px, 1fr)) !important;
  }

  body.notes-drawer-open .lcg-bible-filter-bar {
    flex-wrap: wrap !important;
  }

  /* 5. Shatter Vertical Ceiling for Modal Body */
  body.notes-drawer-open #lcgBibleModuleRoot .lcg-bible-modal-body,
  #lcgBibleModuleRoot .lcg-bible-modal-body {
    max-height: none !important;
    height: 100% !important;
    flex: 1 1 auto !important;
  }
}

/* --------------------------------------------------------------------------
   MOBILE OVERRIDE BLOCK — Note Title + Explain Footer (≤ 768px)
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {

  /* Note Title: cut the 2rem inline override down to H3 size */
  #noteTitleInput,
  .note-title-input {
    font-size: 1.3rem !important;
    line-height: 1.3 !important;
    padding: 12px 16px 8px 16px !important;
  }

  /* Explain Chat Footer: float above the global glass dock */
  .lcg-explain-drawer-footer {
    margin-bottom: 90px !important;
    border-radius: 12px !important;
    width: calc(100% - 16px) !important;
    margin-left: 8px !important;
    margin-right: 8px !important;
  }
}

/* --------------------------------------------------------------------------
   BULLETPROOF: Color Swatch Palette Force-Render
   Prevents flexbox from crushing dots to 0px by strictly enforcing
   physical dimensions on both the palette wrapper and each dot.
   -------------------------------------------------------------------------- */
#lcgSwatchPalette, .lcg-bible-swatch-palette {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 6px !important;
  flex-shrink: 0 !important;
  width: auto !important;
}
.lcg-bible-swatch-dot {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 26px !important;
  height: 26px !important;
  min-width: 26px !important;
  min-height: 26px !important;
  max-width: 26px !important;
  max-height: 26px !important;
  flex: 0 0 26px !important;
  aspect-ratio: 1 / 1 !important;
  border-radius: 50% !important;
  border: 2px solid rgba(255, 255, 255, 0.45) !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35) !important;
  flex-shrink: 0 !important;
  position: relative !important;
  box-sizing: border-box !important;
  cursor: pointer !important;
}

/* --------------------------------------------------------------------------
   TUNED: Notes Editor Scroll Space
   Provides crisp 15-20px clearance right above the floating dock bar
   without wasting dead space.
   -------------------------------------------------------------------------- */
#editor-container {
  padding-bottom: 85px !important;
  box-sizing: border-box !important;
}
.ql-editor {
  margin-bottom: 0 !important;
  padding-bottom: 16px !important;
}
