
/* ========================================================
   BEREAN STUDY DESK — ULTRA-PREMIUM CAROLINA OBSIDIAN THEME
   Acts 17:11 • "Examining the Scriptures Daily"
   Carolina Blue (#7bafd4) / Obsidian Black (#040609)
   Bright Snow White (#ffffff / #f1f5f9) Typography
   ======================================================== */
:root {
  --font-serif: "Charter", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --font-hebrew: "Noto Serif Hebrew", "SBL Hebrew", "David", "Times New Roman", serif;
  --font-greek: "Cardo", "Gentium Plus", "SBL Greek", "Palatino Linotype", Georgia, serif;
  --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="carolina-obsidian"], :root {
  --bg-gradient: radial-gradient(ellipse 90% 55% at 50% -5%, rgba(123, 175, 212, 0.28) 0%, transparent 65%),
                 radial-gradient(circle 850px at 95% 15%, rgba(75, 156, 211, 0.15) 0%, transparent 55%),
                 radial-gradient(circle 750px at 5% 75%, rgba(123, 175, 212, 0.10) 0%, transparent 50%),
                 linear-gradient(165deg, #040609 0%, #070a10 25%, #0a1019 55%, #0e1522 80%, #121a2a 100%);
  --bg-page: #040609;
  --bg-surface: rgba(11, 16, 25, 0.90);
  --bg-surface-solid: #0c111b;
  --bg-surface-alt: rgba(17, 24, 37, 0.85);
  --bg-hover: rgba(30, 44, 66, 0.95);
  --text-main: #ffffff;
  --text-muted: #f1f5f9;
  --text-faint: #cbd5e1;
  --border-main: rgba(123, 175, 212, 0.25);
  --border-light: rgba(123, 175, 212, 0.15);
  --accent-carolina: #7bafd4;
  --accent-carolina-glow: rgba(123, 175, 212, 0.35);
  --accent-gold: #f6ad55;
  --accent-emerald: #48bb78;
  --accent-coral: #fc8181;
  --accent-purple: #b794f4;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.55), 0 0 1px rgba(123, 175, 212, 0.3);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.7), 0 0 2px rgba(123, 175, 212, 0.4);
}

[data-theme="dark"] {
  --bg-gradient: linear-gradient(180deg, #090d16 0%, #0e1524 100%);
  --bg-page: #090d16;
  --bg-surface: rgba(18, 26, 44, 0.92);
  --bg-surface-solid: #121a2c;
  --bg-surface-alt: rgba(23, 34, 56, 0.85);
  --bg-hover: rgba(38, 55, 88, 0.9);
  --text-main: #ffffff;
  --text-muted: #e2e8f0;
  --text-faint: #94a3b8;
  --border-main: rgba(148, 163, 184, 0.22);
  --border-light: rgba(148, 163, 184, 0.12);
  --accent-carolina: #60a5fa;
  --accent-carolina-glow: rgba(96, 165, 250, 0.35);
  --accent-gold: #fbbf24;
  --accent-emerald: #34d399;
  --accent-coral: #f87171;
  --accent-purple: #c084fc;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.55);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.7);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  background: var(--bg-page);
  background-image: var(--bg-gradient);
  background-attachment: fixed;
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-carolina); text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; color: inherit; }

/* Scrollbars */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: rgba(0,0,0,0.25); }
::-webkit-scrollbar-thumb { background: rgba(123, 175, 212, 0.35); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(123, 175, 212, 0.6); }

/* ========================================================
   HEADER — PRECISION HIGH-CONTRAST LEGIBILITY ARCHITECTURE
   ======================================================== */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #ffffff;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 2px solid #e2e8f0;
  box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.08);
  padding: 8px 24px;
  transition: all 0.25s ease;
}
.header-inner {
  max-width: 1720px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand-group {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  padding: 2px 4px;
  text-decoration: none;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
}
.brand-group:hover {
  transform: translateY(-1px);
  opacity: 0.95;
}
.brand-header-img {
  height: 44px;
  width: auto;
  max-width: 290px;
  object-fit: contain;
  display: block;
}
.brand-title {
  display: flex;
  align-items: center;
  gap: 8px;
}
.brand-sub {
  font-size: 11px;
  font-family: 'Cinzel', var(--font-serif);
  color: #991b1b;
  background: #fef2f2;
  border: 1.5px solid #f87171;
  padding: 2.5px 9px;
  border-radius: 9999px;
  font-weight: 800;
  letter-spacing: 0.6px;
  display: inline-flex;
  align-items: center;
  box-shadow: 0 1px 2px rgba(153, 27, 27, 0.06);
}

/* Modern Professional Top Navigation System */
.header-nav-center {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 1;
}

/* Workspace Segmented Controls (Scripture, Media, Library) */
.workspace-segmented {
  display: inline-flex;
  background: #f1f5f9;
  border: 1.5px solid #cbd5e1;
  border-radius: 9px;
  padding: 3px;
  gap: 3px;
  flex-shrink: 0;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}
.ws-tab-btn {
  background: transparent;
  border: none;
  padding: 6px 14px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
}
.ws-tab-btn svg {
  color: #475569;
  transition: color 0.18s ease;
}
.ws-tab-btn:hover {
  color: #0f172a;
  background: #ffffff;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
}
.ws-tab-btn:hover svg {
  color: #0284c7;
}
.ws-tab-btn.active {
  background: #0284c7;
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.38);
}
.ws-tab-btn.active svg {
  color: #ffffff;
}
.ws-tab-btn.active .nav-badge {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}
.nav-badge {
  font-size: 10.5px;
  font-weight: 700;
  padding: 1.5px 7px;
  border-radius: 10px;
  background: #e2e8f0;
  color: #334155;
  line-height: 1.3;
}

/* Divider Between Workspaces and Hyperlinks */
.nav-divider {
  width: 1px;
  height: 22px;
  background: #cbd5e1;
  flex-shrink: 0;
  margin: 0 4px;
}

/* Primary Clickable Hyperlinks */
.header-hyperlinks {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.nav-hyperlink {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid transparent;
}
.nav-hyperlink svg {
  color: #0284c7;
  flex-shrink: 0;
  transition: transform 0.18s ease, color 0.18s ease;
}
.nav-hyperlink:hover {
  color: #0284c7;
  background: #f0f9ff;
  border-color: #bae6fd;
  transform: translateY(-1px);
}
.nav-hyperlink:hover svg {
  transform: scale(1.12);
  color: #0369a1;
}
.nav-hyperlink.active {
  color: #0284c7;
  background: #e0f2fe;
  border-color: #7dd3fc;
  font-weight: 700;
}

/* Header Action Controls */
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.app-header .btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 13px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #1e293b;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  white-space: nowrap;
}
.app-header .btn:hover {
  background: #f8fafc;
  border-color: #0284c7;
  color: #0284c7;
  box-shadow: 0 3px 8px rgba(2, 132, 199, 0.16);
  transform: translateY(-1px);
}
.app-header .btn svg {
  flex-shrink: 0;
}
.app-header .btn-badge {
  background: #e2e8f0;
  color: #0f172a;
  padding: 1.5px 7px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
}
.app-header .btn-pwa-install,
.app-header #btnPwaInstall {
  background: #e0f2fe;
  border: 1.5px solid #7dd3fc;
  color: #0369a1;
  font-weight: 700;
}
.app-header #btnPwaInstall svg {
  color: #0284c7;
}
.app-header #btnPwaInstall:hover {
  background: #0284c7;
  border-color: #0284c7;
  color: #ffffff;
  box-shadow: 0 3px 10px rgba(2, 132, 199, 0.28);
}
.app-header #btnPwaInstall:hover svg {
  color: #ffffff;
}
.app-header .filter-dropdown,
.app-header #themeSelect {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #1e293b;
  font-weight: 600;
  font-size: 12px;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  padding: 6px 9px;
  transition: border-color 0.18s ease;
}
.app-header #themeSelect:focus {
  border-color: #0284c7;
  outline: none;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  background: var(--bg-surface-alt);
  border: 1px solid var(--border-main);
  color: #ffffff;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover {
  background: var(--bg-hover);
  border-color: var(--accent-carolina);
  transform: translateY(-1px);
}
.btn-primary {
  background: var(--accent-carolina);
  color: #040609;
  border-color: var(--accent-carolina);
}
.btn-primary:hover {
  background: #9ac7e6;
  color: #040609;
}
.btn-badge {
  background: rgba(0, 0, 0, 0.4);
  padding: 1px 6px;
  border-radius: 10px;
  font-size: 11px;
}

