/* 01244 · Marketplace topbar: centered navigation in its own lane + centered scope in the utility main lane. */
#marketplaceStudioView .mp-topbar{
  display:grid;
  grid-template-columns:auto minmax(0,1fr);
  grid-template-areas:
    "brand nav"
    "utility utility";
  align-items:center;
  column-gap:14px;
  row-gap:8px;
  min-width:0;
}

#marketplaceStudioView .mp-brand{
  grid-area:brand;
  min-width:0;
}

/* Center inside the navigation lane, not the whole viewport. `safe center` falls back
   to start alignment when the row overflows so the first item never gets clipped. */
#marketplaceStudioView .mp-topnav{
  grid-area:nav;
  min-width:0;
  width:100%;
  order:initial;
  display:flex;
  align-items:center;
  justify-content:safe center;
  overflow-x:auto;
  overflow-y:hidden;
  overscroll-behavior-inline:contain;
  -webkit-overflow-scrolling:touch;
  scrollbar-width:thin;
  padding:2px 2px 4px;
}
#marketplaceStudioView .mp-topnav button{flex:0 0 auto}

/* The second row is split into the user's large workspace lane and a compact
   canonical actions lane. Scope is centered inside the large lane only. */
#marketplaceStudioView .mp-utility-row-01243{
  grid-area:utility;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  grid-template-areas:"main right";
  align-items:center;
  column-gap:8px;
  width:100%;
  min-width:0;
}

#marketplaceStudioView .mp-utility-row__center-01243{
  grid-area:main;
  justify-self:center;
  min-width:0;
  max-width:100%;
}

#marketplaceStudioView .mp-utility-row__center-01243 .mp-mt-switcher-01070{
  max-width:100%;
}

#marketplaceStudioView .mp-utility-row__right-01243{
  grid-area:right;
  justify-self:end;
  min-width:max-content;
  display:flex;
  align-items:center;
}

#marketplaceStudioView .mp-utility-row__right-01243 .mp-top-actions{
  min-width:max-content;
  margin-left:0;
  justify-content:flex-end;
}

/* Laptop / compact workspace: keep both rows, but the menu becomes a real
   horizontally scrollable strip instead of being clipped. */
@container mp-studio-shell (max-width:1100px){
  #marketplaceStudioView .mp-topnav{
    justify-content:flex-start;
    width:100%;
    max-width:100%;
    overflow-x:auto;
    overflow-y:hidden;
  }
}

/* On very narrow widths keep the actions reachable and let only the scope lane
   scroll if its own controls cannot fit. */
@container mp-studio-shell (max-width:700px){
  #marketplaceStudioView .mp-brand__sub{display:none}
  #marketplaceStudioView .mp-utility-row__center-01243{
    justify-self:stretch;
    width:100%;
    overflow-x:auto;
    overflow-y:hidden;
    scrollbar-width:thin;
  }
  #marketplaceStudioView .mp-utility-row__center-01243 .mp-mt-switcher-01070{
    width:max-content;
    min-width:max-content;
  }
}

/* Legacy 01243 regression contract only; superseded by the 01244 two-lane utility geometry.
   grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);
   grid-template-areas:"left center right";
   @container mp-studio-shell (max-width:860px)
*/
