/* Refinamentos finais de timeline, comentários, perfil e modalidades de entrada. */

body.social-ui-v2 .server-live-pill.is-unknown i {
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb,var(--accent) 16%,transparent);
}

/* Professional motion layer: unified easing, tactile feedback and media polish. */
body.social-ui-v2 {
  --motion-fast: 140ms;
  --motion-med: 240ms;
  --motion-slow: 420ms;
  --motion-reveal: 560ms;
  --motion-spring: cubic-bezier(.2,.86,.24,1);
  --motion-pop: cubic-bezier(.18,1.35,.28,1);
  --motion-exit: cubic-bezier(.42,0,.72,.18);
  --motion-glow: color-mix(in srgb,var(--accent) 32%,transparent);
}

body.social-ui-v2 .motion-reveal {
  opacity: 0;
  transform: translate3d(0,16px,0) scale(.985);
  filter: blur(4px);
  will-change: transform, opacity, filter;
}

body.social-ui-v2 .motion-reveal.is-motion-visible {
  animation: socialMotionReveal var(--motion-reveal) var(--motion-spring) both;
  animation-delay: var(--motion-delay,0ms);
}

body.social-ui-v2 .motion-pressable {
  transform-origin: center;
  backface-visibility: hidden;
  -webkit-tap-highlight-color: transparent;
}

body.social-ui-v2 .motion-pressable.is-pressing {
  transform: translate3d(0,1px,0) scale(.975) !important;
  filter: brightness(1.04);
}

body.social-ui-v2 .has-motion-ripple {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

body.social-ui-v2 .motion-ripple {
  position: absolute;
  z-index: 0;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: radial-gradient(circle,color-mix(in srgb,#fff 70%,var(--accent) 30%) 0%,color-mix(in srgb,var(--accent) 36%,transparent) 48%,transparent 72%);
  opacity: .55;
  pointer-events: none;
  transform: translate3d(0,0,0) scale(0);
  animation: socialMotionRipple 620ms var(--motion-spring) forwards;
}

body.social-ui-v2 .motion-pop {
  animation: socialMotionPop 420ms var(--motion-pop);
}

body.social-ui-v2 :is(
  .btn,
  .tbtn,
  .mbtn,
  .pa,
  .comment-pa,
  .preview-comment-action,
  .preview-more-btn,
  .more-btn,
  .pm-item,
  .tab,
  .rnav-item,
  .story-item,
  .story-action-circle,
  .story-nav,
  .story-like,
  .story-share,
  .story-reply-send,
  .story-reaction-open,
  .story-camera-icon,
  .story-camera-actions button,
  .story-filter-row button,
  .share-mode-choice,
  .share-chat-row,
  .share-send-btn,
  .share-outside-mini,
  .social-user-row,
  .profile-notif-option,
  .profile-notif-btn,
  .search-result,
  .notif-full-row,
  .trend-item,
  .player-row,
  .rel-row,
  .poll-option,
  .media-tile,
  .post-media,
  .comment-media-btn,
  .lb-act,
  .lb-nav,
  .lb-zoom-btn,
  .lb-mob-btn,
  .lb-mob-menu-item,
  .toast-action
) {
  transition:
    transform var(--motion-fast) var(--motion-spring),
    background-color var(--motion-fast) ease,
    border-color var(--motion-fast) ease,
    color var(--motion-fast) ease,
    box-shadow var(--motion-fast) ease,
    filter var(--motion-fast) ease;
}

body.social-ui-v2 :is(.post-card,.composer,.card,.profile-hero,.search-hero,.search-results-panel,.search-side-panel,.compact-tool-card,.feed-end-card) {
  transition:
    transform var(--motion-med) var(--motion-spring),
    border-color var(--motion-med) ease,
    box-shadow var(--motion-med) ease,
    background-color var(--motion-med) ease;
}

body.social-ui-v2 :is(.post-media,.comment-media-btn,.media-tile,.media-preview-item,.story-camera-frame,.lb-img-wrap) {
  position: relative;
  overflow: hidden;
  transform: translateZ(0);
}

body.social-ui-v2 :is(.post-media,.comment-media-btn,.media-tile,.media-preview-item,.story-camera-frame)::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg,transparent 0%,rgba(255,255,255,.16) 42%,transparent 64%);
  opacity: 0;
  transform: translate3d(-120%,0,0);
  pointer-events: none;
}

body.social-ui-v2 :is(.post-media,.comment-media-btn,.media-tile,.media-preview-item,.story-camera-frame) img {
  transition:
    transform 520ms var(--motion-spring),
    filter 360ms ease,
    opacity 260ms ease;
  will-change: transform, filter;
}

body.social-ui-v2 .media-preview-item {
  animation: socialMotionMediaAdd 340ms var(--motion-pop) both;
}

body.social-ui-v2 .post-skel::after,
body.social-ui-v2 .skel::after {
  animation: socialMotionShimmer 1.25s linear infinite;
}

body.social-ui-v2 .backdrop.show:not(.sheet-closing),
body.social-ui-v2 .social-sheet-overlay.show:not(.sheet-closing),
body.social-ui-v2 .mobile-drawer-shell.show {
  animation: socialMotionBackdropIn var(--motion-med) ease both;
}

body.social-ui-v2 .backdrop.show:not(.sheet-closing) .sheet,
body.social-ui-v2 .social-sheet-overlay.show:not(.sheet-closing) .social-sheet {
  animation: socialMotionSheetIn 460ms var(--motion-pop) both;
  transform-origin: center bottom;
}

body.social-ui-v2 .backdrop.sheet-closing .sheet,
body.social-ui-v2 .social-sheet-overlay.sheet-closing .social-sheet {
  animation: socialMotionSheetOut 230ms var(--motion-exit) both !important;
}

body.social-ui-v2 .mobile-drawer-shell.show .mobile-drawer {
  animation: socialMotionDrawerIn 360ms var(--motion-spring) both;
}

body.social-ui-v2 :is(.post-menu.show,.notif-menu.show,.account-menu.show,.mention-box.show,.lb-mob-menu:not([hidden])) {
  animation: socialMotionMenuIn 180ms var(--motion-spring) both;
  transform-origin: top right;
}

body.social-ui-v2 #new-posts-pill:not([hidden]) {
  animation: socialMotionPillIn 360ms var(--motion-pop) both;
}

body.social-ui-v2 .toast {
  animation: socialMotionToastIn 380ms var(--motion-pop) both;
}

body.social-ui-v2 .toast.leaving {
  animation: socialMotionToastOut 220ms var(--motion-exit) forwards;
}

body.social-ui-v2 #lb.lb.is-open .lb-bg {
  animation: socialMotionBackdropIn 220ms ease both;
}

body.social-ui-v2 #lb.lb.is-open .lb-img {
  animation: socialMotionLightboxMediaIn 420ms var(--motion-spring) both;
}

body.social-ui-v2 #lb.lb.is-open .lb-panel {
  animation: socialMotionPanelIn 360ms var(--motion-spring) both;
}

body.social-ui-v2 #lb.lb.is-open :is(.lb-mob-top,.lb-zoom-ctrl) {
  animation: socialMotionSlideDown 330ms var(--motion-spring) both;
}

body.social-ui-v2 #lb.lb.is-open .lb-mob-bottom {
  animation: socialMotionSlideUp 330ms var(--motion-spring) both;
}

body.social-ui-v2 #lb .lb-img.is-loading {
  opacity: .36;
  filter: blur(9px) saturate(.72);
}

body.social-ui-v2 #lb .lb-img-wrap.is-grabbing .lb-img,
body.social-ui-v2 #lb .lb-img-wrap.is-gesturing .lb-img {
  transition: none !important;
}

body.social-ui-v2 .story-viewer:not([hidden]) .story-stage {
  animation: socialMotionStoryIn 340ms var(--motion-spring) both;
}

body.social-ui-v2 .story-reaction-tray:not([hidden]) {
  animation: socialMotionTrayIn 220ms var(--motion-pop) both;
}

body.social-ui-v2 .story-gesture-feedback span {
  animation: socialMotionPop 420ms var(--motion-pop);
}

body.social-ui-v2 .story-progress i::after {
  transition: width 120ms linear;
}

body.social-ui-v2 .story-ring::before {
  transition: filter var(--motion-med) ease, opacity var(--motion-med) ease, transform var(--motion-med) var(--motion-spring);
}

body.social-ui-v2 .story-item.is-unseen .story-ring::before {
  animation: socialMotionStoryRing 2.8s linear infinite;
}

