/* Collectanea V4.0.6 · library joinery, Gothic refinement, contiguous books, horizontal books */
:root{
  --ct406-walnut-hi:rgba(214,171,125,.10);
  --ct406-walnut-mid:#49301f;
  --ct406-walnut-low:#21150d;
}

/* More convincing cabinetmaking: layered mouldings, pegs, seams and bevels. */
#libraryRoom .ct406-bookcase-bay{
  background:
    radial-gradient(circle at 17px 86px,rgba(32,18,10,.62) 0 1.2px,rgba(180,126,82,.10) 1.7px 2.6px,transparent 3px),
    radial-gradient(circle at calc(100% - 17px) 86px,rgba(32,18,10,.62) 0 1.2px,rgba(180,126,82,.10) 1.7px 2.6px,transparent 3px),
    linear-gradient(90deg,rgba(0,0,0,.20),transparent 8%,transparent 92%,rgba(0,0,0,.22)),
    linear-gradient(180deg,rgba(255,255,255,.035),rgba(0,0,0,.12)),
    repeating-linear-gradient(90deg,rgba(255,255,255,.010) 0 1px,transparent 1px 8px),
    url('assets/v404/walnut-vertical.jpg') center/390px 1040px repeat!important;
  box-shadow:
    0 27px 38px rgba(28,18,11,.23),
    inset 0 0 0 1px rgba(163,114,75,.10),
    inset 0 0 0 5px rgba(25,15,9,.08),
    inset 0 0 27px rgba(14,8,5,.17)!important;
}
#libraryRoom .ct406-cornice{
  height:58px!important;
  background:
    linear-gradient(180deg,rgba(246,219,183,.09),transparent 17%,rgba(0,0,0,.08) 20% 25%,rgba(201,147,96,.05) 27% 31%,transparent 34%,rgba(0,0,0,.24)),
    repeating-linear-gradient(0deg,rgba(255,255,255,.011) 0 1px,transparent 1px 7px),
    url('assets/v404/walnut-horizontal.jpg') center/760px 285px repeat-x!important;
  border-top-color:rgba(178,126,83,.31)!important;
}
#libraryRoom .ct406-cornice:before,
#libraryRoom .ct406-cornice:after{display:block!important;content:"";position:absolute;left:1.5%;right:1.5%;pointer-events:none}
#libraryRoom .ct406-cornice:before{top:7px;height:8px;border-top:1px solid rgba(226,186,140,.18);border-bottom:2px solid rgba(26,15,9,.52);box-shadow:0 3px 0 rgba(192,135,88,.08)}
#libraryRoom .ct406-cornice:after{bottom:6px;height:6px;border-top:1px solid rgba(222,180,132,.16);border-bottom:1px solid rgba(22,13,8,.62);box-shadow:0 2px 3px rgba(0,0,0,.25)}
#libraryRoom .ct406-tracery-band{position:absolute;z-index:8;left:6%;right:6%;bottom:5px;height:44px;background:url('assets/v406/gothic-bay-tracery.svg') center bottom/100% 44px no-repeat;opacity:.60;pointer-events:none}
#libraryRoom .ct404-gothic-cornice{display:none!important}

/* Recognisable but restrained Gothic pilaster carving. */
#libraryRoom .ct406-pilaster-detail{top:61px!important;bottom:61px!important;width:23px!important;background:url('assets/v406/gothic-pilaster.svg') center 8px/20px 154px repeat-y!important;opacity:.61!important;filter:drop-shadow(0 1px 0 rgba(18,10,6,.45))}
#libraryRoom .ct406-pilaster-detail:before,
#libraryRoom .ct406-pilaster-detail:after{width:12px!important;height:12px!important;border-color:rgba(211,169,119,.25)!important;background:rgba(49,29,17,.26)!important}
#libraryRoom .ct406-bay-body:before{left:5%!important;right:5%!important;top:-8px!important;height:112px!important;background:url('assets/v406/gothic-bay-tracery.svg') center top/100% 104px no-repeat!important;opacity:.45!important}

