/* A purpose-built conservatory atrium, with live shelves projected into four wings. */
.grand-library{--grand-gold:#ccb27f;--hall-wood:var(--gallery-wood,#334735);background:#1b211b}
/* Fill the room viewport without reserving a blank strip below the artwork. */
.grand-library:not(.is-focused):not(.is-trial-display) .trial-room-viewport{container-type:size;display:block!important;padding-bottom:0!important}
.grand-library:not(.is-focused):not(.is-trial-display) .trial-room-stage{width:max(100%,150cqh)!important;min-width:0!important;min-height:100%;height:auto;aspect-ratio:3/2}
.grand-library:not(.is-focused) .trial-room-stage{display:block;width:max(100%,2400px);min-width:2400px;min-height:0;height:auto;aspect-ratio:3/2;padding:0;box-sizing:border-box;background:none!important;box-shadow:none}
.grand-library:not(.is-focused) :is(.trial-cornice,.trial-floor,.trial-rug,.grand-chandelier,.grand-salon-chair,.trial-room-sign,.trial-window-seat,.trial-side-table,.trial-reading-nook>p){display:none}
.grand-library:not(.is-focused) .trial-room-stage::before{content:'';position:absolute;inset:0;pointer-events:none;z-index:0;background:radial-gradient(ellipse at 50% 65%,#ffe2a314,transparent 55%),linear-gradient(90deg,#120d0b26,transparent 18% 82%,#120d0b26)}
.grand-library:not(.is-focused) .trial-bookcase{position:relative;left:auto;top:auto;width:auto;height:100%;min-width:0;box-sizing:border-box;align-self:auto;padding:8px 6px 0;display:flex;flex-direction:column;gap:0;border:3px solid var(--hall-wood);border-inline-color:color-mix(in srgb,var(--hall-wood) 65%,#1a130d);border-radius:3px 3px 0 0;background:url('assets/shelf-wood-grain.svg') center/360px 260px,linear-gradient(90deg,var(--gallery-wood-light),var(--hall-wood) 8% 92%,var(--gallery-wood-light));box-shadow:inset 2px 0 2px #f4d8a733,inset -2px 0 3px #08070477,0 4px 8px #09060355;z-index:2}

.grand-library:not(.is-focused) .trial-case-crown{top:-9px;left:-5px;right:-5px;height:12px;border:1px solid var(--grand-gold);box-shadow:0 4px 5px #10090455;background:linear-gradient(var(--gallery-wood-light),var(--hall-wood) 28%,var(--hall-wood) 64%,var(--grand-gold) 72%,var(--hall-wood) 90%)}
.grand-library:not(.is-focused) .trial-case-name{flex:none;display:block;height:27px;margin:0 1px 5px;padding:0 5px;border:1px solid #cfb98580;border-radius:3px;background:linear-gradient(120deg,#e1c98e18,#08070433),var(--hall-wood);color:#fff1d1;font:500 14px/25px Georgia,serif;letter-spacing:.1px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;box-shadow:inset 0 0 0 2px #e2c88b0d,0 2px 3px #0003}
.grand-library:not(.is-focused) .trial-case-name span{display:none}
.grand-library:not(.is-focused) .trial-shelves[data-display]{flex:1;display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:repeat(5,minmax(0,1fr));height:0;min-height:0;padding:0 4px 0 3px;border:0;box-shadow:inset 0 5px 9px #090603b3;background:url('assets/shelf-wood-grain.svg') center/440px 360px,linear-gradient(90deg,#050503aa,transparent 20% 80%,#050503aa),var(--hall-wood)}
.grand-library:not(.is-focused) .trial-shelves .library-grid-row{height:100%;min-height:0;background:linear-gradient(#000b,transparent 28%,#f5d39c0c 94%,#0004)}
.grand-library:not(.is-focused) .trial-shelves .library-grid-row::before{content:'';position:absolute;top:2px;left:6%;right:6%;height:1px;background:#ffdea777;box-shadow:0 4px 12px 3px #f7cf7726;pointer-events:none}
.grand-library:not(.is-focused) .trial-shelves .library-grid-row::after{left:-3px;width:calc(100% + 7px);height:6px;border-top:1px solid #f0d6a399;box-shadow:0 3px 3px #0008;background:url('assets/shelf-wood-grain.svg'),linear-gradient(var(--gallery-wood-light),var(--hall-wood) 48%,#0e0b08);background-size:220px 45px,100% 100%}
.grand-library:not(.is-focused) .trial-shelves .library-grid-slot{padding:4px 0 6px;border:0;min-height:0}
.grand-library:not(.is-focused) .trial-shelves .library-grid-book{width:auto;height:100%;max-width:none;max-height:100%;aspect-ratio:2/3}
.grand-library:not(.is-focused) .trial-shelves .library-grid-jacket{--book-depth:3px;max-height:100%;transform:perspective(1000px) rotateY(32deg);transform-origin:left bottom}
.grand-library:not(.is-focused) .trial-shelves .library-grid-book:is(:hover,:focus-visible,.is-touch-preview) .library-grid-jacket{transform:perspective(1000px) translateY(-5px) translateZ(12px) rotateY(9deg)}
.grand-library:not(.is-focused) .trial-cupboard{display:none}
.grand-library:not(.is-focused) .trial-bookcase:focus-visible{outline:2px solid #ffe0a6;outline-offset:5px}
.grand-library:not(.is-focused) .trial-reading-nook{position:absolute;inset:0;width:100%;height:100%;align-self:stretch;padding:0;margin:0;border:0;background:none;pointer-events:none;grid-column:auto;grid-row:auto}
.grand-library:not(.is-focused) .trial-window{position:absolute;left:var(--hall-window-x,44.9%);top:var(--hall-window-y,25%);width:var(--hall-window-width,10.1%);height:var(--hall-window-height,29.5%)!important;min-height:0;margin:0;padding:0;border:0;border-radius:50% 50% 0 0;box-shadow:none;background-position:center;background-size:cover;overflow:hidden;z-index:1}
.grand-library:not(.is-focused) .trial-window::before,.grand-library:not(.is-focused) .trial-window::after{display:none}
.grand-library:not(.is-focused) .trial-fireplace{position:absolute;left:42.5%;top:55.5%;width:15%;height:16%;min-height:0;padding:0;margin:0;border:0;border-radius:0;background:none;box-shadow:none;z-index:3;pointer-events:none}
.grand-library:not(.is-focused) .trial-mantel{top:0;left:0;right:0;height:1px;margin:0;border:0;background:none;box-shadow:none;visibility:hidden}
.grand-library:not(.is-focused) .trial-firebox{inset:37% 25% 14% 29%;border:0;border-radius:45% 45% 0 0;background:transparent;box-shadow:none;mask-image:radial-gradient(ellipse at 50% 65%,#000 25%,#000c 55%,transparent 82%)}
.grand-library:not(.is-focused) .trial-hearth{display:none}
.grand-library:not(.is-focused) .shelving-cart{left:58%;top:81%;bottom:auto;width:112px;z-index:7}
.grand-library:not(.is-focused) .trial-companion{left:calc(50% - 65px);top:84%;bottom:auto;width:125px;height:108px}
.grand-library:not(.is-focused) .trial-pet-speech{top:77%;bottom:auto}
.grand-library .trial-string-lights{z-index:4}
.grand-library .trial-bookcase>.trial-string-lights{top:-18px;left:4%;width:92%;height:16px}
.grand-library .trial-bookcase>.trial-string-lights i{width:12px;height:16px}
.grand-library .trial-bookcase>.trial-string-lights:not([data-shape=bulbs]) i{width:auto;height:auto;font-size:22px}
.grand-library .room-seasons{pointer-events:none}
.grand-library .season-mantel{z-index:4}
.grand-library .season-pumpkins{left:58%;top:auto;bottom:17%;width:115px;height:85px}
.grand-library .season-door-pumpkins{left:26%;top:auto;bottom:16%;width:110px;height:85px}
.grand-library .season-tree{left:31%;top:auto;bottom:21%;width:155px;height:265px}
.grand-library .season-floor-leaves{top:auto;bottom:3%;height:18%}
.grand-library[data-theme=elderwood][data-time-of-day=night]:not(.is-focused) .trial-room-stage::before,.grand-library[data-theme=classic][data-time-of-day=night]:not(.is-focused) .trial-room-stage::before{background:#0c11195e}
.grand-library[data-time-of-day=night]:not(.is-focused) .trial-shelves .library-grid-row{background:linear-gradient(#000d,transparent 35%,#e3ad5b10)}
.grand-library .grand-floor-nav{display:flex;gap:2px}.grand-library .grand-floor-nav button{width:auto;font-size:10px;padding-inline:9px}
.grand-library>.shelving-tray{bottom:95px;z-index:60}
.grand-library .trial-current-case{max-width:135px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}
.grand-library.is-focused :is(.shelving-cart,.trial-fireplace,.room-mantel-mail,.room-seasons,.trial-string-lights,.grand-chandelier,.grand-salon-chair){display:none}
.grand-library.is-focused .trial-bookcase{grid-column:auto!important;grid-row:auto!important}
.grand-library.is-focused .trial-room-stage{min-width:0}
.grand-library .trial-room-viewport{touch-action:pan-x pan-y pinch-zoom}
.grand-library .is-grand-panning{cursor:grabbing;user-select:none}
.grand-library.is-hall-preparing .trial-room-viewport{visibility:hidden}
.grand-room-loading[hidden]{display:none!important}
.grand-library.is-trial-display:not(.is-focused) .trial-room-stage{width:min(100vw,150dvh)!important;min-width:0!important;height:min(100dvh,66.6667vw)!important;min-height:0!important;aspect-ratio:3/2}
.room-size-note{margin:9px 8px 3px;font:10px/1.5 var(--sans);opacity:.85;white-space:normal}
@media(max-width:760px){.grand-library .trial-current-case{max-width:80px;font-size:10px}.grand-library .trial-dock-bar{gap:2px}.grand-library .trial-dock-divider{display:none}.grand-library .trial-dock-bar [data-trial-action=room] span{display:none}.grand-library .grand-floor-nav button{font-size:9px;min-width:22px;padding-inline:4px}.grand-library .trial-dock-bar button{min-width:24px;padding-inline:4px}.grand-library .trial-room-viewport{scrollbar-width:none}.grand-library .trial-room-viewport::-webkit-scrollbar{display:none}.grand-library .trial-dock{max-width:calc(100% - 16px)}.grand-library .trial-hint{font-size:10px}.grand-library:not(.is-focused) .trial-dock-bar :is([data-trial-action=previous],[data-trial-action=next]){display:flex!important}}
.phone-preview .grand-library .trial-current-case{max-width:80px;font-size:10px}.phone-preview .grand-library .trial-dock-bar{gap:2px}.phone-preview .grand-library .trial-dock-divider{display:none}.phone-preview .grand-library [data-trial-action=room] span{display:none}.phone-preview .grand-library:not(.is-focused) .trial-dock-bar :is([data-trial-action=previous],[data-trial-action=next]){display:flex!important}
.trial-room-view[data-style=realistic]:not(.trial-room-spatial):not(.grand-library) .trial-bookcase{background-image:linear-gradient(90deg,#0004,transparent 10% 85%,#0005),var(--gallery-texture,url('assets/shelf-wood-grain.svg'));background-size:auto,100% 100%;box-shadow:3px 8px 18px #0009,inset 0 1px 4px #f6dbae66}
.trial-room-view[data-style=realistic]:not(.trial-room-spatial) .trial-case-crown{filter:contrast(1.15) saturate(.65)}
.trial-room-view[data-style=realistic]:not(.trial-room-spatial):not(.grand-library) .trial-shelves{background-image:linear-gradient(#0007,#0002),url('assets/shelf-wood-grain.svg')}
.trial-room-view:not(.trial-room-spatial)[data-time-of-day=night] .trial-shelves .library-grid-row{background:linear-gradient(#030305d9,transparent 40%,#ffbd6315)}
.trial-room-view:not(.trial-room-spatial)[data-style=illustrated] .trial-bookcase{filter:saturate(1.08)}
.trial-room-view:not(.trial-room-spatial)[data-style=realistic] .trial-firebox .real-fire-motion{background-image:url('assets/realistic-library.png')}
@media(prefers-reduced-motion:reduce){.grand-library .library-grid-jacket{transition:none!important}}

.grand-atrium-scenery{position:absolute;inset:0;background:var(--grand-hall-art,none) center/100% 100% no-repeat;pointer-events:none;filter:var(--atrium-finish,none)}
.grand-atrium-wing{position:absolute;left:0;top:0;width:1000px;height:var(--atrium-plane-height);transform-origin:0 0;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));grid-template-rows:minmax(0,1fr);gap:2px;z-index:2;pointer-events:none}
.grand-atrium-wing .trial-bookcase{pointer-events:auto}
.grand-library.is-focused .grand-atrium-scenery{display:none}
.grand-library.is-focused .grand-atrium-wing{display:contents;transform:none!important}
.grand-library[data-theme=classic]{--atrium-finish:sepia(.12) saturate(.8)}
.grand-library[data-theme=wizard]{--atrium-finish:none}
.grand-library[data-theme=elderwood]{--atrium-finish:none}
.grand-library[data-theme=stormcrest]{--atrium-finish:none}
.grand-library[data-theme=rose]{--atrium-finish:none}
.grand-library:is([data-theme=rose],[data-theme=belle],[data-theme=woodland],[data-theme=wizard],[data-theme=elderwood],[data-theme=stormcrest]):not(.is-focused) .trial-firebox .real-fire-motion{display:block;position:absolute;inset:0;z-index:1;pointer-events:none;background-image:var(--grand-hall-art);background-size:1449.275% 1275.51%;background-position:50.322% 66.645%;background-repeat:no-repeat;mask-image:radial-gradient(ellipse at 50% 62%,#000 15%,#000c 48%,transparent 76%);animation:photo-hearth-flicker 2.9s linear infinite;transform-origin:50% 85%}
.grand-library:is([data-theme=rose],[data-theme=belle],[data-theme=woodland],[data-theme=wizard],[data-theme=elderwood],[data-theme=stormcrest]):not(.is-focused) .trial-firebox .real-fire-glow{display:block;position:absolute;inset:18% 0 0;z-index:2;pointer-events:none;background:radial-gradient(ellipse,#ffb34388,#da661c33 35%,transparent 70%);mix-blend-mode:screen;animation:hearth-breathe 2.3s infinite alternate,living-firelight .85s linear infinite}
.grand-library[data-theme=belle]{--atrium-finish:none}
.grand-library[data-theme=belle]:not(.is-focused) .trial-window{background-image:none!important}
/* These halls include scenery fitted behind their ornate leadwork. */
.grand-library:is([data-theme=classic],[data-theme=rose])[data-style=realistic][data-scenery-season=off]:not(.is-focused) .trial-window{background-image:none!important}
.grand-library[data-theme=rose][data-style=illustrated][data-scenery-season=off]:not(.is-focused) .trial-window{background-image:none!important}
.grand-library:is([data-theme=woodland],[data-theme=wizard],[data-theme=elderwood],[data-theme=stormcrest]):not(.is-focused) .trial-window{background-image:none!important}
.grand-atrium-outdoors{display:none;position:absolute;left:44.65%;top:25%;width:10.7%;height:29.3%;z-index:1;pointer-events:none;overflow:hidden;mask:url('assets/grand-atrium-motion-glass.svg') center/100% 100% no-repeat}
.grand-library:not(.is-focused)[data-window=true]:is([data-theme=wizard]) .grand-atrium-wizard-outdoors,.grand-library:not(.is-focused)[data-window=true][data-theme=stormcrest] .grand-atrium-stormcrest-outdoors,.grand-library:not(.is-focused)[data-window=true][data-theme=woodland] .grand-atrium-woodland-outdoors{display:block}
.grand-atrium-wizard-outdoors .wizard-riders{display:block}
.grand-atrium-wizard-outdoors .wizard-riders svg{width:18%;top:38%}
.grand-atrium-wizard-outdoors .wizard-riders svg:nth-child(2){width:12%;top:62%}
.grand-atrium-wizard-outdoors .wizard-riders svg:nth-child(3){width:14%;top:19%}
.grand-library[data-theme=wizard] .wizard-candles i{width:clamp(4px,.5cqw,8px);height:clamp(16px,2.3cqw,32px)}
.grand-library:not(.is-ambient-active) :is(.grand-atrium-outdoors *,.grand-atrium-outdoors *::before){animation-play-state:paused!important}
@media(prefers-reduced-motion:reduce){.grand-atrium-outdoors *{animation:none!important}}

/* The desktop overview shows the architecture in full; open a case for large covers. */
@media(min-width:761px){.grand-library:not(.is-focused):not(.is-trial-display) .trial-room-stage{width:100%;min-width:0}.grand-library:not(.is-focused):not(.is-trial-display) .trial-room-viewport{display:flex;align-items:center;padding-bottom:90px}.grand-library:not(.is-focused) .trial-room-stage{flex-shrink:0}}
@media(max-width:760px){.grand-library:not(.is-focused) .trial-room-stage{width:1800px;min-width:1800px}}
.phone-preview .grand-library:not(.is-focused):not(.is-trial-display) .trial-room-stage{width:1800px;min-width:1800px}
.phone-preview .grand-library:not(.is-focused):not(.is-trial-display) .trial-room-viewport{display:block;padding-bottom:var(--trial-nav-space)}
.grand-library:not(.is-focused) .room-mantel-mail{left:46%!important;top:55.5%!important;width:4%!important;max-width:70px;height:auto!important;min-height:0!important;aspect-ratio:3/2;transform:translateY(-100%)!important}

/* Decorations use the same artwork coordinates as the shelf planes. Keeping
   their bounds inside the open floor prevents leaves landing on painted seats. */
.grand-library:not(.is-focused) .season-floor-leaves{left:24%;width:52%;top:auto;bottom:7%;height:10%}
.grand-library:not(.is-focused) .season-tree{left:38%;top:auto;bottom:27%;width:7.5%;height:23%}
.grand-library:not(.is-focused) .season-pumpkins{left:55%;top:auto;bottom:27%;width:8%;height:8%}
.grand-library:not(.is-focused) .season-mantel{left:43%;top:54.4%;width:14%;height:4%}
.grand-library:not(.is-focused) .shelving-cart{left:59%;top:73%;bottom:auto;width:8%}
.grand-library:not(.is-focused) .trial-bookcase{min-height:0;border-width:1px;padding:3px 2px 0;box-shadow:inset 1px 0 2px #f4d8a733,inset -1px 0 2px #08070477}
.grand-library:not(.is-focused) .trial-case-crown{display:none}

/* Illustrated themes own their finishes; do not recolor their artwork again. */
.grand-library[data-style=illustrated]{--atrium-finish:none}

/* The realistic atrium artwork already contains fitted seasonal window scenery. */
.grand-library[data-theme=classic][data-style=realistic]:not(.is-focused) .trial-window{background-image:none!important}