@media (hover:hover) and (pointer:fine) {
  body.social-ui-v2 :is(.post-card,.compact-tool-card,.search-result,.notif-full-row,.trend-item,.player-row,.share-chat-row,.social-user-row,.profile-notif-option,.rel-row):hover {
    transform: translate3d(0,-2px,0);
    box-shadow: 0 14px 34px rgba(0,0,0,.18);
  }

  body.social-ui-v2 :is(.post-media,.comment-media-btn,.media-tile):hover img {
    transform: scale(1.035);
    filter: saturate(1.08) contrast(1.03);
  }

  body.social-ui-v2 :is(.post-media,.comment-media-btn,.media-tile,.media-preview-item,.story-camera-frame):hover::after {
    animation: socialMotionImageSheen 720ms ease;
  }

  body.social-ui-v2 :is(.btn,.tbtn,.mbtn,.pa,.comment-pa,.preview-comment-action,.story-item,.share-mode-choice,.lb-act,.lb-nav,.lb-zoom-btn):hover {
    filter: brightness(1.07);
  }
}

@media (hover:none), (pointer:coarse) {
  body.social-ui-v2 .motion-pressable.is-pressing {
    transform: scale(.955) !important;
  }

  body.social-ui-v2 :is(.post-card,.compact-tool-card,.search-result,.notif-full-row,.trend-item,.player-row,.share-chat-row,.social-user-row,.profile-notif-option,.rel-row):hover {
    box-shadow: none;
  }
}

@keyframes socialMotionReveal {
  0% { opacity: 0; transform: translate3d(0,16px,0) scale(.985); filter: blur(4px); }
  68% { opacity: 1; transform: translate3d(0,-2px,0) scale(1.002); filter: blur(0); }
  100% { opacity: 1; transform: translate3d(0,0,0) scale(1); filter: blur(0); }
}

@keyframes socialMotionRipple {
  0% { opacity: .52; transform: scale(0); }
  70% { opacity: .18; }
  100% { opacity: 0; transform: scale(16); }
}

@keyframes socialMotionPop {
  0% { transform: scale(.88); }
  55% { transform: scale(1.13); }
  100% { transform: scale(1); }
}

@keyframes socialMotionMediaAdd {
  0% { opacity: 0; transform: scale(.92) translateY(8px); filter: blur(4px); }
  100% { opacity: 1; transform: scale(1) translateY(0); filter: blur(0); }
}

@keyframes socialMotionShimmer {
  to { transform: translateX(110%); }
}

@keyframes socialMotionBackdropIn {
  from { opacity: 0; backdrop-filter: blur(0); -webkit-backdrop-filter: blur(0); }
  to { opacity: 1; }
}

@keyframes socialMotionSheetIn {
  0% { opacity: 0; transform: translate3d(0,44px,0) scale(.96); }
  58% { opacity: 1; transform: translate3d(0,-7px,0) scale(1.008); }
  100% { opacity: 1; transform: translate3d(0,0,0) scale(1); }
}

@keyframes socialMotionSheetOut {
  to { opacity: 0; transform: translate3d(0,42px,0) scale(.965); }
}

@keyframes socialMotionDrawerIn {
  from { opacity: 0; transform: translate3d(18px,0,0) scale(.985); }
  to { opacity: 1; transform: translate3d(0,0,0) scale(1); }
}

@keyframes socialMotionMenuIn {
  0% { opacity: 0; transform: translate3d(0,-6px,0) scale(.965); filter: blur(2px); }
  100% { opacity: 1; transform: translate3d(0,0,0) scale(1); filter: blur(0); }
}

@keyframes socialMotionPillIn {
  0% { opacity: 0; transform: translate3d(0,-12px,0) scale(.86); }
  62% { opacity: 1; transform: translate3d(0,2px,0) scale(1.04); }
  100% { opacity: 1; transform: translate3d(0,0,0) scale(1); }
}

@keyframes socialMotionToastIn {
  0% { opacity: 0; transform: translate3d(0,14px,0) scale(.94); filter: blur(4px); }
  70% { opacity: 1; transform: translate3d(0,-2px,0) scale(1.01); filter: blur(0); }
  100% { opacity: 1; transform: translate3d(0,0,0) scale(1); filter: blur(0); }
}

@keyframes socialMotionToastOut {
  to { opacity: 0; transform: translate3d(0,8px,0) scale(.96); filter: blur(3px); }
}

@keyframes socialMotionLightboxMediaIn {
  0% { opacity: 0; transform: scale(.94); filter: blur(10px) saturate(.8); }
  100% { opacity: 1; transform: scale(1); filter: blur(0) saturate(1); }
}

@keyframes socialMotionPanelIn {
  from { opacity: 0; transform: translate3d(22px,0,0); }
  to { opacity: 1; transform: translate3d(0,0,0); }
}

@keyframes socialMotionSlideDown {
  from { opacity: 0; transform: translate3d(0,-12px,0); }
  to { opacity: 1; transform: translate3d(0,0,0); }
}

@keyframes socialMotionSlideUp {
  from { opacity: 0; transform: translate3d(0,14px,0); }
  to { opacity: 1; transform: translate3d(0,0,0); }
}

@keyframes socialMotionStoryIn {
  from { opacity: 0; transform: scale(.965); filter: blur(8px); }
  to { opacity: 1; transform: scale(1); filter: blur(0); }
}

@keyframes socialMotionTrayIn {
  from { opacity: 0; transform: translate3d(0,8px,0) scale(.95); }
  to { opacity: 1; transform: translate3d(0,0,0) scale(1); }
}

@keyframes socialMotionImageSheen {
  0% { opacity: 0; transform: translate3d(-120%,0,0); }
  22% { opacity: .72; }
  100% { opacity: 0; transform: translate3d(120%,0,0); }
}

@keyframes socialMotionStoryRing {
  0% { filter: hue-rotate(0deg) saturate(1); transform: scale(1); }
  50% { filter: hue-rotate(14deg) saturate(1.12); transform: scale(1.015); }
  100% { filter: hue-rotate(0deg) saturate(1); transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  body.social-ui-v2,
  body.social-ui-v2 * ,
  body.social-ui-v2 *::before,
  body.social-ui-v2 *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }

  body.social-ui-v2 .motion-reveal {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }

  body.social-ui-v2 .motion-ripple {
    display: none !important;
  }
}

/* Final interaction polish: notifications, discovery, stories and media viewer. */
.notif-dot[hidden],
#nav-notif-badge[hidden],
#drawer-notif-badge[hidden],
[data-pf-notifs][hidden] {
  display: none !important;
}

body.social-ui-v2 #stories-shell .stories-head {
  display: none !important;
}

body.social-ui-v2 #stories-shell.stories-shell {
  min-height: 0;
}

body.social-ui-v2 #stories-shell .stories-list {
  padding-block: 12px;
}

body.social-ui-v2 #stories-shell .story-ring-button {
  width: 74px;
  min-height: 94px;
  display: grid;
  justify-items: center;
}

body.social-ui-v2 #stories-shell .story-ring,
body.social-ui-v2 #stories-shell .story-action-circle {
  width: 64px !important;
  height: 64px !important;
  flex: 0 0 64px;
  aspect-ratio: 1 / 1;
  overflow: hidden;
}

body.social-ui-v2 #stories-shell .story-ring img {
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 50%;
}

body.social-ui-v2 #stories-shell .story-item.is-unseen .story-ring::before {
  inset: -5px;
  padding: 4px;
}

body.social-ui-v2 #stories-shell .story-item.is-viewed .story-ring::before {
  inset: -5px;
  padding: 4px;
  background: #73777e;
}

body.social-ui-v2 .post-actions .pa-save {
  margin-left: auto;
}

body.social-ui-v2 .preview-comment-actions .comment-pa-save,
body.social-ui-v2 .comment-actions .comment-pa-save {
  margin-left: auto;
}

body.social-ui-v2 .reaction-wrap,
body.social-ui-v2 .reaction-summary {
  display: none !important;
}

body.social-ui-v2 .backdrop.show .sheet,
body.social-ui-v2 .social-sheet-overlay.show .social-sheet {
  animation: socialSheetElasticIn 430ms cubic-bezier(.16,1.16,.34,1) both;
  transform-origin: center bottom;
  will-change: transform, opacity;
}

body.social-ui-v2 .backdrop.sheet-closing,
body.social-ui-v2 .social-sheet-overlay.sheet-closing {
  pointer-events: none;
  animation: socialBackdropOut 190ms ease both;
}

body.social-ui-v2 .backdrop.sheet-closing .sheet,
body.social-ui-v2 .social-sheet-overlay.sheet-closing .social-sheet {
  animation: socialSheetElasticOut 210ms cubic-bezier(.45,0,.78,.2) both !important;
}

body.social-ui-v2 .backdrop.sheet-drag-release .sheet,
body.social-ui-v2 .social-sheet-overlay.sheet-drag-release .social-sheet {
  animation: none !important;
}

