/* Immersive Bible (/bible): a two-panel spread — the words on the left, the story on the right */
.bible-body { background: radial-gradient(120% 90% at 50% 0%, #1b1d24 0%, #0d0e12 60%); min-height: 100vh; }
.reader { max-width: 1280px; margin: 0 auto; padding: 22px 24px 28px; }
.reader-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.reader-top .kicker { margin: 0 0 4px; }
.reader-title { margin: 0; font-family: var(--serif); font-weight: 600; font-size: clamp(24px, 3vw, 34px); color: var(--ink); }
.chapter-pick { height: 40px; max-width: 320px; border-radius: 999px; border: 1.5px solid var(--line); background: #0f1116; color: var(--ink); font: 600 14px var(--sans); padding: 0 14px; }

/* ---------- the spread: reading panel + story panel ---------- */
.book { --ink-page: #1c1e23; --ink-soft: #6b6e76; --ink-unread: #a3a5ab; --accent: #a87b24;
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px; height: clamp(540px, calc(100vh - 290px), 820px); }
.page { position: relative; display: flex; flex-direction: column; min-height: 0; border-radius: 22px; overflow: hidden; }
.page-left { background: #f7f5f0; color: var(--ink-page); padding: 30px 44px 18px; box-shadow: 0 30px 60px rgba(0,0,0,0.35); }
.page-right { background: #15171d; box-shadow: 0 30px 60px rgba(0,0,0,0.45); }
.running-head { flex: none; font: 700 11px var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--accent); padding-bottom: 16px; }

/* reading panel */
.page-scroll { flex: 1; min-height: 0; overflow-y: auto; padding-right: 12px; margin-right: -12px; scrollbar-width: thin; scrollbar-color: #d6d2c8 transparent; scroll-behavior: smooth;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 18px, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(180deg, transparent 0, #000 18px, #000 calc(100% - 40px), transparent); }
.text { font-family: var(--serif); font-size: 20px; line-height: 1.75; color: var(--ink-page); padding: 8px 0 40vh; }
.text .drop { display: none; }
.text .loading, .text .err { font-family: var(--sans); font-size: 15px; color: var(--ink-soft); }
.verse { transition: color .3s ease; }
.vn { font: 700 11px var(--sans); color: var(--accent); vertical-align: super; line-height: 0; margin: 0 4px 0 6px; padding: 2px 3px; border: 0; background: none; cursor: pointer; border-radius: 4px; }
.vn:hover { background: rgba(168,123,36,0.12); }
.w { transition: color .25s ease, background-color .25s ease; border-radius: 4px; }
/* while reading aloud: unread words are grey, read words are ink, the current word is marked */
.reading .w { color: var(--ink-unread); }
.reading .done .w, .reading .w.said { color: var(--ink-page); }
.w.now { color: var(--ink-page) !important; background: rgba(214,173,91,0.5); box-shadow: 0 0 0 2px rgba(214,173,91,0.5); }
.page-foot { flex: none; padding-top: 10px; font: 500 11.5px var(--sans); color: var(--ink-soft); border-top: 1px solid rgba(28,30,35,0.08); }

/* story panel: the image fills it */
.page-right .running-head { position: absolute; z-index: 3; top: 18px; left: 18px; padding: 7px 12px; border-radius: 999px; background: rgba(13,14,18,0.55); backdrop-filter: blur(8px); color: var(--gold-2); font-size: 10.5px; }
.plate { position: absolute; inset: 0; margin: 0; }
.plate-frame { position: absolute; inset: 0; }
.plate-layer { position: absolute; inset: 0; overflow: hidden; opacity: 0; transition: opacity 1.2s ease; background: #15171d; }
.plate-layer.on { opacity: 1; }
.plate-layer img, .plate-layer video { width: 100%; height: 100%; object-fit: cover; display: block; transform-origin: 50% 50%; }
.plate-layer.on img { animation: kenburns 16s ease-out both; }
@keyframes kenburns { from { transform: scale(1.02); } to { transform: scale(1.1) translate(-1.2%, -1%); } }
.plate-empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center; padding: 24px;
  background: radial-gradient(80% 60% at 50% 100%, rgba(214,173,91,0.2), transparent 70%), #15171d; color: var(--ink-3); font: 600 12px var(--sans); letter-spacing: .12em; text-transform: uppercase; }
.plate figcaption { position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; padding: 90px 28px 72px; background: linear-gradient(180deg, transparent, rgba(10,11,14,0.88));
  font: 600 26px/1.2 var(--serif); color: #fff; }
.listen-cta { position: absolute; z-index: 4; left: 50%; top: 50%; transform: translate(-50%, -50%); display: inline-flex; align-items: center; gap: 10px; height: 52px; padding: 0 24px 0 20px; border: 0; border-radius: 999px;
  background: var(--gold); color: #1a1408; font: 700 15px var(--sans); cursor: pointer; box-shadow: 0 10px 40px rgba(0,0,0,0.45); animation: listen-pulse 2.4s ease-in-out infinite; }
.listen-cta[hidden] { display: none; }
.listen-cta:hover { filter: brightness(1.06); }
@keyframes listen-pulse { 0%, 100% { box-shadow: 0 10px 40px rgba(0,0,0,0.45), 0 0 0 0 rgba(214,173,91,0.45); } 50% { box-shadow: 0 10px 40px rgba(0,0,0,0.45), 0 0 0 12px rgba(214,173,91,0); } }
@media (prefers-reduced-motion: reduce) { .listen-cta { animation: none; } }
.plate figcaption small { display: block; margin-top: 8px; font: 700 11px var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--gold-2); }
.art-foot { position: absolute; z-index: 3; left: 28px; right: 28px; bottom: 22px; display: flex; align-items: center; justify-content: space-between; gap: 12px; font: 600 13px var(--sans); color: rgba(255,255,255,0.65); }
.now-reading { visibility: hidden; }
.ask-paul { display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px; border-radius: 999px; background: rgba(255,255,255,0.14); backdrop-filter: blur(8px); color: #fff; text-decoration: none; font-weight: 700; }
.ask-paul:hover { background: var(--gold); color: #1a1408; }

/* ---------- player ---------- */
.player { display: flex; align-items: center; gap: 12px; margin-top: 18px; padding: 12px 16px; border-radius: 999px; background: rgba(21,23,29,0.92); border: 1px solid var(--line); }
.pl-btn, .pl-speed { flex: none; height: 42px; min-width: 42px; border-radius: 999px; border: 1.5px solid var(--line); background: transparent; color: var(--ink-2); display: grid; place-items: center; cursor: pointer; }
.pl-btn:hover, .pl-speed:hover { border-color: var(--ink-3); color: var(--ink); }
.pl-speed { font: 700 13px var(--sans); padding: 0 12px; }
.pl-play { flex: none; width: 56px; height: 56px; border-radius: 50%; border: 0; background: var(--gold); color: #1a1408; display: grid; place-items: center; cursor: pointer; box-shadow: 0 6px 18px rgba(214,173,91,0.3); }
.pl-play:hover { background: var(--gold-2); }
.pl-play .i-pause, .playing .pl-play .i-play { display: none; }
.playing .pl-play .i-pause { display: block; }
.pl-play svg { margin-left: 2px; } .playing .pl-play svg { margin-left: 0; }
.pl-track { flex: 1; min-width: 0; }
.pl-meta { display: flex; justify-content: space-between; gap: 10px; font: 600 12.5px var(--sans); color: var(--ink-3); margin-bottom: 7px; }
.pl-meta #pl-verse { color: var(--ink); }
.pl-bar { position: relative; height: 8px; border-radius: 999px; background: rgba(255,255,255,0.08); cursor: pointer; }
.pl-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 999px; background: linear-gradient(90deg, #a87b24, var(--gold)); transition: width .3s ease; }
.pl-ticks { position: absolute; inset: 0; display: flex; }
.pl-ticks span { flex: 1; border-right: 1px solid rgba(13,14,18,0.6); }
.pl-ticks span:last-child { border-right: 0; }
.reader-note { text-align: center; color: var(--ink-3); font-size: 12.5px; margin: 12px 0 0; }

/* ---------- tablets and phones: one page at a time ---------- */
@media (max-width: 960px) {
  .reader { padding: 16px 16px 120px; }
  .reader-top { flex-direction: column; align-items: stretch; }
  .chapter-pick { max-width: none; }
  .book { grid-template-columns: 1fr; height: auto; gap: 12px; }
  .page-right { order: -1; position: sticky; top: 76px; z-index: 2; aspect-ratio: 16 / 10; border-radius: 18px; }
  .page-right .running-head, .art-foot .now-reading { display: none; }
  .plate figcaption { padding: 50px 16px 14px; font-size: 18px; }
  .art-foot { left: auto; right: 12px; top: 12px; bottom: auto; }
  .ask-paul { padding: 7px 12px; font-size: 12px; }
  .page-left { padding: 22px 20px 16px; border-radius: 18px; }
  .page-scroll { overflow: visible; margin: 0; padding: 0; -webkit-mask-image: none; mask-image: none; }
  .text { font-size: 18px; padding-bottom: 20px; }
  .player { position: fixed; left: 10px; right: 10px; bottom: 10px; z-index: 30; border-radius: 22px; padding: 10px 12px; gap: 8px; }
  .pl-btn { height: 38px; min-width: 38px; }
  .pl-play { width: 50px; height: 50px; }
  .reader-note { display: none; }
  #pl-status { display: none; }
  .pl-meta { margin-bottom: 6px; }
}
