/* ========================================================================== 
   twittsocial.com V4.13.0 — FULL UI REBUILD
   Visual/layout layer only. Existing PHP/JS feature systems are preserved.
   ========================================================================== */

:root{
  --sp-ui-bg:#f3f5f8;
  --sp-ui-surface:#ffffff;
  --sp-ui-surface-2:#f7f8fa;
  --sp-ui-surface-3:#eef1f5;
  --sp-ui-text:#17202a;
  --sp-ui-muted:#687386;
  --sp-ui-faint:#8d96a5;
  --sp-ui-line:#e2e7ed;
  --sp-ui-primary:#0866ff;
  --sp-ui-primary-soft:#eaf2ff;
  --sp-ui-success:#239b56;
  --sp-ui-danger:#d92d20;
  --sp-ui-warning:#d99000;
  --sp-ui-shadow:0 1px 2px rgba(16,24,40,.05),0 6px 22px rgba(16,24,40,.04);
  --sp-ui-radius:18px;
  --sp-ui-radius-sm:13px;
  --sp-ui-radius-lg:24px;
  --sp-ui-topbar:64px;
  --sp-ui-bottomnav:72px;
  --sp-ui-feed:720px;
  --sp-ui-page:1180px;
  --sp-ui-edge:16px;
}

html.sp-theme-dark-root body.sp-theme-dark,
body.sp-theme-dark{
  --sp-ui-bg:#111315;
  --sp-ui-surface:#1b1e21;
  --sp-ui-surface-2:#22262a;
  --sp-ui-surface-3:#2b3035;
  --sp-ui-text:#f1f3f5;
  --sp-ui-muted:#b0b6bf;
  --sp-ui-faint:#838b96;
  --sp-ui-line:#333940;
  --sp-ui-primary:#4c9aff;
  --sp-ui-primary-soft:#1d3553;
  --sp-ui-success:#4cc77a;
  --sp-ui-danger:#ff6b63;
  --sp-ui-warning:#f0b44d;
  --sp-ui-shadow:none;
}

/* ---------- Global reset / collision guards ---------- */
html{max-width:100%;background:var(--sp-ui-bg)!important;scroll-behavior:smooth}
body.sp-ui-v4130{
  max-width:100%!important;
  min-width:0!important;
  margin:0!important;
  overflow-x:hidden!important;
  background:var(--sp-ui-bg)!important;
  color:var(--sp-ui-text)!important;
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif!important;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}
body.sp-ui-v4130 *,body.sp-ui-v4130 *::before,body.sp-ui-v4130 *::after{box-sizing:border-box}
body.sp-ui-v4130 :is(button,input,textarea,select,optgroup){font:inherit!important}
body.sp-ui-v4130 :is(h1,h2,h3,h4,h5,h6,p,span,strong,small,a,button,label,input,textarea,select){font-family:inherit!important}
body.sp-ui-v4130 img,body.sp-ui-v4130 video,body.sp-ui-v4130 canvas,body.sp-ui-v4130 svg{max-width:100%}
body.sp-ui-v4130 a{color:inherit}
body.sp-ui-v4130 :is(.sp-shell,.sp-feed,.sp-app-page,.sp-profile-page,.sp-friends-page,.sp-notifications-page,.sp-settings-page,.sp-live-page,.sp-messages-page,.sp-reels-page,.sp-group-page,.sp-dv-shell,.sp-dv-workspace,.sp-messenger-shell,.sp-messenger-sidebar,.sp-messenger-thread){min-width:0!important}
body.sp-ui-v4130 :is(.sp-left,.sp-right,.sp-sticky,.sp-feed,.sp-post-card,.sp-composer,.sp-widget,.sp-stories,.sp-profile-card,.sp-profile-wide-card,.sp-group-card,.sp-page-card,.sp-settings-card){min-width:0!important}
body.sp-ui-v4130 [hidden]{display:none!important}
body.sp-ui-v4130 :focus-visible{outline:2px solid var(--sp-ui-primary)!important;outline-offset:2px}

/* Hide cosmetic scrollbars while preserving scroll interaction. */
body.sp-ui-v4130 :is(.sp-stories-scroll,.sp-recommended-list,.sp-recommended-grid,.sp-recommended-friends,.sp-dv-nav,.sp-messenger-conversations,.sp-chat-scroll,.sp-live-channel-list,.sp-profile-tabs,.sp-group-tabs,.sp-settings-mobile-shortcuts){scrollbar-width:none!important;-ms-overflow-style:none!important}
body.sp-ui-v4130 :is(.sp-stories-scroll,.sp-recommended-list,.sp-recommended-grid,.sp-recommended-friends,.sp-dv-nav,.sp-messenger-conversations,.sp-chat-scroll,.sp-live-channel-list,.sp-profile-tabs,.sp-group-tabs,.sp-settings-mobile-shortcuts)::-webkit-scrollbar{display:none!important;width:0!important;height:0!important}

/* ---------- Generic surfaces / controls ---------- */
body.sp-ui-v4130 :is(.sp-post-card,.sp-composer,.sp-stories,.sp-widget,.sp-empty,.sp-view-head,.sp-profile-card,.sp-profile-wide-card,.sp-person-card,.sp-friend-result,.sp-notifications-page-card,.sp-settings-card,.sp-group-card,.sp-group-profile,.sp-group-about-card,.sp-group-members-card,.sp-group-settings-card,.sp-group-recent-media-card,.sp-page-card,.sp-page-profile,.sp-live-player-card,.sp-live-channel-panel,.sp-live-active-card,.sp-fbpd-card,.sp-pd-card,.sp-dv-card){
  background:var(--sp-ui-surface)!important;
  color:var(--sp-ui-text)!important;
  border:1px solid var(--sp-ui-line)!important;
  border-radius:var(--sp-ui-radius)!important;
  box-shadow:var(--sp-ui-shadow)!important;
}
body.sp-ui-v4130 :is(.sp-app-primary,.sp-mobile-drawer-primary,.sp-profile-primary,.sp-profile-photo-change,.sp-profile-cover-change,.sp-group-create-submit,.sp-group-reference-submit,.sp-page-post-submit,.sp-live-primary){
  min-height:42px!important;
  border:1px solid var(--sp-ui-primary)!important;
  border-radius:var(--sp-ui-radius-sm)!important;
  background:var(--sp-ui-primary)!important;
  color:#fff!important;
  box-shadow:none!important;
  font-weight:700!important;
}
body.sp-ui-v4130 :is(.sp-app-secondary,.sp-mobile-drawer-secondary,.sp-profile-secondary,.sp-live-secondary){
  min-height:42px!important;
  border:1px solid var(--sp-ui-line)!important;
  border-radius:var(--sp-ui-radius-sm)!important;
  background:var(--sp-ui-surface-2)!important;
  color:var(--sp-ui-text)!important;
  box-shadow:none!important;
  font-weight:650!important;
}
body.sp-ui-v4130 :is(input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=hidden]),textarea,select){
  max-width:100%!important;
  border:1px solid var(--sp-ui-line)!important;
  border-radius:var(--sp-ui-radius-sm)!important;
  background:var(--sp-ui-surface-2)!important;
  color:var(--sp-ui-text)!important;
  box-shadow:none!important;
}
body.sp-ui-v4130 :is(input,textarea)::placeholder{color:var(--sp-ui-faint)!important;opacity:1}
body.sp-ui-v4130 :is(input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=hidden]),select){min-height:44px!important;padding:0 13px!important}
body.sp-ui-v4130 textarea{padding:11px 13px!important;line-height:1.45!important}
body.sp-ui-v4130 :is(input,textarea,select):focus{border-color:var(--sp-ui-primary)!important;box-shadow:0 0 0 3px color-mix(in srgb,var(--sp-ui-primary) 14%,transparent)!important;outline:0!important}

/* ---------- Avatar identity: always a true circle ---------- */
body.sp-ui-v4130 img.sp-avatar,
body.sp-ui-v4130 img.avatar,
body.sp-ui-v4130 :is(.sp-profile-avatar-wrap,.sp-profile-photo-preview,.sp-person-avatar-wrap,.sp-story-user-avatar,.sp-right-chat-avatar,.sp-notification-avatar-wrap,.sp-chat-head-avatar,.sp-dialog-comment-avatar,.sp-page-profile-avatar-wrap) > img,
body.sp-ui-v4130 :is(.sp-profile-avatar-wrap,.sp-profile-photo-preview,.sp-person-avatar-wrap,.sp-story-user-avatar,.sp-right-chat-avatar,.sp-notification-avatar-wrap,.sp-chat-head-avatar,.sp-dialog-comment-avatar,.sp-page-profile-avatar-wrap) img.sp-avatar{
  aspect-ratio:1/1!important;
  object-fit:cover!important;
  object-position:center!important;
  border-radius:50%!important;
  overflow:hidden!important;
  display:block!important;
}
body.sp-ui-v4130 :is(.sp-profile-avatar-wrap,.sp-profile-photo-preview,.sp-person-avatar-wrap,.sp-story-user-avatar,.sp-right-chat-avatar,.sp-notification-avatar-wrap,.sp-chat-head-avatar,.sp-dialog-comment-avatar,.sp-page-profile-avatar-wrap){border-radius:50%!important}
/* Large friend recommendation photo stays rectangular. */
body.sp-ui-v4130 .sp-recommended-photo,
body.sp-ui-v4130 .sp-recommended-photo img.sp-avatar{border-radius:0!important}
body.sp-ui-v4130 .sp-recommended-photo img.sp-avatar{width:100%!important;height:100%!important;max-width:none!important;max-height:none!important;object-fit:cover!important}