body.social-ui-v2 .sheet-drag-handle,
body.social-ui-v2 .social-sheet-handle {
  width: 100%;
  height: 24px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  margin: 0;
  background: transparent;
  cursor: grab;
  touch-action: none;
}

body.social-ui-v2 .sheet-drag-handle span,
body.social-ui-v2 .social-sheet-handle::before {
  content: "";
  width: 42px;
  height: 4px;
  border-radius: 999px;
  background: color-mix(in srgb,var(--ink-3) 48%,transparent);
  box-shadow: 0 1px 0 rgba(255,255,255,.08) inset;
}

body.social-ui-v2 .sheet-draggable .sheet-header,
body.social-ui-v2 .sheet-draggable .story-camera-head {
  cursor: grab;
  touch-action: none;
  user-select: none;
}

body.social-ui-v2 .sheet-draggable .sheet-header button,
body.social-ui-v2 .sheet-draggable .story-camera-head button {
  cursor: pointer;
}

body.social-ui-v2 .sheet-draggable .story-camera-head[data-sheet-drag-handle] {
  position: relative;
}

body.social-ui-v2 .sheet-draggable .story-camera-head[data-sheet-drag-handle]::before {
  content: "";
  position: absolute;
  top: 5px;
  left: 50%;
  width: 42px;
  height: 4px;
  border-radius: 999px;
  background: color-mix(in srgb,var(--ink-3) 42%,transparent);
  transform: translateX(-50%);
}

body.social-ui-v2 .sheet.is-sheet-dragging,
body.social-ui-v2 .social-sheet.is-sheet-dragging {
  animation: none !important;
  transition: none !important;
  cursor: grabbing;
}

body.social-ui-v2 .sheet.sheet-elastic-reset,
body.social-ui-v2 .social-sheet.sheet-elastic-reset {
  transition: transform 520ms cubic-bezier(.16,1.32,.29,1), opacity 180ms ease;
}

body.social-ui-v2 .sheet.is-sheet-release-closing,
body.social-ui-v2 .social-sheet.is-sheet-release-closing {
  pointer-events: none;
  will-change: transform, opacity;
}

body.social-ui-v2 .sheet-body,
body.social-ui-v2 .social-sheet-body,
body.social-ui-v2 .share-chat-list,
body.social-ui-v2 .story-viewers-list {
  overscroll-behavior: contain;
}

body.social-ui-v2 :is(
  .sheet-body,
  .social-sheet-body,
  .share-chat-list,
  .story-viewers-list,
  .relation-list2,
  .affiliate-list,
  .friend-list,
  .notif-list,
  .profile-notif-options,
  .story-camera-controls,
  .mobile-drawer-nav,
  .lb-comments,
  #player-list,
  .player-list,
  .search-results-panel,
  .discover-row
) {
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  scroll-behavior: smooth;
}

@keyframes socialSheetElasticIn {
  0% { opacity: 0; transform: translate3d(0,34px,0) scale(.965); }
  66% { opacity: 1; transform: translate3d(0,-5px,0) scale(1.006); }
  100% { opacity: 1; transform: translate3d(0,0,0) scale(1); }
}

@keyframes socialSheetElasticOut {
  0% { opacity: 1; transform: translate3d(0,0,0) scale(1); }
  100% { opacity: 0; transform: translate3d(0,34px,0) scale(.965); }
}

@keyframes socialBackdropOut {
  to { opacity: 0; }
}

body.social-ui-v2 .profile-notif-btn {
  width: 40px;
  padding: 0;
}

body.social-ui-v2 .profile-notif-btn.is-on {
  color: var(--accent);
  border-color: color-mix(in srgb,var(--accent) 55%,var(--line));
  background: var(--accent-soft);
}

.profile-notif-options {
  display: grid;
  gap: 7px;
  padding: 12px;
}

.profile-notif-option {
  display: grid;
  grid-template-columns: 36px minmax(0,1fr) 14px;
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-soft);
  color: var(--ink);
  text-align: left;
  transition: transform .18s var(--ease),border-color .18s,background .18s;
}

.profile-notif-option:hover,
.profile-notif-option.is-active {
  transform: translateY(-1px);
  border-color: color-mix(in srgb,var(--accent) 60%,var(--line));
  background: var(--accent-soft);
}

.profile-notif-option > span {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--surface-solid);
}

.profile-notif-option svg {
  width: 17px;
  height: 17px;
}

.profile-notif-option strong,
.profile-notif-option small {
  display: block;
}

.profile-notif-option small {
  margin-top: 2px;
  color: var(--ink-3);
  line-height: 1.35;
}

.profile-notif-option > i {
  width: 11px;
  height: 11px;
  border: 2px solid var(--ink-3);
  border-radius: 50%;
}

.profile-notif-option.is-active > i {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 2px var(--surface-solid);
  background: var(--accent);
}

body.social-ui-v2 .discover-row {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 7px;
}

body.social-ui-v2 .discover-card {
  display: grid;
  grid-template-columns: 42px minmax(0,1fr);
  gap: 9px;
  align-items: center;
  min-width: 0;
  padding: 8px;
  text-align: left;
}

body.social-ui-v2 .discover-card img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
}

body.social-ui-v2 .discover-card strong,
body.social-ui-v2 .discover-card small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.social-ui-v2 .discover-posts {
  display: grid;
  gap: 0;
}

body.social-ui-v2 .discover-posts > h2 {
  margin-bottom: 7px;
}

body.social-ui-v2 .discover-posts .post-card {
  border-width: 1px 0 0;
  border-radius: 0;
}

.lb-stage {
  order: 1;
}

.lb-panel {
  order: 2;
}

.lb-social .lb-share-btn {
  margin-left: auto;
}

.lb-img-wrap.is-gesturing .lb-img {
  transition: none;
}

.lb-img-wrap.is-gesturing {
  background: rgba(255,255,255,.018);
}

@media(max-width:767px) {
  html,
  body {
    max-width: 100%;
    overflow-x: clip;
  }

  body.social-ui-v2 #feed-col {
    display: flex;
    flex-direction: column;
  }

  body.social-ui-v2 #feed-col > #stories-shell {
    order: -2;
    margin: 0;
    border-width: 0 0 1px;
    border-radius: 0;
    background: transparent;
  }

  body.social-ui-v2 #feed-col > .col-header {
    order: -1;
  }

  body.social-ui-v2 #stories-shell .stories-list {
    padding: 12px 10px 10px;
  }

  body.social-ui-v2 #stories-shell .story-state-label {
    display: none;
  }

  body.social-ui-v2 #route-col,
  body.social-ui-v2 .profile-hero,
  body.social-ui-v2 .profile-hero-body,
  body.social-ui-v2 .profile-insights,
  body.social-ui-v2 .profile-content-grid,
  body.social-ui-v2 .profile-tab-content,
  body.social-ui-v2 .profile-feed-stack,
  body.social-ui-v2 .post-card,
  body.social-ui-v2 .post-main {
    min-width: 0;
    max-width: 100%;
  }

  body.social-ui-v2 .profile-hero {
    margin-inline: 8px;
    width: auto;
    border-radius: 18px;
  }

  body.social-ui-v2 .profile-insights,
  body.social-ui-v2 .profile-content-grid {
    margin-inline: 8px;
  }

  body.social-ui-v2 .profile-actions-row {
    max-width: 100%;
    justify-content: flex-end;
  }

  body.social-ui-v2 .profile-actions-row .btn {
    flex: 0 1 auto;
    min-width: 0;
  }

  body.social-ui-v2 .post-content,
  body.social-ui-v2 .profile-tab-content {
    overflow-wrap: anywhere;
  }

  body.social-ui-v2 .discover-row {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  body.social-ui-v2 .discover-card {
    flex: 0 0 190px;
  }

  body.social-ui-v2 .discover-posts .post-card {
    margin-inline: -10px;
  }

  .backdrop.show .story-camera-sheet,
  .backdrop.show .post-composer-sheet,
  .backdrop.show .quick-comment-sheet,
  .backdrop.show .share-sheet,
  .backdrop.show .profile-notif-sheet {
    max-height: 96dvh;
    min-height: min(76dvh,720px);
  }

  .profile-notif-backdrop {
    align-items: flex-end;
  }

  .lb-mob-social .lb-share-btn {
    margin-left: auto;
  }

  .lb-reply-ta,
  #story-reply-input {
    font-size: 16px !important;
  }
}

body.social-ui-v2 .pa-like[data-has-likers="1"] span {
  text-decoration: none !important;
}

