/* Collectanea V4.0.10 · room zoom, tighter museum mounts, profile-first shelf controls, richer Gothic carving */

/* 1) Object page: shelf-orientation control should be visible immediately. */
.ct410-profile-display-inline{
  margin-top:14px;
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:10px 12px;
  padding:10px 12px;
  border:1px solid rgba(69,58,46,.14);
  border-radius:12px;
  background:linear-gradient(180deg,rgba(249,247,241,.96),rgba(244,241,234,.80));
}
.ct410-profile-display-kicker{
  font:600 .75rem/1.1 system-ui,sans-serif;
  color:#5f574d;
  letter-spacing:.02em;
}
.ct410-profile-display-inline small{
  color:#71685e;
  font-size:.74rem;
}

/* 2) Mobile room zoom. Kept unobtrusive on desktop, prominent on phones. */
.ct410-room-zoom-bar{
  position:relative;
  z-index:24;
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
  margin:6px 0 10px;
}
.ct410-room-zoom-label{
  color:#70685e;
  font-size:.78rem;
}
.ct410-room-zoom-buttons{
  display:inline-flex;
  gap:6px;
}
.ct410-room-zoom-buttons .secondary{
  min-width:42px;
  padding:8px 11px;
}
.ct410-room-zoom-readout{
  min-width:52px;
  text-align:right;
  color:#4f473f;
  font:600 .78rem/1 system-ui,sans-serif;
}
.ct410-room-viewport{
  overflow:auto;
  overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch;
}
.ct410-room-zoom-stage{
  transform-origin:top left;
}

/* 3) Library: keep books inside the shelf, reduce odd frame mismatch, strengthen carving. */
#libraryRoom .real-shelf,
#libraryRoom .ct406-real-shelf,
#libraryRoom .ct408-real-shelf{
  overflow:hidden!important;
}
#libraryRoom .shelf-back,
#libraryRoom .ct406-shelf-back,
#libraryRoom .ct408-shelf-back{
  overflow:hidden!important;
  align-items:flex-end!important;
}
#libraryRoom .ct408-book-unit,
#libraryRoom .ct406-book-unit,
#libraryRoom .book-spine-v2,
#libraryRoom .ct408-front-book{
  box-sizing:border-box!important;
}
#libraryRoom .book-spine-v2,
#libraryRoom .ct408-front-book{
  max-height:calc(var(--row-book-h, 320px) - 5px)!important;
}
#libraryRoom .ct408-front-book{
  overflow:hidden!important;
}
#libraryRoom .ct408-front-cover{
  inset:2px calc(var(--front-edge) + 1px) 2px 2px!important;
}
#libraryRoom .ct408-front-book.has-image .ct408-front-cover,
#libraryRoom .book-spine-v2.has-image{
  background-size:contain!important;
}
#libraryRoom .book-spine-v2.has-image{
  background-repeat:no-repeat!important;
  background-position:center!important;
}