/* ---------- Top application bar ---------- */
body.sp-ui-v4130 .sp-topbar{
  position:sticky!important;top:0!important;z-index:1500!important;
  width:100%!important;height:auto!important;min-height:var(--sp-ui-topbar)!important;
  background:color-mix(in srgb,var(--sp-ui-surface) 94%,transparent)!important;
  border-bottom:1px solid var(--sp-ui-line)!important;
  box-shadow:none!important;
  backdrop-filter:blur(14px);
}
body.sp-ui-v4130.admin-bar .sp-topbar{top:32px!important}
body.sp-ui-v4130 .sp-topbar-inner{
  width:min(100%,1440px)!important;min-height:var(--sp-ui-topbar)!important;
  margin:0 auto!important;padding:8px 16px!important;
  display:grid!important;grid-template-columns:220px minmax(260px,440px) 1fr!important;gap:18px!important;align-items:center!important;
}
body.sp-ui-v4130 .sp-brand{display:flex!important;align-items:center!important;gap:10px!important;min-width:0!important;text-decoration:none!important;color:var(--sp-ui-text)!important}
body.sp-ui-v4130 .sp-brand-mark{width:42px!important;height:42px!important;min-width:42px!important;display:grid!important;place-items:center!important;border-radius:14px!important;background:var(--sp-ui-primary)!important;color:#fff!important;overflow:hidden!important}
body.sp-ui-v4130 .sp-brand-text{min-width:0!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;font-weight:800!important;font-size:17px!important;letter-spacing:-.02em!important}
body.sp-ui-v4130 .sp-search{
  width:100%!important;min-width:0!important;height:44px!important;margin:0!important;padding:0 14px!important;
  display:flex!important;align-items:center!important;gap:9px!important;
  border:1px solid var(--sp-ui-line)!important;border-radius:999px!important;
  background:var(--sp-ui-surface-2)!important;box-shadow:none!important;overflow:hidden!important;
}
body.sp-ui-v4130 .sp-search :is(.sp-icon,.sp-search-svg){width:19px!important;height:19px!important;flex:0 0 19px!important;color:var(--sp-ui-muted)!important}
body.sp-ui-v4130 .sp-search input{height:40px!important;min-height:0!important;padding:0!important;border:0!important;background:transparent!important;box-shadow:none!important;min-width:0!important}
body.sp-ui-v4130 .sp-nav-icons{display:flex!important;justify-content:flex-end!important;align-items:center!important;gap:7px!important;min-width:0!important}
body.sp-ui-v4130 .sp-nav-icons > :is(a,button),body.sp-ui-v4130 .sp-notifications-nav{
  width:40px!important;height:40px!important;min-width:40px!important;min-height:40px!important;
  display:grid!important;place-items:center!important;border:1px solid transparent!important;border-radius:13px!important;
  background:transparent!important;color:var(--sp-ui-muted)!important;box-shadow:none!important;
}
body.sp-ui-v4130 .sp-nav-icons > a:hover,body.sp-ui-v4130 .sp-notifications-nav:hover{background:var(--sp-ui-surface-2)!important;color:var(--sp-ui-text)!important}
body.sp-ui-v4130 .sp-nav-icons > a.active,body.sp-ui-v4130 .sp-notifications-nav.active{background:var(--sp-ui-primary-soft)!important;color:var(--sp-ui-primary)!important}
body.sp-ui-v4130 .sp-mobile-menu-toggle{display:none!important}

/* ---------- Main desktop shell ---------- */
body.sp-ui-v4130 .sp-shell{
  width:min(100%,var(--sp-ui-page))!important;max-width:var(--sp-ui-page)!important;
  margin:0 auto!important;padding:18px 16px 96px!important;
  display:grid!important;grid-template-columns:220px minmax(0,var(--sp-ui-feed)) 220px!important;
  gap:18px!important;justify-content:center!important;align-items:start!important;background:transparent!important;
}
body.sp-ui-v4130 .sp-left,body.sp-ui-v4130 .sp-right{width:100%!important;min-width:0!important}
body.sp-ui-v4130 .sp-left .sp-sticky,body.sp-ui-v4130 .sp-right .sp-sticky{position:sticky!important;top:calc(var(--sp-ui-topbar) + 16px)!important;display:grid!important;gap:8px!important}
body.sp-ui-v4130 .sp-feed{width:100%!important;max-width:var(--sp-ui-feed)!important;margin:0 auto!important;display:block!important}
body.sp-ui-v4130 .sp-side-link{min-height:44px!important;padding:0 11px!important;display:flex!important;align-items:center!important;gap:10px!important;border-radius:12px!important;color:var(--sp-ui-muted)!important;text-decoration:none!important}
body.sp-ui-v4130 .sp-side-link:hover{background:var(--sp-ui-surface-2)!important;color:var(--sp-ui-text)!important}
body.sp-ui-v4130 .sp-side-user{display:flex!important;align-items:center!important;gap:10px!important;padding:8px!important;border-radius:14px!important;color:var(--sp-ui-text)!important;text-decoration:none!important}
body.sp-ui-v4130 .sp-side-card{padding:14px!important;border:1px solid var(--sp-ui-line)!important;border-radius:16px!important;background:var(--sp-ui-surface)!important;box-shadow:none!important}
body.sp-ui-v4130 .sp-side-card p,body.sp-ui-v4130 .sp-side-legal-links{color:var(--sp-ui-muted)!important}

/* ---------- Feed / stories / composer ---------- */
body.sp-ui-v4130 :is(.sp-stories,.sp-composer,.sp-post-card,.sp-widget,.sp-view-head,.sp-empty){width:100%!important;margin:0 0 12px!important;overflow:hidden!important}
body.sp-ui-v4130 .sp-stories{padding:14px!important}
body.sp-ui-v4130 .sp-stories-heading{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:10px!important;margin:0 0 12px!important;min-width:0!important}
body.sp-ui-v4130 .sp-stories-heading :is(h2,strong){margin:0!important;font-size:17px!important;color:var(--sp-ui-text)!important}
body.sp-ui-v4130 .sp-stories-heading :is(p,span,small){min-width:0!important;color:var(--sp-ui-muted)!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}
body.sp-ui-v4130 .sp-stories-scroll{display:flex!important;gap:10px!important;overflow-x:auto!important;overflow-y:hidden!important;padding:0 0 2px!important;scroll-snap-type:x proximity}
body.sp-ui-v4130 :is(.sp-story-create,.sp-story-card){flex:0 0 112px!important;width:112px!important;min-width:112px!important;border-radius:16px!important;overflow:hidden!important;scroll-snap-align:start!important}
body.sp-ui-v4130 .sp-composer{padding:14px!important}
body.sp-ui-v4130 .sp-composer-top{display:flex!important;align-items:center!important;gap:10px!important;min-width:0!important}
body.sp-ui-v4130 .sp-composer-prompt,body.sp-ui-v4130 .sp-composer textarea{flex:1 1 auto!important;min-width:0!important;border-radius:999px!important;background:var(--sp-ui-surface-2)!important}
body.sp-ui-v4130 .sp-composer-actions{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:6px!important;margin-top:10px!important;padding-top:10px!important;border-top:1px solid var(--sp-ui-line)!important}
body.sp-ui-v4130 .sp-composer-actions button{min-width:0!important;min-height:42px!important;border:0!important;border-radius:12px!important;background:transparent!important;color:var(--sp-ui-muted)!important;font-weight:700!important}
body.sp-ui-v4130 .sp-composer-actions button:hover{background:var(--sp-ui-surface-2)!important;color:var(--sp-ui-text)!important}

body.sp-ui-v4130 .sp-post-card{padding:0!important}
body.sp-ui-v4130 .sp-post-head{display:grid!important;grid-template-columns:44px minmax(0,1fr) auto!important;align-items:center!important;gap:10px!important;padding:14px 14px 8px!important;min-width:0!important}
body.sp-ui-v4130 .sp-post-meta{min-width:0!important}
body.sp-ui-v4130 .sp-post-meta .sp-author{display:block!important;min-width:0!important;color:var(--sp-ui-text)!important;font-weight:750!important;text-decoration:none!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}
body.sp-ui-v4130 .sp-post-meta > span{display:flex!important;align-items:center!important;gap:4px!important;color:var(--sp-ui-muted)!important;font-size:12px!important}
body.sp-ui-v4130 .sp-post-public-title{margin:3px 14px 8px!important;font-size:18px!important;line-height:1.35!important;color:var(--sp-ui-text)!important}
body.sp-ui-v4130 .sp-post-text{padding:0 14px 10px!important;margin:0!important;color:var(--sp-ui-text)!important;font-size:15px!important;line-height:1.48!important;overflow-wrap:anywhere!important}
body.sp-ui-v4130 .sp-post-text p{margin:0 0 8px!important}
body.sp-ui-v4130 .sp-media-grid{width:100%!important;max-width:100%!important;overflow:hidden!important;background:#0e1115!important}
body.sp-ui-v4130 .sp-media-grid :is(img,video){display:block!important;width:100%!important;max-width:100%!important;height:auto!important}
body.sp-ui-v4130 .sp-social-stats{min-height:38px!important;padding:7px 14px!important;display:flex!important;align-items:center!important;justify-content:space-between!important;gap:10px!important;border-bottom:1px solid var(--sp-ui-line)!important;color:var(--sp-ui-muted)!important;font-size:12px!important}
body.sp-ui-v4130 .sp-social-stats button{border:0!important;background:transparent!important;color:inherit!important;padding:0!important}
body.sp-ui-v4130 .sp-actions{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:4px!important;padding:6px 10px 8px!important}
body.sp-ui-v4130 .sp-actions button{min-width:0!important;min-height:42px!important;border:0!important;border-radius:11px!important;background:transparent!important;color:var(--sp-ui-muted)!important;font-weight:700!important;display:flex!important;align-items:center!important;justify-content:center!important;gap:7px!important}
body.sp-ui-v4130 .sp-actions button:hover{background:var(--sp-ui-surface-2)!important;color:var(--sp-ui-text)!important}
body.sp-ui-v4130 .sp-actions .is-liked{color:var(--sp-ui-primary)!important}

/* Shared-post / ad nested surfaces stay inside parent card. */
body.sp-ui-v4130 :is(.sp-shared-post,.sp-native-ad-card,.sp-sponsored-card){max-width:calc(100% - 24px)!important;margin:0 12px 12px!important;border:1px solid var(--sp-ui-line)!important;border-radius:15px!important;overflow:hidden!important;background:var(--sp-ui-surface-2)!important}

/* ---------- People You May Know ---------- */
body.sp-ui-v4130 .sp-recommended-friends{width:100%!important;max-width:100%!important;margin:0 0 12px!important;padding:0!important;border:1px solid var(--sp-ui-line)!important;border-radius:var(--sp-ui-radius)!important;background:var(--sp-ui-surface)!important;box-shadow:var(--sp-ui-shadow)!important;overflow:hidden!important}
body.sp-ui-v4130 .sp-recommended-head{padding:13px 14px!important;display:flex!important;align-items:center!important;justify-content:space-between!important;gap:10px!important;border-bottom:1px solid var(--sp-ui-line)!important}
body.sp-ui-v4130 .sp-recommended-head :is(h2,strong){margin:0!important;font-size:17px!important;color:var(--sp-ui-text)!important}
body.sp-ui-v4130 .sp-recommended-list,body.sp-ui-v4130 .sp-recommended-grid{display:flex!important;gap:10px!important;padding:12px!important;overflow-x:auto!important;overflow-y:hidden!important;scroll-snap-type:x proximity!important}
body.sp-ui-v4130 .sp-recommended-card{flex:0 0 166px!important;width:166px!important;min-width:166px!important;max-width:166px!important;border:1px solid var(--sp-ui-line)!important;border-radius:15px!important;overflow:hidden!important;background:var(--sp-ui-surface)!important;box-shadow:none!important;scroll-snap-align:start!important}
body.sp-ui-v4130 .sp-recommended-photo{height:164px!important;overflow:hidden!important;background:var(--sp-ui-surface-3)!important}
body.sp-ui-v4130 .sp-recommended-copy{padding:10px!important;min-width:0!important}
body.sp-ui-v4130 .sp-recommended-copy strong{display:block!important;color:var(--sp-ui-text)!important;font-size:14px!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}
body.sp-ui-v4130 .sp-recommended-copy small{display:block!important;margin-top:4px!important;color:var(--sp-ui-muted)!important;font-size:11px!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}
body.sp-ui-v4130 .sp-recommended-card .sp-app-primary,body.sp-ui-v4130 .sp-recommended-add{width:calc(100% - 20px)!important;margin:0 10px 10px!important;min-height:38px!important;border-radius:11px!important}
body.sp-ui-v4130 .sp-recommended-see-all{display:flex!important;align-items:center!important;justify-content:center!important;min-height:46px!important;border-top:1px solid var(--sp-ui-line)!important;color:var(--sp-ui-primary)!important;font-weight:700!important;text-decoration:none!important}

/* ---------- Generic app pages ---------- */
body.sp-ui-v4130 .sp-app-page{width:100%!important;max-width:900px!important;margin:0 auto!important;padding:0!important}
body.sp-ui-v4130 .sp-app-page-head{display:flex!important;align-items:flex-start!important;justify-content:space-between!important;gap:16px!important;margin:0 0 14px!important;padding:18px!important;border:1px solid var(--sp-ui-line)!important;border-radius:var(--sp-ui-radius)!important;background:var(--sp-ui-surface)!important}
body.sp-ui-v4130 .sp-app-page-head h1{margin:0!important;font-size:26px!important;line-height:1.15!important;color:var(--sp-ui-text)!important;letter-spacing:-.025em!important}
body.sp-ui-v4130 .sp-app-page-head p{margin:5px 0 0!important;color:var(--sp-ui-muted)!important;line-height:1.45!important}
body.sp-ui-v4130 .sp-settings-eyebrow{display:block!important;margin-bottom:4px!important;color:var(--sp-ui-primary)!important;font-size:11px!important;font-weight:800!important;text-transform:uppercase!important;letter-spacing:.08em!important}

/* ---------- Friends / People / Notifications ---------- */
body.sp-ui-v4130 :is(.sp-friends-page,.sp-notifications-page){width:100%!important;max-width:900px!important;margin:0 auto!important}
body.sp-ui-v4130 .sp-friend-tabs,body.sp-ui-v4130 .sp-notifications-filter-tabs{display:flex!important;gap:6px!important;overflow-x:auto!important;padding:5px!important;border:1px solid var(--sp-ui-line)!important;border-radius:15px!important;background:var(--sp-ui-surface)!important;margin-bottom:12px!important}
body.sp-ui-v4130 :is(.sp-friend-tabs,.sp-notifications-filter-tabs) button{min-height:38px!important;padding:0 13px!important;border:0!important;border-radius:10px!important;background:transparent!important;color:var(--sp-ui-muted)!important;white-space:nowrap!important;font-weight:700!important}
body.sp-ui-v4130 :is(.sp-friend-tabs,.sp-notifications-filter-tabs) button.active{background:var(--sp-ui-primary-soft)!important;color:var(--sp-ui-primary)!important}
body.sp-ui-v4130 .sp-friend-search{margin-bottom:12px!important}
body.sp-ui-v4130 .sp-friends-results{display:grid!important;gap:10px!important}
body.sp-ui-v4130 .sp-friend-result{padding:12px!important;display:flex!important;align-items:center!important;justify-content:space-between!important;gap:12px!important}
body.sp-ui-v4130 .sp-friend-result-user{display:flex!important;align-items:center!important;gap:11px!important;min-width:0!important;text-decoration:none!important}
body.sp-ui-v4130 .sp-friend-result-user > span:last-child{min-width:0!important}
body.sp-ui-v4130 .sp-friend-result-user strong{display:block!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}
body.sp-ui-v4130 .sp-friend-result-user small{display:block!important;margin-top:3px!important;color:var(--sp-ui-muted)!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}
body.sp-ui-v4130 .sp-notifications-page-card{overflow:hidden!important}

/* ---------- Profile ---------- */
body.sp-ui-v4130.sp-profile-route .sp-shell{width:min(100%,1080px)!important;max-width:1080px!important;display:block!important;padding-top:16px!important}
body.sp-ui-v4130 .sp-profile-page{width:100%!important;max-width:1040px!important;margin:0 auto!important}
body.sp-ui-v4130 .sp-profile-hero{overflow:hidden!important;border:1px solid var(--sp-ui-line)!important;border-radius:var(--sp-ui-radius-lg)!important;background:var(--sp-ui-surface)!important;box-shadow:var(--sp-ui-shadow)!important}
body.sp-ui-v4130 .sp-profile-cover{width:100%!important;min-height:260px!important;max-height:360px!important;background-color:var(--sp-ui-surface-3)!important;background-position:center!important;background-size:cover!important;overflow:hidden!important}
body.sp-ui-v4130 .sp-profile-identity{display:grid!important;grid-template-columns:168px minmax(0,1fr) auto!important;gap:18px!important;align-items:end!important;padding:0 22px 18px!important;margin-top:-62px!important;position:relative!important}
body.sp-ui-v4130 .sp-profile-avatar-wrap{width:168px!important;height:168px!important;min-width:168px!important;border:5px solid var(--sp-ui-surface)!important;background:var(--sp-ui-surface-3)!important;overflow:hidden!important}
body.sp-ui-v4130 .sp-profile-avatar-wrap > img{width:100%!important;height:100%!important}
body.sp-ui-v4130 .sp-profile-name-block{min-width:0!important;padding-bottom:8px!important}
body.sp-ui-v4130 .sp-profile-name-block h1{margin:0!important;color:var(--sp-ui-text)!important;font-size:28px!important;line-height:1.12!important;letter-spacing:-.025em!important}
body.sp-ui-v4130 .sp-profile-name-block :is(p,span,small){color:var(--sp-ui-muted)!important}
body.sp-ui-v4130 .sp-profile-actions{display:flex!important;gap:8px!important;align-items:center!important;flex-wrap:wrap!important;padding-bottom:8px!important}
body.sp-ui-v4130 .sp-profile-tabs{display:flex!important;gap:4px!important;overflow-x:auto!important;padding:8px 14px!important;border-top:1px solid var(--sp-ui-line)!important;background:var(--sp-ui-surface)!important}
body.sp-ui-v4130 .sp-profile-tabs a{flex:0 0 auto!important;min-height:40px!important;padding:0 13px!important;display:flex!important;align-items:center!important;border-radius:10px!important;color:var(--sp-ui-muted)!important;text-decoration:none!important;font-weight:700!important}
body.sp-ui-v4130 .sp-profile-tabs a.active{background:var(--sp-ui-primary-soft)!important;color:var(--sp-ui-primary)!important}
body.sp-ui-v4130 .sp-profile-main-grid{display:grid!important;grid-template-columns:340px minmax(0,1fr)!important;gap:14px!important;margin-top:14px!important;align-items:start!important}
body.sp-ui-v4130 :is(.sp-profile-left-column,.sp-profile-feed-column){min-width:0!important}
body.sp-ui-v4130 :is(.sp-profile-card,.sp-profile-wide-card){padding:16px!important;margin-bottom:12px!important}
body.sp-ui-v4130 .sp-profile-friends-grid,body.sp-ui-v4130 .sp-profile-people-grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:9px!important}

/* ---------- Settings: neutral, compact, reference-style mobile ---------- */
body.sp-ui-v4130.sp-settings-route-v4120{
  --sp-settings-bg:var(--sp-ui-bg)!important;
  --sp-settings-surface:var(--sp-ui-surface)!important;
  --sp-settings-surface-2:var(--sp-ui-surface-2)!important;
  --sp-settings-line:var(--sp-ui-line)!important;
  --sp-settings-text:var(--sp-ui-text)!important;
  --sp-settings-muted:var(--sp-ui-muted)!important;
  --sp-settings-accent:var(--sp-ui-primary)!important;
  background:var(--sp-ui-bg)!important;
}
body.sp-ui-v4130 .sp-settings-grid{display:grid!important;grid-template-columns:220px minmax(0,1fr)!important;gap:14px!important;align-items:start!important}
body.sp-ui-v4130 .sp-settings-nav{position:sticky!important;top:calc(var(--sp-ui-topbar) + 14px)!important;padding:10px!important;border:1px solid var(--sp-ui-line)!important;border-radius:var(--sp-ui-radius)!important;background:var(--sp-ui-surface)!important;box-shadow:var(--sp-ui-shadow)!important}
body.sp-ui-v4130 .sp-settings-nav a{min-height:42px!important;padding:0 11px!important;display:flex!important;align-items:center!important;gap:9px!important;border-radius:11px!important;color:var(--sp-ui-muted)!important;text-decoration:none!important}
body.sp-ui-v4130 .sp-settings-nav a:hover,body.sp-ui-v4130 .sp-settings-nav a.active{background:var(--sp-ui-primary-soft)!important;color:var(--sp-ui-primary)!important}
body.sp-ui-v4130 .sp-settings-content{min-width:0!important}
body.sp-ui-v4130 .sp-settings-card{padding:18px!important;margin-bottom:12px!important;overflow:hidden!important}
body.sp-ui-v4130 .sp-settings-section-head{display:flex!important;align-items:flex-start!important;gap:12px!important;margin:0 0 16px!important;padding:0 0 14px!important;border-bottom:1px solid var(--sp-ui-line)!important}
body.sp-ui-v4130 .sp-settings-section-icon{width:38px!important;height:38px!important;flex:0 0 38px!important;display:grid!important;place-items:center!important;border-radius:12px!important;background:var(--sp-ui-primary-soft)!important;color:var(--sp-ui-primary)!important}
body.sp-ui-v4130 .sp-settings-section-head h2{margin:0!important;color:var(--sp-ui-text)!important;font-size:20px!important}
body.sp-ui-v4130 .sp-settings-section-head p{margin:3px 0 0!important;color:var(--sp-ui-muted)!important}
body.sp-ui-v4130 .sp-settings-form > label,body.sp-ui-v4130 .sp-form-two > label{display:block!important;margin-bottom:12px!important;color:var(--sp-ui-text)!important;font-size:13px!important;font-weight:650!important}
body.sp-ui-v4130 .sp-form-two{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important}
body.sp-ui-v4130 .sp-profile-cover-editor,body.sp-ui-v4130 .sp-profile-photo-editor,body.sp-ui-v4130 .sp-call-push-panel{padding:12px!important;margin-bottom:12px!important;border:1px solid var(--sp-ui-line)!important;border-radius:16px!important;background:var(--sp-ui-surface-2)!important}
body.sp-ui-v4130 .sp-profile-cover-preview{min-height:190px!important;border-radius:14px!important;overflow:hidden!important;background-position:center!important;background-size:cover!important}
body.sp-ui-v4130 .sp-profile-photo-editor{display:grid!important;grid-template-columns:96px minmax(0,1fr)!important;gap:14px!important;align-items:center!important}
body.sp-ui-v4130 .sp-profile-photo-preview{width:90px!important;height:90px!important;overflow:visible!important}
body.sp-ui-v4130 .sp-profile-photo-preview > img{width:90px!important;height:90px!important}
body.sp-ui-v4130 .sp-profile-photo-actions{grid-column:1/-1!important;display:flex!important;gap:8px!important;flex-wrap:wrap!important}
body.sp-ui-v4130 .sp-notification-setting-row{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:12px!important;min-height:58px!important;padding:9px 0!important;border-bottom:1px solid var(--sp-ui-line)!important}
body.sp-ui-v4130 .sp-notification-setting-row:last-of-type{border-bottom:0!important}
body.sp-ui-v4130 .sp-notification-setting-row small{display:block!important;margin-top:2px!important;color:var(--sp-ui-muted)!important}

/* ---------- Groups / Pages ---------- */
body.sp-ui-v4130.sp-group-route .sp-shell,body.sp-ui-v4130.sp-pages-route .sp-shell{width:min(100%,1100px)!important;max-width:1100px!important;display:block!important}
body.sp-ui-v4130 :is(.sp-group-page,.sp-page-system){width:100%!important;max-width:1080px!important;margin:0 auto!important}
body.sp-ui-v4130 :is(.sp-groups-hero,.sp-pages-hero,.sp-group-create-shell,.sp-page-create-shell){border:1px solid var(--sp-ui-line)!important;border-radius:var(--sp-ui-radius-lg)!important;background:var(--sp-ui-surface)!important;box-shadow:var(--sp-ui-shadow)!important;overflow:hidden!important}
body.sp-ui-v4130 .sp-group-grid,body.sp-ui-v4130 .sp-page-grid{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:12px!important}
body.sp-ui-v4130 :is(.sp-group-card,.sp-page-card){overflow:hidden!important}
body.sp-ui-v4130 :is(.sp-group-card-cover,.sp-page-card-cover){aspect-ratio:16/7!important;background-position:center!important;background-size:cover!important}
body.sp-ui-v4130 .sp-group-content-grid{display:grid!important;grid-template-columns:minmax(0,1fr) 300px!important;gap:14px!important;align-items:start!important}
body.sp-ui-v4130 .sp-group-tabs{display:flex!important;gap:5px!important;overflow-x:auto!important;padding:7px!important;border:1px solid var(--sp-ui-line)!important;border-radius:14px!important;background:var(--sp-ui-surface)!important}

/* ---------- Messenger ---------- */
body.sp-ui-v4130.sp-messages-route .sp-shell{display:block!important;width:min(100%,1280px)!important;max-width:1280px!important;padding:14px 16px 92px!important}
body.sp-ui-v4130 .sp-messages-page{width:100%!important;max-width:1240px!important;margin:0 auto!important}
body.sp-ui-v4130 .sp-messenger-shell{height:calc(100dvh - var(--sp-ui-topbar) - 42px)!important;min-height:520px!important;display:grid!important;grid-template-columns:330px minmax(0,1fr)!important;border:1px solid var(--sp-ui-line)!important;border-radius:var(--sp-ui-radius-lg)!important;background:var(--sp-ui-surface)!important;overflow:hidden!important;box-shadow:var(--sp-ui-shadow)!important}
body.sp-ui-v4130 .sp-messenger-sidebar{display:flex!important;flex-direction:column!important;min-height:0!important;border-right:1px solid var(--sp-ui-line)!important;background:var(--sp-ui-surface)!important}
body.sp-ui-v4130 .sp-messenger-sidebar-head{padding:14px!important;border-bottom:0!important}
body.sp-ui-v4130 .sp-messenger-search{height:42px!important;margin:0 12px 10px!important;padding:0 12px!important;display:flex!important;align-items:center!important;gap:8px!important;border:1px solid var(--sp-ui-line)!important;border-radius:999px!important;background:var(--sp-ui-surface-2)!important}
body.sp-ui-v4130 .sp-messenger-search input{height:38px!important;min-height:0!important;padding:0!important;border:0!important;background:transparent!important;box-shadow:none!important}
body.sp-ui-v4130 .sp-messenger-conversations{flex:1 1 auto!important;min-height:0!important;overflow-y:auto!important;padding:0 7px 10px!important}
body.sp-ui-v4130 .sp-messenger-thread{min-width:0!important;min-height:0!important;background:var(--sp-ui-surface)!important}
body.sp-ui-v4130 .sp-chat-active{height:100%!important;min-height:0!important;display:grid!important;grid-template-rows:62px minmax(0,1fr) auto!important}
body.sp-ui-v4130 .sp-chat-head{display:grid!important;grid-template-columns:auto minmax(0,1fr) auto!important;align-items:center!important;gap:9px!important;padding:8px 12px!important;border-bottom:1px solid var(--sp-ui-line)!important;background:var(--sp-ui-surface)!important}
body.sp-ui-v4130 .sp-chat-person{display:flex!important;align-items:center!important;gap:9px!important;min-width:0!important;text-decoration:none!important}
body.sp-ui-v4130 .sp-chat-person > span:last-child{min-width:0!important}
body.sp-ui-v4130 .sp-chat-person strong,body.sp-ui-v4130 .sp-chat-person small{display:block!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}
body.sp-ui-v4130 .sp-chat-person small{color:var(--sp-ui-muted)!important}
body.sp-ui-v4130 .sp-chat-head-actions{display:flex!important;align-items:center!important;gap:3px!important}
body.sp-ui-v4130 .sp-chat-head-actions button,body.sp-ui-v4130 .sp-chat-back{width:38px!important;height:38px!important;min-width:38px!important;border:0!important;border-radius:12px!important;background:transparent!important;color:var(--sp-ui-primary)!important}
body.sp-ui-v4130 .sp-chat-head-actions button:hover,body.sp-ui-v4130 .sp-chat-back:hover{background:var(--sp-ui-surface-2)!important}
body.sp-ui-v4130 .sp-chat-scroll{min-height:0!important;overflow-y:auto!important;overscroll-behavior:contain!important;padding:14px!important;background:var(--sp-ui-bg)!important}
body.sp-ui-v4130 .sp-chat-composer{display:flex!important;align-items:flex-end!important;gap:6px!important;padding:9px 10px max(9px,env(safe-area-inset-bottom))!important;border-top:1px solid var(--sp-ui-line)!important;background:var(--sp-ui-surface)!important}
body.sp-ui-v4130 .sp-chat-input-wrap{flex:1 1 auto!important;min-width:0!important;padding:8px 12px!important;border-radius:18px!important;background:var(--sp-ui-surface-2)!important}
body.sp-ui-v4130 .sp-chat-input-wrap textarea{width:100%!important;min-height:22px!important;max-height:120px!important;padding:0!important;border:0!important;background:transparent!important;box-shadow:none!important;resize:none!important}
body.sp-ui-v4130 .sp-chat-composer > button{width:38px!important;height:38px!important;min-width:38px!important;display:grid!important;place-items:center!important;border:0!important;border-radius:50%!important;background:transparent!important;color:var(--sp-ui-primary)!important}

/* ---------- Reels ---------- */
body.sp-ui-v4130.sp-reels-route{background:#050607!important}
body.sp-ui-v4130.sp-reels-route .sp-topbar{background:rgba(10,11,13,.9)!important;border-color:#23262b!important}
body.sp-ui-v4130.sp-reels-route .sp-shell{display:block!important;width:100%!important;max-width:none!important;margin:0!important;padding:0!important;background:#050607!important}
body.sp-ui-v4130 .sp-reels-page{width:100%!important;max-width:none!important;margin:0!important;background:#050607!important;color:#fff!important}
body.sp-ui-v4130 .sp-reels-stage{width:100%!important;max-width:560px!important;margin:0 auto!important;min-height:calc(100dvh - var(--sp-ui-topbar))!important;background:#000!important}
body.sp-ui-v4130 .sp-reel-slide{min-height:calc(100dvh - var(--sp-ui-topbar))!important;overflow:hidden!important;background:#000!important}
body.sp-ui-v4130 .sp-reel-card{width:100%!important;height:100%!important;max-width:100%!important;border:0!important;border-radius:0!important;background:#000!important;overflow:hidden!important}
body.sp-ui-v4130 .sp-reel-video,body.sp-ui-v4130 .sp-reel-poster-image{width:100%!important;height:100%!important;object-fit:contain!important;background:#000!important}
body.sp-ui-v4130 .sp-reel-meta,body.sp-ui-v4130 .sp-reel-actions{z-index:5!important}

/* ---------- Live / Live TV ---------- */
body.sp-ui-v4130.sp-live-route .sp-shell{display:block!important;width:min(100%,1180px)!important;max-width:1180px!important}
body.sp-ui-v4130 .sp-live-page{width:100%!important;max-width:1140px!important;margin:0 auto!important}
body.sp-ui-v4130 .sp-live-head{padding:16px!important;margin-bottom:12px!important;border:1px solid var(--sp-ui-line)!important;border-radius:var(--sp-ui-radius)!important;background:var(--sp-ui-surface)!important}
body.sp-ui-v4130 .sp-live-tabs{display:flex!important;gap:6px!important;overflow-x:auto!important;margin-bottom:12px!important;padding:5px!important;border:1px solid var(--sp-ui-line)!important;border-radius:14px!important;background:var(--sp-ui-surface)!important}
body.sp-ui-v4130 .sp-live-tabs a,body.sp-ui-v4130 .sp-live-tabs button{min-height:40px!important;padding:0 13px!important;border:0!important;border-radius:10px!important;background:transparent!important;color:var(--sp-ui-muted)!important;white-space:nowrap!important;font-weight:700!important}
body.sp-ui-v4130 .sp-live-tabs :is(a,button).active{background:var(--sp-ui-primary-soft)!important;color:var(--sp-ui-primary)!important}
body.sp-ui-v4130 .sp-live-tv-layout{display:grid!important;grid-template-columns:320px minmax(0,1fr)!important;gap:12px!important;align-items:start!important}
body.sp-ui-v4130 .sp-live-channel-list{max-height:calc(100dvh - 190px)!important;overflow-y:auto!important}
body.sp-ui-v4130 .sp-live-broadcast-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
body.sp-ui-v4130 .sp-live-studio-dialog{border-color:var(--sp-ui-line)!important;background:var(--sp-ui-surface)!important;color:var(--sp-ui-text)!important}

/* ---------- Professional dashboard ---------- */
body.sp-ui-v4130.sp-dashboard-route .sp-shell{display:block!important;width:100%!important;max-width:none!important;margin:0!important;padding:0 0 94px!important}
body.sp-ui-v4130 .sp-dv-shell{width:100%!important;max-width:none!important;min-height:calc(100dvh - var(--sp-ui-topbar))!important;display:grid!important;grid-template-columns:250px minmax(0,1fr)!important;background:var(--sp-ui-bg)!important;color:var(--sp-ui-text)!important}
body.sp-ui-v4130 .sp-dv-sidebar{position:sticky!important;top:var(--sp-ui-topbar)!important;align-self:start!important;height:calc(100dvh - var(--sp-ui-topbar))!important;overflow-y:auto!important;padding:12px!important;border-right:1px solid var(--sp-ui-line)!important;background:var(--sp-ui-surface)!important;color:var(--sp-ui-text)!important}
body.sp-ui-v4130 .sp-dv-sidebar-head{padding:6px 4px 12px!important}
body.sp-ui-v4130 .sp-dv-nav{display:flex!important;flex-direction:column!important;gap:4px!important;margin:0!important;padding:0!important;overflow-y:auto!important}
body.sp-ui-v4130 .sp-dv-nav > a,body.sp-ui-v4130 .sp-dv-nav-group > button,body.sp-ui-v4130 .sp-dv-nav-group > div a{min-height:42px!important;padding:0 10px!important;border:0!important;border-radius:11px!important;background:transparent!important;color:var(--sp-ui-muted)!important;text-decoration:none!important}
body.sp-ui-v4130 .sp-dv-nav > a.active,body.sp-ui-v4130 .sp-dv-nav-group > div a.active{background:var(--sp-ui-primary-soft)!important;color:var(--sp-ui-primary)!important}
body.sp-ui-v4130 .sp-dv-workspace{width:100%!important;max-width:1180px!important;min-width:0!important;margin:0 auto!important;padding:18px!important;background:transparent!important;color:var(--sp-ui-text)!important}
body.sp-ui-v4130 .sp-fbpd-home{width:100%!important;max-width:1040px!important;margin:0 auto!important;display:grid!important;grid-template-columns:minmax(0,1fr) 280px!important;gap:14px!important;color:var(--sp-ui-text)!important}
body.sp-ui-v4130 .sp-fbpd-home-main,body.sp-ui-v4130 .sp-fbpd-home-rail{min-width:0!important;display:grid!important;gap:12px!important;align-content:start!important}
body.sp-ui-v4130 .sp-fbpd-card{overflow:hidden!important}
body.sp-ui-v4130 .sp-fbpd-card-head{display:flex!important;align-items:flex-start!important;justify-content:space-between!important;gap:12px!important;padding:14px!important}
body.sp-ui-v4130 .sp-fbpd-card-head :is(h1,h2){margin:0!important;color:var(--sp-ui-text)!important;font-size:19px!important;line-height:1.2!important}
body.sp-ui-v4130 .sp-fbpd-card-head p{margin:4px 0 0!important;color:var(--sp-ui-muted)!important;font-size:12px!important;line-height:1.4!important}
body.sp-ui-v4130 .sp-fbpd-metrics{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:8px!important;padding:0 14px 12px!important}
body.sp-ui-v4130 .sp-fbpd-metrics > a{min-width:0!important;min-height:84px!important;padding:11px!important;border:1px solid var(--sp-ui-line)!important;border-radius:13px!important;background:var(--sp-ui-surface)!important;color:var(--sp-ui-text)!important;text-decoration:none!important}
body.sp-ui-v4130 .sp-fbpd-metrics > a.active{border-color:var(--sp-ui-primary)!important;box-shadow:inset 0 0 0 1px var(--sp-ui-primary)!important}
body.sp-ui-v4130 .sp-fbpd-chart{width:100%!important;overflow:hidden!important;padding:0 12px 12px!important}
body.sp-ui-v4130 .sp-fbpd-chart svg,body.sp-ui-v4130 .sp-dash-chart-svg{display:block!important;width:100%!important;height:auto!important;max-width:100%!important}
body.sp-ui-v4130 .sp-dv-page-head{display:flex!important;align-items:flex-start!important;justify-content:space-between!important;gap:12px!important;margin-bottom:12px!important}
body.sp-ui-v4130 .sp-dv-page-head h1{margin:0!important;color:var(--sp-ui-text)!important;font-size:24px!important}
body.sp-ui-v4130 .sp-dv-page-head p{color:var(--sp-ui-muted)!important}
body.sp-ui-v4130 .sp-dv-tabs{display:flex!important;gap:4px!important;overflow-x:auto!important;border-bottom:1px solid var(--sp-ui-line)!important}
body.sp-ui-v4130 .sp-dv-tabs button{min-height:42px!important;padding:0 12px!important;border:0!important;border-bottom:2px solid transparent!important;background:transparent!important;color:var(--sp-ui-muted)!important;white-space:nowrap!important;font-size:12px!important;font-weight:700!important}
body.sp-ui-v4130 .sp-dv-tabs button.active{color:var(--sp-ui-primary)!important;border-bottom-color:var(--sp-ui-primary)!important}
body.sp-ui-v4130 .sp-dv-table-wrap{width:100%!important;max-width:100%!important;overflow-x:auto!important}

/* ---------- Modals / popovers / drawers ---------- */
body.sp-ui-v4130 :is(.sp-modal-card,.sp-share-dialog,.sp-comments-dialog,.sp-live-studio-dialog,.sp-ad-wallet-dialog,.sp-popover,.sp-notifications-popover){border:1px solid var(--sp-ui-line)!important;border-radius:20px!important;background:var(--sp-ui-surface)!important;color:var(--sp-ui-text)!important;box-shadow:0 24px 70px rgba(0,0,0,.22)!important;overflow:hidden!important}
body.sp-ui-v4130 :is(.sp-modal-head,.sp-share-head,.sp-comments-dialog-head,.sp-live-studio-head){border-bottom:1px solid var(--sp-ui-line)!important;background:var(--sp-ui-surface)!important}
body.sp-ui-v4130 .sp-mobile-drawer{background:var(--sp-ui-surface)!important;color:var(--sp-ui-text)!important;border-color:var(--sp-ui-line)!important}
body.sp-ui-v4130 .sp-mobile-drawer-profile a,body.sp-ui-v4130 .sp-mobile-menu-grid a{border:1px solid var(--sp-ui-line)!important;border-radius:14px!important;background:var(--sp-ui-surface-2)!important;color:var(--sp-ui-text)!important;box-shadow:none!important}

/* ---------- Bottom nav ---------- */
body.sp-ui-v4130 .sp-mobile-nav{display:none!important}

/* ========================================================================== 
   TABLET
   ========================================================================== */
@media (max-width:1180px) and (min-width:801px){
  body.sp-ui-v4130 .sp-topbar-inner{grid-template-columns:190px minmax(240px,360px) 1fr!important;padding-inline:14px!important}
  body.sp-ui-v4130 .sp-shell{width:min(100%,980px)!important;grid-template-columns:220px minmax(0,var(--sp-ui-feed))!important;gap:18px!important}
  body.sp-ui-v4130 .sp-right{display:none!important}
  body.sp-ui-v4130 .sp-profile-main-grid{grid-template-columns:300px minmax(0,1fr)!important}
  body.sp-ui-v4130 .sp-group-grid,body.sp-ui-v4130 .sp-page-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}

/* ========================================================================== 
   MOBILE
   ========================================================================== */
@media (max-width:800px){
  :root{--sp-ui-topbar:60px;--sp-ui-bottomnav:70px;--sp-ui-edge:10px}
  body.sp-ui-v4130.admin-bar .sp-topbar{top:46px!important}

  /* Header: logo / menu / flexible search only. */
  body.sp-ui-v4130 .sp-topbar{min-height:var(--sp-ui-topbar)!important}
  body.sp-ui-v4130 .sp-topbar-inner{
    width:100%!important;max-width:760px!important;min-height:var(--sp-ui-topbar)!important;
    margin:0 auto!important;padding:7px max(10px,env(safe-area-inset-right)) 7px max(10px,env(safe-area-inset-left))!important;
    grid-template-columns:42px 42px minmax(0,1fr)!important;gap:7px!important;
  }
  body.sp-ui-v4130 .sp-brand{width:42px!important;height:42px!important;overflow:visible!important}
  body.sp-ui-v4130 .sp-brand-mark{width:42px!important;height:42px!important;min-width:42px!important;border-radius:13px!important}
  body.sp-ui-v4130 .sp-brand-text{display:none!important}
  body.sp-ui-v4130 .sp-mobile-menu-toggle{display:grid!important;place-items:center!important;width:42px!important;height:42px!important;min-width:42px!important;margin:0!important;padding:0!important;border:1px solid var(--sp-ui-line)!important;border-radius:13px!important;background:var(--sp-ui-surface-2)!important;color:var(--sp-ui-text)!important;box-shadow:none!important}
  body.sp-ui-v4130 .sp-search{height:42px!important;padding:0 12px!important;min-width:0!important}
  body.sp-ui-v4130 .sp-search input{height:38px!important;font-size:16px!important}
  body.sp-ui-v4130 .sp-nav-icons{display:none!important}

  /* Normal page geometry. */
  body.sp-ui-v4130 .sp-shell{
    width:100%!important;max-width:760px!important;margin:0 auto!important;
    padding:10px 8px calc(var(--sp-ui-bottomnav) + 24px + env(safe-area-inset-bottom))!important;
    display:block!important;
  }
  body.sp-ui-v4130 :is(.sp-left,.sp-right){display:none!important}
  body.sp-ui-v4130 .sp-feed{width:100%!important;max-width:none!important;margin:0!important}
  body.sp-ui-v4130 :is(.sp-stories,.sp-composer,.sp-post-card,.sp-widget,.sp-empty,.sp-view-head,.sp-profile-card,.sp-profile-wide-card,.sp-person-card,.sp-friend-result,.sp-notifications-page-card,.sp-settings-card,.sp-group-card,.sp-group-about-card,.sp-group-members-card,.sp-group-settings-card,.sp-group-recent-media-card,.sp-page-card){border-radius:18px!important;box-shadow:none!important}

  /* Bottom nav has reserved space and cannot cover cards. */
  body.sp-ui-v4130 .sp-mobile-nav{
    position:fixed!important;z-index:1600!important;
    left:max(8px,env(safe-area-inset-left))!important;right:max(8px,env(safe-area-inset-right))!important;bottom:max(8px,env(safe-area-inset-bottom))!important;
    width:auto!important;max-width:744px!important;min-height:64px!important;height:auto!important;margin:0 auto!important;padding:4px!important;
    display:grid!important;grid-template-columns:repeat(var(--sp-mobile-nav-cols,5),minmax(0,1fr))!important;align-items:stretch!important;
    border:1px solid var(--sp-ui-line)!important;border-radius:22px!important;background:color-mix(in srgb,var(--sp-ui-surface) 96%,transparent)!important;
    box-shadow:0 10px 30px rgba(16,24,40,.12)!important;backdrop-filter:blur(14px)!important;
  }
  body.sp-ui-v4130 .sp-mobile-nav a{min-width:0!important;min-height:56px!important;padding:5px 1px!important;display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:3px!important;border-radius:15px!important;color:var(--sp-ui-muted)!important;text-decoration:none!important;overflow:hidden!important}
  body.sp-ui-v4130 .sp-mobile-nav a .sp-icon{width:23px!important;height:23px!important}
  body.sp-ui-v4130 .sp-mobile-nav a small{max-width:100%!important;font-size:10.5px!important;font-weight:700!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}
  body.sp-ui-v4130 .sp-mobile-nav a.active{background:var(--sp-ui-primary-soft)!important;color:var(--sp-ui-primary)!important}

  /* Feed cleanup. */
  body.sp-ui-v4130 .sp-stories{padding:12px!important}
  body.sp-ui-v4130 :is(.sp-story-create,.sp-story-card){flex-basis:106px!important;width:106px!important;min-width:106px!important}
  body.sp-ui-v4130 .sp-composer{padding:12px!important}
  body.sp-ui-v4130 .sp-post-head{padding:12px 12px 7px!important}
  body.sp-ui-v4130 .sp-post-public-title{margin-inline:12px!important}
  body.sp-ui-v4130 .sp-post-text{padding-inline:12px!important;font-size:15px!important}
  body.sp-ui-v4130 .sp-social-stats{padding-inline:12px!important}
  body.sp-ui-v4130 .sp-actions{padding-inline:8px!important}
  body.sp-ui-v4130 .sp-actions button span{font-size:13px!important}
  body.sp-ui-v4130 .sp-recommended-list,body.sp-ui-v4130 .sp-recommended-grid{padding:10px!important;gap:9px!important}
  body.sp-ui-v4130 .sp-recommended-card{flex-basis:158px!important;width:158px!important;min-width:158px!important;max-width:158px!important}
  body.sp-ui-v4130 .sp-recommended-photo{height:154px!important}

  /* Generic pages. */
  body.sp-ui-v4130 .sp-app-page{max-width:none!important}
  body.sp-ui-v4130 .sp-app-page-head{padding:14px!important;border-radius:18px!important;gap:10px!important}
  body.sp-ui-v4130 .sp-app-page-head h1{font-size:22px!important}
  body.sp-ui-v4130 .sp-app-page-head p{font-size:13px!important}
  body.sp-ui-v4130 .sp-friend-result{align-items:flex-start!important;flex-wrap:wrap!important}

  /* Profile stacks cleanly. */
  body.sp-ui-v4130.sp-profile-route .sp-shell{max-width:760px!important;padding:10px 8px calc(var(--sp-ui-bottomnav) + 24px + env(safe-area-inset-bottom))!important}
  body.sp-ui-v4130 .sp-profile-cover{min-height:180px!important;max-height:220px!important}
  body.sp-ui-v4130 .sp-profile-identity{grid-template-columns:112px minmax(0,1fr)!important;gap:12px!important;padding:0 14px 14px!important;margin-top:-48px!important;align-items:end!important}
  body.sp-ui-v4130 .sp-profile-avatar-wrap{width:112px!important;height:112px!important;min-width:112px!important;border-width:4px!important}
  body.sp-ui-v4130 .sp-profile-actions{grid-column:1/-1!important;width:100%!important;padding:6px 0 0!important}
  body.sp-ui-v4130 .sp-profile-actions > *{flex:1 1 auto!important;justify-content:center!important}
  body.sp-ui-v4130 .sp-profile-name-block h1{font-size:23px!important}
  body.sp-ui-v4130 .sp-profile-main-grid{display:block!important;margin-top:10px!important}
  body.sp-ui-v4130 :is(.sp-profile-card,.sp-profile-wide-card){padding:14px!important}

  /* Settings is its own clean app screen. */
  body.sp-ui-v4130.sp-settings-route-v4120 .sp-topbar,body.sp-ui-v4130.sp-settings-route-v4120 .sp-mobile-nav{display:none!important}
  body.sp-ui-v4130.sp-settings-route-v4120 .sp-shell{width:100%!important;max-width:680px!important;min-height:100dvh!important;margin:0 auto!important;padding:0!important;background:var(--sp-ui-bg)!important}
  body.sp-ui-v4130.sp-settings-route-v4120 .sp-settings-page{width:100%!important;max-width:680px!important;min-height:100dvh!important;margin:0 auto!important;padding:0 12px calc(24px + env(safe-area-inset-bottom))!important;background:var(--sp-ui-bg)!important}
  body.sp-ui-v4130.sp-settings-route-v4120 .sp-settings-page-head{display:none!important}
  body.sp-ui-v4130.sp-settings-route-v4120 .sp-settings-mobile-app{display:block!important}
  body.sp-ui-v4130.sp-settings-route-v4120 .sp-settings-mobile-head{position:sticky!important;top:0!important;z-index:50!important;min-height:68px!important;height:68px!important;margin:0!important;padding:8px 0!important;display:grid!important;grid-template-columns:44px minmax(0,1fr) 44px!important;align-items:center!important;gap:8px!important;background:color-mix(in srgb,var(--sp-ui-bg) 95%,transparent)!important;backdrop-filter:blur(12px)!important}
  body.sp-ui-v4130.sp-settings-route-v4120 .sp-settings-mobile-head h1{margin:0!important;text-align:center!important;font-size:21px!important;font-weight:750!important;color:var(--sp-ui-text)!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}
  body.sp-ui-v4130.sp-settings-route-v4120 .sp-settings-mobile-head button{width:44px!important;height:44px!important;min-width:44px!important;padding:0!important;border:1px solid var(--sp-ui-line)!important;border-radius:50%!important;background:var(--sp-ui-surface)!important;color:var(--sp-ui-text)!important;display:grid!important;place-items:center!important;box-shadow:none!important}
  body.sp-ui-v4130.sp-settings-route-v4120 .sp-settings-mobile-search{height:50px!important;margin:2px 0 14px!important;padding:0 14px!important;border:1px solid var(--sp-ui-line)!important;border-radius:999px!important;background:var(--sp-ui-surface)!important;color:var(--sp-ui-text)!important}
  body.sp-ui-v4130.sp-settings-route-v4120 .sp-settings-mobile-search input{height:46px!important;min-height:0!important;padding:0!important;border:0!important;background:transparent!important;box-shadow:none!important}
  body.sp-ui-v4130.sp-settings-route-v4120 .sp-settings-mobile-group{margin-bottom:18px!important}
  body.sp-ui-v4130.sp-settings-route-v4120 .sp-settings-mobile-group h2{margin:0 0 7px!important;padding:0 10px!important;color:var(--sp-ui-muted)!important;font-size:12px!important;font-weight:750!important}
  body.sp-ui-v4130.sp-settings-route-v4120 .sp-settings-mobile-list{border:1px solid var(--sp-ui-line)!important;border-radius:16px!important;background:var(--sp-ui-surface)!important;overflow:hidden!important;box-shadow:none!important}
  body.sp-ui-v4130.sp-settings-route-v4120 .sp-settings-mobile-list > :is(button,a){min-height:62px!important;padding:10px 12px!important;background:transparent!important;color:var(--sp-ui-text)!important}
  body.sp-ui-v4130.sp-settings-route-v4120 .sp-settings-grid{display:none!important}
  body.sp-ui-v4130.sp-settings-route-v4120 .sp-settings-page.is-mobile-detail-open .sp-settings-mobile-overview{display:none!important}
  body.sp-ui-v4130.sp-settings-route-v4120 .sp-settings-page.is-mobile-detail-open .sp-settings-grid{display:block!important}
  body.sp-ui-v4130.sp-settings-route-v4120 .sp-settings-page.is-mobile-detail-open .sp-settings-nav{display:none!important}
  body.sp-ui-v4130.sp-settings-route-v4120 .sp-settings-page.is-mobile-detail-open .sp-settings-card{display:none!important}
  body.sp-ui-v4130.sp-settings-route-v4120 .sp-settings-page.is-mobile-detail-open .sp-settings-card.is-mobile-active-section{display:block!important}
  body.sp-ui-v4130.sp-settings-route-v4120 .sp-settings-card{padding:14px!important;margin:0 0 12px!important;border-radius:17px!important}
  body.sp-ui-v4130.sp-settings-route-v4120 .sp-settings-section-head{margin:0 0 12px!important;padding:0 0 12px!important}
  body.sp-ui-v4130.sp-settings-route-v4120 .sp-settings-section-head h2{display:none!important}
  body.sp-ui-v4130.sp-settings-route-v4120 .sp-settings-section-icon{display:none!important}
  body.sp-ui-v4130.sp-settings-route-v4120 .sp-settings-section-head p{margin:0!important;font-size:13px!important}
  body.sp-ui-v4130.sp-settings-route-v4120 .sp-settings-form{padding:0!important;background:transparent!important;border:0!important}
  body.sp-ui-v4130.sp-settings-route-v4120 .sp-form-two{grid-template-columns:1fr!important;gap:0!important}
  body.sp-ui-v4130.sp-settings-route-v4120 .sp-profile-cover-preview{min-height:160px!important}
  body.sp-ui-v4130.sp-settings-route-v4120 .sp-profile-photo-editor{grid-template-columns:90px minmax(0,1fr)!important}

  /* Groups / pages stack. */
  body.sp-ui-v4130.sp-group-route .sp-shell,body.sp-ui-v4130.sp-pages-route .sp-shell{max-width:760px!important;padding:10px 8px calc(var(--sp-ui-bottomnav) + 24px + env(safe-area-inset-bottom))!important}
  body.sp-ui-v4130 .sp-group-grid,body.sp-ui-v4130 .sp-page-grid{grid-template-columns:1fr!important}
  body.sp-ui-v4130 .sp-group-content-grid{grid-template-columns:1fr!important}
  body.sp-ui-v4130 .sp-group-sidebar{display:grid!important;gap:10px!important}

  /* Messenger becomes one-pane on phones. */
  body.sp-ui-v4130.sp-messages-route .sp-shell{width:100%!important;max-width:none!important;padding:0 0 calc(var(--sp-ui-bottomnav) + 10px + env(safe-area-inset-bottom))!important}
  body.sp-ui-v4130 .sp-messages-page{max-width:none!important}
  body.sp-ui-v4130 .sp-messenger-shell{height:calc(100dvh - var(--sp-ui-topbar) - var(--sp-ui-bottomnav) - 12px)!important;min-height:0!important;display:block!important;border-radius:0!important;border-left:0!important;border-right:0!important;box-shadow:none!important}
  body.sp-ui-v4130 .sp-messenger-sidebar{width:100%!important;height:100%!important;border-right:0!important}
  body.sp-ui-v4130 .sp-messenger-thread{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;background:var(--sp-ui-surface)!important}
  body.sp-ui-v4130 .sp-messages-page:not(.has-active-chat) .sp-messenger-thread{display:none!important}
  body.sp-ui-v4130 .sp-messages-page.has-active-chat .sp-messenger-sidebar{display:none!important}
  body.sp-ui-v4130 .sp-chat-active{height:100%!important;grid-template-rows:58px minmax(0,1fr) auto!important}
  body.sp-ui-v4130 .sp-chat-head{padding:6px 8px!important}
  body.sp-ui-v4130 .sp-chat-head-actions button{width:34px!important;height:34px!important;min-width:34px!important}
  body.sp-ui-v4130 .sp-chat-head-actions button:nth-of-type(n+4){display:none!important}

  /* Reels ignores normal bottom spacing; bottom nav overlays safely. */
  body.sp-ui-v4130.sp-reels-route .sp-mobile-nav{background:rgba(18,20,24,.88)!important;border-color:#30343a!important}
  body.sp-ui-v4130.sp-reels-route .sp-mobile-nav a{color:#b9c0ca!important}
  body.sp-ui-v4130.sp-reels-route .sp-mobile-nav a.active{background:#233b5b!important;color:#6eaaff!important}
  body.sp-ui-v4130 .sp-reels-stage{max-width:none!important;min-height:calc(100dvh - var(--sp-ui-topbar))!important}
  body.sp-ui-v4130 .sp-reel-slide{min-height:calc(100dvh - var(--sp-ui-topbar))!important;padding-bottom:calc(var(--sp-ui-bottomnav) + 4px)!important}

  /* Live. */
  body.sp-ui-v4130.sp-live-route .sp-shell{max-width:760px!important}
  body.sp-ui-v4130 .sp-live-tv-layout{grid-template-columns:1fr!important}
  body.sp-ui-v4130 .sp-live-channel-list{max-height:none!important;overflow:visible!important}
  body.sp-ui-v4130 .sp-live-broadcast-grid{grid-template-columns:1fr!important}
  body.sp-ui-v4130 .sp-live-studio-dialog{width:calc(100vw - 14px)!important;max-height:calc(100dvh - 14px)!important;border-radius:18px!important}
  body.sp-ui-v4130 .sp-live-studio-body{grid-template-columns:1fr!important;overflow-y:auto!important}

  /* Dashboard: no nested vertical scrollbar, no blank gap, no collisions. */
  body.sp-ui-v4130.sp-dashboard-route .sp-shell{width:100%!important;max-width:none!important;padding:0 0 calc(var(--sp-ui-bottomnav) + 16px + env(safe-area-inset-bottom))!important}
  body.sp-ui-v4130 .sp-dv-shell{display:block!important;min-height:0!important}
  body.sp-ui-v4130 .sp-dv-sidebar{position:sticky!important;top:var(--sp-ui-topbar)!important;z-index:100!important;width:100%!important;height:auto!important;max-height:none!important;padding:6px 8px!important;overflow:visible!important;border-right:0!important;border-bottom:1px solid var(--sp-ui-line)!important;background:var(--sp-ui-surface)!important}
  body.sp-ui-v4130 .sp-dv-sidebar-head{display:none!important}
  body.sp-ui-v4130 .sp-dv-nav{display:flex!important;flex-direction:row!important;align-items:center!important;gap:5px!important;overflow-x:auto!important;overflow-y:hidden!important;padding:0!important}
  body.sp-ui-v4130 .sp-dv-nav > a,body.sp-ui-v4130 .sp-dv-nav-group > button{flex:0 0 auto!important;min-width:max-content!important;min-height:42px!important;padding:0 10px!important;display:flex!important;align-items:center!important;gap:7px!important;white-space:nowrap!important}
  body.sp-ui-v4130 .sp-dv-nav-group{position:relative!important;flex:0 0 auto!important}
  body.sp-ui-v4130 .sp-dv-nav-group > div{position:absolute!important;top:46px!important;left:0!important;z-index:120!important;width:210px!important;max-height:260px!important;overflow-y:auto!important;padding:5px!important;border:1px solid var(--sp-ui-line)!important;border-radius:13px!important;background:var(--sp-ui-surface)!important;box-shadow:0 14px 34px rgba(0,0,0,.16)!important}
  body.sp-ui-v4130 .sp-dv-workspace{max-width:760px!important;padding:12px 8px 18px!important}
  body.sp-ui-v4130 .sp-fbpd-home{display:block!important;max-width:none!important}
  body.sp-ui-v4130 .sp-fbpd-home-main,body.sp-ui-v4130 .sp-fbpd-home-rail{display:grid!important;gap:10px!important}
  body.sp-ui-v4130 .sp-fbpd-home-rail{margin-top:10px!important}
  body.sp-ui-v4130 .sp-fbpd-card-head{padding:12px!important;flex-wrap:wrap!important}
  body.sp-ui-v4130 .sp-fbpd-card-actions{width:100%!important;display:flex!important;align-items:center!important;justify-content:space-between!important;gap:8px!important;flex-wrap:wrap!important}
  body.sp-ui-v4130 .sp-fbpd-card-actions button{min-height:38px!important;flex:1 1 210px!important;border-radius:11px!important}
  body.sp-ui-v4130 .sp-fbpd-metrics{grid-template-columns:1fr!important;padding:0 12px 12px!important}
  body.sp-ui-v4130 .sp-fbpd-content-row{display:block!important;padding:0 12px 12px!important}
  body.sp-ui-v4130 .sp-fbpd-content-thumb{width:100%!important;min-height:170px!important;margin-bottom:10px!important;border-radius:14px!important}
  body.sp-ui-v4130 .sp-fbpd-content-stats{display:grid!important;grid-template-columns:1fr!important;gap:7px!important}
  body.sp-ui-v4130 .sp-dv-page-head h1{font-size:21px!important}
  body.sp-ui-v4130 .sp-dv-table-wrap{overflow-x:auto!important;overflow-y:visible!important}

  /* Modal geometry. */
  body.sp-ui-v4130 :is(.sp-share-dialog,.sp-comments-dialog,.sp-live-studio-dialog,.sp-ad-wallet-dialog,.sp-modal-card){max-width:calc(100vw - 16px)!important;max-height:calc(100dvh - 16px)!important;margin:auto!important}
}

@media (max-width:430px){
  body.sp-ui-v4130 .sp-shell{padding-left:6px!important;padding-right:6px!important}
  body.sp-ui-v4130 .sp-topbar-inner{grid-template-columns:40px 40px minmax(0,1fr)!important;padding-left:7px!important;padding-right:7px!important}
  body.sp-ui-v4130 .sp-brand,body.sp-ui-v4130 .sp-brand-mark,body.sp-ui-v4130 .sp-mobile-menu-toggle{width:40px!important;height:40px!important;min-width:40px!important}
  body.sp-ui-v4130 .sp-search{height:40px!important;padding-inline:10px!important}
  body.sp-ui-v4130 .sp-mobile-nav{left:6px!important;right:6px!important;bottom:max(6px,env(safe-area-inset-bottom))!important;border-radius:20px!important}
  body.sp-ui-v4130 .sp-mobile-nav a small{font-size:10px!important}
  body.sp-ui-v4130 .sp-profile-identity{grid-template-columns:96px minmax(0,1fr)!important;margin-top:-40px!important}
  body.sp-ui-v4130 .sp-profile-avatar-wrap{width:96px!important;height:96px!important;min-width:96px!important}
  body.sp-ui-v4130 .sp-profile-name-block h1{font-size:21px!important}
  body.sp-ui-v4130.sp-settings-route-v4120 .sp-profile-photo-editor{grid-template-columns:1fr!important;text-align:center!important;justify-items:center!important}
  body.sp-ui-v4130.sp-settings-route-v4120 .sp-profile-photo-actions{justify-content:center!important}
}

/* ---------- Dark mode final contrast layer ---------- */
html.sp-theme-dark-root body.sp-theme-dark.sp-ui-v4130,
body.sp-theme-dark.sp-ui-v4130{background:var(--sp-ui-bg)!important;color:var(--sp-ui-text)!important}
body.sp-theme-dark.sp-ui-v4130 .sp-topbar{background:rgba(27,30,33,.94)!important}
body.sp-theme-dark.sp-ui-v4130 :is(.sp-post-card,.sp-composer,.sp-stories,.sp-widget,.sp-empty,.sp-view-head,.sp-profile-card,.sp-profile-wide-card,.sp-profile-hero,.sp-person-card,.sp-friend-result,.sp-notifications-page-card,.sp-settings-card,.sp-group-card,.sp-group-profile,.sp-group-about-card,.sp-group-members-card,.sp-group-settings-card,.sp-group-recent-media-card,.sp-page-card,.sp-page-profile,.sp-live-player-card,.sp-live-channel-panel,.sp-live-active-card,.sp-fbpd-card,.sp-pd-card,.sp-dv-card,.sp-mobile-nav,.sp-mobile-drawer,.sp-messenger-shell,.sp-messenger-sidebar,.sp-messenger-thread){background:var(--sp-ui-surface)!important;color:var(--sp-ui-text)!important;border-color:var(--sp-ui-line)!important}
body.sp-theme-dark.sp-ui-v4130 :is(.sp-search,.sp-composer-prompt,.sp-chat-input-wrap,.sp-messenger-search,.sp-settings-mobile-search,.sp-side-card,.sp-profile-cover-editor,.sp-profile-photo-editor,.sp-call-push-panel){background:var(--sp-ui-surface-2)!important;border-color:var(--sp-ui-line)!important}
body.sp-theme-dark.sp-ui-v4130 :is(input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=hidden]),textarea,select){background:var(--sp-ui-surface-2)!important;color:var(--sp-ui-text)!important;border-color:var(--sp-ui-line)!important;-webkit-text-fill-color:var(--sp-ui-text)!important}
body.sp-theme-dark.sp-ui-v4130 :is(.sp-post-meta>span,.sp-post-meta span,.sp-social-stats,.sp-side-link,.sp-app-page-head p,.sp-settings-section-head p,.sp-profile-name-block p,.sp-profile-name-block span,.sp-chat-person small,.sp-fbpd-card-head p){color:var(--sp-ui-muted)!important}
body.sp-theme-dark.sp-ui-v4130 .sp-chat-scroll{background:#14171a!important}
body.sp-theme-dark.sp-ui-v4130 .sp-reel-card{background:#000!important}
body.sp-theme-dark.sp-ui-v4130 .sp-mobile-nav{background:rgba(27,30,33,.95)!important;box-shadow:0 10px 30px rgba(0,0,0,.32)!important}
body.sp-theme-dark.sp-ui-v4130 .sp-settings-mobile-head{background:rgba(17,19,21,.94)!important}
body.sp-theme-dark.sp-ui-v4130 .sp-dv-sidebar{background:var(--sp-ui-surface)!important;color:var(--sp-ui-text)!important;border-color:var(--sp-ui-line)!important}

/* Utility: prevent stale legacy body locks from hiding normal-page scroll. */
body.sp-ui-v4130:not(.sp-messages-route):not(.sp-reels-route):not(.sp-settings-route-v4120){min-height:100dvh!important}

/* ---------- Final responsive collision guards ---------- */
body.sp-ui-v4130 .sp-messenger-shell{position:relative!important}

@media (min-width:801px) and (max-width:1040px){
  body.sp-ui-v4130 .sp-topbar-inner{grid-template-columns:48px minmax(170px,1fr) auto!important;gap:9px!important;padding-inline:10px!important}
  body.sp-ui-v4130 .sp-brand{width:42px!important}
  body.sp-ui-v4130 .sp-brand-text{display:none!important}
  body.sp-ui-v4130 .sp-nav-icons{gap:3px!important}
  body.sp-ui-v4130 .sp-nav-icons > :is(a,button),body.sp-ui-v4130 .sp-notifications-nav{width:36px!important;height:36px!important;min-width:36px!important;min-height:36px!important;border-radius:11px!important}
}

@media (max-width:800px){
  body.sp-ui-v4130:not(.logged-in) .sp-topbar-inner{grid-template-columns:42px minmax(0,1fr)!important}
  body.sp-ui-v4130:not(.logged-in) .sp-search{grid-column:2!important}
}

/* Remove all legacy green/mint Settings accents. */
body.sp-ui-v4130.sp-settings-route-v4120 .sp-settings-mobile-row-icon{background:var(--sp-ui-primary-soft)!important;color:var(--sp-ui-primary)!important}
body.sp-ui-v4130.sp-settings-route-v4120 .sp-settings-mobile-list > :is(button,a):active{background:var(--sp-ui-primary-soft)!important}
body.sp-ui-v4130.sp-settings-route-v4120 .sp-appearance-option.is-selected{border-color:var(--sp-ui-primary)!important;background:var(--sp-ui-primary-soft)!important}
body.sp-ui-v4130.sp-settings-route-v4120 .sp-settings-no-results{background:var(--sp-ui-surface)!important;color:var(--sp-ui-muted)!important}
body.sp-ui-v4130.sp-settings-route-v4120 .sp-settings-mobile-help{background:var(--sp-ui-surface)!important;border-color:var(--sp-ui-line)!important;color:var(--sp-ui-muted)!important}
/* ========================================================================== 
   TwittSocial V4.13.2 — mobile/header/search/profile/settings/chat refinement
   Built to clean collisions and polish layout while preserving all features.
   Influenced by official Material-style mobile app bar/search/bottom-nav patterns.
   ========================================================================== */

:root{
  --sp-ui-strong-shadow:0 10px 28px rgba(16,24,40,.08);
}

/* Dark mode refinement */
html.sp-theme-dark-root body.sp-ui-v4130.sp-theme-dark,
body.sp-ui-v4130.sp-theme-dark{
  --sp-ui-bg:#0f1115;
  --sp-ui-surface:#171a1f;
  --sp-ui-surface-2:#1d2127;
  --sp-ui-surface-3:#242932;
  --sp-ui-text:#f1f5f9;
  --sp-ui-muted:#b7c0cb;
  --sp-ui-faint:#8f99a6;
  --sp-ui-line:#2c313a;
  --sp-ui-primary:#4f9dff;
  --sp-ui-primary-soft:rgba(79,157,255,.15);
  --sp-ui-shadow:none;
}
body.sp-ui-v4130.sp-theme-dark .sp-topbar,
body.sp-ui-v4130.sp-theme-dark .sp-mobile-nav,
body.sp-ui-v4130.sp-theme-dark .sp-messenger-shell,
body.sp-ui-v4130.sp-theme-dark .sp-chat-head,
body.sp-ui-v4130.sp-theme-dark .sp-chat-compose,
body.sp-ui-v4130.sp-theme-dark .sp-mobile-drawer{
  background:color-mix(in srgb,var(--sp-ui-surface) 94%,transparent)!important;
}
body.sp-ui-v4130.sp-theme-dark .sp-search,
body.sp-ui-v4130.sp-theme-dark .sp-composer-prompt,
body.sp-ui-v4130.sp-theme-dark .sp-composer textarea,
body.sp-ui-v4130.sp-theme-dark .sp-chat-compose textarea,
body.sp-ui-v4130.sp-theme-dark .sp-chat-compose input,
body.sp-ui-v4130.sp-theme-dark .sp-settings-mobile-search,
body.sp-ui-v4130.sp-theme-dark .sp-mobile-menu-toggle,
body.sp-ui-v4130.sp-theme-dark .sp-nav-icons > a,
body.sp-ui-v4130.sp-theme-dark .sp-notifications-nav{
  background:var(--sp-ui-surface-2)!important;
  border-color:var(--sp-ui-line)!important;
  color:var(--sp-ui-text)!important;
}

/* Strong collision protection */
body.sp-ui-v4130 .sp-topbar-inner,
body.sp-ui-v4130 .sp-profile-identity,
body.sp-ui-v4130 .sp-profile-main-grid,
body.sp-ui-v4130 .sp-post-head,
body.sp-ui-v4130 .sp-chat-head,
body.sp-ui-v4130 .sp-call-push-actions,
body.sp-ui-v4130 .sp-settings-mobile-head,
body.sp-ui-v4130 .sp-mobile-menu-grid,
body.sp-ui-v4130 .sp-social-stats,
body.sp-ui-v4130 .sp-notification-setting-row{min-width:0!important}
body.sp-ui-v4130 :is(.sp-post-text,.sp-profile-name-block,.sp-chat-head-copy,.sp-call-push-copy,.sp-mobile-menu-grid a,.sp-settings-mobile-list > a,.sp-settings-mobile-list > button,.sp-notification-setting-row > span){overflow-wrap:anywhere}

/* Search / topbar / menu polish */
body.sp-ui-v4130 .sp-search{
  position:relative!important;
  transition:border-color .18s ease, box-shadow .18s ease, background .18s ease!important;
}
body.sp-ui-v4130 .sp-search:focus-within{
  border-color:color-mix(in srgb,var(--sp-ui-primary) 40%, var(--sp-ui-line))!important;
  box-shadow:0 0 0 3px color-mix(in srgb,var(--sp-ui-primary) 14%, transparent)!important;
}
body.sp-ui-v4130 .sp-search input{width:100%!important;color:var(--sp-ui-text)!important}
body.sp-ui-v4130 .sp-search input::placeholder{color:var(--sp-ui-faint)!important}
body.sp-ui-v4130 .sp-mobile-menu-toggle{
  border:1px solid var(--sp-ui-line)!important;
  border-radius:16px!important;
  background:var(--sp-ui-surface-2)!important;
  color:var(--sp-ui-text)!important;
}
body.sp-ui-v4130 .sp-mobile-drawer{
  border-right:1px solid var(--sp-ui-line)!important;
  box-shadow:var(--sp-ui-strong-shadow)!important;
}
body.sp-ui-v4130 .sp-mobile-menu-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important}
body.sp-ui-v4130 .sp-mobile-menu-grid a{
  min-height:74px!important;
  padding:12px!important;
  border:1px solid var(--sp-ui-line)!important;
  border-radius:18px!important;
  background:var(--sp-ui-surface)!important;
}
body.sp-ui-v4130 .sp-mobile-menu-grid a.is-active{background:var(--sp-ui-primary-soft)!important;border-color:color-mix(in srgb,var(--sp-ui-primary) 28%, var(--sp-ui-line))!important;color:var(--sp-ui-primary)!important}
body.sp-ui-v4130 .sp-mobile-menu-section-toggle{border-radius:14px!important}

/* Cleaner cards and controls */
body.sp-ui-v4130 :is(.sp-post-card,.sp-composer,.sp-stories,.sp-widget,.sp-view-head,.sp-profile-card,.sp-profile-wide-card,.sp-person-card,.sp-friend-result,.sp-notifications-page-card,.sp-settings-card,.sp-group-card,.sp-page-card,.sp-live-player-card,.sp-live-channel-panel,.sp-live-active-card,.sp-dv-card,.sp-fbpd-card,.sp-pd-card){box-shadow:var(--sp-ui-shadow)!important}
body.sp-ui-v4130 :is(.sp-app-primary,.sp-mobile-drawer-primary,.sp-profile-photo-change,.sp-profile-cover-change){box-shadow:none!important}
body.sp-ui-v4130 :is(.sp-app-secondary,.sp-mobile-drawer-secondary){border:1px solid var(--sp-ui-line)!important}

/* Profile refinement */
body.sp-ui-v4130.sp-profile-route .sp-shell{padding-bottom:calc(var(--sp-ui-bottomnav) + 110px + env(safe-area-inset-bottom))!important}
body.sp-ui-v4130 .sp-profile-hero{box-shadow:var(--sp-ui-shadow)!important}
body.sp-ui-v4130 .sp-profile-cover{background:var(--sp-ui-surface-3)!important}
body.sp-ui-v4130 .sp-profile-cover img{width:100%!important;height:100%!important;object-fit:cover!important;object-position:center center!important}
body.sp-ui-v4130 .sp-profile-identity{position:relative!important}
body.sp-ui-v4130 .sp-profile-avatar-wrap img{width:100%!important;height:100%!important;object-fit:cover!important;object-position:center center!important;border-radius:50%!important}
body.sp-ui-v4130 .sp-profile-stats{display:flex!important;flex-wrap:wrap!important;gap:10px!important;margin-top:12px!important}
body.sp-ui-v4130 .sp-profile-stats > *{
  flex:1 1 104px!important;
  min-width:0!important;
  min-height:58px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  text-align:center!important;
  padding:8px 12px!important;
  border-radius:16px!important;
  border:1px solid var(--sp-ui-line)!important;
  background:var(--sp-ui-surface-2)!important;
}
body.sp-ui-v4130 .sp-profile-actions{display:flex!important;flex-wrap:wrap!important;gap:12px!important}
body.sp-ui-v4130 .sp-profile-actions > *{min-height:52px!important;border-radius:17px!important}
body.sp-ui-v4130 .sp-profile-tabs{
  gap:8px!important;
  padding:12px 14px 12px!important;
  scroll-padding-inline:14px!important;
}
body.sp-ui-v4130 .sp-profile-tabs a{
  min-height:44px!important;
  padding:0 14px!important;
  white-space:nowrap!important;
  border:1px solid transparent!important;
}
body.sp-ui-v4130 .sp-profile-tabs a span{
  min-width:22px!important;
  height:22px!important;
  padding:0 6px!important;
  border-radius:999px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  font-size:11px!important;
  line-height:1!important;
  background:var(--sp-ui-surface-2)!important;
  color:var(--sp-ui-primary)!important;
}
body.sp-ui-v4130 .sp-profile-tabs a.active{border-color:color-mix(in srgb,var(--sp-ui-primary) 20%, var(--sp-ui-line))!important}
body.sp-ui-v4130 .sp-recommended-list,.sp-ui-v4130 .sp-recommended-friends{padding-bottom:6px!important}

/* Feed media / shared content */
body.sp-ui-v4130 .sp-media-grid,
body.sp-ui-v4130 .sp-post-attachment,
body.sp-ui-v4130 .sp-shared-media,
body.sp-ui-v4130 .sp-post-card figure{background:var(--sp-ui-surface-3)!important}
body.sp-ui-v4130 .sp-media-grid :is(img,video),
body.sp-ui-v4130 .sp-post-card figure img,
body.sp-ui-v4130 .sp-shared-media img{width:100%!important;max-width:100%!important;display:block!important;margin:0 auto!important;object-fit:cover!important}
body.sp-ui-v4130 .sp-post-card .sp-social-stats + *{border-top-color:var(--sp-ui-line)!important}

/* Settings / notification section polish */
body.sp-ui-v4130 .sp-call-push-panel{grid-template-columns:50px minmax(0,1fr) auto!important;gap:14px!important}
body.sp-ui-v4130 .sp-call-push-actions{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important;justify-content:stretch!important}
body.sp-ui-v4130 .sp-call-push-actions .sp-app-primary,
body.sp-ui-v4130 .sp-call-push-actions .sp-app-secondary{min-height:42px!important;padding:0 12px!important;white-space:normal!important;text-align:center!important;justify-content:center!important;border-radius:14px!important}
body.sp-ui-v4130 .sp-call-push-actions button:first-child:last-child{grid-column:1/-1!important}
body.sp-ui-v4130 .sp-notification-setting-row{gap:14px!important;padding:15px 0!important}
body.sp-ui-v4130 .sp-notification-setting-row > span{flex:1 1 auto!important;min-width:0!important;padding-right:4px!important}
body.sp-ui-v4130 .sp-notification-setting-row input[type=checkbox]{appearance:none!important;-webkit-appearance:none!important;width:46px!important;height:26px!important;min-width:46px!important;border:0!important;border-radius:999px!important;background:#c7cfdb!important;position:relative!important;cursor:pointer!important;transition:background .18s ease!important}
body.sp-ui-v4130 .sp-notification-setting-row input[type=checkbox]::after{content:""!important;position:absolute!important;top:3px!important;left:3px!important;width:20px!important;height:20px!important;border-radius:50%!important;background:#fff!important;box-shadow:0 1px 4px rgba(0,0,0,.18)!important;transition:transform .18s ease!important}
body.sp-ui-v4130 .sp-notification-setting-row input[type=checkbox]:checked{background:var(--sp-ui-primary)!important}
body.sp-ui-v4130 .sp-notification-setting-row input[type=checkbox]:checked::after{transform:translateX(20px)!important}
body.sp-ui-v4130 .sp-notification-settings-form .sp-app-primary{min-height:52px!important;border-radius:16px!important}

/* Search/discover page cards */
body.sp-ui-v4130.sp-ui-route-discover :is(.sp-widget,.sp-person-card,.sp-page-card,.sp-group-card,.sp-friend-result),
body.sp-ui-v4130.search :is(.sp-widget,.sp-person-card,.sp-page-card,.sp-group-card,.sp-friend-result){border-radius:20px!important}

/* Messenger / conversation refinement */
body.sp-ui-v4130 .sp-messenger-shell{overflow:hidden!important}
body.sp-ui-v4130 .sp-chat-head{border-bottom:1px solid var(--sp-ui-line)!important;background:var(--sp-ui-surface)!important}
body.sp-ui-v4130 .sp-chat-head-actions button,
body.sp-ui-v4130 .sp-chat-compose button{border-radius:14px!important}
body.sp-ui-v4130 .sp-chat-scroll{padding-bottom:14px!important}
body.sp-ui-v4130 .sp-chat-compose{border-top:1px solid var(--sp-ui-line)!important;background:var(--sp-ui-surface)!important}
body.sp-ui-v4130 .sp-chat-compose textarea,
body.sp-ui-v4130 .sp-chat-compose input{border:1px solid var(--sp-ui-line)!important;border-radius:18px!important;background:var(--sp-ui-surface-2)!important}
body.sp-ui-v4130.sp-chat-focus .sp-mobile-nav{display:none!important}
body.sp-ui-v4130.sp-chat-focus .sp-shell{padding-bottom:env(safe-area-inset-bottom)!important}
body.sp-ui-v4130.sp-chat-focus .sp-messenger-shell{height:calc(100dvh - var(--sp-ui-topbar))!important}

/* Mobile-specific fixes */
@media (max-width:800px){
  body.sp-ui-v4130 .sp-topbar{backdrop-filter:blur(16px)!important}
  body.sp-ui-v4130 .sp-topbar-inner{
    width:100%!important;
    grid-template-columns:56px 48px minmax(0,1fr)!important;
    grid-template-areas:'brand menu search'!important;
    gap:10px!important;
    padding:10px 12px!important;
    min-height:68px!important;
  }
  body.sp-ui-v4130 .sp-brand{grid-area:brand!important;justify-content:flex-start!important;width:56px!important}
  body.sp-ui-v4130 .sp-brand-mark{width:44px!important;height:44px!important;border-radius:16px!important}
  body.sp-ui-v4130 .sp-brand-text{display:none!important}
  body.sp-ui-v4130 .sp-mobile-menu-toggle{grid-area:menu!important;display:grid!important;width:48px!important;height:48px!important;min-width:48px!important;min-height:48px!important}
  body.sp-ui-v4130 .sp-search{grid-area:search!important;width:100%!important;max-width:none!important;height:48px!important;min-width:0!important;padding:0 14px!important;border-radius:18px!important}
  body.sp-ui-v4130 .sp-search input{height:44px!important;font-size:16px!important}
  body.sp-ui-v4130 .sp-nav-icons{display:none!important}

  body.sp-ui-v4130 .sp-shell{padding:12px 10px calc(var(--sp-ui-bottomnav) + 36px + env(safe-area-inset-bottom))!important}
  body.sp-ui-v4130 .sp-mobile-nav{
    left:12px!important;right:12px!important;bottom:10px!important;width:auto!important;
    min-height:74px!important;padding:8px!important;
    border-radius:28px!important;box-shadow:0 12px 30px rgba(16,24,40,.12)!important;
  }
  body.sp-ui-v4130 .sp-mobile-nav a{min-height:58px!important;padding:6px 2px!important;border-radius:18px!important}
  body.sp-ui-v4130 .sp-mobile-nav a small{font-size:11px!important}

  body.sp-ui-v4130.sp-profile-route .sp-shell{padding-inline:0!important}
  body.sp-ui-v4130 .sp-profile-page{padding-bottom:12px!important}
  body.sp-ui-v4130 .sp-profile-hero{border-radius:0 0 24px 24px!important;border-left:0!important;border-right:0!important}
  body.sp-ui-v4130 .sp-profile-cover{min-height:220px!important;max-height:220px!important}
  body.sp-ui-v4130 .sp-profile-identity{grid-template-columns:112px minmax(0,1fr)!important;gap:14px!important;padding:0 16px 16px!important;margin-top:-58px!important;align-items:end!important}
  body.sp-ui-v4130 .sp-profile-avatar-wrap{width:116px!important;height:116px!important;min-width:116px!important;border-width:4px!important;box-shadow:0 8px 22px rgba(16,24,40,.12)!important}
  body.sp-ui-v4130 .sp-profile-name-block{padding-top:6px!important}
  body.sp-ui-v4130 .sp-profile-name-block h1{font-size:22px!important;line-height:1.14!important;margin:0!important}
  body.sp-ui-v4130 .sp-profile-stats{margin-top:14px!important}
  body.sp-ui-v4130 .sp-profile-actions{grid-column:1 / -1!important;display:grid!important;grid-template-columns:1fr!important;gap:10px!important;width:100%!important}
  body.sp-ui-v4130 .sp-profile-tabs{padding:12px 12px 8px!important;gap:6px!important;border-top:1px solid var(--sp-ui-line)!important}
  body.sp-ui-v4130 .sp-profile-tabs a{min-height:42px!important;padding:0 13px!important;border-radius:13px!important}

  body.sp-ui-v4130 .sp-recommended-card,
  body.sp-ui-v4130 .sp-person-card{border-radius:20px!important}
  body.sp-ui-v4130 .sp-person-card .sp-app-primary{min-height:42px!important;border-radius:14px!important}

  body.sp-ui-v4130 .sp-stories,.sp-ui-v4130 .sp-composer,.sp-ui-v4130 .sp-post-card,.sp-ui-v4130 .sp-widget,.sp-ui-v4130 .sp-profile-card,.sp-ui-v4130 .sp-profile-wide-card,.sp-ui-v4130 .sp-settings-card,.sp-ui-v4130 .sp-notifications-page-card{border-radius:22px!important}
  body.sp-ui-v4130 .sp-composer-actions{grid-template-columns:repeat(3,minmax(0,1fr))!important}
  body.sp-ui-v4130 .sp-composer-actions button{font-size:14px!important}

  body.sp-ui-v4130 .sp-call-push-panel{grid-template-columns:44px minmax(0,1fr)!important}
  body.sp-ui-v4130 .sp-call-push-actions{grid-column:1 / -1!important;grid-template-columns:1fr 1fr!important}
  body.sp-ui-v4130 .sp-notification-setting-row{align-items:flex-start!important}
  body.sp-ui-v4130 .sp-notification-setting-row input[type=checkbox]{margin-top:4px!important}

  body.sp-ui-v4130.sp-messages-route .sp-topbar{border-bottom:1px solid var(--sp-ui-line)!important}
  body.sp-ui-v4130.sp-messages-route .sp-shell{padding:0 0 calc(8px + env(safe-area-inset-bottom))!important}
  body.sp-ui-v4130.sp-messages-route .sp-messenger-shell{height:calc(100dvh - var(--sp-ui-topbar))!important}
  body.sp-ui-v4130.sp-messages-route .sp-chat-head{padding:10px 12px!important}
  body.sp-ui-v4130.sp-messages-route .sp-chat-compose{padding:10px 12px calc(8px + env(safe-area-inset-bottom))!important}
  body.sp-ui-v4130.sp-messages-route .sp-chat-compose textarea,
  body.sp-ui-v4130.sp-messages-route .sp-chat-compose input{min-height:44px!important}
}

@media (max-width:520px){
  body.sp-ui-v4130 .sp-topbar-inner{grid-template-columns:52px 46px minmax(0,1fr)!important;padding:8px 10px!important;gap:8px!important}
  body.sp-ui-v4130 .sp-search{padding:0 12px!important}
  body.sp-ui-v4130 .sp-search input{font-size:15px!important}
  body.sp-ui-v4130 .sp-mobile-menu-grid{grid-template-columns:1fr 1fr!important}
  body.sp-ui-v4130 .sp-call-push-actions{grid-template-columns:1fr!important}
  body.sp-ui-v4130 .sp-profile-cover{min-height:200px!important;max-height:200px!important}
  body.sp-ui-v4130 .sp-profile-identity{grid-template-columns:1fr!important;justify-items:center!important;text-align:center!important;margin-top:-68px!important}
  body.sp-ui-v4130 .sp-profile-name-block{width:100%!important}
  body.sp-ui-v4130 .sp-profile-name-block h1{font-size:20px!important}
  body.sp-ui-v4130 .sp-profile-stats > *{flex:1 1 calc(50% - 8px)!important}
  body.sp-ui-v4130 .sp-profile-tabs a span{display:none!important}
  body.sp-ui-v4130 .sp-chat-head-actions button:nth-of-type(n+3){display:none!important}
}
/* V4.13.3 — remove Contacts title box and suppress remaining widget collision */

/* Remove the visible Contacts title/header box */
.sp-widget.sp-contacts-widget,
.sp-right-chat-widget{
  border-top:0!important;
  padding-top:0!important;
  margin-top:0!important;
  background:transparent!important;
  box-shadow:none!important;
}

.sp-contacts-widget .sp-widget-title,
.sp-right-chat-title,
.sp-contacts-widget .sp-widget-title strong,
.sp-right-chat-title strong{
  display:none!important;
}

.sp-contacts-widget .sp-right-chat-tabs,
.sp-right-chat-widget .sp-right-chat-tabs{
  margin-top:0!important;
}

/* Small safety cleanup so the right rail begins cleanly */
.sp-right .sp-widget:first-child,
.sp-right .sp-right-chat-widget:first-child{
  border-top:0!important;
  padding-top:0!important;
}
/* V4.13.4 — right-rail scrollbar removal + stronger UI safety cleanup */

/* Remove the visible thin scrollbar from contacts / right chat / right rail */
.sp-right,
.sp-right .sp-sticky,
.sp-right-chat-widget,
.sp-right-chat-panel,
.sp-right-chat-list,
.sp-contacts-widget,
.sp-chat-drawer-list,
.sp-quick-chat .sp-chat-scroll{
  scrollbar-width:none !important;
  -ms-overflow-style:none !important;
}
.sp-right::-webkit-scrollbar,
.sp-right .sp-sticky::-webkit-scrollbar,
.sp-right-chat-widget::-webkit-scrollbar,
.sp-right-chat-panel::-webkit-scrollbar,
.sp-right-chat-list::-webkit-scrollbar,
.sp-contacts-widget::-webkit-scrollbar,
.sp-chat-drawer-list::-webkit-scrollbar,
.sp-quick-chat .sp-chat-scroll::-webkit-scrollbar{
  width:0 !important;
  height:0 !important;
  display:none !important;
  background:transparent !important;
}
.sp-right-chat-list,
.sp-right .sp-sticky{
  padding-right:0 !important;
  margin-right:0 !important;
}

/* Strong UI safety guards */
html,body{overflow-x:hidden !important}
body .sp-shell,
body .sp-feed,
body .sp-app-page,
body .sp-profile-page,
body .sp-settings-page,
body .sp-messages-page,
body .sp-live-page,
body .sp-notifications-page,
body .sp-friends-page,
body .sp-search-page{
  max-width:100% !important;
  min-width:0 !important;
}
body :is(.sp-post-card,.sp-composer,.sp-widget,.sp-comments-card,.sp-profile-card,.sp-profile-wide-card,.sp-person-card,.sp-friend-result,.sp-notifications-page-card,.sp-settings-card,.sp-page-card,.sp-group-card,.sp-dv-card,.sp-fbpd-card,.sp-pd-card,.sp-chat-head,.sp-chat-compose,.sp-messenger-shell){
  min-width:0 !important;
  max-width:100% !important;
}
body :is(img,video,canvas,iframe){max-width:100% !important}
body :is(.sp-post-text,.sp-chat-bubble,.sp-right-chat-copy,.sp-person-copy,.sp-profile-name-block,.sp-widget-title,.sp-request-main,.sp-mobile-menu-grid a,.sp-settings-mobile-list a,.sp-settings-mobile-list button){overflow-wrap:anywhere !important}

/* Keep right rail visually clean */
.sp-right-chat-tabs{margin-right:0 !important}
.sp-right-chat-row{padding-right:8px !important}

@media (max-width:1100px){
  .sp-right,
  .sp-right .sp-sticky,
  .sp-right-chat-widget{overflow:hidden !important}
}

/* ========================================================================== 
   V4.14.0 — FINAL CLEAN UI SYSTEM
   One authoritative app-level visual layer loaded last.
   ========================================================================== */

:root{
  --sp14-bg:#f3f5f8;
  --sp14-card:#ffffff;
  --sp14-card-2:#f7f9fb;
  --sp14-card-3:#eef2f6;
  --sp14-text:#18212b;
  --sp14-muted:#687385;
  --sp14-line:#e1e6ec;
  --sp14-blue:#0866ff;
  --sp14-blue-soft:#eaf2ff;
  --sp14-danger:#d92d20;
  --sp14-success:#249c58;
  --sp14-radius:18px;
  --sp14-radius-lg:24px;
  --sp14-topbar:64px;
  --sp14-bottomnav:76px;
}
body.sp-ui-v4140.sp-theme-dark,
html.sp-theme-dark-root body.sp-ui-v4140{
  --sp14-bg:#0f1115;
  --sp14-card:#171a1f;
  --sp14-card-2:#1e2228;
  --sp14-card-3:#272c34;
  --sp14-text:#f3f6f9;
  --sp14-muted:#b1bac5;
  --sp14-line:#2f353d;
  --sp14-blue:#5aa2ff;
  --sp14-blue-soft:rgba(90,162,255,.14);
  --sp14-danger:#ff6b63;
  --sp14-success:#55c985;
}

html{background:var(--sp14-bg)!important;max-width:100%!important}
body.sp-ui-v4140{
  width:100%!important;max-width:100%!important;min-width:0!important;margin:0!important;
  overflow-x:hidden!important;background:var(--sp14-bg)!important;color:var(--sp14-text)!important;
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif!important;
}
body.sp-ui-v4140 *,body.sp-ui-v4140 *::before,body.sp-ui-v4140 *::after{box-sizing:border-box!important}
body.sp-ui-v4140 :is(img,video,canvas,svg,iframe){max-width:100%!important}
body.sp-ui-v4140 :is(button,input,textarea,select){font:inherit!important}
body.sp-ui-v4140 [hidden]{display:none!important}
body.sp-ui-v4140 :focus-visible{outline:2px solid var(--sp14-blue)!important;outline-offset:2px!important}

/* ----- Surface consistency ----- */
body.sp-ui-v4140 :is(
  .sp-post-card,.sp-composer,.sp-stories,.sp-widget,.sp-view-head,.sp-empty,
  .sp-profile-card,.sp-profile-wide-card,.sp-profile-hero,.sp-person-card,.sp-friend-result,
  .sp-notifications-page-card,.sp-settings-card,.sp-group-card,.sp-group-profile,.sp-group-about-card,
  .sp-group-members-card,.sp-group-settings-card,.sp-group-recent-media-card,.sp-page-card,.sp-page-profile,
  .sp-live-player-card,.sp-live-channel-panel,.sp-live-active-card,.sp-dv-card,.sp-fbpd-card,.sp-pd-card,
  .sp-messenger-shell,.sp-chat-drawer,.sp-quick-chat
){
  background:var(--sp14-card)!important;color:var(--sp14-text)!important;
  border:1px solid var(--sp14-line)!important;box-shadow:none!important;
}
body.sp-ui-v4140 :is(.sp-post-card,.sp-composer,.sp-stories,.sp-widget,.sp-view-head,.sp-profile-card,.sp-profile-wide-card,.sp-person-card,.sp-friend-result,.sp-notifications-page-card,.sp-settings-card,.sp-group-card,.sp-page-card,.sp-dv-card,.sp-fbpd-card,.sp-pd-card){border-radius:var(--sp14-radius)!important}
body.sp-ui-v4140 :is(.sp-app-primary,.sp-mobile-drawer-primary,.sp-profile-photo-change,.sp-profile-cover-change){background:var(--sp14-blue)!important;color:#fff!important;border-color:var(--sp14-blue)!important;box-shadow:none!important}
body.sp-ui-v4140 :is(.sp-app-secondary,.sp-mobile-drawer-secondary){background:var(--sp14-card-2)!important;color:var(--sp14-text)!important;border:1px solid var(--sp14-line)!important;box-shadow:none!important}

/* ----- Absolute scrollbar cleanup: no visible cosmetic scrollbars ----- */
body.sp-ui-v4140 :is(
  .sp-right,.sp-right .sp-sticky,.sp-right-chat-widget,.sp-right-chat-panel,.sp-right-chat-list,
  .sp-chat-drawer-list,.sp-quick-chat .sp-chat-scroll,.sp-stories-scroll,.sp-recommended-list,
  .sp-recommended-grid,.sp-recommended-friends,.sp-dv-nav,.sp-dv-table-wrap,.sp-dv-comment-list,
  .sp-dv-meta-recent-row,.sp-messenger-conversations,.sp-chat-scroll,.sp-live-channel-list,.sp-profile-tabs,
  .sp-group-tabs,.sp-settings-mobile-shortcuts,.sp-ad-wallet-history
){scrollbar-width:none!important;-ms-overflow-style:none!important}
body.sp-ui-v4140 :is(
  .sp-right,.sp-right .sp-sticky,.sp-right-chat-widget,.sp-right-chat-panel,.sp-right-chat-list,
  .sp-chat-drawer-list,.sp-quick-chat .sp-chat-scroll,.sp-stories-scroll,.sp-recommended-list,
  .sp-recommended-grid,.sp-recommended-friends,.sp-dv-nav,.sp-dv-table-wrap,.sp-dv-comment-list,
  .sp-dv-meta-recent-row,.sp-messenger-conversations,.sp-chat-scroll,.sp-live-channel-list,.sp-profile-tabs,
  .sp-group-tabs,.sp-settings-mobile-shortcuts,.sp-ad-wallet-history
)::-webkit-scrollbar{display:none!important;width:0!important;height:0!important;background:transparent!important}

/* ----- Header / search ----- */
body.sp-ui-v4140 .sp-topbar{position:sticky!important;top:0!important;z-index:1800!important;width:100%!important;min-height:var(--sp14-topbar)!important;background:color-mix(in srgb,var(--sp14-card) 95%,transparent)!important;border-bottom:1px solid var(--sp14-line)!important;backdrop-filter:blur(14px)!important;box-shadow:none!important}
body.sp-ui-v4140.admin-bar .sp-topbar{top:32px!important}
body.sp-ui-v4140 .sp-topbar-inner{width:min(100%,1440px)!important;min-height:var(--sp14-topbar)!important;margin:0 auto!important;padding:8px 16px!important;display:grid!important;grid-template-columns:220px minmax(260px,440px) 1fr!important;gap:16px!important;align-items:center!important;min-width:0!important}
body.sp-ui-v4140 .sp-brand{display:flex!important;align-items:center!important;gap:10px!important;min-width:0!important;color:var(--sp14-text)!important;text-decoration:none!important}
body.sp-ui-v4140 .sp-brand-mark{width:42px!important;height:42px!important;min-width:42px!important;border-radius:14px!important;display:grid!important;place-items:center!important;background:var(--sp14-blue)!important;color:#fff!important;overflow:hidden!important}
body.sp-ui-v4140 .sp-brand-text{font-size:17px!important;font-weight:800!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}
body.sp-ui-v4140 .sp-search{width:100%!important;min-width:0!important;height:44px!important;margin:0!important;padding:0 14px!important;display:flex!important;align-items:center!important;gap:9px!important;border:1px solid var(--sp14-line)!important;border-radius:999px!important;background:var(--sp14-card-2)!important;overflow:hidden!important;box-shadow:none!important}
body.sp-ui-v4140 .sp-search:focus-within{border-color:color-mix(in srgb,var(--sp14-blue) 45%,var(--sp14-line))!important;box-shadow:0 0 0 3px color-mix(in srgb,var(--sp14-blue) 13%,transparent)!important}
body.sp-ui-v4140 .sp-search :is(.sp-icon,.sp-search-svg){width:19px!important;height:19px!important;min-width:19px!important;color:var(--sp14-muted)!important}
body.sp-ui-v4140 .sp-search input{width:100%!important;min-width:0!important;height:40px!important;min-height:0!important;padding:0!important;border:0!important;outline:0!important;background:transparent!important;box-shadow:none!important;color:var(--sp14-text)!important;font-size:15px!important}
body.sp-ui-v4140 .sp-search input::placeholder{color:var(--sp14-muted)!important}
body.sp-ui-v4140 .sp-nav-icons{display:flex!important;align-items:center!important;justify-content:flex-end!important;gap:6px!important;min-width:0!important}
body.sp-ui-v4140 .sp-nav-icons > :is(a,button),body.sp-ui-v4140 .sp-notifications-nav{width:40px!important;height:40px!important;min-width:40px!important;min-height:40px!important;padding:0!important;display:grid!important;place-items:center!important;border:1px solid transparent!important;border-radius:13px!important;background:transparent!important;color:var(--sp14-muted)!important;box-shadow:none!important}
body.sp-ui-v4140 .sp-nav-icons > a:hover,body.sp-ui-v4140 .sp-notifications-nav:hover{background:var(--sp14-card-2)!important;color:var(--sp14-text)!important}
body.sp-ui-v4140 .sp-nav-icons > a.active,body.sp-ui-v4140 .sp-notifications-nav.active{background:var(--sp14-blue-soft)!important;color:var(--sp14-blue)!important}

/* ----- Desktop shell ----- */
body.sp-ui-v4140 .sp-shell{width:min(100%,1180px)!important;max-width:1180px!important;margin:0 auto!important;padding:18px 16px 104px!important;display:grid!important;grid-template-columns:220px minmax(0,720px) 220px!important;gap:18px!important;justify-content:center!important;align-items:start!important;background:transparent!important;min-width:0!important}
body.sp-ui-v4140 :is(.sp-left,.sp-right,.sp-feed,.sp-sticky){min-width:0!important;max-width:100%!important}
body.sp-ui-v4140 .sp-left .sp-sticky,body.sp-ui-v4140 .sp-right .sp-sticky{position:sticky!important;top:calc(var(--sp14-topbar) + 16px)!important;display:grid!important;gap:10px!important;max-height:calc(100dvh - var(--sp14-topbar) - 24px)!important;overflow-y:auto!important;overscroll-behavior:contain!important}
body.sp-ui-v4140 .sp-feed{width:100%!important;max-width:720px!important;margin:0 auto!important}
body.sp-ui-v4140 .sp-side-link{min-height:44px!important;padding:0 12px!important;display:flex!important;align-items:center!important;gap:10px!important;border-radius:12px!important;color:var(--sp14-muted)!important;text-decoration:none!important}
body.sp-ui-v4140 .sp-side-link:hover,body.sp-ui-v4140 .sp-side-link.active{background:var(--sp14-card-2)!important;color:var(--sp14-text)!important}

/* ----- Contacts/right rail: no title box, no visible scrollbar ----- */
body.sp-ui-v4140 .sp-right-chat-widget{padding:0!important;margin:0!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;overflow:visible!important}
body.sp-ui-v4140 .sp-right-chat-title,body.sp-ui-v4140 .sp-contacts-widget .sp-widget-title{display:none!important}
body.sp-ui-v4140 .sp-right-chat-tabs{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:4px!important;margin:0 0 8px!important;padding:4px!important;border:1px solid var(--sp14-line)!important;border-radius:14px!important;background:var(--sp14-card-2)!important}
body.sp-ui-v4140 .sp-right-chat-tabs button{height:34px!important;border:0!important;border-radius:11px!important;background:transparent!important;color:var(--sp14-muted)!important;font-size:11px!important;font-weight:700!important;white-space:nowrap!important}
body.sp-ui-v4140 .sp-right-chat-tabs button.is-active{background:var(--sp14-card)!important;color:var(--sp14-blue)!important;box-shadow:0 1px 2px rgba(16,24,40,.06)!important}
body.sp-ui-v4140 .sp-right-chat-list{max-height:none!important;overflow-y:auto!important;padding:0!important;margin:0!important}
body.sp-ui-v4140 .sp-right-chat-row{width:100%!important;min-height:58px!important;padding:7px 6px!important;display:grid!important;grid-template-columns:42px minmax(0,1fr) auto!important;gap:8px!important;align-items:center!important;border:0!important;border-radius:12px!important;background:transparent!important;color:var(--sp14-text)!important}
body.sp-ui-v4140 .sp-right-chat-row:hover{background:var(--sp14-card-2)!important}
body.sp-ui-v4140 .sp-right-chat-avatar,body.sp-ui-v4140 .sp-right-chat-avatar img{width:42px!important;height:42px!important;border-radius:50%!important;object-fit:cover!important}
body.sp-ui-v4140 .sp-right-chat-copy{min-width:0!important}
body.sp-ui-v4140 .sp-right-chat-copy :is(strong,small){display:block!important;max-width:100%!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}
body.sp-ui-v4140 .sp-right-chat-copy strong{font-size:12px!important;color:var(--sp14-text)!important}
body.sp-ui-v4140 .sp-right-chat-copy small{font-size:10px!important;color:var(--sp14-muted)!important}
body.sp-ui-v4140 .sp-right-chat-meta{font-size:9px!important;color:var(--sp14-muted)!important}

/* ----- Feed / stories / composer / posts ----- */
body.sp-ui-v4140 :is(.sp-stories,.sp-composer,.sp-post-card,.sp-widget,.sp-view-head,.sp-empty){width:100%!important;max-width:100%!important;margin:0 0 12px!important;overflow:hidden!important}
body.sp-ui-v4140 .sp-stories{padding:14px!important}
body.sp-ui-v4140 .sp-stories-heading{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:10px!important;min-width:0!important;margin:0 0 12px!important}
body.sp-ui-v4140 .sp-stories-heading :is(h2,strong){margin:0!important;font-size:17px!important;color:var(--sp14-text)!important}
body.sp-ui-v4140 .sp-stories-heading :is(p,span,small){min-width:0!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;color:var(--sp14-muted)!important}
body.sp-ui-v4140 .sp-stories-scroll{display:flex!important;gap:10px!important;overflow-x:auto!important;overflow-y:hidden!important;padding:0 0 2px!important}
body.sp-ui-v4140 :is(.sp-story-create,.sp-story-card){flex:0 0 112px!important;width:112px!important;min-width:112px!important;border-radius:16px!important;overflow:hidden!important}
body.sp-ui-v4140 .sp-composer{padding:14px!important}
body.sp-ui-v4140 .sp-composer-top{display:flex!important;align-items:center!important;gap:10px!important;min-width:0!important}
body.sp-ui-v4140 .sp-composer-prompt,body.sp-ui-v4140 .sp-composer textarea{flex:1 1 auto!important;min-width:0!important;border-radius:999px!important;background:var(--sp14-card-2)!important;color:var(--sp14-text)!important}
body.sp-ui-v4140 .sp-composer-actions{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:6px!important;margin-top:10px!important;padding-top:10px!important;border-top:1px solid var(--sp14-line)!important}
body.sp-ui-v4140 .sp-composer-actions button{min-width:0!important;min-height:42px!important;border:0!important;border-radius:12px!important;background:transparent!important;color:var(--sp14-muted)!important;font-weight:700!important}
body.sp-ui-v4140 .sp-composer-actions button:hover{background:var(--sp14-card-2)!important;color:var(--sp14-text)!important}
body.sp-ui-v4140 .sp-post-head{display:grid!important;grid-template-columns:44px minmax(0,1fr) auto!important;gap:10px!important;align-items:center!important;padding:14px 14px 8px!important;min-width:0!important}
body.sp-ui-v4140 .sp-post-meta,body.sp-ui-v4140 .sp-post-meta .sp-author{min-width:0!important}
body.sp-ui-v4140 .sp-post-meta .sp-author{display:block!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;color:var(--sp14-text)!important;font-weight:750!important;text-decoration:none!important}
body.sp-ui-v4140 .sp-post-meta > span{display:flex!important;align-items:center!important;gap:4px!important;color:var(--sp14-muted)!important;font-size:12px!important}
body.sp-ui-v4140 .sp-post-text{margin:0!important;padding:0 14px 10px!important;color:var(--sp14-text)!important;font-size:15px!important;line-height:1.48!important;overflow-wrap:anywhere!important}
body.sp-ui-v4140 .sp-media-grid{width:100%!important;max-width:100%!important;overflow:hidden!important;background:#0d1014!important}
body.sp-ui-v4140 .sp-media-grid :is(img,video){display:block!important;width:100%!important;max-width:100%!important;height:auto!important;object-fit:cover!important}
body.sp-ui-v4140 .sp-social-stats{min-height:38px!important;padding:7px 14px!important;display:flex!important;align-items:center!important;justify-content:space-between!important;gap:10px!important;border-bottom:1px solid var(--sp14-line)!important;color:var(--sp14-muted)!important;font-size:12px!important}
body.sp-ui-v4140 .sp-actions{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:4px!important;padding:6px 10px!important}
body.sp-ui-v4140 .sp-actions > :is(button,a){min-width:0!important;min-height:42px!important;display:flex!important;align-items:center!important;justify-content:center!important;gap:7px!important;border-radius:12px!important;color:var(--sp14-muted)!important}
body.sp-ui-v4140 .sp-actions > :is(button,a):hover{background:var(--sp14-card-2)!important;color:var(--sp14-text)!important}

/* ----- Avatars: fully circular everywhere except intentional large recommendation photo ----- */
body.sp-ui-v4140 img.sp-avatar,body.sp-ui-v4140 img.avatar,
body.sp-ui-v4140 :is(.sp-profile-avatar-wrap,.sp-profile-photo-preview,.sp-person-avatar-wrap,.sp-story-user-avatar,.sp-right-chat-avatar,.sp-chat-head-avatar,.sp-dialog-comment-avatar,.sp-notification-avatar-wrap) img{
  aspect-ratio:1/1!important;object-fit:cover!important;object-position:center!important;border-radius:50%!important;overflow:hidden!important;display:block!important;
}
body.sp-ui-v4140 :is(.sp-profile-avatar-wrap,.sp-profile-photo-preview,.sp-person-avatar-wrap,.sp-story-user-avatar,.sp-right-chat-avatar,.sp-chat-head-avatar,.sp-dialog-comment-avatar,.sp-notification-avatar-wrap){border-radius:50%!important;overflow:hidden!important}
body.sp-ui-v4140 .sp-recommended-photo,body.sp-ui-v4140 .sp-recommended-photo img.sp-avatar{border-radius:14px 14px 0 0!important}
body.sp-ui-v4140 .sp-recommended-photo img.sp-avatar{width:100%!important;height:100%!important;object-fit:cover!important}

/* ----- People You May Know ----- */
body.sp-ui-v4140 .sp-recommended-friends,body.sp-ui-v4140 .sp-recommended-list{overflow-x:auto!important;overflow-y:hidden!important;display:flex!important;gap:10px!important;padding-bottom:4px!important}
body.sp-ui-v4140 .sp-recommended-card{flex:0 0 176px!important;width:176px!important;min-width:176px!important;max-width:176px!important;border:1px solid var(--sp14-line)!important;border-radius:16px!important;background:var(--sp14-card)!important;overflow:hidden!important}
body.sp-ui-v4140 .sp-recommended-card :is(strong,small,span){max-width:100%!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}
body.sp-ui-v4140 .sp-recommended-card .sp-app-primary{min-height:40px!important;border-radius:12px!important;font-size:13px!important}

/* ----- Profile ----- */
body.sp-ui-v4140.sp-profile-route .sp-shell{width:min(100%,1080px)!important;max-width:1080px!important;display:block!important;padding-top:16px!important}
body.sp-ui-v4140 .sp-profile-page{width:100%!important;max-width:1040px!important;margin:0 auto!important}
body.sp-ui-v4140 .sp-profile-hero{overflow:hidden!important;border-radius:22px!important;background:var(--sp14-card)!important}
body.sp-ui-v4140 .sp-profile-cover{position:relative!important;width:100%!important;min-height:260px!important;max-height:330px!important;background:var(--sp14-card-3)!important;overflow:hidden!important}
body.sp-ui-v4140 .sp-profile-cover :is(img,video){width:100%!important;height:100%!important;object-fit:cover!important}
body.sp-ui-v4140 .sp-profile-identity{display:grid!important;grid-template-columns:150px minmax(0,1fr) auto!important;gap:18px!important;align-items:end!important;padding:0 20px 20px!important;margin-top:-62px!important;min-width:0!important}
body.sp-ui-v4140 .sp-profile-avatar-wrap{width:150px!important;height:150px!important;min-width:150px!important;border:5px solid var(--sp14-card)!important;background:var(--sp14-card)!important;border-radius:50%!important;overflow:hidden!important}
body.sp-ui-v4140 .sp-profile-avatar-wrap img{width:100%!important;height:100%!important;object-fit:cover!important;border-radius:50%!important}
body.sp-ui-v4140 .sp-profile-name-block{min-width:0!important;padding-bottom:6px!important}
body.sp-ui-v4140 .sp-profile-name-block h1{margin:0!important;font-size:28px!important;line-height:1.15!important;color:var(--sp14-text)!important;overflow-wrap:anywhere!important}
body.sp-ui-v4140 .sp-profile-stats{display:flex!important;flex-wrap:wrap!important;gap:8px!important;margin-top:12px!important}
body.sp-ui-v4140 .sp-profile-stats > *{min-height:50px!important;padding:8px 12px!important;display:flex!important;align-items:center!important;justify-content:center!important;border:1px solid var(--sp14-line)!important;border-radius:14px!important;background:var(--sp14-card-2)!important;color:var(--sp14-text)!important;text-align:center!important}
body.sp-ui-v4140 .sp-profile-actions{display:flex!important;flex-wrap:wrap!important;gap:10px!important;padding-bottom:6px!important}
body.sp-ui-v4140 .sp-profile-actions > *{min-height:46px!important;border-radius:14px!important}
body.sp-ui-v4140 .sp-profile-tabs{display:flex!important;gap:6px!important;overflow-x:auto!important;overflow-y:hidden!important;padding:10px 14px!important;border-top:1px solid var(--sp14-line)!important;background:var(--sp14-card)!important}
body.sp-ui-v4140 .sp-profile-tabs a{flex:0 0 auto!important;min-height:42px!important;padding:0 14px!important;display:flex!important;align-items:center!important;gap:6px!important;border-radius:12px!important;color:var(--sp14-muted)!important;text-decoration:none!important;font-weight:700!important;white-space:nowrap!important}
body.sp-ui-v4140 .sp-profile-tabs a.active{background:var(--sp14-blue-soft)!important;color:var(--sp14-blue)!important}
body.sp-ui-v4140 .sp-profile-main-grid{display:grid!important;grid-template-columns:minmax(0,1fr) 320px!important;gap:14px!important;margin-top:14px!important;min-width:0!important}

/* ----- Settings ----- */
body.sp-ui-v4140.sp-settings-route-v4120 .sp-settings-page{color:var(--sp14-text)!important;background:var(--sp14-bg)!important}
body.sp-ui-v4140 .sp-settings-grid{display:grid!important;grid-template-columns:220px minmax(0,1fr)!important;gap:16px!important;align-items:start!important}
body.sp-ui-v4140 .sp-settings-nav{position:sticky!important;top:calc(var(--sp14-topbar) + 16px)!important;display:grid!important;gap:6px!important;padding:10px!important;border:1px solid var(--sp14-line)!important;border-radius:18px!important;background:var(--sp14-card)!important}
body.sp-ui-v4140 .sp-settings-nav a{min-height:44px!important;padding:0 11px!important;display:flex!important;align-items:center!important;gap:9px!important;border-radius:12px!important;color:var(--sp14-muted)!important;text-decoration:none!important}
body.sp-ui-v4140 .sp-settings-nav a.active,body.sp-ui-v4140 .sp-settings-nav a:hover{background:var(--sp14-card-2)!important;color:var(--sp14-text)!important}
body.sp-ui-v4140 .sp-settings-content{min-width:0!important}
body.sp-ui-v4140 .sp-settings-card{padding:18px!important;margin:0 0 14px!important}
body.sp-ui-v4140 .sp-settings-section-head{display:flex!important;align-items:flex-start!important;gap:12px!important;margin:0 0 16px!important;padding:0 0 14px!important;border-bottom:1px solid var(--sp14-line)!important}
body.sp-ui-v4140 .sp-settings-section-head h2{margin:0 0 4px!important;font-size:20px!important;color:var(--sp14-text)!important}
body.sp-ui-v4140 .sp-settings-section-head p{margin:0!important;color:var(--sp14-muted)!important}
body.sp-ui-v4140 .sp-settings-form :is(input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=hidden]),textarea,select){width:100%!important;min-height:46px!important;padding:10px 12px!important;border:1px solid var(--sp14-line)!important;border-radius:13px!important;background:var(--sp14-card-2)!important;color:var(--sp14-text)!important;box-shadow:none!important}
body.sp-ui-v4140 .sp-settings-form textarea{min-height:110px!important;resize:vertical!important}
body.sp-ui-v4140 .sp-call-push-panel{display:grid!important;grid-template-columns:48px minmax(0,1fr)!important;gap:12px!important;padding:14px!important;margin:0 0 14px!important;border:1px solid var(--sp14-line)!important;border-radius:16px!important;background:var(--sp14-card-2)!important}
body.sp-ui-v4140 .sp-call-push-actions{grid-column:1/-1!important;display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
body.sp-ui-v4140 .sp-call-push-actions :is(button,a){min-height:42px!important;width:100%!important;padding:0 10px!important;white-space:normal!important;border-radius:12px!important;text-align:center!important;justify-content:center!important}
body.sp-ui-v4140 .sp-notification-setting-row{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:14px!important;min-height:66px!important;padding:12px 0!important;border-bottom:1px solid var(--sp14-line)!important}
body.sp-ui-v4140 .sp-notification-setting-row > span{min-width:0!important;flex:1 1 auto!important}
body.sp-ui-v4140 .sp-notification-setting-row strong{display:block!important;color:var(--sp14-text)!important}
body.sp-ui-v4140 .sp-notification-setting-row small{display:block!important;margin-top:3px!important;color:var(--sp14-muted)!important;line-height:1.4!important}
body.sp-ui-v4140 .sp-notification-setting-row input[type=checkbox]{appearance:none!important;-webkit-appearance:none!important;width:46px!important;height:26px!important;min-width:46px!important;border:0!important;border-radius:999px!important;background:#c7cfda!important;position:relative!important;cursor:pointer!important;padding:0!important}
body.sp-ui-v4140 .sp-notification-setting-row input[type=checkbox]::after{content:""!important;position:absolute!important;top:3px!important;left:3px!important;width:20px!important;height:20px!important;border-radius:50%!important;background:#fff!important;box-shadow:0 1px 4px rgba(0,0,0,.18)!important;transition:transform .18s ease!important}
body.sp-ui-v4140 .sp-notification-setting-row input[type=checkbox]:checked{background:var(--sp14-blue)!important}
body.sp-ui-v4140 .sp-notification-setting-row input[type=checkbox]:checked::after{transform:translateX(20px)!important}

/* ----- Messenger ----- */
body.sp-ui-v4140.sp-messages-route .sp-shell{display:block!important;width:min(100%,1280px)!important;max-width:1280px!important;padding:14px 16px 100px!important}
body.sp-ui-v4140 .sp-messages-page{width:100%!important;max-width:1240px!important;margin:0 auto!important;min-width:0!important}
body.sp-ui-v4140 .sp-messenger-shell{display:grid!important;grid-template-columns:340px minmax(0,1fr)!important;min-height:620px!important;max-height:calc(100dvh - var(--sp14-topbar) - 34px)!important;overflow:hidden!important;border-radius:20px!important}
body.sp-ui-v4140 .sp-messenger-sidebar{min-width:0!important;border-right:1px solid var(--sp14-line)!important;background:var(--sp14-card)!important}
body.sp-ui-v4140 .sp-messenger-thread{min-width:0!important;background:var(--sp14-card)!important}
body.sp-ui-v4140 .sp-conversation-row{min-height:68px!important;padding:8px 10px!important;border-radius:12px!important;color:var(--sp14-text)!important}
body.sp-ui-v4140 .sp-conversation-row:hover{background:var(--sp14-card-2)!important}
body.sp-ui-v4140 .sp-chat-head{min-height:62px!important;padding:8px 12px!important;border-bottom:1px solid var(--sp14-line)!important;background:var(--sp14-card)!important}
body.sp-ui-v4140 .sp-chat-scroll{min-height:0!important;overflow-y:auto!important;padding:12px!important;background:var(--sp14-card)!important}
body.sp-ui-v4140 .sp-chat-compose{padding:9px 10px!important;border-top:1px solid var(--sp14-line)!important;background:var(--sp14-card)!important}
body.sp-ui-v4140 .sp-chat-compose :is(input,textarea){min-width:0!important;border:1px solid var(--sp14-line)!important;border-radius:18px!important;background:var(--sp14-card-2)!important;color:var(--sp14-text)!important;box-shadow:none!important}

/* ----- Dashboard ----- */
body.sp-ui-v4140.sp-dashboard-route .sp-shell{display:block!important;width:100%!important;max-width:none!important;padding:0 0 100px!important}
body.sp-ui-v4140 .sp-dv-shell{display:grid!important;grid-template-columns:240px minmax(0,1fr)!important;min-height:calc(100dvh - var(--sp14-topbar))!important;background:var(--sp14-bg)!important}
body.sp-ui-v4140 .sp-dv-sidebar{position:sticky!important;top:var(--sp14-topbar)!important;height:calc(100dvh - var(--sp14-topbar))!important;overflow-y:auto!important;padding:12px 8px!important;border-right:1px solid var(--sp14-line)!important;background:var(--sp14-card)!important}
body.sp-ui-v4140 .sp-dv-nav{display:flex!important;flex-direction:column!important;gap:5px!important;overflow:visible!important;padding:0!important}
body.sp-ui-v4140 .sp-dv-nav > a,body.sp-ui-v4140 .sp-dv-nav-group > button{min-height:44px!important;padding:0 11px!important;border-radius:12px!important;color:var(--sp14-muted)!important}
body.sp-ui-v4140 .sp-dv-nav > a.active{background:var(--sp14-blue-soft)!important;color:var(--sp14-blue)!important}
body.sp-ui-v4140 .sp-dv-workspace{min-width:0!important;padding:16px!important;background:var(--sp14-bg)!important}
body.sp-ui-v4140 .sp-fbpd-home,body.sp-ui-v4140 .sp-fbpd-status-layout{width:min(100%,1040px)!important;margin:0 auto!important;gap:14px!important}
body.sp-ui-v4140 .sp-fbpd-metrics{gap:8px!important}
body.sp-ui-v4140 .sp-fbpd-metrics > a{border-radius:12px!important}

/* ----- Mobile navigation ----- */
body.sp-ui-v4140 .sp-mobile-nav{display:none!important}

@media(max-width:1180px){
  body.sp-ui-v4140 .sp-shell{grid-template-columns:200px minmax(0,720px)!important;max-width:960px!important}
  body.sp-ui-v4140 .sp-right{display:none!important}
}

@media(max-width:800px){
  body.sp-ui-v4140{--sp14-topbar:68px;--sp14-bottomnav:76px}
  body.sp-ui-v4140.admin-bar .sp-topbar{top:46px!important}
  body.sp-ui-v4140 .sp-topbar-inner{width:100%!important;grid-template-columns:54px 48px minmax(0,1fr)!important;grid-template-areas:"brand menu search"!important;gap:9px!important;padding:10px 12px!important;min-height:68px!important}
  body.sp-ui-v4140 .sp-brand{grid-area:brand!important;width:54px!important;min-width:54px!important}
  body.sp-ui-v4140 .sp-brand-mark{width:44px!important;height:44px!important;min-width:44px!important;border-radius:16px!important}
  body.sp-ui-v4140 .sp-brand-text{display:none!important}
  body.sp-ui-v4140 .sp-mobile-menu-toggle{grid-area:menu!important;display:grid!important;width:48px!important;height:48px!important;min-width:48px!important;min-height:48px!important;padding:0!important;place-items:center!important;border:1px solid var(--sp14-line)!important;border-radius:16px!important;background:var(--sp14-card-2)!important;color:var(--sp14-text)!important}
  body.sp-ui-v4140 .sp-search{grid-area:search!important;height:48px!important;border-radius:18px!important;padding:0 13px!important}
  body.sp-ui-v4140 .sp-search input{height:44px!important;font-size:16px!important}
  body.sp-ui-v4140 .sp-nav-icons{display:none!important}

  body.sp-ui-v4140 .sp-shell{display:block!important;width:100%!important;max-width:none!important;padding:10px 8px calc(var(--sp14-bottomnav) + 30px + env(safe-area-inset-bottom))!important}
  body.sp-ui-v4140 :is(.sp-left,.sp-right){display:none!important}
  body.sp-ui-v4140 .sp-feed,body.sp-ui-v4140 .sp-app-page{width:100%!important;max-width:760px!important;margin:0 auto!important}

  body.sp-ui-v4140 .sp-mobile-nav{position:fixed!important;z-index:1700!important;left:12px!important;right:12px!important;bottom:10px!important;width:auto!important;min-height:76px!important;padding:7px!important;display:grid!important;grid-template-columns:repeat(var(--sp-mobile-nav-cols,5),minmax(0,1fr))!important;align-items:stretch!important;border:1px solid var(--sp14-line)!important;border-radius:26px!important;background:color-mix(in srgb,var(--sp14-card) 96%,transparent)!important;box-shadow:0 12px 30px rgba(16,24,40,.12)!important;backdrop-filter:blur(14px)!important}
  body.sp-ui-v4140 .sp-mobile-nav a{min-width:0!important;min-height:60px!important;padding:5px 1px!important;display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:3px!important;border-radius:17px!important;color:var(--sp14-muted)!important;text-decoration:none!important;overflow:hidden!important}
  body.sp-ui-v4140 .sp-mobile-nav a .sp-icon{width:24px!important;height:24px!important}
  body.sp-ui-v4140 .sp-mobile-nav a small{max-width:100%!important;font-size:10.5px!important;font-weight:700!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}
  body.sp-ui-v4140 .sp-mobile-nav a.active{background:var(--sp14-blue-soft)!important;color:var(--sp14-blue)!important}

  body.sp-ui-v4140 :is(.sp-post-card,.sp-composer,.sp-stories,.sp-widget,.sp-view-head,.sp-profile-card,.sp-profile-wide-card,.sp-person-card,.sp-friend-result,.sp-notifications-page-card,.sp-settings-card,.sp-group-card,.sp-page-card,.sp-dv-card,.sp-fbpd-card,.sp-pd-card){border-radius:20px!important}
  body.sp-ui-v4140 .sp-post-head{padding:12px 12px 7px!important}
  body.sp-ui-v4140 .sp-post-text{padding:0 12px 10px!important;font-size:15px!important}
  body.sp-ui-v4140 .sp-actions{padding:5px 8px!important}
  body.sp-ui-v4140 .sp-actions > :is(button,a){font-size:13px!important}

  /* Profile mobile */
  body.sp-ui-v4140.sp-profile-route .sp-shell{padding:0 0 calc(var(--sp14-bottomnav) + 28px + env(safe-area-inset-bottom))!important}
  body.sp-ui-v4140 .sp-profile-page{max-width:760px!important}
  body.sp-ui-v4140 .sp-profile-hero{border-radius:0 0 24px 24px!important;border-left:0!important;border-right:0!important}
  body.sp-ui-v4140 .sp-profile-cover{min-height:220px!important;max-height:220px!important}
  body.sp-ui-v4140 .sp-profile-identity{grid-template-columns:116px minmax(0,1fr)!important;gap:14px!important;padding:0 16px 16px!important;margin-top:-58px!important;align-items:end!important}
  body.sp-ui-v4140 .sp-profile-avatar-wrap{width:116px!important;height:116px!important;min-width:116px!important;border-width:4px!important}
  body.sp-ui-v4140 .sp-profile-name-block{padding-top:6px!important}
  body.sp-ui-v4140 .sp-profile-name-block h1{font-size:22px!important}
  body.sp-ui-v4140 .sp-profile-actions{grid-column:1/-1!important;display:grid!important;grid-template-columns:1fr!important;width:100%!important}
  body.sp-ui-v4140 .sp-profile-actions > *{width:100%!important;justify-content:center!important;min-height:50px!important}
  body.sp-ui-v4140 .sp-profile-tabs{padding:10px 12px!important}
  body.sp-ui-v4140 .sp-profile-main-grid{display:block!important;margin-top:10px!important}

  /* Settings mobile app layout */
  body.sp-ui-v4140.sp-settings-route-v4120 .sp-topbar,body.sp-ui-v4140.sp-settings-route-v4120 .sp-mobile-nav{display:none!important}
  body.sp-ui-v4140.sp-settings-route-v4120 .sp-shell{width:100%!important;max-width:680px!important;min-height:100dvh!important;margin:0 auto!important;padding:0!important;background:var(--sp14-bg)!important}
  body.sp-ui-v4140.sp-settings-route-v4120 .sp-settings-page{width:100%!important;max-width:680px!important;min-height:100dvh!important;margin:0 auto!important;padding:0 12px calc(24px + env(safe-area-inset-bottom))!important;background:var(--sp14-bg)!important}
  body.sp-ui-v4140.sp-settings-route-v4120 .sp-settings-page-head{display:none!important}
  body.sp-ui-v4140.sp-settings-route-v4120 .sp-settings-mobile-app{display:block!important}
  body.sp-ui-v4140.sp-settings-route-v4120 .sp-settings-mobile-head{position:sticky!important;top:0!important;z-index:50!important;height:68px!important;min-height:68px!important;padding:8px 0!important;margin:0!important;display:grid!important;grid-template-columns:44px minmax(0,1fr) 44px!important;align-items:center!important;gap:8px!important;background:color-mix(in srgb,var(--sp14-bg) 94%,transparent)!important;backdrop-filter:blur(12px)!important}
  body.sp-ui-v4140.sp-settings-route-v4120 .sp-settings-mobile-head h1{margin:0!important;text-align:center!important;font-size:21px!important;font-weight:750!important;color:var(--sp14-text)!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}
  body.sp-ui-v4140.sp-settings-route-v4120 .sp-settings-mobile-head button{width:44px!important;height:44px!important;min-width:44px!important;padding:0!important;border:1px solid var(--sp14-line)!important;border-radius:50%!important;background:var(--sp14-card)!important;color:var(--sp14-text)!important;display:grid!important;place-items:center!important;box-shadow:none!important}
  body.sp-ui-v4140.sp-settings-route-v4120 .sp-settings-mobile-search{height:50px!important;margin:2px 0 14px!important;padding:0 14px!important;border:1px solid var(--sp14-line)!important;border-radius:999px!important;background:var(--sp14-card)!important;color:var(--sp14-text)!important}
  body.sp-ui-v4140.sp-settings-route-v4120 .sp-settings-mobile-search input{height:46px!important;padding:0!important;border:0!important;background:transparent!important;box-shadow:none!important;color:var(--sp14-text)!important}
  body.sp-ui-v4140.sp-settings-route-v4120 .sp-settings-mobile-list{border:1px solid var(--sp14-line)!important;border-radius:16px!important;background:var(--sp14-card)!important;overflow:hidden!important}
  body.sp-ui-v4140.sp-settings-route-v4120 .sp-settings-mobile-list > :is(button,a){min-height:62px!important;padding:10px 12px!important;background:transparent!important;color:var(--sp14-text)!important}
  body.sp-ui-v4140.sp-settings-route-v4120 .sp-settings-grid{display:none!important}
  body.sp-ui-v4140.sp-settings-route-v4120 .sp-settings-page.is-mobile-detail-open .sp-settings-mobile-overview{display:none!important}
  body.sp-ui-v4140.sp-settings-route-v4120 .sp-settings-page.is-mobile-detail-open .sp-settings-grid{display:block!important}
  body.sp-ui-v4140.sp-settings-route-v4120 .sp-settings-page.is-mobile-detail-open .sp-settings-nav{display:none!important}
  body.sp-ui-v4140.sp-settings-route-v4120 .sp-settings-page.is-mobile-detail-open .sp-settings-card{display:none!important}
  body.sp-ui-v4140.sp-settings-route-v4120 .sp-settings-page.is-mobile-detail-open .sp-settings-card.is-mobile-active-section{display:block!important}
  body.sp-ui-v4140.sp-settings-route-v4120 .sp-settings-card{padding:14px!important;margin:0 0 12px!important;border-radius:17px!important}
  body.sp-ui-v4140.sp-settings-route-v4120 .sp-settings-section-head h2,body.sp-ui-v4140.sp-settings-route-v4120 .sp-settings-section-icon{display:none!important}
  body.sp-ui-v4140.sp-settings-route-v4120 .sp-settings-form{padding:0!important;background:transparent!important;border:0!important}
  body.sp-ui-v4140.sp-settings-route-v4120 .sp-form-two{grid-template-columns:1fr!important;gap:0!important}
  body.sp-ui-v4140.sp-settings-route-v4120 .sp-call-push-actions{grid-template-columns:1fr!important}
  body.sp-ui-v4140.sp-settings-route-v4120 .sp-notification-setting-row{align-items:flex-start!important}
  body.sp-ui-v4140.sp-settings-route-v4120 .sp-notification-setting-row input[type=checkbox]{margin-top:4px!important}

  /* Messenger mobile */
  body.sp-ui-v4140.sp-messages-route .sp-shell{width:100%!important;max-width:none!important;padding:0 0 calc(var(--sp14-bottomnav) + env(safe-area-inset-bottom))!important}
  body.sp-ui-v4140 .sp-messages-page{max-width:none!important;min-height:0!important}
  body.sp-ui-v4140 .sp-messenger-shell{position:relative!important;width:100%!important;height:calc(100dvh - var(--sp14-topbar) - var(--sp14-bottomnav) - 6px)!important;min-height:0!important;display:block!important;border-radius:0!important;border-left:0!important;border-right:0!important;box-shadow:none!important}
  body.sp-ui-v4140 .sp-messenger-sidebar{width:100%!important;height:100%!important;border-right:0!important}
  body.sp-ui-v4140 .sp-messenger-thread{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;background:var(--sp14-card)!important}
  body.sp-ui-v4140 .sp-messages-page:not(.has-active-chat) .sp-messenger-thread{display:none!important}
  body.sp-ui-v4140 .sp-messages-page.has-active-chat .sp-messenger-sidebar{display:none!important}
  body.sp-ui-v4140 .sp-chat-active{height:100%!important;display:grid!important;grid-template-rows:62px minmax(0,1fr) auto!important}
  body.sp-ui-v4140 .sp-chat-head{padding:8px 10px!important}
  body.sp-ui-v4140 .sp-chat-compose{padding:8px 10px calc(8px + env(safe-area-inset-bottom))!important}
  body.sp-ui-v4140.sp-chat-focus .sp-mobile-nav{display:none!important}
  body.sp-ui-v4140.sp-chat-focus .sp-shell{padding-bottom:0!important}
  body.sp-ui-v4140.sp-chat-focus .sp-messenger-shell{height:calc(100dvh - var(--sp14-topbar))!important}

  /* Dashboard mobile */
  body.sp-ui-v4140.sp-dashboard-route .sp-shell{padding:0 0 calc(var(--sp14-bottomnav) + 16px + env(safe-area-inset-bottom))!important}
  body.sp-ui-v4140 .sp-dv-shell{display:block!important;min-height:0!important}
  body.sp-ui-v4140 .sp-dv-sidebar{position:sticky!important;top:var(--sp14-topbar)!important;z-index:100!important;width:100%!important;height:auto!important;max-height:none!important;padding:6px 8px!important;overflow:visible!important;border-right:0!important;border-bottom:1px solid var(--sp14-line)!important;background:var(--sp14-card)!important}
  body.sp-ui-v4140 .sp-dv-sidebar-head{display:none!important}
  body.sp-ui-v4140 .sp-dv-nav{display:flex!important;flex-direction:row!important;align-items:center!important;gap:6px!important;overflow-x:auto!important;overflow-y:hidden!important;padding:0!important}
  body.sp-ui-v4140 .sp-dv-nav > a,body.sp-ui-v4140 .sp-dv-nav-group > button{flex:0 0 auto!important;min-width:max-content!important;min-height:42px!important;padding:0 10px!important;border-radius:13px!important;white-space:nowrap!important}
  body.sp-ui-v4140 .sp-dv-workspace{padding:12px 10px!important}
  body.sp-ui-v4140 .sp-fbpd-home,body.sp-ui-v4140 .sp-fbpd-status-layout{display:block!important;width:100%!important}
  body.sp-ui-v4140 .sp-fbpd-home-main,body.sp-ui-v4140 .sp-fbpd-home-rail,body.sp-ui-v4140 .sp-fbpd-status-main,body.sp-ui-v4140 .sp-fbpd-status-rail{display:grid!important;gap:12px!important}
  body.sp-ui-v4140 .sp-fbpd-metrics{grid-template-columns:1fr!important}
  body.sp-ui-v4140 .sp-fbpd-card-head{flex-wrap:wrap!important;gap:10px!important}
  body.sp-ui-v4140 .sp-fbpd-card-actions{width:100%!important;display:flex!important;flex-wrap:wrap!important;gap:8px!important}
  body.sp-ui-v4140 .sp-fbpd-card-actions button{min-height:42px!important;white-space:normal!important}
}

@media(max-width:520px){
  body.sp-ui-v4140 .sp-topbar-inner{grid-template-columns:50px 46px minmax(0,1fr)!important;gap:7px!important;padding:8px 9px!important}
  body.sp-ui-v4140 .sp-brand{width:50px!important;min-width:50px!important}
  body.sp-ui-v4140 .sp-search{padding:0 11px!important}
  body.sp-ui-v4140 .sp-search input{font-size:15px!important}
  body.sp-ui-v4140 .sp-profile-cover{min-height:200px!important;max-height:200px!important}
  body.sp-ui-v4140 .sp-profile-identity{grid-template-columns:1fr!important;justify-items:center!important;text-align:center!important;margin-top:-68px!important}
  body.sp-ui-v4140 .sp-profile-name-block{width:100%!important}
  body.sp-ui-v4140 .sp-profile-stats{justify-content:center!important}
  body.sp-ui-v4140 .sp-profile-stats > *{flex:1 1 calc(50% - 8px)!important}
  body.sp-ui-v4140 .sp-profile-tabs a{padding:0 12px!important}
  body.sp-ui-v4140 .sp-chat-head-actions button:nth-of-type(n+3){display:none!important}
}
