.lecteur-page .site-main {
  width: min(100% - 2 * var(--space-5), calc(var(--measure) + 4rem));
  padding-top: var(--space-5);
}

body.has-editions {
  --rail-w: 0px;
  --book-bar-h: 0px;
  --edition-bar-h: 1.55rem;
  --edition-col: min(
    calc(100vw - var(--rail-w) - 2 * var(--space-5)),
    calc(var(--measure) + 2.1rem + 2 * var(--space-5))
  );
  --edition-step: calc(var(--edition-col) + var(--edition-gap));
  --edition-count: 3;
}

body.has-editions:has(.book-title-bar) {
  --book-bar-h: 2.05rem;
}

.testament-bar {
  position: sticky;
  top: calc(var(--header-h) + var(--edition-bar-h, 2.2rem) + var(--safe-top));
  z-index: 37;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.4rem;
  height: 1.55rem;
  width: 100%;
  margin-left: 0;
  padding: 0 var(--space-3);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.testament-link {
  font-family: var(--font-ui);
  font-size: 0.82rem;
  color: var(--text-soft);
  background: none;
  border: 0;
  padding: 0.1em 0.2em;
  cursor: pointer;
}

.testament-link:hover,
.testament-link:focus-visible {
  color: var(--text);
}

.testament-link.is-current,
.testament-link[aria-current="page"] {
  color: var(--text);
}

body.has-active-edition {
  --edition-bar-h: 2.2rem;
  --edition-col: min(
    calc(100vw - 2 * var(--space-5)),
    calc(var(--measure) + 2.1rem + 2 * var(--space-5))
  );
  --edition-step: calc(var(--edition-col) + var(--edition-gap));
}

.active-edition-bar {
  position: sticky;
  top: calc(var(--header-h) + var(--safe-top) - 1px);
  z-index: 38;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: var(--edition-bar-h);
  min-height: var(--edition-bar-h);
  width: 100%;
  margin-left: 0;
  padding: 0 var(--space-3);
  overflow: visible;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.edition-bar-blurb {
  justify-self: start;
  margin: 0;
  min-width: 0;
  max-width: 100%;
  font-family: var(--font-ui);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1.2;
  text-transform: none;
  color: var(--text-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.active-edition-bar .edition-name-cluster,
.active-edition-bar .edition-bar-center {
  justify-self: center;
  position: static;
  margin: 0;
}

.edition-bar-date,
.messe-date-nav {
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  color: var(--text-soft);
  white-space: nowrap;
}

.messe-date-nav {
  display: grid;
  grid-template-columns: 2rem max-content 2rem;
  align-items: center;
  justify-items: center;
  column-gap: 0.7rem;
  height: var(--edition-bar-h);
}

.messe-date-label {
  display: grid;
}

.messe-date-sizer,
.messe-date-text {
  grid-area: 1 / 1;
}

.messe-date-sizer {
  visibility: hidden;
}

.messe-date-text {
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
}

.messe-date-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 100%;
  min-height: 1.6rem;
  font: inherit;
  color: inherit;
  line-height: 1;
  padding: 0;
}

.messe-date-step.is-idle {
  visibility: hidden;
}

.messe-date-tri {
  width: 0;
  height: 0;
  border-style: solid;
}

.messe-date-tri.is-prev {
  border-width: 0.32em 0.48em 0.32em 0;
  border-color: transparent currentColor transparent transparent;
}

.messe-date-tri.is-next {
  border-width: 0.32em 0 0.32em 0.48em;
  border-color: transparent transparent transparent currentColor;
}

.messe-date-step:hover,
.messe-date-step:focus-visible {
  color: var(--text);
}

.active-edition-bar .parallels-toggle {
  left: calc(50% + var(--edition-col) / 2);
  margin-left: 0;
  transform: none;
}

.active-edition-bar .edition-name-btn {
  width: auto;
  min-width: 0;
  padding: 0 0.8rem;
}

body.has-active-edition .site-main {
  padding-top: var(--space-5);
}

/* Left chapter rail — count comes from --chapter-count (set in JS). */
body.lecteur-page[data-book] {
  --rail-w: 2.4rem;
  --book-bar-h: 0px;
  --edition-bar-h: 1.45rem;
  --chrome-h: calc(var(--header-h) + var(--book-bar-h) + var(--edition-bar-h));
  --edition-col: min(
    calc(100vw - var(--rail-w) - 2 * var(--space-5)),
    calc(var(--measure) + 2.1rem + 2 * var(--space-5))
  );
  --edition-step: calc(var(--edition-col) + var(--edition-gap));
  padding-left: var(--rail-w);
}

body.lecteur-page[data-book] > .site-header,
body.lecteur-page[data-book] > .reader-chrome {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(-1 * var(--rail-w));
  padding-left: 0;
  padding-right: 0;
}

body.lecteur-page[data-book] > .site-header {
  height: auto;
  min-height: 2.2rem;
  padding-left: var(--space-3);
  padding-right: var(--space-3);
}

.header-center {
  justify-self: center;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.35rem 0.85rem;
  min-width: 0;
  max-width: min(78vw, 46rem);
}

.header-center .edition-name-btn,
.header-center .volume-menu-btn {
  width: auto;
  min-height: 0;
  min-width: 0;
  padding: 0 0.2rem;
  font-family: var(--font-ui);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-transform: none;
  color: var(--text-soft);
}

.header-center .volume-menu-btn:hover,
.header-center .volume-menu-btn:focus-visible,
.header-center .volume-menu-btn[aria-expanded="true"] {
  color: var(--text);
}

.header-page-label {
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-soft);
  white-space: nowrap;
}

.testament-inline {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.testament-inline .testament-link {
  font-size: 0.78rem;
  white-space: nowrap;
}

.site-header .header-volume {
  justify-self: center;
  position: static;
  z-index: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.02rem 0.12rem;
  width: auto;
  max-width: min(62vw, 48rem);
  height: auto;
  min-height: 0;
  margin: 0;
  padding: 0;
  background: none;
  border: 0;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: none;
}

.site-header .header-volume .volume-link {
  text-transform: none;
  letter-spacing: 0.01em;
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--text-soft);
}

.site-header .header-volume .volume-link.is-current,
.site-header .header-volume .volume-link[aria-current="page"] {
  color: var(--text);
}

.reader-chrome {
  position: sticky;
  top: calc(var(--header-h) + var(--safe-top) - 1px);
  z-index: 39;
}

.reader-chrome .book-title-bar,
.reader-chrome .edition-name-bar {
  position: relative;
  top: auto;
}

.book-title-bar {
  position: sticky;
  top: calc(var(--header-h) + var(--safe-top));
  z-index: 39;
  display: flex;
  align-items: center;
  justify-content: center;
  height: var(--book-bar-h);
  min-height: var(--book-bar-h);
  padding: 0 var(--space-3);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  font-family: var(--font-ui);
  font-size: var(--text-base);
  color: var(--text);
  text-align: center;
  overflow: visible;
}

.apostle-bar,
.volume-bar {
  gap: 0.08rem 0.12rem;
  flex-wrap: wrap;
  height: auto;
  min-height: var(--book-bar-h);
  padding-top: 0.15rem;
  padding-bottom: 0.15rem;
}

.volume-bar .volume-link {
  font-size: 0.72em;
  padding: 0.06em 0.38em;
}

.volume-link,
.apostle-link {
  color: var(--text-soft);
  text-decoration: none;
  font-family: var(--font-ui);
  font-size: 0.95em;
  padding: 0.1em 0.7em;
  transform: scale(0.92);
  transform-origin: center center;
  transition: transform 180ms var(--ease), color 180ms var(--ease);
}

.volume-bar .volume-link {
  font-size: 0.72em;
  padding: 0.06em 0.38em;
}

.volume-link:hover,
.volume-link:focus-visible,
.apostle-link:hover,
.apostle-link:focus-visible {
  color: var(--text);
  transform: scale(1.18);
}

.volume-link.is-current,
.volume-link[aria-current="page"],
.apostle-link.is-current,
.apostle-link[aria-current="page"] {
  color: var(--text);
  transform: scale(1);
}

.volume-link.is-current:hover,
.volume-link[aria-current="page"]:hover,
.apostle-link.is-current:hover,
.apostle-link[aria-current="page"]:hover {
  color: var(--text);
  transform: scale(1.18);
}

.edition-name-bar {
  position: sticky;
  top: calc(var(--header-h) + var(--book-bar-h) + var(--safe-top));
  z-index: 38;
  height: var(--edition-bar-h);
  overflow: visible;
  width: 100%;
  margin-left: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.edition-name-stage {
  overflow: visible;
  display: grid;
  grid-template-columns: repeat(var(--edition-count, 3), var(--edition-col));
  column-gap: var(--edition-gap);
  width: calc(
    var(--edition-count, 3) * var(--edition-col) +
      (var(--edition-count, 3) - 1) * var(--edition-gap)
  );
  margin-left: calc(
    max(var(--rail-w) + 4.6rem, (100vw - var(--edition-col)) / 2) -
      (var(--edition-count, 1) - 1) * var(--edition-step)
  );
  transform: translate3d(var(--swipe-x), 0, 0);
}

.edition-name-stage p {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  min-height: var(--edition-bar-h);
}

.edition-add-col,
.edition-remove-col {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 2;
  display: flex;
  align-items: center;
}

.edition-add-col {
  left: 0;
  transform: translateX(-100%);
}

.edition-remove-col {
  right: 0;
}

.edition-add-col-btn,
.edition-remove-col-btn {
  margin: 0;
  padding: 0 0.45rem;
  border: 0;
  background: none;
  font-family: var(--font-ui);
  font-size: 1.05rem;
  line-height: 1;
  font-weight: 400;
  color: var(--text-soft);
  cursor: pointer;
}

.edition-add-col-btn {
  font-size: 0.68rem;
  letter-spacing: 0.01em;
  text-transform: none;
  padding: 0 0.35rem;
}

.edition-remove-col-btn {
  font-size: 1.15rem;
  padding: 0 0.5rem;
}

.edition-add-col-btn:hover,
.edition-add-col-btn:focus-visible,
.edition-add-col-btn[aria-expanded="true"],
.edition-remove-col-btn:hover,
.edition-remove-col-btn:focus-visible {
  color: var(--text);
}

.edition-name-cluster {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: var(--edition-bar-h);
}

.edition-name-cluster .edition-name-btn {
  width: auto;
}

.parallels-toggle {
  position: absolute;
  left: 100%;
  top: 0;
  bottom: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  margin-left: 1.2rem;
  font-family: var(--font-ui);
  font-size: 0.68rem;
  line-height: 1;
  letter-spacing: 0.01em;
  color: var(--text-soft);
  white-space: nowrap;
  user-select: none;
}

.edition-name-stage p.is-primary .parallels-toggle {
  left: 100%;
  right: auto;
  margin-left: 0;
}

.parallels-toggle-btn {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  letter-spacing: inherit;
  color: var(--text-faint);
  cursor: pointer;
  text-align: left;
}

.parallels-toggle-btn.is-active {
  color: var(--text-soft);
}

.parallels-toggle-btn:hover,
.parallels-toggle-btn:focus-visible,
.parallels-toggle-btn[aria-expanded="true"] {
  color: var(--text);
}

.edition-bar-spacer {
  justify-self: end;
  position: relative;
}

.edition-lang-tag {
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  text-transform: lowercase;
}

.edition-name-btn,
.edition-menu button {
  direction: ltr;
}

.edition-menu-name {
  unicode-bidi: isolate;
}

.edition-name-btn {
  display: block;
  width: 100%;
  min-height: var(--edition-bar-h);
  padding: 0 0.4rem;
  font-family: var(--font-ui);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-soft);
  cursor: pointer;
}

.edition-name-btn:hover,
.edition-name-btn:focus-visible {
  color: var(--text);
}

.qumran-ms-btn {
  margin: 0;
  padding: 0 0.15rem 0 0.45rem;
  border: 0;
  background: none;
  font-family: var(--font-ui);
  font-size: 0.68rem;
  letter-spacing: 0.02em;
  line-height: 1;
  text-transform: none;
  color: var(--accent);
  cursor: pointer;
  white-space: nowrap;
}

.qumran-ms-btn:hover,
.qumran-ms-btn:focus-visible,
.qumran-ms-btn[aria-expanded="true"] {
  color: var(--text);
}

.edition-menu,
.parallels-menu,
.volume-menu,
.qumran-menu,
.ui-lang-menu {
  position: fixed;
  z-index: 60;
  margin: 0;
  padding: 0.25rem 0;
  list-style: none;
  width: max-content;
  min-width: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: 0 0.6rem 1.6rem rgba(0, 0, 0, 0.45);
}

.edition-menu button,
.parallels-menu button,
.ui-lang-menu button {
  display: block;
  width: 100%;
  padding: 0.4rem 0.9rem;
  font-family: var(--font-ui);
  font-size: 0.68rem;
  color: var(--text-soft);
  white-space: nowrap;
}

.ui-lang-menu {
  max-height: 70vh;
  overflow-y: auto;
}

.ui-lang-caption {
  padding: 0.28rem 0.9rem 0.15rem;
  font-family: var(--font-ui);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.ui-lang-menu button {
  text-transform: none;
  font-size: 0.78rem;
}

.ui-lang-menu button.is-current,
.ui-lang-menu button.is-current:hover,
.ui-lang-menu button.is-current:focus-visible {
  color: var(--accent);
}

.edition-menu {
  max-height: 70vh;
  overflow-y: auto;
}

.edition-lang-caption {
  padding: 0.45rem 0.9rem 0.1rem;
  font-family: var(--font-ui);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.edition-menu button.edition-menu-others {
  color: var(--accent);
  border-top: 1px solid var(--border);
  margin-top: 0.2rem;
}

.edition-menu button.is-current,
.edition-menu button.is-current:hover,
.edition-menu button.is-current:focus-visible {
  color: var(--accent);
}

.edition-menu button {
  text-align: center;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.parallels-menu button {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  text-align: left;
  letter-spacing: 0.01em;
  color: var(--text-faint);
}

.parallels-check {
  flex: 0 0 0.9em;
  width: 0.9em;
  text-align: center;
  color: var(--text);
}

.parallels-menu button[aria-pressed="true"] {
  color: var(--text-soft);
}

.qumran-menu {
  max-height: 70vh;
  overflow-y: auto;
}

.qumran-menu button {
  display: block;
  width: 100%;
  padding: 0.4rem 0.9rem;
  border: 0;
  background: none;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  letter-spacing: 0.01em;
  text-transform: none;
  text-align: left;
  color: var(--text-soft);
  white-space: nowrap;
  cursor: pointer;
}

.qumran-menu button.is-current,
.qumran-menu button.is-current:hover,
.qumran-menu button.is-current:focus-visible {
  color: var(--accent);
}

.qumran-credit {
  position: sticky;
  bottom: 0;
  margin: 0;
  padding: 0.45rem 0.9rem;
  border-top: 1px solid var(--border);
  background: var(--bg-elevated);
  font-family: var(--font-ui);
  font-size: 0.62rem;
  line-height: 1.35;
  color: var(--text-mute);
  max-width: 18rem;
  white-space: normal;
}

.qumran-credit a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.12em;
}

.edition-menu button:hover,
.edition-menu button:focus-visible,
.parallels-menu button:hover,
.parallels-menu button:focus-visible,
.qumran-menu button:hover,
.qumran-menu button:focus-visible,
.ui-lang-menu button:hover,
.ui-lang-menu button:focus-visible,
.volume-menu a:hover,
.volume-menu a:focus-visible {
  color: var(--text);
  background: var(--bg-soft);
}

.volume-menu a {
  display: block;
  padding: 0.4rem 0.9rem;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  color: var(--text-soft);
  text-decoration: none;
  text-align: center;
  letter-spacing: 0.01em;
  text-transform: none;
  white-space: nowrap;
}

.volume-menu a.is-current,
.volume-menu a[aria-current="page"] {
  color: var(--accent);
}

.volume-menu a.is-current:hover,
.volume-menu a.is-current:focus-visible,
.volume-menu a[aria-current="page"]:hover,
.volume-menu a[aria-current="page"]:focus-visible {
  color: var(--accent);
}

.chapter-rail {
  position: fixed;
  top: calc(var(--chrome-h) + var(--safe-top) + var(--footer-h) + var(--rail-gap));
  bottom: auto;
  height: auto;
  max-height: calc(
    100vh - var(--chrome-h) - var(--safe-top) - var(--safe-bottom) -
      2 * var(--footer-h) - 2 * var(--rail-gap)
  );
  left: 0.16rem;
  width: calc(var(--rail-w, 2.4rem) - 0.22rem);
  z-index: 45;
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  justify-content: flex-start;
  align-items: stretch;
  gap: 0.15rem;
  padding: 0.4rem 0;
  pointer-events: none;
  background: #000;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: none;
}

.chapter-rail::-webkit-scrollbar {
  display: none;
}

.chapter-rail-book {
  position: sticky;
  top: 0;
  z-index: 2;
  align-self: center;
  margin: 0 0 0.2rem;
  padding: 0.08rem 0.28rem;
  border: 1px solid var(--accent);
  border-radius: 999px;
  background: #000;
  color: var(--accent);
  font-family: var(--font-ui);
  font-size: 0.68rem;
  letter-spacing: 0.03em;
  line-height: 1.3;
  pointer-events: none;
}

.chapter-rail-book[hidden] {
  display: none;
}

.column-memo {
  position: fixed;
  z-index: 40;
  margin: 0;
  padding: 0.18rem 0.55rem;
  border: 1px solid var(--accent);
  border-radius: 999px;
  background: var(--bg-elevated);
  color: var(--accent);
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  letter-spacing: 0.03em;
  line-height: 1.3;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 0.25rem 0.8rem rgba(0, 0, 0, 0.35);
}

.column-memo[hidden] {
  display: none;
}

.chapter-rail a {
  pointer-events: auto;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  font-family: var(--font-ui);
  font-variant-numeric: tabular-nums;
  font-size: 0.92rem;
  line-height: 1.05;
  color: var(--text-mute);
  text-decoration: none;
  padding: 0.16em 0;
  white-space: nowrap;
  transition: color 180ms var(--ease);
}

.chapter-rail-num {
  display: block;
  transform-origin: center center;
  transition: transform 180ms var(--ease);
}

.chapter-rail a:hover,
.chapter-rail a:focus-visible {
  color: var(--text);
}

.chapter-rail a:hover .chapter-rail-num,
.chapter-rail a:focus-visible .chapter-rail-num {
  transform: scale(1.35);
}

.chapter-rail a[aria-current="location"] {
  color: var(--accent);
  font-weight: 600;
}

.chapter-rail a[aria-current="location"] .chapter-rail-num {
  transform: scale(1.45);
}

.chapter-rail a[aria-current="location"]:hover .chapter-rail-num,
.chapter-rail a[aria-current="location"]:focus-visible .chapter-rail-num {
  transform: scale(1.55);
}

body.lecteur-page[data-book] .site-main {
  width: 100%;
  max-width: none;
  padding-top: var(--space-4);
}

body.lecteur-page[data-book] .edition-pane.is-current {
  width: 100vw;
  margin-left: calc(-1 * var(--rail-w));
}

.book-body.is-aligned {
  max-width: none;
  margin: 0;
}

.edition-stage {
  display: grid;
  grid-template-columns: repeat(var(--edition-count, 3), var(--edition-col));
  width: calc(
    var(--edition-count, 3) * var(--edition-col) +
      (var(--edition-count, 3) - 1) * var(--edition-gap)
  );
  margin-left: calc(
    max(var(--rail-w) + 4.6rem, (100vw - var(--edition-col)) / 2) -
      (var(--edition-count, 1) - 1) * var(--edition-step)
  );
  column-gap: var(--edition-gap);
  align-items: start;
}

.chapter-spacer {
  grid-column: 1 / -1;
  width: 100%;
  pointer-events: none;
}

.chapter-band {
  position: relative;
  grid-column: 1 / -1;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: var(--edition-gap);
  margin: 0 0 var(--space-4);
  overflow: visible;
}

.chapter-pair {
  position: relative;
  flex: 0 0 auto;
  width: calc(
    var(--edition-count, 3) * var(--edition-col) +
      (var(--edition-count, 3) - 1) * var(--edition-gap)
  );
  display: flex;
  flex-direction: column;
  margin: 0;
  overflow: visible;
}

.verse-line {
  display: grid;
  grid-template-columns: repeat(var(--edition-count, 3), var(--edition-col));
  column-gap: var(--edition-gap);
}

.chapter-pair > .verse-line > .chapter-label,
.chapter-pair > .verse-line > .verse {
  min-width: 0;
  box-sizing: border-box;
  width: 100%;
  justify-self: stretch;
  margin-left: 0;
  padding-left: var(--space-5);
  padding-right: var(--space-5);
  background: var(--bg-elevated);
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
}

.chapter-pair > .verse-line > .is-card-head {
  border-top: 1px solid var(--border);
  border-top-left-radius: var(--radius);
  border-top-right-radius: var(--radius);
  padding-top: var(--space-5);
}

.chapter-pair > .verse-line > .is-card-foot {
  border-bottom: 1px solid var(--border);
  border-bottom-left-radius: var(--radius);
  border-bottom-right-radius: var(--radius);
  padding-bottom: var(--space-5);
}

.edition-stage .book-end,
.edition-stage .site-footer {
  width: 100%;
  margin-inline: 0;
  padding-left: var(--space-5);
  padding-right: var(--space-5);
}

.edition-stage .chapter-label {
  scroll-margin-top: calc(var(--chrome-h) + var(--space-4));
  margin: 0;
  padding-bottom: var(--space-4);
}

.chapter-pair > .verse-line > .verse {
  margin: 0;
  padding-bottom: 0.55em;
}

.edition-stage .site-footer {
  margin-top: var(--space-6);
}

@media (prefers-reduced-motion: reduce) {
  .chapter-rail a,
  .chapter-rail-num {
    transition: none;
  }

  .parallel-card {
    transition: none;
  }
}

.book-header {
  margin-bottom: var(--space-7);
  text-align: center;
}

.book-header h1 {
  font-family: var(--font-ui);
  font-size: var(--text-xl);
  font-weight: 400;
  color: var(--text);
  margin-bottom: var(--space-2);
}

.book-meta {
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.book-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-3);
  margin-top: var(--space-4);
}

.book-nav a {
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  color: var(--text-mute);
  text-decoration: none;
  padding: var(--space-2) var(--space-3);
  border-radius: 999px;
  border: 1px solid transparent;
}

.book-nav a[aria-current="page"] {
  color: var(--text-soft);
  border-color: var(--border-strong);
  background: var(--bg-elevated);
}

.book-nav a:hover {
  color: var(--text);
  border-color: var(--border);
}

.book-body {
  max-width: var(--measure);
  margin-inline: auto;
  overflow-anchor: none;
}

.book-body * {
  overflow-anchor: none;
}

#lsb-headroom {
  display: block;
  width: 100%;
  pointer-events: none;
  overflow-anchor: none;
}

.chapter {
  margin-bottom: var(--space-5);
  scroll-margin-top: calc(var(--header-h) + var(--space-4));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  padding: var(--space-5);
  transition: border-color var(--dur-fast) var(--ease);
}

.chapter-label {
  display: flex;
  align-items: baseline;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  color: var(--text-faint);
  user-select: none;
}

.chapter-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
  transform: translateY(-0.15em);
}

.chapter-num {
  font-variant-numeric: tabular-nums;
  color: var(--accent);
  letter-spacing: 0.06em;
  text-transform: none;
  font-size: var(--text-sm);
}

.verse {
  display: grid;
  grid-template-columns: 2.1rem minmax(0, 1fr);
  column-gap: var(--space-2);
  margin: 0 0 0.55em;
  scroll-margin-top: calc(var(--header-h) + var(--space-3));
}

.verse[dir="rtl"] {
  font-family: var(--font-he);
  font-size: 1.12em;
  line-height: 1.95;
}

.verse[dir="rtl"] .verse-text {
  text-align: start;
  hyphens: none;
  font-family: var(--font-he);
}

.chapter-label[dir="rtl"],
.chapter-mask[dir="rtl"] .chapter-num {
  font-family: var(--font-he);
  letter-spacing: 0;
}

.verse-num {
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  line-height: var(--leading-body);
  color: var(--text-faint);
  text-align: right;
  user-select: none;
  padding-top: 0.28em;
  font-variant-numeric: tabular-nums;
}

.verse-text {
  color: var(--text);
}

.verse[data-highlight="true"] .verse-text {
  border-radius: 0.2em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.book-end {
  margin-top: var(--space-8);
  padding-top: var(--space-6);
  border-top: 1px solid var(--border);
  text-align: center;
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  color: var(--text-mute);
}

.book-end a {
  text-decoration: none;
  margin: 0 var(--space-2);
}

/* Choose-book page */
.choose-grid {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: 1fr;
  max-width: 36rem;
  margin-inline: auto;
}

@media (min-width: 560px) {
  .choose-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.choose-card {
  display: block;
  text-align: center;
  padding: var(--space-5);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  text-decoration: none;
  color: var(--text-soft);
  transition: border-color var(--dur-fast) var(--ease),
    background var(--dur-fast) var(--ease),
    transform var(--dur-fast) var(--ease);
}

.choose-card:hover {
  border-color: var(--border-strong);
  background: var(--bg-soft);
  color: var(--text);
  transform: translateY(-1px);
}

.choose-card h2 {
  font-family: var(--font-ui);
  font-size: var(--text-lg);
  font-weight: 400;
  margin: 0;
}

.choose-card p {
  margin: 0 0 var(--space-4);
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  color: var(--text-mute);
}

.chapter-select-label {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  width: 100%;
}

.chapter-select-caption {
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.chapter-select {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  min-height: 44px;
  padding: 0.55rem 2rem 0.55rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--bg)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23c4b59a' d='M1 1l5 5 5-5'/%3E%3C/svg%3E")
    no-repeat right 0.75rem center;
  color: var(--text-soft);
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  cursor: pointer;
}

.chapter-select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.choose-all-link {
  display: inline-block;
  margin-top: var(--space-3);
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  color: var(--text-mute);
  text-decoration: none;
}

.choose-all-link:hover {
  color: var(--text);
}

.canon-catalog {
  display: grid;
  gap: var(--space-5);
  max-width: 52rem;
  margin-inline: auto;
  font-family: var(--font-ui);
}

.canon-head {
  margin: 0 0 var(--space-2);
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  font-weight: 400;
  letter-spacing: 0.04em;
  text-align: center;
  color: var(--text-soft);
}

.canon-testament-title {
  font-family: var(--font-ui);
  font-size: var(--text-lg);
  font-weight: 400;
  text-align: center;
  margin: 0 0 var(--space-5);
  color: var(--text);
}

.canon-section {
  margin-bottom: var(--space-5);
}

.canon-section-title {
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  text-align: center;
  margin: 0 0 var(--space-3);
}

.canon-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-2);
}

.canon-card {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 10rem;
  max-width: 18rem;
  min-height: 2.6rem;
  padding: 0.45rem 0.7rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  text-decoration: none;
  text-align: center;
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  line-height: 1.3;
  color: var(--text-soft);
  text-wrap: balance;
  transition: border-color var(--dur-fast) var(--ease),
    background var(--dur-fast) var(--ease),
    color var(--dur-fast) var(--ease);
}

.canon-card:hover {
  border-color: var(--border-strong);
  background: var(--bg-soft);
  color: var(--text);
}

/* Compact gospel names (messe footer) */
.gospel-pick-name {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  color: var(--text-soft);
  text-decoration: none;
  padding: var(--space-2) var(--space-3);
  min-height: 44px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  transition: border-color var(--dur-fast) var(--ease),
    background var(--dur-fast) var(--ease),
    color var(--dur-fast) var(--ease);
}

.gospel-pick-name:hover {
  color: var(--text);
  border-color: var(--border-strong);
  background: var(--bg-elevated);
}

.parallel-rail {
  position: absolute;
  z-index: 6;
  width: 6px;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 2px;
  background: var(--rail-synopse, var(--accent));
  opacity: 0.78;
  cursor: pointer;
  pointer-events: auto;
}

.parallel-rail--synopse {
  background: var(--rail-synopse, #c4b59a);
}

.parallel-rail--vetero {
  background: var(--rail-vetero, #6e9aa8);
}

.parallel-rail--accomplissement {
  background: var(--rail-accomplissement, #c47a6a);
}

.parallel-rail:hover,
.parallel-rail.is-open {
  opacity: 1;
}

.parallel-rail.is-open {
  box-shadow: 0 0 0 1px var(--bg), 0 0 0 2.5px var(--accent);
}

.parallel-stamp {
  position: fixed;
  z-index: 50;
  width: max-content;
  max-width: min(36rem, 80vw);
  margin: 0;
  padding: 0.22rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text-soft);
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 1.35;
  text-align: left;
  white-space: nowrap;
  pointer-events: none;
  transform: translateY(-50%);
}

.parallel-cards {
  display: flex;
  position: absolute;
  left: calc(100% + var(--rail-span, 0px) + var(--edition-gap));
  top: 0;
  z-index: 4;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: var(--edition-gap);
  align-items: flex-start;
  width: max-content;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  overflow: visible;
  transition:
    opacity var(--parallel-dur) var(--parallel-ease),
    visibility 0s linear var(--parallel-dur);
}

.parallel-cards.is-open {
  pointer-events: auto;
  opacity: 1;
  visibility: visible;
  transition:
    opacity var(--parallel-dur) var(--parallel-ease),
    visibility 0s linear 0s;
}

.parallel-cards.is-leaving {
  pointer-events: none;
  transition:
    opacity var(--parallel-out-dur, 560ms) var(--parallel-ease),
    visibility 0s linear var(--parallel-out-dur, 560ms);
}

.reading-row {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: var(--edition-gap);
  overflow: visible;
  width: max-content;
  max-width: none;
}

.reading-row > .reading-card {
  flex: 0 0 var(--edition-col);
  width: var(--edition-col);
  min-width: var(--edition-col);
  max-width: var(--edition-col);
}

.parallel-card {
  position: relative;
  box-sizing: border-box;
  flex: 0 0 var(--edition-col);
  width: var(--edition-col);
  min-width: var(--edition-col);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  padding: var(--space-5);
  overflow: visible;
  z-index: 4;
  transition: margin-right var(--parallel-dur) var(--parallel-ease);
}

.parallel-card.has-nested {
  z-index: 5;
}

.parallel-card-head {
  display: block;
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  letter-spacing: 0.04em;
  color: var(--accent);
  margin: 0 0 var(--space-3);
  text-decoration: none;
}

.parallel-card-head:hover {
  color: var(--text);
}

.parallel-memo-shield {
  position: absolute;
  z-index: 6;
  left: 0;
  right: 0;
  top: 0;
  height: 0;
  background: var(--bg);
  pointer-events: none;
}

.parallel-memo {
  position: absolute;
  z-index: 7;
  left: 0.55rem;
  width: max-content;
  max-width: calc(100% - 1.1rem);
  margin: 0;
  padding: 0.18rem 0.55rem;
  border: 1px solid var(--accent);
  border-radius: 999px;
  background: var(--bg-elevated);
  color: var(--accent);
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  letter-spacing: 0.03em;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: auto;
  text-decoration: none;
  box-shadow: 0 0.25rem 0.8rem rgba(0, 0, 0, 0.35);
  opacity: 0;
  transition: opacity 600ms var(--ease);
}

.parallel-memo.is-shown {
  opacity: 1;
}

.parallel-memo[hidden] {
  display: none;
}

.parallel-card-body {
  min-width: 0;
  overflow-anchor: none;
}

.parallel-card .mask-label,
.reading-card .mask-label {
  display: none;
}

.parallel-card .chapter-mask {
  font-size: var(--text-base);
  overflow-anchor: none;
}

.parallel-card .mask-zone {
  max-height: 0;
  overflow: hidden;
  overflow-anchor: none;
  transition: max-height var(--mask-dur) var(--mask-ease);
}

.parallel-card .mask-zone.is-frozen {
  transition: none;
}

.parallel-card .chapter-mask.is-expanded .mask-zone,
.parallel-card .chapter-mask[data-expanded="true"] .mask-zone {
  max-height: var(--mask-height, 2000px);
}

.parallel-card .mask-zone-inner {
  flex: 0 0 auto;
  min-height: 0;
}

.parallel-card .mask-before {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.parallel-card .mask-fold {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 0.85em;
  margin: 0.15em 0 0.35em;
  color: var(--text-faint);
  letter-spacing: 0.42em;
  font-size: 0.72rem;
  line-height: 1;
  user-select: none;
  pointer-events: none;
}

.parallel-card .chapter-mask.is-expanded .mask-fold,
.parallel-card .chapter-mask[data-expanded="true"] .mask-fold {
  height: 0;
  margin: 0;
  opacity: 0;
}

@media (max-width: 720px) {
  .edition-name-stage,
  .edition-stage {
    margin-left: calc(
      (100vw - var(--edition-col)) / 2 -
        (var(--edition-count, 1) - 1) * var(--edition-step)
    );
  }

  .edition-name-stage p.is-primary .parallels-toggle {
    left: auto;
    right: 0;
    margin-left: 0;
  }
}