/* ========================================================
   BEREAN STUDY DESK TOOLBAR
   ======================================================== */
.desk-toolbar {
  background: rgba(8, 13, 21, 0.92);
  border-bottom: 1px solid rgba(123, 175, 212, 0.22);
  padding: 10px 22px;
  position: sticky;
  top: 59px;
  z-index: 90;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.45);
}
.desk-toolbar-inner {
  max-width: 1720px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.desk-nav-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.nav-picker-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  background: linear-gradient(180deg, rgba(23, 34, 54, 0.85) 0%, rgba(14, 21, 35, 0.9) 100%);
  border: 1px solid rgba(123, 175, 212, 0.3);
  padding: 7px 13px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}
.nav-picker-btn:hover {
  border-color: #38bdf8;
  background: linear-gradient(180deg, rgba(30, 44, 68, 0.95) 0%, rgba(20, 30, 48, 0.95) 100%);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.28);
  transform: translateY(-1px);
}
.nav-picker-select-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  background: linear-gradient(180deg, rgba(23, 34, 54, 0.85) 0%, rgba(14, 21, 35, 0.9) 100%);
  border: 1px solid rgba(123, 175, 212, 0.3);
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}
.nav-picker-select-wrap:hover {
  border-color: #38bdf8;
  background: linear-gradient(180deg, rgba(30, 44, 68, 0.95) 0%, rgba(20, 30, 48, 0.95) 100%);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.28);
  transform: translateY(-1px);
}
.nav-picker-select-wrap:focus-within {
  border-color: #38bdf8;
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.35);
}
.nav-picker-select-wrap .nav-picker-icon {
  position: absolute;
  left: 10px;
  pointer-events: none;
  color: #7dd3fc;
  z-index: 2;
}
.nav-picker-select-wrap .nav-picker-chevron {
  position: absolute;
  right: 10px;
  pointer-events: none;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 700;
  z-index: 2;
}
.nav-picker-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  padding: 7px 28px 7px 32px;
  cursor: pointer;
  outline: none;
  line-height: 1.3;
  touch-action: manipulation;
  z-index: 1;
}
.nav-picker-select.no-icon {
  padding-left: 12px;
  padding-right: 26px;
}
.nav-picker-select optgroup {
  background: #0f172a;
  color: #38bdf8;
  font-weight: 700;
  font-size: 12px;
}
.nav-picker-select option {
  background: #0b1019;
  color: #ffffff;
  font-weight: 500;
  font-size: 13px;
  padding: 6px 10px;
}
.chapter-nav-btn {
  padding: 7px 11px;
  background: rgba(18, 26, 42, 0.85);
  border: 1px solid rgba(123, 175, 212, 0.25);
  border-radius: 8px;
  color: var(--text-faint);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}
.chapter-nav-btn:hover {
  color: #ffffff;
  border-color: #38bdf8;
  background: rgba(30, 44, 68, 0.95);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.25);
  transform: translateY(-1px);
}

/* Reference Jump Input */
.ref-jump-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.ref-jump-input {
  background: rgba(4, 7, 13, 0.7);
  border: 1px solid rgba(123, 175, 212, 0.3);
  border-radius: 8px;
  padding: 7px 34px 7px 13px;
  font-size: 13px;
  color: #ffffff;
  width: 220px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.5);
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}
.ref-jump-input::placeholder {
  color: #94a3b8;
}
.ref-jump-input:focus {
  outline: none;
  border-color: #38bdf8;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.25), 0 2px 10px rgba(0, 0, 0, 0.5);
  width: 260px;
  background: rgba(6, 10, 18, 0.9);
}
.ref-jump-btn {
  position: absolute;
  right: 6px;
  color: #38bdf8;
  padding: 4px;
  cursor: pointer;
  border-radius: 5px;
  transition: all 0.15s ease;
}
.ref-jump-btn:hover {
  color: #ffffff;
  background: rgba(56, 189, 248, 0.2);
}

/* Translation Switcher */
.trans-switcher {
  display: flex;
  background: rgba(4, 7, 13, 0.65);
  border: 1px solid rgba(123, 175, 212, 0.25);
  border-radius: 9px;
  padding: 2.5px;
  gap: 2px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.4);
}
.trans-btn {
  padding: 6px 12px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 600;
  color: #cbd5e1;
  transition: all 0.16s ease;
}
.trans-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}
.trans-btn.active {
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.35) 0%, rgba(14, 165, 233, 0.25) 100%);
  border: 1px solid #38bdf8;
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.3);
}

/* Toggle Buttons for Exegetical Layers */
.desk-layer-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.layer-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 13px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(18, 26, 42, 0.85);
  border: 1px solid rgba(123, 175, 212, 0.25);
  color: #cbd5e1;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}
.layer-btn:hover {
  color: #ffffff;
  border-color: #38bdf8;
  background: rgba(30, 44, 68, 0.95);
  transform: translateY(-1px);
}
.layer-btn.active {
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.3) 0%, rgba(14, 165, 233, 0.18) 100%);
  border-color: #38bdf8;
  color: #38bdf8;
  font-weight: 700;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.32);
}
.layer-btn.active-emerald {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.25) 0%, rgba(5, 150, 105, 0.18) 100%);
  border-color: #34d399;
  color: #34d399;
  font-weight: 700;
  box-shadow: 0 0 14px rgba(52, 211, 153, 0.32);
}

/* ========================================================
   BEREAN STUDY DESK DUAL-PANE WORKSPACE
   ======================================================== */
.desk-workspace {
  max-width: 1720px;
  margin: 0 auto;
  padding: 18px 22px 60px;
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 22px;
  transition: var(--transition);
}
.desk-workspace.fullwidth {
  grid-template-columns: 1fr;
}

/* Left / Main: Scripture Stage */
.scripture-stage {
  background: rgba(11, 16, 25, 0.92);
  border: 1px solid rgba(123, 175, 212, 0.24);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
}
.scripture-header-banner {
  padding: 16px 24px;
  background: linear-gradient(180deg, rgba(18, 27, 43, 0.95) 0%, rgba(14, 21, 35, 0.9) 100%);
  border-bottom: 1px solid rgba(123, 175, 212, 0.2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.banner-title-group h2 {
  font-family: var(--font-serif);
  font-size: 23px;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: -0.2px;
}
.banner-meta {
  font-size: 12.5px;
  color: #7dd3fc;
  margin-top: 3px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}
.banner-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Scripture Reading Container */
.scripture-content {
  padding: 28px 32px;
  min-height: 600px;
}
.loading-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  gap: 16px;
  color: #38bdf8;
}
.spinner {
  width: 38px;
  height: 38px;
  border: 3px solid rgba(56, 189, 248, 0.2);
  border-top-color: #38bdf8;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Verse Annotation Styling (Highlight, Underline, Circle) */
.annot-highlight,
.verse-row.annot-highlight,
.interlinear-verse-block.annot-highlight,
.parallel-verse-block.annot-highlight {
  background: rgba(245, 158, 11, 0.18) !important;
  border-left: 5px solid #f59e0b !important;
  border-radius: 10px;
  box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.35), 0 4px 16px rgba(245, 158, 11, 0.15) !important;
}
.annot-highlight .verse-text {
  color: #fffbeb !important;
  background: rgba(245, 158, 11, 0.14) !important;
  padding: 4px 8px;
  border-radius: 6px;
  box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.2);
}
.annot-highlight .verse-num {
  background: #f59e0b !important;
  color: #040609 !important;
  font-weight: 800 !important;
  box-shadow: 0 1px 6px rgba(245, 158, 11, 0.5) !important;
}
.para-verse-span.annot-highlight {
  background: rgba(245, 158, 11, 0.35) !important;
  color: #fffbeb !important;
  border-radius: 5px;
  padding: 2px 6px;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.6) !important;
}

/* Underline Annotation */
.annot-underline,
.verse-row.annot-underline,
.interlinear-verse-block.annot-underline,
.parallel-verse-block.annot-underline {
  border-left: 5px solid #38bdf8 !important;
  background: rgba(56, 189, 248, 0.08) !important;
  border-radius: 10px;
  box-shadow: inset 0 0 0 1px rgba(56, 189, 248, 0.25) !important;
}
.annot-underline .verse-text,
.annot-underline .orig-flow-trans,
.para-verse-span.annot-underline {
  text-decoration: underline !important;
  text-decoration-color: #38bdf8 !important;
  text-decoration-thickness: 3px !important;
  text-underline-offset: 5px !important;
}
.annot-underline .verse-num {
  background: #38bdf8 !important;
  color: #040609 !important;
  font-weight: 800 !important;
  box-shadow: 0 1px 6px rgba(56, 189, 248, 0.5) !important;
}