body.social-ui-v2 #stories-shell .story-item.is-unseen .story-ring::before {
  opacity: 1 !important;
  background: linear-gradient(45deg,#feda75 0%,#fa7e1e 22%,#d62976 48%,#962fbf 72%,#4f5bd5 100%) border-box !important;
}

body.social-ui-v2 #stories-shell .story-item.is-viewed {
  opacity: .86;
}

body.social-ui-v2 #stories-shell .story-item.is-viewed .story-ring::before {
  opacity: 1 !important;
  background: color-mix(in srgb,var(--ink-3) 48%,var(--line)) border-box !important;
  box-shadow: none !important;
  animation: none !important;
}

/* Feed comments form one continuous thread aligned with the post avatar. */
body.social-ui-v2 .post-layout.has-comments .post-av-connector {
  width: 2px;
  min-height: 18px;
  margin-top: 6px;
  background: color-mix(in srgb,var(--line-strong) 82%,transparent);
  border-radius: 99px;
}

body.social-ui-v2 .preview-comments {
  position: relative;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

body.social-ui-v2 .preview-comments::before {
  content: '';
  position: absolute;
  z-index: 0;
  top: -18px;
  bottom: 26px;
  left: 22px;
  width: 2px;
  border-radius: 99px;
  background: color-mix(in srgb,var(--line-strong) 76%,transparent);
}

body.social-ui-v2 .preview-row {
  --fa-preview-thread-x: 22px;
  --fa-preview-thread-center-y: 30px;
  position: relative;
  z-index: 1;
  grid-template-columns: 46px minmax(0,1fr);
  gap: 11px;
  padding: 10px 0 0;
}

body.social-ui-v2 .preview-row-av {
  width: 40px;
  height: 40px;
  border: 3px solid var(--social-surface);
  border-radius: 13px;
  box-sizing: border-box;
}

body.social-ui-v2 .preview-row-body {
  padding-top: 2px;
}

body.social-ui-v2 .preview-more-btn {
  position: relative;
  z-index: 1;
  margin: 8px 0 2px 57px;
}

body.social-ui-v2 .preview-comment-actions,
body.social-ui-v2 .comment-meta {
  display: flex;
  align-items: center;
  gap: 3px;
  margin-top: 7px;
}

body.social-ui-v2 .preview-comment-action,
body.social-ui-v2 .comment-pa {
  min-width: 38px;
  min-height: 36px;
  height: 36px;
  padding: 0 9px;
  border-radius: 11px;
  font: 600 10.5px/1 var(--ff-mono);
}

body.social-ui-v2 .preview-comment-action svg,
body.social-ui-v2 .comment-pa svg {
  width: 15px;
  height: 15px;
}

/* Full thread follows the same avatar-to-avatar visual grammar. */
body.social-ui-v2 .comments-list,
body.social-ui-v2 .comments-list-wrap {
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body.social-ui-v2 .comment-row {
  position: relative;
  grid-template-columns: 46px minmax(0,1fr);
  gap: 11px;
  padding: 12px 0;
  border: 0;
  background: transparent;
}

body.social-ui-v2 .comment-row:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 22px;
  top: 53px;
  bottom: -13px;
  width: 2px;
  border-radius: 99px;
  background: color-mix(in srgb,var(--line-strong) 76%,transparent);
}

body.social-ui-v2 .comment-row > img {
  position: relative;
  z-index: 1;
  width: 46px;
  height: 46px;
  border: 3px solid var(--social-surface);
  border-radius: 14px;
  box-sizing: border-box;
}

body.social-ui-v2 .comment-row:not(.is-deleted):hover::after {
  display: none;
}

/* Profile covers stay cinematic instead of expanding to the image's full height. */
body.social-ui-v2 .profile-cover,
body.social-ui-v2 .profile-cover.has-img {
  width: 100%;
  height: auto;
  min-height: 0;
  aspect-ratio: 3 / 1;
  max-height: 230px;
  cursor: zoom-in;
}

body.social-ui-v2 .profile-cover .cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

body.social-ui-v2 .profile-cover[data-lb-open]:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: -3px;
}

.profile-cover-viewer {
  position: fixed;
  inset: 0;
  z-index: 10020;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0,0,0,.86);
  backdrop-filter: blur(18px);
  animation: socialCoverIn 180ms ease both;
}

.profile-cover-viewer img {
  max-width: min(1100px,100%);
  max-height: calc(100dvh - 48px);
  object-fit: contain;
  border-radius: 14px;
  box-shadow: 0 28px 90px rgba(0,0,0,.5);
}

.profile-cover-viewer button {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 1;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 50%;
  background: rgba(20,20,20,.72);
  color: #fff;
  font-size: 24px;
}

@keyframes socialCoverIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Useful lateral content becomes a compact carousel when rails no longer fit. */
.compact-social-discovery {
  display: none;
}

@media (max-width: 980px) {
  body.social-ui-v2 .compact-social-discovery {
    display: flex;
    order: 2;
    width: min(100%,var(--social-feed-max));
    gap: 9px;
    overflow-x: auto;
    padding: 0 2px 4px;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }

  body.social-ui-v2 .compact-social-discovery::-webkit-scrollbar {
    display: none;
  }

  body.social-ui-v2 .compact-tool-card {
    min-width: 210px;
    flex: 1 0 210px;
    display: grid;
    align-content: space-between;
    gap: 7px;
    min-height: 104px;
    padding: 12px;
    border: 1px solid var(--social-border);
    border-radius: 15px;
    background: var(--social-surface);
    box-shadow: var(--social-shadow-card);
    scroll-snap-align: start;
  }

  body.social-ui-v2 .compact-tool-card small {
    color: var(--ink-3);
    font: 700 9px/1 var(--ff-mono);
    letter-spacing: .08em;
    text-transform: uppercase;
  }

  body.social-ui-v2 .compact-tool-card strong {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
    color: var(--ink);
    font-size: 12px;
  }

  body.social-ui-v2 .compact-tool-card p {
    display: none;
    margin: 0;
    color: var(--ink-3);
    font-size: 10px;
    line-height: 1.4;
  }

  body.social-ui-v2 .compact-tool-card.is-expanded p {
    display: block;
  }

  body.social-ui-v2 .compact-tool-card strong i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 4px color-mix(in srgb,var(--accent) 13%,transparent);
  }

  body.social-ui-v2 .compact-tool-trends strong span {
    padding: 3px 6px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 9px;
  }

  body.social-ui-v2 .compact-tool-card button {
    justify-self: start;
    border: 0;
    background: transparent;
    color: var(--accent);
    font: 800 10px/1 var(--ff);
  }
}

@media (hover: hover) and (pointer: fine) {
  body.social-ui-v2 .post-card:hover,
  body.social-ui-v2 .story-item:hover,
  body.social-ui-v2 .btn:hover,
  body.social-ui-v2 .pa:hover,
  body.social-ui-v2 .comment-pa:hover,
  body.social-ui-v2 .preview-comment-action:hover {
    will-change: transform;
  }
}

@media (hover: none), (pointer: coarse) {
  body.social-ui-v2 .post-card:hover,
  body.social-ui-v2 .story-item:hover,
  body.social-ui-v2 .btn:hover,
  body.social-ui-v2 .tbtn:hover,
  body.social-ui-v2 .rnav-item:hover,
  body.social-ui-v2 .trend-item:hover,
  body.social-ui-v2 .player-row:hover,
  body.social-ui-v2 .pa:hover,
  body.social-ui-v2 .comment-pa:hover,
  body.social-ui-v2 .preview-comment-action:hover,
  body.social-ui-v2 .post-card:hover .post-media img {
    transform: none !important;
  }

  body.social-ui-v2 .post-card:hover,
  body.social-ui-v2 .comment-row:hover,
  body.social-ui-v2 .trend-item:hover,
  body.social-ui-v2 .player-row:hover {
    background: inherit !important;
  }
}

