/* Mobile surfaces stay within the device viewport; tables keep their own scroll. */
@media(max-width:1000px){
 html:has(.c360HasSidebar),body.c360HasSidebar{overflow-x:clip;max-width:100%;width:100%}
 .c360HasSidebar :is(.workspacePage,.dashboardPage,.panel,.c360ContextCard,.c360UtilityActions,.c360ContextMain){min-width:0;max-width:100%}
 .c360HasSidebar :is(.tableWrap,.tableContainer,.tableScroll,.table-wrapper){max-width:100%;overflow-x:auto}
 .c360HasSidebar :is(input,select,textarea){max-width:100%}
}
@media(max-width:760px){
 .c360Sidebar{top:var(--c360-viewport-top,0px);bottom:auto;height:var(--c360-viewport-height,100dvh);max-height:var(--c360-viewport-height,100dvh);overflow:hidden}
 .c360SidebarBrand{min-height:70px;padding-top:14px;padding-bottom:14px}
 .c360SidebarNav{flex:1 1 0%!important;min-height:0!important;overflow:auto;overscroll-behavior:contain;isolation:isolate}
 .c360SidebarBottom{flex:0 1 auto;min-height:0;max-height:45%;overflow-y:auto;overscroll-behavior:contain;isolation:isolate;background:var(--surface)}
 html:has(.c360Sidebar[data-mobile-open=true]),body:has(.c360Sidebar[data-mobile-open=true]){overflow:hidden}
 .c360NavLink{min-height:42px!important}
 .c360SidebarBottom nav .c360NavLink{min-height:38px!important}
 .c360HasSidebar :is(input:not([type=checkbox]):not([type=radio]),select,textarea){font-size:16px}
 .c360HasSidebar :is(.modal,.modalPanel,.modalContent,.dialog,.drawer,.drawerPanel,.taskInboxDialog){max-width:calc(100vw - 16px);max-height:calc(var(--c360-viewport-height,100dvh) - 16px);overflow:auto}
}
@media(max-width:760px),(max-height:550px) and (max-width:1100px){
 body.c360HasSidebar:has(.c360MessagesPage){overflow:hidden}
 .c360HasSidebar .workspacePage:has(.c360MessagesPage){position:fixed;top:var(--c360-viewport-top,0px);bottom:auto;height:var(--c360-viewport-height,100dvh);min-height:0!important;display:flex;flex-direction:column;gap:6px;padding:0 8px 8px!important;overflow:hidden}
 .c360HasSidebar .workspacePage:has(.c360MessagesPage)>.c360WorkspaceHeader{flex:0 0 auto;margin:0!important}
 .c360HeaderLayout:has(.c360MessagesPage) .c360UtilityBar{display:flex;min-height:42px;gap:6px;padding:6px 0 2px 38px;margin-bottom:4px}
 .c360HeaderLayout:has(.c360MessagesPage) .c360HeaderBreadcrumb{display:none}
 .c360HeaderLayout:has(.c360MessagesPage) .c360UtilityActions{display:flex;width:100%;gap:4px}
 .c360HeaderLayout:has(.c360MessagesPage) .c360QuickSearch{flex:1;min-width:50px;width:auto}
 .c360HeaderLayout:has(.c360MessagesPage) .c360UtilityIcon,.c360HeaderLayout:has(.c360MessagesPage) .c360HeaderProfile{width:30px;flex-basis:30px}
 .c360HeaderLayout:has(.c360MessagesPage) .c360ContextMain{padding:6px 9px}
 .c360HeaderLayout:has(.c360MessagesPage) .c360WorkspaceHeader[data-compact=true] .c360ContextIdentity{display:flex;flex-wrap:nowrap;gap:6px}
 body.c360HasSidebar .c360HeaderLayout:has(.c360MessagesPage) .c360WorkspaceHeader .c360SectionTitle h1{font-size:17px!important}
 .c360HeaderLayout:has(.c360MessagesPage) .c360HeaderPicker{min-width:0;flex-shrink:1;padding:0;border:0}
 .c360HeaderLayout:has(.c360MessagesPage) .c360HeaderPicker dt{display:none}
 .c360HeaderLayout:has(.c360MessagesPage) .monthPickerButton{font-size:10px!important;min-height:32px!important;padding:5px!important}
 .c360HeaderLayout:has(.c360MessagesPage) .c360ContextCard{margin:0!important}
 .c360MessagesPage{flex:1 1 0;min-height:0;max-height:100%;margin:0!important}
 .c360HeaderLayout:has(.c360MessagesPage) .c360MessagesFrame{height:100%!important;min-height:0!important;max-height:100%}
 body.c360HasSidebar:has(.c360MessagesPage) .v2Footer{display:none}
}

@media(max-width:1100px){
 html[data-c360-keyboard=true] .c360HeaderLayout:has(.c360MessagesPage) .c360UtilityBar{display:none}
 html[data-c360-keyboard=true] .c360HeaderLayout:has(.c360MessagesPage) .c360ContextMain{padding-left:42px}
}

@media(max-width:760px),(max-height:550px) and (max-width:1100px){
 body.c360HasSidebar:has(.c360MessagesPage) .workspacePage.c360HeaderLayout{min-height:0!important}
}

@media(max-width:760px),(max-height:550px) and (max-width:1100px){
 .c360HeaderLayout:has(.c360MessagesPage) .c360HeaderPicker dt{display:none!important}
 .monthPickerPanel{position:fixed!important;left:8px!important;right:8px!important;top:calc(var(--c360-viewport-top,0px) + 100px)!important;width:calc(100vw - 16px);max-width:360px;margin:0 auto;max-height:calc(var(--c360-viewport-height,100dvh) - 112px);overflow:auto;z-index:125}
}
@media(max-width:760px){
 .c360HasSidebar :is(.panel,.taskCard,.requestCard) :is(h2,h3,.taskTitle,.taskDescription,.mutedText){overflow-wrap:anywhere;min-width:0}
}

@media(max-width:760px){
 .c360MobileToggle{top:calc(var(--c360-viewport-top,0px) + 14px)}
 .c360MobileToggle[aria-expanded=true]{top:calc(var(--c360-viewport-top,0px) + 12px)}
 .c360HasSidebar :is(.modalBackdrop,.drawerBackdrop,.myTeamBackdrop,.taskInboxBackdrop){top:var(--c360-viewport-top,0px);bottom:auto;height:var(--c360-viewport-height,100dvh);padding:8px;overflow-y:auto}
 .myTeamDialog{max-height:calc(var(--c360-viewport-height,100dvh) - 16px)}
 .taskInboxBackdrop{padding:0!important}
 .taskInbox{height:100%;max-height:100%}
}

@media(max-width:1100px){
 html[data-c360-keyboard=true][data-c360-short-viewport=true] .workspacePage:has(.c360MessagesPage)>.c360WorkspaceHeader,
 html[data-c360-keyboard=true][data-c360-short-viewport=true] body:has(.c360MessagesPage) .c360MobileToggle{display:none!important}
}
