.biblioteca {
  --papel: #f5f1e7;
  --tinta: #29271e;
  --bronce: #745829;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--papel);
  color: var(--tinta);
  color-scheme: light;
}

.biblioteca :is(.privacy-header, .site-footer, .privacy-settings-panel) { color-scheme: dark; }
.biblioteca .site-footer { margin-top: auto; }

.biblioteca-main {
  width: min(1240px, calc(100% - clamp(40px, 8vw, 140px)));
  margin: auto;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  gap: clamp(35px, 6.5vw, 100px);
  align-items: center;
  padding-block: clamp(32px, 5.5vw, 86px);
}

.libro-estudio {
  position: relative;
  margin: 0;
  aspect-ratio: 9 / 10;
  display: grid;
  place-items: center;
  isolation: isolate;
  background: radial-gradient(ellipse at 33% 27%, #f0e9d6 0%, #e6ddc6 54%, #cdbf9f 100%);
}

.libro-grabado { position: absolute; inset: 0; width: 100%; height: 100%; color: #897244; }

/* Contact shadow under the standing volume on the studio floor. */
.libro-estudio::after {
  content: "";
  position: absolute;
  z-index: -1;
  left: 19%;
  bottom: 5%;
  width: 64%;
  height: 5%;
  border-radius: 50%;
  background: #796c50;
  opacity: .44;
  filter: blur(9px);
  transform: rotate(1deg);
}

.libro-escena {
  width: 63%;
  margin-left: 4%;
  container-type: inline-size;
  perspective: clamp(1150px, 150vw, 2200px);
}
.libro-volumen {
  /* The original print wrap has a 705-pixel spine next to a 1,800-pixel cover. */
  --grosor: 39.1667cqw;
  position: relative;
  aspect-ratio: 2 / 3;
  transform-style: preserve-3d;
  transform: rotateX(-18deg) rotateY(27deg) rotateZ(-3deg);
}

.libro-portada, .libro-contratapa {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 1px 2px 2px 1px;
}
.libro-portada {
  position: relative;
  object-fit: contain;
  background: #040407;
  backface-visibility: hidden;
}
.libro-contratapa {
  position: absolute;
  inset: 0;
  background: #171715;
  box-shadow: 3px 8px 16px #302b2230;
  transform: translateZ(calc(-1 * var(--grosor))) rotateY(180deg);
  backface-visibility: hidden;
}
.libro-canto {
  position: absolute;
  top: 1px;
  bottom: 1px;
  left: calc(100% - 1px);
  width: var(--grosor);
  background-color: #c8bda1;
  background-image: linear-gradient(to right, #796a5038, #e4d9b980 42%, transparent),
    repeating-linear-gradient(to right, #d1c6aa 0, #d1c6aa 1px, #a89a7a 1px, #c6b99b 2px);
  transform-origin: left center;
  transform: rotateY(90deg);
}
.libro-lomo {
  position: absolute;
  inset-block: 0;
  right: calc(100% - .5px);
  width: var(--grosor);
  display: block;
  height: 100%;
  transform-origin: right center;
  transform: rotateY(-90deg);
  backface-visibility: hidden;
}
.libro-cabeza {
  position: absolute;
  top: 1px;
  inset-inline: 1px;
  height: var(--grosor);
  background: linear-gradient(to right, #978b6c44, transparent 17%, #e5dcc822),
    repeating-linear-gradient(to bottom, #d2c7aa 0 1px, #b9ad90 1px 2px, #dacfb4 2px 3px);
  transform-origin: center top;
  transform: rotateX(-90deg);
}

.libro-ficha { padding: 0; }
.libro-ficha h1 {
  margin: 0;
  font: 400 clamp(54px, 6.1vw, 90px)/.94 Georgia, "Times New Roman", serif;
  letter-spacing: -.051em;
  color: #202117;
}
.libro-ficha h1 span { display: block; }
.libro-autor {
  margin: clamp(16px, 1.5vw, 24px) 0 0;
  color: var(--bronce);
  font: 400 clamp(17px, 1.55vw, 21px)/1.3 Georgia, "Times New Roman", serif;
}
.libro-formato {
  margin: 8px 0 0;
  color: #645c4c;
  font: 400 13px/1.5 system-ui, sans-serif;
}
.libro-entrada {
  margin: clamp(24px, 2.3vw, 36px) 0 0;
  padding-top: clamp(21px, 2vw, 30px);
  border-top: 1px solid #c8bda6;
  font: 400 clamp(21px, 1.9vw, 28px)/1.33 Georgia, "Times New Roman", serif;
  letter-spacing: -.017em;
}
.libro-ficha p:not([class]) { margin: 14px 0 0; color: #504b3e; font: 400 clamp(15px, 1.15vw, 17px)/1.65 system-ui, sans-serif; }
.libro-compra {
  margin-top: clamp(22px, 2vw, 32px);
  min-height: 44px;
  padding: 10px 27px;
  border: 1px solid #b0a691;
  border-radius: 2px;
  color: #585345;
  background: #e8e2d2;
  font: 600 14px/1.4 system-ui, sans-serif;
  cursor: default;
}

@media (max-width: 860px) {
  .biblioteca-main { width: min(90%, 560px); grid-template-columns: minmax(0, 1fr); gap: 30px; padding: 26px 0 46px; }
  .libro-estudio { aspect-ratio: .93; }
  .libro-escena { width: 61%; }
  .libro-ficha h1 { font-size: clamp(48px, 10vw, 66px); }
  .libro-ficha h1 span { display: inline; }
}

@media (max-width: 380px) {
  .libro-ficha h1 { font-size: 44px; }
}