@media (max-width: 768px) {
  body.social-ui-v2 .feed-tabs {
    display: grid;
    grid-template-columns: repeat(3,minmax(0,1fr));
    overflow: hidden;
    scrollbar-width: none;
  }

  body.social-ui-v2 .feed-tabs::-webkit-scrollbar {
    display: none;
  }

  body.social-ui-v2 .compact-social-discovery {
    width: 100%;
    padding: 0 12px 4px;
  }

  body.social-ui-v2 .compact-tool-card {
    min-width: 188px;
    flex-basis: 188px;
    min-height: 96px;
    border-radius: 14px;
    box-shadow: none;
  }

  body.social-ui-v2 #feed-list > .post-card,
  body.social-ui-v2 .profile-feed-stack > .post-card {
    padding: 12px;
  }

  body.social-ui-v2 .post-layout {
    grid-template-columns: 42px minmax(0,1fr) !important;
    gap: 10px !important;
  }

  body.social-ui-v2 .av42-sq,
  body.social-ui-v2 .post-card .av42 {
    width: 42px;
    height: 42px;
  }

  body.social-ui-v2 .post-head {
    align-items: flex-start;
  }

  body.social-ui-v2 .post-content {
    margin-top: 5px;
    font-size: 14.5px;
    line-height: 1.5;
  }

  body.social-ui-v2 .post-collage,
  body.social-ui-v2 .post-actions {
    margin-left: 0;
    margin-right: 0;
  }

  body.social-ui-v2 .post-collage {
    border: 1px solid var(--social-border);
    border-radius: 14px;
  }

  body.social-ui-v2 .post-actions {
    min-height: 38px;
    gap: 0;
    justify-content: space-between;
    margin-top: 8px;
    padding-top: 5px;
  }

  body.social-ui-v2 .pa {
    min-width: 34px;
    min-height: 34px;
    height: 34px;
    padding: 0 6px;
    border-radius: 999px;
  }

  body.social-ui-v2 .preview-comments {
    margin-top: 1px;
  }

  body.social-ui-v2 .preview-comments::before {
    left: 20px;
  }

  body.social-ui-v2 .preview-row {
    --fa-preview-thread-x: 20px;
    --fa-preview-thread-center-y: 29px;
    grid-template-columns: 42px minmax(0,1fr);
    gap: 10px;
  }

  body.social-ui-v2 .preview-row-av {
    width: 38px;
    height: 38px;
    border-radius: 12px;
  }

  body.social-ui-v2 .preview-more-btn {
    margin-left: 52px;
  }

  body.social-ui-v2 .preview-comment-actions,
  body.social-ui-v2 .comment-meta {
    justify-content: space-between;
    gap: 0;
  }

  body.social-ui-v2 .preview-comment-action,
  body.social-ui-v2 .comment-pa {
    min-width: 34px;
    min-height: 34px;
    height: 34px;
    padding: 0 6px;
    border-radius: 999px;
  }

  body.social-ui-v2 .comment-row {
    grid-template-columns: 42px minmax(0,1fr);
    gap: 10px;
    padding: 11px 12px;
  }

  body.social-ui-v2 .comment-row > img {
    width: 42px;
    height: 42px;
    border-radius: 13px;
  }

  body.social-ui-v2 .comment-row:not(:last-child)::before {
    left: 32px;
    top: 51px;
    bottom: -12px;
  }

  body.social-ui-v2 .profile-cover,
  body.social-ui-v2 .profile-cover.has-img {
    aspect-ratio: 2.4 / 1;
    max-height: 180px;
  }

  body.social-ui-v2 .quick-comment-source-line {
    left: 22px;
    width: 2px;
    background: color-mix(in srgb,var(--line-strong) 78%,transparent);
  }

  body.social-ui-v2 .quick-comment-source img,
  body.social-ui-v2 .quick-comment-compose > img {
    width: 42px;
    height: 42px;
    border-radius: 13px;
  }
}

@media (max-width: 430px) {
  body.social-ui-v2 .post-collage {
    margin-left: 0;
    margin-right: 0;
    border-radius: 13px;
  }

  body.social-ui-v2 .post-author .handle {
    max-width: 76px;
  }
}

/* Native-flow refinements: continuous threads, stories and lightweight routes. */
body.social-ui-v2 .preview-comments::before,
body.social-ui-v2 .preview-sub-line {
  display: none !important;
}

body.social-ui-v2 .preview-row::before,
body.social-ui-v2 .preview-row:not(:last-of-type)::after {
  content: '';
  position: absolute;
  z-index: -1;
  left: var(--fa-preview-thread-x,20px);
  width: 2px;
  border-radius: 99px;
  background: color-mix(in srgb,var(--line-strong) 82%,transparent);
}

body.social-ui-v2 .preview-row::before {
  top: 0;
  height: var(--fa-preview-thread-center-y,23px);
}

body.social-ui-v2 .preview-row:first-of-type::before {
  top: -1px;
  height: calc(var(--fa-preview-thread-center-y,23px) + 1px);
}

body.social-ui-v2 .preview-row:not(:last-of-type)::after {
  top: var(--fa-preview-thread-center-y,23px);
  bottom: 0;
}

body.social-ui-v2 #stories-shell .story-item.is-viewed .story-ring::before {
  opacity: 1 !important;
  background: #777b82 border-box !important;
  box-shadow: none !important;
  animation: none !important;
}

body.social-ui-v2 #stories-shell .story-item.is-unseen .story-ring::before {
  opacity: 1 !important;
  background: linear-gradient(45deg,#feda75 0%,#fa7e1e 22%,#d62976 48%,#962fbf 72%,#4f5bd5 100%) border-box !important;
}

body.social-ui-v2 .story-progress i::after {
  will-change: width;
}

body.social-ui-v2 .story-nav {
  z-index: 20;
  pointer-events: auto;
}

body.social-ui-v2 .story-hit {
  z-index: 3;
}

body.social-ui-v2 .story-viewer-head[data-story-profile] {
  cursor: pointer;
}

body.social-ui-v2 .story-viewer-head[data-story-profile]:focus-visible {
  outline: 2px solid rgba(255,255,255,.92);
  outline-offset: 4px;
  border-radius: 999px;
}

body.social-ui-v2 .share-mode-choices {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 9px;
}

body.social-ui-v2 .share-mode-choice {
  min-width: 0;
  display: grid;
  grid-template-columns: 38px minmax(0,1fr);
  gap: 2px 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #151512;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: transform var(--t-fast),border-color var(--t-fast),background var(--t-fast);
}

body.social-ui-v2 .share-mode-choice:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  background: color-mix(in srgb,var(--accent-soft) 46%,#151512);
}

body.social-ui-v2 .share-mode-choice.is-locked {
  border-color: color-mix(in srgb,var(--line) 72%,transparent);
  color: var(--ink-2);
}

body.social-ui-v2 .share-mode-choice.is-locked > span {
  color: var(--ink-3);
}

body.social-ui-v2 .share-mode-choice > span {
  grid-row: 1 / span 2;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--surface-soft);
  color: var(--accent);
}

body.social-ui-v2 .share-mode-choice > span svg {
  width: 18px;
  height: 18px;
}

body.social-ui-v2 .share-mode-choice strong {
  font-size: 12px;
}

