#socialDialog{width:calc(100% - 16px);max-width:580px;max-height:92vh;overflow:auto;box-sizing:border-box;padding:12px;background:var(--paper);color:var(--ink);border:2px solid var(--edge)}#socialDialog::backdrop{background:#352a3888}.social-header{display:flex;align-items:center;justify-content:space-between;position:sticky;top:-12px;background:var(--paper);z-index:1}.social-header h2{font-size:20px}.social-controls{display:flex;gap:8px;flex-wrap:wrap;margin:10px 0}#socialDialog button,#socialDialog select,#socialDialog input{min-height:48px;font:inherit}#socialDialog button{padding:6px 12px}.friend-list{list-style:none;padding:0}.friend-list li{display:flex;justify-content:space-between;gap:8px;align-items:center;padding:10px 0;border-bottom:1px solid #d8c6ac;overflow-wrap:anywhere}.visit-canvas{display:block;width:256px;height:192px;max-width:100%;margin:auto;image-rendering:pixelated}.room-members{display:flex;gap:8px;flex-wrap:wrap;list-style:none;padding:0}.room-members li{border:1px solid var(--edge);padding:5px}.chat-log{height:180px;overflow:auto;list-style:none;padding:8px;border:1px solid var(--edge);background:#fff9ed}.chat-log li{overflow-wrap:anywhere;margin-bottom:8px}.chat-form{display:flex;gap:8px}.chat-form input{min-width:0;flex:1;width:0;padding:8px}.jam-track{height:64px;position:relative;border:1px solid var(--edge);overflow:hidden;margin:8px 0}.jam-track::after{content:'';position:absolute;left:50%;top:0;bottom:0;border-left:3px solid var(--edge)}.jam-note{position:absolute;top:12px;font-size:24px}.jam-tap{width:100%}.social-error{color:#9b3042;min-height:24px;white-space:pre-line}@media(min-width:700px){.visit-canvas{width:512px;height:384px}}

