/* Homepage shelf: a quiet burgundy reading-room ledge for verified covers. */
#books-preview .books-preview {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(1.15rem, 2.2vw, 1.8rem);
  padding-block: clamp(2.7rem, 5vw, 4.1rem);
}

#books-preview .books-preview__copy {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 1rem 2rem;
  width: 100%;
  max-width: none;
}

#books-preview .books-preview__copy-intro { min-width: 0; }

#books-preview .books-preview__copy .eyebrow { margin-bottom: .55rem; }

#books-preview .books-preview__copy h2 {
  max-width: none;
  margin: 0;
  font-size: clamp(2.2rem, 4.1vw, 3.7rem);
  letter-spacing: -.035em;
  line-height: .99;
}

#books-preview .books-preview__copy-intro > p:last-child {
  max-width: 42rem;
  margin: .55rem 0 0;
  color: var(--muted);
  font-size: clamp(.88rem, 1.15vw, 1rem);
  line-height: 1.5;
}

#books-preview .books-preview__copy > .button {
  min-height: 48px;
  margin: 0 0 .12rem;
  white-space: nowrap;
}

#books-preview .books-shelf-carousel {
  width: 100%;
  min-width: 0;
  --shelf-ink: #43151d;
  --shelf-gold: #987146;
  --shelf-paper: #f8f2e9;
}

#books-preview .books-shelf-carousel .prototype-carousel__stage {
  position: relative;
  height: clamp(320px, 34vw, 430px);
  min-width: 0;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid rgba(67, 21, 29, .22);
  border-radius: 2px;
  background:
    radial-gradient(ellipse at 50% 28%, rgba(255, 239, 223, .12), transparent 56%),
    linear-gradient(145deg, #68434b 0%, #593842 52%, #4b333b 100%);
  box-shadow: inset 0 1px 0 rgba(255, 246, 232, .12), 0 16px 34px rgba(46, 13, 19, .12);
}

#books-preview .books-shelf-carousel .prototype-carousel__stage::before { content: none; }

#books-preview .books-shelf-carousel .prototype-carousel__stage::after {
  right: 2.5%;
  bottom: 11.7%;
  left: 2.5%;
  height: 1.15rem;
  border-radius: 50%;
  background: rgba(17, 7, 10, .26);
  box-shadow: none;
  filter: blur(10px);
}

#books-preview .books-shelf-carousel .prototype-carousel__shelf-line {
  position: absolute;
  right: 2.5%;
  bottom: 13%;
  left: 2.5%;
  height: 1rem;
  border: 0;
  border-top: 1px solid rgba(255, 245, 224, .58);
  border-bottom: 3px solid #352126;
  background: linear-gradient(180deg, #c5a27a 0%, #a77c57 44%, #79563f 100%);
  box-shadow: 0 9px 15px rgba(20, 7, 10, .25), inset 0 1px 0 rgba(255, 250, 237, .28);
}

#books-preview .books-shelf-carousel .motion-track { z-index: 1; touch-action: pan-y; }

#books-preview .books-shelf-carousel .motion-slide {
  top: var(--shelf-center-y, 54%);
  transform-origin: center bottom;
}

#books-preview .books-shelf-carousel .motion-book {
  border: 1px solid rgba(54, 32, 31, .2);
  background: var(--shelf-paper);
  box-shadow: 6px 12px 20px rgba(17, 7, 10, .25), 1px 2px 2px rgba(17, 7, 10, .18);
}

#books-preview .books-shelf-carousel .motion-slide.is-active .motion-book {
  transform: scale(1.055);
  box-shadow: 9px 17px 25px rgba(17, 7, 10, .3), 0 0 0 1px rgba(245, 225, 199, .24);
}

#books-preview .books-shelf-carousel .motion-book:hover,
#books-preview .books-shelf-carousel .motion-book:focus-visible {
  box-shadow: 9px 17px 25px rgba(17, 7, 10, .3), 0 0 0 1px rgba(245, 225, 199, .3);
}

#books-preview .books-shelf-carousel .prototype-carousel__details {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1.25rem;
  margin: .85rem 0 0;
  padding: .8rem .1rem 0;
  border-top-color: rgba(67, 21, 29, .2);
}

#books-preview .books-shelf-carousel .prototype-carousel__details > div:first-child {
  min-width: 0;
  padding: 0;
}

#books-preview .books-shelf-carousel .prototype-carousel__details > div:first-child::before { content: none; }

#books-preview .books-shelf-carousel .prototype-carousel__eyebrow {
  margin: 0 0 .32rem;
  color: var(--shelf-gold);
  font-size: .64rem;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
}

#books-preview .books-shelf-carousel .prototype-carousel__details h3 {
  max-width: 34ch;
  margin: 0;
  color: var(--shelf-ink);
  font-size: clamp(1.35rem, 2.25vw, 1.85rem);
  line-height: 1.12;
  overflow-wrap: break-word;
}

