/* 508 Ministry 3-Column Dual Digital Bible + Featured Church Giving Showcase */
/* + Authentic 3D Flip-Page Warm Brown Parchment Bible Reader + Login-Gated Hop-Link Encoder */
/* Fonts: Self-hosted SIL OFL 1.1 Cormorant + Figtree (/fonts/cormorant-figtree.css) */

.b508-showcase,
.b508-modal-root {
  --b508-ivory: #faf7f0;
  --b508-parchment: #f3ede0;
  --b508-navy: #0b1f3a;
  --b508-navy-deep: #071427;
  --b508-navy-mid: #163259;
  --b508-gold: #c89b3c;
  --b508-gold-bright: #e0b85a;
  --b508-gold-soft: #f6ebd1;
  --b508-ink: #1a2433;
  --b508-muted: #4b5563;
  --b508-emerald: #0f5132;
  --b508-emerald-bg: #ebf7f0;
  --b508-fb: #1877f2;
  --b508-border: rgba(200, 155, 60, 0.36);
}

.b508-showcase {
  position: relative;
  z-index: 6;
  max-width: 1380px;
  margin: 0 auto 36px;
  padding: 24px 18px 10px;
  font-family: 'Figtree', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--b508-ink);
  box-sizing: border-box;
}

.b508-showcase *,
.b508-showcase *::before,
.b508-showcase *::after,
.b508-modal-root *,
.b508-modal-root *::before,
.b508-modal-root *::after {
  box-sizing: border-box;
}

.b508-shell {
  background: linear-gradient(165deg, #fffdf8 0%, var(--b508-ivory) 55%, #f5efe1 100%);
  border: 1.5px solid var(--b508-border);
  border-radius: 26px;
  padding: 30px 26px 28px;
  box-shadow: 0 22px 60px rgba(11, 31, 58, 0.12), 0 2px 10px rgba(200, 155, 60, 0.08);
  position: relative;
  overflow: hidden;
}

.b508-shell::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--b508-navy) 0%, var(--b508-gold) 50%, var(--b508-navy) 100%);
}

.b508-header {
  text-align: center;
  max-width: 900px;
  margin: 0 auto 16px;
}

.b508-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 999px;
  background: var(--b508-navy);
  color: #f4d88c;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  border: 1px solid rgba(200, 155, 60, 0.55);
  margin-bottom: 12px;
}

.b508-title {
  font-family: 'Cormorant', Georgia, serif;
  font-size: clamp(30px, 3.8vw, 46px);
  font-weight: 700;
  line-height: 1.08;
  color: var(--b508-navy);
  margin: 0 0 10px;
  letter-spacing: -0.01em;
}

.b508-title em {
  font-style: italic;
  color: #8f691b;
}

.b508-subtitle {
  font-size: 15px;
  line-height: 1.58;
  color: var(--b508-muted);
  margin: 0 auto;
  max-width: 780px;
}

