#anteprima .book-intro {
  text-align: center;
  margin: 0 auto 18px;
}

.book-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  max-width: 740px;
  margin: 0 auto 14px;
}

.book-controls[hidden] {
  display: none;
}

.book-controls .btn {
  padding: 10px 12px;
}

.book-controls .btn[aria-disabled="true"] {
  cursor: default;
  opacity: .48;
}

.book-controls label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #365d50;
  font-size: 14px;
}

.book-controls select {
  max-width: 100%;
  min-height: 40px;
  border: 1px solid #aabcb3;
  border-radius: 8px;
  background: #fff;
  color: #153f35;
  font: inherit;
  padding: 6px;
}

.book-status {
  margin: 0 0 12px;
  text-align: center;
  color: #365d50;
  font-size: 14px;
  font-weight: bold;
}

.book-stage {
  max-width: 840px;
  margin: auto;
  padding: clamp(12px, 3vw, 24px);
  border-radius: 16px;
  background: #103d34;
}

.book-pages {
  display: grid;
  grid-template-columns: minmax(0, 360px);
  justify-content: center;
  gap: 4px;
}

.book-pages.is-spread {
  grid-template-columns: repeat(2, minmax(0, 360px));
}

.book-page {
  min-width: 0;
  margin: 0;
  color: #365d50;
  background: #fff;
  border-radius: 5px;
  box-shadow: 0 3px 12px #07241f80;
  overflow: hidden;
  animation: book-turn .22s ease-out;
}

.book-page a, .book-page img {
  display: block;
}

.book-page a:focus-visible {
  outline: 3px solid #a47624;
  outline-offset: -3px;
}

.book-page img, .book-reserved {
  width: 100%;
  aspect-ratio: 210 / 297;
  height: auto;
  object-fit: contain;
}

.book-page figcaption {
  padding: 8px;
  text-align: center;
  font-size: 13px;
  border-top: 1px solid #e4e8e3;
}

.book-reserved {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 10px;
  padding: 14px;
  text-align: center;
  background: #faf7ef;
}

.book-reserved svg {
  width: 28px;
  height: 28px;
  color: #8a6625;
}

.book-reserved p {
  margin: 0;
  font-size: 14px;
}

.book-options {
  margin: 14px 0 0;
  text-align: center;
}

.book-options a {
  color: #0b5c4b;
}

@keyframes book-turn {
  from { opacity: .62; transform: translateX(4px); }
  to { opacity: 1; transform: translateX(0); }
}

@media (max-width: 680px) {
  .book-controls {
    justify-content: center;
  }

  .book-controls .btn {
    flex: 1 0 auto;
  }

  .book-controls label {
    order: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .book-page {
    animation: none;
  }
}

.book-zoom {
  box-sizing: border-box;
  width: min(880px, calc(100% - 24px));
  max-width: none;
  max-height: min(94vh, calc(100dvh - 24px));
  padding: 0;
  border: 1px solid #d8e3dc;
  border-radius: 14px;
  overflow: hidden;
  color: #153f35;
  background: #f4f7f3;
  box-shadow: 0 18px 60px #0006;
}

.book-zoom[open] { display: grid; grid-template-rows: auto minmax(0, 1fr); }
.book-zoom::backdrop { background: #071d18d9; }
body:has(.book-zoom[open]) { overflow: hidden; }

.book-zoom-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid #d8e3dc;
  background: #fffaf0;
}

.book-zoom-toolbar h2 { margin: 0; font-size: clamp(1rem, 3vw, 1.3rem); }

.book-zoom-close {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  gap: 8px;
  min-height: 44px;
  padding: 6px 12px;
  border: 1px solid #0b5c4b;
  border-radius: 9px;
  background: #0b5c4b;
  color: #fff;
  font: 700 .88rem/1.25 system-ui, sans-serif;
  cursor: pointer;
}

.book-zoom-close span { font-size: 1.25rem; }
.book-zoom-close:hover { background: #103d34; }
.book-zoom-close:focus-visible { outline: 2px solid #936a25; outline-offset: 3px; }

.book-zoom-image {
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
}

.book-zoom-image img {
  display: block;
  width: 100%;
  height: auto;
}

.book-stage {
  background: linear-gradient(#0b382de8, #0b382de8),
    #103d34 url("../../assets/filigrana-pianifichiamo.webp") center / 600px auto;
}
