/* Trial 2 keeps the existing room camera, architecture and furnishings. */
.trial-room-spatial:not(.is-focused) .trial-room-viewport{container-type:size;overflow-y:hidden!important;overflow-x:auto;padding-bottom:0;touch-action:pan-x pinch-zoom}
.trial-room-spatial:not(.is-focused):not(.is-trial-display) .trial-room-stage{display:block;width:max(100%,150cqh)!important;min-width:0!important;min-height:0!important;height:100%!important;aspect-ratio:auto;padding:0;background:#342a23;box-shadow:none}
.trial-room-spatial:not(.is-focused) :is(.trial-cornice,.trial-floor,.trial-rug,.trial-reading-nook){display:none}
.trial-spatial-scenery{position:absolute;inset:0;pointer-events:none;z-index:-1;opacity:0;transition:opacity .25s}
.has-spatial-art .trial-spatial-scenery{opacity:1}
.trial-room-spatial .trial-spatial-scenery .space-art,.trial-room-spatial .trial-spatial-scenery .space-object{border-radius:0}
.trial-room-spatial[data-chair=false] .space-chair,.trial-room-spatial[data-plant=false] :is(.space-plant,.space-plant-small),.trial-room-spatial[data-fireplace=false] .space-fire{display:none}
/* Transparent plant art cannot carry scaled wall, door or floor fragments. */
.trial-room-spatial .space-plant{inset:auto auto 10% 3%;width:13%;height:31%;background:var(--medium-plant-art) bottom center/contain no-repeat;clip-path:none;transform:none}
/* Keep the table pedestal and chair feet intact down to the room's floor edge. */
.trial-room-spatial .space-chair{clip-path:polygon(64% 66%,71% 64%,76% 56%,87% 53%,98% 53%,98% 100%,70% 100%,64% 87%)}
.trial-room-spatial[data-time-of-day=night] .space-plant{filter:brightness(.72) saturate(.9) sepia(.08)}
.trial-spatial-night-lamp{display:none;position:absolute;inset:0;background:var(--scene) center/100% 100% no-repeat;pointer-events:none;mask-image:var(--medium-lamp-mask);mask-size:100% 100%;mask-repeat:no-repeat}
.trial-room-spatial[data-time-of-day=night][data-chair=true] .trial-spatial-night-lamp{display:block}
.trial-room-spatial[data-theme=classic] .trial-spatial-night-lamp{display:none!important}
.trial-room-spatial[data-theme=classic] .trial-spatial-scenery .space-plant{filter:var(--spatial-scene-filter,none)}
.trial-room-spatial:not(.is-focused) .trial-bookcase{position:absolute;inset:0 auto auto 0;width:340px;box-sizing:border-box;transform-origin:0 0;z-index:2;padding:0;border:0;background:none;box-shadow:none;border-radius:0}
.trial-room-spatial:not(.is-focused) :is(.trial-cupboard,.trial-case-crown){display:none}
.trial-room-spatial:not(.is-focused) .trial-cupboard i{background:linear-gradient(120deg,#523c28,#2f251a);border-color:#a78c5955}
.trial-room-spatial:not(.is-focused) .trial-case-name{position:absolute;top:-34px;left:0;margin:0;height:27px;background:#261c13df;color:#ecd6a3;font-size:18px;letter-spacing:.5px;z-index:1}
.trial-room-spatial[data-theme]:not(.is-focused) .trial-shelves[data-display]{--shelf-back:color-mix(in srgb,var(--gallery-wood) 78%,#100c08);--shelf-edge-high:var(--gallery-wood-light);--shelf-edge-mid:var(--gallery-wood);--shelf-edge-dark:color-mix(in srgb,var(--gallery-wood) 45%,#100c08);padding:0;border:0;background-color:var(--shelf-back);box-shadow:inset 0 5px 12px #100c0799}
.trial-room-spatial:not(.is-focused) .trial-shelves .library-grid-row{height:180px;background:linear-gradient(#080501d9,transparent 26%,#e6b05510 90%,#0003)}
.trial-room-spatial:not(.is-focused) .trial-shelves .library-grid-row::after{left:0;width:100%}
.trial-room-spatial:not(.is-focused) .trial-shelves .library-grid-slot{padding-top:0}
.trial-room-spatial:not(.is-focused) .trial-shelves .library-grid-book{width:155%;transform-origin:0 0}
.trial-room-spatial:not(.is-focused) .trial-shelves .library-grid-jacket{aspect-ratio:2/3;transform:perspective(1600px) rotateX(var(--spatial-jacket-pitch,-5deg)) rotateY(var(--spatial-jacket-angle,40deg))}
.trial-room-spatial:not(.is-focused) .trial-shelves .library-grid-book:is(:hover,:focus-visible,.is-touch-preview) .library-grid-jacket{transform:perspective(1600px) translateY(-10px) translateZ(35px) rotateX(var(--spatial-jacket-pitch,-5deg)) rotateY(8deg)}
.trial-room-spatial:not(.is-focused) .trial-shelves .library-grid-row::before{content:'';position:absolute;top:4px;left:4%;right:4%;height:2px;background:#ffe2a799;box-shadow:0 5px 20px 6px #f2c27833;pointer-events:none}
.trial-room-spatial:not(.is-focused) .trial-case-crown{background:linear-gradient(#b79c6e,#302318 15%,#886a42 24%,#302518 45%,#493621 75%,#ab8b56 85%,#342719)}
.trial-room-spatial:not(.is-focused) .trial-window{position:absolute;left:43%;top:2.6%;width:13.8%;height:33.5%!important;margin:0;border:3px solid #816b4b;border-radius:999px 999px 0 0;box-shadow:0 0 0 2px #362d23,inset 0 0 14px #20181677;z-index:0;box-sizing:border-box}
.trial-room-spatial[data-window=false] .trial-window{visibility:hidden}
/* Every theme keeps its existing frame and mullions above every landscape. */
.trial-room-spatial .trial-window{isolation:isolate}
.trial-room-spatial .trial-window>.season-scenery{z-index:0}
.trial-room-spatial .trial-window::before{z-index:2;pointer-events:none}
.trial-room-spatial .trial-window::after{z-index:3;pointer-events:none}
.trial-room-spatial:not(.is-focused) .trial-fireplace{position:absolute;left:44.4%;top:46.2%;width:10.7%;height:14.7%;margin:0;border:0;border-radius:0;background:none;box-shadow:none;z-index:1;pointer-events:none}
.trial-room-spatial:not(.is-focused) :is(.trial-mantel,.trial-hearth){display:none}
.trial-room-spatial:not(.is-focused) .trial-firebox{inset:0;border:0;background:transparent;box-shadow:none}
.trial-room-spatial[data-style=realistic]:not(.is-focused) .trial-firebox .real-fire-motion{inset:32.6% auto auto 10.3%;width:74.8%;height:66.7%;background-image:var(--spatial-fire-scene,var(--scene));background-position:49.4565% 56.541%;background-size:1250% 1020.408%;mask-image:radial-gradient(ellipse at 50% 62%,#000 0 30%,#000b 50%,transparent 74%)}
.trial-room-spatial:not(.is-focused) .trial-companion{bottom:15%;width:130px;height:112px}
.trial-room-spatial:not(.is-focused) .trial-pet-speech{bottom:calc(15% + 125px)}
.trial-room-spatial:not(.is-focused) .trial-empty-note{inset:37% auto auto 50%;width:210px;transform:translateX(-50%);z-index:8}
.trial-spatial-wizard-curtains,.trial-spatial-owl{display:none}
.trial-room-spatial[data-theme=wizard]:not(.is-focused) .trial-spatial-wizard-curtains{display:block;left:43.3%;top:2.8%;width:13.2%;height:32.9%;z-index:1;pointer-events:none}
.trial-room-spatial[data-style=realistic] .trial-spatial-wizard-curtains .wizard-curtain-panel{background:url('assets/wizard-curtain-realistic.png') center/180% 100% no-repeat;border:0;border-radius:0;clip-path:none;box-shadow:none;filter:drop-shadow(2px 3px 3px #25101955)}
.trial-room-spatial[data-style=realistic] .trial-spatial-wizard-curtains .wizard-curtain-panel::after{display:none}
.trial-room-spatial[data-theme=wizard][data-window=true]:not(.is-focused) .trial-spatial-owl{display:block;position:absolute;left:55.9%;top:34.35%;width:4%;height:7.5%;z-index:1;pointer-events:none}
.trial-room-spatial[data-window=false] .trial-spatial-wizard-curtains{display:none}
.trial-spatial-owl>svg{width:100%;height:100%}
.trial-spatial-owl::after{content:'';position:absolute;left:25%;right:25%;height:3%;bottom:8%;background:radial-gradient(ellipse,#24180ca6,transparent 75%);border-radius:50%;z-index:-1}
.trial-room-spatial[data-style=realistic] .trial-spatial-owl>svg{visibility:hidden}
.trial-room-spatial[data-style=realistic] .trial-spatial-owl .wizard-owl-photo{display:block;background:url('assets/wizard-perched-owl.png') center/contain no-repeat;mask:url('assets/wizard-owl-mask.svg') center/contain no-repeat;transform-origin:center bottom;animation:wizard-owl-look 13s ease-in-out infinite}
.trial-spatial-status{position:absolute;top:12px;left:50%;transform:translateX(-50%);padding:8px 15px;border-radius:20px;background:#221c18dd;color:#f2dfb8;font:12px Georgia,serif;z-index:10}
.trial-spatial-status[hidden]{display:none}
.trial-room-spatial.is-focused :is(.trial-spatial-scenery,.trial-spatial-status,.trial-window,.trial-fireplace){display:none}
.trial-spatial-foreground{position:absolute;inset:0;z-index:4;pointer-events:none;opacity:0;transition:opacity .25s}
.has-spatial-art .trial-spatial-foreground{opacity:1}
.trial-spatial-belle-details{display:none;position:absolute;inset:0;z-index:5;pointer-events:none}
.trial-room-spatial[data-theme=belle]:not(.is-focused).has-spatial-art .trial-spatial-belle-details{display:block}
.trial-spatial-belle-details .belle-rose{left:89.4%;top:auto;bottom:27.2%;width:5%;height:auto;aspect-ratio:4/5}
.trial-spatial-belle-details .belle-clock{left:55.2%;top:auto;bottom:58.7%;width:3.5%;height:7%}
.trial-spatial-belle-details .belle-candelabra{left:40.7%;top:auto;bottom:58.7%;width:3.5%;height:7%}
.trial-room-spatial[data-chair=false] .trial-spatial-belle-details .belle-rose,.trial-room-spatial[data-fireplace=false] .trial-spatial-belle-details :is(.belle-clock,.belle-candelabra){display:none}
.trial-room-spatial[data-style=realistic] .trial-spatial-belle-details .belle-object{height:auto;aspect-ratio:1}
.trial-room-spatial[data-style=realistic] .trial-spatial-belle-details .belle-object:before{content:'';position:absolute;inset:0;background:url('assets/belle-ornaments-cutout.png') 50% 0/300% 200% no-repeat;pointer-events:none}
.trial-room-spatial[data-style=realistic] .trial-spatial-belle-details .belle-clock:before{background-position:0 100%}
.trial-room-spatial[data-style=realistic] .trial-spatial-belle-details .belle-candelabra:before{background-position:100% 0}
.trial-room-spatial[data-style=realistic] .trial-spatial-belle-details .belle-object>svg{visibility:hidden}
.trial-room-spatial.is-focused .trial-spatial-foreground{display:none}
.trial-room-spatial .trial-room-viewport{background:#211b16}
.trial-room-spatial:not(.is-ambient-active) .space-fire{animation-play-state:paused}
.trial-room-spatial:not(.is-ambient-active) .trial-spatial-owl *{animation-play-state:paused}
@media(prefers-reduced-motion:reduce){.trial-spatial-scenery,.trial-spatial-foreground{transition:none}.trial-room-spatial :is(.space-fire,.trial-spatial-owl *){animation:none!important}}

/* Shared Wizard and seasonal details stay attached to the room camera. */
.trial-room-spatial[data-theme=wizard] .trial-window .wizard-riders{display:block;z-index:0}
.trial-spatial-wand,.trial-spatial-broom,.trial-spatial-steam{display:none}
.trial-room-spatial[data-theme=wizard][data-chair=true]:not(.is-focused) .trial-spatial-wand{display:block;left:83.2%;top:73.8%;width:7%;height:3.4%;z-index:6;min-height:0}
.trial-room-spatial[data-theme=wizard]:not(.is-focused) .trial-spatial-broom{display:block;left:21.5%;bottom:33.4%;width:4.2%;height:20%;transform:rotate(-4deg);z-index:3}
.trial-room-spatial .trial-spatial-broom.is-shaking{animation-name:trial-spatial-broom-shake}
@keyframes trial-spatial-broom-shake{0%,100%{transform:rotate(-4deg) translateX(0)}18%,55%{transform:rotate(-7deg) translateX(-1px)}36%,73%{transform:rotate(-1deg) translateX(1px)}}
.trial-spatial-wand>svg,.trial-spatial-broom>svg{display:block;width:100%;height:100%}
.trial-room-spatial[data-style=realistic] .trial-spatial-broom>svg{visibility:hidden}
.trial-room-spatial[data-style=realistic] .trial-spatial-broom::before{content:'';position:absolute;inset:0;background:url('assets/wizard-broom-realistic.png') center/100% 100% no-repeat}
.trial-room-spatial[data-chair=true]:not(.is-focused) .trial-spatial-steam{display:block;left:var(--cup-steam-x,85.1%);top:var(--cup-steam-y,59.4%);width:3.2%;height:9%;z-index:6}
.trial-room-spatial[data-style=realistic] .trial-spatial-steam{--steam-animation:coffee-vapor-drift;--steam-duration:6.4s;stroke:#fffdf7;stroke-width:8;filter:blur(.65px);mask-image:linear-gradient(to top,#000 0 28%,#000c 50%,#0005 75%,transparent 100%)}
.trial-room-spatial[data-style=realistic] .trial-spatial-steam path{opacity:.3;filter:blur(1.8px)}
.trial-room-spatial[data-style=realistic] .trial-spatial-steam path:nth-child(2){--steam-duration:7.7s;--steam-delay:-3.4s;stroke-width:11;filter:blur(2.8px)}
.trial-room-spatial[data-style=realistic] .trial-spatial-steam path:nth-child(3){--steam-duration:5.9s;--steam-delay:-2.1s;stroke-width:7;filter:blur(2.2px)}
.trial-room-spatial .room-seasons{z-index:4}
.trial-room-spatial .season-pumpkins{left:28%;top:54%;width:11%;height:9%}
.trial-room-spatial .season-door-pumpkins{left:5%;top:85%;width:11%;height:10%}
.trial-room-spatial .season-mantel{left:43.5%;top:43.8%;width:13%;height:6%}
.trial-room-spatial .season-floor-leaves{top:84%;height:12%}
.trial-room-spatial .season-floating-lanterns>span{width:2.7%;height:4.5%}
.trial-room-spatial .season-tree{left:17%;top:29%;width:15%;height:36%}
.trial-room-spatial.is-focused :is(.room-seasons,.trial-spatial-wand,.trial-spatial-broom,.trial-spatial-steam){display:none}
.trial-room-spatial:not(.is-ambient-active) :is(.wizard-riders svg,.trial-spatial-steam path,.room-seasons *){animation-play-state:paused!important}
.trial-room-spatial:not(.is-ambient-active) :is(.trial-spatial-broom,.trial-spatial-wand .wizard-wand-spark){animation-play-state:paused!important}
.trial-room-spatial .trial-room-viewport{touch-action:pan-x pinch-zoom;-webkit-overflow-scrolling:touch}
.trial-room-spatial.is-focused .trial-room-viewport{touch-action:pan-y pinch-zoom}
.trial-room-spatial:not(.is-focused) .trial-case-name{visibility:hidden}
.trial-spatial-labels{position:absolute;inset:0;z-index:3;pointer-events:none}
.trial-spatial-labels button{position:absolute;transform:translateX(-50%);width:max-content;min-width:78px;max-width:150px;height:23px;padding:2px 10px;border:1px solid var(--room-ui-border,#c8a468);border-radius:5px;background:var(--room-ui-bg,#211a14);color:var(--room-ui-ink,#f5dfaa);font:500 11px/17px Georgia,serif;letter-spacing:.25px;text-align:center;white-space:nowrap;box-shadow:0 2px 7px #0008,inset 0 0 0 2px #f4d19013;pointer-events:auto}
.trial-spatial-labels button>span{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.trial-spatial-labels button:is([data-trial-case="2"],[data-trial-case="3"]){width:92px;min-width:0;max-width:92px}
.trial-spatial-labels button:hover,.trial-spatial-labels button:focus-visible{color:#fff3cd;border-color:#ffdda1;outline:2px solid #e8ca89;outline-offset:2px}
.trial-room-spatial.is-focused .trial-spatial-labels{display:none}
.trial-room-spatial .trial-bookcase:focus-visible{outline:3px solid #f4d295;outline-offset:2px}
:is(.app-preview,.phone-preview) .trial-room-spatial .trial-room-viewport{scrollbar-width:none}
:is(.app-preview,.phone-preview) .trial-room-spatial .trial-room-viewport::-webkit-scrollbar{display:none;width:0;height:0}
@media(max-width:760px){.trial-room-spatial .trial-room-viewport{scrollbar-width:none}.trial-room-spatial .trial-room-viewport::-webkit-scrollbar{display:none;width:0;height:0}}
@media(prefers-reduced-motion:reduce){.trial-room-spatial :is(.wizard-riders svg,.trial-spatial-steam path,.trial-spatial-broom,.trial-spatial-wand .wizard-wand-spark){animation:none!important}}
.trial-room-spatial.is-room-preparing .trial-room-viewport{visibility:hidden}
.trial-room-spatial.is-room-preparing :is(.trial-spatial-scenery,.trial-spatial-foreground){transition:none}
.trial-room-loading[hidden]{display:none!important}
.trial-room-spatial .shelving-cart{left:58%;bottom:24%;width:12.5%;z-index:6}
.trial-room-spatial .shelving-cart-label{max-width:100%;box-sizing:border-box}
:is(.app-preview,.phone-preview) .trial-room-spatial .shelving-cart{left:52%;bottom:21%}
@media(max-width:760px){.trial-room-spatial .shelving-cart{left:52%;bottom:21%}}
.trial-room-spatial.is-focused .shelving-cart{display:none}
.trial-room-spatial>.shelving-tray{bottom:75px;z-index:45}
.trial-room-spatial.is-trial-display .shelving-cart,.trial-room-spatial.is-trial-display>.shelving-tray{display:none}
.shelving-selected{display:flex;align-items:center;gap:10px;padding:8px 0;border-bottom:1px solid var(--accent-border,#c4e7fc);margin-bottom:5px;font-size:12px}
.shelving-selected strong{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.shelving-selected button{border:1px solid #b9cbe1;background:#eef5ff;color:#163d68;border-radius:8px;padding:7px 9px;font:inherit;cursor:pointer}
.shelving-selected[hidden]{display:none}
.trial-room-spatial .library-grid-row.drag-over{outline:3px solid #edcd86;outline-offset:-4px}
.trial-room-spatial[data-theme=wizard]{--mantel-stone:#665849}.trial-room-spatial[data-theme=elderwood]{--mantel-stone:#6c6550}.trial-room-spatial[data-theme=stormcrest]{--mantel-stone:#454a4f}.trial-room-spatial[data-theme=rose]{--mantel-stone:#efdab8}.trial-room-spatial[data-theme=belle]{--mantel-stone:#f4e0bb}
.trial-spatial-cup{display:none;position:absolute;left:85.2%;top:67.7%;width:4.4%;height:6.1%;z-index:5;pointer-events:none;filter:drop-shadow(1px 2px 2px #2d1b1544)}
.trial-spatial-cup svg{width:100%;height:100%;overflow:visible}
.trial-spatial-rose-tea-art{display:none;position:absolute;inset:0;pointer-events:none;background:url('assets/rose-medium-teacup-realistic-v2.png') center/100% 100% no-repeat;mask-image:linear-gradient(90deg,transparent 84.5%,#000 85.5% 94.5%,transparent 96%),linear-gradient(transparent 61%,#000 63% 74%,transparent 76%);mask-composite:intersect}
.trial-room-spatial[data-theme=rose][data-style=realistic][data-chair=true] .trial-spatial-rose-tea-art{display:block}
.trial-room-spatial[data-theme=rose][data-time-of-day=night] .trial-spatial-rose-tea-art{background-image:url('assets/rose-medium-teacup-realistic-night-v2.png')}
.trial-room-spatial[data-added-cup=true][data-chair=true]:not(.is-focused) .trial-spatial-cup{display:block}
.trial-room-spatial.is-focused .trial-spatial-cup{display:none}
.trial-spatial-scenery .space-art{filter:var(--spatial-scene-filter,none)}
.trial-spatial-foreground .space-chair{filter:var(--spatial-chair-filter,none)}

.trial-mantel-wall{position:absolute;left:43%;top:33.4%;width:13.8%;height:7.8%;display:flex;pointer-events:none;filter:var(--spatial-scene-filter,none);mask-image:linear-gradient(90deg,transparent,#000 10% 90%,transparent),linear-gradient(transparent,#000 8% 94%,transparent);mask-composite:intersect}
.trial-mantel-wall i{display:block;flex:1;min-width:0;height:100%;background-image:var(--scene);background-size:5797.10145% 1282.05128%;background-position:43.347748% 36.225597%;background-repeat:no-repeat}
.trial-mantel-wall i:nth-child(even){transform:scaleX(-1)}

/* The same lit hearth source remains visible in every realistic theme. */
.trial-room-spatial[data-style=realistic]:not(.is-focused) .trial-firebox .real-fire-motion{inset:10% 0 0;width:auto;height:auto;background-image:url("assets/realistic-library.png");background-position:50% 66.24%;background-size:806.45% 694.44%;z-index:2}