/* Circle Annotation */
.annot-circle,
.verse-row.annot-circle,
.interlinear-verse-block.annot-circle,
.parallel-verse-block.annot-circle {
  border: 2px solid #ec4899 !important;
  border-left: 5px solid #ec4899 !important;
  border-radius: 16px !important;
  background: rgba(236, 72, 153, 0.09) !important;
  box-shadow: 0 0 18px rgba(236, 72, 153, 0.22), inset 0 0 0 1px rgba(236, 72, 153, 0.3) !important;
}
.annot-circle .verse-text {
  border: 1.5px dashed #ec4899 !important;
  border-radius: 12px !important;
  padding: 6px 12px !important;
  background: rgba(236, 72, 153, 0.06) !important;
  display: inline-block;
  box-shadow: 0 0 8px rgba(236, 72, 153, 0.15) !important;
}
.annot-circle .verse-num {
  background: #ec4899 !important;
  color: #ffffff !important;
  font-weight: 800 !important;
  border-radius: 50% !important;
  width: 26px !important;
  height: 26px !important;
  min-width: 26px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 2px 8px rgba(236, 72, 153, 0.5) !important;
}
.para-verse-span.annot-circle {
  display: inline-block;
  border: 2px dashed #ec4899 !important;
  border-radius: 14px !important;
  padding: 3px 10px !important;
  margin: 2px 3px;
  background: rgba(236, 72, 153, 0.14) !important;
  box-shadow: 0 0 10px rgba(236, 72, 153, 0.25) !important;
}

