/* Panorama room (Mac, 2026-10-20): one wide picture per look (assets/room-pano/*, 2:1, play corner + bedroom + display wall).
   room-pano.js makes the room box the picture's width and slides it with --pano-x; the arrows and dots live here too. */
html body.ui2.ui2.ui2.ui2.ui2.room-pano[data-mode][data-place=home]:not(.gm-open):is(:not([data-room-theme]),[data-room-theme=classic]) #main>.bedroom-scene{background-image:url('./assets/room-pano/day.webp?v=2')!important}
html body.ui2.ui2.ui2.ui2.ui2.room-pano[data-mode][data-place=home][data-room-theme=candy]:not(.gm-open) #main>.bedroom-scene{background-image:url('./assets/room-pano/candy.webp?v=2')!important}
html body.ui2.ui2.ui2.ui2.ui2.room-pano[data-mode][data-place=home][data-room-theme=cloud]:not(.gm-open) #main>.bedroom-scene{background-image:url('./assets/room-pano/cloud.webp?v=2')!important}
html body.ui2.ui2.ui2.ui2.ui2.room-pano[data-mode][data-place=home][data-room-theme=ocean]:not(.gm-open) #main>.bedroom-scene{background-image:url('./assets/room-pano/ocean.webp?v=2')!important}
html body.ui2.ui2.ui2.ui2.ui2.room-pano:is(.night-time,.rn-night)[data-mode][data-place=home]:not(.gm-open):is(:not([data-room-theme]),[data-room-theme=classic]) #main>.bedroom-scene{background-image:url('./assets/room-pano/night.webp?v=2')!important}
html body.ui2.ui2.ui2.ui2.ui2.room-pano.rn-dark[data-mode][data-place=home]:not(.gm-open):is(:not([data-room-theme]),[data-room-theme=classic]) #main>.bedroom-scene{background-image:radial-gradient(circle at var(--rn-lx,60%) var(--rn-ly,38%),#0b1030f2 0 3%,transparent 11%),linear-gradient(#141a46a6,#141a46a6),url('./assets/room-pano/night.webp?v=2')!important}
html body.ui2.ui2.ui2.ui2.ui2.room-pano:is(.calm-mode,.night-time)[data-mode][data-place=home][data-room-theme=candy]:not(.gm-open) #main>.bedroom-scene{background-image:url('./assets/room-pano/candy-night.webp?v=2')!important}
html body.ui2.ui2.ui2.ui2.ui2.room-pano:is(.calm-mode,.night-time)[data-mode][data-place=home][data-room-theme=cloud]:not(.gm-open) #main>.bedroom-scene{background-image:url('./assets/room-pano/cloud-night.webp?v=2')!important}
html body.ui2.ui2.ui2.ui2.ui2.room-pano:is(.calm-mode,.night-time)[data-mode][data-place=home][data-room-theme=ocean]:not(.gm-open) #main>.bedroom-scene{background-image:url('./assets/room-pano/ocean-night.webp?v=2')!important}

/* the room box is the picture's width and slides (translate, so decorate mode's transform:none can't reset it) */
html body.ui2.ui2.ui2.ui2.room-pano[data-mode][data-place=home]:not(.gm-open) #main>.bedroom-scene{right:auto!important;width:var(--pano-w,200vw)!important;translate:var(--pano-x,0px) 0;transition:translate var(--pano-t,.55s) cubic-bezier(.3,.9,.3,1)}
/* the floor strip under the shelf is the same picture: same width, same slide */
html body.ui2.ui2.ui2.ui2.room-pano[data-mode][data-place=home]:not(.gm-open) #main::after{left:var(--pano-l,0px)!important;right:auto!important;width:var(--pano-w,200vw)!important;background-position:0 var(--pano-bgy,0px)!important;translate:var(--pano-x,0px) 0;transition:translate var(--pano-t,.55s) cubic-bezier(.3,.9,.3,1)}
/* toys keep their size: 14% of the screen, not of the wide room */
html body.ui2.room-pano .bedroom-scene .rp-toy{width:clamp(70px,14vw,140px)}

