.social-feed-launcher {
  --ig-grad: linear-gradient(135deg, #833ab4, #fd1d1d, #fcb045);
  position: fixed;
  right: 18px;
  bottom: 92px;
  z-index: 310;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px 10px 10px;
  border: 1px solid rgba(var(--text-rgb), 0.12);
  border-radius: 999px;
  background: rgba(var(--page-bg-rgb), 0.92);
  backdrop-filter: blur(14px);
  color: rgb(var(--text-rgb));
  cursor: pointer;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
  transition: transform 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease;
}

.social-feed-launcher:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.34);
}

.social-feed-launcher-icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  padding: 1px;
  background: var(--ig-grad);
  flex-shrink: 0;
}

.social-feed-launcher-icon svg {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 50%;
  background: rgba(var(--page-bg-rgb), 0.98);
  padding: 5px;
  box-sizing: border-box;
}

body.social-feed-open .social-feed-launcher {
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
}

.social-feed-sidebar {
  position: fixed;
  top: 74px;
  right: 16px;
  width: 304px;
  height: calc(100vh - 92px);
  max-height: 720px;
  z-index: 320;
  transform: translateX(0);
  transition: transform 0.34s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.28s ease;
  pointer-events: auto;
}

.social-feed-sidebar.is-collapsed {
  transform: translateX(calc(100% + 24px));
  opacity: 0;
  pointer-events: none;
}

.social-feed-shell {
  height: 100%;
  display: flex;
  flex-direction: column;
  border-radius: 22px;
  border: 1px solid rgba(var(--text-rgb), 0.1);
  background: rgba(var(--page-bg-rgb), 0.88);
  backdrop-filter: blur(20px) saturate(150%);
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.social-feed-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 16px 12px;
  border-bottom: 1px solid rgba(var(--text-rgb), 0.08);
}

.social-feed-label {
  display: block;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(var(--text-rgb), 0.45);
  margin-bottom: 4px;
}

.social-feed-handle {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: rgb(var(--text-rgb));
  text-decoration: none;
  letter-spacing: -0.02em;
}

.social-feed-handle:hover {
  color: var(--link-blue);
}

.social-feed-close {
  width: 32px;
  height: 32px;
  border: 1px solid rgba(var(--text-rgb), 0.1);
  border-radius: 50%;
  background: rgba(var(--text-rgb), 0.04);
  color: rgba(var(--text-rgb), 0.75);
  cursor: pointer;
  font-size: 1.15rem;
  line-height: 1;
  flex-shrink: 0;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.social-feed-close:hover {
  border-color: rgba(var(--text-rgb), 0.22);
  color: rgb(var(--text-rgb));
  background: rgba(var(--text-rgb), 0.08);
}

.social-feed-posts {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scrollbar-width: thin;
}

.social-feed-status,
.social-feed-error {
  font-size: 0.78rem;
  line-height: 1.5;
  color: rgba(var(--text-rgb), 0.55);
  text-align: center;
  padding: 24px 12px;
}

.social-feed-error a {
  color: var(--link-blue);
}

.ig-post {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(var(--text-rgb), 0.08);
  background: rgba(var(--text-rgb), 0.03);
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.ig-post:hover {
  border-color: rgba(110, 155, 255, 0.35);
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
}

.ig-post-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.ig-post-media {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: rgba(var(--text-rgb), 0.06);
}

.ig-post-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.ig-post:hover .ig-post-media img {
  transform: scale(1.03);
}

.ig-post-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.ig-post-badge svg {
  width: 15px;
  height: 15px;
}

.ig-post-body {
  padding: 12px 14px 14px;
}

.ig-post-caption {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.45;
  color: rgba(var(--text-rgb), 0.78);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ig-post-cta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 10px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--link-blue);
}

.ig-skeleton {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(var(--text-rgb), 0.08);
  background: rgba(var(--text-rgb), 0.03);
}

.ig-skeleton-media {
  aspect-ratio: 1 / 1;
  background: linear-gradient(
    110deg,
    rgba(var(--text-rgb), 0.04) 8%,
    rgba(var(--text-rgb), 0.1) 18%,
    rgba(var(--text-rgb), 0.04) 33%
  );
  background-size: 200% 100%;
  animation: ig-shimmer 1.2s linear infinite;
}

.ig-skeleton-lines {
  padding: 14px;
  display: grid;
  gap: 8px;
}

.ig-skeleton-lines span {
  display: block;
  height: 10px;
  border-radius: 999px;
  background: rgba(var(--text-rgb), 0.08);
}

.ig-skeleton-lines span:last-child {
  width: 62%;
}

@keyframes ig-shimmer {
  to { background-position-x: -200%; }
}

.social-feed-follow {
  display: block;
  margin: 0 12px 12px;
  padding: 11px 14px;
  border-radius: 12px;
  text-align: center;
  text-decoration: none;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #833ab4 0%, #c13584 45%, #fd1d1d 100%);
  box-shadow: 0 8px 20px rgba(253, 29, 29, 0.22);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.social-feed-follow:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(253, 29, 29, 0.28);
}

.social-feed-backdrop {
  display: none;
}

@media (min-width: 1100px) {
  body.social-feed-open {
    padding-right: 336px;
  }
}

@media (max-width: 1099px) {
  .social-feed-sidebar {
    top: 0;
    right: 0;
    width: min(304px, 88vw);
    height: 100vh;
    max-height: none;
    border-radius: 0;
  }

  .social-feed-shell {
    border-radius: 0;
  }

  .social-feed-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(3px);
    z-index: 315;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.28s ease;
  }

  body.social-feed-open .social-feed-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  body.social-feed-open {
    overflow: hidden;
  }
}

@media (max-width: 720px) {
  .social-feed-launcher {
    right: 14px;
    bottom: 86px;
  }
}