.b508-ref-banner {
  margin: 14px auto 0;
  max-width: 780px;
  background: var(--b508-emerald-bg);
  border: 1px solid rgba(15, 81, 50, 0.28);
  color: var(--b508-emerald);
  border-radius: 12px;
  padding: 9px 15px;
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.b508-ref-banner[hidden] {
  display: none;
}

/* =========================================================================
   3-COLUMN DESKTOP GRID: LEFT BIBLE | CENTER GIVING REQUEST | RIGHT BIBLE
   ========================================================================= */
.b508-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.b508-card {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border: 1.5px solid rgba(11, 31, 58, 0.12);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 14px 36px rgba(11, 31, 58, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.b508-card:hover {
  transform: translateY(-2px);
  border-color: rgba(200, 155, 60, 0.65);
  box-shadow: 0 20px 44px rgba(11, 31, 58, 0.14);
}

.b508-stage {
  position: relative;
  padding: 22px 18px 18px;
  background: radial-gradient(circle at 50% 42%, #fdf8ec 0%, #efe6d1 55%, #e5d8bc 100%);
  border-bottom: 1px solid rgba(200, 155, 60, 0.32);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.b508-stage--kjv {
  background: radial-gradient(circle at 50% 42%, #1d3963 0%, #0b1f3a 70%, #071427 100%);
}

.b508-stage--rv {
  background: radial-gradient(circle at 50% 42%, #5e1d2a 0%, #3a0f18 70%, #24080e 100%);
}

.b508-cover-wrap {
  position: relative;
  display: inline-block;
  border-radius: 10px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  transition: transform 0.26s ease;
}

.b508-cover-wrap:hover {
  transform: translateY(-4px) scale(1.015);
}

.b508-cover-img {
  display: block;
  width: 176px;
  max-width: 100%;
  height: auto;
  aspect-ratio: 848 / 1264;
  object-fit: cover;
  border-radius: 9px;
  border: 2px solid rgba(224, 184, 90, 0.72);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.46), 0 4px 10px rgba(0, 0, 0, 0.25);
}

.b508-pill {
  margin-top: 13px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(250, 247, 240, 0.95);
  color: var(--b508-navy);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  border: 1px solid rgba(200, 155, 60, 0.55);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.16);
}

.b508-body {
  padding: 18px 18px 20px;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
}

.b508-lang-tag {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #8f691b;
  margin-bottom: 4px;
}

.b508-card-title {
  font-family: 'Cormorant', Georgia, serif;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--b508-navy);
  margin: 0 0 6px;
}

.b508-card-desc {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--b508-muted);
  margin: 0 0 14px;
}

.b508-read-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 46px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1.5px solid var(--b508-navy);
  background: linear-gradient(180deg, #132e54 0%, var(--b508-navy) 100%);
  color: #faf7f0;
  font-family: 'Figtree', sans-serif;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(11, 31, 58, 0.22);
  transition: transform 0.18s ease, background 0.18s ease;
}

.b508-read-btn:hover {
  background: linear-gradient(180deg, #1b3d6d 0%, #0f284a 100%);
  transform: translateY(-1px);
}

.b508-read-btn svg {
  width: 18px;
  height: 18px;
  stroke: var(--b508-gold-bright);
  fill: none;
  stroke-width: 2;
  flex-shrink: 0;
}

/* =========================================================================
   CENTER COLUMN: FEATURED CHURCH GIVING REQUEST (AVIVAMIENTO CHURCH INC)
   ========================================================================= */
.b508-card--giving {
  border: 2px solid var(--b508-gold);
  background: linear-gradient(180deg, #fffdf7 0%, #faf5e8 100%);
  box-shadow: 0 18px 46px rgba(11, 31, 58, 0.13);
}

.b508-give-banner {
  background: linear-gradient(145deg, #0b1f3a 0%, #143058 60%, #0c2240 100%);
  color: #faf7f0;
  padding: 18px 18px 16px;
  border-bottom: 2.5px solid var(--b508-gold);
  position: relative;
}

.b508-verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: 999px;
  background: #1877f2;
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.03em;
  margin-bottom: 10px;
  box-shadow: 0 4px 12px rgba(24, 119, 242, 0.35);
}

.b508-give-kicker {
  display: block;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: #f4d88c;
  margin-bottom: 3px;
}

.b508-give-title {
  font-family: 'Cormorant', Georgia, serif;
  font-size: 29px;
  font-weight: 700;
  line-height: 1.08;
  color: #ffffff;
  margin: 0 0 4px;
}

.b508-give-leader {
  font-size: 12.5px;
  color: #dbe4f0;
  margin: 0 0 10px;
  font-weight: 600;
}

.b508-give-pin {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 700;
  color: #f4d88c;
  text-decoration: none;
  padding: 5px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(200, 155, 60, 0.42);
  margin-bottom: 10px;
  transition: background 0.15s ease;
}

.b508-give-pin:hover {
  background: rgba(200, 155, 60, 0.24);
  text-decoration: underline;
}

.b508-fb-spotlight {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--b508-navy);
  text-decoration: none;
  border: 1px solid rgba(24, 119, 242, 0.35);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.b508-fb-spotlight:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.28);
}

.b508-fb-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.b508-fb-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #1877f2;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.b508-fb-icon svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.b508-fb-meta {
  min-width: 0;
}

.b508-fb-meta strong {
  display: block;
  font-size: 12.5px;
  font-weight: 800;
  color: #0b1f3a;
  line-height: 1.25;
}

.b508-fb-meta span {
  display: block;
  font-size: 11px;
  color: #4b5563;
  font-weight: 600;
}

.b508-fb-arrow {
  font-size: 12px;
  font-weight: 800;
  color: #1877f2;
  white-space: nowrap;
}

.b508-give-body {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1 1 auto;
}

.b508-give-notice {
  font-size: 13.5px;
  line-height: 1.54;
  color: #243042;
  margin: 0;
}

.b508-give-notice strong {
  color: var(--b508-navy);
}

.b508-need-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.b508-need-stat {
  background: #ffffff;
  border: 1px solid rgba(200, 155, 60, 0.36);
  border-radius: 10px;
  padding: 8px 6px;
  text-align: center;
}

.b508-need-stat strong {
  display: block;
  font-family: 'Cormorant', Georgia, serif;
  font-size: 19px;
  font-weight: 700;
  color: var(--b508-navy);
  line-height: 1.05;
}

.b508-need-stat span {
  display: block;
  font-size: 10.5px;
  font-weight: 700;
  color: #7c5c19;
  margin-top: 2px;
}

.b508-docs-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #7c5c19;
  margin: 0;
}

.b508-docs-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.b508-doc-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid rgba(11, 31, 58, 0.14);
  text-decoration: none;
  color: var(--b508-navy);
  transition: border-color 0.15s ease, transform 0.15s ease, background 0.15s ease;
}

.b508-doc-card:hover {
  border-color: var(--b508-gold);
  background: #fffaf0;
  transform: translateY(-1px);
}

