/* Homepage only: physical books, shared catalogue covers, no animation loop. */
.hero .hero-panel.cw-interactive-hero {
  display: grid;
  grid-template-columns: minmax(0,.92fr) minmax(0,1.08fr);
  height: auto;
  min-height: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid #e3e6eb;
  border-radius: 22px;
}
.hero .cw-interactive-hero::before { display: none; }
.hero .cw-interactive-hero .hero-copy { position: relative; align-self: center; padding: 40px 30px 40px 44px; }
.hero .hero-art.cw-bookshelf-art {
  position: relative;
  inset: auto;
  display: block;
  align-self: stretch;
  width: 100%;
  height: auto;
  min-height: 0;
  min-width: 0;
  box-sizing: border-box;
  padding: 28px 27px 12px;
  overflow: visible;
  background: radial-gradient(ellipse at 50% 8%,#475569 0%,#293241 58%,#202a39 100%);
  isolation: isolate;
}
.hero .cw-bookshelf-art::before,.hero .cw-bookshelf-art::after { display: none; }
.cw-bookshelf { --cover-width: 136px; --spine-width: 30px; width: 100%; min-width: 0; color: #fff; }
.cw-bookshelf-heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 16px; padding: 0 0 13px; }
.cw-bookshelf-heading small,.cw-bookshelf-heading .cw-shelf-kicker { font-size: 9px; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; color: #ffba9f; }
.cw-bookshelf-heading p,.cw-bookshelf-heading .cw-shelf-hint { margin: 0; font-size: 11px; line-height: 1.5; color: #dbe2ec; }
.cw-shelf-row { position: relative; padding: 10px 8px 0; margin: 0 0 9px; }
.cw-shelf-row::before {
  content: ""; position: absolute; left: -10px; right: -10px; bottom: 30px; height: 9px; z-index: 3; pointer-events: none;
  border-top: 1px solid #f0c29c;
  border-radius: 2px 2px 4px 4px;
  background: linear-gradient(#c3916e 0%,#9a6849 35%,#6a4835 100%);
  box-shadow: 0 11px 12px #09111c50, inset 0 1px #ffffff30;
}
.cw-shelf-row::after { content: ""; position: absolute; inset: 12px -4px 39px; z-index: -1; background: linear-gradient(#101b2a2b,transparent 45%,#101b2a57); border-radius: 4px; }
.cw-shelf-track { display: flex; align-items: flex-end; justify-content: center; gap: 4px; min-height: 248px; perspective: 1000px; perspective-origin: 50% 40%; }
.cw-shelf-book {
  position: relative;
  flex: 0 0 var(--spine-width);
  width: var(--spine-width);
  height: calc(var(--book-height,200px) + 38px);
  padding: 0;
  margin: 0;
  z-index: 2;
  transition: flex-basis 480ms cubic-bezier(.22,.75,.22,1),width 480ms cubic-bezier(.22,.75,.22,1);
}
.cw-shelf-book.is-open { flex-basis: var(--cover-width); width: var(--cover-width); z-index: 5; }
.cw-book-toggle {
  position: relative;
  display: block;
  width: 100%;
  height: var(--book-height,200px);
  margin: 0;
  padding: 0;
  appearance: none;
  background: transparent;
  border: 0;
  border-radius: 2px;
  cursor: pointer;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.cw-book-object {
  position: absolute;
  left: 0; bottom: 0;
  display: block;
  width: var(--cover-width);
  height: 100%;
  transform-style: preserve-3d;
  transform-origin: 0 50%;
  transform: rotateY(-90deg);
  transition: transform 580ms cubic-bezier(.2,.76,.23,1);
  pointer-events: none;
}
.cw-book-front,.cw-book-spine {
  position: absolute;
  left: 0; top: 0;
  display: block;
  height: 100%;
  box-sizing: border-box;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  background: var(--spine-color,#a54b37);
}
.cw-book-front { width: 100%; overflow: hidden; border-radius: 1px 4px 4px 1px; transform: translateZ(.6px); box-shadow: 5px 3px 0 -2px #d8d0bf, 7px 4px 0 -2px #979084, 9px 11px 20px #07101f70; }
.cw-book-front::after { content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; background: linear-gradient(90deg,#0003 0%,#fff1 3%,transparent 7%,transparent 96%,#0002); box-shadow: inset 0 0 0 1px #ffffff18; }
.cw-book-front img { position: relative; z-index: 1; display: block; width: 100%; height: 100%; max-width: none; margin: 0; padding: 0; border: 0; object-fit: cover; object-position: center; background: var(--spine-color,#a54b37); }
.cw-book-front > span { position: absolute; inset: 0; z-index: 0; display: flex; height: 100%; align-items: center; justify-content: center; padding: 16px; box-sizing: border-box; color: #fff; font: 700 15px/1.35 Georgia,serif; text-align: center; }
.cw-book-spine {
  width: var(--spine-width);
  padding: 10px 4px 24px;
  border-radius: 3px 1px 1px 3px;
  transform-origin: 0 50%;
  transform: rotateY(90deg);
  box-shadow: inset 2px 0 2px #ffffff37,inset -3px 0 4px #07101f55,2px 2px 5px #0005;
  background-image: linear-gradient(90deg,#fff1,transparent 20%,#0002 85%,#0004);
  color: #fff;
}
.cw-spine-title { display: block; overflow: hidden; max-height: 100%; margin: 0 auto; writing-mode: vertical-rl; text-orientation: mixed; font-size: 11px; line-height: 1.3; font-weight: 700; letter-spacing: .025em; text-align: left; }
.cw-book-spine small { position: absolute; bottom: 8px; left: 0; right: 0; padding-top: 5px; border-top: 1px solid #ffffff50; font: 700 8px/1 Georgia,serif; letter-spacing: .04em; text-align: center; }
.cw-shelf-book.is-open .cw-book-object { transform: translate3d(0,-9px,38px) rotateY(-6deg); }
.cw-book-view {
  position: absolute;
  bottom: 0; left: 0;
  display: inline-flex;
  align-items: center; justify-content: center; gap: 6px;
  width: 100%; min-height: 27px;
  box-sizing: border-box;
  padding: 4px 6px;
  border-radius: 5px;
  font-size: 10px; line-height: 1.3; font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  color: #fff;
  background: #ffffff12;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity 180ms ease,background-color 180ms ease;
}
.cw-shelf-book.is-open .cw-book-view { opacity: 1; visibility: visible; pointer-events: auto; transition-delay: 160ms,0ms; }
.cw-book-view:hover { color: #182638; background: #ffb69b; }
.cw-book-toggle:focus-visible { outline: 3px solid #ffb69b; outline-offset: 5px; }
.cw-book-view:focus-visible { outline: 2px solid #ffb69b; outline-offset: 2px; }
.cw-bookshelf-empty { min-height: 250px; display: grid; place-content: center; color: #dbe2ec; font-size: 14px; line-height: 1.6; text-align: center; }
@media (max-width:1100px) and (min-width:901px) {
  .cw-bookshelf { --cover-width: 117px; --spine-width: 25px; }
  .hero .hero-art.cw-bookshelf-art { padding-inline: 20px; }
  .hero .cw-interactive-hero .hero-copy { padding-inline: 30px 24px; }
}
@media (max-width:900px) {
  .hero .hero-panel.cw-interactive-hero { display: flex; flex-direction: column; height: auto; }
  .hero .cw-interactive-hero .hero-copy { width: 100%; box-sizing: border-box; padding: 32px 28px; }
  .hero .hero-art.cw-bookshelf-art { padding: 25px 26px 12px; }
  .cw-bookshelf { max-width: 550px; margin-inline: auto; }
}
@media (max-width:520px) {
  .hero .hero-art.cw-bookshelf-art { padding: 22px 15px 10px; }
  .cw-bookshelf { --cover-width: 110px; --spine-width: 24px; }
  .cw-bookshelf-heading { display: block; padding: 0 0 5px 3px; }
  .cw-bookshelf-heading p,.cw-bookshelf-heading .cw-shelf-hint { display: block; margin-top: 5px; font-size: 10px; }
  .cw-shelf-row { padding-inline: 0; }
  .cw-shelf-track { gap: 2px; min-height: 218px; }
  .cw-shelf-book { height: calc(var(--book-height,200px) - 28px + 38px); }
  .cw-book-toggle { height: calc(var(--book-height,200px) - 28px); }
  .cw-spine-title { font-size: 10px; }
  .cw-shelf-book.is-open .cw-book-object { transform: translate3d(0,-6px,18px) rotateY(-4deg); }
  .cw-shelf-row::before { left: -4px; right: -4px; }
}
@media (max-width:360px) {
  .cw-bookshelf { --cover-width: 94px; --spine-width: 21px; }
  .hero .hero-art.cw-bookshelf-art { padding-inline: 10px; }
  .cw-shelf-track { gap: 1px; }
}
@media (prefers-reduced-motion:reduce) {
  .cw-shelf-book,.cw-book-object,.cw-book-view { transition: none; }
  .cw-shelf-book.is-open .cw-book-object { transform: rotateY(0); }
}

.cw-bookshelf-note { margin: 8px 0 0; color: #dbe2ec; font-size: 10px; text-align: center; letter-spacing: .04em; }
