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

.community-main {
  padding: 34px 0 60px;
}

.community-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
  align-items: end;
  padding: 34px;
  margin-bottom: 22px;
  background: linear-gradient(135deg, rgba(255,255,255,.96), rgba(240,249,255,.94));
}

.community-hero h1 {
  font-size: clamp(36px, 5vw, 62px);
  letter-spacing: 0;
}

.community-hero-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 20px;
  box-shadow: var(--soft-shadow);
}

.community-grid {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.community-side {
  position: sticky;
  top: 92px;
}

.community-room-list,
.community-posts {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.community-room-button {
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 18px;
  padding: 14px;
  cursor: pointer;
  color: var(--ink);
}

.community-room-button strong {
  display: block;
  font-weight: 900;
}

.community-room-button span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 3px;
}

.community-room-button.active,
.community-room-button:hover {
  border-color: rgba(23,105,210,.45);
  background: rgba(23,105,210,.06);
}

.community-thread {
  min-height: 540px;
}

.community-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.community-safety {
  margin-bottom: 16px;
}

.community-mode-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}

.community-mode {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 18px;
  padding: 14px;
  display: grid;
  gap: 10px;
}

.community-mode p {
  color: var(--muted);
  font-size: 13px;
}

.community-post {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  padding: 16px;
}

.community-post-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 10px;
}

.community-post-head strong,
.community-post-head span {
  display: block;
}

.community-post-head span {
  color: var(--muted);
  font-size: 12px;
}

.community-post p {
  white-space: pre-wrap;
}

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

.community-explain {
  margin-top: 20px;
}

.profile-preview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.profile-preview-grid div {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: rgba(23,105,210,.04);
}

.profile-preview-grid strong,
.profile-preview-grid span {
  display: block;
}

.profile-preview-grid span {
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
}

.help.ok { color: #157347; }
.help.error { color: #a63737; }
.help.warn { color: #a45711; }

@media (max-width: 980px) {
  .community-hero,
  .community-grid,
  .community-mode-grid,
  .profile-preview-grid {
    grid-template-columns: 1fr;
  }

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

  .community-side {
    position: relative;
    top: 0;
  }
}

@media (max-width: 620px) {
  .community-main {
    padding: 18px 0 40px;
  }

  .community-hero {
    padding: 22px;
  }

  .community-thread .card-head {
    display: grid;
  }

  .community-post-head {
    display: grid;
  }

  .community-card-actions {
    justify-content: stretch;
  }

  .community-card-actions .btn {
    width: 100%;
  }
}