.b508-doc-thumb {
  position: relative;
  width: 44px;
  height: 58px;
  border-radius: 5px;
  background: linear-gradient(155deg, #0b1f3a 0%, #1a3a68 100%);
  border: 1.5px solid #c89b3c;
  color: #f4d88c;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.1;
  box-shadow: 0 3px 8px rgba(11, 31, 58, 0.16);
}

.b508-doc-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.b508-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.b508-doc-info {
  min-width: 0;
}

.b508-doc-info strong {
  display: block;
  font-size: 11.5px;
  font-weight: 800;
  color: var(--b508-navy);
  line-height: 1.25;
}

.b508-doc-info small {
  display: block;
  font-size: 10px;
  color: #6b7280;
  font-weight: 600;
}

.b508-give-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  min-height: 46px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1.5px solid #a87b22;
  background: linear-gradient(180deg, #e2ba5f 0%, #c89b3c 100%);
  color: #071427;
  font-size: 13.5px;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(200, 155, 60, 0.34);
  transition: transform 0.16s ease, filter 0.16s ease;
}

.b508-give-cta:hover {
  filter: brightness(1.04);
  transform: translateY(-1px);
}

/* Login-Gated Hop-Link Panel (Shared Across Bibles & Featured Church Need) */
.b508-share-box {
  margin-top: 14px;
  padding: 14px;
  border-radius: 14px;
  background: var(--b508-ivory);
  border: 1.5px solid rgba(200, 155, 60, 0.45);
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1 1 auto;
}

.b508-share-box--need {
  margin-top: 2px;
  background: #ffffff;
  border-color: rgba(11, 31, 58, 0.18);
}

.b508-share-box[data-auth-state="unlocked"] {
  background: linear-gradient(180deg, #f3faf6 0%, #faf7f0 100%);
  border-color: rgba(15, 81, 50, 0.36);
}

.b508-gate-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 800;
  color: var(--b508-navy);
  line-height: 1.3;
}

.b508-gate-head svg {
  width: 16px;
  height: 16px;
  color: #9e731e;
  flex-shrink: 0;
}

.b508-gate-copy {
  font-size: 12.5px;
  line-height: 1.5;
  color: #374151;
  margin: 0;
}

.b508-gate-copy code {
  background: rgba(11, 31, 58, 0.08);
  color: var(--b508-navy);
  padding: 1px 5px;
  border-radius: 5px;
  font-weight: 700;
  font-size: 11.5px;
}

.b508-gate-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: auto;
}

.b508-gold-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  flex: 1 1 180px;
  min-height: 42px;
  padding: 9px 14px;
  border-radius: 10px;
  border: 1px solid #b5882c;
  background: linear-gradient(180deg, #deb456 0%, var(--b508-gold) 100%);
  color: var(--b508-navy-deep);
  font-family: 'Figtree', sans-serif;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 6px 14px rgba(200, 155, 60, 0.3);
  transition: transform 0.16s ease, filter 0.16s ease;
}

.b508-gold-btn:hover {
  filter: brightness(1.04);
  transform: translateY(-1px);
}

.b508-modal-root .b508-gold-btn {
  flex: 0 0 auto;
  width: 100%;
  min-height: 48px;
  font-size: 14.5px;
}

.b508-create-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 4px 6px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--b508-navy);
  text-decoration: underline;
  text-underline-offset: 3px;
  white-space: nowrap;
}

.b508-create-link:hover {
  color: #8f691b;
}

/* Unlocked Authenticated Member State */
.b508-encoded-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--b508-emerald);
  color: #ffffff;
  font-size: 11.5px;
  font-weight: 700;
  border: 1px solid rgba(200, 155, 60, 0.7);
}

.b508-encoded-url-row {
  display: flex;
  gap: 6px;
  align-items: stretch;
}

.b508-encoded-input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 8px 10px;
  border-radius: 9px;
  border: 1px solid rgba(11, 31, 58, 0.22);
  background: #ffffff;
  color: var(--b508-navy);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11.5px;
  font-weight: 600;
}