/* Shelf front: moulded walnut edge rather than a flat brown strip. */
#libraryRoom .ct406-shelf-plank{
  height:31px!important;
  background:
    linear-gradient(180deg,rgba(238,205,163,.10) 0 2px,rgba(88,54,32,.05) 3px,transparent 7px,rgba(0,0,0,.08) 12px,rgba(0,0,0,.29) 100%),
    repeating-linear-gradient(0deg,rgba(255,255,255,.012) 0 1px,transparent 1px 7px),
    url('assets/v404/walnut-horizontal.jpg') center/820px 308px repeat-x!important;
  box-shadow:0 -5px 8px rgba(0,0,0,.24),0 8px 10px rgba(0,0,0,.34),inset 0 2px rgba(246,210,162,.055),inset 0 -3px 4px rgba(13,8,5,.31)!important;
}
#libraryRoom .ct406-shelf-plank:before{content:"";position:absolute;left:1px;right:1px;top:6px;height:5px;border-top:1px solid rgba(220,172,120,.11);border-bottom:1px solid rgba(26,15,9,.40);pointer-events:none}
#libraryRoom .ct406-shelf-plank:after{bottom:4px!important;background:linear-gradient(90deg,transparent,rgba(213,159,106,.13) 8%,rgba(213,159,106,.13) 92%,transparent)!important}

#libraryRoom .ct406-plinth{
  height:52px!important;
  background:
    linear-gradient(180deg,rgba(245,209,162,.045),transparent 16%,rgba(0,0,0,.26)),
    repeating-linear-gradient(0deg,rgba(255,255,255,.011) 0 1px,transparent 1px 8px),
    url('assets/v404/walnut-horizontal.jpg') center/820px 308px repeat-x!important;
}
#libraryRoom .ct404-gothic-base{display:none!important}
#libraryRoom .ct406-gothic-base{position:absolute;inset:5px 5% 4px;background:url('assets/v406/gothic-base-arcade.svg') center/620px 88px repeat-x;opacity:.49;pointer-events:none}

/* Books touch one another. No decorative spacing between clusters or volumes. */
#libraryRoom .ct406-shelf-back{justify-content:flex-start!important;gap:0!important;padding-left:4px!important;padding-right:4px!important;overflow:visible!important}
#libraryRoom .ct404-book-cluster{display:contents!important}
#libraryRoom .ct406-book-unit{position:relative;display:inline-flex;align-items:flex-end;justify-content:flex-start;flex:0 0 auto;margin:0!important;padding:0!important;vertical-align:bottom}
#libraryRoom .ct406-book-unit + .ct406-book-unit{margin-left:0!important}
#libraryRoom .ct406-book-unit.orientation-upright{width:var(--unit-w)}
#libraryRoom .ct406-book-unit .book-spine-v2{margin:0!important;border-left-width:0!important}
#libraryRoom .ct406-book-unit:first-child .book-spine-v2{border-left-width:1px!important}
#libraryRoom .ct406-book-unit .book-spine-v2:nth-child(n){transform:none!important}

