/* One bedroom, three actions. The generated bed remains the play surface. */
body.room-adventure.bedtime-play{background:#e9e4d8!important}
body.room-adventure.bedtime-play .story-world-backdrop{display:none!important}
body.room-adventure.bedtime-play #playScreen .play-world{display:block!important;height:100%!important;padding:0!important}
body.room-adventure.bedtime-play #playScreen .story-window{display:none!important}
body.room-adventure.bedtime-play #gameBoard{height:100%!important;width:100%;padding:4px 8px!important;background:none!important;border:0!important;box-shadow:none!important;gap:0!important;overflow:hidden!important}
body.room-adventure.bedtime-play #gameBoard .mini-heading{justify-content:flex-end;position:absolute;right:2%;top:2%;z-index:20}
body.room-adventure.bedtime-play #gameBoard .mini-heading .eyebrow{display:none}
body.room-adventure.bedtime-play #roundBoard.bedtime-host{display:block!important;height:100%;padding:0!important;overflow:visible!important}
.bed-sr-only{position:absolute!important;width:1px!important;height:1px!important;margin:-1px!important;padding:0!important;overflow:hidden!important;clip-path:inset(50%)!important}
.bed-scene{position:relative;width:100%;height:100%;isolation:isolate;overflow:hidden;border-radius:20px}
.bed-room-plane{position:absolute;width:min(100%,calc((100dvh - 155px)*1.5));aspect-ratio:3/2;left:50%;top:50%;translate:-50% -50%;background:url('art/bedroom-stage-v3.webp') center/100% 100% no-repeat;transition:filter 1.4s}
.bed-instruction{position:absolute;top:5%;left:15%;right:15%;z-index:12;text-align:center;margin:0;color:#214f48;font:700 clamp(25px,3vw,44px)/1.2 Froople,'Trebuchet MS',sans-serif;paint-order:stroke fill;-webkit-text-stroke:3px #fff7e8;text-shadow:0 3px 6px #fff8e8}
.bed-instruction strong{color:#b87525;text-decoration:underline;text-underline-offset:5px}
.bed-scene button{touch-action:none;user-select:none;-webkit-user-select:none;cursor:pointer;padding:0!important;min-height:44px;min-width:44px;border:0;background:none;box-shadow:none;font:inherit}
.bed-scene button:disabled{opacity:1!important;cursor:default}.bed-scene button:focus-visible{outline:4px solid #319bbe!important;outline-offset:4px}
.bed-head-target{position:absolute;left:48%;top:32%;width:26%;height:20%;z-index:4;border:3px dashed #fff9d7!important;border-radius:45%!important;filter:drop-shadow(0 0 8px #fff6b5);animation:bedPillowGlow 1.6s ease-in-out infinite alternate}
.head-on .bed-head-target{visibility:hidden}
.bed-dodu-piece{position:absolute;left:18%;top:48%;width:22%;height:42%;z-index:7;transition:left .8s,top .8s,width .8s,height .8s,translate .3s;filter:drop-shadow(0 9px 5px #614f382c)}
.bed-dodu-piece img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;pointer-events:none}
.bed-dodu-asleep{opacity:0;transform:none;transition:opacity .45s}.head-on .bed-dodu-awake{opacity:0}.head-on .bed-dodu-asleep{opacity:1}
.head-on .bed-dodu-piece{left:var(--bed-rest-left,50%);top:var(--bed-rest-top,29%);width:var(--bed-rest-width,22%);height:var(--bed-rest-height,42%)}
.bed-dragging{transition:none!important;z-index:15!important;filter:drop-shadow(0 12px 7px #614f3866)}
.bed-selected{filter:drop-shadow(0 0 8px #fff9d1)}
.bed-cosy-blanket{--pull:0px;position:absolute;left:44%;top:calc(65% - var(--pull));width:35%;height:calc(9% + var(--pull));z-index:8;border-radius:14px 14px 28px 28px!important;background:repeating-linear-gradient(90deg,#84a6c4 0 7%,#90b0cb 8% 9%)!important;border:2px solid #7592b1!important;box-shadow:inset 0 4px 12px #ffffff80,0 10px 12px #3d4d612e!important;transform:perspective(700px) rotateX(12deg);transition:top .8s,height .8s}
.bed-cosy-blanket:active{transition:none}.blanket-up .bed-cosy-blanket{top:51%;height:23%}
.bed-quilt-fold{position:absolute;left:0;right:0;top:0;height:23%;background:linear-gradient(#fff7dd,#e7d9bb);border-radius:13px 13px 5px 5px;box-shadow:0 3px 3px #46566d33}
.bed-quilt-stars{display:block;padding-top:14%;text-align:center;font-size:clamp(12px,2vw,26px);line-height:1.5;color:#ead8a5;text-shadow:0 1px 1px #6a83a7;overflow:hidden;height:95%}
.bed-swipe-guide{position:absolute;left:43%;top:-27%;color:#fff5c0;font-size:48px;text-shadow:0 2px 4px #6a728c;animation:bedSwipeGuide 1s ease-in-out infinite alternate}
.bed-scene:not([data-round="1"]) .bed-swipe-guide,.blanket-up .bed-swipe-guide{display:none}
.bed-real-lamp{position:absolute;left:82%;top:28%;width:14%;height:30%;z-index:9;border-radius:25%!important}
.bed-switch{position:absolute;left:39%;top:67%;width:23%;aspect-ratio:1;border-radius:50%;background:#f9dc9e;border:3px solid #fff8da;box-shadow:0 0 16px #fff8bb}
.bed-switch-glow{position:absolute;inset:-20%;border-radius:50%;background:radial-gradient(#ffde8577,transparent 70%);pointer-events:none}
.bed-scene:not([data-round="2"]) .bed-switch{opacity:0}.light-off .bed-switch{background:#8c9ab8;box-shadow:none}.light-off .bed-switch-glow{opacity:0}
.light-off .bed-room-plane{filter:brightness(.37) saturate(.7) hue-rotate(8deg)}
.bed-night-stars{position:absolute;inset:0;pointer-events:none;opacity:0;z-index:10;transition:opacity 2s;color:#ffebaa}.light-off .bed-night-stars{opacity:1}
.bed-night-stars span{position:absolute;left:18%;top:20%;font-size:56px}.bed-night-stars i{position:absolute;left:calc(12% + mod(var(--i)*19,77)*1%);top:calc(19% + mod(var(--i)*13,43)*1%);font-style:normal;font-size:calc(10px + mod(var(--i),3)*7px);animation:bedStar 2.8s ease-in-out infinite alternate;animation-delay:calc(var(--i)*-.2s)}
.bed-status{position:absolute;left:40%;top:40%;z-index:15;margin:0;font-size:40px;color:#fff8d9;pointer-events:none}.bed-status:empty{display:none}
.bed-paused *{animation-play-state:paused!important;transition:none!important}
@keyframes bedPillowGlow{to{filter:drop-shadow(0 0 15px #fff3ab);border-color:#ffe69e}}
@keyframes bedSwipeGuide{to{translate:0 -10px}}@keyframes bedStar{to{opacity:.3;scale:.75}}
@media(max-width:700px) and (orientation:portrait){.bed-scene{border-radius:0}.bed-room-plane{width:165%;max-width:none;top:55%;left:32%}.bed-instruction{left:7%;right:7%;top:11%;font-size:29px}.bed-dodu-piece{left:34%;top:50%;width:20%;height:40%}.head-on .bed-dodu-piece{left:var(--bed-rest-left,50%);top:var(--bed-rest-top,29%);width:var(--bed-rest-width,22%);height:var(--bed-rest-height,42%)}.bed-head-target{left:48%;width:26%}.bed-real-lamp{left:82%;width:14%}.bed-night-stars span{left:8%;top:27%;font-size:42px}}
@media(max-height:540px) and (orientation:landscape){.bed-room-plane{width:min(100%,calc((100dvh - 105px)*1.5))}.bed-instruction{font-size:23px;top:2%;left:20%;right:20%}.bed-switch{min-width:17px}.bed-swipe-guide{font-size:32px}}
@media(prefers-reduced-motion:reduce){.bed-scene *{animation:none!important;transition:none!important}}

body.room-adventure.bedtime-play::before{content:"";position:fixed;inset:-25px;background:url("art/bedroom-stage-v3.webp") center/cover no-repeat;filter:blur(20px);opacity:.5;z-index:-1;pointer-events:none;transition:filter 1.4s}
body.room-adventure.bedtime-lights-off::before{filter:blur(20px) brightness(.35)}
.bed-room-plane{mask-image:linear-gradient(90deg,transparent,#000 2%,#000 98%,transparent)}

.bed-scene .bed-cosy-blanket{border:0!important;background:url("art/bedtime-quilt-v3.webp") center/100% 100% no-repeat!important;box-shadow:none!important;border-radius:0!important;filter:drop-shadow(0 7px 4px #3d4d612e)}
.bed-quilt-fold,.bed-quilt-stars{display:none}
.bed-switch{top:55%}

.bed-dodu-piece{z-index:9}.head-on .bed-dodu-piece{z-index:7}

/* A supine sprite keeps its natural axis and settles onto the pillow. */
.bed-dodu-asleep{transform:none!important;object-fit:contain}
.head-on .bed-dodu-piece{filter:drop-shadow(0 3px 3px #614f3825)}
.head-on .bed-dodu-piece::before{content:"";position:absolute;left:21%;top:30%;width:58%;height:10%;border-radius:50%;background:radial-gradient(ellipse,#6a4f3026,transparent 72%);z-index:-1;pointer-events:none}
