/* ==========================================================================
   BibleEngine.si / BibleEngine.ai — Sacred Illumination & AI Precision UI
   Modern, Elegant, Faith + AI + Tech Design System
   ========================================================================== */

:root {
  --bg-canvas: #f8f7f4;
  --bg-card: #ffffff;
  --bg-card-alt: #f3f4f8;
  --bg-subtle: #f1f5f9;
  --bg-glass: rgba(255, 255, 255, 0.88);
  --text-main: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  --border-subtle: #edf2f7;

  /* Brand Palette: Royal Sapphire, Sacred Gold, AI Indigo */
  --primary: #1e40af;
  --primary-hover: #1d4ed8;
  --primary-light: #eff6ff;
  --primary-border: #bfdbfe;

  --gold: #b45309;
  --gold-bright: #d97706;
  --gold-bg: #fffbeb;
  --gold-border: #fde68a;

  --ai-start: #4f46e5;
  --ai-end: #7c3aed;
  --ai-bg: #f5f3ff;
  --ai-border: #ddd6fe;

  --teal: #0f766e;
  --teal-bg: #f0fdfa;
  --teal-border: #99f6e4;

  --crimson: #dc2626;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 2px 8px -2px rgba(15, 23, 42, 0.06), 0 1px 3px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 10px 25px -5px rgba(15, 23, 42, 0.07), 0 4px 10px -3px rgba(15, 23, 42, 0.04);
  --shadow-glow: 0 0 0 3px rgba(59, 130, 246, 0.18);

  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "PingFang TC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  --font-serif: "Noto Serif TC", "Noto Serif SC", "Songti TC", "Songti SC", "STSong", "Georgia", "Cambria", serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
}

html.dark, body.dark-theme {
  --bg-canvas: #090d16;
  --bg-card: #111827;
  --bg-card-alt: #161f33;
  --bg-subtle: #1e293b;
  --bg-glass: rgba(17, 24, 39, 0.88);
  --text-main: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --border-color: #1e293b;
  --border-subtle: #1e293b;

  --primary: #3b82f6;
  --primary-hover: #60a5fa;
  --primary-light: rgba(59, 130, 246, 0.14);
  --primary-border: rgba(59, 130, 246, 0.3);

  --gold: #f59e0b;
  --gold-bright: #fbbf24;
  --gold-bg: rgba(245, 158, 11, 0.12);
  --gold-border: rgba(245, 158, 11, 0.3);

  --ai-bg: rgba(124, 58, 237, 0.14);
  --ai-border: rgba(139, 92, 246, 0.35);

  --teal: #2dd4bf;
  --teal-bg: rgba(20, 184, 166, 0.14);
  --teal-border: rgba(45, 212, 191, 0.3);

  --crimson: #f87171;
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 12px 30px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-canvas);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.2s ease, color 0.2s ease;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

a:hover {
  color: var(--primary-hover);
}

/* ==========================================================================
   Top Sticky Glass Header & Brand Bar
   ========================================================================== */

.be-navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow-xs);
}

.be-navbar-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.be-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.be-brand:hover {
  text-decoration: none;
}

.be-logo-wrap {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #1e3a8a 0%, #f59e0b 100%);
  padding: 1.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.25);
  overflow: hidden;
  flex-shrink: 0;
}

.be-logo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
  background: #0b1325;
}

/* Hero Banner Header Card */
.be-hero-banner {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  margin-bottom: 16px;
  height: 145px;
  background: #0b1325;
  border: 1px solid rgba(245, 185, 66, 0.28);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.be-hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 48%;
  opacity: 0.92;
}

.be-hero-overlay {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  padding: 18px 26px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: linear-gradient(180deg, rgba(11, 19, 37, 0.08) 0%, rgba(11, 19, 37, 0.78) 100%);
}

.be-hero-title {
  font-size: 1.18rem;
  font-weight: 700;
  color: #f8fafc;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.65);
  letter-spacing: 0.01em;
}

.be-hero-domain {
  color: #fcd34d;
  font-weight: 600;
}

.be-hero-subtitle {
  font-size: 0.84rem;
  color: #e2e8f0;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.75);
  margin-top: 2px;
}

@media (max-width: 640px) {
  .be-hero-banner {
    height: 120px;
  }
  .be-hero-overlay {
    padding: 12px 16px;
  }
  .be-hero-title {
    font-size: 1rem;
  }
  .be-hero-subtitle {
    font-size: 0.75rem;
  }
}