/* Horizontal book: real book footprint, compressed thickness, subtle perspective cover plane. */
#libraryRoom .ct406-book-unit.orientation-horizontal{width:var(--unit-w);height:auto;align-self:flex-end;overflow:visible}
#libraryRoom .ct406-horizontal-book{appearance:none;display:block;position:relative;flex:none;margin:0;padding:0;border:1px solid rgba(23,14,8,.72);border-radius:1px;background:linear-gradient(180deg,#60452e,#352317);box-shadow:inset 0 1px rgba(255,255,255,.10),inset 0 -2px rgba(0,0,0,.27),0 2px 1px rgba(8,4,2,.36),3px 3px 5px rgba(0,0,0,.18);cursor:pointer;overflow:visible}
#libraryRoom .ct406-horizontal-book.material-0{background-color:#523323}#libraryRoom .ct406-horizontal-book.material-1{background-color:#68432c}#libraryRoom .ct406-horizontal-book.material-2{background-color:#354235}#libraryRoom .ct406-horizontal-book.material-3{background-color:#4a2b29}#libraryRoom .ct406-horizontal-book.material-4{background-color:#48433a}#libraryRoom .ct406-horizontal-book.material-5{background-color:#6a5540}#libraryRoom .ct406-horizontal-book.material-6{background-color:#252421}#libraryRoom .ct406-horizontal-book.material-7{background-color:#8a7a60}
#libraryRoom .ct406-cover-plane{position:absolute;z-index:1;left:-1px;right:-1px;bottom:calc(100% - 1px);height:var(--cover-depth);transform-origin:bottom center;transform:perspective(180px) rotateX(62deg);background:linear-gradient(135deg,rgba(239,213,170,.11),rgba(52,31,18,.09)),linear-gradient(90deg,#60452e,#3c281a);background-size:cover;background-position:center;border:1px solid rgba(25,15,9,.62);box-shadow:0 -2px 4px rgba(0,0,0,.12),inset 0 0 0 1px rgba(255,255,255,.045);pointer-events:none}
#libraryRoom .ct406-horizontal-book.has-image .ct406-cover-plane{background-size:cover!important;background-position:center!important}
#libraryRoom .ct406-horizontal-book:after{content:"";position:absolute;left:2px;right:2px;bottom:-3px;height:3px;background:rgba(8,4,2,.70);filter:blur(.25px);pointer-events:none}
#libraryRoom .ct406-horizontal-book .spine-hover-title{bottom:calc(100% + var(--cover-depth) + 8px)!important}
#libraryRoom .ct406-horizontal-book:hover .spine-hover-title,#libraryRoom .ct406-horizontal-book:focus-visible .spine-hover-title{opacity:1!important;visibility:visible!important;transform:translate(-50%,0)!important}

/* Orientation control stays subordinate and appears on hover/focus. */
#libraryRoom .ct406-orient-toggle{position:absolute;z-index:25;right:2px;bottom:3px;width:20px;height:20px;padding:0;border:1px solid rgba(225,200,165,.24);border-radius:50%;background:rgba(28,18,12,.82);color:#eadbc5;font:600 11px/18px system-ui,sans-serif;display:grid;place-items:center;cursor:pointer;opacity:0;transform:translateY(3px);transition:opacity .14s ease,transform .14s ease;box-shadow:0 2px 5px rgba(0,0,0,.24)}
#libraryRoom .ct406-book-unit:hover .ct406-orient-toggle,#libraryRoom .ct406-orient-toggle:focus-visible{opacity:.92;transform:none}
#libraryRoom .ct406-orient-toggle.has-side-image{border-color:rgba(223,186,133,.42)}

@media(max-width:760px){
 #libraryRoom .ct406-tracery-band{opacity:.46}
 #libraryRoom .ct406-pilaster-detail{opacity:.48!important}
 #libraryRoom .ct406-gothic-base{opacity:.37}
 #libraryRoom .ct406-orient-toggle{opacity:.78;transform:none;width:22px;height:22px}
 #libraryRoom .ct406-shelf-back{padding-left:3px!important;padding-right:3px!important}
}

/* Final V4.0.6 woodworking pass: visible board joints and sharper Gothic carving. */
#libraryRoom .ct406-real-shelf:before{
  background:
    linear-gradient(90deg,rgba(0,0,0,.27),transparent 8%,transparent 92%,rgba(0,0,0,.28)),
    linear-gradient(180deg,rgba(0,0,0,.23),rgba(0,0,0,.055) 30%,rgba(255,255,255,.010) 72%,rgba(0,0,0,.15)),
    repeating-linear-gradient(90deg,transparent 0 112px,rgba(13,8,5,.20) 112px 113px,rgba(212,165,112,.035) 113px 114px,transparent 114px 226px),
    repeating-linear-gradient(90deg,rgba(255,255,255,.007) 0 1px,transparent 1px 9px),
    url('assets/v404/walnut-vertical.jpg') center/390px 1040px repeat!important;
  filter:saturate(.91) brightness(.69) contrast(1.07)!important;
}
#libraryRoom .ct406-bay-body:before{opacity:.53!important}
#libraryRoom .ct406-pilaster-detail{opacity:.66!important}
#libraryRoom .ct406-gothic-base{opacity:.57!important}
#libraryRoom .ct406-bookcase-bay:after{
  box-shadow:inset 3px 0 4px rgba(255,255,255,.018),inset -4px 0 6px rgba(0,0,0,.30),4px 0 8px rgba(0,0,0,.14)!important;
}
