.hub-reader {
  --ink: #123158;
  --blue: #246de6;
  --gold: #b78a38;
  width: min(1040px, 100%);
  margin: 20px auto 44px;
  scroll-margin-top: 108px;
  color: var(--ink);
}
.hub-reader button { font: inherit; cursor: pointer; }
.hub-reader :focus-visible { outline: 3px solid #246de6; outline-offset: 5px; }
.hub-reader button:disabled { cursor: default; }
.hub-vitrine {
  position: relative;
  display: grid;
  place-items: center;
  isolation: isolate;
  height: clamp(255px, 47vw, 465px);
  overflow: hidden;
}
.hub-orbit {
  position: absolute;
  width: 80%;
  height: 52%;
  top: 35%;
  border: 1px solid #b78a3845;
  border-radius: 50%;
  transform: rotate(-12deg);
  pointer-events: none;
  background: radial-gradient(ellipse, #d8e6fd65, transparent 66%);
}
.hub-orbit::after {
  content: "";
  position: absolute;
  inset: 11% 8%;
  border: 1px solid #779acb35;
  border-radius: inherit;
}
.hub-cover-stage {
  position: absolute;
  inset: 0;
  perspective: 980px;
  transform-style: preserve-3d;
  touch-action: pan-y;
  z-index: 1;
}
.hub-cover {
  position: absolute;
  inset: 50% auto auto 50%;
  width: clamp(111px, 27vw, 255px);
  aspect-ratio: .72;
  padding: 0;
  border: 1px solid #9baec7;
  border-radius: 4px 9px 9px 4px;
  background: #10223c;
  box-shadow: 7px 3px 0 #203d64, 9px 4px 0 #b9c6d8, 10px 22px 30px #10254054;
  transform: translate(-50%, -50%)
    translate3d(calc(var(--orbit-x, 0) * clamp(105px, 30vw, 350px)),
      calc(var(--orbit-depth, 0) * -62px), calc(var(--orbit-depth, 0) * -250px))
    rotateY(var(--orbit-tilt, -9deg)) rotateZ(-6deg);
  filter: brightness(calc(1 - var(--orbit-depth, 0) * .25));
  box-shadow: 2px 2px 0 #c1a978, 6px 3px 0 #304a6c, 9px 5px 0 #122b4d, 12px 22px 32px #10254048;
}
.hub-cover img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.hub-cover::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(90deg, #0005, transparent 8%, transparent 96%, #fff3); pointer-events: none; }
.hub-cover[aria-current="true"] { filter: none; opacity: 1; }
.hub-cover:disabled { pointer-events: none; }
.hub-orbit-arrow, .hub-book button {
  display: grid;
  place-items: center;
  border: 1px solid #cad9ef;
  border-radius: 50%;
  color: var(--ink);
  background: #fff;
  width: 46px;
  height: 46px;
}
.hub-orbit-arrow {
  position: absolute;
  top: calc(50% - 23px);
  z-index: 3;
  box-shadow: 0 6px 24px #16375d1c;
  font-size: 30px !important;
}
.hub-orbit-arrow:disabled, .hub-book button:disabled { opacity: .35; }
.hub-orbit-prev { left: clamp(3px, 4%, 46px); }
.hub-orbit-next { right: clamp(3px, 4%, 46px); }
.hub-publication { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; column-gap: 24px; row-gap: 12px; }
.hub-publication-info { text-align: center; }
.hub-publication small, .hub-book-top small { color: #805d21; font-size: 12px; letter-spacing: .09em; }
.hub-publication h2, .hub-book-top h2 { margin: 3px 0 0; font-size: clamp(17px, 2.4vw, 26px); color: var(--ink); }
.hub-open-book { padding: 11px 20px; min-height: 44px; border: 0; border-radius: 99px; background: var(--blue); color: #fff; }
.hub-open-book span { margin-left: 8px; }
.hub-archive-status { font-size: 13px; }
html.hub-book-open { overflow: hidden; }
.hub-book {
  box-sizing: border-box;
  width: min(1050px, calc(100vw - 22px));
  max-height: calc(100dvh - 18px);
  padding: clamp(12px, 2.3vw, 25px);
  border: 1px solid #c9d8ef;
  border-radius: 20px;
  color: var(--ink);
  background: #f7f9fe;
  box-shadow: 0 22px 100px #06152a88;
}
.hub-book::backdrop { background: #071426c9; backdrop-filter: blur(7px); }
.hub-book-top, .hub-book-controls { display: flex; align-items: center; gap: 12px; }
.hub-book-top { text-align: left; margin-bottom: 12px; }
.hub-book-top div { flex: 1; min-width: 0; }
.hub-book-top h2 { overflow-wrap: anywhere; }
.hub-book-top a { color: #1b5fbf; white-space: nowrap; font-size: 14px; }
.hub-book button { font-size: 20px; }
.hub-book-stage {
  --page-width: min(43vw, 48vh, 450px);
  position: relative;
  width: calc(2 * var(--page-width));
  margin: 0 auto;
  perspective: 1350px;
  touch-action: pan-y;
}
.hub-book-pages { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); filter: drop-shadow(0 13px 15px #1229473d); }
.hub-paper {
  display: grid;
  place-items: center;
  aspect-ratio: .72;
  min-width: 0;
  background-color: #fffdf8;
}
.hub-paper img { width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.hub-paper:nth-child(odd) { border-radius: 4px 0 0 4px; box-shadow: inset -12px 0 16px -17px #07172b; }
.hub-paper:nth-child(even) { border-radius: 0 4px 4px 0; box-shadow: inset 12px 0 16px -17px #07172b; }
.hub-paper.hub-paper-empty { background: transparent; box-shadow: none; }
.hub-book-stage { transition: transform 620ms cubic-bezier(.25,.7,.2,1); }
.hub-closed-book { transform: translateX(-25%); }
.hub-closed-book .hub-paper:last-child {
  border-radius: 4px 10px 10px 4px;
  box-shadow: 4px 3px 0 #d6c9b2, 8px 6px 0 #233850;
}
.hub-curl { position: absolute; inset: 0; transform-style: preserve-3d; pointer-events: none; }
.hub-curl::before {
  content: "";
  position: absolute;
  inset: 2% 0;
  background: radial-gradient(ellipse at center, #102540, transparent 69%);
  opacity: var(--cast-shadow, 0);
}
.hub-curl-slice {
  position: absolute;
  inset: 0 auto 0 0;
  width: calc(100% / 2 / var(--slice-count));
  transform-style: preserve-3d;
}
.hub-curl-face {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #fffdf8;
  backface-visibility: hidden;
}
.hub-curl-face img {
  position: absolute;
  inset: 0 auto 0 calc(-1 * var(--page-width) / var(--slice-count) * var(--column));
  width: var(--page-width);
  height: 100%;
  max-width: none;
  object-fit: contain;
}
.hub-curl-face::after { content: ""; position: absolute; inset: 0; background: rgb(24 31 42 / var(--shade, 0)); }
.hub-curl-back { transform: rotateY(180deg); }
.hub-curl-back.hub-paper-empty { visibility: hidden; }
.hub-book-controls { justify-content: center; margin-top: 12px; }
.hub-book-controls output { min-width: 78px; text-align: center; font-variant-numeric: tabular-nums; }
@media (max-width: 660px) {
  .hub-book-stage { --page-width: min(82vw, 49vh); width: var(--page-width); }
  .hub-book-pages { grid-template-columns: minmax(0, 1fr); }
  .hub-closed-book { transform: none; }
  .hub-curl-slice { width: calc(100% / var(--slice-count)); }
  .hub-cover { width: clamp(108px, 37vw, 195px); }
}
@media (prefers-reduced-motion: reduce) { .hub-book-stage { transition: none; } }
