/* Reading surfaces only: soft light, wide paragraphs and inline verse markers. */
html:has(body.bible-v2),
html:has(body[data-page="read"]),
html:has(body[data-page="listen"].combined-mode) {
  --b27-reader-base: #f4f6f0;
  --b27-reader-chrome: #f4f6f0;
  --b27-reader-ink: #171d1a;
  --b27-reader-number: #77817a;
  --b27-reader-ambient:
    radial-gradient(ellipse at 5% 8%, rgba(218,232,219,.62), transparent 62%),
    radial-gradient(ellipse at 95% 80%, rgba(239,232,216,.46), transparent 68%),
    linear-gradient(160deg, #f6f8f3, #f0f4ee 65%, #f5f5ef);
  background: var(--b27-reader-base) !important;
}
html[data-theme="dark"]:has(body.bible-v2),
html[data-theme="dark"]:has(body[data-page="read"]),
html[data-theme="dark"]:has(body[data-page="listen"].combined-mode) {
  --b27-reader-base: #191c1b;
  --b27-reader-chrome: #191c1b;
  --b27-reader-ink: #eef1ec;
  --b27-reader-number: #9aa49d;
  --b27-reader-ambient:
    radial-gradient(ellipse at 5% 8%, rgba(112,122,114,.10), transparent 62%),
    radial-gradient(ellipse at 95% 80%, rgba(122,112,100,.06), transparent 68%),
    linear-gradient(160deg, #1b1e1d, #171a19 65%, #1c1e1d);
}
html:has(body.bible-v2)::before,
html:has(body[data-page="read"])::before,
html:has(body[data-page="listen"].combined-mode)::before {
  content: "";
  position: fixed;
  z-index: 0;
  pointer-events: none;
  left: 0;
  right: 0;
  top: calc(-24px - env(safe-area-inset-top, 0px));
  bottom: calc(-24px - env(safe-area-inset-bottom, 0px));
  background: var(--b27-reader-ambient) !important;
  opacity: 1 !important;
  filter: none !important;
  box-shadow: none !important;
}
html[data-theme] :is(body.bible-v2, body[data-page="read"], body[data-page="listen"].combined-mode) {
  --bg: var(--b27-reader-base);
  --bg2: var(--b27-reader-base);
  --rp-ink: var(--b27-reader-ink);
  background: transparent !important;
}
html[data-theme] body[data-page="listen"].combined-mode::before,
html[data-theme] body[data-page="listen"].combined-mode::after {
  display: none !important;
}
html[data-theme] body.bible-v2 { --side: 16px; }
html[data-theme] body[data-page="read"] .app {
  padding-left: 16px !important;
  padding-right: 16px !important;
}
html[data-theme] body[data-page="read"] .top {
  margin-left: -16px !important;
  margin-right: -16px !important;
  padding-left: 16px !important;
  padding-right: 16px !important;
}
html[data-theme] :is(body.bible-v2, body[data-page="read"]) :is(.scripture-v2, .scripture),
html[data-theme] body[data-page="listen"] .combined-text {
  max-width: 100% !important;
  padding: 0 !important;
  line-height: 1.38 !important;
  letter-spacing: 0 !important;
  color: var(--b27-reader-ink, inherit) !important;
  text-align: start;
  text-shadow: none !important;
}
html[data-theme] :is(body.bible-v2, body[data-page="read"]) :is(.scripture-v2, .scripture) .verse,
html[data-theme] body[data-page="listen"] .combined-text p {
  display: block !important;
  margin: 0 0 1.15em !important;
  padding: 0 !important;
  text-indent: 0;
}
html[data-theme] :is(body.bible-v2, body[data-page="read"]) :is(.scripture-v2, .scripture) .verse-number,
html[data-theme] body[data-page="listen"] .combined-number {
  display: inline !important;
  position: static !important;
  width: auto !important;
  min-width: 0 !important;
  height: auto !important;
  margin: 0 .3em 0 0 !important;
  padding: 0 !important;
  vertical-align: baseline;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  opacity: 1 !important;
  color: var(--b27-reader-number, #77817a) !important;
  font: 400 .6em/1 Montserrat, system-ui, sans-serif !important;
  font-variant-numeric: tabular-nums;
}
html[data-theme] :is(body.bible-v2, body[data-page="read"]) :is(.scripture-v2, .scripture) .verse-number::after,
html[data-theme] body[data-page="listen"] .combined-number::after { content: "."; }
html[data-theme] :is(body.bible-v2, body[data-page="read"]) :is(.scripture-v2, .scripture) .verse-text {
  display: inline !important;
  color: inherit;
}
html[data-theme] body[data-page="listen"].combined-mode .combined-reading {
  margin-left: -14px;
  margin-right: -14px;
  padding-left: 0;
  padding-right: 0;
}
@media (min-width: 700px) {
  html[data-theme] body.bible-v2 { --side: 28px; }
  html[data-theme] body[data-page="read"] .app {
    padding-left: 28px !important;
    padding-right: 28px !important;
  }
  html[data-theme] body[data-page="read"] .top {
    margin-left: -28px !important;
    margin-right: -28px !important;
    padding-left: 28px !important;
    padding-right: 28px !important;
  }
}