/* Quick Highlight Button on Verses */
.btn-verse-quick-hl {
  background: transparent;
  border: none;
  font-size: 13px;
  opacity: 0.25;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
  transition: opacity 0.15s ease, transform 0.15s ease, background 0.15s ease;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.verse-row:hover .btn-verse-quick-hl,
.parallel-verse-block:hover .btn-verse-quick-hl,
.interlinear-verse-block:hover .btn-verse-quick-hl {
  opacity: 0.75;
}
.btn-verse-quick-hl:hover {
  opacity: 1 !important;
  background: rgba(245, 158, 11, 0.25);
  transform: scale(1.2);
}
.annot-highlight .btn-verse-quick-hl {
  opacity: 1 !important;
}

/* Annotation Action Bar in Scripture Header */
.annot-action-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(4, 7, 13, 0.55);
  border: 1px solid rgba(123, 175, 212, 0.2);
  border-radius: 8px;
  padding: 3px 8px;
}
.annot-tool-btn {
  background: transparent;
  border: none;
  font-size: 11.5px;
  font-weight: 600;
  color: #cbd5e1;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition);
}
.annot-tool-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}
.annot-tool-btn.active {
  color: #040609;
  font-weight: 700;
}
.annot-tool-btn.btn-hl.active { background: #f59e0b; color: #040609; }
.annot-tool-btn.btn-un.active { background: #38bdf8; color: #040609; }
.annot-tool-btn.btn-cr.active { background: #ec4899; color: #ffffff; }

/* Quick Floating Verse Annotation Pill Trigger */
.verse-annot-badge {
  font-size: 9.5px;
  font-weight: 700;
  border-radius: 10px;
  padding: 1px 6px;
  margin-left: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  vertical-align: middle;
}
.v-badge-hl { background: rgba(245, 158, 11, 0.25); color: #fbbf24; border: 1px solid #f59e0b; }
.v-badge-un { background: rgba(56, 189, 248, 0.25); color: #7dd3fc; border: 1px solid #38bdf8; }
.v-badge-cr { background: rgba(236, 72, 153, 0.25); color: #f472b6; border: 1px solid #ec4899; }

/* Contextual Paragraph Flow Mode */
.para-flow-block {
  margin-bottom: 26px;
  line-height: 1.88;
  font-family: var(--font-serif);
  color: #f1f5f9;
  text-align: justify;
  text-justify: inter-word;
  position: relative;
  padding: 10px 14px;
  border-radius: 10px;
  transition: background 0.18s ease;
}
.para-flow-block:hover {
  background: rgba(56, 189, 248, 0.03);
}
.para-verse-span {
  display: inline;
  transition: background 0.15s ease;
  padding: 1px 3px;
  border-radius: 4px;
}
.para-verse-span:hover {
  background: rgba(56, 189, 248, 0.14);
}
.para-verse-span.highlighted {
  background: rgba(56, 189, 248, 0.25);
  color: #ffffff;
  font-weight: 500;
  box-shadow: 0 0 0 2px #38bdf8;
}
.para-verse-sup {
  font-size: 11px;
  font-weight: 700;
  font-family: var(--font-sans);
  color: #38bdf8;
  vertical-align: super;
  padding: 0 4px 0 2px;
  user-select: none;
  cursor: pointer;
  line-height: 0;
}
.para-verse-sup:hover {
  color: #ffffff;
  text-decoration: underline;
}
.para-lxx-annotation {
  display: block;
  font-size: 14px;
  font-family: var(--font-greek);
  color: #6ee7b7;
  background: rgba(16, 185, 129, 0.08);
  border-left: 3px solid #10b981;
  padding: 6px 12px;
  margin: 8px 0 12px 0;
  border-radius: 6px;
  line-height: 1.6;
}

/* Single Translation Verse Rows */
.verse-row {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 12px;
  padding: 8px 14px;
  border-radius: 9px;
  border-left: 3px solid transparent;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}
.verse-row:hover {
  background: rgba(56, 189, 248, 0.06);
  border-left-color: rgba(56, 189, 248, 0.5);
  transform: translateX(2px);
}
.verse-row.active-selected-verse,
.parallel-verse-block.active-selected-verse,
.interlinear-verse-block.active-selected-verse {
  outline: 2px solid rgba(56, 189, 248, 0.8);
  outline-offset: 1px;
}
.para-verse-span.active-selected-verse {
  outline: 2px solid rgba(56, 189, 248, 0.8);
  border-radius: 4px;
}
.verse-num-col {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.verse-num {
  font-size: 12px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.14);
  border: 1px solid rgba(56, 189, 248, 0.25);
  padding: 2px 7px;
  border-radius: 6px;
  user-select: none;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s ease;
}
.verse-num:hover {
  background: #38bdf8;
  color: #040609;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.4);
}
.verse-text {
  font-family: var(--font-serif);
  font-size: 18.5px;
  line-height: 1.76;
  color: #ffffff;
  letter-spacing: 0.1px;
}

/* ========================================================
   PARALLEL 4-WAY COMPARISON VIEW
   ======================================================== */
.parallel-verse-block {
  margin-bottom: 24px;
  background: rgba(11, 16, 25, 0.85);
  border: 1px solid rgba(123, 175, 212, 0.22);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}
.parallel-header {
  padding: 11px 18px;
  background: rgba(17, 24, 37, 0.95);
  border-bottom: 1px solid rgba(123, 175, 212, 0.2);
  font-size: 13.5px;
  font-weight: 700;
  color: #38bdf8;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.parallel-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: rgba(123, 175, 212, 0.15);
}
.parallel-col {
  background: rgba(12, 17, 27, 0.98);
  padding: 16px 18px;
  font-family: var(--font-serif);
  font-size: 16px;
  line-height: 1.68;
  color: #f1f5f9;
}
.parallel-col-label {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 800;
  color: #38bdf8;
  text-transform: uppercase;
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}

/* ========================================================
   RIGHT PANEL: EXEGETICAL RESOURCES (ALL RESOURCES INDEXED)
   ======================================================== */
.passage-resources-panel {
  background: rgba(11, 16, 25, 0.92);
  border: 1px solid rgba(123, 175, 212, 0.24);
  border-radius: 16px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  max-height: calc(100vh - 145px);
  position: sticky;
  top: 125px;
}
.res-panel-header {
  padding: 16px 20px;
  background: linear-gradient(180deg, rgba(18, 27, 43, 0.95) 0%, rgba(14, 21, 35, 0.9) 100%);
  border-bottom: 1px solid rgba(123, 175, 212, 0.2);
}
.res-panel-title-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.res-panel-title {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 8px;
}
.res-panel-sub {
  font-size: 11.5px;
  color: #7dd3fc;
  font-weight: 500;
}
.res-filter-tabs {
  display: flex;
  gap: 5px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-top: 10px;
}
.res-tab-btn {
  font-size: 11px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: #cbd5e1;
  white-space: nowrap;
  transition: all 0.16s ease;
}
.res-tab-btn:hover {
  color: #ffffff;
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.3);
}
.res-tab-btn.active {
  background: #0284c7;
  color: #ffffff;
  border-color: #38bdf8;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.35);
}
.res-search-input {
  width: 100%;
  background: rgba(4, 7, 13, 0.65);
  border: 1px solid rgba(123, 175, 212, 0.25);
  border-radius: 8px;
  padding: 7px 12px;
  font-size: 12px;
  color: #ffffff;
  margin-top: 10px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.4);
  transition: all 0.18s ease;
}
.res-search-input:focus {
  outline: none;
  border-color: #38bdf8;
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2);
}

.res-cards-list {
  padding: 14px 18px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.res-card {
  background: rgba(18, 26, 42, 0.7);
  border: 1px solid rgba(123, 175, 212, 0.2);
  border-radius: 12px;
  padding: 14px 16px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
.res-card:hover {
  background: rgba(25, 36, 58, 0.9);
  border-color: #38bdf8;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5), 0 0 12px rgba(56, 189, 248, 0.2);
}
.res-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 7px;
}
.res-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2.5px 7px;
  border-radius: 5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.res-badge-comm { background: rgba(56, 189, 248, 0.18); color: #7dd3fc; border: 1px solid rgba(56, 189, 248, 0.35); }
.res-badge-serm { background: rgba(246, 173, 85, 0.18); color: #fbd38d; border: 1px solid rgba(246, 173, 85, 0.35); }
.res-badge-deb { background: rgba(252, 129, 129, 0.18); color: #feb2b2; border: 1px solid rgba(252, 129, 129, 0.35); }
.res-badge-lect { background: rgba(72, 187, 120, 0.18); color: #9ae6b4; border: 1px solid rgba(72, 187, 120, 0.35); }
.res-badge-video { background: rgba(239, 68, 68, 0.18); color: #fca5a5; border: 1px solid rgba(239, 68, 68, 0.35); }
.res-badge-article { background: rgba(168, 85, 247, 0.18); color: #d8b4fe; border: 1px solid rgba(168, 85, 247, 0.35); }

.res-format {
  font-size: 10px;
  font-family: var(--font-mono);
  color: #94a3b8;
  font-weight: 600;
}
.res-title {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.42;
  margin-bottom: 5px;
}
.res-author {
  font-size: 12px;
  color: #94a3b8;
  margin-bottom: 10px;
}
.res-card-actions {
  display: flex;
  gap: 7px;
}
.btn-read-desk {
  flex: 1;
  padding: 6px 10px;
  border-radius: 7px;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.3);
  transition: all 0.16s ease;
}
.btn-read-desk:hover {
  background: linear-gradient(135deg, #0369a1 0%, #075985 100%);
  box-shadow: 0 3px 10px rgba(2, 132, 199, 0.45);
  transform: translateY(-1px);
}
.btn-drive-mini {
  padding: 6px 10px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(123, 175, 212, 0.25);
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.16s ease;
}
.btn-drive-mini:hover {
  color: #ffffff;
  border-color: #38bdf8;
  background: rgba(56, 189, 248, 0.15);
}

/* Video card thumbnail inside passage panel */
.res-video-thumb {
  width: 100%;
  height: 115px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 8px;
  border: 1px solid rgba(123, 175, 212, 0.25);
}

/* ========================================================
   MODE 3: MEDIA & APOLOGETICS VIEW (WVBS, GBN, AP)
   ======================================================== */
.media-view-wrap {
  display: none;
  max-width: 1600px;
  margin: 0 auto;
  padding: 24px 20px 80px;
}
.media-view-wrap.active {
  display: block;
}
.media-hero {
  margin-bottom: 26px;
  background: linear-gradient(180deg, rgba(16, 24, 38, 0.95) 0%, rgba(10, 15, 25, 0.9) 100%);
  border: 1px solid rgba(123, 175, 212, 0.26);
  border-radius: 18px;
  padding: 26px 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}
.media-hero-title {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 12px;
}
.media-hero-sub {
  font-size: 14px;
  color: #7dd3fc;
  margin-top: 4px;
  margin-bottom: 22px;
}
.media-search-wrap {
  position: relative;
  margin-bottom: 18px;
}
.media-search-input {
  width: 100%;
  padding: 14px 46px 14px 20px;
  font-size: 15px;
  background: rgba(4, 7, 13, 0.7);
  border: 1.5px solid rgba(123, 175, 212, 0.3);
  border-radius: 12px;
  color: #ffffff;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4);
  transition: all 0.2s ease;
}
.media-search-input:focus {
  outline: none;
  border-color: #38bdf8;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.25), 0 4px 16px rgba(0, 0, 0, 0.5);
}
.media-filter-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.media-pills-group {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.media-pill {
  padding: 7px 15px;
  border-radius: 20px;
  font-size: 12.5px;
  font-weight: 600;
  background: rgba(18, 26, 42, 0.85);
  border: 1px solid rgba(123, 175, 212, 0.25);
  color: #cbd5e1;
  white-space: nowrap;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}
.media-pill:hover {
  color: #ffffff;
  border-color: #38bdf8;
  background: rgba(30, 44, 68, 0.95);
  transform: translateY(-1px);
}
.media-pill.active {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
  border-color: #38bdf8;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.38);
}

/* Media Cards Grid */
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 22px;
}
.media-card {
  background: rgba(11, 16, 25, 0.92);
  border: 1px solid rgba(123, 175, 212, 0.22);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.45);
}
.media-card:hover {
  border-color: #38bdf8;
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.65), 0 0 16px rgba(56, 189, 248, 0.25);
}
.media-thumb-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
  overflow: hidden;
}
.media-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}
.media-card:hover .media-thumb-img {
  transform: scale(1.05);
}
.media-pill-overlay-left {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
  letter-spacing: 0.5px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}
.source-wvbs { background: rgba(220, 38, 38, 0.9); color: #ffffff; }
.source-gbn { background: rgba(37, 99, 235, 0.9); color: #ffffff; }
.source-ap { background: rgba(147, 51, 234, 0.9); color: #ffffff; }

.media-pill-overlay-right {
  position: absolute;
  bottom: 8px;
  right: 8px;
  padding: 2px 8px;
  border-radius: 5px;
  font-size: 10.5px;
  font-family: var(--font-mono);
  font-weight: 700;
  background: rgba(0, 0, 0, 0.85);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.25);
}
.media-body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.media-topic-tag {
  font-size: 11px;
  font-weight: 700;
  color: #38bdf8;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 6px;
}
.media-title {
  font-size: 15.5px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.42;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.media-author {
  font-size: 12px;
  color: #94a3b8;
  margin-bottom: 14px;
}
.media-actions-bar {
  margin-top: auto;
  display: flex;
  gap: 8px;
  align-items: center;
}
.btn-media-action {
  flex: 1;
  padding: 8px 14px;
  border-radius: 8px;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
  font-size: 12.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.35);
  transition: all 0.16s ease;
}
.btn-media-action:hover {
  background: linear-gradient(135deg, #0369a1 0%, #075985 100%);
  box-shadow: 0 3px 12px rgba(2, 132, 199, 0.5);
  transform: translateY(-1px);
}
.btn-study-desk-jump {
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(246, 173, 85, 0.35);
  color: #fbd38d;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.16s ease;
}
.btn-study-desk-jump:hover {
  background: rgba(246, 173, 85, 0.2);
  border-color: #f6ad55;
  color: #ffffff;
}

/* ========================================================
   STRONG'S LEXICON MODAL / INSPECTOR
   ======================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 6, 9, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay.open { display: flex; }
.strongs-modal-card {
  background: rgba(12, 17, 27, 0.98);
  border: 1.5px solid #38bdf8;
  border-radius: 18px;
  max-width: 680px;
  width: 100%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.85), 0 0 24px rgba(56, 189, 248, 0.3);
  overflow: hidden;
  animation: modalPop 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes modalPop {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.strongs-modal-header {
  padding: 20px 24px;
  background: linear-gradient(180deg, rgba(18, 27, 43, 0.95) 0%, rgba(14, 21, 35, 0.9) 100%);
  border-bottom: 1px solid rgba(123, 175, 212, 0.25);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}
.strongs-head-left {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.strongs-badge-lg {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  color: #040609;
  background: #38bdf8;
  padding: 3px 9px;
  border-radius: 6px;
  align-self: flex-start;
  box-shadow: 0 2px 8px rgba(56, 189, 248, 0.4);
}
.strongs-lemma-display {
  font-size: 36px;
  font-weight: 700;
  color: #ffffff;
  margin-top: 4px;
  line-height: 1.2;
}
.strongs-phonetic {
  font-size: 14.5px;
  color: #7dd3fc;
  font-style: italic;
}
.modal-close-btn {
  font-size: 20px;
  color: #94a3b8;
  padding: 6px 10px;
  border-radius: 6px;
  transition: var(--transition);
}
.modal-close-btn:hover { color: #ffffff; background: rgba(255, 255, 255, 0.1); }
.strongs-modal-body {
  padding: 24px 26px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.lex-section-title {
  font-size: 11px;
  font-weight: 700;
  color: #38bdf8;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 6px;
}
.lex-section-text {
  font-size: 15.5px;
  line-height: 1.65;
  color: #ffffff;
}
.lex-kjv-box {
  background: rgba(246, 173, 85, 0.1);
  border-left: 3px solid #f6ad55;
  border-radius: 8px;
  padding: 12px 16px;
}

/* ========================================================
   BOOK & CHAPTER PICKER MODAL
   ======================================================== */
.picker-modal-card {
  background: rgba(12, 17, 27, 0.98);
  border: 1px solid rgba(123, 175, 212, 0.3);
  border-radius: 18px;
  max-width: 760px;
  width: 100%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.85);
  overflow: hidden;
}
.picker-header {
  padding: 16px 22px;
  background: rgba(17, 24, 37, 0.95);
  border-bottom: 1px solid rgba(123, 175, 212, 0.2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.picker-search {
  flex: 1;
  background: rgba(4, 7, 13, 0.7);
  border: 1px solid rgba(123, 175, 212, 0.3);
  border-radius: 8px;
  padding: 9px 14px;
  font-size: 14px;
  color: #ffffff;
  transition: all 0.18s ease;
}
.picker-search:focus {
  outline: none;
  border-color: #38bdf8;
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.25);
}
.picker-tabs {
  display: flex;
  gap: 4px;
  padding: 10px 22px;
  background: rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid rgba(123, 175, 212, 0.15);
  overflow-x: auto;
}
.picker-tab-btn {
  padding: 6px 14px;
  border-radius: 7px;
  font-size: 12.5px;
  font-weight: 600;
  color: #cbd5e1;
  white-space: nowrap;
  transition: var(--transition);
}
.picker-tab-btn:hover { color: #ffffff; background: rgba(255, 255, 255, 0.08); }
.picker-tab-btn.active {
  background: #0284c7;
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.35);
}
.picker-body {
  padding: 20px 22px;
  overflow-y: auto;
}
.picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 8px;
}
.picker-item-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(123, 175, 212, 0.18);
  border-radius: 8px;
  padding: 10px 12px;
  text-align: left;
  transition: all 0.16s ease;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.picker-item-btn:hover {
  background: rgba(56, 189, 248, 0.14);
  border-color: #38bdf8;
  transform: translateY(-1px);
}
.picker-item-btn.selected {
  background: rgba(56, 189, 248, 0.25);
  border-color: #38bdf8;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.25);
}
.picker-item-name { font-size: 13px; font-weight: 700; color: #ffffff; }
.picker-item-meta { font-size: 11px; color: #7dd3fc; }

.chapter-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(46px, 1fr));
  gap: 8px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(123, 175, 212, 0.15);
}
.chapter-cell-btn {
  padding: 10px 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(123, 175, 212, 0.18);
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  transition: all 0.16s ease;
}
.chapter-cell-btn:hover {
  background: #0284c7;
  color: #ffffff;
  border-color: #38bdf8;
  transform: scale(1.05);
}
.chapter-cell-btn.active {
  background: #0284c7;
  color: #ffffff;
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.4);
}

/* ========================================================
   THEOLOGICAL RESEARCH LIBRARY CATALOG (MODE 2)
   ======================================================== */
.catalog-view-wrap {
  display: none;
}
.catalog-view-wrap.active {
  display: block;
}

/* Catalog Search Hero */
.search-hero {
  padding: 30px 20px 20px;
  max-width: 1400px;
  margin: 0 auto;
}
.search-bar-wrap {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 16px;
}
.search-icon {
  position: absolute;
  left: 18px;
  width: 22px;
  height: 22px;
  fill: #38bdf8;
  pointer-events: none;
}
.search-input {
  width: 100%;
  padding: 16px 50px 16px 54px;
  font-size: 16px;
  background: rgba(11, 16, 25, 0.9);
  border: 1.5px solid rgba(123, 175, 212, 0.3);
  border-radius: 14px;
  color: #ffffff;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.45);
  transition: all 0.2s ease;
}
.search-input:focus {
  outline: none;
  border-color: #38bdf8;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.25), 0 6px 24px rgba(0, 0, 0, 0.6);
}
.search-shortcut-badge {
  position: absolute;
  right: 18px;
  font-size: 11px;
  font-family: var(--font-mono);
  color: #94a3b8;
  background: rgba(0, 0, 0, 0.5);
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid rgba(123, 175, 212, 0.2);
}

/* Quick Pills */
.quick-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.quick-pill {
  padding: 7px 15px;
  border-radius: 20px;
  font-size: 12.5px;
  font-weight: 600;
  background: rgba(18, 26, 42, 0.85);
  border: 1px solid rgba(123, 175, 212, 0.25);
  color: #cbd5e1;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  gap: 6px;
}
.quick-pill:hover {
  color: #ffffff;
  border-color: #38bdf8;
  background: rgba(30, 44, 68, 0.95);
  transform: translateY(-1px);
}
.quick-pill.active {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
  border-color: #38bdf8;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.38);
}
.pill-count {
  font-size: 11px;
  background: rgba(0, 0, 0, 0.3);
  padding: 1px 6px;
  border-radius: 10px;
}

/* Secondary Filter Bar */
.secondary-filters {
  max-width: 1400px;
  margin: 0 auto 16px;
  padding: 0 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.filter-selects-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.filter-dropdown {
  background: rgba(11, 16, 25, 0.9);
  border: 1px solid rgba(123, 175, 212, 0.3);
  border-radius: 8px;
  padding: 7px 12px;
  font-size: 12.5px;
  color: #ffffff;
  transition: border-color 0.16s ease;
}
.filter-dropdown:focus {
  outline: none;
  border-color: #38bdf8;
}

/* Catalog Grid & Cards */
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 18px;
  padding: 20px;
  max-width: 1400px;
  margin: 0 auto;
}
.item-card {
  background: rgba(11, 16, 25, 0.92);
  border: 1px solid rgba(123, 175, 212, 0.22);
  border-radius: 14px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  cursor: pointer;
}
.item-card:hover {
  border-color: #38bdf8;
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.6), 0 0 12px rgba(56, 189, 248, 0.2);
}
.item-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.format-badge {
  font-size: 10.5px;
  font-family: var(--font-mono);
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 5px;
  background: rgba(56, 189, 248, 0.15);
  color: #7dd3fc;
  border: 1px solid rgba(56, 189, 248, 0.28);
}
.item-title {
  font-size: 14.5px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.42;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.item-author {
  font-size: 12.5px;
  color: #94a3b8;
  margin-bottom: 8px;
}
.item-meta-bar {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid rgba(123, 175, 212, 0.15);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.scripture-pill {
  font-size: 11px;
  color: #fbd38d;
  background: rgba(246, 173, 85, 0.14);
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 600;
}

/* Pagination */
.pagination-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px;
}

/* ========================================================
   SANCTUARY READER MODAL (FULL IN-APP DOCUMENT VIEWER)
   ======================================================== */
.sanctuary-reader {
  position: fixed;
  inset: 0;
  background: #040609;
  z-index: 1100;
  display: none;
  flex-direction: column;
}
.sanctuary-reader.open { display: flex; }
.reader-top-bar {
  background: #0c111b;
  border-bottom: 1px solid rgba(123, 175, 212, 0.25);
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.reader-meta-group {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.reader-title {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 550px;
}
.reader-stage-wrap {
  flex: 1;
  display: flex;
  position: relative;
  overflow: hidden;
}
.reader-main-stage {
  flex: 1;
  background: #000000;
  display: flex;
  flex-direction: column;
  position: relative;
}
.reader-pdf-frame {
  width: 100%;
  height: 100%;
  flex: 1;
  border: none;
}
.reader-pdf-notice {
  background: rgba(15, 23, 42, 0.95);
  border-top: 1px solid rgba(123, 175, 212, 0.25);
  padding: 8px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-shrink: 0;
}
.reader-text-stage {
  flex: 1;
  padding: 40px;
  max-width: 850px;
  margin: 0 auto;
  overflow-y: auto;
  font-family: var(--font-serif);
  font-size: 18.5px;
  line-height: 1.82;
  color: #f1f5f9;
}
.reader-pages-stage {
  flex: 1;
  overflow-y: auto;
  padding: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.reader-pages-img {
  max-width: 850px;
  width: 100%;
  border-radius: 8px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.75);
}
.reader-sidebar {
  width: 320px;
  background: #0c111b;
  border-left: 1px solid rgba(123, 175, 212, 0.25);
  display: flex;
  flex-direction: column;
}
.reader-sidebar-header {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(123, 175, 212, 0.15);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.sidebar-notes-area {
  flex: 1;
  background: rgba(0, 0, 0, 0.35);
  border: none;
  padding: 14px;
  color: #ffffff;
  font-size: 13px;
  resize: none;
}
.sidebar-notes-area:focus { outline: none; }

/* Bookmarks & Notes Hub Modals */
.notes-drawer {
  position: fixed;
  top: 0;
  right: -420px;
  width: 400px;
  height: 100vh;
  background: #0c111b;
  border-left: 1px solid rgba(123, 175, 212, 0.25);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.85);
  z-index: 1050;
  display: flex;
  flex-direction: column;
  transition: right 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}
.notes-drawer.open { right: 0; }
.notes-drawer-header {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(123, 175, 212, 0.2);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.notes-drawer-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 16px 20px;
}
.global-notes-area {
  flex: 1;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(123, 175, 212, 0.2);
  border-radius: 8px;
  padding: 14px;
  color: #ffffff;
  font-size: 14px;
  line-height: 1.6;
  resize: none;
}
.global-notes-area:focus {
  outline: none;
  border-color: #38bdf8;
}

/* Toast */
.toast-notice {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #0c111b;
  border: 1px solid #38bdf8;
  color: #ffffff;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 13px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
  z-index: 2000;
  display: none;
}


/* ========================================================
   EMBEDDED YOUTUBE VIDEO PLAYER MODAL & SPLIT DOCK
   ======================================================== */
.video-player-modal {
  position: fixed;
  inset: 0;
  background: rgba(3, 7, 18, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 2100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.video-player-modal.active {
  display: flex;
}
.video-modal-card {
  background: var(--bg-surface-solid);
  border: 1px solid var(--border-main);
  border-radius: 16px;
  width: 100%;
  max-width: 980px;
  max-height: 94vh;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85), 0 0 1px rgba(96, 165, 250, 0.4);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalScaleUp 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes modalScaleUp {
  from { opacity: 0; transform: scale(0.96) translateY(12px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.video-modal-header {
  padding: 14px 20px;
  background: rgba(17, 24, 39, 0.95);
  border-bottom: 1px solid var(--border-main);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.video-modal-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.video-modal-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 6px;
  background: #dc2626;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}
.video-modal-title {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.video-modal-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.video-modal-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-light);
  color: var(--text-main);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: var(--transition);
}
.video-modal-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}
.video-modal-btn.btn-close {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}
.video-modal-btn.btn-close:hover {
  background: #ef4444;
  color: #ffffff;
}
.video-modal-screen-wrap {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 Aspect Ratio */
  background: #000000;
}
.video-modal-iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}
.video-modal-footer {
  padding: 12px 20px;
  background: rgba(15, 23, 42, 0.85);
  border-top: 1px solid var(--border-main);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 12.5px;
  color: var(--text-muted);
}


/* ========================================================
   SCHOLARLY INTERLINEAR & ORIGINAL LANGUAGE SYNTAX ENGINE
   ======================================================== */
.interlinear-verse-block {
  margin-bottom: 24px;
  padding: 18px 22px;
  background: rgba(11, 16, 25, 0.85);
  border: 1px solid rgba(123, 175, 212, 0.18);
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  transition: var(--transition);
}
.interlinear-verse-block:hover {
  border-color: rgba(96, 165, 250, 0.4);
  background: rgba(14, 21, 35, 0.95);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.55);
}
.interlinear-verse-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}
.int-verse-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--accent-carolina);
  display: flex;
  align-items: center;
  gap: 10px;
}
.int-verse-title .verse-num {
  font-size: 13px;
  font-weight: 800;
  background: rgba(96, 165, 250, 0.15);
  border: 1px solid rgba(96, 165, 250, 0.35);
  color: var(--accent-carolina);
  padding: 2px 8px;
  border-radius: 6px;
  cursor: pointer;
}
.int-verse-title .verse-num:hover {
  background: var(--accent-carolina);
  color: #040609;
}

/* Continuous Original Language Flow Bar */
.orig-flow-container {
  padding: 12px 16px;
  margin-bottom: 16px;
  background: rgba(4, 7, 13, 0.65);
  border-left: 3px solid var(--accent-carolina);
  border-radius: 0 8px 8px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.orig-flow-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--accent-gold);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.orig-flow-text {
  font-size: 22px;
  line-height: 1.7;
  letter-spacing: 0.3px;
  color: #f1f5f9;
}
.orig-flow-text.greek {
  font-family: var(--font-greek);
  font-feature-settings: "kern" 1, "liga" 1;
}
.orig-flow-text.hebrew {
  font-family: var(--font-hebrew);
  direction: rtl;
  text-align: right;
  font-size: 25px;
  line-height: 1.8;
  color: #fde68a;
}
.orig-flow-word {
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
  transition: all 0.15s ease;
  display: inline-block;
}
.orig-flow-word:hover {
  background: rgba(96, 165, 250, 0.25);
  color: #60a5fa;
  transform: translateY(-1px);
}
.orig-flow-trans {
  font-size: 14px;
  line-height: 1.6;
  color: #cbd5e1;
  font-family: var(--font-serif);
  padding-top: 6px;
  border-top: 1px dashed rgba(148, 163, 184, 0.15);
}
.orig-flow-trans-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-carolina);
  margin-right: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Scholarly Lexical Word Blocks */
.int-words-flow {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: stretch;
}
.int-words-flow.hebrew-flow {
  direction: rtl;
  justify-content: flex-start;
}
.interlinear-word-box {
  background: rgba(18, 26, 44, 0.75);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  text-align: center;
  min-width: 82px;
  cursor: pointer;
  position: relative;
  transition: var(--transition);
}
.interlinear-word-box:hover {
  background: rgba(30, 41, 67, 0.95);
  border-color: #60a5fa;
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55), 0 0 1px rgba(96, 165, 250, 0.6);
}
.interlinear-word-box.active-word {
  background: rgba(56, 189, 248, 0.2) !important;
  border-color: #38bdf8 !important;
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.4), 0 8px 24px rgba(0, 0, 0, 0.5) !important;
}

/* Target English Gloss */
.iw-english {
  font-size: 13.5px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 6px;
  line-height: 1.25;
}

/* Original Script Presentation */
.iw-original {
  font-size: 21px;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 4px;
}
.iw-original.greek {
  font-family: var(--font-greek);
  color: #93c5fd;
  text-shadow: 0 0 1px rgba(147, 197, 253, 0.3);
}
.iw-original.hebrew {
  font-family: var(--font-hebrew);
  color: #fbbf24;
  direction: rtl;
  font-size: 24px;
  text-shadow: 0 0 1px rgba(251, 191, 36, 0.3);
}

/* Transliteration */
.iw-translit {
  font-size: 11px;
  font-style: italic;
  font-family: var(--font-serif);
  color: #94a3b8;
  margin-bottom: 6px;
}

/* Strong's Reference Code */
.iw-strongs {
  font-size: 10.5px;
  font-family: var(--font-mono);
  font-weight: 700;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.28);
  padding: 1px 7px;
  border-radius: 5px;
  margin-bottom: 5px;
  letter-spacing: 0.5px;
}

/* Grammatical Morphology Tag */
.iw-morph {
  font-size: 10px;
  font-family: var(--font-mono);
  font-weight: 600;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  padding: 2px 6px;
  white-space: nowrap;
}
.iw-morph:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

/* Interlinear Mode Layout Selector Toolbar */
.int-mode-selector {
  display: inline-flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 2px 4px;
  gap: 4px;
  margin-left: 10px;
}
.int-mode-btn {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-faint);
  background: transparent;
  border: none;
  padding: 4px 8px;
  border-radius: 5px;
  cursor: pointer;
  transition: var(--transition);
}
.int-mode-btn:hover {
  color: #ffffff;
}
.int-mode-btn.active {
  background: var(--accent-carolina);
  color: #040609;
  font-weight: 700;
}


/* Multi-Lexicon Suite & Resource Tool Importer */
.lex-tabs-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(4, 7, 13, 0.9);
  padding: 8px 14px;
  border-bottom: 1px solid rgba(123, 175, 212, 0.2);
  overflow-x: auto;
}
.lex-tab-btn {
  font-size: 11.5px;
  font-weight: 700;
  padding: 6px 13px;
  border-radius: 7px;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(123, 175, 212, 0.15);
  cursor: pointer;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.16s ease;
}
.lex-tab-btn:hover {
  color: #ffffff;
  background: rgba(56, 189, 248, 0.15);
  border-color: rgba(56, 189, 248, 0.35);
}
.lex-tab-btn.active {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  border-color: #38bdf8;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.38);
}
.lex-pane-content {
  display: none;
  animation: fadeIn 0.18s ease;
}
.lex-pane-content.active {
  display: block;
}
.lex-source-tag {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 2.5px 7px;
  border-radius: 5px;
  background: rgba(245, 158, 11, 0.18);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fbbf24;
  margin-bottom: 8px;
  display: inline-block;
}
.lex-sub-entry {
  margin-bottom: 14px;
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.35);
  border-left: 3px solid #38bdf8;
  border-radius: 0 8px 8px 0;
}
.lex-sub-title {
  font-size: 12.5px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 5px;
}
.lex-sub-body {
  font-size: 14px;
  line-height: 1.65;
  color: #cbd5e1;
  font-family: var(--font-serif);
}

/* Resource Tool Importer Modal */
.importer-modal-card {
  background: rgba(12, 17, 27, 0.98);
  border: 1.5px solid #38bdf8;
  border-radius: 18px;
  max-width: 640px;
  width: 100%;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85), 0 0 20px rgba(56, 189, 248, 0.3);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.importer-drop-zone {
  border: 2px dashed rgba(56, 189, 248, 0.35);
  border-radius: 12px;
  padding: 36px 20px;
  text-align: center;
  background: rgba(56, 189, 248, 0.04);
  cursor: pointer;
  transition: var(--transition);
  margin-bottom: 16px;
}
.importer-drop-zone:hover, .importer-drop-zone.dragover {
  border-color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
}

/* ========================================================
   INTEGRATED IN-PAGE LEXICON & EXEGETICAL DOCK
   ======================================================== */
.desk-workspace.lexicon-active {
  grid-template-columns: 1fr 490px;
}
@media (min-width: 1440px) {
  .desk-workspace.lexicon-active {
    grid-template-columns: 1fr 530px;
  }
}

/* Lexicon Dock inside Right Exegesis Panel */
.lex-dock-container {
  display: flex;
  flex-direction: column;
  background: rgba(12, 17, 27, 0.98);
  border: 1px solid rgba(56, 189, 248, 0.45);
  border-radius: 14px;
  margin: 12px 14px;
  overflow: hidden;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.6), 0 0 1px rgba(56, 189, 248, 0.6);
  animation: slideInDown 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes slideInDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}