body.social-ui-v2 .share-mode-choice small {
  overflow: hidden;
  color: var(--ink-3);
  font-size: 9.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.social-ui-v2 .share-sheet:not(.is-inside) [data-share-inside] {
  display: none !important;
}

body.social-ui-v2 .share-sheet:not(.is-inside) .sheet-body {
  grid-template-rows: auto auto;
  align-content: start;
}

body.social-ui-v2 .share-sheet:not(.is-inside) {
  height: auto;
  min-height: 0;
}

body.social-ui-v2 .search-results-panel,
body.social-ui-v2 .search-side-panel,
body.social-ui-v2 .search-hero {
  box-shadow: none;
}

body.social-ui-v2 .search-result,
body.social-ui-v2 .notif-full-row {
  transition: background var(--t-fast),transform var(--t-fast),border-color var(--t-fast);
}

@media (hover: none), (pointer: coarse) {
  body.social-ui-v2 .pa:active,
  body.social-ui-v2 .comment-pa:active,
  body.social-ui-v2 .preview-comment-action:active,
  body.social-ui-v2 .story-item:active,
  body.social-ui-v2 .mbtn:active,
  body.social-ui-v2 .share-mode-choice:active {
    transform: scale(.94) !important;
    transition-duration: 80ms !important;
  }
}

@media (max-width: 768px) {
  body.social-ui-v2 #inline-composer {
    display: none !important;
  }

  body.social-ui-v2 .feed-tabs {
    display: flex;
    width: 100%;
    overflow: hidden;
  }

  body.social-ui-v2 .feed-tabs .tab {
    min-width: 0;
    flex: 1 1 0;
    padding-inline: 3px;
    font-size: clamp(9px,2.7vw,11px);
    white-space: nowrap;
  }

  body.social-ui-v2 .post-actions {
    justify-content: flex-start;
    gap: clamp(4px,3vw,14px);
  }

  body.social-ui-v2 .share-recipient-search input,
  body.social-ui-v2 .share-message-wrap textarea {
    font-size: 16px;
  }

  body.social-ui-v2 .preview-comment-actions,
  body.social-ui-v2 .comment-meta {
    justify-content: flex-start;
    gap: 5px;
  }

  body.social-ui-v2 .preview-row::before,
  body.social-ui-v2 .preview-row:not(:last-of-type)::after {
    left: var(--fa-preview-thread-x,20px);
  }

  body.social-ui-v2 .preview-row::before {
    height: var(--fa-preview-thread-center-y,29px);
  }

  body.social-ui-v2 .preview-row:first-of-type::before {
    height: calc(var(--fa-preview-thread-center-y,29px) + 1px);
  }

  body.social-ui-v2 .preview-row:not(:last-of-type)::after {
    top: var(--fa-preview-thread-center-y,29px);
  }

  body.social-ui-v2 .share-mode-choices {
    grid-template-columns: 1fr;
  }

  body.social-ui-v2 .search-page {
    gap: 0;
    padding-top: 0;
  }

  body.social-ui-v2 .search-hero {
    position: sticky;
    top: var(--topbar-h);
    z-index: 8;
    padding: 8px 10px;
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    background: color-mix(in srgb,var(--surface-solid) 94%,transparent);
    backdrop-filter: blur(18px);
  }

  body.social-ui-v2 .search-hero h1,
  body.social-ui-v2 .search-hero p {
    display: none;
  }

  body.social-ui-v2 .search-page-input {
    margin: 0;
  }

  body.social-ui-v2 .search-page-input input {
    height: 42px;
    border-radius: 999px;
    background: var(--surface-soft);
    font-size: 16px;
  }

  body.social-ui-v2 .search-layout {
    gap: 0;
  }

  body.social-ui-v2 .search-results-panel,
  body.social-ui-v2 .search-side-panel {
    padding: 10px;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  body.social-ui-v2 .search-side-panel {
    order: -1;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }

  body.social-ui-v2 .search-side-panel .search-section {
    min-width: max-content;
    scroll-snap-align: start;
  }

  body.social-ui-v2 .search-side-panel .search-section + .search-section {
    margin-top: 0;
  }

  body.social-ui-v2 .search-side-panel .search-section h2 {
    display: none;
  }

  body.social-ui-v2 .search-result {
    border-width: 0 0 1px;
    border-radius: 0;
    background: transparent;
  }

  body.social-ui-v2 .notif-center {
    gap: 0;
  }

  body.social-ui-v2 .notif-center-head-v2 {
    position: sticky;
    top: var(--topbar-h);
    z-index: 7;
    align-items: center;
    padding: 10px 12px;
    background: color-mix(in srgb,var(--surface-solid) 94%,transparent);
    backdrop-filter: blur(18px);
  }

  body.social-ui-v2 .notif-center-head-v2 .eyebrow,
  body.social-ui-v2 .notif-center-head-v2 p:last-child {
    display: none;
  }

  body.social-ui-v2 .notif-center-head-v2 h1 {
    margin: 0;
    font-size: 21px;
  }

  body.social-ui-v2 .notif-center-actions .btn {
    min-width: 0;
    padding-inline: 9px;
    font-size: 10px;
  }

  body.social-ui-v2 .browser-notif-card {
    margin: 8px 10px;
    border-radius: 14px;
  }

  body.social-ui-v2 .notif-filterbar {
    position: sticky;
    top: calc(var(--topbar-h) + 58px);
    z-index: 6;
    padding: 8px 10px;
    background: color-mix(in srgb,var(--surface-solid) 94%,transparent);
    backdrop-filter: blur(18px);
  }

  body.social-ui-v2 .notif-full-list {
    gap: 0;
  }

  body.social-ui-v2 .notif-time-group {
    gap: 0;
    padding-bottom: 0;
  }

  body.social-ui-v2 .notif-time-group > h2 {
    top: calc(var(--topbar-h) + 104px);
  }

  body.social-ui-v2 .notif-full-row {
    grid-template-columns: 42px minmax(0,1fr) auto;
    gap: 10px;
    padding: 11px 10px;
    border-width: 0 0 1px;
    border-radius: 0;
    background: transparent;
  }

  body.social-ui-v2 .notif-full-actions {
    grid-column: auto;
    margin: 0;
    opacity: 1;
    transform: none;
  }

  body.social-ui-v2 .notif-full-actions .danger {
    display: none;
  }
}

/* Keep the final responsive decisions above legacy refinement rules. */
body.social-ui-v2 #stories-shell .stories-head {
  display: none !important;
}

body.social-ui-v2 #stories-shell .story-item.is-unseen .story-ring::before,
body.social-ui-v2 #stories-shell .story-item.is-viewed .story-ring::before {
  inset: -5px;
  padding: 4px;
}

body.social-ui-v2 #stories-shell .story-item.is-viewed .story-ring::before {
  background: #73777e !important;
}

body.social-ui-v2 .post-actions .pa-save,
body.social-ui-v2 .preview-comment-actions .comment-pa-save,
body.social-ui-v2 .comment-actions .comment-pa-save {
  margin-left: auto;
}

body.social-ui-v2 .post-actions:not(:has(.pa-save)) .pa-share {
  margin-left: auto;
}

body.social-ui-v2 .reaction-wrap,
body.social-ui-v2 .reaction-summary {
  display: none !important;
}

html.modal-scroll-locked {
  overflow: hidden !important;
  overscroll-behavior: none;
}

body.social-ui-v2.modal-scroll-locked {
  overflow: hidden !important;
  overscroll-behavior: none;
}

body.social-ui-v2.lightbox-open {
  overscroll-behavior: none;
}

body.social-ui-v2.lightbox-open .page-body,
body.social-ui-v2.lightbox-open .topbar,
body.social-ui-v2.lightbox-open .mobile-nav,
body.social-ui-v2.lightbox-open .mobile-bottom-nav,
body.social-ui-v2.lightbox-open .fab-post {
  pointer-events: none;
}

body.social-ui-v2.lightbox-open #lb {
  pointer-events: auto;
}

body.social-ui-v2.sheet-gesture-active {
  -webkit-user-select: none;
  user-select: none;
}

body.social-ui-v2.sheet-gesture-active * {
  -webkit-tap-highlight-color: transparent;
}

body.social-ui-v2 .backdrop.show,
body.social-ui-v2 .social-sheet-overlay.show {
  z-index: 2147481800;
  overscroll-behavior: contain;
}

body.social-ui-v2 #lb.lb {
  z-index: 2147481600;
  isolation: isolate;
  overscroll-behavior: contain;
}

body.social-ui-v2 #lb.lb,
body.social-ui-v2 #lb .lb-stage,
body.social-ui-v2 #lb .lb-img-wrap {
  touch-action: none;
}

body.social-ui-v2 #lb .lb-panel,
body.social-ui-v2 #lb .lb-comments,
body.social-ui-v2 #lb .lb-reply-ta {
  overscroll-behavior: contain;
  touch-action: pan-y;
}

body.social-ui-v2 #toast-stack {
  z-index: 2147483000;
}

body.social-ui-v2 .share-sheet {
  display: flex;
  flex-direction: column;
}

body.social-ui-v2 .share-sheet.is-inside .share-mode-choices,
body.social-ui-v2 .share-sheet.is-inside .share-actions {
  display: none !important;
}

body.social-ui-v2 .share-sheet .sheet-body {
  flex: 1 1 auto;
  min-height: 0;
}

body.social-ui-v2 .share-chat-list {
  min-height: 220px;
}

body.social-ui-v2 .share-sheet.is-story-share .share-summary {
  grid-template-columns: 34px minmax(0,1fr);
  align-items: center;
}

body.social-ui-v2 .share-sheet.is-story-share .share-summary::before {
  content: "";
  grid-row: 1 / span 2;
  width: 26px;
  height: 42px;
  border: 2px solid color-mix(in srgb,var(--accent) 74%,#fff 10%);
  border-radius: 9px;
  background: linear-gradient(145deg,rgba(255,255,255,.14),rgba(255,255,255,.02));
  box-shadow: 0 0 0 3px color-mix(in srgb,var(--accent) 18%,transparent);
}

body.social-ui-v2 .share-recipient-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

body.social-ui-v2 .share-outside-mini {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid color-mix(in srgb,var(--accent) 36%,var(--line));
  border-radius: 999px;
  background: color-mix(in srgb,var(--accent-soft) 44%,transparent);
  color: var(--accent);
  font-size: 10.5px;
  font-weight: 850;
  cursor: pointer;
  transition: transform var(--t-fast),background var(--t-fast),border-color var(--t-fast);
}

body.social-ui-v2 .share-outside-mini:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  transform: translateY(-1px);
}

