/* Same role, same type size. Scripture typography and icon sizes stay independent. */
html[data-theme] body[data-page="read"] .chapter-finish {
  grid-template-columns:minmax(0,1fr) minmax(0,1.2fr) minmax(0,1fr)!important;
  align-items:stretch!important;gap:6px!important;
}
html[data-theme] body[data-page="read"] .chapter-finish>a,
html[data-theme] body[data-page="read"] .chapter-finish>button,
html[data-theme] body[data-page="read"] .chapter-finish>.off {
  box-sizing:border-box!important;min-width:0!important;min-height:64px!important;
  height:auto!important;padding:10px 2px!important;
  display:flex!important;align-items:center!important;justify-content:center!important;
  gap:4px!important;text-align:center!important;white-space:normal!important;
  font-family:Montserrat,system-ui,sans-serif!important;font-size:clamp(10px,2.8vw,11px)!important;
  font-weight:600!important;line-height:1.25!important;
}
html[data-theme] body[data-page="read"] .chapter-finish>a>span {
  min-width:0!important;font-size:inherit!important;font-weight:inherit!important;
  line-height:inherit!important;
}
html[data-theme] body[data-page="read"] .chapter-finish>button,
html[data-theme] body[data-page="read"] .chapter-finish>.off {
  display:block!important;align-content:center!important;
}
html[data-theme] body[data-page="read"] .chapter-finish>a>b {
  flex:none!important;font-size:20px!important;line-height:1!important;
}
@media(max-width:360px) {
  html[data-theme] body[data-page="read"] .chapter-finish>a {
    flex-direction:column!important;gap:2px!important;
  }
  html[data-theme] body[data-page="read"] .chapter-finish>a>b {font-size:16px!important;}
}
/* Parent/child font declarations previously made Read smaller than Listen. */
html[data-theme] body[data-page="home"] .reading-actions>a,
html[data-theme] body[data-page="home"] .reading-actions>a>span {
  font-size:12px!important;font-weight:600!important;line-height:1.25!important;
}
/* Active navigation is distinguished by colour and weight, never by a size jump. */
html[data-theme] body [data-b27-nav]>a,
html[data-theme] body [data-b27-nav]>a.active,
html[data-theme] body [data-b27-nav]>a .nav-label,
html[data-theme] body [data-b27-nav]>a.active .nav-label,
html[data-theme] body [data-b27-nav]>a>span:not(.nav-icon) {
  font-size:12px!important;line-height:18px!important;
}
/* Event actions occupy the same column, including the long calendar label. */
html[data-theme] body .event-sheet__body>.primary-cta:not([hidden]),
html[data-theme] body .event-sheet__body>.sheet-bottom-close,
html[data-theme] body .event-secondary>button {
  box-sizing:border-box!important;width:100%!important;min-width:0!important;
  min-height:44px!important;height:auto!important;padding:12px!important;
  display:flex!important;align-items:center!important;justify-content:center!important;
  font-size:12px!important;font-weight:600!important;line-height:1.35!important;
  white-space:normal!important;text-align:center!important;overflow-wrap:anywhere;
}
html[data-theme] body .event-secondary {
  display:grid!important;grid-template-columns:minmax(0,1fr)!important;
  gap:8px!important;width:100%;min-width:0;
}
/* Editor actions use one type scale and grow with their labels. */
html[data-theme] body .saved-editor-submit,
html[data-theme] body .saved-editor-delete {
  min-height:46px!important;font-size:14px!important;line-height:1.3!important;
  white-space:normal!important;overflow-wrap:anywhere;
}
html[data-theme] body .saved-tools>select {min-width:0;max-width:100%;}
html[data-theme] body .saved-card-tools {flex-wrap:wrap;}
html[data-theme] body .saved-card-tools>button:not([data-move]) {
  min-width:0;max-width:100%;white-space:normal;overflow-wrap:anywhere;
}
/* Long personal titles, notes, URLs and event names must not widen their grids. */
html[data-theme] body :is(.saved-title,.saved-reference,.saved-note,.saved-card p,
  .contacts-link>span:nth-child(2),.event-row__title,.event-sheet h2,
  .event-sheet [data-event-description],.compare-card h2,.compare-verse>span,
  .bible-search-result p) {min-width:0;overflow-wrap:anywhere;}
html[data-theme] body .bible-search-pagination {flex-wrap:wrap;}
html[data-theme] body .bible-search-pagination>a {
  font-size:13px!important;line-height:1.3!important;min-width:0;max-width:100%;
  white-space:normal;overflow-wrap:anywhere;
}
/* One readable legal line scale across the public screens. Text stays complete. */
html[data-theme] body[data-page] footer.b27-legal-footer,
html[data-theme] body[data-page] footer.legal,
html[data-theme] body[data-page] .footer,
html[data-theme] body.bible-v2 footer.b27-legal-footer,
html[data-theme] body:has(.calendar-app) footer.b27-legal-footer {
  font-size:11px!important;line-height:1.5!important;white-space:normal!important;
  overflow-wrap:anywhere!important;max-width:100%;
}

/* 80: the runtime swipe stage clips overflow; keep the whole selection inside it. */
html[data-theme] body[data-page][data-page="read"] .scripture .verse.selected {
  box-sizing:border-box!important;width:auto!important;max-width:100%!important;
  margin-left:0!important;margin-right:0!important;
  padding:10px 12px!important;border:0!important;border-radius:20px!important;
}

/* 79: the free reader's swipe stage clips its edges, so keep the tint inside it. */
html[data-theme] body.bible-v2[data-chapter-navigation="16"] .scripture-v2 .verse.selected {
  box-sizing:border-box!important;width:auto!important;max-width:100%!important;
  margin-left:0!important;margin-right:0!important;
  padding:8px 10px!important;border:0!important;
}
html[data-theme] body.bible-v2[data-chapter-navigation="16"] .scripture-v2 .verse.selected .verse-number {
  display:inline-flex!important;align-items:center!important;justify-content:center!important;
  position:static!important;box-sizing:border-box!important;
  width:max-content!important;min-width:2.1em!important;
  height:auto!important;min-height:2.1em!important;aspect-ratio:1 / 1!important;
  margin:0 .3em 0 0!important;padding:0 .2em!important;border:0!important;border-radius:50%!important;
  background:var(--section-accent,#ffc900)!important;color:var(--section-on,#2b250e)!important;
  font-weight:700!important;line-height:1!important;vertical-align:baseline!important;
  text-indent:0!important;letter-spacing:0!important;box-shadow:none!important;
  white-space:nowrap!important;
}
html[data-theme] body.bible-v2[data-chapter-navigation="16"] .scripture-v2 .verse.selected .verse-number::after {
  content:none!important;
}
