/* Wide desktop profile layout.
   Use the available viewport for profile dashboards while keeping cards readable.
   The profile editor stores widget widths in a 12-column grid, so the desktop
   overrides below also remove legacy row gaps without changing mobile behavior. */

@media (min-width:1101px){
  .profile-page #preview>.shell{
    width:min(1680px,calc(100vw - 48px))!important;
    max-width:none!important;
    padding-left:0!important;
    padding-right:0!important;
    box-sizing:border-box;
  }

  .profile-page .profile-preview{
    width:100%!important;
    max-width:none!important;
  }

  .profile-page .profile-network-shell{
    width:100%!important;
    max-width:1680px!important;
    margin-left:auto!important;
    margin-right:auto!important;
  }

  .profile-page .pn-profile.pdv3-profile,
  .profile-page .plv2-profile.pdv3-profile,
  .profile-page .pdv3-profile.lvt-layout-mounted{
    width:100%!important;
    max-width:none!important;
  }

  .profile-page .pdv3-profile.lvt-layout-mounted>.lvt-profile-header-card,
  .profile-page .pdv3-profile.lvt-layout-mounted>.lvt-layout-canvas{
    width:100%!important;
    max-width:none!important;
  }

  .profile-page .pdv3-profile .lvt-layout-canvas{
    column-gap:20px!important;
    row-gap:10px!important;
    padding:20px!important;
  }

  /* Fill the 12-column desktop grid cleanly.
     Row 1: 4 + 5 + 3
     Row 2: 6 + 3 + 3
     Row 3: 6 + 6
     Full-width community/history sections follow below. */
  .profile-page [data-lvt-layout-widget="viewer"]{
    --lvt-layout-span:4!important;
  }

  .profile-page [data-lvt-layout-widget="social"]{
    --lvt-layout-span:5!important;
  }

  .profile-page [data-lvt-layout-widget="facts"]{
    --lvt-layout-span:3!important;
  }

  .profile-page [data-lvt-layout-widget="about"]{
    --lvt-layout-span:6!important;
  }

  .profile-page [data-lvt-layout-widget="names"]{
    --lvt-layout-span:3!important;
  }

  .profile-page [data-lvt-layout-widget="external"]{
    --lvt-layout-span:3!important;
  }

  .profile-page [data-lvt-layout-widget="profileTools"],
  .profile-page [data-lvt-layout-widget="account"]{
    --lvt-layout-span:6!important;
  }

  .profile-page [data-lvt-layout-widget="community"],
  .profile-page [data-lvt-layout-widget="history"]{
    --lvt-layout-span:12!important;
  }
}

@media (min-width:1700px){
  .profile-page #preview>.shell{
    width:min(1680px,calc(100vw - 64px))!important;
  }

  .profile-page .profile-network-shell{
    max-width:1680px!important;
  }
}

@media (min-width:1101px) and (max-width:1320px){
  .profile-page #preview>.shell{
    width:calc(100vw - 32px)!important;
  }

  .profile-page .pdv3-profile .lvt-layout-canvas{
    column-gap:14px!important;
    padding:14px!important;
  }
}
