/* Collectanea V4.0.19 · one continuous cabinet, hard containment, independent cabinet zoom */

/* The library now contains one physical cabinet only. */
#libraryRoom .library-cases,
#libraryRoom .ct419-library-section{
  width:max-content!important;
  min-width:0!important;
  max-width:none!important;
  display:block!important;
  overflow:visible!important;
}
#libraryRoom .ct419-library-section{margin:0!important;padding:0 12px 34px!important}
#libraryRoom .ct419-single-bookcase,
#libraryRoom .ct419-single-bookcase.ct408-bookcase-bay{
  position:relative!important;
  box-sizing:border-box!important;
  flex:none!important;
  width:var(--ct419-cabinet-w)!important;
  min-width:var(--ct419-cabinet-w)!important;
  max-width:none!important;
  margin:0!important;
  padding:58px 42px 50px!important;
  overflow:hidden!important;
  scroll-snap-align:none!important;
}
#libraryRoom .ct419-bay-body{
  display:grid!important;
  grid-template-columns:1fr!important;
  gap:0!important;
  min-width:0!important;
  overflow:hidden!important;
}
#libraryRoom .ct419-real-shelf{
  width:100%!important;
  min-width:0!important;
  max-width:none!important;
  overflow:hidden!important;
  box-sizing:border-box!important;
}
#libraryRoom .ct419-shelf-back{
  display:flex!important;
  flex-wrap:nowrap!important;
  align-items:flex-end!important;
  justify-content:flex-start!important;
  gap:0!important;
  overflow:hidden!important;
  box-sizing:border-box!important;
  min-width:0!important;
  max-width:none!important;
}

/* Every book owns a fixed collision-safe slot calculated at the slider maximum (11 px/cm).
   The visible book can change size inside that slot, but its neighbours and the cabinet never move. */
#libraryRoom .ct419-shelf-back > .ct406-book-unit,
#libraryRoom .ct419-shelf-back > .ct408-book-unit{
  position:relative!important;
  flex:0 0 var(--unit-slot-w)!important;
  width:var(--unit-slot-w)!important;
  min-width:var(--unit-slot-w)!important;
  max-width:var(--unit-slot-w)!important;
  height:100%!important;
  max-height:100%!important;
  align-self:stretch!important;
  display:flex!important;
  align-items:flex-end!important;
  justify-content:flex-start!important;
  overflow:hidden!important;
  margin:0!important;
  padding:0!important;
  box-sizing:border-box!important;
}
#libraryRoom .ct419-shelf-back .book-spine-v2,
#libraryRoom .ct419-shelf-back .ct408-front-book{
  flex:none!important;
  max-width:100%!important;
  max-height:100%!important;
  overflow:hidden!important;
  box-sizing:border-box!important;
  transform:none!important;
}
#libraryRoom .ct419-shelf-back .ct408-front-cover{overflow:hidden!important}
#libraryRoom .ct419-shelf-back .spine-hover-title{display:none!important}

/* One outer frame means the side posts and top/bottom frame are absolute hard boundaries. */
#libraryRoom .ct419-single-bookcase:before,
#libraryRoom .ct419-single-bookcase:after{z-index:20!important;pointer-events:none!important}
#libraryRoom .ct419-single-bookcase .ct403-cornice,
#libraryRoom .ct419-single-bookcase .ct406-cornice,
#libraryRoom .ct419-single-bookcase .ct403-plinth,
#libraryRoom .ct419-single-bookcase .ct406-plinth{z-index:21!important;pointer-events:none!important}

/* Keep the V4.0.18 decision: no Gothic carving or tracery. */
#libraryRoom .ct404-gothic-cornice,
#libraryRoom .ct406-tracery-band,
#libraryRoom .ct404-lancet,
#libraryRoom .ct406-pilaster-detail,
#libraryRoom .ct409-carving-crown,
#libraryRoom .ct409-carving-pilaster,
#libraryRoom .ct404-gothic-base,
#libraryRoom .ct406-gothic-base,
#libraryRoom .ct409-carving-plinth{display:none!important}
#libraryRoom .ct406-bay-body:before,
#libraryRoom .ct403-cornice:before,#libraryRoom .ct403-cornice:after,
#libraryRoom .ct406-cornice:before,#libraryRoom .ct406-cornice:after{display:none!important;content:none!important}