#books-preview .books-shelf-carousel .prototype-carousel__translation,
#books-preview .books-shelf-carousel .prototype-carousel__meta {
  margin: .32rem 0 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}

#books-preview .books-shelf-carousel .prototype-carousel__translation {
  font-family: var(--serif);
  font-size: .9rem;
  line-height: 1.25;
}

#books-preview .books-shelf-carousel .prototype-carousel__meta { font-size: .7rem; }

#books-preview .books-shelf-carousel .prototype-carousel__actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: .45rem;
}

#books-preview .books-shelf-carousel .prototype-carousel__status {
  min-width: 6ch;
  margin: 0;
  padding: 0;
  border: 0;
  color: var(--muted);
  font-size: .69rem;
  letter-spacing: .08em;
  text-align: right;
}

#books-preview .books-shelf-carousel .prototype-carousel__buttons {
  display: flex;
  align-items: center;
  gap: .35rem;
}

#books-preview .books-shelf-carousel .prototype-carousel__button,
#books-preview .books-shelf-carousel .prototype-carousel__pause {
  display: inline-grid;
  flex: 0 0 44px;
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(67, 21, 29, .3);
  border-radius: 50%;
  background: transparent;
  color: var(--shelf-ink);
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease, transform .2s ease;
}

#books-preview .books-shelf-carousel .prototype-carousel__button svg { width: 1rem; height: 1rem; }

#books-preview .books-shelf-carousel .prototype-carousel__button:hover,
#books-preview .books-shelf-carousel .prototype-carousel__pause:hover {
  background: var(--shelf-ink);
  color: #fffaf1;
}

#books-preview .books-shelf-carousel .prototype-carousel__button:focus-visible,
#books-preview .books-shelf-carousel .prototype-carousel__pause:focus-visible {
  outline: 2px solid var(--shelf-gold);
  outline-offset: 3px;
}

#books-preview .books-shelf-carousel .prototype-carousel__pause {
  font-size: 0;
  border-radius: 50%;
}

#books-preview .books-shelf-carousel .prototype-carousel__pause::before {
  width: .72rem;
  height: .82rem;
  background: linear-gradient(90deg, currentColor 0 .17rem, transparent .17rem .52rem, currentColor .52rem .69rem);
  content: '';
}

#books-preview .books-shelf-carousel .prototype-carousel__pause[data-paused='true']::before {
  width: .7rem;
  height: .8rem;
  background: currentColor;
  clip-path: polygon(14% 0, 100% 50%, 14% 100%);
}

@media (max-width: 800px) {
  #books-preview .books-preview { gap: 1.2rem; padding-block: 2.8rem 3rem; }
  #books-preview .books-shelf-carousel .prototype-carousel__stage { height: clamp(300px, 42vw, 360px); }
}

@media (max-width: 600px) {
  #books-preview .books-preview { gap: 1rem; padding-block: 2.5rem 2.8rem; }
  #books-preview .books-preview__copy { grid-template-columns: minmax(0, 1fr); align-items: start; gap: .8rem; }
  #books-preview .books-preview__copy h2 { font-size: clamp(2rem, 9vw, 2.8rem); }
  #books-preview .books-preview__copy-intro > p:last-child { margin-top: .4rem; font-size: .88rem; }
  #books-preview .books-preview__copy > .button { justify-self: start; min-height: 46px; margin: 0; }
  #books-preview .books-shelf-carousel .prototype-carousel__stage { height: clamp(285px, 82vw, 330px); }
  #books-preview .books-shelf-carousel .prototype-carousel__stage::after { bottom: 10.3%; }
  #books-preview .books-shelf-carousel .prototype-carousel__shelf-line { right: 2%; bottom: 11.5%; left: 2%; height: .82rem; }
  #books-preview .books-shelf-carousel .prototype-carousel__details { grid-template-columns: minmax(0, 1fr); gap: .55rem; margin-top: .7rem; padding-top: .65rem; }
  #books-preview .books-shelf-carousel .prototype-carousel__details h3 { font-size: clamp(1.25rem, 5.7vw, 1.6rem); }
  #books-preview .books-shelf-carousel .prototype-carousel__actions { flex-direction: row; align-items: center; justify-content: space-between; gap: .6rem; }
}

@media (max-width: 360px) {
  #books-preview .books-preview { padding-block: 2.2rem 2.5rem; }
  #books-preview .books-shelf-carousel .prototype-carousel__stage { height: 278px; }
  #books-preview .books-shelf-carousel .prototype-carousel__buttons { gap: .25rem; }
}

@media (prefers-reduced-motion: reduce) {
  #books-preview .books-shelf-carousel .prototype-carousel__button,
  #books-preview .books-shelf-carousel .motion-book { transition: none; }
}