.lex-dock-header {
  padding: 13px 18px;
  background: linear-gradient(180deg, rgba(18, 27, 43, 0.95) 0%, rgba(14, 21, 35, 0.9) 100%);
  border-bottom: 1px solid rgba(123, 175, 212, 0.25);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}
.lex-dock-close-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.16s ease;
}
.lex-dock-close-btn:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: #ef4444;
  color: #ffffff;
}


/* ========================================================
   MULTI-VIDEO SERIES & PLAYLIST EXPLORER STYLES
   ======================================================== */
.series-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(234, 179, 8, 0.2);
  border: 1px solid rgba(234, 179, 8, 0.4);
  color: #facc15;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.btn-series-toggle {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-light);
  color: var(--accent-carolina);
  font-size: 11px;
  font-weight: 700;
  padding: 5px 9px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: var(--transition);
  margin-top: 8px;
  width: 100%;
  justify-content: center;
}
.btn-series-toggle:hover {
  background: rgba(96, 165, 250, 0.18);
  border-color: #60a5fa;
  color: #ffffff;
}
.series-episodes-drawer {
  display: none;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  margin-top: 8px;
  padding: 8px;
  max-height: 240px;
  overflow-y: auto;
}
.series-episodes-drawer.open {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.series-episode-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 6px;
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}
.series-episode-row:hover {
  background: rgba(96, 165, 250, 0.15);
  color: #ffffff;
}
.series-episode-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 80%;
  font-weight: 500;
}
.series-episode-play-icon {
  font-size: 10px;
  font-weight: 700;
  color: #ef4444;
  display: flex;
  align-items: center;
  gap: 3px;
}

