/* ==========================================================
   SocialPress V4.5.0 — Final touches
   Purpose: low-risk visual/UX refinement loaded after all
   existing page styles. No feature behavior is changed here.
   ========================================================== */

:root{
  --sp-final-blue:#0866ff;
  --sp-final-blue-hover:#075ce2;
  --sp-final-text:#172033;
  --sp-final-muted:#667085;
  --sp-final-line:#e4e9f1;
  --sp-final-surface:#fff;
  --sp-final-soft:#f5f7fb;
  --sp-final-radius:16px;
  --sp-final-shadow:0 1px 2px rgba(16,24,40,.04),0 10px 30px rgba(16,24,40,.055);
  --sp-final-shadow-lg:0 18px 52px rgba(16,24,40,.11);
}

html{scroll-behavior:smooth}
body{overflow-x:hidden}
body,button,input,textarea,select{-webkit-tap-highlight-color:transparent}
button,a,input,textarea,select{box-sizing:border-box}
input::placeholder,textarea::placeholder{color:#98a2b3;opacity:1}

/* Compact modern scrollbar. Kept intentionally subtle so scrolling remains
   discoverable without the large browser-default track. */
@media (pointer:fine){
  *{scrollbar-width:thin;scrollbar-color:#aeb8c7 transparent}
  *::-webkit-scrollbar{width:6px;height:6px}
  *::-webkit-scrollbar-track{background:transparent}
  *::-webkit-scrollbar-thumb{background:#b5bfcc;border:1px solid transparent;background-clip:padding-box;border-radius:999px}
  *::-webkit-scrollbar-thumb:hover{background:#8f9baa;border:1px solid transparent;background-clip:padding-box}
}

/* Make interactive controls feel consistent */
:where(.sp-app-primary,.sp-app-secondary,.sp-submit,.sp-profile-primary,.sp-profile-secondary,
.sp-unlock-primary,.sp-unlock-secondary,.sp-email-primary,.sp-email-secondary,
.sp-auth-v444-primary,.sp-auth-v444-create,.sp-mobile-drawer-primary,.sp-mobile-drawer-secondary,
.sp-dv-blue-btn,.sp-appeal-submit,.sp-blocked-btn){
  transition:transform .16s ease,box-shadow .16s ease,background-color .16s ease,border-color .16s ease,filter .16s ease!important;
}
@media (hover:hover){
  :where(.sp-app-primary,.sp-submit,.sp-profile-primary,.sp-unlock-primary,.sp-email-primary,.sp-auth-v444-primary,.sp-dv-blue-btn):hover{
    transform:translateY(-1px)!important;
    box-shadow:0 8px 20px rgba(8,102,255,.20)!important;
  }
}

/* Forms: one polished field language everywhere */
:where(.sp-settings-form,.sp-auth-form,.sp-unlock-form,.sp-email-code-form,.sp-appeal-form)
:where(input[type=text],input[type=email],input[type=password],input[type=tel],input[type=date],input[type=number],input[type=url],textarea,select){
  min-height:44px;
  border-color:#dce2eb;
  background:#fff;
  color:var(--sp-final-text);
}
:where(.sp-settings-form,.sp-auth-form,.sp-unlock-form,.sp-email-code-form,.sp-appeal-form) textarea{line-height:1.5}
:where(.sp-settings-form,.sp-auth-form,.sp-unlock-form,.sp-email-code-form,.sp-appeal-form)
:where(input,textarea,select):focus{
  border-color:#9fc7ff!important;
  outline:0!important;
  box-shadow:0 0 0 4px rgba(8,102,255,.11)!important;
}

/* Header: tiny visual cleanup */
.sp-topbar-inner{min-width:0}
.sp-brand-mark{isolation:isolate}
.sp-search{transition:background .16s ease,border-color .16s ease,box-shadow .16s ease!important}
.sp-search .sp-icon{color:#7a8699}
.sp-nav-icons>a,.sp-notifications-nav{isolation:isolate}
.sp-nav-icons>a:active,.sp-notifications-nav:active{transform:scale(.95)!important}

/* Sidebar: selected state and section rhythm */
.sp-left .sp-side-link,.sp-right .sp-contact{position:relative}
.sp-left .sp-side-link.active::before{
  content:"";position:absolute;left:0;top:12px;bottom:12px;width:3px;border-radius:999px;background:var(--sp-final-blue)
}
.sp-widget+.sp-widget{margin-top:14px}
.sp-contacts-empty{border-radius:12px;background:rgba(255,255,255,.48);padding:13px 12px!important}

/* Feed cards: refined spacing, media corners and text readability */
.sp-feed{min-width:0}
.sp-post-card{min-width:0}
.sp-post-head{align-items:center!important}
.sp-post-head .sp-avatar{flex:0 0 auto}
.sp-post-text{overflow-wrap:anywhere;word-break:normal}
.sp-post-text p:first-child{margin-top:0}.sp-post-text p:last-child{margin-bottom:0}
.sp-post-public-title{overflow-wrap:anywhere}
.sp-media-grid{overflow:hidden}
.sp-media-grid img,.sp-media-grid video{display:block}
.sp-actions{border-top:1px solid #f0f2f5}
.sp-actions button,.sp-actions a{font-weight:680!important}
.sp-social-stats{min-height:40px;display:flex;align-items:center}

/* Inline See more should read like content, not a UI button */
.sp-post-see-more,.sp-dashboard-see-more,[data-sp-see-more]{
  border:0!important;background:transparent!important;box-shadow:none!important;padding:0!important;
  color:#65676b!important;font:inherit!important;font-weight:700!important;text-decoration:none!important;cursor:pointer!important;
}
.sp-post-see-more:hover,.sp-dashboard-see-more:hover,[data-sp-see-more]:hover{text-decoration:underline!important;color:#3f4752!important}

/* Composer */
.sp-composer{isolation:isolate}
.sp-composer-trigger{transition:background .16s ease,border-color .16s ease!important}
.sp-composer-actions button .sp-icon{flex:0 0 auto}

/* Comments */
/* The popup side pane is a flex column. min-height:0 is required so the
   comments list is allowed to shrink and become the scrolling child. */
.sp-comments-dialog-body,.sp-dialog-layout,.sp-dialog-side-pane{min-height:0!important}
.sp-dialog-side-pane{overflow:hidden!important}
.sp-dialog-comments-scroll{
  min-height:0!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  overscroll-behavior-y:contain;
  -webkit-overflow-scrolling:touch;
  touch-action:pan-y;
  scrollbar-gutter:stable;
  scrollbar-width:thin;
  scrollbar-color:#98a4b3 transparent;
}
.sp-dialog-comments-scroll::-webkit-scrollbar{width:5px;height:5px}
.sp-dialog-comments-scroll::-webkit-scrollbar-track{background:transparent}
.sp-dialog-comments-scroll::-webkit-scrollbar-thumb{background:#9da8b6;border-radius:999px}
.sp-dialog-comments-scroll::-webkit-scrollbar-thumb:hover{background:#788594}
.sp-comments-list{scrollbar-gutter:stable}
.sp-comment-row,.sp-comment{scroll-margin-top:90px}
.sp-comment-bubble{border-radius:15px!important;background:#f3f5f8!important}
.sp-comment-input,.sp-comment-form textarea{border-radius:999px!important;background:#f3f5f8!important;border-color:transparent!important}

/* App page headers and empty states */
.sp-app-page-head{align-items:flex-end}
.sp-empty{
  padding:42px 24px!important;text-align:center;color:var(--sp-final-muted)!important;
  background:linear-gradient(180deg,#fff,#fbfcfe)!important;
}
.sp-empty h2,.sp-empty h3{color:var(--sp-final-text);letter-spacing:-.02em}
.sp-empty .sp-icon{color:#7daef8}
.sp-view-head{overflow:hidden}

/* Friends / people */
.sp-person-card,.sp-friend-result{min-width:0}
.sp-person-card .sp-avatar,.sp-friend-result .sp-avatar{box-shadow:0 0 0 1px rgba(16,24,40,.05)}
.sp-friend-result strong,.sp-person-card strong{overflow:hidden;text-overflow:ellipsis}

/* Notifications */
.sp-notifications-popover{transform-origin:top right}
.sp-notification-item{transition:background .14s ease,transform .14s ease!important}
@media (hover:hover){.sp-notification-item:hover{transform:translateX(2px)}}
.sp-notification-copy{min-width:0}
.sp-notification-copy strong{overflow-wrap:anywhere}
.sp-notifications-page-card{overflow:hidden}

/* Messenger */
.sp-messenger-shell{background:#fff}
.sp-chat-scroll{scroll-behavior:smooth;overscroll-behavior:contain}
.sp-chat-bubble{overflow-wrap:anywhere}
.sp-chat-input-wrap:focus-within{box-shadow:0 0 0 3px rgba(8,102,255,.10);background:#fff!important}
.sp-conversation-row{transition:background .14s ease,transform .14s ease!important}
@media(hover:hover){.sp-conversation-row:hover{transform:translateX(2px)}}

/* Settings */
.sp-settings-card{overflow:hidden}
.sp-settings-form label{color:#344054}
.sp-settings-form small,.sp-settings-form .description{color:#7a8699}
.sp-notification-setting-row:last-child{border-bottom:0!important}

/* Profile */
.sp-profile-cover{position:relative}
.sp-profile-cover::after{content:"";position:absolute;inset:auto 0 0;height:70px;background:linear-gradient(transparent,rgba(14,25,42,.10));pointer-events:none}
.sp-profile-avatar-wrap{position:relative;z-index:2}
.sp-profile-tabs{overflow-x:auto;scrollbar-width:none}.sp-profile-tabs::-webkit-scrollbar{display:none}
.sp-profile-tabs a{white-space:nowrap}

/* Dashboard */
.sp-dv-card,.sp-dvx-card,.sp-dvx-panel{overflow:hidden}
.sp-dv-page-head,.sp-dvx-page-head{align-items:flex-end}
.sp-dv-table-wrap{scrollbar-gutter:stable}
.sp-dv-search:focus-within{border-color:#9fc7ff!important;box-shadow:0 0 0 4px rgba(8,102,255,.10)!important}

/* Reels: preserve cinematic media while refining controls */
.sp-reels-page,.sp-reels-shell{overscroll-behavior-y:contain}
.sp-reel-item video{background:#000}
.sp-reel-actions button,.sp-reel-action{backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px)}
.sp-reel-progress{overflow:hidden;border-radius:999px}

/* Authentication */
.sp-auth-v444-page{background:#f3f6fb!important}
.sp-auth-v444-hero{background:
  radial-gradient(circle at 14% 18%,rgba(72,149,255,.24),transparent 30%),
  radial-gradient(circle at 88% 84%,rgba(80,92,230,.24),transparent 34%),
  linear-gradient(145deg,#0a4eba,#0866ff 48%,#294be8)!important;
}
.sp-auth-v444-panel{
  border:1px solid rgba(221,227,236,.9)!important;
  box-shadow:0 24px 70px rgba(16,24,40,.12)!important;
  border-radius:22px!important;
}
.sp-auth-v444-title h2{letter-spacing:-.025em;color:#172033}
.sp-auth-v444-field>span:first-child,.sp-auth-form-section-title{color:#344054}
.sp-auth-v444-input-wrap,.sp-auth-v444-password-register,
.sp-register-form input,.sp-register-form select,.sp-register-form textarea{
  transition:border-color .15s ease,box-shadow .15s ease,background .15s ease!important;
}
.sp-auth-v444-input-wrap:focus-within,.sp-auth-v444-password-register:focus-within{
  border-color:#9fc7ff!important;box-shadow:0 0 0 4px rgba(8,102,255,.11)!important;background:#fff!important
}
.sp-auth-v444-primary{min-height:48px!important;border-radius:12px!important}
.sp-auth-v444-create{min-height:46px!important;border-radius:12px!important}
.sp-auth-alert{box-shadow:0 1px 2px rgba(16,24,40,.035)}
.sp-auth-v444-footer{color:#8a94a6}

/* Email verification */
.sp-email-verify-body{background:linear-gradient(180deg,#edf4ff 0,#f7f9fc 260px,#f5f7fb 100%)!important}
.sp-email-verify-card{border-radius:22px!important;border:1px solid #e1e6ee!important;box-shadow:0 24px 70px rgba(16,24,40,.11)!important}
.sp-email-icon,.sp-email-success-icon{box-shadow:0 8px 24px rgba(8,102,255,.12)}
.sp-email-code-form input{font-variant-numeric:tabular-nums;letter-spacing:.2em}
.sp-email-primary,.sp-email-secondary{border-radius:12px!important;min-height:46px!important}

/* Identity/security verification */
.sp-unlock-v414-page{background:linear-gradient(180deg,#edf4ff 0,#f7f9fc 250px,#f5f7fb 100%)!important}
.sp-unlock-v414-card{border-radius:22px!important;overflow:hidden}
.sp-unlock-choice{transition:border-color .16s ease,box-shadow .16s ease,transform .16s ease!important}
@media(hover:hover){.sp-unlock-choice:hover{transform:translateY(-1px);box-shadow:0 9px 24px rgba(16,24,40,.08)!important}}
.sp-unlock-choice-icon,.sp-unlock-method-icon{box-shadow:0 6px 18px rgba(16,24,40,.07)}
.sp-live-face-camera{box-shadow:inset 0 0 0 1px rgba(255,255,255,.07)}
.sp-unlock-primary,.sp-unlock-secondary{min-height:46px!important;border-radius:12px!important}
.sp-id-upload-track{overflow:hidden;border-radius:999px}

/* Banned / suspended page */
.sp-blocked-body{background:
  radial-gradient(circle at 50% -120px,rgba(8,102,255,.08),transparent 430px),
  #f4f6f9!important}
.sp-blocked-card{border:1px solid #e1e6ee!important;box-shadow:0 24px 72px rgba(16,24,40,.12)!important}
.sp-blocked-icon{box-shadow:0 10px 26px rgba(207,45,45,.12)}
.sp-blocked-btn{min-height:48px!important;border-radius:11px!important}
.sp-blocked-detail{box-shadow:inset 0 1px rgba(255,255,255,.7)}

/* Toast & route loading */
.sp-toast{z-index:99999!important}
.sp-page-loader{z-index:99998!important}
.sp-route-loading body{cursor:progress}

/* Mobile */
@media(max-width:980px){
  .sp-shell{padding-left:14px!important;padding-right:14px!important}
  .sp-app-page-head{align-items:flex-start;flex-direction:column}
  .sp-app-page-head>div:last-child{width:100%}
  .sp-app-page-head .sp-app-primary,.sp-app-page-head .sp-app-secondary{width:auto}
  .sp-auth-v444-panel{border-radius:20px!important}
}

@media(max-width:700px){
  body{padding-bottom:calc(66px + env(safe-area-inset-bottom))}
  body.sp-messages-route,body.sp-reels-route,body.sp-auth-body,body.sp-email-verify-body,body.sp-blocked-body,body.sp-unlock-body{padding-bottom:0}

  .sp-topbar{height:58px!important}
  .sp-topbar-inner{height:58px!important;padding:0 12px!important}
  .sp-brand-mark{width:38px!important;height:38px!important;border-radius:12px!important}
  .sp-mobile-menu-toggle{width:40px!important;height:40px!important}

  .sp-shell{padding:14px 10px calc(82px + env(safe-area-inset-bottom))!important;gap:14px!important}
  .sp-post-card,.sp-composer,.sp-stories,.sp-view-head,.sp-empty{border-radius:14px!important}
  .sp-post-card{margin-bottom:12px!important}
  .sp-post-head{padding:12px 13px 8px!important}
  .sp-post-text{padding-left:13px!important;padding-right:13px!important;font-size:14.5px!important;line-height:1.52!important}
  .sp-post-public-title{padding-left:13px!important;padding-right:13px!important}
  .sp-social-stats{padding-left:13px!important;padding-right:13px!important}
  .sp-actions{padding-left:6px!important;padding-right:6px!important}
  .sp-actions button,.sp-actions a{min-height:42px!important}

  .sp-mobile-nav{
    height:calc(62px + env(safe-area-inset-bottom))!important;
    padding-bottom:env(safe-area-inset-bottom)!important;
    border-top-color:#e5e9ef!important;
    box-shadow:0 -7px 24px rgba(16,24,40,.07)!important;
    background:rgba(255,255,255,.96)!important;
    backdrop-filter:blur(18px) saturate(160%);-webkit-backdrop-filter:blur(18px) saturate(160%);
  }
  .sp-mobile-nav a{min-width:0;position:relative;border-radius:11px;margin:5px 2px!important}
  .sp-mobile-nav a.active{background:#edf5ff!important;color:#0866ff!important}
  .sp-mobile-nav small{font-weight:720!important}
  body.sp-mobile-drawer-open .sp-mobile-nav{opacity:0!important;visibility:hidden!important;pointer-events:none!important;transform:translateY(110%)!important}

  .sp-mobile-drawer{box-shadow:16px 0 52px rgba(15,23,42,.22)!important}
  .sp-mobile-menu-grid a{min-height:52px}

  .sp-notifications-popover{position:fixed!important;left:10px!important;right:10px!important;top:64px!important;width:auto!important;max-height:calc(100dvh - 82px)!important}
  .sp-notifications-popover-list{max-height:calc(100dvh - 160px)!important}

  .sp-settings-card{padding:18px!important}
  .sp-profile-hero{border-radius:16px!important}
  .sp-profile-identity{padding-left:16px!important;padding-right:16px!important}

  .sp-messenger-shell{border-radius:0!important;border-left:0!important;border-right:0!important;box-shadow:none!important}

  .sp-auth-v444-panel-wrap{padding:22px 14px!important}
  .sp-auth-v444-panel{padding:22px 18px!important}
  .sp-auth-v444-mobile-brand{margin-bottom:20px!important}
  .sp-auth-v444-title h2{font-size:23px!important}

  .sp-email-verify-wrap,.sp-unlock-v414-page,.sp-blocked-wrap{padding-left:14px!important;padding-right:14px!important}
  .sp-email-verify-card,.sp-unlock-v414-card,.sp-blocked-card{border-radius:18px!important}
}

@media(max-width:380px){
  .sp-shell{padding-left:7px!important;padding-right:7px!important}
  .sp-post-card,.sp-composer,.sp-stories{border-radius:12px!important}
  .sp-actions button,.sp-actions a{font-size:12px!important}
  .sp-mobile-nav small{font-size:9px!important}
  .sp-auth-v444-panel{padding:20px 14px!important}
}

/* Accessibility: preserve full functionality without motion */
@media(prefers-reduced-motion:reduce){
  html{scroll-behavior:auto!important}
  *,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important}
}

/* High contrast support */
@media(forced-colors:active){
  :where(.sp-post-card,.sp-composer,.sp-settings-card,.sp-profile-hero,.sp-notifications-popover,.sp-messenger-shell,.sp-auth-v444-panel,.sp-email-verify-card,.sp-unlock-v414-card,.sp-blocked-card){border:1px solid CanvasText!important}
}


/* V4.5.1 — comments scroll reliability */
@media(max-width:800px){
  .sp-comments-dialog-body{min-height:0!important;overflow:hidden!important}
  .sp-dialog-layout{height:100%!important;min-height:0!important;overflow:hidden!important}
  .sp-dialog-side-pane{display:flex!important;flex-direction:column!important;width:100%!important;height:100%!important;min-height:0!important;overflow:hidden!important}
  .sp-dialog-comments-scroll{flex:1 1 auto!important;min-height:0!important;overflow-y:auto!important;overflow-x:hidden!important;padding-bottom:96px!important}
  .sp-dialog-form-shell{flex:0 0 auto!important}
}


/* ==========================================================
   V4.5.2 — comments popup structural repair
   ========================================================== */
.sp-comments-modal.is-open{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
}
.sp-comments-dialog{
  min-height:0!important;
}
.sp-comments-dialog-head{
  position:relative!important;
  height:52px!important;
  min-height:52px!important;
  flex:0 0 52px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  padding:0 12px!important;
  border-bottom:1px solid #e4e6eb!important;
  background:#fff!important;
}
/* Backward-compatible guards in case a cached template still contains these. */
.sp-comments-dialog-head h3,
.sp-comments-dialog-close-left{display:none!important}
.sp-comments-dialog-handle{display:none}
.sp-comments-dialog-close{
  position:relative!important;
  inset:auto!important;
  flex:0 0 38px!important;
  width:38px!important;
  height:38px!important;
  margin:0!important;
  z-index:8!important;
}
.sp-comments-dialog-body{
  flex:1 1 auto!important;
  width:100%!important;
  min-height:0!important;
  height:auto!important;
  overflow:hidden!important;
}
.sp-comments-dialog-body>.sp-dialog-layout{
  width:100%!important;
  height:100%!important;
  min-height:0!important;
  overflow:hidden!important;
}
.sp-dialog-side-pane{
  min-height:0!important;
  max-height:100%!important;
  overflow:hidden!important;
  display:flex!important;
  flex-direction:column!important;
}
.sp-dialog-comments-head{flex:0 0 auto!important}
.sp-dialog-comments-scroll{
  flex:1 1 0!important;
  min-height:72px!important;
  max-height:none!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  padding-bottom:12px!important;
}
.sp-dialog-form-shell{
  display:block!important;
  visibility:visible!important;
  opacity:1!important;
  flex:0 0 auto!important;
  min-height:70px!important;
  position:relative!important;
  bottom:auto!important;
  z-index:7!important;
  padding:10px 14px max(12px,env(safe-area-inset-bottom))!important;
  border-top:1px solid #e4e6eb!important;
  background:#fff!important;
  box-shadow:0 -4px 14px rgba(15,23,42,.035)!important;
}
.sp-dialog-comment-form,
.sp-dialog-comment-input-row,
.sp-dialog-comment-input-wrap{min-width:0!important}
.sp-dialog-comment-input-row{align-items:flex-end!important}
.sp-dialog-comment-input-wrap{display:block!important;visibility:visible!important}
.sp-dialog-comment-input-wrap textarea{
  display:block!important;
  visibility:visible!important;
  opacity:1!important;
  box-sizing:border-box!important;
  width:100%!important;
  min-height:42px!important;
  max-height:140px!important;
  margin:0!important;
}

@media(max-width:800px){
  .sp-comments-modal.is-open{align-items:flex-end!important}
  .sp-comments-dialog{
    height:min(91dvh,820px)!important;
    max-height:91dvh!important;
  }
  .sp-comments-dialog-head{
    height:46px!important;
    min-height:46px!important;
    flex-basis:46px!important;
    padding:0 10px!important;
  }
  .sp-comments-dialog-handle{
    display:block!important;
    position:absolute!important;
    left:50%!important;
    top:8px!important;
    width:38px!important;
    height:4px!important;
    border-radius:999px!important;
    background:#ccd0d5!important;
    transform:translateX(-50%)!important;
  }
  .sp-comments-dialog-close{width:34px!important;height:34px!important;flex-basis:34px!important}
  .sp-comments-dialog-body>.sp-dialog-layout{
    display:block!important;
    height:100%!important;
  }
  .sp-dialog-media-pane{display:none!important}
  .sp-dialog-side-pane{
    width:100%!important;
    height:100%!important;
    max-height:100%!important;
  }
  .sp-dialog-comments-scroll{
    flex:1 1 0!important;
    min-height:64px!important;
    padding:8px 10px 10px!important;
  }
  .sp-dialog-form-shell{
    min-height:68px!important;
    padding:8px 10px max(10px,env(safe-area-inset-bottom))!important;
  }
  .sp-dialog-comment-input-row{gap:8px!important}
  .sp-dialog-comment-input-row>.sp-avatar{width:36px!important;height:36px!important;flex:0 0 36px!important}
  .sp-dialog-comment-actions{margin-top:6px!important;flex-direction:row!important;align-items:center!important}
  .sp-dialog-comment-actions small{display:none!important}
}

@media(max-width:420px){
  .sp-comments-dialog{height:94dvh!important;max-height:94dvh!important}
  .sp-dialog-post-text{max-height:96px!important;overflow-y:auto!important;overscroll-behavior:contain!important}
  .sp-dialog-statline{padding-top:7px!important;padding-bottom:7px!important}
  .sp-dialog-actions{padding-top:3px!important;padding-bottom:3px!important}
}

.sp-comments-dialog .sp-dialog-stat-comments{cursor:default!important;text-decoration:none!important}
.sp-comments-dialog-body[aria-busy="true"]{cursor:progress}


/* ==========================================================
   V4.5.3 — balanced comments / media viewer
   ========================================================== */
@media(min-width:801px){
  .sp-comments-dialog{
    width:min(1200px,calc(100vw - 48px))!important;
    height:min(94dvh,900px)!important;
    max-height:94dvh!important;
  }
  .sp-comments-dialog-body>.sp-dialog-layout.has-media{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) clamp(420px,39vw,470px)!important;
  }
  .sp-comments-dialog-body>.sp-dialog-layout.no-media{
    grid-template-columns:minmax(0,680px)!important;
    justify-content:center!important;
    background:#f0f2f5!important;
  }
  .sp-comments-dialog-body>.sp-dialog-layout.no-media>.sp-dialog-side-pane{
    border-left:1px solid #e4e6eb!important;
    border-right:1px solid #e4e6eb!important;
  }
}

/* Media and popup banner must be stacked vertically. The old flex-row layout
   let a 728x90 banner cut through the middle of the media viewer. */
.sp-comments-dialog .sp-dialog-media-inner{
  display:flex!important;
  flex-direction:column!important;
  align-items:stretch!important;
  justify-content:stretch!important;
  min-width:0!important;
  min-height:0!important;
  overflow:hidden!important;
}
.sp-comments-dialog .sp-dialog-media-pane .sp-media-grid{
  flex:1 1 0!important;
  width:100%!important;
  height:auto!important;
  min-height:0!important;
  overflow:hidden!important;
}
.sp-comments-dialog .sp-dialog-media-pane .sp-media-item{
  width:100%!important;
  height:100%!important;
  min-height:0!important;
}
.sp-comments-dialog .sp-dialog-media-pane .sp-media-item img.sp-media-el,
.sp-comments-dialog .sp-dialog-media-pane .sp-media-item video.sp-media-el{
  width:100%!important;
  height:100%!important;
  min-height:0!important;
  max-height:100%!important;
  object-fit:contain!important;
}
.sp-comments-dialog .sp-dialog-media-inner>.sp-feed-banner-ad{
  flex:0 0 auto!important;
  width:min(728px,100%)!important;
  max-width:100%!important;
  margin:0 auto!important;
  border-left:0!important;
  border-right:0!important;
  border-bottom:0!important;
  z-index:3!important;
}

/* Do not allow a long post caption to take the comments area away. */
.sp-comments-dialog .sp-dialog-post-head{flex:0 0 auto!important;padding:12px 14px 9px!important}
.sp-comments-dialog .sp-dialog-post-text{
  flex:0 0 auto!important;
  max-height:180px!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  padding:11px 14px 8px!important;
  overscroll-behavior:contain!important;
  scrollbar-width:thin!important;
  scrollbar-color:#aab3bf transparent!important;
}
.sp-comments-dialog .sp-dialog-post-text::-webkit-scrollbar{width:5px!important}
.sp-comments-dialog .sp-dialog-post-text::-webkit-scrollbar-track{background:transparent!important}
.sp-comments-dialog .sp-dialog-post-text::-webkit-scrollbar-thumb{background:#aab3bf!important;border-radius:999px!important}
.sp-comments-dialog .sp-dialog-post-text .sp-post-text{margin:0!important;padding:0!important}
.sp-comments-dialog .sp-dialog-post-text .sp-post-text p{margin:0 0 8px!important}
.sp-comments-dialog .sp-dialog-post-text .sp-post-text p:last-child{margin-bottom:0!important}
.sp-comments-dialog .sp-post-see-more,
.sp-comments-dialog .sp-post-see-less{font-size:14px!important}

.sp-comments-dialog .sp-dialog-statline{flex:0 0 auto!important;padding:8px 14px!important;min-height:38px!important;box-sizing:border-box!important}
.sp-comments-dialog .sp-dialog-actions{flex:0 0 auto!important;padding:4px 8px!important;min-height:48px!important;box-sizing:border-box!important}
.sp-comments-dialog .sp-dialog-comments-head{padding:9px 14px 6px!important;min-height:34px!important;box-sizing:border-box!important}
.sp-comments-dialog .sp-dialog-comments-scroll{
  flex:1 1 0!important;
  min-height:120px!important;
  padding:6px 14px 12px!important;
  scroll-padding-bottom:14px!important;
}
.sp-comments-dialog .sp-dialog-comments-list{gap:12px!important}
.sp-comments-dialog .sp-dialog-comment-bubble{padding:8px 11px!important}

/* Compact, always-visible composer. */
.sp-comments-dialog .sp-dialog-form-shell{
  flex:0 0 auto!important;
  min-height:64px!important;
  padding:8px 12px max(8px,env(safe-area-inset-bottom))!important;
}
.sp-comments-dialog .sp-dialog-comment-input-row{align-items:center!important;gap:8px!important}
.sp-comments-dialog .sp-dialog-comment-input-row>.sp-avatar{width:36px!important;height:36px!important;flex:0 0 36px!important}
.sp-comments-dialog .sp-dialog-comment-input-wrap{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto!important;
  align-items:end!important;
  gap:8px!important;
  padding:7px 8px 7px 12px!important;
  border-radius:20px!important;
  min-height:42px!important;
  box-sizing:border-box!important;
}
.sp-comments-dialog .sp-dialog-comment-input-wrap textarea{
  grid-column:1!important;
  min-height:26px!important;
  height:26px!important;
  max-height:96px!important;
  padding:3px 0!important;
  line-height:20px!important;
  overflow-y:auto!important;
}
.sp-comments-dialog .sp-dialog-comment-actions{
  grid-column:2!important;
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  margin:0!important;
}
.sp-comments-dialog .sp-dialog-comment-actions small{display:none!important}
.sp-comments-dialog .sp-dialog-comment-submit{
  height:34px!important;
  min-width:58px!important;
  padding:0 13px!important;
}

@media(max-width:800px){
  .sp-comments-dialog .sp-dialog-post-text{max-height:110px!important;padding:9px 12px 6px!important}
  .sp-comments-dialog .sp-dialog-comments-scroll{min-height:100px!important;padding:6px 10px 10px!important}
  .sp-comments-dialog .sp-dialog-form-shell{min-height:62px!important;padding:7px 9px max(7px,env(safe-area-inset-bottom))!important}
  .sp-comments-dialog .sp-dialog-comment-input-row>.sp-avatar{width:34px!important;height:34px!important;flex-basis:34px!important}
  .sp-comments-dialog .sp-dialog-comment-submit{min-width:52px!important;padding:0 11px!important}
}

/* V4.5.4 — comments popup never shows the post public title. */
.sp-comments-dialog .sp-post-public-title,
.sp-comments-dialog-body > .sp-post-public-title,
.sp-comments-dialog .sp-dialog-side-pane > .sp-post-public-title{display:none!important;}


/* ==========================================================
   V4.5.5 — text/shared-post comments viewer repair
   Text posts must not inherit the large media-viewer canvas.
   ========================================================== */
.sp-comments-dialog.is-text-post{
  width:min(760px,calc(100vw - 32px))!important;
  height:min(88dvh,780px)!important;
  max-height:88dvh!important;
}
.sp-comments-dialog.is-text-post .sp-comments-dialog-head{
  height:46px!important;
  min-height:46px!important;
}
.sp-comments-dialog.is-text-post .sp-comments-dialog-body{
  background:#fff!important;
}
.sp-comments-dialog.is-text-post .sp-dialog-layout.no-media{
  display:block!important;
  width:100%!important;
  height:100%!important;
  min-height:0!important;
  background:#fff!important;
}
.sp-comments-dialog.is-text-post .sp-dialog-layout.no-media>.sp-dialog-side-pane{
  width:100%!important;
  height:100%!important;
  min-height:0!important;
  border:0!important;
  background:#fff!important;
  overflow:hidden!important;
}
.sp-comments-dialog.is-text-post .sp-dialog-no-media,
.sp-comments-dialog.is-text-post .sp-dialog-no-media-copy{
  display:none!important;
}

/* A title hidden from the popup means every title in popup presentation,
   including the title of an embedded/original shared post. */
.sp-comments-dialog .sp-shared-post-title{display:none!important}
.sp-comments-dialog .sp-shared-post-copy:empty{display:none!important}

/* Shared-post previews inside a conversation should support the discussion,
   not take over the full dialog height. */
.sp-comments-dialog.is-text-post .sp-shared-post-card{
  flex:0 0 auto!important;
  margin:0!important;
  border-left:0!important;
  border-right:0!important;
  border-radius:0!important;
  max-height:300px!important;
  overflow:hidden!important;
}
.sp-comments-dialog.is-text-post .sp-shared-post-author{
  padding:9px 12px 5px!important;
}
.sp-comments-dialog.is-text-post .sp-shared-post-copy{
  max-height:56px!important;
  overflow:hidden!important;
}
.sp-comments-dialog.is-text-post .sp-shared-post-text{
  padding:3px 12px 8px!important;
  display:-webkit-box!important;
  -webkit-line-clamp:2!important;
  -webkit-box-orient:vertical!important;
  overflow:hidden!important;
}
.sp-comments-dialog.is-text-post .sp-shared-post-preview,
.sp-comments-dialog.is-text-post .sp-shared-post-media,
.sp-comments-dialog.is-text-post .sp-shared-post-video .sp-media-item{
  min-height:0!important;
  height:170px!important;
  max-height:170px!important;
}
.sp-comments-dialog.is-text-post .sp-shared-post-preview img,
.sp-comments-dialog.is-text-post .sp-shared-post-video .sp-media-el{
  width:100%!important;
  height:100%!important;
  max-height:170px!important;
  object-fit:cover!important;
}
.sp-comments-dialog.is-text-post .sp-shared-post-footer{display:none!important}

/* Keep the actual conversation usable regardless of long captions/shared cards. */
.sp-comments-dialog.is-text-post .sp-dialog-post-head{padding:10px 13px 8px!important}
.sp-comments-dialog.is-text-post .sp-dialog-post-text{
  max-height:104px!important;
  padding:9px 13px 7px!important;
}
.sp-comments-dialog.is-text-post .sp-dialog-statline{padding:7px 13px!important;min-height:36px!important}
.sp-comments-dialog.is-text-post .sp-dialog-actions{min-height:46px!important}
.sp-comments-dialog.is-text-post .sp-dialog-comments-head{padding:8px 13px 5px!important}
.sp-comments-dialog.is-text-post .sp-dialog-comments-scroll{
  flex:1 1 0!important;
  min-height:110px!important;
  padding:5px 13px 10px!important;
}
.sp-comments-dialog.is-text-post .sp-dialog-form-shell{
  flex:0 0 auto!important;
  min-height:62px!important;
  padding:7px 10px max(7px,env(safe-area-inset-bottom))!important;
}

/* Never let the comment bubble/composer content bleed out of the column. */
.sp-comments-dialog .sp-dialog-comment,
.sp-comments-dialog .sp-dialog-comment-body,
.sp-comments-dialog .sp-dialog-comment-bubble,
.sp-comments-dialog .sp-dialog-comment-input-wrap{max-width:100%!important;box-sizing:border-box!important}
.sp-comments-dialog .sp-dialog-comment-text{overflow-wrap:anywhere!important;word-break:break-word!important}

@media(max-width:800px){
  .sp-comments-dialog.is-text-post{
    width:100vw!important;
    height:100dvh!important;
    max-height:100dvh!important;
    border-radius:0!important;
  }
  .sp-comments-dialog.is-text-post .sp-comments-dialog-head{height:50px!important;min-height:50px!important}
  .sp-comments-dialog.is-text-post .sp-shared-post-card{max-height:250px!important}
  .sp-comments-dialog.is-text-post .sp-shared-post-preview,
  .sp-comments-dialog.is-text-post .sp-shared-post-media,
  .sp-comments-dialog.is-text-post .sp-shared-post-video .sp-media-item{height:145px!important;max-height:145px!important}
  .sp-comments-dialog.is-text-post .sp-shared-post-preview img,
  .sp-comments-dialog.is-text-post .sp-shared-post-video .sp-media-el{max-height:145px!important}
  .sp-comments-dialog.is-text-post .sp-dialog-post-text{max-height:88px!important}
}


/* V4.5.6 — robust text-post popup fallback cleanup + avatar/profile alignment */
.sp-comments-dialog.is-text-post .sp-dialog-layout.no-media{max-width:760px;margin:0 auto!important}
.sp-comments-dialog.is-text-post .sp-dialog-layout.no-media > :not(.sp-dialog-side-pane){display:none!important}
.sp-comments-dialog.is-text-post .sp-dialog-side-pane{box-shadow:none!important}
.sp-comments-dialog .sp-avatar,
.sp-comments-dialog .sp-avatar img,
.sp-dialog-comment .sp-avatar,
.sp-dialog-comment .sp-avatar img,
.sp-dialog-comment-input-row .sp-avatar,
.sp-dialog-comment-input-row .sp-avatar img,
.sp-contacts-list .sp-avatar,
.sp-contacts-list .sp-avatar img,
.sp-message-thread .sp-avatar,
.sp-message-thread .sp-avatar img{
  border-radius:999px!important;
  overflow:hidden!important;
}
.sp-comments-dialog .sp-avatar img,
.sp-dialog-comment .sp-avatar img,
.sp-dialog-comment-input-row .sp-avatar img,
.sp-contacts-list .sp-avatar img,
.sp-message-thread .sp-avatar img{
  width:100%!important;
  height:100%!important;
  object-fit:cover!important;
  display:block!important;
}
.sp-profile-summary-stats,
.sp-profile-stats,
.sp-profile-metrics{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:10px!important;
}
.sp-profile-summary-stats .sp-stat,
.sp-profile-stats .sp-stat,
.sp-profile-metrics .sp-stat{
  min-width:0!important;
  padding:8px 10px!important;
  border-radius:12px!important;
  background:#f8fafc!important;
  text-align:center!important;
}
.sp-profile-summary-stats .sp-stat strong,
.sp-profile-stats .sp-stat strong,
.sp-profile-metrics .sp-stat strong{display:block!important;font-size:18px!important;line-height:1.1!important}
.sp-profile-summary-stats .sp-stat span,
.sp-profile-stats .sp-stat span,
.sp-profile-metrics .sp-stat span{display:block!important;font-size:13px!important;color:#64748b!important;line-height:1.2!important}
@media (max-width: 640px){
  .sp-profile-summary-stats,
  .sp-profile-stats,
  .sp-profile-metrics{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}


/* V4.5.8 — comments popup UI polish */
.sp-comments-modal{backdrop-filter:blur(10px);background:rgba(17,24,39,.42)!important}
.sp-comments-dialog{border-radius:22px!important;box-shadow:0 28px 80px rgba(15,23,42,.28)!important;background:#fff!important;overflow:hidden!important}
.sp-comments-dialog-head{background:linear-gradient(180deg,#ffffff 0%,#fbfcff 100%)!important;border-bottom:1px solid #e8edf5!important}
.sp-comments-dialog-close{background:#f2f5fb!important;color:#475569!important;border:1px solid #e2e8f0!important;box-shadow:0 2px 8px rgba(15,23,42,.06)!important}
.sp-comments-dialog-close:hover{background:#e8eef8!important;color:#1e293b!important;transform:translateY(-1px)!important}
.sp-comments-dialog-body{background:#fff!important}
.sp-comments-dialog .sp-dialog-layout.has-media{background:#fff!important}
.sp-comments-dialog .sp-dialog-media-pane{background:#0f172a!important}
.sp-comments-dialog .sp-dialog-media-inner{padding:0!important;background:#0f172a!important}
.sp-comments-dialog .sp-dialog-media-pane .sp-media-grid{background:#0f172a!important}
.sp-comments-dialog .sp-dialog-media-inner>.sp-feed-banner-ad{margin:0!important;border-top:1px solid rgba(255,255,255,.08)!important;border-bottom:1px solid rgba(255,255,255,.08)!important}
.sp-comments-dialog .sp-dialog-side-pane{background:#fff!important}
.sp-comments-dialog .sp-dialog-post-head{padding:14px 16px 10px!important;border-bottom:1px solid #edf2f7!important;background:#fff!important}
.sp-comments-dialog .sp-dialog-post-author{gap:10px!important}
.sp-comments-dialog .sp-dialog-post-head .sp-avatar{width:46px!important;height:46px!important;flex:0 0 46px!important;border-radius:999px!important;overflow:hidden!important;box-shadow:0 2px 10px rgba(15,23,42,.08)!important}
.sp-comments-dialog .sp-dialog-post-head .sp-avatar img{width:100%!important;height:100%!important;object-fit:cover!important;display:block!important;border-radius:999px!important}
.sp-comments-dialog .sp-dialog-post-author strong{font-size:15px!important;font-weight:800!important;color:#162033!important}
.sp-comments-dialog .sp-dialog-post-meta{font-size:12px!important;color:#64748b!important}
.sp-comments-dialog .sp-dialog-post-text{padding:10px 16px 8px!important;color:#253041!important;font-size:15px!important;line-height:1.58!important;background:#fff!important}
.sp-comments-dialog .sp-dialog-post-text .sp-post-text{color:#253041!important}
.sp-comments-dialog .sp-dialog-post-text .sp-post-see-more,
.sp-comments-dialog .sp-dialog-post-text .sp-post-see-less{font-weight:700!important;color:#2563eb!important}
.sp-comments-dialog .sp-shared-post-card{margin:8px 16px 12px!important;border:1px solid #e2e8f0!important;border-radius:16px!important;overflow:hidden!important;background:#fbfdff!important;box-shadow:0 6px 20px rgba(15,23,42,.05)!important}
.sp-comments-dialog .sp-shared-post-author{padding:12px 14px!important}
.sp-comments-dialog .sp-shared-post-copy,.sp-comments-dialog .sp-shared-post-text{padding-left:14px!important;padding-right:14px!important}
.sp-comments-dialog .sp-dialog-statline{padding:10px 16px!important;border-top:1px solid #edf2f7!important;border-bottom:1px solid #edf2f7!important;background:#fff!important;color:#64748b!important}
.sp-comments-dialog .sp-dialog-statline .sp-reactions-inline{gap:2px!important}
.sp-comments-dialog .sp-dialog-actions{padding:6px 10px!important;border-bottom:1px solid #edf2f7!important;background:#fff!important}
.sp-comments-dialog .sp-dialog-actions .sp-btn-icon{border-radius:12px!important;font-weight:700!important;color:#475569!important;transition:background .18s ease,color .18s ease,transform .18s ease!important}
.sp-comments-dialog .sp-dialog-actions .sp-btn-icon:hover{background:#f4f7fb!important;color:#1d4ed8!important;transform:translateY(-1px)!important}
.sp-comments-dialog .sp-dialog-comments-head{padding:12px 16px 6px!important;font-weight:800!important;color:#162033!important;background:linear-gradient(180deg,#ffffff 0%,#fbfcff 100%)!important}
.sp-comments-dialog .sp-dialog-comments-head .sp-icon{color:#94a3b8!important}
.sp-comments-dialog .sp-dialog-comments-scroll{padding:8px 16px 14px!important;background:#fff!important}
.sp-comments-dialog .sp-dialog-comments-list{gap:14px!important}
.sp-comments-dialog .sp-dialog-comment{align-items:flex-start!important;gap:10px!important}
.sp-comments-dialog .sp-dialog-comment .sp-avatar{width:40px!important;height:40px!important;flex:0 0 40px!important;border-radius:999px!important;overflow:hidden!important;box-shadow:0 2px 8px rgba(15,23,42,.06)!important}
.sp-comments-dialog .sp-dialog-comment .sp-avatar img{width:100%!important;height:100%!important;object-fit:cover!important;border-radius:999px!important;display:block!important}
.sp-comments-dialog .sp-dialog-comment-bubble{background:linear-gradient(180deg,#f8fbff 0%,#f1f5f9 100%)!important;border:1px solid #e5eaf1!important;border-radius:18px!important;padding:10px 13px!important;box-shadow:0 4px 14px rgba(15,23,42,.04)!important}
.sp-comments-dialog .sp-dialog-comment-bubble strong{display:block!important;font-size:13px!important;font-weight:800!important;color:#162033!important;margin-bottom:2px!important}
.sp-comments-dialog .sp-dialog-comment-text{font-size:14px!important;line-height:1.48!important;color:#334155!important}
.sp-comments-dialog .sp-dialog-comment-meta{padding-left:6px!important;color:#94a3b8!important;font-size:11px!important;font-weight:600!important}
.sp-comments-dialog .sp-dialog-form-shell{padding:10px 14px max(10px,env(safe-area-inset-bottom))!important;background:linear-gradient(180deg,#ffffff 0%,#fbfcff 100%)!important;border-top:1px solid #edf2f7!important;box-shadow:0 -8px 24px rgba(15,23,42,.04)!important}
.sp-comments-dialog .sp-dialog-comment-input-row{gap:10px!important;align-items:flex-end!important}
.sp-comments-dialog .sp-dialog-comment-input-row>.sp-avatar{width:38px!important;height:38px!important;flex:0 0 38px!important;border-radius:999px!important;overflow:hidden!important;box-shadow:0 2px 8px rgba(15,23,42,.06)!important}
.sp-comments-dialog .sp-dialog-comment-input-row>.sp-avatar img{width:100%!important;height:100%!important;object-fit:cover!important;border-radius:999px!important;display:block!important}
.sp-comments-dialog .sp-dialog-comment-input-wrap{background:#f8fafc!important;border:1px solid #dbe4ee!important;border-radius:18px!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.7)!important}
.sp-comments-dialog .sp-dialog-comment-input-wrap:focus-within{background:#fff!important;border-color:#93c5fd!important;box-shadow:0 0 0 4px rgba(59,130,246,.12)!important}
.sp-comments-dialog .sp-dialog-comment-input-wrap textarea{font-size:14px!important;line-height:1.45!important;color:#1f2937!important;padding:11px 14px!important;min-height:46px!important;max-height:120px!important}
.sp-comments-dialog .sp-dialog-comment-input-wrap textarea::placeholder{color:#94a3b8!important}
.sp-comments-dialog .sp-dialog-comment-submit{min-width:64px!important;height:40px!important;border-radius:999px!important;background:linear-gradient(180deg,#2d7dff 0%,#1660e8 100%)!important;color:#fff!important;border:0!important;box-shadow:0 10px 24px rgba(37,99,235,.22)!important;font-weight:800!important;letter-spacing:.01em!important}
.sp-comments-dialog .sp-dialog-comment-submit:hover{transform:translateY(-1px)!important;box-shadow:0 14px 28px rgba(37,99,235,.28)!important}
.sp-comments-dialog .sp-dialog-comment-submit:disabled{box-shadow:none!important;opacity:.66!important}
.sp-comments-dialog .sp-dialog-comments-empty{margin:10px 0 0!important;padding:24px 18px!important;border:1px dashed #d6dfeb!important;border-radius:18px!important;background:#f8fbff!important;color:#64748b!important;text-align:center!important}
@media (max-width: 900px){
  .sp-comments-dialog{border-radius:20px 20px 0 0!important}
  .sp-comments-dialog .sp-dialog-post-head{padding:12px 13px 8px!important}
  .sp-comments-dialog .sp-dialog-post-text{padding:8px 13px 6px!important;font-size:14px!important}
  .sp-comments-dialog .sp-shared-post-card{margin:8px 13px 10px!important;border-radius:14px!important}
  .sp-comments-dialog .sp-dialog-statline{padding:9px 13px!important}
  .sp-comments-dialog .sp-dialog-comments-head{padding:10px 13px 5px!important}
  .sp-comments-dialog .sp-dialog-comments-scroll{padding:7px 13px 12px!important}
  .sp-comments-dialog .sp-dialog-form-shell{padding:8px 10px max(8px,env(safe-area-inset-bottom))!important}
  .sp-comments-dialog .sp-dialog-comment-input-wrap textarea{min-height:44px!important}
}


/* V4.5.9 — shared media in comments popup uses the same side-by-side viewer */
.sp-comments-dialog .sp-dialog-layout.has-shared-media .sp-dialog-media-pane{display:block!important}
.sp-comments-dialog .sp-dialog-layout.has-shared-media .sp-shared-post-preview,
.sp-comments-dialog .sp-dialog-layout.has-shared-media .sp-shared-post-media{display:none!important}
.sp-comments-dialog .sp-dialog-layout.has-shared-media .sp-shared-post-card{margin:8px 16px 12px!important}
.sp-comments-dialog .sp-dialog-layout.has-shared-media .sp-shared-post-copy{pointer-events:none!important}
.sp-comments-dialog .sp-shared-modal-preview{position:relative;width:100%;height:100%;display:flex;align-items:center;justify-content:center;background:#0f172a;overflow:hidden}
.sp-comments-dialog .sp-shared-modal-preview img.sp-media-el{width:100%!important;height:100%!important;object-fit:contain!important;background:#0f172a!important}
.sp-comments-dialog .sp-shared-modal-preview .sp-media-play-badge{position:absolute;inset:50% auto auto 50%;transform:translate(-50%,-50%);width:68px;height:68px;border-radius:999px;display:flex;align-items:center;justify-content:center;background:rgba(15,23,42,.62);backdrop-filter:blur(4px);border:2px solid rgba(255,255,255,.38);box-shadow:0 14px 40px rgba(0,0,0,.28)}
.sp-comments-dialog .sp-shared-modal-preview .sp-media-play-badge svg{width:28px;height:28px;color:#fff}
@media (min-width:801px){
  .sp-comments-dialog .sp-dialog-layout.has-shared-media{display:grid!important;grid-template-columns:minmax(0,1fr) clamp(420px,39vw,470px)!important}
}
@media (max-width:800px){
  .sp-comments-dialog .sp-dialog-layout.has-shared-media{display:block!important}
}


/* V4.6.0 — profile header stat card cleanup */
.sp-profile-stats a,
.sp-profile-stats .sp-profile-mutual-stat{
  transition:background .18s ease,border-color .18s ease,transform .18s ease,color .18s ease;
}
.sp-profile-stats a:hover,
.sp-profile-stats .sp-profile-mutual-stat:hover{
  text-decoration:none!important;
}
@media (max-width:760px){
  .sp-profile-name-block{width:100%!important;align-items:center!important}
  .sp-profile-stats{
    width:100%!important;
    justify-content:center!important;
    align-items:stretch!important;
    flex-wrap:wrap!important;
    gap:10px!important;
    margin-top:12px!important;
  }
  .sp-profile-stats > span{display:none!important}
  .sp-profile-stats a,
  .sp-profile-stats .sp-profile-mutual-stat{
    min-width:84px;
    flex:0 1 auto;
    padding:8px 10px;
    border:1px solid #e6ecf4;
    border-radius:14px;
    background:#f8fbff;
    display:flex!important;
    flex-direction:column!important;
    align-items:center!important;
    justify-content:center!important;
    gap:2px;
    line-height:1.15!important;
    text-align:center!important;
    color:#667085!important;
    box-shadow:0 1px 0 rgba(255,255,255,.9) inset;
  }
  .sp-profile-stats a strong,
  .sp-profile-stats .sp-profile-mutual-stat strong{
    display:block;
    font-size:18px;
    line-height:1;
    color:#182230;
    font-weight:800;
  }
  .sp-profile-friend-stack{
    width:100%;
    justify-content:center!important;
    padding-left:0!important;
    margin-top:12px!important;
  }
  .sp-profile-friend-stack a{margin-left:-6px!important}
  .sp-profile-friend-stack a:first-child{margin-left:0!important}
  .sp-profile-friend-stack .sp-avatar{
    width:34px!important;
    height:34px!important;
    border:2px solid #fff!important;
    box-shadow:0 4px 10px rgba(15,23,42,.08);
  }
}
@media (max-width:460px){
  .sp-profile-cover{height:188px!important}
  .sp-profile-avatar-wrap{
    width:104px!important;
    height:104px!important;
    margin-top:-40px!important;
  }
  .sp-profile-avatar-wrap>.sp-avatar{
    width:104px!important;
    height:104px!important;
    border-width:4px!important;
  }
  .sp-profile-name-block h1{
    font-size:22px!important;
    line-height:1.08!important;
  }
  .sp-profile-stats{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:8px!important;
  }
  .sp-profile-stats a,
  .sp-profile-stats .sp-profile-mutual-stat{
    min-width:0!important;
    width:100%!important;
    padding:9px 8px!important;
    border-radius:12px!important;
  }
  .sp-profile-stats a strong,
  .sp-profile-stats .sp-profile-mutual-stat strong{font-size:17px!important}
}


/* V4.6.1 — profile header UI refinement: sizing + positioning */
.sp-profile-hero{
  overflow:hidden;
}
.sp-profile-identity{
  position:relative;
  z-index:3;
}
.sp-profile-name-block{
  display:flex;
  flex-direction:column;
  justify-content:flex-end;
  gap:0;
}
.sp-profile-name-block h1{
  display:flex;
  align-items:center;
  gap:8px;
}
.sp-profile-stats{
  margin-top:10px!important;
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:10px 12px!important;
}
.sp-profile-stats > a,
.sp-profile-stats > .sp-profile-mutual-stat{
  display:inline-flex;
  align-items:center;
  gap:6px;
  min-height:40px;
  padding:8px 12px;
  border-radius:14px;
  background:#f8fafc;
  border:1px solid #e7edf5;
  color:#667085;
  font-size:13px;
  font-weight:700;
  line-height:1.15;
}
.sp-profile-stats > a strong,
.sp-profile-stats > .sp-profile-mutual-stat strong{
  font-size:16px;
  line-height:1;
  color:#0f172a;
  font-weight:800;
}
.sp-profile-stats > span{display:none!important}
.sp-profile-stats > a:hover,
.sp-profile-stats > .sp-profile-mutual-stat:hover{
  background:#eef5ff;
  border-color:#cfe0ff;
  color:#2057d5!important;
  transform:translateY(-1px);
}
.sp-profile-name-block > p{
  margin-top:10px!important;
}
.sp-profile-friend-stack{
  margin-top:12px!important;
  padding-left:2px!important;
}
.sp-profile-friend-stack a{margin-left:-7px!important}
.sp-profile-friend-stack a:first-child{margin-left:0!important}
.sp-profile-friend-stack .sp-avatar{
  width:34px!important;
  height:34px!important;
  border:2px solid #fff!important;
  box-shadow:0 6px 16px rgba(15,23,42,.08);
}
.sp-profile-avatar-wrap{
  display:flex;
  align-items:flex-end;
  justify-content:center;
}
.sp-profile-avatar-wrap > .sp-avatar{
  background:#fff;
}
.sp-profile-actions{
  align-self:end;
  padding-bottom:2px;
}
@media (max-width:980px){
  .sp-profile-identity{
    width:min(100%,calc(100% - 20px))!important;
    grid-template-columns:150px minmax(0,1fr)!important;
    gap:16px!important;
    padding:0 8px 20px!important;
  }
  .sp-profile-avatar-wrap{width:148px!important;height:148px!important;margin-top:-54px!important}
  .sp-profile-avatar-wrap > .sp-avatar{width:148px!important;height:148px!important}
  .sp-profile-actions{grid-column:1 / -1;justify-content:flex-start!important;padding-top:4px}
}
@media (max-width:760px){
  .sp-profile-identity{
    grid-template-columns:1fr!important;
    justify-items:center!important;
    text-align:center!important;
    gap:10px!important;
    padding:0 14px 18px!important;
  }
  .sp-profile-name-block{
    width:100%!important;
    align-items:center!important;
  }
  .sp-profile-name-block h1{
    justify-content:center!important;
    text-align:center!important;
  }
  .sp-profile-stats{
    width:100%!important;
    justify-content:center!important;
    gap:8px!important;
  }
  .sp-profile-stats > a,
  .sp-profile-stats > .sp-profile-mutual-stat{
    min-width:92px;
    flex:0 1 auto;
    padding:9px 10px!important;
    border-radius:15px!important;
    display:flex!important;
    flex-direction:column!important;
    justify-content:center!important;
    align-items:center!important;
    gap:3px!important;
  }
  .sp-profile-stats > a strong,
  .sp-profile-stats > .sp-profile-mutual-stat strong{
    font-size:18px!important;
  }
  .sp-profile-friend-stack{
    width:100%!important;
    justify-content:center!important;
    padding-left:0!important;
  }
  .sp-profile-actions{
    width:100%!important;
    justify-content:center!important;
  }
}
@media (max-width:460px){
  .sp-profile-cover{height:182px!important}
  .sp-profile-avatar-wrap{
    width:96px!important;
    height:96px!important;
    margin-top:-36px!important;
  }
  .sp-profile-avatar-wrap > .sp-avatar{
    width:96px!important;
    height:96px!important;
  }
  .sp-profile-name-block h1{
    font-size:21px!important;
  }
  .sp-profile-stats{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr));
    width:100%!important;
  }
  .sp-profile-stats > a,
  .sp-profile-stats > .sp-profile-mutual-stat{
    min-width:0!important;
    width:100%!important;
  }
  .sp-profile-friend-stack .sp-avatar{
    width:30px!important;
    height:30px!important;
  }
}


/* V4.6.2 — profile stats no-clipping fix */
.sp-profile-hero{overflow:visible!important}
.sp-profile-stats{
  display:flex!important;
  flex-wrap:wrap!important;
  align-items:center!important;
  justify-content:flex-start!important;
  gap:8px!important;
  overflow:visible!important;
}
.sp-profile-stats > a,
.sp-profile-stats > .sp-profile-mutual-stat{
  flex:0 0 auto!important;
  width:auto!important;
  min-width:max-content!important;
  max-width:none!important;
  white-space:nowrap!important;
  overflow:visible!important;
  text-overflow:clip!important;
  display:inline-flex!important;
  flex-direction:row!important;
  align-items:center!important;
  justify-content:center!important;
  gap:5px!important;
  min-height:38px!important;
  padding:8px 12px!important;
  box-sizing:border-box!important;
}
.sp-profile-stats > a strong,
.sp-profile-stats > .sp-profile-mutual-stat strong{
  flex:0 0 auto!important;
  white-space:nowrap!important;
}
.sp-profile-friend-stack{
  overflow:visible!important;
  padding-bottom:4px!important;
}
.sp-profile-friend-stack a,
.sp-profile-friend-stack .sp-avatar{
  overflow:visible!important;
}
@media (max-width:760px){
  .sp-profile-stats{
    width:100%!important;
    justify-content:center!important;
    display:flex!important;
    flex-wrap:wrap!important;
  }
  .sp-profile-stats > a,
  .sp-profile-stats > .sp-profile-mutual-stat{
    min-width:max-content!important;
    width:auto!important;
    flex:0 0 auto!important;
    flex-direction:row!important;
    padding:8px 11px!important;
    font-size:13px!important;
  }
  .sp-profile-stats > a strong,
  .sp-profile-stats > .sp-profile-mutual-stat strong{
    font-size:15px!important;
  }
}
@media (max-width:460px){
  .sp-profile-stats{
    display:flex!important;
    flex-wrap:wrap!important;
    justify-content:center!important;
    gap:7px!important;
  }
  .sp-profile-stats > a,
  .sp-profile-stats > .sp-profile-mutual-stat{
    min-width:max-content!important;
    width:auto!important;
    padding:7px 10px!important;
    border-radius:12px!important;
    font-size:12px!important;
  }
  .sp-profile-stats > a strong,
  .sp-profile-stats > .sp-profile-mutual-stat strong{
    font-size:14px!important;
  }
  .sp-profile-friend-stack{
    margin-top:10px!important;
    padding-bottom:8px!important;
  }
}


/* V4.6.3 — definitive mini profile/friend avatar crop fix */
.sp-profile-friend-stack{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-start;
  min-height:38px!important;
  overflow:visible!important;
}
.sp-profile-friend-stack a{
  width:34px!important;
  height:34px!important;
  flex:0 0 34px!important;
  display:block!important;
  position:relative!important;
  overflow:hidden!important;
  border-radius:50%!important;
  line-height:0!important;
  background:#eef2f7!important;
  box-shadow:0 4px 12px rgba(15,23,42,.10)!important;
}
.sp-profile-friend-stack a + a{margin-left:-7px!important}
.sp-profile-friend-stack a:first-child{margin-left:0!important}
.sp-profile-friend-stack img.sp-avatar,
.sp-profile-friend-stack .sp-avatar{
  width:34px!important;
  height:34px!important;
  min-width:34px!important;
  min-height:34px!important;
  max-width:34px!important;
  max-height:34px!important;
  aspect-ratio:1 / 1!important;
  display:block!important;
  object-fit:cover!important;
  object-position:center!important;
  border-radius:50%!important;
  border:2px solid #fff!important;
  box-sizing:border-box!important;
  overflow:hidden!important;
  margin:0!important;
  padding:0!important;
}
@media(max-width:460px){
  .sp-profile-friend-stack a{
    width:32px!important;
    height:32px!important;
    flex-basis:32px!important;
  }
  .sp-profile-friend-stack img.sp-avatar,
  .sp-profile-friend-stack .sp-avatar{
    width:32px!important;
    height:32px!important;
    min-width:32px!important;
    min-height:32px!important;
    max-width:32px!important;
    max-height:32px!important;
  }
}
