/* The shell fits the visible window; each page owns its scrolling. */
html:has(#layout:not([hidden])),body:has(#layout:not([hidden])){overflow:hidden;overscroll-behavior:none}
#layout{position:fixed;inset-inline:0;top:var(--conversation-viewport-top,0px);height:var(--conversation-viewport-height,100dvh);box-sizing:border-box;min-height:0}
#layout>main{overflow:hidden}
#layout>#sidebar{overflow-y:auto;overscroll-behavior:contain}

/* Only an open private conversation uses the docked composer. The lobby keeps scrolling. */
body.admin #adminPage:has(#superConversation:not([hidden])){display:flex;min-height:0;overflow:hidden;padding:16px 0 calc(20px + env(safe-area-inset-bottom))}
.super-session:has(#superConversation:not([hidden])){display:flex;flex-direction:column;flex:1;min-height:0;min-width:0;width:100%;padding:0}
body.admin .super-session:has(#superConversation:not([hidden]))>.super-heading{flex:none;margin:0 0 12px}
body.admin .super-session:has(#superConversation:not([hidden]))>.super-heading h1{font-size:24px;margin:0;line-height:1.25}
.super-session:has(#superConversation:not([hidden]))>.super-heading :is(.eyebrow,p){display:none}
#superConversation:not([hidden]){display:flex;flex-direction:column;flex:1;min-height:0;min-width:0}
#superConversation>.super-chat-heading{flex:none;flex-direction:row;align-items:center;gap:8px;margin:0 0 8px}
#superSessionDate{font-size:11px;text-align:right}
#superConversation>#superMessages{flex:1;min-height:0;max-height:none;padding:12px 4px;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable}
#superConversation>#superStatus{flex:none;min-height:0;max-height:40px;overflow:auto;margin:4px 0 8px;font-size:11px}
#superStatus:empty{display:none}
#superConversation>#superForm{flex:none;position:relative;margin:0;padding:0;border:0;border-radius:0;background:transparent}
#superForm>#superText{display:block;box-sizing:border-box;height:88px;min-height:64px;max-height:144px;resize:none;overflow-y:auto;padding:12px 14px;border:1px solid #404047;border-radius:14px;background:#1b1b1e}
#superForm>.super-actions{margin-top:12px}
#superForm>#superText:focus{outline:0;border-color:#71717a}
#superAttachments:not(:empty){margin-bottom:8px}
#superAttachments{max-height:min(112px,18dvh);overflow-y:auto;overscroll-behavior:contain}
.super-session:has(#superConversation:not([hidden]))>#superError{flex:none;max-height:48px;overflow:auto;margin:6px 0 0}
@media(max-width:800px){
 #superForm>#superText{font-size:16px}
 body.admin #adminPage:has(#superConversation:not([hidden])){padding-top:10px}
 body.admin .super-session:has(#superConversation:not([hidden]))>.super-heading h1{font-size:20px}
 #superSessionDate{font-size:10px}
}
@media(max-width:480px){
 #superForm .super-actions:has(#superStop:not([hidden]))>span{display:none}
 #superForm .super-actions :is(button,.super-effort){flex-shrink:0}
 #superForm #superSend{white-space:nowrap;padding-inline:12px}
}
.conversation-short-viewport .super-session:has(#superConversation:not([hidden]))>.super-heading{display:none}
.conversation-short-viewport #superForm>#superText{height:52px;min-height:52px;padding-block:8px}
.conversation-short-viewport #superAttachments{max-height:40px}
.conversation-short-viewport #superConversation>.super-chat-heading{margin-bottom:2px}
.conversation-short-viewport #superBack{min-height:32px;padding:4px 10px}
.conversation-short-viewport #superConversation>#superMessages{padding-block:4px}
.conversation-short-viewport body.admin .mode-bar{height:48px;min-height:48px}
.conversation-short-viewport body.admin #modeLabel:before{top:17px}
.conversation-short-viewport #superConversation>#superStatus{max-height:20px;margin:2px 0 4px}
