/* Bible chapter reader — from Kalameh Web Bible[ EN].html reader-section. */

.section--bible .reader-section {
  padding: 56px 0 80px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  --r-fs: 1;
  --r-margin: 0px;
}
.section--bible .reader-section .reader-head {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin: 0 auto 32px; max-width: 880px; padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.section--bible .reader-section .reader-head .ref-btn {
  display: inline-flex; align-items: baseline; gap: 12px;
  padding: 0; border: none; background: transparent;
  font-family: var(--serif-fa); font-size: 32px; font-weight: 600; color: var(--ink);
  cursor: pointer; letter-spacing: -0.6px; line-height: 1.2; transition: color 0.15s;
}
[dir="ltr"] .section--bible .reader-section .reader-head .ref-btn { font-family: var(--serif); }
.section--bible .reader-section .reader-head .ref-btn:hover { color: var(--bible); }
.section--bible .reader-section .reader-head .ref-btn .chev { color: var(--ink-3); }
.section--bible .reader-section .reader-head .nav { display: inline-flex; gap: 6px; align-items: center; }
.section--bible .reader-section .reader-head .nav button,
.section--bible .reader-section .reader-head .ref-group .nav-btn {
  width: 38px; height: 38px; border-radius: 999px;
  border: 1px solid var(--line); background: #fff; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--ink-2); font-family: inherit; text-decoration: none;
}
.section--bible .reader-section .reader-head .nav button:hover,
.section--bible .reader-section .reader-head .ref-group .nav-btn:hover { border-color: var(--bible); color: var(--bible); }
[dir="rtl"] .section--bible .reader-section .reader-head .ref-group .nav-btn svg {
  transform: scaleX(-1);
}
.section--bible .reader-section .reader-head .nav-btn.is-disabled {
  opacity: 0.35; pointer-events: none; cursor: default;
}
.section--bible .reader-section .reader-head-main {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex: 1; min-width: 0;
}
.section--bible .reader-section .reader-head .ref-group { display: inline-flex; align-items: center; gap: 12px; }
.section--bible .reader-section .search-wrap { position: relative; flex: none; height: 38px; }
.section--bible .reader-section .reader-search {
  position: absolute; top: 0; inset-inline-end: 100%; height: 38px; margin-inline-end: 8px;
  display: inline-flex; align-items: center; gap: 8px;
  width: 0; padding: 0; overflow: hidden; white-space: nowrap;
  background: var(--paper-2); border-radius: 999px; border: 1px solid transparent;
  pointer-events: none; opacity: 0;
  transition: width 280ms cubic-bezier(.4,0,.2,1), padding 280ms cubic-bezier(.4,0,.2,1), opacity 200ms;
}
.section--bible .reader-section .reader-search input {
  flex: 1; border: none; outline: none; background: transparent;
  font-family: inherit; font-size: 14px; color: var(--ink); min-width: 0; padding: 0;
}
.section--bible .reader-section .reader-head.searching .reader-search {
  width: 240px; padding: 0 12px; pointer-events: auto; opacity: 1;
}
.section--bible .reader-section .reader-head.searching #search-btn {
  background: var(--bible); border-color: var(--bible); color: #fff;
}
.section--bible .reader-section .reader-page { padding-inline: var(--r-margin); transition: padding 0.18s ease; }
.section--bible .reader-section .reader-page .passage {
  font-family: var(--serif-fa); font-size: calc(24px * var(--r-fs)); line-height: 2.1;
  color: var(--ink); margin: 0 auto; max-width: calc(880px - var(--r-margin) * 2); letter-spacing: -0.1px;
}
[dir="ltr"] .section--bible .reader-section .reader-page .passage {
  font-family: var(--serif); font-size: calc(19px * var(--r-fs)); line-height: 1.75;
}
.section--bible .reader-section .reader-page sup.vnum {
  font-family: var(--sans); font-size: 0.55em; font-weight: 700;
  color: var(--bible); vertical-align: super;
  margin-inline-end: 6px; margin-inline-start: 4px;
}
.section--bible .reader-section .reader-foot {
  margin: 32px auto 0; max-width: 880px; font-size: 12.5px; color: var(--ink-3);
  padding-top: 20px; border-top: 1px solid var(--line);
}
.section--bible .reader-section.focus {
  position: fixed; inset: 0; z-index: 400; padding: 32px 0 64px; overflow: auto; border-bottom: none;
  background: #fff;
}
.section--bible .reader-section.focus.theme-sepia { background: #F5EEDD; }
.section--bible .reader-section.focus.theme-dark { background: #1F1F1F; }
body.bible-reader-focus {
  overflow: hidden;
}
/* Do not hide body>* — .section--bible is nested under the main canvas, not a body child. */
.section--bible .reader-section.theme-sepia { background: #F5EEDD; }
.section--bible .reader-section.theme-sepia .passage,
.section--bible .reader-section.theme-sepia .reader-foot,
.section--bible .reader-section.theme-sepia .ref-btn { color: #3A2E1F; }
.section--bible .reader-section.theme-dark { background: #1F1F1F; }
.section--bible .reader-section.theme-dark .passage,
.section--bible .reader-section.theme-dark .reader-foot,
.section--bible .reader-section.theme-dark .ref-btn { color: #EAEAEA; }
.section--bible .reader-section .verse {
  cursor: pointer; transition: background 0.12s; border-radius: 3px;
  -webkit-box-decoration-break: clone; box-decoration-break: clone; padding: 2px 0;
}
.section--bible .reader-section .verse:hover { background: rgba(65,167,105,0.06); }
.section--bible .reader-section .verse.selected { background: rgba(65,167,105,0.18); }
.section--bible .reader-section.theme-dark .verse.selected { background: rgba(132,210,154,0.22); }
.section--bible .reader-section.theme-sepia .verse.selected { background: rgba(180,140,60,0.22); }

.section--bible .fs-scrim,
.section--bible .cb-scrim {
  position: fixed; inset: 0; z-index: 250; background: rgba(20,24,30,0.42);
  opacity: 0; pointer-events: none; transition: opacity 0.22s ease;
}
.section--bible .cb-scrim { z-index: 200; }
.section--bible .fs-scrim.open,
.section--bible .cb-scrim.open { opacity: 1; pointer-events: auto; }
.section--bible .fs-sheet,
.section--bible .cb-sheet {
  position: fixed; left: 50%; bottom: 0; transform: translate(-50%, 100%);
  background: #fff; z-index: 251; display: flex; flex-direction: column;
  transition: transform 0.28s cubic-bezier(0.32, 0.72, 0, 1);
  box-shadow: 0 -10px 40px rgba(0,0,0,0.18);
}
.section--bible .cb-sheet {
  z-index: 201; width: min(720px, 100%);
  height: min(86vh, 100dvh - 24px);
  max-height: min(86vh, 100dvh - 24px);
  border-radius: 24px 24px 0 0; overflow: hidden; min-height: 0;
}
.section--bible .fs-sheet {
  width: min(560px, 100%); max-height: min(86vh, 100dvh - 24px);
  border-radius: 18px 18px 0 0; min-height: 0;
}
.section--bible .fs-sheet.open,
.section--bible .cb-sheet.open { transform: translate(-50%, 0); }
.section--bible .fs-sheet .grabber,
.section--bible .cb-sheet .grabber { width: 36px; height: 4px; border-radius: 999px; background: var(--line); margin: 8px auto 0; flex-shrink: 0; }
.section--bible .fs-sheet .head,
.section--bible .cb-sheet .head {
  display: grid; grid-template-columns: 44px 1fr 44px; align-items: center;
  padding: 6px 12px 10px; gap: 6px; flex-shrink: 0;
}
.section--bible .fs-sheet .head .title,
.section--bible .cb-sheet .head .title {
  text-align: center; font-family: var(--serif-fa); font-size: 17px; font-weight: 700; color: var(--ink);
}
[dir="ltr"] .section--bible .fs-sheet .head .title,
[dir="ltr"] .section--bible .cb-sheet .head .title { font-family: var(--serif); }
.section--bible .fs-sheet .head button,
.section--bible .cb-sheet .head button {
  width: 36px; height: 36px; border-radius: 999px; border: none; background: transparent;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center; color: var(--ink-2);
}
.section--bible .cb-sheet .tabs {
  display: flex; gap: 6px; padding: 0 16px 10px; border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.section--bible .cb-sheet .tabs button {
  flex: 1; padding: 8px 10px; border-radius: 999px; border: none; background: transparent;
  font-family: inherit; font-size: 12.5px; font-weight: 600; color: var(--ink-3); cursor: pointer;
}
.section--bible .cb-sheet .tabs button.on { background: var(--paper-2); color: var(--ink); }
.section--bible .fs-sheet .body {
  padding: 14px 18px 24px; flex: 1 1 auto; min-height: 0;
  overflow-y: auto; -webkit-overflow-scrolling: touch; background: var(--paper-2);
}
.section--bible .fs-sheet .row {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 14px 16px; background: #fff; border: 1px solid var(--line); border-radius: 14px; margin-bottom: 10px;
}
.section--bible .fs-sheet .row.col { flex-direction: column; align-items: stretch; gap: 12px; }
.section--bible .fs-sheet .themes { display: flex; gap: 8px; }
.section--bible .fs-sheet .theme {
  flex: 1; height: 52px; border-radius: 12px; border: 1px solid var(--line); cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
}
.section--bible .fs-sheet .theme.on { border: 2px solid var(--bible); }
.section--bible .fs-sheet .theme.light { background: #fff; color: #1A1A1A; }
.section--bible .fs-sheet .theme.sepia { background: #F5EEDD; color: #3A2E1F; }
.section--bible .fs-sheet .theme.dark { background: #1F1F1F; color: #EAEAEA; }
.section--bible .fs-sheet .stepper { display: inline-flex; align-items: center; gap: 8px; direction: ltr !important; }
.section--bible .fs-sheet .stepper button {
  width: 32px; height: 32px; border-radius: 999px; border: none; background: var(--paper-2);
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
}
.section--bible .cb-sheet .body {
  flex: 1 1 auto; min-height: 0; overflow-y: auto;
  -webkit-overflow-scrolling: touch; padding: 14px 16px 24px;
}
.section--bible .cb-sheet .book-row {
  width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 10px;
  border: none; background: transparent; cursor: pointer; font-family: inherit; text-align: start;
  border-radius: 12px;
}
.section--bible .cb-sheet .book-row:hover { background: var(--paper-2); }
.section--bible .cb-sheet .book-row.on,
.section--bible .cb-sheet .book-row.expanded { background: rgba(65,167,105,0.10); }
.section--bible .cb-sheet .book-row .num {
  font-family: var(--serif); font-style: italic; font-size: 12px;
  color: var(--ink-4); min-width: 22px; text-align: center;
}
.section--bible .cb-sheet .book-row .name {
  flex: 1; font-family: var(--serif-fa); font-size: 17px; font-weight: 500; color: var(--ink);
}
[dir="ltr"] .section--bible .cb-sheet .book-row .name { font-family: var(--serif); font-size: 18px; }
.section--bible .cb-sheet .book-row .chev .arr {
  display: inline-flex; color: var(--ink-4); transition: transform 0.2s ease;
}
[dir="rtl"] .section--bible .cb-sheet .book-row .chev .arr svg { transform: scaleX(-1); }
.section--bible .cb-sheet .book-row.expanded .chev .arr { transform: rotate(90deg); color: var(--bible); }
[dir="rtl"] .section--bible .cb-sheet .book-row.expanded .chev .arr { transform: rotate(-90deg); }
.section--bible .cb-sheet .testament-label {
  font-size: 11px; letter-spacing: 1.6px; color: var(--ink-3);
  text-transform: uppercase; font-weight: 700;
  padding: 14px 14px 8px; margin-top: 6px; border-top: 1px solid var(--line);
}
.section--bible .cb-sheet .book-block:first-child .testament-label,
.section--bible .cb-sheet .testament-label:first-child { border-top: none; margin-top: 0; padding-top: 4px; }
.section--bible .cb-sheet .chapter-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 8px;
  padding: 4px 4px 12px;
}
.section--bible .cb-sheet .chapter-grid[hidden] { display: none; }
.section--bible .cb-sheet .chapter-grid a {
  padding: 12px 0; border-radius: 10px; border: 1px solid var(--line); background: #fff;
  text-align: center; font-size: 15px; font-weight: 600; color: var(--ink); text-decoration: none;
}
.section--bible .cb-sheet .chapter-grid a:hover { border-color: var(--bible); color: var(--bible); }
.section--bible .cb-sheet .chapter-grid a.on { background: var(--bible); color: #fff; border-color: var(--bible); }
.section--bible .sel-chip {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--bible-deep, #2E7F4F); color: #fff; border-radius: 999px;
  padding: 10px 8px 10px 18px; display: inline-flex; align-items: center; gap: 12px;
  box-shadow: 0 12px 32px rgba(46,127,79,0.35); cursor: pointer; opacity: 0; pointer-events: none;
  transition: transform 0.22s ease, opacity 0.18s ease; z-index: 90; font-family: inherit; border: none;
}
.section--bible .sel-chip.on { opacity: 1; transform: translateX(-50%) translateY(0); pointer-events: auto; }
.section--bible .sel-chip .clear {
  width: 28px; height: 28px; border-radius: 999px; border: none;
  background: rgba(255,255,255,0.18); color: #fff; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; font-size: 16px; line-height: 1;
}

/* Verse action + app promo sheets */
.section--bible .vs-scrim,
.section--bible .ap-scrim {
  position: fixed; inset: 0; background: rgba(0,0,0,0.45); opacity: 0; pointer-events: none;
  transition: opacity 0.18s; z-index: 320; backdrop-filter: blur(2px);
}
.section--bible .vs-scrim.on,
.section--bible .ap-scrim.on { opacity: 1; pointer-events: auto; }
.section--bible .vs-sheet {
  position: fixed; left: 50%; top: 50%; transform: translate(-50%, -45%);
  width: min(440px, calc(100vw - 32px));
  background: linear-gradient(180deg, #FFFFFF 0%, #FBFAF7 100%);
  border-radius: 22px;
  box-shadow: 0 24px 60px -16px rgba(20,24,30,0.28);
  padding: 22px 20px 16px; opacity: 0; pointer-events: none;
  transition: transform 0.22s cubic-bezier(.2,.8,.2,1), opacity 0.18s; z-index: 321;
}
.section--bible .vs-sheet.on { transform: translate(-50%, -50%); opacity: 1; pointer-events: auto; }
.section--bible .vs-sheet .vs-ref {
  font-family: var(--serif-fa); font-size: 19px; font-weight: 500; color: var(--ink);
  margin: 2px 6px 4px; letter-spacing: -0.3px;
}
[dir="ltr"] .section--bible .vs-sheet .vs-ref { font-family: var(--serif); }
.section--bible .vs-sheet .vs-sub {
  font-size: 11px; font-weight: 600; color: var(--ink-3); margin: 0 6px 16px;
  letter-spacing: 0.6px; text-transform: uppercase;
}
.section--bible .vs-sheet .vs-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.section--bible .vs-sheet .vs-actions button {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; padding: 18px 10px 16px; border-radius: 14px; background: #fff;
  border: 1px solid rgba(20,24,30,0.07); cursor: pointer; font-family: inherit;
  font-size: 13.5px; font-weight: 600; color: var(--ink);
}
.section--bible .vs-sheet .vs-actions button:hover { background: #FCFBF8; transform: translateY(-1px); }
.section--bible .vs-sheet .vs-actions button .icon-wrap {
  width: 36px; height: 36px; border-radius: 10px; background: rgba(124,164,135,0.10);
  display: inline-flex; align-items: center; justify-content: center;
}
.section--bible .vs-sheet .vs-actions button .icon { color: var(--bible); }
.section--bible .vs-sheet .vs-actions button .lock {
  position: absolute; top: 10px; inset-inline-end: 10px; width: 12px; height: 12px; color: var(--ink-3); opacity: 0.7;
}
.section--bible .vs-sheet .vs-actions button.gated { color: var(--ink-2); }
.section--bible .vs-sheet .vs-actions button.gated .icon { color: var(--ink-3); }
.section--bible .vs-sheet .vs-actions button.gated .icon-wrap { background: rgba(20,24,30,0.04); }
.section--bible .vs-sheet .vs-close {
  display: block; width: 100%; margin-top: 14px; padding: 11px; border-radius: 12px;
  background: transparent; border: none; cursor: pointer; font-family: inherit;
  font-size: 13.5px; font-weight: 500; color: var(--ink-3);
}
.section--bible .vs-sheet .vs-close:hover { color: var(--ink); background: rgba(20,24,30,0.04); }

.section--bible .ap-sheet {
  position: fixed; left: 50%; top: 50%; transform: translate(-50%, -45%);
  width: min(440px, calc(100vw - 32px)); background: #fff; border-radius: 20px;
  box-shadow: 0 32px 80px rgba(0,0,0,0.30); padding: 56px 28px 28px; text-align: center;
  opacity: 0; pointer-events: none; transition: transform 0.22s ease, opacity 0.18s ease; z-index: 321;
}
.section--bible .ap-sheet.on { transform: translate(-50%, -50%); opacity: 1; pointer-events: auto; }
.section--bible .ap-sheet .ap-close {
  position: absolute; top: 16px; inset-inline-start: 14px; background: transparent; border: none;
  color: var(--ink-3); cursor: pointer; padding: 6px; line-height: 0;
}
.section--bible .ap-sheet h3 {
  font-family: var(--serif-fa); font-weight: 500; font-size: 22px; color: var(--ink); margin: 0 0 8px;
}
[dir="ltr"] .section--bible .ap-sheet h3 { font-family: var(--serif); }
.section--bible .ap-sheet p { font-size: 14px; line-height: 1.6; color: var(--ink-2); margin: 0 0 14px; }
.section--bible .ap-sheet .ap-feats {
  list-style: none; padding: 0; margin: 0 0 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px;
}
.section--bible .ap-sheet .ap-feats li {
  display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink); line-height: 1.4; text-align: start;
}
.section--bible .ap-sheet .ap-feats svg {
  width: 14px; height: 14px; flex-shrink: 0; color: var(--bible);
  background: rgba(65,167,105,0.14); padding: 3px; border-radius: 999px; box-sizing: content-box;
}
.section--bible .ap-sheet .ap-cta { display: flex; flex-direction: column; gap: 8px; }
.section--bible .ap-sheet .ap-cta .stores { display: flex; gap: 10px; }
.section--bible .ap-sheet .ap-cta .store {
  flex: 1; display: inline-flex; align-items: center; gap: 10px; padding: 12px 14px;
  border-radius: 14px; background: #0A0A0A; color: #fff; font-family: inherit;
  font-weight: 600; font-size: 13px; text-decoration: none; justify-content: center;
}
.section--bible .ap-sheet .ap-cta .store .sm { font-size: 9.5px; opacity: 0.7; display: block; }
.section--bible .ap-sheet .ap-cta .store .lg { font-size: 13.5px; font-weight: 700; display: block; line-height: 1; margin-top: 2px; }
.section--bible .ap-sheet .ap-cta .later {
  padding: 10px; border-radius: 10px; background: transparent; border: none; cursor: pointer;
  font-family: inherit; font-size: 13px; color: var(--ink-3);
}
.section--bible .vs-toast {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: #1C1C1E; color: #fff; padding: 12px 20px; border-radius: 999px;
  font-size: 13.5px; font-weight: 500; box-shadow: 0 12px 32px rgba(0,0,0,0.25);
  opacity: 0; pointer-events: none; transition: opacity 0.18s, transform 0.22s; z-index: 322;
}
.section--bible .vs-toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }

body.bible-reader-focus .section--bible .sel-chip,
body.bible-reader-focus .section--bible .cb-scrim,
body.bible-reader-focus .section--bible .cb-sheet,
body.bible-reader-focus .section--bible .fs-scrim,
body.bible-reader-focus .section--bible .fs-sheet,
body.bible-reader-focus .section--bible .vs-scrim,
body.bible-reader-focus .section--bible .vs-sheet,
body.bible-reader-focus .section--bible .ap-scrim,
body.bible-reader-focus .section--bible .ap-sheet,
body.bible-reader-focus .section--bible .vs-toast {
  /* Keep chrome above the fixed reader while focus mode is on. */
  z-index: 450;
}

@media (max-width: 880px) {
  .section--bible .reader-section .reader-head-main { flex-wrap: wrap; row-gap: 12px; }
  .section--bible .reader-section .reader-head .ref-btn { font-size: 22px; flex-basis: 100%; }
}
@media (max-width: 720px) {
  .section--bible .reader-section .reader-head.searching .reader-search { width: 200px; }
}