.visit-scene{position:relative;width:256px;max-width:100%;margin:auto}.visit-scene .visit-canvas{display:block;width:100%;height:auto;margin:0}.visit-bubbles{position:absolute;inset:0;pointer-events:none}.visit-bubble{position:absolute;box-sizing:border-box;width:31.25%;transform:translateY(-100%);margin:0!important;border:8px solid transparent;border-image:url("assets/design-ui-v6/ui-speech-body-v6-native.png") 8 fill stretch;padding:0;font-size:11px;line-height:1.3!important;overflow-wrap:anywhere;word-break:break-word;max-height:76px;display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:clip;color:#513d49;text-align:center}.visit-bubble::after{content:'';position:absolute;bottom:-12px;left:50%;transform:translateX(-50%);width:12px;height:8px;background:url("assets/design-ui-v6/ui-speech-tail-v6-native.png") center/contain no-repeat}
@media(min-width:700px){.visit-scene{width:512px}.visit-bubble{font-size:14px;max-height:100px}}

.visit-bubble{display:block;overflow:visible;max-height:none}.visit-bubble>span{display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden}

#homeVisitors{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:1}.home-chat-bubbles{z-index:5}.room:has(.home-chat-bubbles .visit-bubble)>#bubble{visibility:hidden}
#homeVisitorsPanel{margin:16px auto;max-width:calc(296 * var(--u));padding:12px;border:12px solid transparent;border-image:url("assets/design-ui-v6/ui-panel-cream-v6-native.png") 12 fill stretch;overflow-wrap:anywhere}#homeVisitorsPanel h3{font-size:16px;margin:0 0 12px}#homeVisitorsPanel .chat-form{flex-wrap:wrap}#homeVisitorsPanel .chat-form input{min-width:120px}#homeVisitorsPanel .chat-form button{min-height:48px}#homeVisitorsPanel .social-controls button,#homeVisitorsPanel select{min-height:48px;font:inherit}#homeVisitorsPanel .chat-log{height:120px}#homeVisitorsPanel .room-members{font-size:13px}#homeVisitorsPanel .social-error:empty{display:none}#homeVisitorsPanel .visit-scene{margin-bottom:12px}#homeVisitorsPanel .jam-tap{min-height:48px}

/* Delivered social-v1 icons and shared v6 surfaces; automatic home flow retained. */
#socialDialog{width:calc(100vw - 16px);max-width:580px;border:12px solid transparent;border-image:url("assets/design-ui-v6/ui-panel-cream-v6-native.png") 12 fill stretch;padding:12px;background:none;scrollbar-width:none}#socialDialog::-webkit-scrollbar,.visit-viewport::-webkit-scrollbar{display:none}.social-header{top:-12px;background:#fff1d5;gap:8px}.social-header h2{min-width:0;overflow-wrap:anywhere}.social-header>button{flex:none;width:80px}.social-error:empty{display:none}
#petMenu #socialOpen{display:flex;align-items:center;justify-content:center;gap:8px}#petMenu #socialOpen img{flex:none}
.friend-list li{display:flex;gap:8px;align-items:center;padding:12px;background:#fff9ec;border:0;border-top:1px solid #e8ac80}.friend-list li>img{flex:none}.friend-identity{min-width:0;flex:1}.friend-name{display:block;font-size:16px;overflow-wrap:anywhere}.friend-status{display:flex;align-items:center;gap:4px;font-size:14px}.friend-list li>button{width:80px;flex:none;padding:0 12px!important;font-size:16px!important}
.visit-viewport{width:256px;max-width:100%;max-height:192px;overflow-y:auto;overflow-x:hidden;scrollbar-width:none;margin:auto}.visit-scroll-hint{font-size:13px;color:var(--muted);text-align:center;margin:4px 0 12px}.visit-viewport:focus-visible{outline:2px dotted var(--edge);outline-offset:2px}
.visit-bubble{width:29.6875%;transform:translate(-50%,-100%);padding:8px 6px;border:0;border-image:none;background:none;font-size:14px;line-height:16px!important;isolation:isolate}.visit-bubble::before{content:'';position:absolute;inset:0;z-index:-1;border:8px solid transparent;border-image:url("assets/design-ui-v6/ui-speech-body-v6-native.png") 8 fill stretch}.visit-bubble::after{bottom:-4px}.visit-bubble>span{line-height:inherit}
.room-members li{display:flex;gap:4px;align-items:center;border:8px solid transparent;border-image:url("assets/design-social-v1/participant-pill-v1-native.png") 8 fill stretch;padding:0;background:none;font-size:14px;min-width:0;overflow-wrap:anywhere}.room-members img{flex:none}
.social-controls>button{display:inline-flex;align-items:center;justify-content:center;gap:6px}.social-controls img{flex:none}.chat-log{border:8px solid transparent;border-image:url("assets/design-ui-v6/ui-panel-paper-v6-native.png") 12 fill stretch;background:none;font-size:16px;padding:4px}.chat-form{display:flex;gap:8px;flex-wrap:nowrap!important}.chat-form input{min-width:0!important;width:0;flex:1}.chat-form>button{width:80px;flex:none;padding:0 12px!important}
.jam-instrument{position:relative;display:flex;align-items:center;min-width:144px;flex:1;max-width:200px;margin:0!important}.jam-instrument>img{position:absolute;left:10px;z-index:1;pointer-events:none}.jam-instrument select{width:100%;appearance:none;height:48px;border:8px solid transparent;border-image:url("assets/design-ui-v6/ui-field-default-v6-native.png") 8 fill stretch;background:transparent url("assets/design-social-v1/select-chevron-v1-native.png") right 4px center/12px 8px no-repeat;padding:0 18px 0 36px;font:inherit;color:inherit;min-width:0}.jam-instrument select:focus-visible{outline:none;border-image-source:url("assets/design-ui-v6/ui-field-focus-v6-native.png")}
.jam-countdown{width:64px;height:64px;line-height:64px;text-align:center;font-size:24px;margin:8px auto;background:url("assets/design-social-v1/countdown-frame-v1-native.png") center/contain no-repeat}.jam-score{overflow-wrap:anywhere;line-height:1.6}.jam-score:empty{display:none}
.jam-track{border:12px solid transparent;border-image:url("assets/design-ui-v6/rhythm-track-v6-native.png") 12 fill stretch;background:none}.jam-track::after{width:16px;height:48px;top:50%;left:50%;transform:translate(-50%,-50%);border:0;background:url("assets/design-ui-v6/rhythm-target-v6-native.png") center/contain no-repeat}.jam-note{width:24px;height:24px;font-size:0;background:url("assets/design-ui-v6/rhythm-note-24-v6-native.png") center/contain no-repeat;transform:translateX(-50%)}
#socialDialog .jam-tap,#homeVisitorsPanel .jam-tap{height:112px;min-height:112px;border:solid transparent!important;border-width:32px 30px 20px!important;border-image:url("assets/design-ui-v6/rhythm-tap-default-v6-native.png") 32 30 20 fill!important;background:none!important;padding:0!important;font-size:20px!important;white-space:normal}#socialDialog .jam-tap::before,#homeVisitorsPanel .jam-tap::before{content:none}#socialDialog .jam-tap:disabled,#homeVisitorsPanel .jam-tap:disabled{border-image-source:url("assets/design-ui-v6/rhythm-tap-disabled-v6-native.png")!important}#socialDialog .jam-tap:active,#homeVisitorsPanel .jam-tap:active{border-image-source:url("assets/design-ui-v6/rhythm-tap-pressed-v6-native.png")!important}
.jam-sound[aria-pressed=true]{--cap:url("assets/design-ui-v6/ui-sound-on-default-v6-native.png")}.jam-sound[aria-pressed=false]{--cap:url("assets/design-ui-v6/ui-sound-off-default-v6-native.png")}
@media(min-width:700px){.visit-viewport{width:512px;max-height:384px}.visit-bubble{line-height:18px!important}}

.jam-sound[aria-pressed=true]:hover{--cap:url("assets/design-ui-v6/ui-sound-on-hover-v6-native.png")}
.jam-sound[aria-pressed=false]:hover{--cap:url("assets/design-ui-v6/ui-sound-off-hover-v6-native.png")}
.jam-sound[aria-pressed=true]:active{--cap:url("assets/design-ui-v6/ui-sound-on-pressed-v6-native.png")}
.jam-sound[aria-pressed=false]:active{--cap:url("assets/design-ui-v6/ui-sound-off-pressed-v6-native.png")}
.jam-sound[aria-pressed=true]:disabled{--cap:url("assets/design-ui-v6/ui-sound-on-disabled-v6-native.png")}
.jam-sound[aria-pressed=false]:disabled{--cap:url("assets/design-ui-v6/ui-sound-off-disabled-v6-native.png")}
/* Home supplement v1: exact native room width inside the shared panel. */
#homeVisitorsPanel{width:calc(296 * var(--u));max-width:100%;padding:8px;min-width:0}
#homeVisitorsPanel .social-controls>button:has(img[src*="icon-greeting"]),#homeVisitorsPanel .social-controls>button:has(img[src*="affinity-heart"]){width:80px;padding:0 8px!important;gap:4px}
#poops{z-index:3}

/* Shared host/visitor jam instruction only; chat text keeps its wrapping. */
.jam-info{word-break:keep-all;overflow-wrap:normal}

/* Stable chat composer, own-home history access, in-game unread notices. */
#socialDialog{max-height:calc(var(--chat-viewport-height,100dvh) - 24px)}
.chat-form{scroll-margin-block:16px}.chat-form:focus-within{position:sticky;bottom:0;z-index:6;background:#fff1d5;padding-block:6px}#homeVisitorsPanel .chat-form{margin:0 0 12px}
.home-message-tools{max-width:calc(296 * var(--u));margin:8px auto 0;display:flex;flex-wrap:wrap;align-items:center;gap:4px 8px}.home-message-tools>button{min-height:48px;font-size:14px}.message-notice{font-size:13px;margin:0;overflow-wrap:anywhere}.message-notice:empty{display:none}.home-chat-fold{float:right;margin:0 0 8px}#homeVisitorsPanel>section{clear:both}
.visit-scene{--room-pixel:1px}.visit-poops{position:absolute;inset:0;pointer-events:none;z-index:3}.visit-poop{position:absolute;width:44px;height:44px;padding:8px;display:flex;align-items:center;justify-content:center;pointer-events:none}
@media(min-width:700px){.visit-scene{--room-pixel:2px}}

/* Expanded main screen: reuse supplied panel skin; no sprite stretching. */
.device.social-expanded{height:auto;min-height:calc(488 * var(--u));background:none;border:12px solid transparent;border-image:url("assets/design-ui-v6/ui-panel-cream-v6-native.png") 12 fill stretch;padding:8px;display:flex;flex-direction:column;gap:12px}
.device.social-expanded .device-label,.device.social-expanded .screen-top,.device.social-expanded .state-line,.device.social-expanded .stats{position:static;width:100%;height:auto;margin:0}
.device.social-expanded .room{position:relative;left:auto;top:auto;width:calc(256 * var(--u));height:calc(192 * var(--u));max-width:100%;margin:auto;flex:none}
.device.social-expanded #homeVisitorsPanel{width:100%;max-width:100%;margin:0;padding:0;border:0;background:none;order:0}
.device.social-expanded #lifePanel{display:block}.device.social-expanded .stats{padding:8px;margin-bottom:8px}
.device.social-expanded .controls{display:flex;flex-wrap:wrap;justify-content:center;gap:8px}
.device.social-expanded .controls button{position:relative;left:auto;top:auto}
.device.social-expanded #homeVisitorsPanel .chat-log{height:144px;margin:8px 0;overscroll-behavior:contain;overflow-anchor:none}
.device.social-expanded #homeVisitorsPanel .chat-form{margin:0 0 8px}

.device.social-expanded .egg-panel{display:block;position:relative}.device.social-expanded .egg-panel::before{display:none}
.device.social-expanded .egg-panel label,.device.social-expanded #hatch,.device.social-expanded #eggInfo{position:static;width:100%;margin:8px 0;height:auto}
.device.social-expanded #hatch{height:8px}.device.social-expanded #eggInfo{white-space:normal}

/* Designer events-v1: fixed native floor icon and one-shot success puff. */
.pixel-poop{width:calc(24 * var(--room-pixel,var(--u)));height:calc(24 * var(--room-pixel,var(--u)));background:transparent url("assets/design-events-v1/visitor-poop-icon-v1.native.png") center/100% 100% no-repeat;box-shadow:none;flex:none;image-rendering:pixelated}
.pixel-poop::before,.pixel-poop::after{content:none}
.poop,.visit-poop{width:max(44px,calc(24 * var(--room-pixel,var(--u))));height:max(44px,calc(24 * var(--room-pixel,var(--u))));padding:0;display:flex;align-items:center;justify-content:center;background:none;border:0}
.poop{transform:translate(-50%,50%)}.visit-poop{transform:translate(-50%,-50%)}
#visitorPoop img{width:24px;height:24px;image-rendering:pixelated}
.visitor-poop-fx{position:absolute;width:calc(48 * var(--room-pixel,var(--u)));height:calc(48 * var(--room-pixel,var(--u)));transform:translate(-50%,-87.5%);background:url("assets/design-events-v1/visitor-poop-puff-v1.native.png") 0 0/400% 100% no-repeat;image-rendering:pixelated;pointer-events:none;z-index:4;animation:visitor-puff 480ms steps(4,end) 1}
@keyframes visitor-puff{to{background-position-x:133.333333%}}
.expanded-shell-art{display:none;position:absolute;left:0;width:100%;pointer-events:none;z-index:0;background-size:100% auto;background-repeat:repeat-y;image-rendering:pixelated}
.device.social-expanded{border:0;padding:calc(76 * var(--u)) calc(20 * var(--u)) calc(34 * var(--u));gap:0;isolation:isolate;background:none}
.device.social-expanded>.expanded-shell-art{display:block}
.device.social-expanded .screen{display:block;position:relative;width:100%;margin:0 0 calc(28 * var(--u));z-index:1}
.device.social-expanded .device-label{position:absolute;top:calc(32 * var(--u));right:calc(66 * var(--u));width:auto;z-index:2}
.device.social-expanded .screen-top{position:absolute;top:calc(-22 * var(--u));left:calc(2 * var(--u));width:calc(252 * var(--u));height:calc(20 * var(--u));z-index:2}
.device.social-expanded .room{margin:0}
.device.social-expanded .state-line{padding:8px 0}
.device.social-expanded #homeVisitorsPanel{padding:0 0 8px}
.device.social-expanded #lifePanel,.device.social-expanded #eggPanel{position:relative;z-index:1}
.device.social-expanded .controls{width:calc(216 * var(--u));max-width:100%;margin:0 auto;gap:calc(8 * var(--u))}
.device.social-expanded .controls button{flex:0 0 calc(64 * var(--u))}
#groupChatDialog{width:calc(100vw - 24px);max-width:580px;max-height:calc(var(--chat-viewport-height,100dvh) - 24px);overflow:auto}#groupChatDialog h2{font-size:20px}#groupChatDialog .chat-log{height:min(42vh,360px);overflow-anchor:none;overscroll-behavior:contain}#groupChatDialog .group-members{font-size:14px;overflow-wrap:anywhere;line-height:1.6}#groupChatDialog .social-error:empty{display:none}#groupChatDialog .chat-form input{font-size:16px}#groupChatDialog .social-header{z-index:7}

/* Mobile keyboard: size against visual viewport, scroll history only, no sticky overlap. */
@media(max-width:699px){
 #socialDialog.chat-editing,#groupChatDialog.chat-editing{position:fixed;inset:auto;top:calc(var(--chat-viewport-top,0px) + 8px);left:8px;margin:0;width:calc(100vw - 16px);max-width:none;height:calc(var(--chat-viewport-height,100dvh) - 16px);max-height:none;display:flex;flex-direction:column;overflow:hidden;box-sizing:border-box;padding:8px}
 .chat-editing .social-header{position:static;flex:none}.chat-editing .social-header h2{margin:4px 0;font-size:18px}
 #socialDialog.chat-editing>section:not([hidden]){display:flex;flex:1;min-height:0;flex-direction:column;overflow:hidden}
 #socialDialog.chat-editing>section>.visit-viewport,#socialDialog.chat-editing>section>.visit-scroll-hint,#socialDialog.chat-editing>section>.room-members,#socialDialog.chat-editing>section>.social-controls,#socialDialog.chat-editing>section>section,#socialDialog.chat-editing>p:not(.social-error),#groupChatDialog.chat-editing>.group-members{display:none}
 #socialDialog.chat-editing .chat-log,#groupChatDialog.chat-editing .chat-log{height:auto;min-height:0;flex:1;margin:8px 0;overflow:auto}
 #socialDialog.chat-editing .chat-form,#groupChatDialog.chat-editing .chat-form{position:static;flex:none;margin:0;padding:0;background:none;scroll-margin:0}
 .chat-editing .social-error{flex:none;margin:4px 0;min-height:0}
}

.home-message-tools:has(#homeMessagesOpen){display:grid;grid-template-columns:minmax(0,1fr) 80px;gap:8px;width:calc(296 * var(--u));max-width:100%;align-items:start}
.home-message-tools #homeMessagesOpen,.home-message-tools #groupChatOpen{min-width:0;width:100%;min-height:48px;height:auto;padding:4px 8px;white-space:normal;line-height:20px;grid-row:1}
.home-message-tools #homeMessagesOpen{grid-column:1}.home-message-tools #groupChatOpen{grid-column:2}
#homeMessagesOpen span,#homeMessagesOpen small{display:block}#homeMessagesOpen small{font:inherit;font-size:12px;line-height:18px;overflow-wrap:anywhere}
.home-message-tools .message-notice{grid-column:1/-1;grid-row:2;margin:0;min-width:0}

/* Development: six care actions; final economy artwork arrives separately. */
.device .life-controls{display:grid;position:absolute;left:calc(20 * var(--u));top:calc(340 * var(--u));width:calc(256 * var(--u));grid-template-columns:repeat(3,minmax(0,1fr));gap:calc(4 * var(--u)) 0;align-items:start}
.device .life-controls button{position:relative;left:auto;top:auto;grid-column:auto;margin:0 auto;min-height:48px;height:calc(56 * var(--u));padding-top:calc(40 * var(--u));line-height:calc(16 * var(--u))}
.device .life-controls button:nth-last-child(2),.device .life-controls button:last-child{grid-column:auto}
.device .life-controls .care-activity{display:flex;flex-direction:column;align-items:center;min-width:0}
.care-activity small{display:block;width:100%;text-align:center;font-size:10px;line-height:12px;word-break:keep-all;overflow-wrap:anywhere}
.activity-record{text-align:center;font-size:12px}
.device.social-expanded .life-controls{display:grid;position:relative;left:auto;top:auto;width:100%;margin:0;gap:8px 0}
@media(min-width:700px){.care-activity small{font-size:16px;line-height:20px}}
