.book-toggle {
  transition: background-color 180ms ease, color 180ms ease;
}

body.bible-guide-shell {
  padding-bottom: 64px;
  padding-top: 88px;
}

body.bible-guide-shell > header.bible-guide-bar,
body.bible-guide-shell > footer.bible-guide-container {
  left: 0;
  max-width: 600px;
  position: fixed;
  width: 100%;
  z-index: 10000;
}

body.bible-guide-shell > header.bible-guide-bar {
  align-items: center;
  display: flex;
  height: 88px;
  justify-content: center;
  min-height: 88px;
  overflow: visible;
  padding: 0;
  top: 0;
}

body.bible-guide-shell > header.bible-guide-bar > a:first-child {
  align-items: center;
  display: flex;
  height: 100%;
  justify-content: center;
  width: 100%;
}

body.bible-guide-shell .bible-guide-logo-small {
  height: auto;
  margin: 0 auto;
  max-width: 180px;
  object-fit: contain;
  width: 45%;
}

body.bible-guide-shell > footer.bible-guide-container {
  bottom: 0;
  margin-top: 0 !important;
}

.bible-guide-header-back {
  animation: bible-guide-back-enter 260ms cubic-bezier(0.22, 1, 0.36, 1) both;
  background: #fff;
  font-weight: 500;
  opacity: 1;
  padding: 6px 12px;
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  transform-origin: center;
  transition:
    opacity 220ms ease,
    transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 1;
}

.bible-guide-header-back.is-leaving {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-50%) scale(0.96);
}

html[dir="rtl"] .bible-guide-header-back {
  left: 6px;
  right: auto;
}

@keyframes bible-guide-back-enter {
  from {
    opacity: 0;
    transform: translateY(-50%) scale(0.96);
  }

  to {
    opacity: 1;
    transform: translateY(-50%) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .bible-guide-header-back {
    animation: none;
    transition: none;
  }
}

.book-toggle:focus {
  outline: none;
}

.book-toggle:focus-visible {
  outline: 2px solid #009bb1;
  outline-offset: -2px;
}

.book-toggle:active {
  background-color: #f2f2f2;
}

.exploreLinks li.book-item {
  line-height: normal;
}

.book-disclosure {
  width: 100%;
}

.book-summary {
  align-items: center;
  box-sizing: border-box;
  color: #000;
  cursor: pointer;
  display: flex;
  font-family: 'Roboto', sans-serif;
  font-size: 14pt;
  font-weight: 500;
  height: 60px;
  justify-content: space-between;
  list-style: none;
  min-height: 60px;
  padding: 0 20px;
  user-select: none;
}

.book-summary::-webkit-details-marker {
  display: none;
}

.book-summary::marker {
  content: "";
}

.book-summary span {
  color: #000;
  text-decoration: none;
}

.book-summary:focus {
  outline: none;
}

.book-summary:focus-visible {
  outline: 2px solid #009bb1;
  outline-offset: -2px;
}

.book-summary:active {
  background-color: #f2f2f2;
}

.language-buttons {
  align-items: center;
  display: flex;
  flex-direction: column;
  gap: 12px;
  justify-content: center;
}

.language-buttons .bible-guide-button {
  display: inline-block;
  margin: 0 auto !important;
  text-align: center;
  text-decoration: none;
}

.app-version {
  bottom: 10px;
  color: #c9c9c9;
  font-family: 'Roboto', sans-serif;
  font-size: 9px;
  font-weight: 300;
  left: 0;
  line-height: 1;
  max-width: 600px;
  pointer-events: none;
  position: fixed;
  text-align: center;
  width: 100%;
}

.book-summary .chevron,
.exploreLinks li a .chevron {
  align-items: center;
  display: flex;
  float: right;
  height: 32px;
  justify-content: center;
  line-height: 1;
  margin-right: 20px;
  margin-top: 14px;
  padding-right: 0;
  text-align: center;
  width: 32px;
}

.book-summary .chevron {
  float: none;
  flex: 0 0 32px;
  margin: 0;
  padding: 0;
}

.book-item .chevron {
  transition: transform 240ms cubic-bezier(0.2, 0.8, 0.2, 1);
  transform: rotate(0deg);
  transform-origin: 50% 50%;
  will-change: transform;
}

.book-item.open .chevron,
.book-disclosure[open] .chevron {
  transform: rotate(180deg);
}

.book-panel {
  height: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  transform: translateY(-6px);
  transition:
    height 320ms cubic-bezier(0.2, 0.8, 0.2, 1),
    opacity 220ms ease,
    transform 280ms cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: height, opacity, transform;
}

.book-disclosure .book-panel {
  display: none;
  height: auto;
  opacity: 1;
  overflow: visible;
  pointer-events: auto;
  transform: none;
  transition: none;
  will-change: auto;
}

.book-disclosure[open] .book-panel {
  animation: bible-guide-panel-enter 180ms ease both;
  display: block;
}

.book-panel.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.book-panel-inner {
  min-height: 0;
  overflow: hidden;
}

.book-disclosure .book-panel-inner {
  overflow: visible;
}

.chapter-grid {
  --chapter-tile-size: 64px;
  display: grid;
  grid-template-columns: repeat(auto-fit, var(--chapter-tile-size));
  justify-content: center;
  gap: 20px clamp(16px, 4vw, 24px);
  line-height: 1;
  padding: 18px 22px 28px;
  width: 100%;
}

.chapter-grid .chapter-tile,
.exploreLinks li .chapter-tile {
  align-items: center;
  aspect-ratio: 1;
  border: 1px solid #20252a;
  border-radius: 7px;
  color: #20252a;
  display: flex;
  font-size: 26px;
  font-weight: 500;
  height: var(--chapter-tile-size);
  justify-content: center;
  margin: 0;
  padding: 0;
  text-decoration: none;
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    transform 160ms ease,
    box-shadow 160ms ease;
  width: var(--chapter-tile-size);
}

.chapter-grid .chapter-tile:hover,
.chapter-grid .chapter-tile:focus-visible {
  background-color: #f4fbfc;
  border-color: #009bb1;
  color: #006c7c;
  text-decoration: none;
}

.chapter-grid .chapter-tile:active {
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.14);
  transform: scale(0.96);
}

