.nb-shelf { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; gap: 1.6rem 1.7rem; max-width: 640px; margin: 0 auto; padding: 0 1rem; list-style: none; }
.nb-shelf > li { display: flex; justify-content: center; min-width: 0; }
@media (min-width: 980px) { .nb-shelf { grid-template-columns: repeat(6, minmax(0, 1fr)); max-width: 1180px; gap: 1.6rem 1.4rem; } }

.nb-item { display: flex; flex-direction: column; align-items: center; width: 100%; text-decoration: none; color: inherit; }
.nb-stand { position: relative; display: block; width: 100%; padding-bottom: 16px; }
.nb-stand::after { content: ""; position: absolute; left: 8%; right: 8%; bottom: 2px; height: 14px; background: radial-gradient(ellipse at center, rgba(60, 30, 30, 0.28) 0%, rgba(60, 30, 30, 0) 70%); }

.nb-book {
  --nb-cloth: #7a2e3a;
  --nb-foil: #e2c47c;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 150px;
  margin: 0 auto;
  aspect-ratio: 2 / 3;
  padding: 18% 13% 12% 13%;
  border-radius: 3px 7px 7px 3px;
  background-color: var(--nb-cloth);
  background-image: repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.05) 0 2px, transparent 2px 5px), repeating-linear-gradient(-45deg, rgba(0, 0, 0, 0.06) 0 2px, transparent 2px 5px), linear-gradient(90deg, rgba(0, 0, 0, 0.35) 0, rgba(0, 0, 0, 0.12) 9%, rgba(255, 255, 255, 0.14) 11%, transparent 15%, transparent 92%, rgba(0, 0, 0, 0.18) 100%);
  box-shadow: 4px 0 0 -1px #f5ecd8, 5px 0 0 -1px #d9cbb0, 7px 1px 0 -2px #f5ecd8, 8px 1px 0 -2px #cdbd9f, 0 14px 18px -12px rgba(40, 20, 20, 0.55);
  transform-origin: bottom center;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.nb-book::before { content: ""; position: absolute; left: 0; width: 11%; top: 9%; height: 4px; border-top: 1px solid var(--nb-foil); border-bottom: 1px solid var(--nb-foil); opacity: 0.75; transform-origin: right center; transform: skewY(14deg); }
.nb-book::after { content: ""; position: absolute; left: 11%; right: 0; top: 9%; height: 4px; border-top: 1px solid var(--nb-foil); border-bottom: 1px solid var(--nb-foil); opacity: 0.75; }

.nb-label { display: flex; flex-direction: column; align-items: center; gap: 0.35rem; width: 100%; padding: 0.7rem 0.4rem; text-align: center; }
.nb-title { font-family: "Libre Baskerville", Georgia, serif; font-size: clamp(0.78rem, 1.5vw, 1rem); font-weight: 700; line-height: 1.2; color: var(--nb-foil); }
.nb-year { font-family: "Libre Franklin", system-ui, sans-serif; font-size: 0.62rem; font-weight: 700; letter-spacing: 0.18em; color: var(--nb-foil); opacity: 0.85; }
.nb-author { font-family: "Mrs Saint Delafield", cursive; font-size: clamp(1rem, 2vw, 1.35rem); line-height: 1; color: var(--nb-foil); }

.nb-cta { margin-top: 0.9rem; font-family: "Libre Franklin", system-ui, sans-serif; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: #b81f58; border-bottom: 1px solid transparent; transition: border-color 0.2s; }

a.nb-item:hover .nb-book, a.nb-item:focus-visible .nb-book { transform: translateY(-8px) rotate(-2deg); box-shadow: 4px 0 0 -1px #f5ecd8, 5px 0 0 -1px #d9cbb0, 7px 1px 0 -2px #f5ecd8, 8px 1px 0 -2px #cdbd9f, 0 22px 24px -14px rgba(40, 20, 20, 0.6); }
a.nb-item:hover .nb-cta, a.nb-item:focus-visible .nb-cta { border-bottom-color: #b81f58; }
a.nb-item:focus-visible { outline: 3px solid #d6336c; outline-offset: 6px; border-radius: 4px; }

.nb-pp { --nb-cloth: #7a2e3a; }
.nb-emma { --nb-cloth: #c25a7c; --nb-foil: #fbe7c4; }
.nb-ss { --nb-cloth: #56704d; }
.nb-per { --nb-cloth: #2c6485; }
.nb-na { --nb-cloth: #2e2030; }
.nb-mp { --nb-cloth: #a8772b; --nb-foil: #fdf3dc; }

.nb-soon .nb-book { filter: grayscale(0.55) brightness(1.05); opacity: 0.72; }
.nb-soon-tag { position: absolute; left: 14%; right: -4px; bottom: 22%; padding: 0.3rem 0; background: #f6ecd6; border-top: 1px solid #d3bf94; border-bottom: 1px solid #d3bf94; font-family: "Libre Franklin", system-ui, sans-serif; font-size: 0.6rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; text-align: center; color: #5c4a2e; }
.nb-soon .nb-cta { color: #78716c; }


@media (max-width: 760px) {
  .nb-shelf { gap: 1.4rem 1.1rem; }
  .nb-book { max-width: 112px; }
  .nb-cta { font-size: 0.58rem; letter-spacing: 0.05em; white-space: nowrap; }
  .nb-book { padding: 16% 10% 10% 10%; }
  .nb-title { font-size: 0.66rem; }
  .nb-label { padding: 0.45rem 0.1rem; }
  .nb-soon-tag { font-size: 0.5rem; letter-spacing: 0.1em; white-space: nowrap; }
  .nb-soon .nb-cta { visibility: hidden; }
}

@media (prefers-reduced-motion: reduce) {
  .nb-book { transition: none; }
  a.nb-item:hover .nb-book, a.nb-item:focus-visible .nb-book { transform: none; }
}
