/* Staff navigation keeps the same controls and handlers at every screen size. */
body[data-chat-team="true"] .team-menu>summary{display:none}
body[data-chat-team="true"] .team-menu-links{display:flex;align-items:center;gap:16px;flex-wrap:wrap}
.resolve-short{display:none}

@media(max-width:780px){
 body[data-chat-team="true"]{padding-top:env(safe-area-inset-top)}
 body[data-chat-team="true"] .chat-header{flex-wrap:nowrap;gap:8px;min-height:48px;padding:4px 12px;flex-shrink:0}
 body[data-chat-team="true"] .chat-header>a{flex-shrink:0;line-height:0}
 body[data-chat-team="true"] .chat-header img{width:42px;height:28px}
 body[data-chat-team="true"] .chat-header>#brand{font-size:13px;line-height:1.25;min-width:0}
 body[data-chat-team="true"] .chat-header nav{width:auto;margin-left:auto;flex-shrink:0}
 body[data-chat-team="true"] .team-menu{position:relative}
 body[data-chat-team="true"] .team-menu>summary{display:flex;align-items:center;gap:7px;min-height:40px;padding:6px 8px;list-style:none;cursor:pointer;font-size:13px;font-weight:650;border:1px solid #d9e2d5;border-radius:9px;background:#f4f7f1}
 body[data-chat-team="true"] .team-menu>summary::-webkit-details-marker{display:none}
 body[data-chat-team="true"] .team-menu>summary::after{content:'⌄';font-size:16px;line-height:1}
 body[data-chat-team="true"] .team-menu[open]>summary::after{content:'⌃'}
 body[data-chat-team="true"] .team-menu-links{position:absolute;top:calc(100% + 7px);right:0;z-index:30;display:flex;flex-direction:column;align-items:stretch;gap:0;width:min(280px,calc(100vw - 24px));max-height:70dvh;overflow:auto;padding:8px;background:#fff;border:1px solid #cbd7cd;border-radius:12px;box-shadow:0 12px 32px #203c3229}
 body[data-chat-team="true"] .team-menu:not([open])>.team-menu-links{display:none}
 body[data-chat-team="true"] .chat-header .team-menu-links a,body[data-chat-team="true"] .chat-header .team-menu-links button{width:100%;min-height:44px;display:flex;align-items:center;padding:10px 12px;text-align:left;border-radius:7px;font-size:14px}
 body[data-chat-team="true"] .chat-header .team-menu-links a:hover,body[data-chat-team="true"] .chat-header .team-menu-links button:hover{background:#edf3e9;text-decoration:none}
 body[data-chat-team="true"] .login-context{flex-direction:row;align-items:center;padding:4px 12px;gap:4px 10px;font-size:11px;line-height:1.4}
 body[data-chat-team="true"] .login-prefix{display:none}
 body[data-chat-team="true"] #ownPresenceStatus:not(.presence-needs-confirmation){display:none}
 body[data-chat-team="true"] #ownPresenceStatus.presence-needs-confirmation{color:#9b3026;font-weight:650}
 body[data-chat-team="true"] .staff-presence{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:3px 10px;padding:5px 12px;font-size:11px;min-width:0}
 body[data-chat-team="true"] .staff-presence>strong{display:none}
 body[data-chat-team="true"] .presence-members{grid-column:1/-1;grid-row:1;display:flex;flex-wrap:nowrap;gap:14px;overflow-x:auto;min-width:0;min-height:22px;align-items:center;scrollbar-width:none;overscroll-behavior-x:contain}
 body[data-chat-team="true"] .presence-members::-webkit-scrollbar{display:none}
 body[data-chat-team="true"] .presence-members>.presence-person{flex-shrink:0;white-space:nowrap}
 body[data-chat-team="true"] .presence-summary{grid-column:1;grid-row:2;font-size:10px}
 body[data-chat-team="true"] .staff-presence>.presence-person{grid-column:2;grid-row:2;font-size:11px}
 body[data-chat-team="true"].chat-ready main{padding:5px 6px max(6px,env(safe-area-inset-bottom));min-height:0}
 body[data-chat-team="true"] .conversation-head{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:4px 8px;padding:8px 12px}
 body[data-chat-team="true"] .conversation-head .back-list{grid-column:1;grid-row:1;justify-self:start;font-size:13px;min-height:36px;margin:0;padding:6px 10px}
 body[data-chat-team="true"] .conversation-head h1{grid-column:1/-1;grid-row:2;margin:2px 0 0;font-size:18px;overflow-wrap:anywhere}
 body[data-chat-team="true"] .conversation-head #owner{display:contents}
 body[data-chat-team="true"] .conversation-head #owner>span{display:none}
 body[data-chat-team="true"] .conversation-head #resolveChat{grid-column:2;grid-row:1;justify-self:end;min-height:36px;padding:6px 10px;font-size:12px;line-height:1.3}
 body[data-chat-team="true"] .resolve-long{display:none}
 body[data-chat-team="true"] .resolve-short{display:inline}
 body[data-chat-team="true"] .conversation-head>label{grid-column:1/-1;grid-row:3;margin:0;gap:0;font-size:0}
 body[data-chat-team="true"] .conversation-head>label select{font-size:12px;line-height:1.35;flex:none;width:auto;max-width:100%;padding:0;min-height:18px}
 body[data-chat-team="true"] .message-log{padding:12px 10px}
 body[data-chat-team="true"] .message{max-width:94%;padding:10px 13px;margin-bottom:10px}
 body[data-chat-team="true"] .message small{font-size:11px}
 body[data-chat-team="true"] .message p{margin:5px 0;font-size:16px;line-height:1.5}
 body[data-chat-team="true"] .composer{display:grid;grid-template-columns:minmax(0,1fr) 44px 44px;gap:6px;align-items:end;padding:8px 10px}
 body[data-chat-team="true"] .composer>label{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
 body[data-chat-team="true"] .composer .typing-indicator{grid-column:1/-1;grid-row:1;min-height:0}
 body[data-chat-team="true"] .composer .typing-indicator:empty{display:none}
 body[data-chat-team="true"] .photo-compose-row,body[data-chat-team="true"] .composer-footer{display:contents}
 body[data-chat-team="true"] .composer textarea{grid-column:1;grid-row:2;min-height:44px;height:52px;max-height:20dvh;padding:10px;font-size:16px;line-height:1.4}
 body[data-chat-team="true"] .photo-compose-row .photo-picker{grid-column:2;grid-row:2;width:44px;height:44px}
 body[data-chat-team="true"] .composer-footer button[type="submit"]{grid-column:3;grid-row:2;width:44px;height:44px;min-height:44px;border-radius:50%;padding:0;font-size:0;line-height:1}
 body[data-chat-team="true"] .composer-footer button[type="submit"]::after{content:'↑';font-size:26px;font-weight:650}
 body[data-chat-team="true"] .photo-previews{grid-column:1/-1;grid-row:3;margin:0}
 body[data-chat-team="true"] .photo-preview img{display:block}
 body[data-chat-team="true"] .composer-footer p{grid-column:1/-1;grid-row:4;max-width:none;margin:0;font-size:11px;line-height:1.35}
 body[data-chat-team="true"] .composer-footer p:empty{display:none}
 body[data-chat-team="true"] .inbox-head{padding:12px}
 body[data-chat-team="true"] .inbox-head h1{font-size:20px;margin:0 0 4px}
 body[data-chat-team="true"] .inbox-head .mail-count{font-size:13px;margin:5px 0}
 body[data-chat-team="true"] .inbox-head input,body[data-chat-team="true"] .inbox-head select{padding:9px;font-size:16px}
}
