.book-preview {
  width: min(100%, 36rem);
  min-width: 0;
  margin: 0 auto;
  scroll-margin-top: 1rem;
}
.book-preview [hidden] { display: none; }
.bp-stage, .bp-thumb { display: block; }
.bp-stage { touch-action: pan-y pinch-zoom; }
.book-preview img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
}
.bp-toolbar {
  display: flex;
  align-items: center;
  gap: clamp(.45rem, 1.7vw, 1rem);
  min-height: 3.3rem;
}
.bp-toolbar button {
  display: inline-grid;
  place-items: center;
  min-height: 44px;
  min-width: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--book-ink);
  font: inherit;
  cursor: pointer;
}
.bp-toolbar .bp-switch { font-weight: 600; }
.bp-status { color: var(--book-muted); font-size: .875rem; }
.bp-arrows { display: flex; margin-left: auto; }
.bp-arrows button { font-size: 1.4rem; }
.bp-toolbar button:hover { color: var(--book-ruby); }
.bp-thumbs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 4.5rem));
  gap: .5rem;
}
.bp-thumb {
  padding: 2px;
  border: 1px solid var(--book-rule);
}
.bp-thumb:hover, .bp-thumb[aria-current="true"] { border-color: var(--book-ruby); }
.bp-thumb[aria-current="true"] { box-shadow: inset 0 0 0 1px var(--book-ruby); }
.book-preview :focus-visible { outline: 2px solid var(--book-ruby); outline-offset: 2px; }
@media (max-width: 760px) {
  .book-preview { max-width: 29rem; }
}
