/* IJN Bible 1.0.11 — Listen dock (Bob Souer narration on BSB, device voice elsewhere).
   Same look as the article Listen player (forest glass, gold play button, gold seek), docked to the bottom so it
   stays reachable on phones while the text scrolls under it. */
.ijn-narr {
  position: fixed; z-index: 1080; left: 0; right: 0;
  bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  width: min(640px, calc(100% - 20px)); margin: 0 auto;
  color: #f8f4ec;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(18, 38, 31, 0.96), rgba(31, 58, 50, 0.96) 60%, rgba(44, 78, 67, 0.96));
  border: 1px solid rgba(226, 197, 138, 0.42);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 18px 40px -18px rgba(0, 0, 0, 0.75), 0 4px 12px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  animation: ijn-narr-in 0.22s ease-out;
}
.ijn-narr[hidden] { display: none !important; }
@keyframes ijn-narr-in { from { transform: translateY(16px); opacity: 0; } to { transform: none; opacity: 1; } }
.ijn-narr-inner { display: flex; align-items: center; gap: 0.75rem; padding: 0.65rem 0.7rem 0.35rem 0.65rem; }
.ijn-narr-play {
  flex: 0 0 auto; width: 50px; height: 50px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0;
  border: 1px solid rgba(255, 244, 214, 0.65);
  background: radial-gradient(circle at 30% 25%, #f1d79a, #c9a24a 55%, #9c7728);
  box-shadow: 0 6px 16px -6px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.55);
  transition: transform 0.15s ease, filter 0.15s ease;
}
.ijn-narr-play:hover { transform: scale(1.04); filter: brightness(1.05); }
.ijn-narr-play:focus-visible, .ijn-narr-close:focus-visible { outline: 3px solid #fff4d6; outline-offset: 2px; }
.ijn-narr-play svg { width: 24px; height: 24px; fill: #1a2a22; }
.ijn-narr-ico-pause { display: none; }
.ijn-narr.is-playing .ijn-narr-ico-play { display: none; }
.ijn-narr.is-playing .ijn-narr-ico-pause { display: block; }
.ijn-narr-main { flex: 1 1 auto; min-width: 0; }
.ijn-narr-top { display: flex; justify-content: space-between; align-items: baseline; gap: 0.5rem; margin: 0 0 0.35rem; }
.ijn-narr-label {
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 0.76rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: #ecd6a4;
}
.ijn-narr-by { font-weight: 600; letter-spacing: 0.04em; text-transform: none; color: rgba(248, 244, 236, 0.8); }
.ijn-narr-time { font-size: 0.8rem; color: rgba(248, 244, 236, 0.88); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ijn-narr-seek {
  -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 6px; margin: 0;
  border-radius: 999px; cursor: pointer; outline: none; touch-action: none;
  background: linear-gradient(90deg, #ecd6a4 0 var(--ijn-audio-pct, 0%), rgba(248, 244, 236, 0.22) var(--ijn-audio-pct, 0%) 100%);
}
.ijn-narr-seek::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: #fff4d6; border: 2px solid #b8893a; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45); }
.ijn-narr-seek::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: #fff4d6; border: 2px solid #b8893a; }
.ijn-narr-seek:focus-visible { outline: 2px solid #fff4d6; outline-offset: 4px; }
.ijn-narr-speed select {
  -webkit-appearance: none; appearance: none; min-height: 36px;
  padding: 0.35rem 1.45rem 0.35rem 0.6rem; border-radius: 999px; cursor: pointer;
  font: 700 0.82rem "Helvetica Neue", Helvetica, Arial, sans-serif; color: #ecd6a4;
  background: rgba(226, 197, 138, 0.12) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23e2c58a' stroke-width='1.8'/%3E%3C/svg%3E") no-repeat right 0.5rem center / 10px 7px;
  border: 1px solid rgba(226, 197, 138, 0.45);
}
.ijn-narr-speed select:focus-visible { outline: 2px solid #fff4d6; outline-offset: 2px; }
.ijn-narr-speed select option { color: #1f1c18; background: #fffdf8; }
.ijn-narr-close {
  flex: 0 0 auto; width: 36px; height: 36px; border-radius: 50%; padding: 0; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: 1px solid rgba(248, 244, 236, 0.28);
}
.ijn-narr-close svg { width: 16px; height: 16px; stroke: #f8f4ec; stroke-width: 2.2; stroke-linecap: round; fill: none; }
.ijn-narr-close:hover { background: rgba(248, 244, 236, 0.1); }
.ijn-narr-credit {
  margin: 0; padding: 0 0.9rem 0.55rem calc(0.65rem + 50px + 0.75rem);
  font-size: 0.7rem; line-height: 1.35; color: rgba(248, 244, 236, 0.78);
}
.ijn-narr-credit a { color: rgba(248, 244, 236, 0.86); text-decoration: underline; text-decoration-color: rgba(226, 197, 138, 0.55); text-underline-offset: 2px; }
.ijn-narr-credit a:hover { color: #ecd6a4; }
.ijn-narr-status:not(:empty) { display: block; color: #ecd6a4; font-weight: 600; }
.ijn-narr .ijn-sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Room for the dock under the last verse, and lift the back-to-article pill above it */
html.ijn-narr-open .ijn-bible { padding-bottom: 120px; }
html.ijn-narr-open .ijn-return-fab { bottom: calc(118px + env(safe-area-inset-bottom, 0px)) !important; }

/* Verse being read */
.ijn-bible .ijn-bible-verse--reading {
  border-radius: 10px;
  background: linear-gradient(90deg, rgba(201, 161, 91, 0.26), rgba(201, 161, 91, 0.1));
  box-shadow: -0.5rem 0 0 rgba(201, 161, 91, 0.26), 0.5rem 0 0 rgba(201, 161, 91, 0.1), inset 3px 0 0 #c9a15b;
  transition: background 0.25s ease, box-shadow 0.25s ease;
}
.ijn-bible[data-theme="midnight"] .ijn-bible-verse--reading,
.ijn-bible[data-theme="cypress"] .ijn-bible-verse--reading {
  background: linear-gradient(90deg, rgba(243, 210, 142, 0.2), rgba(243, 210, 142, 0.07));
  box-shadow: -0.5rem 0 0 rgba(243, 210, 142, 0.2), 0.5rem 0 0 rgba(243, 210, 142, 0.07), inset 3px 0 0 #f3d28e;
}
.ijn-bible[data-theme="midnight"] .ijn-narr {
  background: linear-gradient(135deg, rgba(11, 18, 32, 0.96), rgba(22, 34, 56, 0.96));
  border-color: rgba(240, 202, 120, 0.4);
}

@media (max-width: 520px) {
  .ijn-narr { width: calc(100% - 12px); bottom: calc(6px + env(safe-area-inset-bottom, 0px)); border-radius: 16px; }
  .ijn-narr-inner { gap: 0.55rem; padding: 0.55rem 0.55rem 0.3rem; }
  .ijn-narr-play { width: 46px; height: 46px; }
  .ijn-narr-speed select { padding-right: 1.25rem; padding-left: 0.5rem; }
  .ijn-narr-close { width: 32px; height: 32px; }
  .ijn-narr-credit { padding-left: 0.7rem; padding-right: 0.7rem; text-align: center; }
}
@media (min-width: 1024px) { .ijn-narr { bottom: 18px; } }
@media (prefers-reduced-motion: reduce) {
  .ijn-narr { animation: none; }
  .ijn-narr-play, .ijn-bible .ijn-bible-verse--reading { transition: none; }
}
@media print { .ijn-narr { display: none !important; } }
