/* Artwork and hit surfaces share the world's matrix. UI stays in screen space. */
.room-world{position:absolute;left:0;transform-origin:0 0;isolation:isolate;z-index:0;will-change:transform}
.room-world #room-tools{position:absolute;inset:0;pointer-events:none}
.room-world #room-tools .room-object{pointer-events:auto}
.room-world .room-wall,.room-world .room-wall picture,.room-world #room-background{width:100%;height:100%}
.room-world .room-wall picture source{display:none}
.room .room-world #pet-button{left:var(--pet-world-x,310px);top:calc(var(--pet-foot,600px) - 256px * 208 / 192 * .9471153846);bottom:auto;width:256px;height:calc(256px * 208 / 192);--pet-width:256px;transform:translateX(-50%)}
.room-world .rug{transform:none}.room-world .green-jelly{transform:none;z-index:4}
.room-world .notebook-art{transform:none}
.room-world .notebook-paper{left:0;top:0;width:100%;height:100%}
.room .room-world .jelly-body{z-index:1;pointer-events:none;animation:none}
.room-world .jelly-nest-back{z-index:0}.room-world .jelly-nest-front{z-index:2}
.room-world .jelly-play-mark{z-index:3}
/* Original pieces stay available as source art. One uniform transform positions
   each approved group; its baked contacts are not duplicated with CSS shadows. */
.room[data-grouped-furniture=true] .desk,.room[data-grouped-furniture=true] .computer,.room[data-grouped-furniture=true] .desk-stool,.room[data-grouped-furniture=true] .side-table,.room[data-grouped-furniture=true] .timer-support{display:none}
.room-furniture-group{position:absolute;z-index:2;pointer-events:none}
.workstation-group .room-art{filter:brightness(var(--desk-ambient)) saturate(var(--art-saturation))}
.room-furniture-group .room-art{position:relative;z-index:1}
.furniture-contact-shadow{position:absolute;z-index:0;pointer-events:none;border-radius:50%;background:radial-gradient(ellipse,#82796b18,transparent 74%);opacity:var(--desk-ambient)}
.focus-group .room-art{filter:brightness(var(--near-ambient)) saturate(var(--art-saturation))}
.desktop-notes-group,.desktop-timer-group{display:none}
.room[data-desktop-composition=true] .focus-group{display:none}
.room[data-desktop-composition=true] .desktop-notes-group,.room[data-desktop-composition=true] .desktop-timer-group{display:block}
.desktop-notes-group .room-art{filter:brightness(var(--near-ambient)) saturate(var(--art-saturation))}
.desktop-timer-group .room-art{filter:brightness(var(--far-ambient)) saturate(var(--art-saturation))}
.room.lit .workstation-group .room-art{filter:brightness(var(--desk-ambient)) saturate(var(--art-saturation)) sepia(calc((1 - var(--outdoor-light,1))*.03))}
.room[data-grouped-furniture=true] #open-notes>.object-art,.room[data-grouped-furniture=true] #open-timer>.object-art{visibility:hidden}
.room-world .lamp-glow{width:100%;height:100%}
.room-world .sunlight{inset:0;width:100%;height:100%}
.window[data-wall-registered=true] .window-moon{top:30%;right:18%;width:25px;height:25px;box-shadow:-7px 3px 0 0 #f1e7cdb3}
.window[data-wall-registered=true] .window-stars{top:36%;left:17%}
@media(max-width:600px){.window[data-wall-registered=true] .window-moon{width:19px;height:19px;box-shadow:-5px 2px 0 #f1e7cdb3}}
.room .pet-controls{left:auto;right:70px;top:max(18px,env(safe-area-inset-top));bottom:auto;z-index:20}
.room .pet-controls[open]{left:auto;right:18px;top:max(18px,env(safe-area-inset-top));width:min(276px,calc(100vw - 36px));max-height:calc(100dvh - 100px);padding:0 12px 12px;overflow:auto;background:#faf6ecfa}
.room .pet-controls[open] summary{margin-left:auto;margin-right:39px}
.room-menu-tools{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin:0 0 12px}
.room-menu-tools button,.room-menu-tools a{display:grid;place-items:center;min-height:44px;padding:6px;border:1px solid var(--line);border-radius:9px;background:var(--paper);font-size:12px;text-decoration:none}
.room-settings-menu{height:auto;min-height:76px;padding:8px;width:min(216px,calc(100vw - 32px));left:clamp(124px,73%,calc(100% - 124px));max-height:calc(100dvh - 140px);overflow:auto}
.room-settings-menu .room-menu-tools{margin:0;grid-template-columns:1fr}
@media(max-width:600px){.room .pet-controls,.room .pet-controls[open]{left:auto;right:70px}.room .pet-controls[open]{right:18px}.room .pet-controls[open] summary{margin-left:auto;margin-right:39px}}
.room-menu-toggle,.room-nav-label,.desktop-room-tools{display:none}
.room[data-daylight=night]>.pet-joystick .nav-paw-icon{filter:brightness(.58) saturate(.7)}
@media(min-width:601px){
 .room-navigation{inset:18px auto auto 16px;width:64px;height:204px;z-index:19}
 .room-menu-toggle{position:absolute;display:block;left:4px;top:0;min-width:56px;height:44px;padding:0;border:0;background:#faf6ecdf;border-radius:9px;color:var(--ink);font:13px system-ui;cursor:pointer;pointer-events:auto}
 .room-nav-button{display:flex;align-items:center;left:10px;bottom:auto;transform:none;justify-content:start;padding:0 8.5px;text-decoration:none}
 .room-home{top:84px}.room-settings{top:144px}
 .room .pet-joystick{left:50%;top:auto;bottom:var(--controls-bottom);transform:translateX(-50%);z-index:19}
 .room .pet-joystick .room-nav-label{position:absolute;left:48px;top:10px;white-space:nowrap;pointer-events:none}
 .room .room-paw-label{position:absolute;left:58px;top:120px;font-size:13px;white-space:nowrap;pointer-events:none}
 .room-nav-button .room-nav-label{margin-left:14px;white-space:nowrap;font-size:13px}
 .room-settings-menu{left:calc(100% + 12px);top:144px;bottom:auto;transform:none}
 .room[data-nav-open=true] .room-navigation{width:210px;height:auto;min-height:214px;max-height:calc(100dvh - 36px);overflow:auto;padding-bottom:10px;border:1px solid var(--line);border-radius:12px;background:#faf6ecf5;pointer-events:auto;color:var(--ink)}
 .room[data-nav-open=true] .room-menu-toggle{width:190px;text-align:left;padding-left:14px;background:none}
 .room[data-nav-open=true] .room-nav-button{width:190px}
 .room[data-nav-open=true] .room-nav-label{display:block}
 .room[data-nav-open=true] .desktop-room-tools{display:grid;margin:204px 10px 0;grid-template-columns:1fr;pointer-events:auto}
 .room[data-nav-open=true] .room-settings-menu{position:fixed;left:240px;top:180px}
}