/* room UI that belongs on screen, not at the far ends of the wide room */
html body.ui2.room-pano[data-place=home] .bedroom-scene .room-placement-choice{left:calc(var(--pano-vis-l,0px) + 14px)!important}
html body.ui2.room-pano[data-place=home] .bedroom-scene .room-floor-target{right:calc(var(--pano-vis-r,0px) + 14px)!important}
html body.ui2.room-pano[data-place=home] .bedroom-scene .sb-keepsake-frame{position:absolute!important;left:calc(var(--pano-vis-l,0px) + 12px + env(safe-area-inset-left,0px))!important}

.rpano{display:none}
body.room-pano[data-place=home]:not(.gm-open) .rpano{display:block}
.rpano-arrow{position:fixed;top:calc(50% - 60px);z-index:30;width:56px;height:56px;opacity:.55;padding:0;border-radius:50%;border:4px solid #fff;background:#fff8ec;box-shadow:0 6px 0 #cdb08c,0 10px 18px #5a3a2a33;display:grid;place-items:center;cursor:pointer;transition:opacity .25s,transform .18s cubic-bezier(.3,1.6,.5,1);-webkit-tap-highlight-color:transparent}
.rpano-arrow svg{width:28px;height:28px}
.rpano.awake .rpano-arrow:not([hidden]),.rpano-arrow:hover{opacity:1}
.rpano-arrow:active{transform:translateY(4px) scale(.94);box-shadow:0 2px 0 #cdb08c}
.rpano-arrow.l{left:max(6px,env(safe-area-inset-left))}.rpano-arrow.r{right:max(6px,env(safe-area-inset-right))}
.rpano-arrow[hidden]{display:grid;opacity:0;pointer-events:none}
.rpano-arrow.nudge{animation:rpano-nudge 1.2s ease-in-out 3}
@keyframes rpano-nudge{50%{transform:translateX(var(--n)) scale(1.08)}}
.rpano-arrow.r{--n:6px}.rpano-arrow.l{--n:-6px}
.rpano-dots{position:fixed;left:50%;top:calc(env(safe-area-inset-top,0px) + 96px);transform:translateX(-50%);z-index:30;display:flex;gap:8px;padding:6px 10px;border-radius:999px;background:#fff8ecd9;border:3px solid #fff;box-shadow:0 4px 0 #cdb08c;pointer-events:none}
.rpano-dots i{width:30px;height:30px;display:grid;place-items:center;opacity:.42;filter:saturate(.6);transition:opacity .2s,transform .25s cubic-bezier(.3,1.6,.5,1),filter .2s}
.rpano-dots i img{width:100%;height:100%;object-fit:contain;display:block}
.rpano-dots i.on{opacity:1;filter:none;transform:scale(1.25)}
body.room-pano.v2-trying .rpano-dots,body.room-pano:has(dialog[open]) .rpano{display:none}
@media(max-width:699px){.rpano-arrow{width:46px;height:46px;top:calc(50% - 70px);border-width:3px}.rpano-arrow svg{width:24px;height:24px}.rpano-dots{top:calc(env(safe-area-inset-top,0px) + 84px)}}
@media(prefers-reduced-motion:reduce){html body.room-pano #main>.bedroom-scene,html body.room-pano #main::after{transition:none!important}.rpano-arrow.nudge{animation:none}}

/* ---- room life (room-pano-life.js) ---- */
/* the drop target shelf glows and shows where the squishy will land */
html body.ui2.ui2.ui2.room-pano .bedroom-scene .room-wall-shelf.room-drop-ready{background:radial-gradient(ellipse 60% 26% at 50% 100%,#fff6c6cc,#fff6c600 70%)!important;outline:none!important;box-shadow:0 0 0 3px #ffffffcc,0 0 22px 6px #fff2a8aa!important;border-radius:14px!important}
html body.room-pano .bedroom-scene .room-wall-shelf.room-drop-ready::after{content:'';position:absolute;left:50%;bottom:-2px;width:min(70%,70px);height:12px;translate:-50% 0;border-radius:50%;background:#fffbe2;box-shadow:0 0 14px 4px #fff3b0;opacity:.85;animation:pl-spot 1s ease-in-out infinite;pointer-events:none}
@keyframes pl-spot{50%{scale:1.15 1;opacity:1}}
/* jiggle when the room stops, plop when a toy lands */
.pl-jiggle{animation:pl-jiggle .7s cubic-bezier(.3,1.6,.5,1) var(--jd,0ms) both;transform-origin:50% 100%}
@keyframes pl-jiggle{0%{rotate:0deg}25%{rotate:var(--jr,4deg);scale:1.04 .96}55%{rotate:calc(var(--jr,4deg)*-.6);scale:.98 1.03}80%{rotate:calc(var(--jr,4deg)*.25)}100%{rotate:0deg;scale:1 1}}
.pl-land{animation:pl-land .5s cubic-bezier(.3,1.6,.5,1) both;transform-origin:50% 100%}
@keyframes pl-land{0%{scale:1.2 .72}45%{scale:.9 1.12}75%{scale:1.04 .97}100%{scale:1 1}}
.pl-puff{position:absolute;width:70px;height:26px;margin-left:-35px;margin-top:-13px;border-radius:50%;background:radial-gradient(ellipse,#fffdf3 0,#fffdf3aa 40%,#fff0 70%);pointer-events:none;z-index:40;animation:pl-puff .65s ease-out forwards}
.pl-puff.shelf{width:56px;height:18px;margin-left:-28px}
@keyframes pl-puff{0%{scale:.4;opacity:.95}100%{scale:1.8 1.3;opacity:0}}
/* sparkles, confetti, plaques */
.pl-spark{position:absolute;width:16px;height:16px;margin:-8px 0 0 -8px;pointer-events:none;z-index:41;background:conic-gradient(from 45deg,#fff0 0 12%,#fff8c8 12% 13%,#fff0 13% 37%,#fff8c8 37% 38%,#fff0 38% 62%,#fff8c8 62% 63%,#fff0 63% 87%,#fff8c8 87% 88%,#fff0 88%),radial-gradient(circle,#fff 0 18%,#ffe27a 30%,#fff0 60%);border-radius:50%;opacity:0;animation:pl-spark 1.1s ease-out var(--dl,0ms) forwards}
@keyframes pl-spark{0%{opacity:0;scale:.2}30%{opacity:1;scale:1.2;rotate:30deg}100%{opacity:0;scale:.6;translate:0 -24px;rotate:90deg}}
.pl-confetti{position:absolute;width:9px;height:14px;border-radius:3px;background:var(--c);pointer-events:none;z-index:41;opacity:0;animation:pl-conf 1.8s cubic-bezier(.2,.6,.4,1) var(--dl,0ms) forwards}
@keyframes pl-conf{0%{opacity:1;translate:0 0;rotate:0}100%{opacity:0;translate:var(--dx) 260px;rotate:540deg}}
.pl-layer{position:absolute;left:0;top:0;width:0;height:0;pointer-events:none}
.pl-fairy,.pl-stars,.pl-steam{z-index:1}
.pl-plaques{z-index:2}
.pl-plaque{position:absolute;width:calc(var(--ps,1)*96px);height:calc(var(--ps,1)*110px);translate:-50% -100%;border-radius:14px 14px 10px 10px;background:linear-gradient(160deg,#fff4c2,#f5c84f 45%,#d99a22);border:3px solid #fff3c4;box-shadow:0 5px 0 #a8701a,0 8px 14px #5a3a1a55,inset 0 2px 0 #fffbe6;display:grid;place-items:center;padding:8%;animation:pl-plaque .6s cubic-bezier(.3,1.6,.5,1) both}
.pl-plaque>*{width:100%!important;height:100%!important;position:static!important;transform:none!important;rotate:none!important;filter:drop-shadow(0 2px 2px #8a5a1a66)}
.pl-plaque img{object-fit:contain}
.pl-plaque::after{content:'';position:absolute;left:12%;right:12%;bottom:-12px;height:10px;border-radius:0 0 8px 8px;background:#c98a24}
@keyframes pl-plaque{0%{scale:.3;opacity:0}100%{scale:1;opacity:1}}
/* fairy lights: soft glow, brighter at night; a full column's lights stay bright, a new one twinkles */
.pl-bulb{position:absolute;width:18px;height:18px;margin:-9px 0 0 -9px;border-radius:50%;background:radial-gradient(circle,#fffbe0 0,#ffe08acc 30%,#ffd56b00 70%);opacity:.35;animation:pl-bulb 3.2s ease-in-out var(--bd,0s) infinite}
@keyframes pl-bulb{50%{opacity:.75;scale:1.25}}
.pl-bulb.lit{opacity:.85;width:26px;height:26px;margin:-13px 0 0 -13px}
.pl-bulb.party{animation:pl-party .35s ease-in-out var(--pd,0ms) 6 alternate}
@keyframes pl-party{0%{opacity:.3;scale:.9}100%{opacity:1;scale:1.8;filter:hue-rotate(40deg)}}
body:is(.night-time,.rn-night,.calm-mode) .pl-bulb{opacity:.7;width:30px;height:30px;margin:-15px 0 0 -15px}
/* window stars at night */
.pl-star{position:absolute;width:10px;height:10px;margin:-5px 0 0 -5px;border-radius:50%;background:radial-gradient(circle,#fff 0,#fff8 35%,#fff0 70%);opacity:0;display:none}
body:is(.night-time,.rn-night,.calm-mode) .pl-star{display:block;animation:pl-star 2.6s ease-in-out var(--sd,0s) infinite}
@keyframes pl-star{0%,100%{opacity:.1;scale:.6}50%{opacity:1;scale:1.4}}
/* tea party at the play table */
html body.room-pano .bedroom-scene .rp-toy.pl-tea .rp-body{animation:pl-tea 2.4s ease-in-out var(--td,0s) infinite;transform-origin:50% 100%}
@keyframes pl-tea{0%,100%{rotate:0deg;translate:0 0}25%{rotate:-5deg;translate:0 -4px}50%{rotate:0deg}75%{rotate:4deg;translate:0 -2px}}
.pl-steampuff{position:absolute;width:30px;height:46px;margin:-46px 0 0 -15px;border-radius:50%;background:radial-gradient(ellipse at 50% 70%,#ffffffcc,#fff0 65%);animation:pl-steam 2.3s ease-out forwards}
@keyframes pl-steam{0%{opacity:0;translate:0 0;scale:.5}30%{opacity:.9}100%{opacity:0;translate:6px -50px;scale:1.4}}
/* Mochi on a walk */
html body .bedroom-scene .mochi-room.pl-walk{animation:pl-walk .45s ease-in-out infinite alternate}
@keyframes pl-walk{0%{translate:0 0}100%{translate:0 -10px}}
@media(prefers-reduced-motion:reduce){.pl-jiggle,.pl-land,.pl-bulb,.pl-star,.pl-tea .rp-body,.pl-walk{animation:none!important}}

/* ---- refinement pass ---- */
/* less clutter in the room: the save nudge lives in Town, the drag hint shows until the first move, Play scene is a heart */
body.room-pano[data-place=home] .v2-savenudge{display:none!important}
body.room-pano.room-hints-done[data-place=home] .room-instruction{display:none!important}
body.room-pano[data-place=home] .bedroom-scene .sb-pair-play{font-size:0!important;min-width:38px!important;min-height:38px!important;width:38px;height:38px;padding:0!important;border-radius:50%!important;display:grid;place-items:center;translate:-50% -30%}
body.room-pano[data-place=home] .bedroom-scene .sb-pair-play>span{font-size:19px;line-height:1;color:#e0528f}
/* shelf toys sit on the board: a soft contact shadow under each row */
html body.room-pano .bedroom-scene .room-wall-shelf:has(.display-toys .toy) .display-toys{background:radial-gradient(ellipse 46% 13% at 50% 98%,#3b24164d,#3b241600 72%)}
/* toys take the room's light: a touch cooler and dimmer at night, warmer by day */
html body.room-pano:is(.night-time,.rn-night,.calm-mode) .bedroom-scene :is(.display-toys>.toy,.rp-body){filter:brightness(.84) saturate(.9) hue-rotate(-6deg)}
html body.room-pano.rn-dark .bedroom-scene :is(.display-toys>.toy,.rp-body){filter:brightness(.62) saturate(.8)}
/* soft shading at the two far ends of the room */
.pl-ends{position:absolute;inset:0;pointer-events:none;background:linear-gradient(90deg,#2a17101f 0,#2a171000 4%,#2a171000 96%,#2a17101f 100%)}
/* cross-fade when the picture changes (day/night, room looks) */
.pl-fade{position:absolute;inset:0;pointer-events:none;background-repeat:no-repeat;opacity:1;transition:opacity .85s ease}
.pl-fade.out{opacity:0}
/* one tidy tools menu: a round paintbrush button; Undo, Edit room and Find toys fan out under it */
body.room-pano .room-controls>.rc-toggle{width:54px;min-height:54px;border-radius:50%;padding:7px;display:grid;place-items:center}
body.room-pano .room-controls>.rc-toggle img{width:34px;height:34px;object-fit:contain;transition:rotate .3s}
body.room-pano .room-controls.rc-open>.rc-toggle img{rotate:-20deg}
body.room-pano .room-controls:not(.rc-open)>button:not(.rc-toggle){display:none}
body.room-pano .room-controls.rc-open>button:not(.rc-toggle){animation:rc-in .28s cubic-bezier(.3,1.6,.5,1) both}
body.room-pano .room-controls.rc-open>button:nth-of-type(3){animation-delay:.05s}body.room-pano .room-controls.rc-open>button:nth-of-type(4){animation-delay:.1s}
@keyframes rc-in{0%{opacity:0;translate:0 -12px;scale:.7}100%{opacity:1;translate:0 0;scale:1}}
body.room-pano.room-edit-open .room-controls>button:not(.rc-toggle){display:flex}

/* iPad and wider: the dots sit in the empty middle of the top bar, off the room's shelves */
@media(min-width:700px){.rpano-dots{top:calc(env(safe-area-inset-top,0px) + 18px)}}

/* phones: the drag hint is a small pill tucked at the left above the shelf, and it fades on its own after a few seconds */
@media(max-width:699px){html body.ui2.ui2.room-pano[data-place=home]:not(.room-hints-done) .room-instruction{right:auto!important;left:12px!important;font-size:11px!important;padding:4px 9px!important;animation:rp-hint-out .6s ease 6s forwards}}
@keyframes rp-hint-out{to{opacity:0;visibility:hidden}}

/* drawn light string for the cloud and ocean looks */
.pl-wire{position:absolute;overflow:visible;pointer-events:none}
.pl-wire path{fill:none;stroke:#5b4a3a;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;opacity:.65}
.pl-bulb.drawn::before{content:'';position:absolute;left:50%;top:50%;width:8px;height:10px;margin:-6px 0 0 -4px;border-radius:50% 50% 45% 45%;background:radial-gradient(circle at 40% 35%,#fffbe6,#ffd56b);box-shadow:0 0 6px 2px #ffe08a}
.pl-bulb.drawn{opacity:.85}
/* a found toy glows for a moment */
.pl-found{animation:pl-found .65s ease-in-out 4;filter:drop-shadow(0 0 10px #fff6a8) drop-shadow(0 0 4px #fff)!important}
@keyframes pl-found{50%{scale:1.15}}
/* lights glow (Mac, 10/24): bulbs get a halo, twinkle on their own and a ripple runs along the string every 9 s;
   the wall under them catches warm light; the bedside lamp glows and breathes at night. Lights out = lamp off, bulbs a dim night light. */
.pl-lamp{z-index:1}
.pl-fairy .pl-bulb{--g:calc(var(--s,.3)*92px);width:var(--g);height:var(--g);margin:calc(var(--g)/-2) 0 0 calc(var(--g)/-2);background:radial-gradient(circle,#fffdf0 0 9%,#ffe9a0e6 16%,#ffc95a55 38%,#ffb84a00 68%);mix-blend-mode:screen;opacity:.45;animation:pl-bulb 3.2s ease-in-out var(--bd,0s) infinite}
.pl-fairy .pl-bulb::after{content:'';position:absolute;inset:0;border-radius:50%;background:radial-gradient(circle,#fff 0 10%,#fff3c0 20%,#ffd36b00 62%);opacity:0;animation:pl-wave 9s ease-out var(--wd,0s) infinite}
@keyframes pl-bulb{0%,100%{opacity:.45;scale:.92}50%{opacity:.8;scale:1.08}}
@keyframes pl-wave{0%,72%,84%,100%{opacity:0;scale:1}77%{opacity:1;scale:1.5}}
.pl-fairy .pl-bulb.lit{--g:calc(var(--s,.3)*120px);opacity:.9}
body:is(.night-time,.rn-night,.calm-mode) .pl-fairy .pl-bulb{--g:calc(var(--s,.3)*150px);opacity:.9;animation-name:pl-bulb-n}
@keyframes pl-bulb-n{0%,100%{opacity:.7;scale:.9}50%{opacity:1;scale:1.12}}
.pl-wash{position:absolute;pointer-events:none;border-radius:50%;background:radial-gradient(56% 34% at 50% 18%,#ffd98a 0,#ffc56b66 45%,#ffc56b00 100%);mix-blend-mode:soft-light;opacity:.35;animation:pl-wash 6s ease-in-out infinite}
body:is(.night-time,.rn-night,.calm-mode) .pl-wash{mix-blend-mode:screen;opacity:.45;animation-name:pl-wash-n}
@keyframes pl-wash{50%{opacity:.5}}
@keyframes pl-wash-n{50%{opacity:.65}}
.pl-lamp b{position:absolute;pointer-events:none;border-radius:50%;display:none}
.pl-lamp-halo{--g:calc(var(--s,.3)*300px);width:var(--g);height:var(--g);margin:calc(var(--g)/-2) 0 0 calc(var(--g)/-2);background:radial-gradient(circle,#fff6d0 0 8%,#ffe08acc 18%,#ffc25e55 40%,#ffb04a00 70%);mix-blend-mode:screen;animation:pl-lamp 5s ease-in-out infinite}
.pl-lamp-pool{--g:calc(var(--s,.3)*620px);width:var(--g);height:calc(var(--g)*.75);margin:calc(var(--g)*-.3) 0 0 calc(var(--g)/-2);background:radial-gradient(closest-side,#ffcf7a99,#ffc06a33 55%,#ffb04a00);mix-blend-mode:screen;animation:pl-lamp 5s ease-in-out -.4s infinite}
@keyframes pl-lamp{0%,100%{opacity:.75;scale:.97}50%{opacity:1;scale:1.03}}
body:is(.night-time,.rn-night,.calm-mode) .pl-lamp b{display:block}
body.rn-dark .pl-lamp b,body.rn-dark .pl-wash{display:none}
body.rn-dark .pl-fairy .pl-bulb{opacity:.45;animation-duration:5s}
body.rn-dark .pl-fairy .pl-bulb::after{animation:none}
body.calm-mode .pl-fairy .pl-bulb::after{animation-duration:14s}
@media(prefers-reduced-motion:reduce){.pl-fairy .pl-bulb::after,.pl-wash,.pl-lamp b{animation:none!important}}
html body .pl-fairy .pl-bulb.party{animation:pl-party .35s ease-in-out var(--pd,0ms) 6 alternate}
