/* A single room illustration preserves perspective and furniture scale. */
.is-coherent{background:#181b20;border-color:#ffffff19;box-shadow:0 24px 70px #0003}
.is-coherent .room-viewport{border-radius:12px}
.is-coherent .room-scene{transform:translate(var(--pan-x),var(--pan-y)) scale(1.025)}
.is-coherent .coherent-hotspot,.is-coherent .coherent-prop{position:absolute;padding:0;border:0;background:transparent;z-index:6;border-radius:5px}
.coherent-hotspot span{position:absolute;bottom:100%;left:50%;transform:translateX(-50%);width:max-content;max-width:160px;font-size:11px;padding:6px 9px;background:#172025e8;border:1px solid #ffffff35;border-radius:8px;opacity:0;pointer-events:none;transition:opacity .2s;color:#faf5e9}
.coherent-hotspot:hover span,.coherent-hotspot:focus-visible span{opacity:1}
.is-coherent .coherent-hotspot:hover{box-shadow:inset 0 0 0 1px #ffefcf45;background:#ffeacc07}
.is-coherent .coherent-prop{aspect-ratio:1;filter:drop-shadow(0 3px 2px #0005)}
.is-coherent .room-character{left:45%;top:34%;width:22%;height:50%;z-index:8;filter:drop-shadow(0 7px 4px #16151055)}
.is-coherent .room-companion-chat{left:93%;top:49%;background:#17232cd9;color:#e8deca;border:1px solid #ffffff45}
.is-coherent .room-companion-bubble{left:auto;right:8%;top:auto;bottom:59%;width:28%;background:#15242cc4;border-color:#e7e3d23b;box-shadow:0 12px 35px #0004;font-size:clamp(11px,1vw,14px)}
.is-coherent .room-companion-bubble::after{left:auto;right:8px;top:100%;width:15px;height:18px;clip-path:polygon(0 0,100% 0,100% 100%);background:#15242cc4}
.is-coherent .room-panel{background:#18242bec;border:1px solid #d8e3e32b;box-shadow:0 12px 40px #0003;backdrop-filter:blur(20px)}
.is-coherent .room-panel button{background:#ffffff0b;border-color:#ffffff35}.is-coherent .room-panel [aria-pressed=true]{background:#c8b2872b;border-color:#d4bd87}
@media(max-width:600px){.is-coherent .room-companion-bubble{right:8%;bottom:59%;width:61%;font-size:11px;padding:8px 22px 8px 10px}.is-coherent .room-companion-chat{width:20px;height:20px}.is-coherent .room-scene{transform:none}.is-coherent .room-quick-actions{display:flex}}
@media(prefers-reduced-motion:reduce){.is-coherent .room-scene{transform:none}}

/* Only the bed rectangle is replaced: all other room pixels stay unchanged. */
.coherent-bed-plate{position:absolute;inset:0;z-index:1;pointer-events:none;background-size:100% 100%;background-repeat:no-repeat;clip-path:inset(35% 63.7% 27% 9.3%)}
.coherent-bed-unmade{background-image:url('../images/room/room-bed-unmade-v3.webp')}
.coherent-bed-made{background-image:url('../images/room/room-bed-made-v3.webp');opacity:0;transition:opacity .7s ease}
[data-bed-made=true] .coherent-bed-made{opacity:1}
.is-coherent .coherent-pet{position:absolute;left:19.7%;top:40.7%;width:9%;height:9%;padding:0;border:0;background:none;z-index:7;cursor:pointer;filter:drop-shadow(0 2px 1px #20160955)}
.coherent-cat-art{display:block;width:100%;height:100%;background:url('../images/room/room-cat-layer-v3.webp') center bottom/contain no-repeat;transform-origin:50% 89%;animation:coherent-cat-breathe 5.8s ease-in-out infinite}
.is-coherent .coherent-other-pet{top:36%;height:auto;aspect-ratio:1}
@keyframes coherent-cat-breathe{0%,100%{transform:scale(1,1)}48%{transform:scale(1.006,1.025)}}
@media(prefers-reduced-motion:reduce){.coherent-cat-art{animation:none}.coherent-bed-made{transition:none}}

/* Surface-specific texture rendering replaces the prototype colour polygons. */
.is-coherent .room-wallpaper-tone,.is-coherent .room-floor-tone,.is-coherent .coherent-tone{display:none}
.coherent-materials,.coherent-poster-plane{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;overflow:hidden;z-index:2}
.coherent-poster-plane{z-index:3}
.coherent-print{position:absolute;left:0;top:0;transform-origin:0 0;overflow:hidden}
.is-coherent .coherent-print .room-poster-design{inset:0;padding:14px;box-sizing:border-box;font-size:15px;font-weight:500;letter-spacing:2px;background:radial-gradient(circle at 75% 22%,#d8c79944,transparent 45%),linear-gradient(145deg,#171f2bcc,var(--custom-poster));color:#eee6ce;line-height:1.6;box-shadow:inset 0 0 18px #0007;white-space:normal}
.coherent-print .room-poster-design::before{content:'';position:absolute;inset:9px;border:1px solid #e1d5b044;pointer-events:none}
.is-coherent .coherent-print .room-poster-design img{object-fit:cover}
.is-coherent .coherent-print .room-poster-caption{font-size:10px;padding:8px;letter-spacing:.4px}
/* Light stays tied to both lamps; room darkness and glow are independent. */
.is-coherent .room-light,.is-coherent.is-lit .room-light,.is-coherent.is-night .room-light,.is-coherent.is-night.is-lit .room-light,.is-coherent[data-room-style=gaming] .room-light,.is-coherent:not([data-custom-light=default]).is-lit .room-light{opacity:1;mix-blend-mode:normal;background:linear-gradient(var(--room-darkness,transparent),var(--room-darkness,transparent));transition:background .6s}
.is-coherent.is-night{--room-darkness:#0b14284a}
.is-coherent.is-night:not(.is-lit){--room-darkness:#091225a3}
.is-coherent .room-light::after{content:'';position:absolute;inset:0;opacity:0;mix-blend-mode:soft-light;background:radial-gradient(ellipse 24% 35% at 96% 38%,var(--room-lamp-color,#ffd59a),transparent 85%),radial-gradient(ellipse 16% 28% at 37% 39%,var(--room-lamp-color,#ffd59a),transparent 85%);transition:opacity .6s}
.is-coherent.is-lit .room-light::after{opacity:.36}
.is-coherent:not([data-custom-light=default]){--room-lamp-color:var(--custom-light)}
.is-coherent[data-room-style=gaming] .room-light::before{content:'';position:absolute;inset:0;background:radial-gradient(ellipse at 82% 46%,#9561ef15,transparent 45%),radial-gradient(ellipse at 35% 40%,#4dbac113,transparent 45%);mix-blend-mode:screen}

.coherent-poster-foreground{position:absolute;inset:0;width:100%;height:100%;z-index:4;pointer-events:none}
/* The source already contains realistic lamplight; avoid adding white fog. */
.is-coherent.is-lit .room-light::after{opacity:0}
.is-coherent:not([data-custom-light=default]).is-lit .room-light::after{opacity:.14;mix-blend-mode:color}

.coherent-hotspot span{max-width:190px;white-space:normal;text-align:center;line-height:1.4;padding:8px 11px;background:#17232dde;backdrop-filter:blur(12px);border-color:#e4d6b92b}

.room-accessible-title{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip-path:inset(50%)}
.room-settings-links{margin-top:20px;padding-top:14px;border-top:1px solid #ffffff20}
.is-coherent .room-companion-bubble{width:34%;font-size:clamp(13px,1.2vw,16px);line-height:1.55;background:#12242be8;border:1px solid #82e9cf99;box-shadow:0 0 0 1px #a995ed44,0 0 18px #73e3cd30,0 12px 35px #0006;padding:14px 26px 14px 16px}
@media(max-width:600px){.is-coherent .room-companion-bubble{width:66%;font-size:12px;line-height:1.45;padding:10px 23px 10px 12px}}