.be-brand-text {
  display: flex;
  flex-direction: column;
}

.be-brand-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.be-brand-title {
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.be-brand-badge {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 7px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.12), rgba(217, 119, 6, 0.15));
  color: var(--gold);
  border: 1px solid var(--gold-border);
}

.be-brand-tagline {
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-top: 1px;
}

.be-nav-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.be-nav-link {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 5px 10px;
  border-radius: var(--radius-sm);
}

.be-nav-link:hover {
  background: var(--bg-subtle);
  color: var(--primary);
  text-decoration: none;
}

/* Font Size & Theme Toolbar Pills */
.be-pill-group {
  display: inline-flex;
  align-items: center;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: 999px;
  padding: 2px;
  gap: 2px;
}

.be-pill-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 0 7px;
}

.be-pill-btn {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 3px 8px;
  border-radius: 999px;
  border: none;
  background: transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
}

.be-pill-btn:hover, .be-pill-btn.active {
  background: var(--bg-card);
  color: var(--primary);
  box-shadow: var(--shadow-xs);
  text-decoration: none;
}

.be-theme-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background: var(--bg-subtle);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.15s ease;
}

.be-theme-btn:hover {
  background: var(--bg-card);
  color: var(--gold);
  border-color: var(--gold-border);
}

/* Modern Language Selector Dropdown (Matching viaifoundation.org & viai.ai) */
.be-lang-switcher {
  position: relative;
  display: inline-block;
}

.be-lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-main);
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: all 0.18s ease;
  box-shadow: var(--shadow-xs);
}

.be-lang-toggle:hover {
  border-color: var(--primary);
  background: var(--bg-card);
}

.be-lang-globe {
  width: 14px;
  height: 14px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.be-lang-flag {
  font-size: 0.85rem;
  line-height: 1;
}

.be-lang-short {
  letter-spacing: 0.02em;
}

.be-lang-chevron {
  width: 12px;
  height: 12px;
  color: var(--text-muted);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.be-lang-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: 196px;
  padding: 6px;
  border-radius: 16px;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: all 0.18s ease;
  z-index: 100;
}

.be-lang-dropdown.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.be-lang-dropdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  margin-bottom: 4px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-subtle);
}

.be-lang-count {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--bg-subtle);
  color: var(--text-secondary);
}

.be-lang-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 11px;
  border-radius: 11px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary) !important;
  text-decoration: none !important;
  transition: background-color 0.14s ease, color 0.14s ease;
}

.be-lang-item:hover {
  background: var(--bg-subtle);
  color: var(--text-main) !important;
}

.be-lang-item.active {
  background: var(--primary-light);
  color: var(--primary) !important;
  font-weight: 700;
}

.be-lang-item-left {
  display: flex;
  align-items: center;
  gap: 9px;
}

.be-lang-check {
  width: 14px;
  height: 14px;
  color: var(--primary);
  flex-shrink: 0;
}

/* ==========================================================================
   Main Container
   ========================================================================== */

.be-container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 20px 16px 48px;
}

/* ==========================================================================
   Search Command Center & Options Drawer
   ========================================================================== */

.be-search-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 18px 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.be-search-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #1e40af 0%, #7c3aed 50%, #d97706 100%);
}

.be-search-bar-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.be-search-input-wrap {
  flex: 1;
  min-width: 240px;
  position: relative;
  display: flex;
  align-items: center;
}

.be-search-icon {
  position: absolute;
  left: 14px;
  color: var(--text-muted);
  font-size: 1rem;
  pointer-events: none;
}

.be-search-input {
  width: 100%;
  padding: 11px 16px 11px 40px !important;
  font-size: 0.98rem !important;
  font-family: var(--font-sans) !important;
  color: var(--text-main) !important;
  background: var(--bg-canvas) !important;
  border: 1.5px solid var(--border-color) !important;
  border-radius: 12px !important;
  transition: all 0.2s ease !important;
}

.be-search-input:focus {
  outline: none !important;
  background: var(--bg-card) !important;
  border-color: var(--primary) !important;
  box-shadow: var(--shadow-glow) !important;
}

.be-btn-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.be-btn-search {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 11px 22px !important;
  font-size: 0.93rem !important;
  font-weight: 600 !important;
  color: #ffffff !important;
  background: linear-gradient(135deg, #1e40af 0%, #2563eb 100%) !important;
  border: none !important;
  border-radius: 12px !important;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.22);
  transition: all 0.18s ease !important;
}