/* Playlist Panel inside Theater Video Modal */
.video-modal-split {
  display: flex;
  flex-direction: column;
}
@media (min-width: 900px) {
  .video-modal-split {
    display: grid;
    grid-template-columns: 1fr 300px;
  }
}
.video-modal-playlist {
  background: rgba(11, 16, 25, 0.95);
  border-left: 1px solid var(--border-main);
  display: flex;
  flex-direction: column;
  max-height: 56.25vw;
}
@media (min-width: 900px) {
  .video-modal-playlist {
    max-height: 520px;
  }
}
.video-modal-playlist-header {
  padding: 12px 14px;
  background: rgba(17, 24, 39, 0.95);
  border-bottom: 1px solid var(--border-main);
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-carolina);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.video-modal-playlist-items {
  overflow-y: auto;
  flex: 1;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.v-playlist-item {
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: 11.5px;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.v-playlist-item:hover, .v-playlist-item.active {
  background: rgba(96, 165, 250, 0.16);
  border-color: rgba(96, 165, 250, 0.4);
  color: #ffffff;
}
.v-playlist-item.active {
  font-weight: 700;
  border-left: 3px solid #ef4444;
}

/* Responsive adjustments */
@media (max-width: 1100px) {
  .desk-workspace { grid-template-columns: 1fr; }
  .passage-resources-panel { position: static; max-height: 500px; }
  .parallel-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .app-header { padding: 8px 12px; }
  .desk-toolbar { padding: 8px 12px; }
  .scripture-content { padding: 16px; }
  .ref-jump-input { width: 140px; }
  .ref-jump-input:focus { width: 180px; }
  .parallel-grid { grid-template-columns: 1fr; }
  .interlinear-word-box { min-width: 60px; padding: 6px 8px; }
  .iw-original { font-size: 17px; }
  .brand-sub { display: none; }
  .canopy-columns { grid-template-columns: 1fr; }
  .media-grid { grid-template-columns: 1fr; }
}

/* ========================================================
   MOBILE APP & PWA FORMATTING (iPhone, Android, Galaxy, iPad, Tablets)
   ======================================================== */
:root {
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px);
  --sar: env(safe-area-inset-right, 0px);
  --mobile-nav-height: 64px;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  padding-top: var(--sat);
  padding-left: var(--sal);
  padding-right: var(--sar);
  -webkit-tap-highlight-color: transparent;
}

/* Touch targets & manipulation */
button, select, input, a, .nav-picker-btn, .trans-btn, .layer-btn, .chapter-nav-btn, .v-btn, .annot-tool-btn, .mobile-nav-item {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

/* PWA Install Button */
.btn-pwa-install {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.22) 0%, rgba(14, 165, 233, 0.12) 100%);
  border: 1px solid rgba(56, 189, 248, 0.5);
  color: #38bdf8;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.2);
}
.btn-pwa-install:hover {
  background: rgba(56, 189, 248, 0.28);
  border-color: #38bdf8;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.35);
}
.btn-pwa-install.installed {
  background: rgba(74, 222, 128, 0.15);
  border-color: rgba(74, 222, 128, 0.4);
  color: #4ade80;
}

