.library-body {
  background: #fff8ed;
  color: #493d60;
}
.library-main {
  max-width: 1240px;
  margin: auto;
  padding: 25px 40px 80px;
}
.shelf-intro {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 35px 0 42px;
}
.shelf-intro h1 {
  font-size: clamp(38px, 5vw, 65px);
  margin: 10px 0 15px;
}
.shelf-intro p:not(.wonder-kicker) {
  font-size: 16px;
  color: #796b82;
}
.shelf-doodle {
  font-size: 130px;
  color: #dcb963;
  line-height: 1;
  padding-right: 30px;
}
.shelf-tools {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
  padding: 18px 0 24px;
  border-bottom: 1px solid #e2d5db;
}
.shelf-tools nav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.shelf-tools nav a {
  padding: 13px 20px;
  border-radius: 30px;
  background: #f1e9f2;
  font-weight: 800;
  font-size: 14px;
}
.shelf-tools nav a[aria-current] {
  background: #5b4d73;
  color: #fff8ed;
}
.book-search {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  font-weight: 800;
}
.book-search input {
  font:
    16px "Nunito",
    sans-serif;
  padding: 12px 17px;
  border: 1px solid #d9ccdf;
  border-radius: 14px;
  background: #fffdfa;
  color: #493d60;
  min-width: 260px;
}
.library-status {
  font-size: 13px;
  color: #7a6c7f;
  margin: 22px 0;
}
.book-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 36px 24px;
}
.shelf-book {
  display: flex;
  flex-direction: column;
  min-width: 0;
  transition: transform 0.2s;
}
.shelf-book:hover {
  transform: translateY(-5px);
}
.shelf-cover {
  position: relative;
  aspect-ratio: 4/5;
  border-radius: 7px 20px 20px 7px;
  overflow: hidden;
  background: #e7dbea;
  box-shadow:
    5px 6px 0 #d8cacc,
    0 12px 22px #59415d22;
}
.shelf-cover:after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    #342c4b30,
    transparent 6%,
    #ffffff60 7%,
    transparent 9%
  );
  pointer-events: none;
}
.shelf-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.book-number {
  position: absolute;
  left: 16px;
  top: 16px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #fff9e8e8;
  color: #514462;
  font-size: 12px;
  font-weight: 900;
}
.shelf-book h2 {
  font-size: 23px;
  line-height: 1.15;
  margin: 20px 0 10px;
}
.shelf-book p {
  font-size: 12px;
  color: #7c6c81;
  margin-bottom: 12px;
}
.open-book {
  font-size: 13px;
  font-weight: 900;
  margin-top: auto;
}
.art-missing:before {
  content: "✦";
  display: grid;
  place-items: center;
  height: 100%;
  font-size: 70px;
  color: #b18a72;
}
.daily-story-clock {
  display: none !important;
}
.shelf-abby .shelf-tools nav a[aria-current] {
  background: #315f64;
}
.shelf-abby .shelf-doodle {
  color: #64928d;
}
@media (max-width: 850px) {
  .book-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .shelf-tools {
    align-items: start;
    flex-direction: column;
  }
  .shelf-doodle {
    display: none;
  }
}
@media (max-width: 550px) {
  .library-main {
    padding: 0 22px 60px;
  }
  .shelf-intro {
    padding: 25px 0;
  }
  .shelf-intro h1 {
    font-size: 39px;
  }
  .book-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px 18px;
  }
  .shelf-book h2 {
    font-size: 20px;
  }
  .book-search,
  .book-search input {
    width: 100%;
    min-width: 0;
  }
  .shelf-tools nav a {
    font-size: 12px;
    padding: 12px 14px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .shelf-book {
    transition: none;
  }
  .shelf-book:hover {
    transform: none;
  }
}

.atlas-frame {
  position: relative !important;
  overflow: hidden !important;
  aspect-ratio: var(--art-aspect, 1.5) !important;
}
img[data-atlas="true"] {
  position: absolute !important;
  width: 200% !important;
  height: var(--art-height, 300%) !important;
  max-width: none !important;
  max-height: none !important;
  left: calc(var(--art-column) * -100%) !important;
  top: var(--art-top, 0%) !important;
  object-fit: fill !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}
