/* Theology EPUB library */
.epub-heading { padding-bottom: 1rem; }
.book-count {
  display: inline-block;
  margin: .5rem 0 0;
  padding: .35rem .85rem;
  border: 1px solid #cbd7d9;
  border-radius: 999px;
  color: var(--muted);
  font-size: .85rem;
}
.book-library { padding-bottom: 4.5rem; }
.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(205px, 1fr));
  gap: clamp(1.25rem, 2.6vw, 2rem);
}
.book-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid #d4dfe1;
  border-radius: 14px;
  background: #f8faf9;
  box-shadow: 0 8px 22px rgb(34 51 57 / 7%);
  transition: transform .2s ease, box-shadow .2s ease;
}
.book-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgb(34 51 57 / 12%);
}
.book-cover-link {
  display: block;
  padding: 1rem 1rem .5rem;
  background: linear-gradient(180deg, #e8eef0 0%, #f8faf9 100%);
  text-align: center;
}
.book-cover {
  display: block;
  width: min(100%, 220px);
  height: 270px;
  margin-inline: auto;
  object-fit: contain;
  filter: drop-shadow(0 7px 7px rgb(25 39 46 / 17%));
}
.book-details {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  padding: .85rem 1rem 1.1rem;
}
.book-details h2 {
  margin: 0;
  color: var(--green-dark);
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.35;
}
.book-author {
  margin: .4rem 0 1rem;
  color: var(--muted);
  font-size: .88rem;
}
.book-download {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  margin-top: auto;
  padding: .55rem .85rem;
  border: 1px solid #b9c9cc;
  border-radius: 999px;
  color: var(--green-dark);
  background: #edf4f5;
  font-size: .82rem;
  font-weight: 600;
  text-decoration: none;
  transition: background .2s ease, transform .2s ease;
}
.book-download:hover { background: #e0ebed; transform: translateY(-1px); }
.book-download:focus-visible, .book-cover-link:focus-visible {
  outline: 3px solid var(--green-dark);
  outline-offset: 3px;
}
.library-note {
  max-width: 700px;
  margin: 2rem 0 1.25rem;
  color: var(--muted);
  font-size: .9rem;
}
@media (max-width: 520px) {
  .book-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem; }
  .book-cover-link { padding: .7rem .6rem .35rem; }
  .book-cover { height: 205px; }
  .book-details { padding: .7rem .75rem .85rem; }
  .book-details h2 { font-size: 1rem; }
  .book-author { font-size: .8rem; }
  .book-download { padding: .5rem .65rem; font-size: .75rem; }
}