.b508-copy-btn {
  flex: 0 0 auto;
  padding: 8px 11px;
  border-radius: 9px;
  border: 1px solid var(--b508-navy);
  background: var(--b508-navy);
  color: #faf7f0;
  font-family: 'Figtree', sans-serif;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.b508-copy-btn:hover {
  background: var(--b508-navy-mid);
}

.b508-share-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.b508-sbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 7px 9px;
  border-radius: 8px;
  border: 1px solid rgba(11, 31, 58, 0.16);
  background: #ffffff;
  color: var(--b508-navy);
  font-family: 'Figtree', sans-serif;
  font-size: 11.5px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.b508-sbtn:hover {
  background: var(--b508-gold-soft);
  border-color: var(--b508-gold);
}

.b508-sbtn--qr {
  background: linear-gradient(180deg, #deb456 0%, var(--b508-gold) 100%);
  border-color: #b5882c;
  color: var(--b508-navy-deep);
  font-weight: 800;
  flex: 1 1 100%;
  min-height: 38px;
}

.b508-sbtn--qr:hover {
  background: linear-gradient(180deg, #e7c068 0%, #cfa13f 100%);
}

/* =========================================================================
   MODALS + AUTHENTIC 3D FLIP-PAGE WARM BROWN PARCHMENT BIBLE READER
   ========================================================================= */
.b508-modal-root {
  position: fixed;
  inset: 0;
  z-index: 9990;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  background: rgba(14, 9, 6, 0.84);
  backdrop-filter: blur(7px);
  font-family: 'Figtree', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.b508-modal-root[hidden] {
  display: none;
}

.b508-dialog {
  width: 100%;
  max-width: 1140px;
  max-height: 94vh;
  background: #1f140d;
  color: #faf7f0;
  border-radius: 22px;
  border: 1.5px solid rgba(200, 155, 60, 0.62);
  box-shadow: 0 32px 96px rgba(0, 0, 0, 0.65);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.b508-dialog--compact {
  max-width: 470px;
  background: #faf7f0;
  color: #1a2433;
}

.b508-dialog-top {
  background: linear-gradient(90deg, #0b1f3a 0%, #142c4f 50%, #0b1f3a 100%);
  color: #faf7f0;
  padding: 13px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 2px solid #c89b3c;
}

.b508-dialog-heading {
  margin: 0;
  font-family: 'Cormorant', Georgia, serif;
  font-size: 25px;
  font-weight: 700;
  line-height: 1.15;
  color: #faf7f0;
}

.b508-dialog-close {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(250, 247, 240, 0.3);
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}

.b508-dialog-close:hover {
  background: rgba(200, 155, 60, 0.35);
}

/* Reader Toolbar */
.b508-reader-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 11px 18px;
  background: #2b1a10;
  border-bottom: 1px solid rgba(200, 155, 60, 0.36);
}

.b508-ed-switch {
  display: inline-flex;
  border-radius: 9px;
  overflow: hidden;
  border: 1px solid rgba(200, 155, 60, 0.55);
  background: #1a0f09;
}

.b508-ed-btn {
  padding: 7px 12px;
  border: 0;
  background: transparent;
  color: #e6d3ad;
  font-family: 'Figtree', sans-serif;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
}

.b508-ed-btn.is-active {
  background: linear-gradient(180deg, #deb456 0%, #c89b3c 100%);
  color: #160c06;
}

.b508-select {
  height: 36px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid rgba(200, 155, 60, 0.45);
  background: #fdf8ec;
  color: #24150a;
  font-family: 'Figtree', sans-serif;
  font-size: 13px;
  font-weight: 700;
}

.b508-search-input {
  flex: 1 1 160px;
  min-width: 130px;
  height: 36px;
  padding: 0 11px;
  border-radius: 8px;
  border: 1px solid rgba(200, 155, 60, 0.45);
  background: #fdf8ec;
  color: #24150a;
  font-family: 'Figtree', sans-serif;
  font-size: 13px;
}

.b508-tool-group {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.b508-tool-btn {
  height: 34px;
  padding: 0 9px;
  border-radius: 8px;
  border: 1px solid rgba(200, 155, 60, 0.42);
  background: rgba(255, 248, 230, 0.12);
  color: #f3e4c2;
  font-family: 'Figtree', sans-serif;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.b508-tool-btn.is-active {
  background: #c89b3c;
  color: #160c06;
  border-color: #e0b85a;
}

/* Open-Book 3D Parchment Stage */
.b508-book-viewport {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 20px 22px 18px;
  background: radial-gradient(ellipse at 50% 35%, #3d2415 0%, #24140b 70%, #140b06 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: 460px;
}

.b508-search-results {
  width: 100%;
  max-width: 1020px;
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #f5e9cb;
  color: #2a1a0c;
  border: 1.5px solid #c89b3c;
}

.b508-search-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 7px 10px;
  margin-top: 6px;
  border-radius: 8px;
  border: 1px solid rgba(112, 74, 30, 0.25);
  background: rgba(255, 252, 244, 0.9);
  color: #2a1a0c;
  cursor: pointer;
  font-size: 13px;
  line-height: 1.4;
}

/* Outer Heirloom Leather Binding + Gilded Page Stacks */
.b508-leather-cover {
  position: relative;
  width: 100%;
  max-width: 1020px;
  padding: 14px 18px;
  border-radius: 14px;
  background: linear-gradient(155deg, #3c2214 0%, #26140b 52%, #1a0d07 100%);
  border: 2px solid #9c722c;
  box-shadow:
    0 28px 65px rgba(0, 0, 0, 0.62),
    inset 0 0 0 2px rgba(224, 184, 90, 0.35),
    inset 0 0 24px rgba(0, 0, 0, 0.55);
  perspective: 2200px;
}

.b508-page-stack {
  position: relative;
  padding: 0 9px;
  border-radius: 6px;
  background:
    repeating-linear-gradient(
      90deg,
      #d8be88 0px,
      #b99456 1.5px,
      #f0dfba 3px
    );
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.42);
}

/* Open 2-Page Spread */
.b508-spread {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-height: 500px;
  border-radius: 5px;
  overflow: hidden;
  transform-style: preserve-3d;
}

/* Crimson & Gold Satin Bookmark Ribbon */
.b508-ribbon {
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 22px;
  height: 120px;
  z-index: 9;
  pointer-events: none;
  background: linear-gradient(90deg, #63111c 0%, #991b2b 45%, #c89b3c 50%, #991b2b 55%, #5c0f19 100%);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 84%, 0 100%);
  filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.4));
}

/* Individual Parchment Page (Default Warm Antique Brown Parchment) */
.b508-leaf {
  position: relative;
  padding: 22px 26px 24px;
  display: flex;
  flex-direction: column;
  min-height: 500px;
  color: #2a1a0c;
  background-color: #ead5a8;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='0.065'/%3E%3C/svg%3E"),
    radial-gradient(ellipse at 50% 45%, #f4e6c5 0%, #e7cf9d 64%, #cfad71 100%);
  user-select: text;
}

.b508-leaf--left {
  border-right: 1px solid rgba(92, 57, 22, 0.26);
  box-shadow:
    inset -26px 0 34px -16px rgba(62, 34, 14, 0.44),
    inset 10px 0 16px -10px rgba(112, 74, 30, 0.35);
}

.b508-leaf--right {
  border-left: 1px solid rgba(255, 248, 228, 0.35);
  box-shadow:
    inset 26px 0 34px -16px rgba(62, 34, 14, 0.44),
    inset -10px 0 16px -10px rgba(112, 74, 30, 0.35);
}

/* Theme: Warm Ivory */
.b508-book-viewport[data-theme="ivory"] .b508-leaf {
  color: #1c2430;
  background-color: #faf7f0;
  background-image: radial-gradient(ellipse at 50% 45%, #fffefb 0%, #faf6ec 75%, #eee6d5 100%);
}

/* Theme: Candlelight Night */
.b508-book-viewport[data-theme="night"] .b508-leaf {
  color: #f0e3c6;
  background-color: #141a26;
  background-image: radial-gradient(ellipse at 50% 45%, #1b2333 0%, #121824 72%, #0c101a 100%);
}

.b508-book-viewport[data-theme="night"] .b508-leaf--left {
  box-shadow: inset -28px 0 36px -14px rgba(0, 0, 0, 0.72);
}

.b508-book-viewport[data-theme="night"] .b508-leaf--right {
  box-shadow: inset 28px 0 36px -14px rgba(0, 0, 0, 0.72);
}

/* Classical Double-Ruled Interior Page Frame */
.b508-leaf-frame {
  flex: 1 1 auto;
  border: 1px solid rgba(154, 112, 42, 0.55);
  outline: 1px solid rgba(154, 112, 42, 0.24);
  outline-offset: -4px;
  padding: 16px 20px 14px;
  display: flex;
  flex-direction: column;
  position: relative;
}

.b508-running-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-family: 'Figtree', sans-serif;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: #7a561e;
  border-bottom: 1px solid rgba(154, 112, 42, 0.35);
  padding-bottom: 7px;
  margin-bottom: 12px;
}

.b508-book-viewport[data-theme="night"] .b508-running-head {
  color: #dfb962;
}

.b508-chapter-title {
  font-family: 'Cormorant', Georgia, serif;
  font-size: 30px;
  font-weight: 700;
  text-align: center;
  margin: 0 0 12px;
  color: inherit;
  letter-spacing: 0.01em;
}

.b508-verses {
  font-family: 'Cormorant', Georgia, serif;
  font-size: var(--b508-fs, 19.5px);
  line-height: 1.66;
  font-weight: 500;
  flex: 1 1 auto;
}

.b508-verse-row {
  margin: 0 0 8px;
  padding: 2px 5px;
  border-radius: 6px;
}

.b508-verse-row.is-hi {
  background: rgba(200, 155, 60, 0.28);
}

.b508-vnum {
  display: inline-block;
  font-family: 'Figtree', sans-serif;
  font-size: 0.64em;
  font-weight: 800;
  color: #8b2318;
  vertical-align: super;
  margin-right: 4px;
}

.b508-book-viewport[data-theme="night"] .b508-vnum {
  color: #e6bf64;
}

/* Illuminated Ornamental Drop-Cap on Chapter Opening Verse */
.b508-dropcap {
  float: left;
  font-family: 'Cormorant', Georgia, serif;
  font-size: 2.55em;
  line-height: 0.84;
  font-weight: 700;
  color: #7f1d1d;
  background: linear-gradient(145deg, #f8ecd0 0%, #e4c686 100%);
  border: 1.5px solid #a87b22;
  border-radius: 6px;
  padding: 5px 9px 4px;
  margin: 3px 9px 2px 0;
  box-shadow: inset 0 0 0 2px rgba(255, 250, 235, 0.55);
}

.b508-book-viewport[data-theme="night"] .b508-dropcap {
  color: #f4d88c;
  background: linear-gradient(145deg, #2b1d12 0%, #1c120b 100%);
  border-color: #c89b3c;
}

.b508-folio {
  margin-top: auto;
  padding-top: 10px;
  text-align: center;
  font-family: 'Cormorant', Georgia, serif;
  font-size: 13.5px;
  font-weight: 700;
  font-style: italic;
  color: #7a561e;
}

.b508-book-viewport[data-theme="night"] .b508-folio {
  color: #d8b566;
}

/* Interactive Corner Page-Flip Triggers */
.b508-corner-btn {
  position: absolute;
  bottom: 0;
  width: 54px;
  height: 54px;
  border: 0;
  background: transparent;
  cursor: pointer;
  z-index: 6;
  padding: 0;
}

.b508-corner-btn--prev {
  left: 0;
}

.b508-corner-btn--next {
  right: 0;
}

.b508-corner-btn--next::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0 0 28px 28px;
  border-color: transparent transparent rgba(122, 82, 32, 0.34) transparent;
  transition: border-width 0.2s ease, border-color 0.2s ease;
}

.b508-corner-btn--next:hover::after {
  border-width: 0 0 42px 42px;
  border-color: transparent transparent rgba(168, 123, 34, 0.56) transparent;
}

.b508-corner-btn--prev::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 28px 0 0 28px;
  border-color: transparent transparent transparent rgba(122, 82, 32, 0.34);
  transition: border-width 0.2s ease, border-color 0.2s ease;
}

.b508-corner-btn--prev:hover::after {
  border-width: 42px 0 0 42px;
  border-color: transparent transparent transparent rgba(168, 123, 34, 0.56);
}

/* 3D Animated Turning Leaf Overlay */
.b508-flip-leaf {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50%;
  z-index: 12;
  pointer-events: none;
  backface-visibility: hidden;
  background: linear-gradient(90deg, #d7bc85 0%, #f1e1ba 45%, #e4ca95 100%);
  box-shadow: 0 0 38px rgba(24, 12, 4, 0.55);
}

.b508-flip-leaf--next {
  right: 0;
  transform-origin: left center;
  animation: b508FlipForward 0.46s cubic-bezier(0.32, 0.08, 0.24, 1) forwards;
}

.b508-flip-leaf--prev {
  left: 0;
  transform-origin: right center;
  animation: b508FlipBackward 0.46s cubic-bezier(0.32, 0.08, 0.24, 1) forwards;
}

@keyframes b508FlipForward {
  0% {
    transform: rotateY(0deg);
    opacity: 0.95;
    box-shadow: -8px 0 24px rgba(0, 0, 0, 0.24);
  }
  50% {
    transform: rotateY(-90deg);
    opacity: 0.98;
    box-shadow: -28px 0 44px rgba(0, 0, 0, 0.55);
  }
  100% {
    transform: rotateY(-180deg);
    opacity: 0;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  }
}

@keyframes b508FlipBackward {
  0% {
    transform: rotateY(0deg);
    opacity: 0.95;
    box-shadow: 8px 0 24px rgba(0, 0, 0, 0.24);
  }
  50% {
    transform: rotateY(90deg);
    opacity: 0.98;
    box-shadow: 28px 0 44px rgba(0, 0, 0, 0.55);
  }
  100% {
    transform: rotateY(180deg);
    opacity: 0;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  }
}

.b508-reader-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 18px;
  background: #2b1a10;
  border-top: 1px solid rgba(200, 155, 60, 0.4);
}

.b508-nav-btn {
  padding: 8px 15px;
  border-radius: 9px;
  border: 1px solid rgba(200, 155, 60, 0.48);
  background: #fdf8ec;
  color: #1e120a;
  font-family: 'Figtree', sans-serif;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.b508-nav-btn:hover:not(:disabled) {
  background: #f6ebd1;
}

.b508-nav-btn:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.b508-page-indicator {
  font-size: 13px;
  font-weight: 700;
  color: #f4d88c;
  padding: 0 6px;
}

.b508-share-ch-btn {
  padding: 9px 17px;
  border-radius: 9px;
  border: 1px solid #b5882c;
  background: linear-gradient(180deg, #deb456 0%, #c89b3c 100%);
  color: #071427;
  font-family: 'Figtree', sans-serif;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

/* Inline Sign-In Modal & QR Modal body */
.b508-form-body {
  padding: 22px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.b508-field label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #0b1f3a;
  margin-bottom: 5px;
}

.b508-field input {
  width: 100%;
  height: 44px;
  padding: 0 13px;
  border-radius: 10px;
  border: 1.5px solid rgba(11, 31, 58, 0.22);
  background: #ffffff;
  color: #111827;
  font-family: 'Figtree', sans-serif;
  font-size: 15px;
}

.b508-field input:focus {
  outline: 2px solid #c89b3c;
  border-color: #c89b3c;
}

.b508-form-msg {
  padding: 10px 13px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 600;
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.b508-form-msg[hidden] {
  display: none;
}

.b508-qr-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 22px 24px 26px;
  text-align: center;
}

.b508-qr-canvas {
  display: block;
  width: 280px;
  max-width: 100%;
  height: auto;
  border-radius: 14px;
  border: 2px solid #c89b3c;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(11, 31, 58, 0.16);
}

.b508-qr-url {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  color: #0b1f3a;
  background: #f3ede0;
  padding: 8px 12px;
  border-radius: 8px;
  word-break: break-all;
  max-width: 100%;
}

.b508-toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  z-index: 10010;
  background: #0b1f3a;
  color: #faf7f0;
  border: 1.5px solid #c89b3c;
  border-radius: 999px;
  padding: 11px 20px;
  font-family: 'Figtree', sans-serif;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.35);
}

.b508-toast[hidden] {
  display: none;
}

@media (max-width: 979px) {
  .b508-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

@media (max-width: 820px) {
  .b508-showcase {
    padding: 16px 10px 6px;
  }
  .b508-shell {
    padding: 20px 14px 18px;
    border-radius: 18px;
  }
  .b508-cover-img {
    width: 174px;
  }
  .b508-body,
  .b508-give-body {
    padding: 16px 14px 18px;
  }
  .b508-docs-grid {
    grid-template-columns: 1fr;
  }
  .b508-encoded-url-row {
    flex-direction: column;
  }
  /* Single-page parchment flipbook on narrow mobile */
  .b508-book-viewport {
    padding: 12px 10px;
  }
  .b508-leather-cover {
    padding: 8px 10px;
  }
  .b508-spread {
    grid-template-columns: 1fr;
    min-height: 410px;
  }
  .b508-ribbon {
    display: none;
  }
  .b508-leaf--right {
    display: none;
  }
  .b508-leaf {
    padding: 14px 14px 18px;
    min-height: 410px;
  }
  .b508-leaf-frame {
    padding: 12px 13px;
  }
  .b508-flip-leaf {
    width: 100%;
  }
}

/* =========================================================================
   REGIONAL BIBLE SYNC BAR + DYNAMIC 3D LEATHER COVER PLATES
   ========================================================================= */
.b508-sync-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 auto 16px;
  padding: 9px 18px;
  max-width: 780px;
  border-radius: 999px;
  background: linear-gradient(90deg, #0b1f3a 0%, #15345c 50%, #0b1f3a 100%);
  border: 1.5px solid rgba(200, 155, 60, 0.72);
  color: #faf7f0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.015em;
  box-shadow: 0 8px 22px rgba(11, 31, 58, 0.16);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.b508-sync-bar.is-pulse {
  animation: b508SyncPulse 0.65s ease;
}

@keyframes b508SyncPulse {
  0% { transform: scale(0.985); box-shadow: 0 0 0 0 rgba(212, 168, 75, 0.55); }
  50% { transform: scale(1.015); box-shadow: 0 0 0 10px rgba(212, 168, 75, 0); }
  100% { transform: scale(1); box-shadow: 0 8px 22px rgba(11, 31, 58, 0.16); }
}

.b508-sync-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.24);
  flex-shrink: 0;
}

.b508-sync-bar strong {
  color: #f4d88c;
}

.b508-card.is-syncing {
  animation: b508CardSwap 0.34s ease;
}

@keyframes b508CardSwap {
  0% { opacity: 0.55; transform: translateY(4px); }
  100% { opacity: 1; transform: translateY(0); }
}

.b508-stage--ny {
  background: radial-gradient(circle at 50% 42%, #134e3a 0%, #092c20 70%, #051b13 100%);
}

.b508-stage--tum {
  background: radial-gradient(circle at 50% 42%, #1d3f72 0%, #0d2244 70%, #071329 100%);
}

.b508-stage--fr {
  background: radial-gradient(circle at 50% 42%, #4a1e38 0%, #2a0f20 70%, #190712 100%);
}

/* Side Column Stack & Height-Aware Ministry Training Fill Cards */
.b508-side-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.b508-side-fill[hidden] {
  display: none !important;
}

.b508-side-fill {
  background: linear-gradient(170deg, #0b1f3a 0%, #132d52 100%);
  border: 1.5px solid rgba(200, 155, 60, 0.58);
  border-radius: 18px;
  overflow: hidden;
  color: #faf7f0;
  box-shadow: 0 14px 34px rgba(11, 31, 58, 0.16);
  display: flex;
  flex-direction: column;
  animation: b508CardSwap 0.28s ease;
}

.b508-train-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(200, 155, 60, 0.35);
  background: rgba(7, 20, 39, 0.55);
}

.b508-train-badge {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #f4d88c;
}

.b508-train-dur {
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(200, 155, 60, 0.22);
  border: 1px solid rgba(244, 216, 140, 0.5);
  color: #f6df9d;
}

.b508-train-video-wrap {
  position: relative;
  background: #060f1d;
  aspect-ratio: 16 / 9;
  width: 100%;
  overflow: hidden;
}

.b508-train-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #060f1d;
}

.b508-train-body {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.b508-train-title {
  margin: 0;
  font-family: 'Cormorant', Georgia, serif;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.15;
  color: #ffffff;
}

.b508-train-sub {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: #dbe4f0;
}

.b508-train-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 9px;
  border: 1px solid rgba(244, 216, 140, 0.55);
  background: rgba(255, 255, 255, 0.08);
  color: #f4d88c;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.b508-train-more:hover {
  background: linear-gradient(180deg, #e2ba5f 0%, #c89b3c 100%);
  color: #071427;
}

.b508-rgm-gift-box {
  padding: 10px 12px;
  border-radius: 11px;
  background: linear-gradient(135deg, #f3faf6 0%, #eef6ff 100%);
  border: 1px solid rgba(15, 81, 50, 0.3);
  font-size: 12px;
  line-height: 1.48;
  color: #14263d;
}

.b508-rgm-gift-box strong {
  color: #0f5132;
}

/* =========================================================================
   CENTER COLUMN MULTI-MINISTRY OUTREACH & ALONGSIDE SLIDER
   ========================================================================= */
.b508-slider-top {
  background: #071427;
  padding: 10px 14px;
  border-bottom: 1.5px solid rgba(200, 155, 60, 0.55);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.b508-slider-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.b508-slider-controls-l {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.b508-slider-arrow {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid rgba(200, 155, 60, 0.55);
  background: rgba(255, 255, 255, 0.08);
  color: #f4d88c;
  font-size: 18px;
  line-height: 1;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background 0.15s ease, transform 0.15s ease;
}

.b508-slider-arrow:hover {
  background: rgba(200, 155, 60, 0.28);
  transform: translateY(-1px);
}

.b508-slider-counter {
  font-size: 12px;
  font-weight: 800;
  color: #faf7f0;
  letter-spacing: 0.04em;
  min-width: 38px;
  text-align: center;
}

.b508-slider-status-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(244, 216, 140, 0.52);
  background: rgba(255, 255, 255, 0.08);
  color: #f4d88c;
  font-family: 'Figtree', sans-serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.03em;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.b508-slider-status-btn:hover {
  background: rgba(200, 155, 60, 0.25);
  transform: translateY(-1px);
}

.b508-slider-status-btn.is-paused {
  background: linear-gradient(180deg, #e2ba5f 0%, #c89b3c 100%);
  border-color: #f6df9d;
  color: #071427;
}

.b508-slider-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.b508-slider-tab {
  padding: 6px 6px;
  border-radius: 8px;
  border: 1px solid rgba(250, 247, 240, 0.2);
  background: rgba(255, 255, 255, 0.06);
  color: #dbe4f0;
  font-family: 'Figtree', sans-serif;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.b508-slider-tab:hover {
  background: rgba(200, 155, 60, 0.22);
  color: #ffffff;
}

.b508-slider-tab.is-active {
  background: linear-gradient(180deg, #e2ba5f 0%, #c89b3c 100%);
  border-color: #f4d88c;
  color: #071427;
  font-weight: 800;
}

.b508-slide-panel {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  animation: b508SlideIn 0.32s ease;
}

@keyframes b508SlideIn {
  from { opacity: 0.35; transform: translateX(8px); }
  to { opacity: 1; transform: translateX(0); }
}

.b508-pin-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.b508-pin-group .b508-give-pin {
  margin-bottom: 0;
}

/* Inline Beyond Belief Radio Spot Player */
.b508-radio-inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 11px;
  border-radius: 11px;
  background: linear-gradient(135deg, #0b1f3a 0%, #153159 100%);
  border: 1px solid rgba(200, 155, 60, 0.58);
  color: #faf7f0;
}

.b508-radio-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 7px 12px;
  border-radius: 8px;
  border: 1px solid #f4d88c;
  background: linear-gradient(180deg, #e2ba5f 0%, #c89b3c 100%);
  color: #071427;
  font-family: 'Figtree', sans-serif;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: transform 0.14s ease, filter 0.14s ease;
}

.b508-radio-btn:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.b508-radio-btn.is-playing {
  background: linear-gradient(180deg, #4ade80 0%, #16a34a 100%);
  border-color: #bbf7d0;
  color: #052e16;
}

.b508-radio-meta {
  min-width: 0;
  flex: 1 1 auto;
}

.b508-radio-meta strong {
  display: block;
  font-size: 11.5px;
  font-weight: 800;
  color: #f4d88c;
  line-height: 1.2;
}

.b508-radio-meta span {
  display: block;
  font-size: 10.5px;
  color: #dbe4f0;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Slide 3: Partner Ministries Building Alongside */
.b508-partner-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.b508-partner-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 11px;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid rgba(11, 31, 58, 0.14);
  text-decoration: none;
  color: var(--b508-navy);
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.b508-partner-item:hover {
  border-color: var(--b508-gold);
  background: #fffaf0;
  transform: translateY(-1px);
}

.b508-partner-l {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.b508-partner-num {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: var(--b508-navy);
  color: #f4d88c;
  border: 1px solid rgba(200, 155, 60, 0.65);
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.b508-partner-info {
  min-width: 0;
}

.b508-partner-info strong {
  display: block;
  font-size: 12.5px;
  font-weight: 800;
  color: var(--b508-navy);
  line-height: 1.2;
}

.b508-partner-info small {
  display: block;
  font-size: 10.5px;
  font-weight: 600;
  color: #5b697c;
}

.b508-partner-go {
  font-size: 12px;
  font-weight: 800;
  color: #8f691b;
  white-space: nowrap;
}

.b508-alongside-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.b508-alongside-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 10px;
  border-radius: 10px;
  border: 1.5px solid var(--b508-navy);
  background: #ffffff;
  color: var(--b508-navy);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  text-align: center;
  transition: background 0.15s ease, color 0.15s ease;
}

.b508-alongside-btn:hover {
  background: var(--b508-navy);
  color: #faf7f0;
}

/* Regional Parallel Mode Banner Inside 3D Parchment Reader */
.b508-region-banner {
  width: 100%;
  max-width: 1020px;
  margin-bottom: 12px;
  padding: 10px 14px;
  border-radius: 11px;
  background: linear-gradient(90deg, rgba(11, 31, 58, 0.94) 0%, rgba(22, 50, 89, 0.94) 100%);
  border: 1.5px solid #c89b3c;
  color: #faf7f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 12.5px;
  line-height: 1.4;
}

.b508-region-banner strong {
  color: #f4d88c;
}

.b508-region-switch {
  display: inline-flex;
  gap: 6px;
  flex-wrap: wrap;
}

.b508-region-pill {
  padding: 4px 9px;
  border-radius: 7px;
  border: 1px solid rgba(244, 216, 140, 0.55);
  background: rgba(255, 255, 255, 0.1);
  color: #faf7f0;
  font-family: 'Figtree', sans-serif;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.b508-region-pill:hover {
  background: #c89b3c;
  color: #071427;
}

@media (max-width: 600px) {
  .b508-slider-tabs {
    grid-template-columns: 1fr;
  }
  .b508-radio-inline {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }
  .b508-alongside-actions {
    grid-template-columns: 1fr;
  }
}
