#abRoom{display:none}body:has(#p-chat:not([hidden])) #abRoom{display:flex}.kee-room-scene,.kee-room-dialog,.kee-room-exit{display:none}
body.kee-room-mode .appbar,body.kee-room-mode .tabbar,body.kee-room-mode .miniplayer{display:none!important}
body.kee-room-mode .app{max-width:none;background:#14171B}
body.kee-room-mode .stage{overflow:hidden;height:100%;flex:1}
body.kee-room-mode #p-chat{height:100%;padding:0;overflow:hidden;position:relative;background:#191D22 url('/studio/room/room-background.svg?v=4') center center/cover no-repeat}
body.kee-room-mode #p-chat:after{content:'';position:absolute;inset:0;background:linear-gradient(180deg,#10161922,transparent 40%,#17191c22 70%,#17191c88);pointer-events:none;z-index:0}
body.kee-room-mode .kee-room-scene{display:block;position:absolute;inset:6% 0 23%;z-index:1}
#keeRoomStage{position:absolute;inset:0}#keeRoomStage canvas{display:block;width:100%;height:100%}
#keeRoomStatus{position:absolute;bottom:12%;left:10%;right:10%;text-align:center;color:#EAE6DE;font-size:13px}
#keeRoomEmotion{position:absolute;right:23%;top:35%;border-radius:16px 16px 16px 3px;background:#22303Fee;border:1px solid #7F9EC066;padding:7px 12px;font-size:23px;color:#ABC4E1;pointer-events:none}
body.kee-room-mode .kee-room-exit{display:flex;position:absolute;top:max(18px,env(safe-area-inset-top));left:18px;z-index:4;width:36px;height:36px;align-items:center;justify-content:center;border:1px solid #7F9EC044;border-radius:50%;background:#191D22b0;color:#D5E4F5;font-size:22px;cursor:pointer}
body.kee-room-mode .kee-room-dialog{display:flex;flex-direction:column;position:absolute;bottom:calc(86px + env(safe-area-inset-bottom));left:18px;right:18px;max-width:600px;margin:0 auto;z-index:3;padding:24px 18px 12px;border:1px solid #7F9EC080;border-radius:8px 22px 8px 22px;background:linear-gradient(120deg,#14171Bf5,#1F242Af0);box-shadow:0 12px 50px #050a1266,inset 0 0 0 4px #7F9EC00a;}
.kee-room-name{position:absolute;top:-14px;left:17px;min-width:64px;padding:5px 14px;background:#6E8FB0;border:1px solid #ABC4E180;color:#101820;font-size:12px;letter-spacing:3px;border-radius:4px 10px 4px 10px}
body.kee-room-mode #thread{padding:0;min-height:68px;max-height:min(25dvh,200px);overflow:auto;display:block;background:none;border:0;color:#EAE6DE;scrollbar-width:thin}
body.kee-room-mode #thread>*{display:none!important}body.kee-room-mode #thread>.room-current{display:flex!important;margin:0}
body.kee-room-mode #thread .mini{display:none}body.kee-room-mode #thread .bubble{max-width:100%;width:100%;padding:0;border:0;background:none;box-shadow:none;color:#EAE6DE;border-radius:0;font-size:15px;line-height:1.85}
body.kee-room-mode #thread .bmeta{margin:5px 0}body.kee-room-mode #thread .play{opacity:.75}body.kee-room-mode #thread .reasoning-summary{font-size:12px}
body.kee-room-mode .composer{margin-top:12px;padding:10px 0 0;background:none;border:0;border-top:1px solid #7F9EC033;display:grid;grid-template-columns:minmax(0,1fr) 32px;gap:9px;color:#EAE6DE}
body.kee-room-mode .composer>.cbtn{display:none}body.kee-room-mode .composer .field{border:0;background:#7F9EC014;border-radius:5px;padding:0 10px;box-shadow:none}body.kee-room-mode #chatInput{width:100%;padding:5px 0;color:#EAE6DE;font-size:13px}body.kee-room-mode #chatInput::placeholder{color:#8EA3B9}body.kee-room-mode .composer .send{width:32px;height:32px;border:1px solid #ABC4E166;border-radius:7px;background:#7F9EC0;color:#14171B;box-shadow:none}body.kee-room-mode .quote-compose{grid-column:1/-1;background:#fff1;color:#C9DBF0}
body.kee-room-mode #devModeBanner{display:none}
@media(max-height:600px){body.kee-room-mode .kee-room-dialog{bottom:76px;padding-top:18px}body.kee-room-mode #thread{min-height:38px;max-height:18dvh}body.kee-room-mode .kee-room-scene{inset:0 0 26%}}
@media(min-width:700px){body.kee-room-mode #p-chat{background-size:100% 100%}body.kee-room-mode .kee-room-dialog{left:24px;right:24px}.kee-room-scene{max-width:600px;margin:auto}}

body.kee-room-mode #thread .play{color:#8CABCB}body.kee-room-mode #thread .play .disc{background:#7F9EC0;color:#14171B}body.kee-room-mode #thread .play .wave i{background:#8CABCB}

body.kee-room-mode #thread .play{border-color:#7F9EC055;background:#22303F66}


.kee-room-background-control,.kee-room-quilt{display:none}
body.kee-room-mode .kee-room-background-control{position:absolute;left:0;right:0;bottom:max(14px,env(safe-area-inset-bottom));z-index:5;display:flex;justify-content:center;gap:15px}
.kee-room-background-control button{width:54px;min-height:52px;padding:6px 7px;border:1px solid transparent;border-radius:14px;background:#14171b80;color:#a5b4c6;font:10px var(--sans);display:flex;flex-direction:column;align-items:center;gap:4px;cursor:pointer;}
.kee-room-background-control svg{width:23px;height:23px}.kee-room-background-control button[aria-pressed="true"]{background:#22303Fdd;border-color:#7F9EC066;color:#dce9f8}
body.kee-room-mode #p-chat[data-room-scene="bed"]{background-image:url('/studio/room/room-bedroom-art.webp')}
body.kee-room-mode #p-chat[data-room-scene="living"]{background-image:url('/studio/room/room-living-art.webp')}
body.kee-room-mode #p-chat[data-room-scene="rain"]{background-image:url('/studio/room/room-rain.svg?v=1')}
body.kee-room-mode #p-chat[data-room-scene="bed"] .kee-room-quilt{display:block;position:absolute;inset:0;background:url('/studio/room/room-bedroom-art.webp') center center/cover no-repeat;clip-path:polygon(0 48%,20% 49%,50% 51%,80% 53%,100% 55%,100% 100%,0 100%);z-index:2;pointer-events:none}
@media(min-width:700px){body.kee-room-mode #p-chat[data-room-scene="bed"] .kee-room-quilt{background-size:100% 100%}}

/* Room and avatar are now rendered in the same 3D scene. */
body.kee-room-mode #p-chat{background:#26313e!important}
body.kee-room-mode .kee-room-scene{inset:0!important;max-width:none}
body.kee-room-mode #p-chat .kee-room-quilt{display:none!important}



.kee-room-lamp-accessible{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.kee-room-lamp-accessible:focus-visible{clip-path:none;width:auto;height:auto;left:16px;top:42%;padding:8px;background:#17212d;color:#d5e3f2;border:1px solid #8ca8c1;border-radius:8px}

#p-chat:not([data-room-scene="bed"]) .kee-room-lamp-accessible{display:none}

/* Keep loading/errors above the canvas and out of the dialogue area. */
#keeRoomLoadPanel{position:absolute;top:clamp(72px,16dvh,140px);left:6%;right:6%;z-index:8;padding:16px;text-align:center;border:1px solid #7f9ec066;border-radius:14px;background:#17212deb;color:#e3edf7}
#keeRoomLoadPanel[hidden],#keeRoomStatus[hidden],#keeRoomRetry[hidden]{display:none!important}
#keeRoomStatus{position:static;display:block;font-size:13px;line-height:1.6;color:#e3edf7}
#keeRoomRetry{margin:12px auto 0;padding:8px 16px;border:1px solid #8ca8c1;border-radius:9px;background:#30465e;color:#eef5ff;font:13px var(--sans);cursor:pointer}
#keeRoomCacheNote{position:absolute;top:58px;left:6%;right:6%;z-index:9;padding:8px 12px;border:1px solid #7f9ec066;border-radius:10px;background:#17212deb;color:#d5e2ef;font-size:12px;line-height:1.5;text-align:center}
#keeRoomCacheNote[hidden]{display:none!important}

/* Reactions appear only for events, follow the head, and fade away independently of motion. */
body.kee-room-mode #p-chat #keeRoomEmotion{left:0;top:0;right:auto;width:max-content;max-width:210px;white-space:nowrap;font-size:clamp(16px,4.6vw,22px);font-family:var(--sans),sans-serif;line-height:1.4;z-index:2;opacity:0;visibility:hidden;transform:translateY(6px) scale(.94);transform-origin:bottom left;transition:opacity .22s ease,transform .22s ease,visibility 0s .22s;box-shadow:0 5px 22px #060d1955}
body.kee-room-mode #p-chat #keeRoomEmotion[data-visible="true"]{opacity:1;visibility:visible;transform:none;transition-delay:0s}
#keeRoomEmotion[hidden]{display:none!important}
@media(prefers-reduced-motion:reduce){body.kee-room-mode #p-chat #keeRoomEmotion{transition:none;transform:none}}

/* Keep touch gestures on the 3D surface out of the browser's page scrolling/pointercancel path. */
body.kee-room-mode #keeRoomStage,body.kee-room-mode #keeRoomStage canvas{touch-action:none}
body.kee-room-mode .kee-room-exit{width:44px;height:44px;z-index:20;pointer-events:auto;touch-action:manipulation}

body.kee-room-mode #p-chat #keeRoomEmotion[data-placement="outside"]{opacity:0;visibility:hidden}