.chapter-grid .chapter-tile img {
  height: 32px;
  width: 32px;
}

.chapter-grid-status {
  color: #555;
  grid-column: 1 / -1;
  line-height: 1.4;
  padding: 8px 0;
  text-align: center;
}

.chapter-nav {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 10px 0 20px;
  width: 100%;
}

.chapter-nav a {
  margin: 0;
  text-decoration: none;
}

.chapter-nav-next {
  margin-left: auto !important;
}

.chapter-nav a:active {
  transform: scale(0.98);
}

@media (max-width: 420px) {
  .chapter-grid {
    --chapter-tile-size: 54px;
    gap: 14px;
    padding-left: 14px;
    padding-right: 14px;
  }

  .chapter-grid .chapter-tile,
  .exploreLinks li .chapter-tile {
    font-size: 22px;
  }

  .chapter-nav {
    align-items: stretch;
    flex-direction: column;
  }

  .chapter-nav-next {
    margin-left: 0 !important;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .chapter-grid .chapter-tile {
    animation: bible-guide-tile-enter 220ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
    animation-delay: calc(var(--tile-index, 0) * 12ms);
  }
}

@keyframes bible-guide-tile-enter {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes bible-guide-panel-enter {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.bible-guide-transitioning {
  overflow: hidden;
}

.bible-guide-transition-stage {
  background: #fff;
  bottom: 0;
  left: 0;
  overflow: hidden;
  position: fixed;
  right: 0;
  top: 0;
  z-index: 9999;
}

.bible-guide-transition-track {
  display: flex;
  height: 100%;
  transform: translate3d(var(--start-x, 0), 0, 0);
  width: 200vw;
  will-change: transform;
}

.bible-guide-transition-track.is-moving {
  transform: translate3d(var(--end-x, -100vw), 0, 0);
  transition: transform 440ms cubic-bezier(0.22, 1, 0.36, 1);
}

.bible-guide-transition-panel {
  background: #fff;
  flex: 0 0 100vw;
  height: 100%;
  overflow: hidden auto;
}

.bible-guide-transition-body {
  background: #fff;
  margin: 0;
  margin-left: var(--transition-body-left, 0);
  max-width: 100%;
  min-height: 100vh;
  width: var(--transition-body-width, 600px);
}

.bible-guide-transition-body > .bible-guide-transition-hidden {
  display: none !important;
}
