/* Family Book — desktop social profile layout
   Desktop/tablet presentation only. Mobile profile stays on the existing stack. */
@media (min-width: 900px){
  .member-profile-view:not(.history-profile-view):not(.account-profile-view){
    width:100%!important;
    max-width:1320px!important;
    margin:0 auto!important;
    padding:0 18px 36px!important;
    box-sizing:border-box!important;
  }

  .fb-member-profile{
    width:100%!important;
    max-width:none!important;
    text-align:left!important;
    padding-bottom:36px!important;
  }

  .fb-basic-cover{
    width:100%!important;
    max-width:none!important;
    height:400px!important;
    border-radius:22px!important;
  }

  /* Keep the avatar in one predictable place on every desktop profile. */
  .member-profile-view .fb-member-profile .fb-basic-avatar-slot{
    position:relative!important;
    z-index:5!important;
    width:max-content!important;
    max-width:none!important;
    margin:-92px 0 0 44px!important;
    transform:none!important;
  }

  .fb-member-profile .profile-view-avatar{
    width:176px!important;
    height:176px!important;
    border-width:5px!important;
  }

  /* Centre the person's name to the whole profile page. Edit controls sit independently. */
  .member-profile-view .fb-member-profile .fb-basic-name{
    position:relative!important;
    width:100%!important;
    max-width:none!important;
    margin:18px 0 0!important;
    padding:0 190px!important;
    min-height:58px!important;
    display:block!important;
    box-sizing:border-box!important;
  }

  .fb-member-profile .fb-basic-name>h1{
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    margin:0!important;
    padding:0!important;
    text-align:center!important;
    font-size:clamp(2rem,2.55vw,2.8rem)!important;
    line-height:1.08!important;
    overflow-wrap:normal!important;
    word-break:normal!important;
  }

  .fb-profile-edit-button{
    position:absolute!important;
    right:24px!important;
    top:50%!important;
    transform:translateY(-50%)!important;
    margin:0!important;
    min-height:44px!important;
    padding:0 16px!important;
    width:max-content!important;
  }

  .fb-profile-actions{
    width:calc(100% - 48px)!important;
    margin:14px 24px 0!important;
    padding:0!important;
    max-width:none!important;
    box-sizing:border-box!important;
  }

  .fb-profile-actions .member-contact-actions{
    justify-content:center!important;
  }

  .fb-profile-actions .member-contact-actions a{
    flex:0 1 180px!important;
    min-width:132px!important;
  }

  /* Tabs and body share the same full width as the cover. */
  .fb-desktop-profile-tabs{
    width:100%!important;
    max-width:none!important;
    box-sizing:border-box!important;
    display:flex;
    align-items:center;
    gap:8px;
    margin:28px 0 0!important;
    padding:0 8px 10px!important;
    border-bottom:1px solid var(--line);
  }

  .fb-desktop-profile-tab{
    position:relative;
    min-height:44px!important;
    padding:0 18px!important;
    border:0!important;
    border-radius:10px!important;
    background:transparent!important;
    color:var(--muted)!important;
    font-weight:850!important;
    font-size:.94rem!important;
    cursor:pointer;
  }

  .fb-desktop-profile-tab:hover{
    background:rgba(127,127,127,.07)!important;
    color:var(--ink)!important;
  }

  .fb-desktop-profile-tab.is-active{
    color:var(--accent)!important;
  }

  .fb-desktop-profile-tab.is-active:after{
    content:"";
    position:absolute;
    left:16px;
    right:16px;
    bottom:-11px;
    height:3px;
    border-radius:999px;
    background:var(--accent);
  }

  .fb-profile-content{
    width:100%!important;
    max-width:none!important;
    box-sizing:border-box!important;
    display:grid!important;
    grid-template-columns:minmax(320px,380px) minmax(0,1fr)!important;
    align-items:start!important;
    gap:22px!important;
    margin:20px 0 0!important;
    padding:0!important;
    text-align:left!important;
  }

  .fb-profile-about{
    width:100%!important;
    max-width:none!important;
    grid-column:1!important;
    grid-row:1!important;
    position:sticky!important;
    top:92px!important;
  }

  .fb-profile-about .profile-details{
    grid-template-columns:1fr!important;
  }

  .fb-profile-activity{
    width:100%!important;
    max-width:none!important;
    grid-column:2!important;
    grid-row:1!important;
    min-width:0!important;
  }

  .fb-profile-activity .member-activity-card{
    width:100%!important;
    max-width:none!important;
    box-sizing:border-box!important;
    padding:20px!important;
  }

  .fb-profile-activity .member-activity-head{
    margin-bottom:16px!important;
  }

  .fb-profile-activity .member-activity-head h2{
    font-size:1.4rem!important;
  }

  .fb-profile-activity .member-activity-empty{
    min-height:260px!important;
  }

  .fb-profile-activity .wall-post,
  .fb-profile-activity .wall-post-body,
  .fb-profile-activity .wall-post-attachment,
  .fb-profile-activity .wall-link-preview{
    max-width:none!important;
    width:100%!important;
  }
}

/* Keep the current mobile/tablet-small profile untouched. */
@media (max-width: 899px){
  .fb-desktop-profile-tabs{display:none!important}
}
