.books-intro { color: var(--muted); margin: -10px 0 32px; max-width: 42rem; font-size: 1.08rem; }
.book-shelf { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(16px, 2.5vw, 29px); }
.book-card { height: 100%; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 17px; overflow: hidden; background: linear-gradient(140deg, #312744, #23243c); box-shadow: 0 12px 32px #100e245c; }
.book-card img { aspect-ratio: 3 / 4; height: auto; object-fit: cover; object-position: 50% 40%; background: #1c1c31; }
.book-card:hover { border-color: var(--gold); }
.book-card:hover img { filter: brightness(1.07); }
.book-card-details { padding: 16px clamp(12px, 2vw, 21px) 19px; flex: 1; display: flex; flex-direction: column; justify-content: space-between; gap: 9px; }
.book-card-details h2 { font-size: clamp(1.3rem, 2.25vw, 2rem); }
.book-card-details p { margin: 0; font-size: .875rem; color: var(--gold); }

.book-title-row { margin-bottom: 23px; }
.book-title-row h1 { font-size: clamp(2.2rem, 4.3vw, 3.75rem); }
.book-reader { max-width: 1140px; margin-inline: auto; }
.book-stage {
  --paper-light: #fff5e3;
  --paper-shadow: #f0dfc1;
  --paper-ink: #342638;
  --binding: #614456;
  position: relative;
  isolation: isolate;
  scroll-margin-top: 12px;
  perspective: 2000px;
  touch-action: pan-y pinch-zoom;
  border-radius: 15px;
  box-shadow: 0 17px 46px #0a091caa, 0 4px 0 #9d7159, 0 8px 0 #543d47, 0 10px 0 #271d35;
}
.book-spread {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-height: clamp(455px, 64svh, 650px);
  isolation: isolate;
  border: 1px solid #fff5de72;
  border-radius: inherit;
  overflow: hidden;
  background: #f4e2c3;
}
.book-spread::after {
  content: "";
  position: absolute;
  inset: 0 calc(50% - 11px);
  z-index: 1;
  background: linear-gradient(90deg, transparent, #6e45542c 38%, #6a434466 49%, #fffaf48c 51%, transparent 98%);
  pointer-events: none;
}
.book-leaf { min-width: 0; min-height: 100%; overflow: hidden; }
.book-illustration {
  position: relative;
  display: grid;
  place-items: center;
  background: #e8d3b2;
  user-select: none;
}
.book-illustration img {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  object-fit: contain;
  object-position: center;
}
.book-paper {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(27px, 5vw, 69px);
  background: radial-gradient(ellipse at 70% 34%, #fff9ed 12%, var(--paper-light) 57%, var(--paper-shadow) 120%);
  color: var(--paper-ink);
}
.book-text { max-width: 34em; font: 500 clamp(1.18rem, 2vw, 1.55rem)/1.64 var(--serif); text-align: start; }
.book-text p { margin: 0; text-wrap: pretty; }
.book-text p + p { margin-top: .78em; }
.book-reader-bar {
  position: relative;
  z-index: 4;
  display: flex;
  justify-content: space-between;
  gap: .7rem clamp(12px, 3vw, 35px);
  flex-wrap: wrap;
  align-items: center;
  margin-top: 20px;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #23223b;
}
.book-controls { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: min(100%, 280px); margin-left: auto; }
.book-controls .counter { margin: 0; white-space: nowrap; font-size: .9rem; }
.book-controls .button { min-height: 44px; }
.book-listening { flex: 1 1 240px; max-width: 465px; }
.book-listening audio { width: 100%; height: 40px; display: block; }
.book-autoplay { display: flex; align-items: center; gap: 7px; margin: 4px 0 0; color: var(--muted); font-size: .875rem; }
.book-autoplay input { accent-color: var(--gold); width: 17px; height: 17px; }
.book-listening [role="status"] { margin: 6px 0 0; color: var(--gold); font-size: .875rem; }

.book-flip-static, .book-flip-sheet, .book-flip-face, .book-flip-mobile {
  position: absolute;
  inset-block: 0;
  pointer-events: none;
}
.book-flip-static, .book-flip-sheet { width: 50%; z-index: 2; }
.book-flip-static { overflow: hidden; border-radius: 15px; animation: book-leaf-away 520ms both; }
.book-flip-static.is-forward { left: 0; border-radius: 15px 0 0 15px; }
.book-flip-static.is-backward { right: 0; border-radius: 0 15px 15px 0; }
.book-flip-sheet { z-index: 3; transform-style: preserve-3d; }
.book-flip-sheet.is-forward { left: 50%; transform-origin: left center; animation: book-turn-forward 520ms cubic-bezier(.54,.05,.28,1) both; }
.book-flip-sheet.is-backward { right: 50%; transform-origin: right center; animation: book-turn-backward 520ms cubic-bezier(.54,.05,.28,1) both; }
.book-flip-face {
  width: 100%;
  inset-inline: 0;
  overflow: hidden;
  backface-visibility: hidden;
}
.book-flip-face.is-back { transform: rotateY(180deg); }
.book-flip-face::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #4f324353, transparent 35%, #fff7dc30 67%, #54394b35);
  mix-blend-mode: multiply;
}
.book-flip-mobile { inset-inline: 0; z-index: 2; border-radius: inherit; overflow: hidden; }
.book-flip-mobile .book-spread { border: 0; }
.book-flip-mobile.is-forward { transform-origin: left center; animation: book-phone-out 320ms ease-in-out both; }
.book-flip-mobile.is-backward { transform-origin: right center; animation: book-phone-back 320ms ease-in-out both; }
@keyframes book-leaf-away { 0%, 46% { opacity: 1; } 80%, 100% { opacity: 0; } }
@keyframes book-turn-forward { from { transform: rotateY(0deg); } to { transform: rotateY(-180deg); } }
@keyframes book-turn-backward { from { transform: rotateY(0deg); } to { transform: rotateY(180deg); } }
@keyframes book-phone-out {
  from { transform: rotateY(0deg); opacity: 1; }
  to { transform: rotateY(-36deg) translateX(-8%); opacity: 0; }
}
@keyframes book-phone-back {
  from { transform: rotateY(0deg); opacity: 1; }
  to { transform: rotateY(36deg) translateX(8%); opacity: 0; }
}

.book-feature { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); align-items: center; overflow: hidden; border: 1px solid var(--line); border-radius: 23px; background: radial-gradient(ellipse at 26% 48%, #57405e, transparent 60%), #242238; }
.book-feature-art { display: grid; place-items: center; padding: clamp(20px, 4vw, 45px); }
.book-feature-art img { width: min(70%, 200px); aspect-ratio: 3 / 4; height: auto; border: 1px solid #ffedcb88; border-radius: 8px; box-shadow: 0 14px 25px #1a1024ae; transform: rotate(-4deg); }
.book-feature-copy { padding: clamp(22px, 5vw, 62px) clamp(22px, 6vw, 75px) clamp(22px, 5vw, 62px) 0; }
.book-feature-copy p { color: var(--muted); margin: 13px 0 20px; max-width: 40ch; }

@media (max-width: 900px) {
  .book-shelf { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 650px) {
  .book-shelf { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .book-spread { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .book-spread::after { display: none; }
  .book-illustration { min-height: clamp(248px, 47svh, 435px); }
  .book-illustration img { object-fit: contain; }
  .book-paper { min-height: 0; padding: 20px clamp(16px, 5vw, 29px) 25px; box-shadow: inset 0 1px #ad80694a; }
  .book-text { font-size: clamp(1.11rem, 4.6vw, 1.3rem); line-height: 1.55; }
  .book-reader-bar {
    position: sticky;
    bottom: max(5px, env(safe-area-inset-bottom));
    margin-top: 13px;
    padding: 7px 10px;
    box-shadow: 0 5px 18px #14102698;
  }
  .book-listening { flex-basis: 100%; max-width: none; }
  .book-listening audio { height: 35px; }
  .book-controls { width: 100%; gap: 3px; min-width: 0; }
  .book-controls .button { padding-inline: 10px; }
  .book-controls .counter { font-size: .875rem; }
  .book-reading-page .masthead { min-height: 54px; }
  .book-reading-page .masthead nav { display: none; }
  .book-reading-page .interior { padding-top: 15px; }
  .book-reading-page .interior > .eyebrow { margin-bottom: 11px; }
  .book-title-row { margin-bottom: 11px; }
  .book-title-row h1 { font-size: clamp(1.65rem, 6.6vw, 2.2rem); }
  .book-feature { grid-template-columns: minmax(0, 1fr); }
  .book-feature-art { padding-bottom: 10px; }
  .book-feature-art img { width: min(55%, 155px); }
  .book-feature-copy { padding: 15px 22px 26px; }
}

@media (prefers-reduced-motion: reduce) {
  .book-flip-static, .book-flip-sheet, .book-flip-mobile { animation: none !important; }
}

.book-swipe-hint { display: none; }
@media (max-width: 650px) {
  .book-swipe-hint { display: block; color: var(--muted); font-size: .875rem; margin: 0 0 9px; }
}

.book-extra-editions { max-width: 1140px; margin: 1rem auto 0; flex-wrap: wrap; gap: .4rem 1rem; }
.book-extra-editions a { color: var(--gold); text-decoration: underline; text-underline-offset: .18em; }
