.community-page {
  width: min(1380px, 100%);
  margin: 0 auto;
  padding: 24px;
}

.community-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  text-align: left;
}

.community-header h1 {
  margin: 0;
  font-size: clamp(28px, 5vw, 48px);
}

.community-header p:not(.brand-kicker) {
  margin-bottom: 0;
  color: var(--muted);
}

.community-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.community-toolbar h2 {
  margin: 0;
}

.community-status {
  min-height: 22px;
  color: var(--muted);
}

.community-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(390px, 1fr));
  gap: 24px;
}

.community-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(18, 22, 29, 0.95);
  box-shadow: 0 12px 35px rgba(0, 0, 0, .2);
}

.community-preview {
  display: block;
  width: 100%;
  height: 390px;
  border: 0;
  background: white;
}

.community-card-body {
  display: grid;
  gap: 12px;
  padding: 17px;
}

.community-card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.community-card-heading h3 {
  margin: 0;
  color: white;
}

.community-card-description,
.community-card-meta {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.community-card-meta {
  font-size: 12px;
}

.community-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.community-actions .btn {
  flex: 1;
  min-width: 100px;
}

.community-comments {
  display: grid;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.community-comments h4 {
  margin: 0;
  font-size: 13px;
}

.comment-list {
  display: grid;
  gap: 6px;
  max-height: 180px;
  overflow-y: auto;
}

.comment-item {
  padding: 8px 10px;
  border-radius: 9px;
  background: rgba(255, 255, 255, .05);
  color: #cbd3df;
  font-size: 12px;
  line-height: 1.4;
}

.comment-item strong {
  display: block;
  margin-bottom: 3px;
  color: white;
}

.comment-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 7px;
}

.comment-form input {
  min-width: 0;
  padding: 9px 10px;
  border-radius: 8px;
}

.empty-community {
  grid-column: 1 / -1;
  padding: 45px 20px;
  border: 1px dashed var(--border);
  border-radius: 18px;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 900px) {
  .community-grid {
    grid-template-columns: 1fr;
  }

  .community-preview {
    height: 430px;
  }
}

@media (max-width: 700px) {
  .community-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .community-page {
    padding: 14px;
  }

  .community-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .community-preview {
    height: 360px;
  }
}

@media (max-width: 480px) {
  .community-grid {
    grid-template-columns: 1fr;
  }

  .community-preview {
    height: 320px;
  }
}