/* Contain the collection and isolate its transforms from the original shelf. */
html{height:auto;min-height:100%;overflow-x:clip;overflow-y:auto;scrollbar-gutter:stable}
body{height:auto;min-height:100vh;overflow:visible}
html:has(dialog[open]){overflow-y:hidden}
.library{min-height:760px;overflow:hidden}
.bookcase{perspective:1400px}
#featured-books{
  left:0;right:0;top:18%;width:100%;height:65%;
  transform:rotateY(var(--carousel-angle,0deg));
  transform-style:preserve-3d;perspective:none;
  animation:none;transition:none!important;
  touch-action:pan-y;
}
#featured-books .book{
  left:50%;top:50%;width:32%;max-width:190px;height:auto;aspect-ratio:2/3;
  transform:translate(-50%,-50%) rotateY(var(--book-angle)) translateZ(var(--carousel-radius,150px));
  transform-origin:center;backface-visibility:hidden;-webkit-backface-visibility:hidden;
  transition:filter .2s,box-shadow .2s;
  pointer-events:none;
}
#featured-books .book.is-facing{pointer-events:auto}
#featured-books .book:hover,#featured-books .book:focus-visible,#featured-books .book.tour-active{
  transform:translate(-50%,-50%) rotateY(var(--book-angle)) translateZ(var(--carousel-radius,150px));
}
#featured-books .book:nth-child(2n):hover,#featured-books .book:nth-child(2n):focus-visible{color:#141518}
#featured-books .book:nth-child(2n+1):hover,#featured-books .book:nth-child(2n+1):focus-visible{color:#ece8df}
.carousel-controls{bottom:4%;z-index:9}
.carousel-controls button{width:44px;height:44px;touch-action:manipulation}
.modern-intro #tour-button{background:transparent;border:0;border-bottom:1px solid #c6c8ca;border-radius:0;color:#686b70;padding:0 0 8px;box-shadow:none;letter-spacing:.15px}
.library-highlights li{position:relative}
.dialog-close{min-width:44px;min-height:44px;touch-action:manipulation}
.book-navigation button{min-height:44px;touch-action:manipulation}
.reader-book .book-binding{height:52px;min-height:52px;box-sizing:border-box}
.reader-book .book-bottom{height:58px;min-height:58px;box-sizing:border-box}
.reader-book .binding-source{display:none}
.reader-book .book-volume-nav button:focus-visible,.reader-book .page-controls button:focus-visible{outline-color:#f0dfbd}
.tour-panel{z-index:15}
@media(max-width:760px){
  .topbar{height:58px}
  .library{min-height:0;height:auto;overflow:visible}
  .modern-intro{order:0}
  .library-highlights{order:1}
  .room-wrap{order:2;height:500px;min-height:500px}
  .bookcase{top:4%;height:86%}
  #featured-books{top:18%;height:64%}
  #featured-books .book{width:34%;max-width:165px;height:auto;aspect-ratio:2/3}
  .motion-button{right:22px;bottom:6px}
  .tour-panel{position:relative;order:3;inset:auto;margin:0 16px}
  .cat{pointer-events:auto}
  .reader-book .book-binding{gap:5px;padding-left:4px;padding-right:46px}
  .reader-book .binding-title{font-size:12px;flex:1}
  .reader-book .book-volume-nav button{font-size:9px;padding:5px;min-height:44px}
  .reader-book .book-volume-nav{gap:3px}
}
@media(max-height:600px){
  .reader-book .paper-page{overflow-y:auto}
  .reader-book .page-media{flex:none;min-height:180px}
}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}}