.be-btn-search:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.32);
}

.be-btn-ai {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 11px 20px !important;
  font-size: 0.93rem !important;
  font-weight: 600 !important;
  color: #ffffff !important;
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 55%, #c026d3 100%) !important;
  border: none !important;
  border-radius: 12px !important;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.25);
  transition: all 0.18s ease !important;
}

.be-btn-ai:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(124, 58, 237, 0.38);
}

.be-search-toggles {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--border-color);
  font-size: 0.83rem;
  color: var(--text-secondary);
}

.be-toggle-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.be-chip-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: 999px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  cursor: pointer;
  font-weight: 500;
  font-size: 0.8rem;
  user-select: none;
  transition: all 0.15s ease;
}

.be-chip-label:hover {
  border-color: var(--primary-border);
  background: var(--primary-light);
}

.be-chip-label input[type="checkbox"] {
  accent-color: var(--primary);
  margin: 0;
  cursor: pointer;
}

.be-search-hint {
  font-size: 0.76rem;
  color: var(--text-muted);
}

/* Expandable Options Drawer */
.be-options-drawer {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border-color);
}

.be-filters-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--bg-canvas);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 14px;
}

.be-filter-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.be-filter-item select {
  padding: 6px 28px 6px 10px;
  font-size: 0.83rem;
  font-family: var(--font-sans);
  color: var(--text-main);
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.be-translations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  text-align: left;
}

.be-trans-card {
  background: var(--bg-canvas);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 14px;
}

.be-trans-card-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--primary);
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 6px;
}

.be-trans-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.be-trans-list.two-col {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 5px 10px;
}

.be-trans-check {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.81rem;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
  transition: background-color 0.12s ease;
}

.be-trans-check:hover {
  background: var(--primary-light);
  color: var(--text-main);
}

.be-trans-check input[type="checkbox"] {
  accent-color: var(--primary);
  margin: 0;
}

.be-trans-check.strongs-toggle {
  color: var(--gold);
  font-weight: 600;
  background: var(--gold-bg);
  border: 1px solid var(--gold-border);
  padding: 3px 7px;
  border-radius: 6px;
  margin-bottom: 3px;
}

/* ==========================================================================
   Upper Chapter Menu & Canon Book Matrix
   ========================================================================== */

.upper-chapter-menu {
  background: var(--bg-card) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: var(--radius-lg) !important;
  padding: 10px 16px !important;
  margin: 0 auto 12px auto !important;
  max-width: 1180px !important;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start !important;
  align-items: center;
  gap: 5px 6px !important;
}

.upper-chapter-menu > strong:first-child {
  background: linear-gradient(135deg, #0f766e, #0d9488);
  color: #ffffff !important;
  font-size: 0.8rem !important;
  padding: 4px 11px !important;
  border-radius: 999px !important;
  border-right: none !important;
  margin-right: 6px !important;
  letter-spacing: 0.02em;
}

.upper-chapter-menu a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 26px;
  font-size: 0.78rem !important;
  font-weight: 600 !important;
  color: var(--text-secondary) !important;
  background: var(--bg-subtle);
  border: 1px solid transparent;
  border-radius: 6px !important;
  padding: 0 6px !important;
  text-decoration: none !important;
  transition: all 0.15s ease;
}

.upper-chapter-menu a:hover {
  background: var(--teal-bg) !important;
  color: var(--teal) !important;
  border-color: var(--teal-border) !important;
  transform: translateY(-1px);
}

.upper-chapter-menu strong a {
  background: var(--primary) !important;
  color: #ffffff !important;
  box-shadow: 0 2px 6px rgba(30, 64, 175, 0.28);
}

.upper-book-menu {
  background: var(--bg-card) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: var(--radius-lg) !important;
  padding: 12px 16px !important;
  margin: 0 auto 18px auto !important;
  max-width: 1180px !important;
  box-shadow: var(--shadow-sm);
}

.upper-book-menu .book-group {
  margin-bottom: 10px !important;
  display: flex;
  align-items: flex-start;
  gap: 10px !important;
}

.upper-book-menu .book-group:last-child {
  margin-bottom: 0 !important;
  padding-top: 8px;
  border-top: 1px dashed var(--border-color);
}

.upper-book-menu .book-group strong {
  font-size: 0.74rem !important;
  font-weight: 700 !important;
  color: var(--gold) !important;
  background: var(--gold-bg) !important;
  border: 1px solid var(--gold-border);
  padding: 4px 10px !important;
  border-radius: 999px !important;
  white-space: nowrap;
  min-width: 68px !important;
  text-align: center;
}

