/* Phase 164xt: desktop/tablet feed edge + dark body surface + invite modal polish */
@media (min-width:768px){
  body.author:not(.sv-auth-page):not(.sv-authPage):not(.sv-reelsPage) .sv-profileCardV2 #sv-feed.sv-feed,
  body.sv-page-about-me:not(.sv-auth-page):not(.sv-authPage):not(.sv-reelsPage) #sv-feed.sv-feed{
    border-top:5px solid var(--sv-border) !important;
  }
}

body.sv-dark,
body.sv-dark html,
html body.sv-dark{
  background:var(--sv-bg) !important;
}

body.sv-dark .sv-layout,
body.sv-dark .sv-main,
body.sv-dark .sv-shell,
body.sv-dark .sv-mid,
body.sv-dark .sv-profileShell,
body.sv-dark .sv-searchPageV2,
body.sv-dark .sv-groupsPage,
body.sv-dark .sv-page,
body.sv-dark .sv-pageWrap,
body.sv-dark .site,
body.sv-dark #page,
body.sv-dark #primary,
body.sv-dark #content{
  background:transparent !important;
}

body.sv-dark .sv-layout::before,
body.sv-dark .sv-layout::after,
body.sv-dark .sv-main::before,
body.sv-dark .sv-main::after,
body.sv-dark .sv-shell::before,
body.sv-dark .sv-shell::after{
  background:transparent !important;
}

body.sv-dark .sv-dTop,
body.sv-dark .sv-sideLeft,
body.sv-dark .sv-sideRight,
body.sv-dark .sv-profileCardV2,
body.sv-dark .sv-card,
body.sv-dark .sv-gFbLeft,
body.sv-dark .sv-gFbTop,
body.sv-dark .sv-searchPanel{
  background:var(--sv-card) !important;
}

.sv-phase164InviteModal{position:fixed;inset:0;z-index:100000;display:flex;align-items:center;justify-content:center;padding:18px;}
.sv-phase164InviteBg{position:absolute;inset:0;background:rgba(0,0,0,.62);backdrop-filter:blur(3px);}
.sv-phase164InviteCard{position:relative;z-index:1;width:min(560px,calc(100vw - 24px));max-height:min(82vh,760px);background:var(--sv-card);color:var(--sv-fg);border:1px solid var(--sv-border);border-radius:24px;box-shadow:0 32px 120px rgba(0,0,0,.32);overflow:hidden;display:flex;flex-direction:column;}
.sv-phase164InviteHead{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px 18px;border-bottom:1px solid var(--sv-border);}
.sv-phase164InviteTitle{font-weight:900;font-size:1.05rem;}
.sv-phase164InviteBody{padding:14px 14px 16px;display:flex;flex-direction:column;gap:12px;overflow:auto;}
.sv-phase164InviteSearch input{width:100%;border:1px solid var(--sv-border);background:var(--sv-bg);color:var(--sv-fg);border-radius:16px;padding:12px 14px;outline:none;}
.sv-phase164InviteList{display:grid;gap:10px;}
.sv-phase164InviteRow{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 12px;border:1px solid var(--sv-border);border-radius:18px;background:color-mix(in srgb,var(--sv-card) 82%, transparent);}
.sv-phase164InviteUser{display:flex;align-items:center;gap:12px;min-width:0;}
.sv-phase164InviteUser img{width:44px;height:44px;border-radius:999px;object-fit:cover;background:var(--sv-chip);flex:0 0 auto;}
.sv-phase164InviteName{font-weight:800;line-height:1.15;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:240px;}
.sv-phase164InviteHandle{font-size:.92rem;color:var(--sv-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:240px;}
.sv-phase164InviteBtn{min-width:104px;justify-content:center;}
.sv-phase164InviteBtn.is-off{opacity:.65;cursor:not-allowed;}
@media (max-width:767.98px){
  .sv-phase164InviteModal{padding:10px;align-items:flex-end;}
  .sv-phase164InviteCard{width:100%;max-height:min(86vh,760px);border-radius:22px 22px 0 0;}
  .sv-phase164InviteName,.sv-phase164InviteHandle{max-width:160px;}
}
