/* One shared mobile header for every Office department and company.
   Explicit rows keep the optional phone control from displacing other tools. */
@media (max-width:800px){
 .office>.stage>.topbar{
  display:grid;grid-template-columns:44px minmax(0,1fr) 44px;
  grid-template-rows:auto auto;gap:10px;padding:10px;
  position:relative;top:auto;border-radius:24px;overflow:visible;
 }
 .office>.stage>.topbar>.mobile-menu{grid-area:1 / 1;margin:0}
 .office>.stage>.topbar>.department-switcher{
  grid-area:1 / 2;position:static;width:100%;min-width:0;max-width:none;margin:0;
 }
 .office>.stage>.topbar .department{width:100%;min-width:0;padding:6px 10px;gap:6px}
 .office>.stage>.topbar .department>span{min-width:0;flex:1}
 .office>.stage>.topbar .department small{font-size:11px;line-height:1.3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 .office>.stage>.topbar .department strong{font-size:14px;line-height:1.4}
 .office>.stage>.topbar>.global-search{
  grid-area:1 / 3;width:44px;min-width:44px;max-width:44px;margin:0;padding:12px;
 }
 .office>.stage>.topbar>.global-search :is(span,kbd){display:none}
 .office>.stage>.topbar>.topbar-actions{
  grid-area:2 / 1 / 3 / -1;display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));grid-template-rows:auto;
  gap:8px;width:100%;min-width:0;margin:0;padding:0;align-items:center;
 }
 .office>.stage>.topbar .topbar-actions>.mobile-punch,
 .office>.stage>.topbar .topbar-actions>.header-tool.phone-directory-tool{
  grid-column:1 / -1;grid-row:1;box-sizing:border-box;width:100%;min-width:0;max-width:none;
  height:auto;min-height:52px;max-height:none;aspect-ratio:auto;margin:0;padding:8px 12px;
  justify-content:flex-start;align-self:stretch;gap:8px;border-radius:16px;text-align:left;
 }
 .office>.stage>.topbar .topbar-actions:has(>.phone-directory-tool):has(>.mobile-punch)>.phone-directory-tool{grid-column:1 / 3}
 .office>.stage>.topbar .topbar-actions:has(>.phone-directory-tool):has(>.mobile-punch)>.mobile-punch{grid-column:3 / 5}
 .office>.stage>.topbar .mobile-punch-copy{min-width:0;gap:2px}
 .office>.stage>.topbar .mobile-punch-copy strong{font-size:13px;line-height:1.35;white-space:normal;overflow:visible;text-overflow:clip}
 .office>.stage>.topbar .mobile-punch-copy small{font-size:12px;line-height:1.35;white-space:normal}
 .office>.stage>.topbar .mobile-punch-dot{display:block;width:6px;height:6px}
 .office>.stage>.topbar .gg-header-line{min-width:0;font-size:12px;line-height:1.35;gap:6px}
 .office>.stage>.topbar .gg-header-line [data-line-label]{min-width:0;overflow-wrap:anywhere}
 .office>.stage>.topbar .topbar-actions>.header-popover{position:static;display:flex;justify-content:center;width:100%;min-width:0;justify-self:center}
 .office>.stage>.topbar .topbar-actions>.header-popover.language-popover{grid-column:1}
 .office>.stage>.topbar .topbar-actions>.header-popover:not(.language-popover){grid-column:2}
 .office>.stage>.topbar .topbar-actions>#notifications-workspace{grid-column:3;justify-self:center;margin:0}
 .office>.stage>.topbar .topbar-actions>.avatar-button{grid-column:4;justify-self:center;margin:0}
 .office>.stage>.topbar .topbar-actions:has(>.mobile-punch,>.phone-directory-tool)>:is(.header-popover,#notifications-workspace,.avatar-button){grid-row:2}
 .office>.stage>.topbar .topbar-actions>:is(.header-popover,#notifications-workspace,.avatar-button){grid-row:1}
 .office>.stage>.topbar .topbar-actions>.header-popover>.header-tool{width:44px;max-width:44px;min-width:44px;border-radius:50%}
 .office>.stage>.topbar .header-popover.language-popover .header-tool>span{font-size:14px}
 .office>.stage>.topbar .topbar-actions>.avatar-button{width:44px;max-width:44px;min-width:44px;border-radius:50%;font-size:14px}
 .office>.stage>.topbar :is(.header-menu,.department-menu){
  position:absolute;top:calc(100% + 8px);left:0;right:0;width:auto;max-width:none;
  box-sizing:border-box;max-height:calc(100dvh - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px) - 210px);
  overflow-y:auto;overscroll-behavior:contain;z-index:75;padding:8px;
 }
 .office>.stage>.topbar :is(.header-menu,.department-menu) button{min-height:48px;font-size:14px;touch-action:manipulation}
 .office>.stage>.topbar .department-menu button strong{font-size:14px}
 .office>.stage>.topbar .department-menu button small{font-size:12px}
 .office>.stage>.topbar :is(button,summary){touch-action:manipulation}
}
@media (max-width:360px){
 .office>.stage>.topbar{gap:8px;padding:8px}
 .office>.stage>.topbar .topbar-actions{gap:6px}
 .office>.stage>.topbar .topbar-actions>.mobile-punch,
 .office>.stage>.topbar .topbar-actions>.header-tool.phone-directory-tool{padding:8px;gap:6px}
}