.upper-book-menu .book-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 5px !important;
}

.upper-book-menu a {
  font-size: 0.78rem !important;
  font-weight: 500;
  color: var(--text-secondary) !important;
  background: var(--bg-canvas);
  border: 1px solid var(--border-subtle) !important;
  padding: 2px 8px !important;
  border-radius: 6px !important;
  text-decoration: none !important;
  transition: all 0.14s ease;
}

.upper-book-menu a:hover {
  background: var(--primary-light) !important;
  color: var(--primary) !important;
  border-color: var(--primary-border) !important;
  transform: translateY(-1px);
}

.upper-book-menu a.active {
  background: linear-gradient(135deg, #1e40af, #2563eb) !important;
  color: #ffffff !important;
  border-color: transparent !important;
  font-weight: 600 !important;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
}

/* ==========================================================================
   AI Results Panel
   ========================================================================== */

.be-ai-panel {
  background: var(--bg-card);
  border: 1.5px solid var(--ai-border);
  border-radius: var(--radius-lg);
  padding: 18px 22px;
  margin: 16px auto;
  max-width: 1180px;
  text-align: left;
  box-shadow: 0 10px 30px -5px rgba(124, 58, 237, 0.12);
}

.be-ai-panel h2 {
  margin: 0 0 12px 0;
  font-size: 1.15rem;
  color: var(--ai-end);
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--ai-border);
  padding-bottom: 10px;
}

.be-ai-thinking {
  background: var(--ai-bg);
  border-left: 4px solid var(--ai-end);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin: 10px 0 14px;
  font-size: 0.86rem;
  color: var(--text-secondary);
}

.be-ai-thinking pre {
  white-space: pre-wrap;
  word-wrap: break-word;
  margin: 6px 0 0;
  font-family: var(--font-sans);
  line-height: 1.55;
}

/* ==========================================================================
   Section Headers & Search Count Banner
   ========================================================================== */

.be-section-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.22rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 26px 0 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border-color);
  text-align: left;
}

.be-section-heading::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 22px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--primary), var(--gold-bright));
}

.be-status-banner {
  background: var(--gold-bg);
  border: 1px solid var(--gold-border);
  color: var(--gold);
  padding: 10px 16px;
  border-radius: var(--radius-md);
  margin: 12px 0;
  font-size: 0.92rem;
  text-align: left;
}

/* ==========================================================================
   Section 1: Whole Chapter / Block Reading Cards (.bible-copy-block)
   ========================================================================== */

.bible-copy-block {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
  text-align: left;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.bible-copy-block:hover {
  border-color: var(--primary-border);
  box-shadow: var(--shadow-md);
}

.be-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-subtle);
}

.bible-copy-block h3 {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.be-copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: 999px;
  padding: 4px 11px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.be-copy-btn:hover {
  background: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary-border);
}

.bible-copy-block p {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1.06rem;
  line-height: 1.85;
  color: var(--text-main);
  text-align: left;
}

.verse-unit {
  display: inline;
  padding: 1px 2px;
  border-radius: 4px;
  transition: background-color 0.15s ease;
}

.verse-unit:hover {
  background-color: var(--gold-bg);
}

.verse-unit sup {
  font-family: var(--font-mono);
  font-size: 0.74em;
  font-weight: 700;
  margin-right: 2px;
  vertical-align: super;
}

.verse-unit sup a {
  color: var(--gold-bright) !important;
  text-decoration: none;
  padding: 1px 4px;
  border-radius: 4px;
  background: var(--gold-bg);
}

.verse-unit sup a:hover {
  background: var(--gold);
  color: #fff !important;
}

/* ==========================================================================
   Section 2: Verse-by-Verse Comparison Cards
   ========================================================================== */

.be-verse-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
  text-align: left;
  transition: border-color 0.15s ease;
}

.be-verse-card.alt {
  background: var(--bg-card-alt);
}

.be-verse-card:hover {
  border-color: var(--primary-border);
}

.be-verse-card-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-color);
}

.be-verse-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-light);
  border: 1px solid var(--primary-border);
  padding: 3px 12px;
  border-radius: 999px;
}

.be-verse-badge a {
  color: var(--primary) !important;
  text-decoration: none !important;
}