/* richer Gothic language than simple pointed arches: small foils/tracery carved into the wood */
#libraryRoom .ct409-carving-crown,
#libraryRoom .ct409-carving-plinth{
  overflow:visible;
}
#libraryRoom .ct409-carving-crown::before,
#libraryRoom .ct409-carving-plinth::before{
  content:"";
  position:absolute;
  left:50%;
  top:50%;
  width:92px;
  height:22px;
  transform:translate(-50%,-52%);
  background:
    radial-gradient(circle at 12px 11px, rgba(16,8,4,.62) 0 5px, transparent 6px),
    radial-gradient(circle at 34px 11px, rgba(16,8,4,.62) 0 5px, transparent 6px),
    radial-gradient(circle at 58px 11px, rgba(16,8,4,.62) 0 5px, transparent 6px),
    radial-gradient(circle at 80px 11px, rgba(16,8,4,.62) 0 5px, transparent 6px);
  filter:drop-shadow(-1px -1px 0 rgba(225,185,135,.08)) drop-shadow(1px 1px 0 rgba(9,4,2,.40));
  opacity:.72;
  pointer-events:none;
}
#libraryRoom .ct409-carving-pilaster::before,
#libraryRoom .ct409-carving-pilaster::after{
  content:"";
  position:absolute;
  left:50%;
  width:12px;
  height:12px;
  transform:translateX(-50%) rotate(45deg);
  border-radius:3px;
  background:
    radial-gradient(circle at 28% 28%, rgba(11,5,2,.55) 0 33%, transparent 36%),
    radial-gradient(circle at 72% 28%, rgba(11,5,2,.55) 0 33%, transparent 36%),
    radial-gradient(circle at 28% 72%, rgba(11,5,2,.55) 0 33%, transparent 36%),
    radial-gradient(circle at 72% 72%, rgba(11,5,2,.55) 0 33%, transparent 36%);
  opacity:.68;
  pointer-events:none;
}
#libraryRoom .ct409-carving-pilaster::before{top:112px}
#libraryRoom .ct409-carving-pilaster::after{bottom:112px}
#libraryRoom .ct409-carving-crown i,
#libraryRoom .ct409-carving-plinth i,
#libraryRoom .ct409-carving-pilaster i{
  filter:saturate(.88) brightness(.74) contrast(1.1)!important;
}
#libraryRoom .ct406-cornice,
#libraryRoom .ct406-plinth{
  box-shadow:
    0 10px 15px rgba(22,13,8,.38),
    inset 0 2px 1px rgba(236,198,150,.08),
    inset 0 -9px 11px rgba(12,6,3,.34)!important;
}

/* 4) Museum: much tighter framing / mounting and less empty border around objects. */
#museumWrap .museum-object-v2{
  border-width:1px!important;
  padding:1px!important;
  box-shadow:0 3px 8px rgba(0,0,0,.11)!important;
}
#museumWrap .museum-object-v2:hover{
  box-shadow:0 7px 14px rgba(0,0,0,.16)!important;
}
#museumWrap .museum-object-v2 .object-mat{
  padding:1px!important;
  background:transparent!important;
  box-shadow:none!important;
}
#museumWrap .kind-sheet .object-mat,
#museumWrap .kind-special .object-mat,
#museumWrap .kind-scroll .object-mat,
#museumWrap .kind-codex .object-mat{
  padding:1px!important;
}
#museumWrap .kind-painting .object-mat{
  padding:3px!important;
  box-shadow:inset 0 0 0 1px rgba(31,20,12,.40)!important;
}
#museumWrap .museum-object-v2 .object-face{
  background-size:contain!important;
  background-repeat:no-repeat!important;
  background-position:center!important;
}
#museumWrap .ct403-museum-plaque,
#museumWrap .ct405-museum-plaque{
  transform:scale(.92);
  transform-origin:top center;
}

/* 5) Mobile ergonomics */
@media(max-width:760px){
  .ct410-room-zoom-bar{
    justify-content:space-between;
    margin:4px 0 10px;
    padding:0 2px;
  }
  .ct410-room-zoom-buttons .secondary{
    min-width:46px;
    min-height:42px!important;
    padding:8px 12px;
  }
  .ct410-room-zoom-label{font-size:.75rem}
  .ct410-room-viewport[data-room-zoom-kind="library"],
  .ct410-room-viewport[data-room-zoom-kind="museum"]{
    border-radius:14px;
  }
  .ct410-profile-display-inline{
    align-items:flex-start;
    flex-direction:column;
  }
  .ct410-profile-display-inline .ct409-display-switch{
    width:100%;
  }
  .ct410-profile-display-inline .ct409-display-switch button{
    flex:1;
  }
}

.ct410-room-zoom-buttons,.ct410-room-zoom-buttons .secondary{position:relative;z-index:25;pointer-events:auto}