/* iOS Add to Home Screen Sheet Modal */
.ios-install-sheet {
  background: var(--bg-surface-solid);
  border: 1px solid var(--border-main);
  border-radius: 18px;
  width: 92%;
  max-width: 440px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 1px rgba(123, 175, 212, 0.5);
  overflow: hidden;
  animation: slideInUp 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes slideInUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
.ios-install-header {
  padding: 16px 20px;
  background: rgba(17, 24, 39, 0.95);
  border-bottom: 1px solid var(--border-main);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.ios-install-app-preview {
  display: flex;
  align-items: center;
  gap: 14px;
}
.ios-install-body {
  padding: 20px;
}
.ios-step-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 16px;
}
.ios-step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(56, 189, 248, 0.18);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #38bdf8;
  font-weight: 800;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ios-step-text {
  font-size: 13.5px;
  color: var(--text-main);
  line-height: 1.5;
}


#mobileMoreDrawer, .mobile-more-drawer { display: none !important; }
/* Mobile Bottom Navigation Bar */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(var(--mobile-nav-height) + var(--sab));
  padding-bottom: var(--sab);
  background: rgba(8, 12, 20, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(123, 175, 212, 0.25);
  z-index: 999;
  justify-content: space-around;
  align-items: center;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.6);
}
.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: none;
  border: none;
  color: var(--text-faint);
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 8px;
  transition: var(--transition);
  min-width: 58px;
}
.mobile-nav-item svg {
  transition: transform 0.2s ease;
}
.mobile-nav-item:hover, .mobile-nav-item.active {
  color: #38bdf8;
}
.mobile-nav-item.active svg {
  transform: translateY(-2px);
  filter: drop-shadow(0 0 6px rgba(56, 189, 248, 0.6));
}

