.library-view {
  gap: 20px;
}

.library-view.active {
  display: grid;
}

.library-reading-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px 18px;
  width: 100%;
  padding: 22px;
  border: 1px solid #d9cba9;
  border-radius: 22px;
  background: linear-gradient(145deg, #fffdf8, #f5efe2);
  color: inherit;
  text-align: left;
  box-shadow: 0 12px 34px rgba(64, 54, 35, .07);
}

.library-reading-entry:hover {
  border-color: #bda96f;
}

.library-entry-copy {
  display: grid;
  gap: 3px;
}

.library-entry-copy small {
  color: #9a7027;
  font-size: .72rem;
  font-weight: 850;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.library-entry-copy strong {
  color: #24494f;
  font: 700 1.75rem Georgia, serif;
}

.library-entry-copy > span:last-child {
  color: #657672;
  font-size: .88rem;
}

.library-entry-progress {
  display: flex;
  gap: 12px;
  align-items: center;
  color: #1f5964;
}

.library-entry-progress strong {
  font: 700 2rem Georgia, serif;
}

.library-entry-progress > span {
  font-size: 1.8rem;
}

.library-route-labels {
  display: flex;
  justify-content: space-between;
  grid-column: 1 / -1;
  color: #8a7040;
  font-size: .7rem;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.library-master-track {
  grid-column: 1 / -1;
  display: block;
  height: 16px;
  overflow: hidden;
  border: 1px solid #cfbea0;
  border-radius: 999px;
  background: #e9e1d2;
  box-shadow: inset 0 2px 5px rgba(68, 55, 34, .08);
}

.library-master-track > span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #315f56, #4b7d72);
  transition: width .35s ease;
}

.library-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.library-metric {
  padding: 12px 14px;
  border: 1px solid #e1d7c5;
  border-radius: 14px;
  background: #fffdf8;
}

.library-metric small,
.library-metric strong {
  display: block;
}

.library-metric small {
  color: #75817e;
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.library-metric strong {
  margin-top: 4px;
  color: #294b4f;
  font-size: 1.02rem;
}

.library-track-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.library-track-card {
  padding: 18px;
  border: 1px solid #ddd3c1;
  border-radius: 18px;
  background: #fffdf8;
}

.library-track-card header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.library-track-card small {
  color: #9a7027;
  font-size: .7rem;
  font-weight: 850;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.library-track-card h3 {
  margin: 4px 0 0;
  color: #294b4f;
  font: 700 1.2rem Georgia, serif;
}

.library-track-card .track-count {
  color: #1f5964;
  font-weight: 850;
}

.library-track-card .progress-track {
  margin: 14px 0 10px;
}

.library-track-card p {
  min-height: 38px;
  margin: 0 0 12px;
  color: #6c7b77;
  font-size: .83rem;
}

.library-track-card button {
  width: 100%;
}

.library-subhead {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
}

.library-subhead h2 {
  margin: 3px 0 5px;
}

.library-subhead p {
  max-width: 780px;
  margin: 0;
  color: #647572;
  line-height: 1.5;
}

.library-back-button {
  justify-self: start;
  padding: 8px 12px;
  border: 1px solid #d4c7b0;
  border-radius: 10px;
  background: #fffdf8;
  color: #31585d;
  font-weight: 800;
}

.library-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 14px;
  color: #71807c;
  font-size: .76rem;
}

.library-legend span {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.library-legend i {
  width: 12px;
  height: 12px;
  border: 1px solid #cfc7bb;
  border-radius: 3px;
  background: #ece9e2;
}

.library-legend .done i {
  border-color: #7fa89b;
  background: #4b7d72;
}

.library-legend .partial i {
  border-color: #c7a54b;
  background: #d9c16d;
}

.bible-book-picker {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.bible-book-tile {
  position: relative;
  display: grid;
  min-height: 132px;
  padding: 20px 10px 12px;
  overflow: hidden;
  border: 1px solid #d7d1c6;
  border-radius: 10px;
  background: #e5e2dc;
  color: #314d50;
  text-align: center;
}

.bible-book-tile:hover {
  transform: translateY(-1px);
  border-color: #bcae90;
}

.bible-book-tile.started {
  background: #f3edda;
}

.bible-book-tile.complete {
  background: #e0ebe6;
}

.book-progress-strip {
  position: absolute;
  inset: 0 0 auto;
  height: 7px;
  background: rgba(255,255,255,.65);
}

.book-progress-strip > span {
  display: block;
  height: 100%;
  background: #4b7d72;
}

.bible-book-tile.started .book-progress-strip > span {
  background: #c6a443;
}

.book-abbreviation {
  align-self: end;
  color: #294b4f;
  font-size: 1.55rem;
  font-weight: 700;
}

.book-full-name {
  align-self: start;
  margin-top: 4px;
  color: #6b7875;
  font-size: .7rem;
  line-height: 1.2;
}

.book-progress-text {
  align-self: end;
  margin-top: 9px;
  color: #516864;
  font-size: .72rem;
  font-weight: 800;
}

.library-book-detail-progress {
  margin: -2px 0 16px;
}

.chapter-picker {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.chapter-tile {
  min-height: 72px;
  border: 1px solid #d7d1c6;
  border-radius: 8px;
  background: #e6e3de;
  color: #4e5f5c;
  font-size: 1.25rem;
  font-weight: 700;
}

.chapter-tile.partial {
  border-color: #c7a54b;
  background: #f3e7b9;
  color: #735c1a;
}

.chapter-tile.done {
  border-color: #86aa9e;
  background: #dceae4;
  color: #285b51;
}

.chapter-tile:hover {
  transform: translateY(-1px);
}

@media (max-width: 1000px) {
  .bible-book-picker {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .library-track-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .library-reading-entry {
    grid-template-columns: 1fr auto;
    padding: 18px;
  }

  .library-entry-copy strong {
    font-size: 1.5rem;
  }

  .library-entry-progress strong {
    font-size: 1.65rem;
  }

  .library-metrics {
    grid-template-columns: 1fr;
  }

  .bible-book-picker {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .bible-book-tile {
    min-height: 112px;
  }

  .book-abbreviation {
    font-size: 1.35rem;
  }

  .chapter-picker {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
  }

  .chapter-tile {
    min-height: 62px;
  }
}


@media (max-width: 760px) {
  .mobile-nav {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    padding-left: 6px;
    padding-right: 6px;
  }

  .mobile-nav .nav-button {
    min-width: 0;
    padding-left: 2px;
    padding-right: 2px;
    font-size: .62rem;
  }

  .mobile-nav .nav-icon {
    font-size: 1.08rem;
  }
}
