/* Wizard's Keep changes finishes and atmosphere, retaining all room geometry. */
/* Existing SVG ornament and companion artwork supplies the magical details. */
/* Night uses relit artwork so the stone floor and rug retain no sunlight. */
.room[data-theme=wizard][data-time-of-day=night][data-space=classic][data-style=realistic] .real-shell{background-image:url('assets/wizard-classic-shell-night.png')}
.room[data-theme=wizard][data-time-of-day=night][data-space=classic][data-style=realistic] :is(.real-photo,.case-photo,.real-fire-motion){background-image:url('assets/wizard-classic-room-night.png')}
.room[data-theme=wizard][data-time-of-day=night] .room-window[data-view=castle] .window-sky{background-image:url('assets/wizard-window-night.png')!important}
.room[data-theme=wizard][data-time-of-day=night][data-style=illustrated] .room-window[data-view=castle] .window-sky{background-image:url('assets/wizard-window-illustrated-night.png')!important}
.immersive-space[data-theme=wizard][data-time-of-day=night]{--scene:url('assets/wizard-immersive-realistic-night.png')!important;--shell:url('assets/wizard-immersive-realistic-shell-night.png')!important}
.immersive-space[data-theme=wizard][data-time-of-day=night][data-style=illustrated]{--scene:url('assets/wizard-immersive-illustrated-night.png')!important;--shell:url('assets/wizard-immersive-illustrated-shell-night.png')!important}
.immersive-space[data-theme=wizard][data-time-of-day=night]>.space-art:after{content:'';position:absolute;inset:0;background:var(--scene) center/100% 100% no-repeat;mask:var(--wizard-night-mask,none) center/100% 100% no-repeat;mask-mode:luminance}
.immersive-space[data-theme=wizard][data-time-of-day=night]>.space-object{background-image:none}
.room[data-theme=wizard][data-time-of-day=night] .grand-floor-light{display:none}
.room[data-theme=wizard][data-time-of-day=night] :is(.wizard-window-clouds,.wizard-window-water,.grand-outdoor-mist,.grand-outdoor-water){filter:brightness(.45) saturate(.65)}
.room[data-theme=wizard][data-time-of-day=night] .room-window[data-view=castle] .window-sky:after{filter:brightness(.45) saturate(.65)}
.wizard-reading-lamp{display:none}
.room[data-theme=wizard][data-time-of-day=night][data-space=classic][data-style=illustrated]{background:radial-gradient(ellipse at 83% 57%,#bc925a40,transparent 35%),linear-gradient(90deg,#292832,#45414a 45%,#36333e 75%,#24232d)}
.room[data-theme=wizard][data-time-of-day=night][data-space=classic][data-style=illustrated] .room-floor{filter:brightness(.48);box-shadow:none}
.room[data-theme=wizard][data-time-of-day=night][data-space=classic][data-style=illustrated] :is(.room-rug,.bookcase,.ceiling-trim,.wallpaper-pattern){filter:brightness(.7)}
.room[data-theme=wizard][data-time-of-day=night][data-space=classic][data-style=illustrated] .wizard-reading-lamp{display:block;position:absolute;right:3%;top:51%;width:6%;height:29%;z-index:4;background:linear-gradient(90deg,#70512c,#ddbd79,#70512c) center/8% 100% no-repeat;pointer-events:none}
.wizard-reading-lamp:before{content:'';position:absolute;inset:0 0 65%;background:repeating-linear-gradient(90deg,#d9b675 0 8%,#f6e2ac 9% 15%);clip-path:polygon(22% 0,78% 0,100% 100%,0 100%)}
.wizard-reading-lamp:after{content:'';position:absolute;bottom:0;left:15%;width:70%;height:5%;border-radius:50%;background:#b18b4b}
.wizard-reading-lamp i{position:absolute;inset:-50% -140%;background:radial-gradient(ellipse at 50% 35%,#ffcc7540,transparent 65%);z-index:-1}
.immersive-space[data-theme=wizard][data-time-of-day=night].shelf-focus-view{--focus-surface:#292632;--focus-panel:#403644;--focus-ink:#e9ddc5}
.immersive-space[data-theme=wizard][data-time-of-day=night] .shelf-focus-source{filter:brightness(.7)}
.wizard-ceiling {position:absolute;inset:0 0 auto;height:14%;overflow:hidden;z-index:2;pointer-events:none;background:linear-gradient(#202b4b30,#30375812 60%,transparent);mask-image:linear-gradient(#000 0 55%,transparent)}
.wizard-ceiling-stars {position:absolute;inset:0 -8%;animation:wizard-stars-drift 38s ease-in-out infinite alternate}
.wizard-ceiling-stars i {position:absolute;left:var(--star-x);top:var(--star-y);width:var(--star-size);height:var(--star-size);border-radius:50%;background:#e6e4d4;box-shadow:0 0 5px #d8d9ef70;opacity:.4;animation:wizard-stars-twinkle 5s ease-in-out var(--star-delay) infinite alternate}
.wizard-ceiling-stars i:nth-child(5n):before {content:'';position:absolute;left:-2px;right:-2px;top:45%;height:1px;background:#dfdfef55}
.wizard-ceiling-stars i:nth-child(5n):after {content:'';position:absolute;top:-2px;bottom:-2px;left:45%;width:1px;background:#dfdfef55}
.wizard-broom {position:absolute;left:4%;bottom:17%;width:6%;height:30%;padding:0;border:0;background:transparent;z-index:8;transform:rotate(-14deg);transform-origin:50% 96%;pointer-events:auto;cursor:pointer;filter:drop-shadow(3px 3px 2px #20182055)}
.wizard-broom:focus-visible {outline:2px solid #e0bd70;outline-offset:3px;border-radius:5px}
.wizard-broom.is-shaking {animation:wizard-broom-shake .65s ease-in-out}
@keyframes wizard-broom-shake {0%,100%{transform:rotate(-14deg) translateX(0)}18%,55%{transform:rotate(-18deg) translateX(-3px)}36%,73%{transform:rotate(-10deg) translateX(3px)}}
@media(prefers-reduced-motion:no-preference){.immersive-space #room .wizard-broom.is-shaking {animation:wizard-broom-shake .65s ease-in-out!important}}
@media(prefers-reduced-motion:reduce){.wizard-broom.is-shaking {animation:none!important;filter:brightness(1.15) drop-shadow(3px 3px 2px #20182055)}}
.wizard-broom:after {content:'';position:absolute;left:4%;bottom:-1%;width:86%;height:3%;border-radius:50%;background:#20182444;filter:blur(2px)}
.room[data-style="realistic"] .wizard-broom>svg {visibility:hidden}
.room[data-style="realistic"] .wizard-broom:before {content:'';position:absolute;inset:0;background:url('assets/wizard-broom-realistic.png') center/100% 100% no-repeat}
.immersive-space #room .wizard-broom {left:20%;bottom:33.8%;width:4.2%;height:25%;z-index:5}
.wizard-window-motion {display:none;position:absolute;inset:0;z-index:2;overflow:hidden;pointer-events:none}
.room-window[data-view="castle"] .wizard-window-motion {display:block}
.wizard-window-clouds {position:absolute;inset:5% -50% 44%;background:radial-gradient(ellipse at 20% 30%,#d8dfea65,transparent 42%),radial-gradient(ellipse at 77% 50%,#e4dbea50,transparent 38%);filter:blur(2px);animation:wizard-clouds-drift 12s ease-in-out infinite alternate}
.wizard-window-water {position:absolute;inset:70% -15% -6%;background:repeating-linear-gradient(177deg,transparent 0 8%,#e1dbec70 8.5% 9.5%,transparent 10% 20%);mask-image:linear-gradient(transparent,#000 25%,#0008);animation:wizard-water-ripple 4s ease-in-out infinite alternate;opacity:.28}
.room[data-style="illustrated"] .wizard-window-clouds {filter:blur(1px)}
.wizard-portrait .wizard-portrait-eyes {animation:wizard-portrait-gaze 5.5s ease-in-out infinite}
@keyframes wizard-stars-drift {from{transform:translateX(-3%)}to{transform:translateX(5%)}}
@keyframes wizard-stars-twinkle {from{opacity:.2}to{opacity:.65}}
@keyframes wizard-clouds-drift {from{transform:translateX(-12%);opacity:.35}to{transform:translateX(15%);opacity:.8}}
@keyframes wizard-water-ripple {from{transform:translate(-3%,-2%);opacity:.2}to{transform:translate(4%,3%);opacity:.45}}
@keyframes wizard-portrait-gaze {0%,100%{transform:translateX(0) scaleY(1)}22%,35%{transform:translateX(-2px) scaleY(1)}45%,50%{transform:translateX(0) scaleY(1)}47%{transform:translateX(0) scaleY(.08)}65%,80%{transform:translateX(2px) scaleY(1)}}
@media(prefers-reduced-motion:no-preference) {
  .immersive-space #room .wizard-ceiling-stars {animation:wizard-stars-drift 38s ease-in-out infinite alternate!important}
  .immersive-space #room .wizard-ceiling-stars i {animation:wizard-stars-twinkle 5s ease-in-out var(--star-delay) infinite alternate!important}
  .immersive-space #room .wizard-window-clouds {animation:wizard-clouds-drift 12s ease-in-out infinite alternate!important}
  .immersive-space #room .wizard-window-water {animation:wizard-water-ripple 4s ease-in-out infinite alternate!important}
  .immersive-space #room .wizard-portrait .wizard-portrait-eyes {animation:wizard-portrait-gaze 5.5s ease-in-out infinite!important}
}
@media(prefers-reduced-motion:reduce) {
  .wizard-ceiling-stars,.wizard-ceiling-stars i,.wizard-window-clouds,.wizard-window-water {animation:none!important}
}
.wizard-details {position:absolute;inset:0;pointer-events:none}
.wizard-details svg {display:block;width:100%;height:100%}
.wizard-portrait {position:absolute;left:18.75%;top:4.5%;width:2.5%;height:6.5%;overflow:hidden;background:#28202b;border:2px ridge #a88850;box-shadow:0 0 0 1px #3d3025,inset 0 0 8px #0009,2px 3px 5px #0005;z-index:6}
.wizard-portrait-b {left:auto;right:18.75%}
.room[data-style="realistic"] .wizard-portrait {left:21.1%;top:.5%;width:1.9%;height:3.1%;border-width:1px}
.room[data-style="realistic"] .wizard-portrait-b {left:auto;right:21.1%}
.wizard-oil-portrait,.wizard-owl-photo {display:none;position:absolute;inset:0;pointer-events:none}
.room[data-style="realistic"] .wizard-oil-portrait {display:block;--portrait-position:0% 50%;background:url('assets/wizard-portraits.png') var(--portrait-position)/200% 100% no-repeat}
.room[data-style="realistic"] .wizard-portrait-b .wizard-oil-portrait {--portrait-position:100% 50%}
.room[data-style="realistic"] .wizard-oil-portrait:after {content:'';position:absolute;inset:0;background:inherit;transform-origin:50% 65%;animation:wizard-oil-shift 8s ease-in-out infinite}
.room[data-style="realistic"] .wizard-portrait-b .wizard-oil-portrait:after {animation-delay:-4s}
.room[data-style="realistic"] .wizard-portrait svg,.room[data-style="realistic"] .wizard-owl>svg {visibility:hidden}
.room[data-style="realistic"] .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}
.wizard-portrait-person {transform-origin:50px 80px;animation:wizard-portrait-shift 7s ease-in-out infinite}
.wizard-portrait-eyes,.wizard-owl-eyes {transform-box:fill-box;transform-origin:center;animation:wizard-blink 9s linear infinite}
.wizard-portrait-b .wizard-portrait-person {animation-delay:-3.5s}
.wizard-portrait-b .wizard-portrait-eyes {animation-delay:-4s}
.wizard-owl,.wizard-wand {position:absolute;padding:0;border:0;background:transparent;pointer-events:auto;filter:drop-shadow(2px 3px 2px #1a172744);cursor:pointer;z-index:9}
.wizard-owl {left:53.3%;top:31.3%;width:4.4%;height:8.5%}
.wizard-owl:after {content:'';position:absolute;left:12%;right:12%;height:4%;bottom:4%;background:linear-gradient(#ac9267,#624d39);border-radius:2px}
.wizard-owl-head {transform-origin:50px 55px;animation:wizard-owl-look 13s ease-in-out infinite}
.wizard-owl:hover .wizard-owl-wing,.wizard-owl:focus-visible .wizard-owl-wing {transform:rotate(8deg);transform-origin:30px 45px}
.wizard-owl:focus-visible,.wizard-wand:focus-visible {outline:2px solid #e0bd70;outline-offset:3px;border-radius:4px}
.wizard-wand {left:86%;top:82%;width:9%;height:5%;min-height:24px}
.wizard-wand-spark {opacity:0;transform-box:fill-box;transform-origin:center}
.wizard-wand.is-sparking .wizard-wand-spark {animation:wizard-wand-spark 1.4s ease-out}
.room[data-style="illustrated"] .wizard-owl {top:59.5%;left:56%;height:8.5%}
.room[data-style="illustrated"] .wizard-wand {left:72%;top:88%;width:8%}
.immersive-space #room .wizard-portrait-a {left:30.5%;top:5.2%;width:4%;height:8.4%;border-width:2px}
.immersive-space #room .wizard-portrait-b {left:auto;right:30.5%;top:5.2%;width:4%;height:8.4%;border-width:2px}
.immersive-space #room .wizard-owl {left:53%;top:33%;width:4%;height:7.5%}
.immersive-space #room .wizard-wand {left:84.5%;top:72%;width:8%;height:5%}
.immersive-space.shelf-focus-view .wizard-details {display:none}
.room[data-theme="wizard"] .window-curtain {display:none!important}
.wizard-curtains {position:absolute;left:37.5%;top:5%;width:25%;height:63%;pointer-events:none;z-index:6}
.wizard-curtain-rod {position:absolute;top:-1.5%;left:-23%;width:146%;height:1%;min-height:2px;border-radius:4px;background:linear-gradient(#d9bd79,#8d6938);box-shadow:0 2px 2px #20151b55}
.wizard-curtain-rod:before,.wizard-curtain-rod:after {content:'';position:absolute;top:-2px;width:6px;height:6px;border-radius:50%;background:#bda16a}
.wizard-curtain-rod:before {left:-3px}.wizard-curtain-rod:after {right:-3px}
.wizard-curtain-panel {position:absolute;top:0;width:20%;height:112%;background:repeating-linear-gradient(90deg,#320e1bbb 0 8%,#912e43 15%,#581928 25%,#ad4253 32%,#42101f 42%);border-top:3px solid #a27d45;border-bottom:3px solid #c4a166;box-shadow:2px 3px 5px #160e2344;clip-path:polygon(0 0,100% 0,93% 18%,64% 54%,52% 62%,75% 83%,89% 99%,6% 100%);border-radius:0 0 8% 8%}
.wizard-curtain-left {left:-20%}
.wizard-curtain-right {right:-20%;transform:scaleX(-1)}
.wizard-curtain-panel:after {content:'';position:absolute;left:0;top:60%;width:63%;height:2.5%;background:linear-gradient(#dcc181,#a17b42,#d2b570);box-shadow:0 2px 2px #2b122355;transform:rotate(-9deg);border-radius:50%}
.room[data-style="realistic"] .wizard-curtains {left:calc(50% - var(--photo-width)*.0755);top:3.2%;width:calc(var(--photo-width)*.151);height:36.5%}
.room[data-style="realistic"] .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)}
.room[data-style="realistic"] .wizard-curtain-panel:after {display:none}
.immersive-space #room .wizard-curtains {left:43.3%;top:2.8%;width:13.2%;height:37.8%}
.phone-preview .room[data-style="illustrated"] .wizard-curtains {left:35%;width:30%}
@media(max-width:760px){.room[data-style="illustrated"] .wizard-curtains {left:35%;width:30%}}
.phone-preview .immersive-space #room .wizard-curtains {left:43.3%;width:13.2%}
/* Free view has its own wall geometry and a window that meets the mantel. */
.room[data-theme="wizard"][data-space="classic"] #dragonDecor,
.room[data-theme="wizard"][data-space="classic"] #fairyLights {display:none!important}
.room[data-theme="wizard"][data-space="classic"][data-style="illustrated"] #roomPlant {display:none!important}
.room[data-theme="wizard"][data-space="classic"][data-lights="true"] .shelf-light-loop {display:block;position:absolute;left:2%;top:-8px;width:96%;height:30px;z-index:12;pointer-events:none}
.room[data-theme="wizard"][data-space="classic"][data-style="realistic"] .wizard-portrait {left:1%;top:11%;width:4.5%;height:15%;border-width:2px;z-index:4;transform:perspective(500px) rotateY(24deg) skewY(7deg);transform-origin:left center}
.room[data-theme="wizard"][data-space="classic"][data-style="realistic"] .wizard-portrait-b {left:auto;right:1%;transform:perspective(500px) rotateY(-24deg) skewY(-7deg);transform-origin:right center}
.room[data-theme="wizard"][data-space="classic"][data-style="realistic"] #realPlant {display:none!important}
.room[data-theme="wizard"][data-space="classic"][data-style="realistic"] .wizard-oil-portrait {--portrait-position:17% 50%;background-size:auto 100%}
.room[data-theme="wizard"][data-space="classic"][data-style="realistic"] .wizard-portrait-b .wizard-oil-portrait {--portrait-position:83% 50%}
.room[data-theme="wizard"][data-space="classic"][data-style="realistic"] #roomWindow,
.room[data-theme="wizard"][data-space="classic"][data-style="realistic"] .wizard-curtains {left:calc(50% - var(--photo-width)*.096);top:3.2%;width:calc(var(--photo-width)*.192);height:50.6%}
.room[data-theme="wizard"][data-space="classic"][data-style="realistic"] .wizard-curtain-panel {height:102%}
.room[data-theme="wizard"][data-space="classic"][data-style="realistic"] .wizard-owl {top:45.4%;left:55%}
.room[data-theme="wizard"] .wizard-hover-book {animation:wizard-book-hover 7s ease-in-out var(--hover-delay,0s) infinite;transform-origin:center bottom;will-change:transform}
.room[data-theme="wizard"] .wizard-hover-book:hover,.room[data-theme="wizard"] .wizard-hover-book:focus-visible,.room[data-theme="wizard"] .wizard-hover-book.dragging {animation:none!important;will-change:auto}
.immersive-space #room .wizard-hover-book:hover,.immersive-space #room .wizard-hover-book:focus-visible,.immersive-space #room .wizard-hover-book.dragging {animation:none!important;will-change:auto}
@keyframes wizard-blink {0%,43%,47%,100%{transform:scaleY(1)}45%{transform:scaleY(.08)}}
@keyframes wizard-portrait-shift {0%,100%{transform:translate(0,0) rotate(0)}25%,38%{transform:translate(-4px,-2px) rotate(-6deg)}60%,75%{transform:translate(5px,-3px) rotate(7deg)}}
@keyframes wizard-oil-shift {0%,100%{transform:translate(0,0) rotate(0) scale(1.16)}25%,38%{transform:translate(-4%,1%) rotate(-3.5deg) scale(1.16)}60%,75%{transform:translate(4%,-2%) rotate(4deg) scale(1.16)}}
@keyframes wizard-owl-look {0%,30%,100%{transform:rotate(0)}45%,60%{transform:rotate(-8deg)}75%{transform:rotate(5deg)}}
@keyframes wizard-book-hover {0%,25%,100%{transform:translateY(0) rotate(0)}50%,70%{transform:translateY(-5px) rotate(-2deg)}}
@keyframes wizard-wand-spark {0%{opacity:0;transform:scale(.4)}18%,40%{opacity:1;transform:scale(1.25)}100%{opacity:0;transform:scale(1.7)}}
@media(prefers-reduced-motion:no-preference) {
  .immersive-space #room .wizard-portrait-person {animation:wizard-portrait-shift 7s ease-in-out infinite!important}
  .immersive-space #room .wizard-oil-portrait:after {animation:wizard-oil-shift 8s ease-in-out infinite!important}
  .immersive-space #room .wizard-portrait-b .wizard-oil-portrait:after {animation-delay:-4s!important}
  .immersive-space #room .wizard-owl-photo {animation:wizard-owl-look 13s ease-in-out infinite!important}
  .immersive-space #room .wizard-portrait-eyes,.immersive-space #room .wizard-owl-eyes {animation:wizard-blink 9s linear infinite!important}
  .immersive-space #room .wizard-portrait-b .wizard-portrait-person {animation-delay:-3.5s!important}
  .immersive-space #room .wizard-portrait-b .wizard-portrait-eyes {animation-delay:-4s!important}
  .immersive-space #room .wizard-owl-head {animation:wizard-owl-look 13s ease-in-out infinite!important}
  .immersive-space #room .wizard-hover-book {animation:wizard-book-hover 7s ease-in-out var(--hover-delay,0s) infinite!important}
  .immersive-space #room .wizard-wand.is-sparking .wizard-wand-spark {animation:wizard-wand-spark 1.4s ease-out!important}
}
@media(prefers-reduced-motion:reduce) {
  .wizard-details *,.wizard-details *:after,.room[data-theme="wizard"] .wizard-hover-book {animation:none!important;will-change:auto}
  .wizard-wand.is-sparking .wizard-wand-spark {opacity:1}
}
.room[data-theme="wizard"] {--stone:#817d72;--stone-light:#aaa393;--stone-dark:#514e49}
.room[data-theme="wizard"][data-style="realistic"] .real-shell {background-image:url('assets/wizard-classic-shell.png');background-blend-mode:normal;filter:none}
.room[data-theme="wizard"][data-style="realistic"] .real-photo {background-image:url('assets/wizard-classic-room.png');background-blend-mode:normal;filter:none}
.room[data-theme="wizard"][data-style="realistic"] .case-photo {background-image:url('assets/wizard-classic-room.png');filter:none}
.room[data-theme="wizard"][data-style="realistic"] .real-fire-motion {background-image:url('assets/wizard-classic-room.png')}
.room[data-theme="wizard"][data-style="realistic"] .wallpaper-pattern {display:none}
.room[data-theme="wizard"][data-style="illustrated"] .wallpaper-pattern {display:block;inset:0 0 27.5%;opacity:1;background:linear-gradient(90deg,#26242050,transparent 45%,#26242040),repeating-linear-gradient(0deg,transparent 0 47px,#47433e 48px 50px),repeating-linear-gradient(90deg,#979184 0 88px,#686258 89px 91px,#aaa191 92px 180px);box-shadow:inset 0 0 40px #3c393033;pointer-events:none}
.room[data-theme="wizard"][data-style="illustrated"] .room-floor {background:repeating-linear-gradient(0deg,transparent 0 27%,#4a4840 28% 29%),repeating-linear-gradient(105deg,#929087 0 17%,#515148 17.5% 18%,#a29d91 18.5% 36%)}
.room[data-theme="wizard"][data-style="illustrated"] .room-rug {background:repeating-linear-gradient(0deg,#ffffff08 0 1px,#00000008 1px 3px),radial-gradient(ellipse,#902d3f,#651b2b);border:5px double #c4a15a;outline:1px solid #d3b573;outline-offset:-12px;box-shadow:inset 0 0 0 12px #711e2d,inset 0 0 0 14px #bc9758,0 5px 9px #221c2533}
.room[data-theme="wizard"] .chair-pillow {background:#b8924b;border-color:#cfb06e;color:#712638}
.room[data-theme="wizard"][data-style="illustrated"] .armchair:after {content:'';position:absolute;right:6%;top:37%;width:28%;height:60%;background:repeating-linear-gradient(0deg,#7b2232 0 18%,#c2a15a 19% 31%,#742132 32% 48%);border-bottom:5px dashed #c5a15b;border-radius:15% 15% 4% 4%;transform:rotate(-8deg);box-shadow:inset 4px 0 6px #0003,2px 3px 3px #0003;pointer-events:none}
.wizard-candles {display:none;position:absolute;inset:0;z-index:11;pointer-events:none}
.room[data-theme="wizard"] .wizard-candles {display:block}
.wizard-candles i {position:absolute;left:var(--x);top:var(--y);width:clamp(3px,.5cqw,8px);height:clamp(13px,2.8cqw,40px);border-radius:2px 2px 35% 35%;background:linear-gradient(90deg,#bda576,#fff2ce 48%,#d8bc87);box-shadow:1px 2px 3px #18111b44;animation:wizard-candle-float calc(4s + var(--n)*.23s) ease-in-out calc(var(--n)*-.7s) infinite alternate}
.wizard-candles i:before {content:'';position:absolute;left:18%;bottom:100%;width:64%;height:35%;border-radius:70% 30% 60% 40%;background:linear-gradient(#fff7d9,#ffd173 65%,#e78a32);box-shadow:0 0 7px 2px #ffc869aa,0 0 24px 10px #ffc86924;transform-origin:center bottom;animation:wizard-flame 1.3s ease-in-out calc(var(--n)*-.17s) infinite alternate}
.wizard-candles i:after {content:'';position:absolute;left:38%;top:-7%;width:20%;height:10%;background:#57422f}
.room-window[data-view="castle"] .window-sky,
.immersive-space #room #roomWindow[data-view="castle"] .window-sky {background:url('assets/wizard-window.png') center/cover no-repeat;filter:none}
.room[data-style="illustrated"] .room-window[data-view="castle"] .window-sky {background-image:url('assets/wizard-window-illustrated.png')!important}
.room-window[data-view="castle"] .window-sky>.moon,
.room-window[data-view="castle"] .window-sky>.mountain,
.room-window[data-view="castle"] .window-sky>.forest-trees,
.room-window[data-view="castle"] .window-sky>.window-stars {display:none}
.room[data-style="illustrated"] .room-window[data-view="castle"] .window-sky>.mountain,
.room[data-style="illustrated"] .room-window[data-view="castle"] .window-sky>.forest-trees {display:none!important}
.room-window[data-view="castle"] .window-sky:after,
.room[data-style="realistic"] .room-window[data-view="castle"] .window-sky:after,
.immersive-space #room #roomWindow[data-view="castle"] .window-sky:after {content:'';display:block;position:absolute;inset:35% -45% -10%;z-index:1;background:radial-gradient(ellipse at 20% 70%,#d8dce580,transparent 50%),radial-gradient(ellipse at 85% 80%,#d8dce555,transparent 42%);animation:wizard-mist 14s ease-in-out infinite alternate;pointer-events:none}
/* Keep flying figures in the exterior scene, underneath the window joinery. */
:root #appShell #room[data-theme="wizard"] #roomWindow>.window-sky{isolation:isolate;z-index:0;overflow:hidden!important}
:root #appShell #room[data-theme="wizard"] #roomWindow>:is(.window-frame,.window-cross){z-index:2;pointer-events:none}
/* Frame the seasonal view without changing the window or scene dimensions. */
:root #appShell #room[data-theme="wizard"][data-space="classic"][data-style="realistic"] #roomWindow:has(.season-scenery)>.window-frame{
  display:block!important;position:absolute;inset:0;z-index:4;
  border:6px solid #59472e!important;border-radius:inherit;
  box-shadow:inset 0 0 0 2px #b9a06a,0 0 0 1px #c5ad7c!important;
  pointer-events:none;
}
:root #appShell #room[data-theme="wizard"][data-space="classic"][data-style="realistic"] #roomWindow:has(.season-scenery)>.window-cross{
  display:block!important;z-index:3;
}
.wizard-riders {display:none;position:absolute;inset:0;overflow:hidden;z-index:3;pointer-events:none;color:#161627}
.room-window[data-view="castle"] .wizard-riders {display:block}
.wizard-riders svg {position:absolute;top:25%;left:-30%;width:21%;height:auto;opacity:.85;animation:wizard-broom-pass 19s linear -4s infinite}
.wizard-riders svg:nth-child(2) {top:42%;width:13%;opacity:.65;animation-duration:27s;animation-delay:-17s}
.wizard-riders svg:nth-child(3) {top:15%;width:16%;opacity:.75;animation-name:wizard-broom-return;animation-duration:23s;animation-delay:-10s}
.theme-preview[data-preview="wizard"] {background:url('assets/wizard-immersive-realistic.png') center/cover}
.theme-preview[data-preview="wizard"]>i {display:none}
@keyframes wizard-candle-float {from{transform:translate(0,-4px) rotate(-2deg)}to{transform:translate(3px,7px) rotate(2deg)}}
@keyframes wizard-flame {from{transform:scale(.85,.85) rotate(-5deg);opacity:.85}to{transform:scale(1,1.1) rotate(5deg);opacity:1}}
@keyframes wizard-mist {from{transform:translateX(-10%);opacity:.3}to{transform:translateX(13%);opacity:.7}}
@keyframes wizard-broom-pass {0%{left:-30%;transform:translateY(8px) rotate(-7deg)}50%{transform:translateY(-7px) rotate(2deg)}100%{left:115%;transform:translateY(3px) rotate(-3deg)}}
@keyframes wizard-broom-return {0%{left:115%;transform:scaleX(-1) translateY(0)}50%{transform:scaleX(-1) translateY(9px)}100%{left:-30%;transform:scaleX(-1) translateY(-4px)}}
/* Restore only this theme's motion through the perspective room animation reset. */
@media(prefers-reduced-motion:no-preference) {
  .immersive-space #room[data-theme="wizard"] .wizard-candles i {animation:wizard-candle-float calc(4s + var(--n)*.23s) ease-in-out calc(var(--n)*-.7s) infinite alternate!important}
  .immersive-space #room[data-theme="wizard"] .wizard-candles i:before {animation:wizard-flame 1.3s ease-in-out calc(var(--n)*-.17s) infinite alternate!important}
  .immersive-space #room #roomWindow[data-view="castle"] .window-sky:after {animation:wizard-mist 14s ease-in-out infinite alternate!important}
  .immersive-space #room #roomWindow[data-view="castle"] .wizard-riders svg {animation:wizard-broom-pass 19s linear -4s infinite!important}
  .immersive-space #room #roomWindow[data-view="castle"] .wizard-riders svg:nth-child(2) {animation-duration:27s!important;animation-delay:-17s!important}
  .immersive-space #room #roomWindow[data-view="castle"] .wizard-riders svg:nth-child(3) {animation:wizard-broom-return 23s linear -10s infinite!important}
}
@media(prefers-reduced-motion:reduce) {
  .wizard-candles i,.wizard-candles i:before,.wizard-riders svg,
  .room .room-window[data-view="castle"] .window-sky:after,
  .immersive-space #room #roomWindow[data-view="castle"] .window-sky:after {animation:none!important}
  .wizard-riders svg {left:20%;transform:rotate(-7deg)}
  .wizard-riders svg:nth-child(2) {left:65%}
  .wizard-riders svg:nth-child(3) {left:47%;transform:scaleX(-1)}
}

/* A click earns a little nod without a text notification. */
.wizard-owl.is-greeting .wizard-owl-head,.wizard-owl.is-greeting .wizard-owl-photo{animation:wizard-owl-greeting .85s ease-in-out!important}
@keyframes wizard-owl-greeting{0%,100%{transform:rotate(0)}25%{transform:rotate(-13deg)}55%{transform:rotate(11deg)}78%{transform:rotate(-5deg)}}
@media(prefers-reduced-motion:reduce){.wizard-owl.is-greeting .wizard-owl-head,.wizard-owl.is-greeting .wizard-owl-photo{animation:none!important}}
