.cl-library {
  --books-ink: #512634;
  --books-muted: #634e4a;
  color: var(--books-ink);
  width: min(var(--container-wide), calc(100% - var(--layout-gutter) * 2));
  margin: clamp(2.4rem, 5vw, 5.2rem) auto;
}
.cl-library-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: .4rem 1.5rem;
  flex-wrap: wrap;
  margin-bottom: clamp(1.05rem, 2.4vw, 2rem);
}
.cl-library .cl-library-head h2 {
  margin: 0;
  color: var(--books-ink);
  font-size: clamp(1.75rem, 3.2vw, 3.35rem);
  line-height: 1.08;
  letter-spacing: -.045em;
  text-wrap: pretty;
}
.cl-library-detail figure { margin: 0; min-width: 0; }
.cl-library-detail figure img {
  display: block;
  width: 100%;
  height: auto;
  margin: 0;
  box-shadow: 1px 2px 3px #44241e33, 6px 12px 21px #44241e35;
}
.cl-library-label {
  margin: 0 0 .45rem;
  color: #73354a;
  font: 650 .71rem/1.5 var(--font-body, system-ui);
  letter-spacing: .12em;
  text-transform: uppercase;
}
.cl-library .cl-library-copy h3 {
  color: var(--books-ink);
  margin: 0 0 .6rem;
  font-size: clamp(1.52rem, 2.8vw, 3.05rem);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -.04em;
  text-wrap: pretty;
}
.cl-library .cl-library-subtitle, .cl-library-detail .cl-library-subtitle {
  margin: 0 0 .9rem;
  color: #6b3546;
  font-size: clamp(.95rem, 1.22vw, 1.13rem);
  font-style: italic;
  line-height: 1.45;
}
.cl-library .cl-library-description {
  margin: 0 0 1.08rem;
  color: var(--books-muted);
  font-size: .92rem;
  line-height: 1.65;
}
.cl-library .cl-library-cta {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: .56rem .9rem;
  gap: .5rem;
  color: #fffaf5;
  background: #652e42;
  font-size: .8rem;
  font-weight: 650;
  text-decoration: none;
}
.cl-library .cl-library-cta:hover { background: #4b1f2f; }
.cl-library :is(a, summary):focus-visible, .cl-library-detail a:focus-visible {
  outline: 2px solid #59253a;
  outline-offset: 4px;
}
.cl-library-reader { margin-top: .25rem; color: var(--books-ink); }
.cl-library-reader summary {
  width: fit-content;
  min-height: 44px;
  align-content: center;
  font-size: .8rem;
  cursor: pointer;
}
.cl-library-reader blockquote {
  margin: 0;
  padding-inline-start: .7rem;
  border-inline-start: 1px solid #b98d87;
  font-size: .83rem;
}
.cl-archive-subtitle { font-style: italic; }
.cl-archive-new .book-list__cover { height: auto; }
.cl-library-detail { width: min(91%, 1080px); margin: clamp(2rem, 6vw, 5rem) auto; }
.cl-library-back { display: inline-flex; min-height: 44px; align-items: center; margin-bottom: 1rem; }
.cl-library-detail-book {
  display: grid;
  align-items: center;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.55fr);
  gap: clamp(1.6rem, 5vw, 5rem);
  padding: clamp(1.4rem, 5vw, 4.5rem);
  background: #efe2d8;
}
.cl-library-detail-book img { max-width: 290px; }
.cl-library-detail-book h1 { margin: 0 0 .8rem; font-size: clamp(2rem, 5.2vw, 4.7rem); line-height: 1.02; text-wrap: pretty; }
.cl-library-detail-book p { max-width: 53ch; line-height: 1.65; }
.cl-library-status { border-top: 1px solid #d5b9b1; padding-top: .85rem; font-size: .88rem; }
@media (max-width: 1020px) { .cl-library-title-break { display: none; } }
@media (max-width: 560px) {
  .cl-library-detail-book { grid-template-columns: minmax(0, 1fr); }
  .cl-library-detail-book figure { max-width: 160px; }
  .cl-library .cl-library-description { font-size: .86rem; line-height: 1.54; }
}

.cl-library .cl-library-shelf {
  --books-ink: #542128;
  --books-muted: #634a45;
  display: grid;
  grid-template-columns: minmax(0, .86fr) minmax(0, 1.14fr);
  align-items: center;
  gap: clamp(1.25rem, 3vw, 3.25rem);
  padding: clamp(1.4rem, 4vw, 4.25rem);
  border-block: 1px solid #ddc8ba;
  background: radial-gradient(ellipse at 70% 22%, #fcf3e5 5%, transparent 62%),
              linear-gradient(160deg, #f3e7d9 16%, #ecdacd 64%, #f6f0e9 100%);
}
.cl-library-copy-panel {
  grid-area: 1 / 1;
  min-width: 0;
  max-width: 30rem;
}
.cl-library-copy-panel [hidden] { display: none; }
.cl-library-shelf .cl-library-copy h3 {
  font-size: clamp(2.15rem, 4.8vw, 4.9rem);
  margin-bottom: .72rem;
}
.cl-library-shelf .cl-library-label { color: #774631; }
.cl-library-shelf .cl-library-description { max-width: 44ch; }
.cl-library-shelf .cl-library-cta { background: var(--books-ink); }
.cl-library-display { grid-area: 1 / 2; min-width: 0; }
.cl-library-scene {
  --scene-height: clamp(17rem, 33vw, 31rem);
  --book-width: clamp(8.7rem, 16.3vw, 15.4rem);
  position: relative;
  height: var(--scene-height);
  overflow: clip;
  isolation: isolate;
  touch-action: pan-y;
}
.cl-library-scene::before {
  content: "";
  position: absolute;
  inset: 3% 12% 9%;
  border: 1px solid #aa735030;
  border-bottom: 0;
  border-radius: 48% 48% 0 0 / 69% 69% 0 0;
  background: radial-gradient(ellipse at 50% 32%, #fff8ebbb, #ead3be38 69%, transparent 83%);
  pointer-events: none;
}
.cl-library-plinth {
  position: absolute;
  z-index: 1;
  left: 50%;
  bottom: 8%;
  width: min(57%, 25rem);
  height: clamp(1.8rem, 4.2vw, 3.9rem);
  transform: translateX(-50%);
  border-radius: 50% / 25%;
  background: linear-gradient(90deg, #c0a184, #ebd8bc 31%, #dbc0a3 58%, #b18f74);
  box-shadow: 0 20px 24px -11px #60382971;
}
.cl-library-plinth::before {
  content: "";
  position: absolute;
  inset: 0 0 49%;
  border-radius: 50%;
  background: radial-gradient(ellipse at 50% 62%, #9d755578 1%, transparent 57%),
              linear-gradient(115deg, #e1c7ac, #f8e9d1 42%, #d2b091);
  border-bottom: 1px solid #a87d5c74;
}
.cl-library-volume {
  --angle: -19deg;
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 15%;
  width: var(--book-width);
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  perspective: 950px;
  transform: translateX(-50%);
  transition: left .5s ease, bottom .5s ease, transform .5s ease, opacity .4s ease;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.cl-library-volume[data-position="previous"], .cl-library-volume[data-position="next"] {
  z-index: 2;
  bottom: 19%;
  opacity: .8;
  transform: translateX(-50%) scale(.66);
}
.cl-library-volume[data-position="previous"] { left: 17%; --angle: -22deg; }
.cl-library-volume[data-position="next"] { left: 83%; --angle: 22deg; }
.cl-library-volume[data-position="next"] .cl-book-jacket::before {
  left: 0;
  background: linear-gradient(90deg, var(--jacket-edge), color-mix(in srgb, var(--jacket-edge), #fff 18%));
}
.cl-library-volume[data-position="active"] { cursor: default; }
.cl-library-volume:focus-visible, .cl-library-controls button:focus-visible, .cl-archive-volume:focus-visible {
  outline: 2px solid #633445;
  outline-offset: 4px;
}
.cl-library-volume--new { --jacket-edge: #aa7e52; }
.cl-library-volume--eremita { --jacket-edge: #43261b; }
.cl-book-jacket {
  --book-thickness: clamp(10px, 1.45vw, 21px);
  display: block;
  position: relative;
  transform: rotateY(var(--angle, -13deg));
  transform-origin: center;
  transform-style: preserve-3d;
  transition: transform .5s ease;
  border-radius: 2px 3px 3px 2px;
  background: var(--jacket-edge);
  box-shadow: .6rem .5rem 1.1rem #50311f36;
}
.cl-book-jacket::before {
  content: "";
  position: absolute;
  top: 1px;
  bottom: 1px;
  left: 100%;
  width: var(--book-thickness);
  transform: rotateY(90deg);
  transform-origin: left center;
  border-block: 2px solid var(--jacket-edge);
  background: repeating-linear-gradient(90deg, #d7c6ae 0 1px, #efe5d4 1px 3px);
}
.cl-book-jacket img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: inherit;
  pointer-events: none;
  user-select: none;
}
.cl-library-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  color: #633d36;
}
.cl-library-controls button {
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid #b78a79;
  border-radius: 50%;
  background: #fbf3e8;
  color: #542128;
  font: inherit;
  font-size: 1.24rem;
  cursor: pointer;
}
.cl-library-controls button[aria-disabled="false"]:hover { background: #efdece; }
.cl-library-controls button[aria-disabled="true"] { opacity: .52; cursor: default; }
.cl-library-count { min-width: 2.4rem; text-align: center; font-size: .79rem; }
.cl-library-announcement {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.cl-archive-volume { display: block; perspective: 500px; }
.cl-archive-volume .cl-book-jacket { --book-thickness: 8px; }

@media (max-width: 720px) {
  .cl-library .cl-library-shelf { grid-template-columns: minmax(0, 1fr); gap: 1.4rem; }
  .cl-library-display { grid-area: 1 / 1; }
  .cl-library-copy-panel { grid-area: 2 / 1; }
  .cl-library-scene {
    --scene-height: clamp(15rem, 69vw, 24rem);
    --book-width: clamp(7.7rem, 36vw, 12.4rem);
  }
  .cl-library-volume[data-position="previous"] { left: 14%; }
  .cl-library-volume[data-position="next"] { left: 86%; }
}
@media (prefers-reduced-motion: reduce) {
  .cl-library-volume, .cl-book-jacket { transition: none; }
}

.cl-library-shelf:not(.is-interactive) .cl-library-copy + .cl-library-copy { margin-top: 1.65rem; }
.cl-library-shelf:not(.is-interactive) .cl-library-controls,
.cl-library-shelf:not(.is-interactive) .cl-library-volume { display: none; }
.cl-library-fallback {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 15%;
  width: var(--book-width);
  transform: translateX(-50%);
  perspective: 950px;
}
.cl-library-shelf.is-interactive .cl-library-fallback { display: none; }
.cl-library-detail-book .cl-library-status { margin-top: 1.35rem; }
.cl-library-detail .cl-library-detail-book { color: #542128; }
.site-main .cl-archive-volume .cl-book-jacket img { max-width: 100%; }