.be-like-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #e11d48 !important;
  background: rgba(225, 29, 72, 0.08);
  border: 1px solid rgba(225, 29, 72, 0.22);
  padding: 3px 11px;
  border-radius: 999px;
  text-decoration: none !important;
  transition: all 0.15s ease;
}

.be-like-btn:hover {
  background: #e11d48;
  color: #ffffff !important;
  transform: translateY(-1px);
}

.be-verse-trans-list {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.be-verse-trans-item {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 8px 12px;
  background: var(--bg-canvas);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--primary);
  margin: 0 !important;
}

.be-trans-tag {
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-light);
  border: 1px solid var(--primary-border);
  padding: 2px 7px;
  border-radius: 5px;
  min-width: 54px;
  text-align: center;
}

.be-verse-text {
  flex: 1;
  font-family: var(--font-serif);
  font-size: 1.02rem;
  line-height: 1.72;
  color: var(--text-main);
  margin: 0 !important;
}

.be-verse-ref-inline {
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 600;
  margin-right: 6px;
}

.be-verse-ref-inline a {
  color: var(--text-muted) !important;
}

.be-verse-ref-inline a:hover {
  color: var(--primary) !important;
}

/* Study Tools Bar inside Verse Card */
.be-study-bar {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--border-color);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 0.76rem;
}

.be-study-label {
  font-weight: 700;
  color: var(--text-muted);
  margin-right: 2px;
}

.be-study-select {
  padding: 3px 22px 3px 8px !important;
  font-size: 0.76rem !important;
  border-radius: 6px !important;
  background: var(--bg-canvas) !important;
  border: 1px solid var(--border-color) !important;
  color: var(--text-secondary) !important;
  width: auto !important;
  cursor: pointer;
}

.be-study-chip {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  color: var(--text-secondary) !important;
  font-size: 0.73rem;
  font-weight: 500;
  text-decoration: none !important;
  transition: all 0.14s ease;
}

.be-study-chip:hover {
  background: var(--primary-light);
  color: var(--primary) !important;
  border-color: var(--primary-border);
}

/* Strong's Code & Red Letter Markup */
a[href*="bible.fhl.net"] {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75em;
  font-weight: 600;
  color: var(--gold) !important;
  background: var(--gold-bg);
  border: 1px solid var(--gold-border);
  padding: 0 5px;
  border-radius: 4px;
  margin: 0 1px;
  text-decoration: none !important;
}

a[href*="bible.fhl.net"]:hover {
  background: var(--gold);
  color: #ffffff !important;
}

span[style*="color:red"] {
  color: var(--crimson) !important;
}

span[style*="color:orange"] {
  color: #ea580c !important;
}

span.footnote {
  color: var(--text-muted);
  font-style: italic;
  font-size: 0.88em;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.be-footer {
  margin-top: 36px;
  padding: 24px 20px;
  background: var(--bg-card);
  border-top: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.82rem;
  color: var(--text-muted);
  box-shadow: var(--shadow-xs);
}

.be-footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

/* Responsive & PWA Adaptive Adjustments (Mobile, Tablet, Laptop, Desktop) */
@supports (padding: max(0px)) {
  .be-navbar {
    padding-top: env(safe-area-inset-top);
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }
  .be-container {
    padding-bottom: calc(24px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 1024px) {
  .be-container {
    max-width: 100%;
    padding: 16px;
  }
  .be-translations-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .be-navbar-inner {
    padding: 10px 14px;
    gap: 8px;
  }
  .be-brand-tagline {
    display: none;
  }
  .be-nav-actions {
    width: 100%;
    justify-content: space-between;
    padding-top: 6px;
    border-top: 1px solid var(--border-subtle);
  }
  .be-search-card {
    padding: 14px;
  }
  .be-search-bar-row {
    flex-direction: column;
    align-items: stretch;
  }
  .be-btn-group {
    width: 100%;
  }
  .be-btn-search, .be-btn-ai {
    flex: 1;
    justify-content: center;
    padding: 11px 16px;
  }
  .be-filters-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .be-filter-item {
    width: 100%;
    justify-content: space-between;
  }
  .be-filter-item select {
    flex: 1;
  }
  .be-translations-grid {
    grid-template-columns: 1fr;
  }
  .bible-copy-block {
    padding: 14px;
  }
  .be-verse-card {
    padding: 14px;
  }
  .be-verse-trans-item {
    flex-direction: column;
    gap: 4px;
  }
  .be-footer {
    flex-direction: column;
    text-align: center;
    justify-content: center;
  }
  .be-footer-links {
    justify-content: center;
  }
}