/* Independent cabinet zoom. It scales the already-rendered cabinet + books, never the website shell. */
[data-room-zoom="shelf"].ct419-shelf-zoom-inline{
  display:flex!important;
  margin:0!important;
  padding:6px 8px!important;
  flex:1 1 260px!important;
  min-width:230px!important;
  max-width:520px!important;
  border-radius:7px!important;
}
.ct419-scale-toolbar{align-items:center!important;gap:9px!important}
.ct419-book-scale{display:flex!important;align-items:center!important;gap:8px!important;white-space:nowrap!important}
.ct419-shelf-viewport{
  width:100%!important;
  max-width:100%!important;
  overflow-x:auto!important;
  overflow-y:visible!important;
  overscroll-behavior-x:contain!important;
  -webkit-overflow-scrolling:touch!important;
  touch-action:pan-y!important; /* native page zoom disabled here; custom two-finger shelf zoom remains */
}
.ct419-shelf-zoom-content{
  display:block!important;
  width:max-content!important;
  max-width:none!important;
  transform:none!important;
  transform-origin:top left!important;
  transition:zoom .08s linear!important;
}
.ct419-pinching .ct419-shelf-zoom-content{transition:none!important}

.ct419-group-summary{
  display:flex!important;flex-wrap:wrap!important;gap:5px 8px!important;
  margin:0 8px 9px!important;max-width:var(--ct419-cabinet-w)!important;
}
.ct419-group-summary span{font:500 10px/1.2 system-ui,sans-serif;color:#6f675e;background:rgba(255,255,255,.62);border:1px solid rgba(68,57,46,.12);padding:4px 6px;border-radius:999px}

/* Daily collection object: richer preview text and one subordinate action. */
#view .today-object-teaser{
  display:-webkit-box!important;
  -webkit-box-orient:vertical!important;
  -webkit-line-clamp:5!important;
  overflow:hidden!important;
  color:#585249!important;
}
#view .today-object-open{margin-top:8px!important;min-height:34px!important;padding:6px 11px!important}

@media(max-width:760px){
  /* One cabinet: no bay grid, no horizontal bay carousel. The cabinet grows only by adding shelf rows downward. */
  #libraryRoom .library-cases,
  #libraryRoom .ct419-library-section{width:max-content!important;min-width:0!important}
  #libraryRoom .ct419-library-section{padding:0 4px 28px!important}
  #libraryRoom .ct419-single-bookcase,
  #libraryRoom .ct419-single-bookcase.ct408-bookcase-bay,
  #libraryRoom .ct419-single-bookcase.compact-shelves{
    width:var(--ct419-cabinet-w)!important;
    min-width:var(--ct419-cabinet-w)!important;
    max-width:none!important;
    padding:52px 28px 44px!important;
    overflow:hidden!important;
  }
  #libraryRoom .ct419-bay-body{gap:0!important}
  #libraryRoom .ct419-real-shelf{overflow:hidden!important}
  #libraryRoom .ct419-shelf-back{width:auto!important;min-width:0!important;max-width:none!important;overflow:hidden!important}
  #libraryRoom .ct406-orient-toggle,#libraryRoom .ct408-orient-toggle{display:none!important}
  .ct419-scale-toolbar{align-items:stretch!important}
  [data-room-zoom="shelf"].ct419-shelf-zoom-inline{flex:1 1 100%!important;max-width:none!important}

  /* "Heute in der Sammlung" uses the same compact left-image/right-data grammar as the weekly person. */
  #view .today-object{
    display:grid!important;
    grid-template-columns:108px minmax(0,1fr)!important;
    gap:20px!important;
    align-items:center!important;
    min-height:0!important;
    padding:17px!important;
    background:#fff!important;
    overflow:hidden!important;
  }
  #view .today-object-media,
  #view .today-object-media.p05-front-image,
  #view .today-object-media.p05-spine-fallback{
    width:108px!important;
    height:136px!important;
    min-height:136px!important;
    max-height:136px!important;
    border:0!important;
    border-radius:5px!important;
    box-shadow:0 12px 26px rgba(31,24,18,.14)!important;
    align-self:center!important;
  }
  #view .today-object-copy{
    padding:0!important;
    margin:0!important;
    align-self:center!important;
    background:#fff!important;
    min-width:0!important;
  }
  #view .today-object-copy h3{font-size:1.42rem!important;line-height:1.06!important;margin:5px 0 7px!important}
  #view .today-object-copy p{font-size:.90rem!important;line-height:1.4!important;margin:.22rem 0!important}
  #view .today-object-teaser{-webkit-line-clamp:5!important}
  #view .today-object:after{right:12px!important;top:9px!important;font-size:7px!important}
}

@media(prefers-reduced-motion:reduce){.ct419-shelf-zoom-content{transition:none!important}}
