/* Community shelf — weekly spotlight rail */

.community-shelf-section {
  padding: 64px 0;
  background-color: #f6f7f2;
  background-image: radial-gradient(
      70% 60% at 50% 100%,
      rgba(248, 230, 234, 0.95) 0%,
      rgba(248, 230, 234, 0) 70%
    ),
    radial-gradient(
      120% 78% at 0% 100%,
      rgba(175, 254, 231, 0.6) 0%,
      rgba(175, 254, 231, 0) 62%
    ),
    radial-gradient(
      120% 78% at 100% 100%,
      rgba(155, 240, 252, 0.6) 0%,
      rgba(155, 240, 252, 0) 62%
    );
}

.community-shelf-wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

.community-spotlight-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-width: 192px;
  height: 40px;
  padding: 0 20px;
  border-radius: 25px;
  background: linear-gradient(
    90deg,
    #affee7 0%,
    #f8e6ea 50%,
    #9bf0fc 100%
  );
  box-shadow: 0 6px 16px -4px rgba(26, 26, 26, 0.16),
    0 2px 4px -1px rgba(26, 26, 26, 0.08);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #1a1a1a;
  margin-bottom: 14px;
}

.community-shelf-intro h2 {
  font-size: 24px;
  line-height: 1.25;
  font-weight: 500;
  color: #1a1a1a;
  max-width: 640px;
  margin: 0;
}

.community-shelf-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 24px 0 18px;
}

.community-cat-slider {
  display: flex;
  gap: 8px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
  margin: 0 0 0 -20px;
  padding: 4px 0 4px 20px;
}

.community-cat-slider::-webkit-scrollbar {
  display: none;
}

.community-cat-chip {
  flex: none;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  border: 1px solid rgba(26, 26, 26, 0.15);
  background: #fff;
  color: #81827d;
  border-radius: 999px;
  padding: 9px 18px;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s ease;
}

.community-cat-chip:hover {
  border-color: #1a1a1a;
  color: #1a1a1a;
}

.community-cat-chip[aria-current="true"] {
  background: #1a1a1a;
  border-color: #1a1a1a;
  color: #fff;
}

.community-shelf-controls .more {
  flex: none;
  font-size: 15px;
  font-weight: 500;
  color: #1a1a1a;
  white-space: nowrap;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.community-shelf-controls .more:hover {
  opacity: 0.6;
}

.community-railwrap {
  position: relative;
}

.community-rail {
  overflow: hidden;
  margin: 0 -20px;
}

.community-rail-track {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 4px 0 6px;
  cursor: grab;
}

.community-rail-track:active {
  cursor: grabbing;
}

.community-card {
  flex: 0 0 200px;
  display: block;
  color: inherit;
  text-decoration: none;
  -webkit-user-select: none;
  user-select: none;
}

.community-card img {
  pointer-events: none;
}

.community-card .ph {
  display: block;
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: 16px;
  overflow: hidden;
  background: #ecece8;
}

.community-card .ph .cover {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.community-card .ph .fallback {
  display: block;
  position: absolute;
  inset: 0;
  background: #faf0fe;
}

.community-card:nth-child(3n + 2) .ph .fallback {
  background: #f0f6d9;
}

.community-card:nth-child(3n) .ph .fallback {
  background: #e8e6ff;
}

.community-card .ph .avatar {
  position: absolute;
  left: 10px;
  bottom: 10px;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid #fff;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: 700;
  color: #81827d;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

.community-card .ph .avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.community-card .info {
  display: block;
  padding: 10px 2px 0;
}

.community-card .info h4 {
  display: block;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.3;
  color: #1a1a1a;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media screen and (max-width: 768px) {
  .community-shelf-section {
    padding: 48px 0;
  }
  /* The chip row always overflows at this width, so the fade reads as
     "scrollable" instead of as a chip clipped against "See all". */
  .community-cat-slider {
    mask-image: linear-gradient(90deg, #000 calc(100% - 44px), transparent);
    -webkit-mask-image: linear-gradient(
      90deg,
      #000 calc(100% - 44px),
      transparent
    );
  }
  .community-shelf-intro h2 {
    font-size: 20px;
    line-height: 1.3;
  }
}

@media screen and (max-width: 480px) {
  .community-card {
    flex-basis: 160px;
  }
  .community-card .ph .avatar {
    width: 64px;
    height: 64px;
    font-size: 21px;
  }
}

