/* Case Club+ reading room bookshelf */
.library { padding-block: var(--s7) var(--s8); display: grid; gap: var(--s7); }
.meter { height: 18px; background: var(--snow); border: 2px solid var(--navy); border-radius: 18px; overflow: hidden; display: block; }
.meter span { display: block; height: 100%; background: var(--meadow); border-right: 2px solid var(--navy); }

.keep {
  display: grid; grid-template-columns: 120px 1fr; gap: var(--s5); align-items: center; text-decoration: none; color: var(--navy);
  background: var(--sun); border: var(--ink); border-radius: var(--r-tile); padding: var(--s5); box-shadow: 0 7px 0 var(--navy);
  transition: transform var(--t-fast) var(--ease-out);
}
.keep:hover { transform: translateY(-3px); }
.keep img { width: 120px; height: auto; border-radius: 8px; border: 3px solid var(--navy); transform: rotate(-4deg); box-shadow: 0 5px 0 rgba(24,33,88,.35); }
.keep__copy { display: grid; gap: var(--s3); justify-items: start; }
.keep__copy strong { font-family: var(--font-display); font-weight: 400; font-size: var(--text-xl); line-height: 1.05; }
.keep__copy .meter { width: min(100%, 360px); }
.keep__tag { background: var(--navy); color: var(--sun); font-family: var(--font-display); padding: 2px 12px; border-radius: 999px; }

.lib-note {
  display: grid; gap: var(--s5); align-items: center; background: var(--snow); border: var(--ink); border-radius: var(--r-tile);
  padding: var(--s5) var(--s6); box-shadow: 0 7px 0 var(--lake);
}
.lib-note img { width: 110px; justify-self: center; }
.lib-note h2 { font-size: var(--text-xl); margin-bottom: var(--s2); }
.lib-note p { margin-bottom: var(--s4); max-width: 56ch; }
@media (min-width: 700px) { .lib-note { grid-template-columns: 130px 1fr; } }

.shelf-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--s3); margin-bottom: calc(var(--s5) * -1); }
.shelf-head .section-title { margin: 0; }
.reward-chip { display: inline-flex; align-items: center; gap: var(--s2); background: var(--sun); border: 2px solid var(--navy); border-radius: 999px; padding: 6px 14px; font-weight: 700; margin: 0; }

/* the shelf: books stand on a wooden plank */
.shelf { list-style: none; display: grid; gap: var(--s7) var(--s6); grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); padding: 0 8px; }
.shelf__book { display: grid; gap: var(--s4); align-content: start; }
.shelf__cover {
  position: relative; display: grid; place-items: end center; padding: var(--s5) var(--s5) 0; min-height: 280px;
  background: linear-gradient(#ffe9b8, #ffd98a); border: var(--ink); border-radius: 22px 22px 6px 6px;
}
.shelf__cover::after {
  content: ""; position: absolute; left: -8px; right: -8px; bottom: -14px; height: 20px;
  background: #b5652b; border: var(--ink); border-radius: 6px; box-shadow: 0 6px 0 var(--navy);
}
.shelf__cover img {
  width: 62%; height: auto; border-radius: 6px 10px 10px 6px; border: 3px solid var(--navy);
  box-shadow: inset 6px 0 0 rgba(0,0,0,.15), 0 4px 0 rgba(24,33,88,.3); transform: rotate(-2deg); position: relative; z-index: 1;
  transition: transform var(--t-med) var(--ease-pop);
}
.shelf__cover:hover img, .shelf__cover:focus-visible img { transform: rotate(0) translateY(-10px) scale(1.04); }
.stamp {
  position: absolute; top: 14px; right: 14px; z-index: 2; background: var(--snow); border: 3px solid var(--navy); border-radius: 999px;
  font-family: var(--font-display); padding: 4px 12px; transform: rotate(6deg); box-shadow: 0 3px 0 var(--navy);
}
.stamp--done { background: var(--meadow); color: var(--snow); }
.stamp--free { background: var(--sun); }
.shelf__info { display: grid; gap: var(--s2); justify-items: start; padding-top: var(--s3); }
.shelf__info h3 { font-size: var(--text-lg); line-height: 1.1; }
.shelf__info p { margin: 0; font-size: .98rem; }
.shelf__sub { font-weight: 700; color: var(--tie-dark); }
.shelf__info .meter { width: 100%; height: 14px; }
.shelf__more { font-size: .85rem; }