/* Floating Mobile Verse Action Bar */
.mobile-verse-action-bar {
  display: none;
  position: fixed;
  bottom: calc(var(--mobile-nav-height) + var(--sab) + 12px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(11, 16, 25, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(56, 189, 248, 0.4);
  border-radius: 30px;
  padding: 6px 14px;
  z-index: 1005;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.85), 0 0 1px rgba(56, 189, 248, 0.6);
  align-items: center;
  gap: 8px;
  animation: slideInUp 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
  max-width: 95vw;
}
@media (min-width: 769px) {
  .mobile-verse-action-bar {
    bottom: 24px;
  }
}
.mvab-label {
  font-size: 11px;
  font-weight: 800;
  color: #ffffff;
  padding-right: 6px;
  border-right: 1px solid var(--border-light);
}
.mvab-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-light);
  color: #ffffff;
  font-size: 11.5px;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 20px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: var(--transition);
  touch-action: manipulation;
}
.mvab-btn:active {
  transform: scale(0.96);
}
.mvab-hl { border-color: rgba(234, 179, 8, 0.5); color: #fef08a; }
.mvab-un { border-color: rgba(56, 189, 248, 0.5); color: #bae6fd; }
.mvab-cr { border-color: rgba(239, 68, 68, 0.5); color: #fecaca; }
.mvab-btn.mvab-hl.active {
  background: #f59e0b;
  color: #040609;
  border-color: #f59e0b;
  font-weight: 800;
}
.mvab-btn.mvab-un.active {
  background: #38bdf8;
  color: #040609;
  border-color: #38bdf8;
  font-weight: 800;
}
.mvab-btn.mvab-cr.active {
  background: #ec4899;
  color: #ffffff;
  border-color: #ec4899;
  font-weight: 800;
}
.mvab-clear {
  color: var(--text-faint);
  border-color: var(--border-light);
  font-size: 11px;
}
.mvab-clear:hover {
  color: #f87171;
  border-color: #f87171;
}
.mvab-cl {
  color: var(--text-faint);
  padding: 6px 10px;
  min-width: 36px;
  min-height: 36px;
  font-size: 15px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-light);
  transition: var(--transition);
}
.mvab-cl:hover, .mvab-cl:active {
  color: #ffffff;
  background: rgba(239, 68, 68, 0.35);
  border-color: rgba(239, 68, 68, 0.6);
}

/* Tablet & iPad layout adjustments (768px - 1100px) */
@media (min-width: 769px) and (max-width: 1100px) {
  .desk-workspace, .desk-workspace.lexicon-active {
    grid-template-columns: 1fr 380px !important;
    gap: 14px;
    padding: 14px 16px 60px;
  }
  .scripture-header-banner {
    padding: 12px 16px;
  }
  .verse-text {
    font-size: 18.5px;
    line-height: 1.75;
  }
}

/* Mobile Devices (Phones: iPhone, Galaxy, Pixel < 768px) */
@media (max-width: 768px) {
  .app-header {
    padding: 8px 12px;
  }
  .header-inner {
    flex-wrap: wrap;
    gap: 8px;
  }
  .mode-switcher {
    display: none !important; /* Replaced by sleek Mobile Bottom Nav */
  }
  .mobile-bottom-nav {
    display: flex !important;
  }
  #importResourceToolBtn {
    display: none; /* Moved to mobile drawer */
  }
  #openBookmarksHubBtn {
    padding: 5px 8px;
  }
  #notesDrawerBtn {
    padding: 5px 8px;
  }
  .desk-workspace, .desk-workspace.lexicon-active {
    grid-template-columns: 1fr !important;
    padding: 8px 8px calc(var(--mobile-nav-height) + var(--sab) + 20px) !important;
    gap: 12px;
  }
  .passage-resources-panel {
    position: static;
    max-height: none;
    border-radius: 12px;
  }
  .desk-toolbar-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .desk-nav-group {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    width: 100%;
  }
  .nav-picker-btn {
    padding: 8px 12px;
    font-size: 13px;
    min-height: 42px;
  }
  .nav-picker-select-wrap {
    min-height: 42px;
  }
  .nav-picker-select {
    min-height: 42px;
    font-size: 13.5px;
    padding: 9px 28px 9px 32px;
  }
  .nav-picker-select.no-icon {
    padding-left: 12px;
    padding-right: 26px;
  }
  .chapter-nav-btn {
    width: 42px;
    height: 42px;
  }
  .ref-jump-wrap {
    flex: 1;
    min-width: 130px;
  }
  .ref-jump-input {
    width: 100% !important;
    height: 42px;
    font-size: 13px;
  }
  .trans-switcher {
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 5px;
    padding-bottom: 2px;
  }
  .trans-btn {
    flex-shrink: 0;
    padding: 7px 11px;
    font-size: 12px;
    min-height: 38px;
  }
  .desk-layer-group {
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 6px;
    padding-bottom: 2px;
  }
  .layer-btn {
    flex-shrink: 0;
    padding: 7px 11px;
    font-size: 12px;
    min-height: 38px;
  }
  .scripture-header-banner {
    padding: 10px 12px;
  }
  .scripture-content {
    padding: 12px 10px;
  }
  .verse-row {
    padding: 8px 0;
  }
  .verse-num {
    min-width: 36px;
    height: 32px;
    font-size: 12.5px;
  }
  .verse-text {
    font-size: 18px !important;
    line-height: 1.75;
  }
  .para-flow-block {
    font-size: 18px !important;
    line-height: 1.8;
  }
  /* Interlinear word boxes */
  .int-words-flow {
    gap: 6px 8px;
  }
  .interlinear-word-box {
    padding: 8px 10px;
    min-width: 66px;
    min-height: 52px;
  }
  .iw-original {
    font-size: 19px !important;
  }
  .iw-english {
    font-size: 13px;
  }
  .iw-translit {
    font-size: 11px;
  }
  .iw-strongs {
    font-size: 10.5px;
  }
  /* Lexicon Dock on Mobile */
  .lex-dock-container {
    margin: 8px 0;
    border-radius: 12px;
  }
  .lex-tabs-bar {
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
    gap: 6px;
    padding: 8px;
  }
  .lex-tab-btn {
    padding: 8px 12px;
    font-size: 12px;
    flex-shrink: 0;
    min-height: 40px;
  }
  /* Video view on mobile */
  .media-grid {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 10px;
  }
  .video-modal-split {
    grid-template-columns: 1fr !important;
  }
  .video-modal-playlist {
    max-height: 260px;
  }
}
