/* 社区页：左分类 + Hot/Featured，右搜索发布与作品墙 */

.commpage {
  padding: 22px 0 56px;
  background: #fff;
}

.commpage__layout {
  display: flex;
  align-items: flex-start;
  gap: 28px;
}

.commpage-side {
  width: 176px;
  flex: none;
}

.commpage-main {
  flex: 1;
  min-width: 0;
}

.commpage-fold__head {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 5px 0 14px;
  border-radius: 9px;
  background: var(--blue);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
}

.commpage-fold__caret {
  width: 16px;
  height: 16px;
  max-width: none;
  transition: transform .2s ease;
}

.commpage-fold.is-shut .commpage-fold__caret {
  transform: rotate(180deg);
}

.commpage-cats {
  margin-top: 16px;
}

.commpage-cat {
  display: flex;
  align-items: center;
  width: auto;
  padding: 7px 0 7px 14px;
  text-align: left;
  font-size: 15px;
  font-weight: 500;
  color: #3f3f3f;
  line-height: 1.25;
}

.commpage-cat:hover {
  color: #1a1a1a;
}

.commpage-cat.is-on span {
  position: relative;
  display: inline-block;
  color: #1a1a1a;
  font-weight: 800;
}

.commpage-cat.is-on span::after {
  content: "";
  position: absolute;
  left: -2px;
  right: -2px;
  bottom: -5px;
  height: 3px;
  border-radius: 2px;
  background: var(--blue);
}

.commpage-rank {
  margin-top: 28px;
}

.commpage-rank__tabs {
  display: flex;
  align-items: center;
  height: 40px;
  padding: 4px;
  border-radius: 999px;
  background: #006cb8;
}

.commpage-rank__tab {
  flex: 1;
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: transparent;
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  line-height: 32px;
  text-align: center;
}

.commpage-rank__tab.is-on {
  background: var(--yellow);
  color: #1a1a1a;
}

.commpage-rank__list {
  margin-top: 10px;
  padding: 6px 8px 4px;
  border-radius: 16px;
  background: #eef8fe;
}

.commpage-rank__item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
}

.commpage-rank__open {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.commpage-rank__thumb {
  width: 44px;
  height: 44px;
  max-width: none;
  flex: none;
  border-radius: 8px;
  object-fit: cover;
  background: #f2f2f2;
}

.commpage-rank__name {
  flex: 1;
  min-width: 0;
  color: #1a1a1a;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.commpage-rank__like,
.commpage-card__like {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  flex: none;
  padding: 0;
  color: #222;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
}

.commpage-rank__like img,
.commpage-card__like img {
  width: 16px;
  height: 14px;
  max-width: none;
  object-fit: contain;
}

.commpage-toolbar {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
}

.commpage-search {
  flex: 1;
  min-width: 0;
}

.commpage-search input {
  width: 100%;
  height: 44px;
  padding: 0 22px;
  border: none;
  border-radius: 999px;
  background: #e8f4fc;
  color: #1a1a1a;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  outline: none;
}

.commpage-search input::placeholder {
  color: #8aa4b8;
  font-weight: 600;
}

.commpage-publish {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: none;
  height: 44px;
  padding: 0 22px;
  border-radius: 999px;
  background: var(--yellow);
  color: #1a1a1a;
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.commpage-publish:hover {
  filter: brightness(0.97);
}

.commpage-publish img {
  width: 16px;
  height: 16px;
  max-width: none;
  object-fit: contain;
}

.commpage-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 20px 16px;
}

.commpage-card {
  min-width: 0;
}

.commpage-card__shot {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 14px;
  overflow: hidden;
  background: #f2f2f2;
}

.commpage-card__pic {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  transition: transform .35s ease;
}

.commpage-card:hover .commpage-card__pic {
  transform: scale(1.04);
}

.commpage-card__title {
  margin: 10px 2px 6px;
  color: #1a1a1a;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.3;
}

.commpage-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 2px;
}

.commpage-card__user {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  padding: 0;
  color: #9a9a9a;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

.commpage-card__user:hover {
  color: #0074c6;
}

.commpage-card__user img {
  width: 18px;
  height: 18px;
  max-width: none;
  border-radius: 50%;
  object-fit: cover;
  flex: none;
  background: #d9d9d9;
}

.commpage-empty {
  padding: 72px 12px;
  color: #888;
  font-size: 15px;
  font-weight: 700;
  text-align: center;
}

.commpage-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 36px;
  color: #222;
  font-size: 16px;
  font-weight: 800;
}

.commpage-pager__arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 32px;
  padding: 0;
}

.commpage-pager__arrow img {
  width: 16px;
  height: 22px;
  max-width: none;
  object-fit: contain;
}

.commpage-pager__arrow:disabled {
  opacity: 0.35;
  cursor: default;
}

.commpage-pager__num {
  min-width: 32px;
  height: 32px;
  border-radius: 4px;
  font-weight: 800;
}

.commpage-pager__num.is-on {
  background: var(--blue);
  color: #fff;
}

.commpage-pager__jump {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: 6px;
  font-weight: 700;
}

.commpage-pager__jump input {
  width: 48px;
  height: 32px;
  padding: 0;
  border: none;
  border-radius: 4px;
  background: #f2f3f5;
  color: #222;
  font: inherit;
  font-weight: 800;
  text-align: center;
  outline: none;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 1100px) {
  .commpage-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .commpage__layout {
    flex-direction: column;
    gap: 20px;
  }

  .commpage-side {
    width: 100%;
  }

  .commpage-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
    margin-top: 12px;
  }

  .commpage-cat {
    padding: 6px 4px;
  }

  .commpage-rank {
    max-width: 320px;
  }

  .commpage-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .commpage-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .commpage-publish {
    justify-content: center;
  }

  .commpage-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 10px;
  }

  .commpage-pager {
    flex-wrap: wrap;
    gap: 10px;
  }
}