@media(max-width:767px) {
  html,
  body {
    max-width: 100%;
    overflow-x: clip;
  }

  body.social-ui-v2 #feed-col {
    display: flex;
    flex-direction: column;
  }

  body.social-ui-v2 #feed-col > #stories-shell {
    order: -2;
    margin: 0;
    border-width: 0 0 1px;
    border-radius: 0;
    background: transparent;
  }

  body.social-ui-v2 #feed-col > .col-header {
    order: -1;
  }

  body.social-ui-v2 #route-col,
  body.social-ui-v2 .profile-hero,
  body.social-ui-v2 .profile-hero-body,
  body.social-ui-v2 .profile-insights,
  body.social-ui-v2 .profile-content-grid,
  body.social-ui-v2 .profile-tab-content,
  body.social-ui-v2 .profile-feed-stack,
  body.social-ui-v2 .post-card,
  body.social-ui-v2 .post-main {
    min-width: 0;
    max-width: 100%;
  }

  body.social-ui-v2 .profile-hero {
    margin-inline: 8px;
    width: auto;
    border-radius: 18px;
  }

  body.social-ui-v2 .profile-insights,
  body.social-ui-v2 .profile-content-grid {
    margin-inline: 8px;
  }

  body.social-ui-v2 .profile-actions-row {
    max-width: 100%;
    justify-content: flex-end;
  }

  body.social-ui-v2 .profile-actions-row .btn {
    flex: 0 1 auto;
    min-width: 0;
  }

  body.social-ui-v2 #share-modal.backdrop.show {
    align-items: flex-end;
    padding: 8px 8px max(8px,env(safe-area-inset-bottom));
  }

  body.social-ui-v2 .share-sheet {
    width: 100%;
    height: min(88dvh,760px);
    max-height: calc(100dvh - 14px);
    border-radius: 22px 22px 18px 18px;
  }

  body.social-ui-v2 .share-sheet:not(.is-inside) {
    height: auto;
    max-height: 82dvh;
  }

  body.social-ui-v2 .share-sheet.is-inside .sheet-header {
    min-height: 48px;
  }

  body.social-ui-v2 .share-sheet.is-inside .sheet-body {
    grid-template-rows: auto auto auto minmax(250px,1fr) !important;
    gap: 8px;
    padding: 10px;
  }

  body.social-ui-v2 .share-sheet.is-inside .share-summary {
    padding: 9px 10px;
  }

  body.social-ui-v2 .share-sheet.is-inside .share-summary p {
    -webkit-line-clamp: 1;
  }

  body.social-ui-v2 .share-sheet.is-inside .share-mode-choices {
    display: none !important;
  }

  body.social-ui-v2 .share-sheet.is-inside .share-mode-choice {
    grid-template-columns: 32px minmax(0,1fr);
    padding: 10px;
    border-radius: 13px;
  }

  body.social-ui-v2 .share-sheet.is-inside .share-mode-choice > span {
    width: 32px;
    height: 32px;
  }

  body.social-ui-v2 .share-sheet.is-inside .share-mode-choice small,
  body.social-ui-v2 .share-send-status span {
    display: none;
  }

  body.social-ui-v2 .share-recipient-tools {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  body.social-ui-v2 .share-chat-list {
    min-height: 250px;
    max-height: none;
    padding: 6px;
    border: 1px solid color-mix(in srgb,var(--line) 82%,transparent);
    border-radius: 14px;
    background: #0f0f0d;
    scrollbar-width: none;
  }

  body.social-ui-v2 .share-recipient-meta {
    align-items: center;
  }

  body.social-ui-v2 .share-outside-mini {
    min-height: 28px;
    padding-inline: 9px;
    font-size: 10px;
    white-space: nowrap;
  }

  body.social-ui-v2 .share-chat-list::-webkit-scrollbar {
    display: none;
  }

  body.social-ui-v2 .share-chat-row {
    grid-template-columns: 40px minmax(0,1fr) 28px;
    padding: 9px;
    border-radius: 12px;
    background: #171712;
  }

  body.social-ui-v2 .share-footer {
    padding: 8px 10px max(10px,env(safe-area-inset-bottom));
    gap: 5px;
  }

  body.social-ui-v2 .share-message-wrap {
    grid-template-columns: minmax(0,1fr) 46px;
    padding: 7px 7px 7px 10px;
    border-radius: 14px;
  }

  body.social-ui-v2 .share-send-btn {
    min-width: 46px;
    min-height: 42px;
    padding-inline: 0;
    font-size: 0;
  }

  body.social-ui-v2 .share-send-btn svg {
    width: 17px;
    height: 17px;
  }

  body.social-ui-v2 .story-camera-backdrop {
    align-items: flex-end;
    padding: 0;
  }

  body.social-ui-v2 .story-camera-sheet {
    width: 100%;
    height: min(92dvh,780px);
    max-height: calc(100dvh - 8px);
    border: 0;
    border-radius: 24px 24px 0 0;
  }

  body.social-ui-v2 .story-camera-head {
    min-height: 54px;
    padding: 14px 12px 9px;
  }

  body.social-ui-v2 .story-camera-head p,
  body.social-ui-v2 .story-camera-hint,
  body.social-ui-v2 .story-camera-tip {
    display: none;
  }

  body.social-ui-v2 .story-camera-body {
    flex: 1 1 auto;
    min-height: 0;
    display: grid;
    grid-template-rows: minmax(220px,38dvh) minmax(0,1fr);
    grid-template-columns: 1fr !important;
    gap: 10px;
    overflow: hidden;
    padding: 10px 12px;
  }

  body.social-ui-v2 .story-camera-frame {
    width: min(46vw,190px);
    height: auto;
    max-height: 38dvh;
    place-self: center;
    border-radius: 20px;
  }

  body.social-ui-v2 .story-camera-frame img {
    position: absolute;
    inset: 0;
  }

  body.social-ui-v2 .story-camera-controls {
    min-height: 0;
    overflow: auto;
    align-content: start;
    gap: 9px;
    padding: 2px 0 6px;
    overscroll-behavior: contain;
  }

  body.social-ui-v2 .story-caption-field textarea {
    min-height: 70px;
    max-height: 110px;
  }

  body.social-ui-v2 .story-camera-actions,
  body.social-ui-v2 .story-filter-row {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  body.social-ui-v2 .story-camera-actions::-webkit-scrollbar,
  body.social-ui-v2 .story-filter-row::-webkit-scrollbar {
    display: none;
  }

  body.social-ui-v2 .story-camera-actions button,
  body.social-ui-v2 .story-filter-row button {
    flex: 0 0 auto;
  }

  body.social-ui-v2 .story-camera-footer {
    padding: 9px 12px max(11px,env(safe-area-inset-bottom));
  }
}

/* Motion precedence pass: keep the professional motion layer above legacy rules. */
body.social-ui-v2 .motion-reveal:not(.is-motion-visible) {
  opacity: 0;
  transform: translate3d(0,16px,0) scale(.985);
  filter: blur(4px);
}

body.social-ui-v2 .motion-reveal.is-motion-visible {
  animation: socialMotionReveal var(--motion-reveal) var(--motion-spring) both;
  animation-delay: var(--motion-delay,0ms);
}

body.social-ui-v2 .backdrop.show:not(.sheet-closing) .sheet,
body.social-ui-v2 .social-sheet-overlay.show:not(.sheet-closing) .social-sheet {
  animation: socialMotionSheetIn 460ms var(--motion-pop) both;
  transform-origin: center bottom;
}

body.social-ui-v2 .backdrop.sheet-closing .sheet,
body.social-ui-v2 .social-sheet-overlay.sheet-closing .social-sheet {
  animation: socialMotionSheetOut 230ms var(--motion-exit) both !important;
}

body.social-ui-v2 .toast {
  animation: socialMotionToastIn 380ms var(--motion-pop) both;
}

body.social-ui-v2 .toast.leaving {
  animation: socialMotionToastOut 220ms var(--motion-exit) forwards;
}

body.social-ui-v2 :is(.post-menu.show,.notif-menu.show,.account-menu.show,.mention-box.show,.lb-mob-menu:not([hidden])) {
  animation: socialMotionMenuIn 180ms var(--motion-spring) both;
}

body.social-ui-v2 #lb.lb.is-open .lb-img {
  animation: socialMotionLightboxMediaIn 420ms var(--motion-spring) both;
}

body.social-ui-v2 #lb.lb.is-open .lb-panel {
  animation: socialMotionPanelIn 360ms var(--motion-spring) both;
}

body.social-ui-v2 :is(.post-media,.comment-media-btn,.media-tile,.media-preview-item,.story-camera-frame) img {
  transition:
    transform 520ms var(--motion-spring),
    filter 360ms ease,
    opacity 260ms ease;
}

body.social-ui-v2 .motion-pressable.is-pressing {
  transform: translate3d(0,1px,0) scale(.975) !important;
}

