/* Animated TikTok cover wall behind the featured social post. */
#community.social-masonry {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: #151713;
}

#community .masonry-backdrop {
  position: absolute;
  inset: -90px -10%;
  z-index: -3;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  pointer-events: none;
}

#community .brick-column {
  position: relative;
  min-width: 0;
}

#community .brick-column:nth-child(even) {
  margin-top: -150px;
}

#community .brick-track {
  animation: wall-rise 110s linear infinite;
  will-change: transform;
}

#community .brick-column:nth-child(even) .brick-track {
  animation-direction: reverse;
  animation-duration: 125s;
}

#community .brick-column:nth-child(3) .brick-track {
  animation-duration: 100s;
}

#community .brick-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 12px;
}

#community .wall-brick {
  position: relative;
  height: 260px;
  overflow: hidden;
  border-radius: 4px;
  background: #292e24;
}

#community .wall-brick.brick-1 {
  height: 330px;
}

#community .wall-brick.brick-2 {
  height: 210px;
}

#community .wall-brick img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(.8);
}

#community .reel-brick > span {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 24px 10px 10px;
  background: linear-gradient(transparent, #000b);
  color: #fff;
  font-size: 11px;
  letter-spacing: .2px;
}

#community .reel-brick b {
  font-size: 18px;
  font-weight: 400;
}

#community .masonry-shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, #10140fe8 0%, #10140f9e 30%, #10140fce 75%, #10140ff0 100%);
  pointer-events: none;
}

#community .masonry-top,
#community .featured-social {
  position: relative;
  z-index: 1;
}

#community .wall-controls {
  position: absolute;
  z-index: 2;
  top: 34px;
  right: 5%;
  display: flex;
}

#community .wall-controls button {
  min-height: 40px;
  border: 1px solid #929787;
  padding: 9px 12px;
  background: #12160eb3;
  color: var(--paper);
  font-size: 11px;
  letter-spacing: .4px;
}

#community .wall-controls button:hover {
  background: var(--acid);
  color: var(--black);
}

#community.is-paused .brick-track {
  animation-play-state: paused;
}

@keyframes wall-rise {
  to { transform: translateY(-50%); }
}

@media (max-width: 800px) {
  #community .masonry-backdrop {
    inset: -90px -10%;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }

  #community .brick-column:nth-child(n+4) {
    display: none;
  }

  #community .brick-group {
    gap: 10px;
    padding-bottom: 10px;
  }

  #community .wall-brick {
    height: 220px;
  }

  #community .wall-brick.brick-1 {
    height: 300px;
  }

  #community .wall-brick.brick-2 {
    height: 180px;
  }

  #community .wall-controls {
    top: 12px;
    right: 5%;
  }

  #community .wall-controls button {
    min-height: 36px;
    padding: 7px 9px;
    font-size: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #community .brick-track {
    animation: none !important;
    will-change: auto;
  }
}