/* Final mobile precedence: keep community controls anchored to the right. */
@media (max-width:768px) {
  body.social-ui-v2 .topbar-inner {
    display: grid !important;
    grid-template-columns: minmax(0,1fr) auto;
    align-items: center;
    gap: 10px;
    width: calc(100% - 18px);
  }

  body.social-ui-v2 .topbar .brand {
    grid-column: 1;
    justify-self: start;
    min-width: 0;
    max-width: min(54vw,220px);
  }

  body.social-ui-v2 .topbar .brand-text strong {
    max-width: 136px;
    text-align: left;
  }

  body.social-ui-v2 .topbar .top-search,
  body.social-ui-v2 .topbar #theme-btn,
  body.social-ui-v2 .topbar #desktop-chat-btn {
    display: none !important;
  }

  body.social-ui-v2 .topbar .topnav {
    grid-column: 2;
    display: flex !important;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    min-width: 0;
    margin-left: 0;
    position: relative;
  }

  body.social-ui-v2 .topbar #mobile-menu-btn,
  body.social-ui-v2 .topbar .notif-btn,
  body.social-ui-v2 .topbar .userbtn {
    width: 42px;
    height: 42px;
    min-width: 42px;
    padding: 0;
    border-radius: 999px;
  }

  body.social-ui-v2 .topbar #mobile-menu-btn {
    display: inline-flex !important;
    order: 1;
  }

  body.social-ui-v2 .topbar .notif-wrap {
    display: block;
    position: relative;
    order: 2;
  }

  body.social-ui-v2 .topbar .userbtn {
    display: inline-flex;
    order: 3;
  }

  body.social-ui-v2 .topbar .userbtn img {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
  }

  body.social-ui-v2 .topbar .account-menu,
  body.social-ui-v2 .topbar .notif-menu {
    position: fixed !important;
    left: auto !important;
    right: 8px !important;
    top: calc(var(--topbar-h) + 7px) !important;
    width: min(292px,calc(100vw - 16px)) !important;
    max-width: calc(100vw - 16px) !important;
    max-height: min(520px,calc(100dvh - var(--topbar-h) - 24px));
    overflow: auto;
    transform-origin: top right;
    z-index: 1200 !important;
  }

  body.social-ui-v2 .topbar .account-menu.show,
  body.social-ui-v2 .topbar .notif-menu.show {
    display: grid !important;
  }

  body.social-ui-v2 .topbar .account-mobile-only {
    display: flex !important;
  }

  body.social-ui-v2 .mobile-drawer {
    margin-left: auto !important;
    margin-right: 0 !important;
    border-left: 1px solid var(--line);
    border-right: 0;
    transform: translateX(105%);
  }

  body.social-ui-v2 .mobile-drawer-shell.show .mobile-drawer {
    transform: translateX(0);
  }
}

body.social-ui-v2 .preview-row-body,
body.social-ui-v2 .comment-row > div {
  min-width: 0;
}

body.social-ui-v2 .preview-row.has-media .preview-row-text {
  margin-bottom: 2px;
}

body.social-ui-v2 .preview-row-thread {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  background: color-mix(in srgb,var(--accent) 9%,transparent);
  color: var(--accent);
  font: 800 10px/1 var(--ff-mono);
}

body.social-ui-v2 .preview-row .comment-media-grid,
body.social-ui-v2 .comment-row .comment-media-grid {
  width: min(100%, 520px);
  max-width: 100%;
}

body.social-ui-v2 .preview-row .comment-media-grid {
  grid-template-columns: repeat(2,minmax(0,150px));
  gap: 6px;
  margin-top: 8px;
}

body.social-ui-v2 .preview-row .comment-media-grid[data-count="1"] {
  grid-template-columns: minmax(0,230px);
}

body.social-ui-v2 .preview-row .comment-media-btn {
  min-height: 106px;
  max-height: 180px;
  border-radius: 12px;
}

body.social-ui-v2 .preview-row .comment-media-btn img {
  min-height: 106px;
  max-height: 180px;
  border-radius: 0;
}

body.social-ui-v2 .comment-row .comment-media-grid[data-count="1"] {
  grid-template-columns: minmax(0,380px);
}

body.social-ui-v2 .comment-row .comment-media-btn {
  border-radius: 14px;
}

body.social-ui-v2 .preview-comment-actions {
  max-width: min(100%,420px);
}

@media (max-width: 560px) {
  body.social-ui-v2 .preview-row .comment-media-grid,
  body.social-ui-v2 .preview-row .comment-media-grid[data-count="1"],
  body.social-ui-v2 .comment-row .comment-media-grid,
  body.social-ui-v2 .comment-row .comment-media-grid[data-count="1"] {
    grid-template-columns: minmax(0,1fr);
    width: 100%;
  }

  body.social-ui-v2 .preview-row .comment-media-btn,
  body.social-ui-v2 .preview-row .comment-media-btn img {
    min-height: 128px;
  }
}

body.social-ui-v2 #stories-shell .story-ring {
  min-width: 64px !important;
  min-height: 64px !important;
  max-width: 64px !important;
  max-height: 64px !important;
  contain: layout;
}

body.social-ui-v2 #stories-shell .story-ring {
  overflow: visible !important;
}

body.social-ui-v2 #stories-shell .story-ring::before {
  content: '' !important;
  position: absolute !important;
  inset: -5px !important;
  z-index: 0 !important;
  border: 3px solid transparent !important;
  border-radius: 50% !important;
  background: linear-gradient(45deg,#feda75 0%,#fa7e1e 22%,#d62976 48%,#962fbf 72%,#4f5bd5 100%) border-box !important;
  -webkit-mask: linear-gradient(#000 0 0) padding-box, linear-gradient(#000 0 0) !important;
  -webkit-mask-composite: xor !important;
  mask-composite: exclude !important;
  pointer-events: none !important;
}

body.social-ui-v2 #stories-shell .story-item.is-own .story-ring::before {
  opacity: 1 !important;
  background: color-mix(in srgb,var(--line-strong) 82%,var(--accent) 18%) border-box !important;
  animation: none !important;
}

body.social-ui-v2 #stories-shell .story-ring > img,
body.social-ui-v2 #stories-shell .story-ring-button .story-ring > img {
  display: block !important;
  inline-size: 64px !important;
  block-size: 64px !important;
  min-width: 64px !important;
  min-height: 64px !important;
  max-width: 64px !important;
  max-height: 64px !important;
  object-fit: cover !important;
  border-radius: 50% !important;
  flex: 0 0 64px !important;
  position: relative !important;
  z-index: 1 !important;
}

body.social-ui-v2 .feed-story-avatar {
  cursor: pointer;
}

body.social-ui-v2 .feed-story-avatar.has-unseen-story {
  padding: 2px !important;
  border: 2px solid transparent !important;
  border-radius: 50% !important;
  background:
    linear-gradient(var(--surface-solid,var(--surface)),var(--surface-solid,var(--surface))) padding-box,
    linear-gradient(45deg,#feda75 0%,#fa7e1e 22%,#d62976 48%,#962fbf 72%,#4f5bd5 100%) border-box !important;
  box-shadow: 0 0 0 2px var(--surface-solid,var(--surface)),0 6px 16px color-mix(in srgb,var(--accent) 18%,transparent);
}

body.social-ui-v2 .feed-story-avatar.has-unseen-story:hover {
  filter: saturate(1.08);
}

body.social-ui-v2 .comments-load-warning {
  display: grid;
  gap: 3px;
  margin: 8px 0;
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb,var(--warn,#f59e0b) 42%,var(--line));
  border-radius: 10px;
  background: color-mix(in srgb,var(--warn,#f59e0b) 10%,var(--surface));
  color: var(--ink);
  font-size: 12px;
}

body.social-ui-v2 .comments-load-warning span {
  color: var(--ink-3);
}

body.social-ui-v2 .mobile-bottom-nav .mbtn[aria-current="page"] {
  background: var(--accent-soft);
  color: var(--accent);
}

body.social-ui-v2 .mobile-bottom-nav .mbtn.nav-activated {
  animation: mobile-nav-activate 360ms cubic-bezier(.16,1,.3,1);
}

@keyframes mobile-nav-activate {
  0% { transform: translateY(0) scale(.96); }
  55% { transform: translateY(-3px) scale(1.04); }
  100% { transform: translateY(0) scale(1); }
}

@media(max-width:767px) {
  body.social-ui-v2 #compact-social-discovery {
    display: none !important;
  }

  body.social-ui-v2 #feed-col > .col-header {
    order: -2 !important;
  }

  body.social-ui-v2 #feed-col > #stories-shell {
    order: -1 !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.social-ui-v2 .motion-reveal,
  body.social-ui-v2 .motion-reveal.is-motion-visible {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }

  body.social-ui-v2 .motion-ripple {
    display: none !important;
  }
}
