.community-guest,
.com-admin {
  margin: 25px 0;
  min-width: 0;
}
.com-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
  margin-bottom: 20px;
  padding: 25px;
  border-radius: 22px;
  background: linear-gradient(125deg, var(--soft), var(--surface));
  border: 1px solid var(--line);
}
.com-header h2 {
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: -0.8px;
  margin: 8px 0;
}
.com-header p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.9;
  margin: 0;
}
.com-identity {
  min-width: 200px;
}
.com-identity .field {
  margin-bottom: 8px;
}
.com-identity .btn {
  width: 100%;
}
.com-capability-note {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.9;
  max-width: 850px;
}
.com-welcome {
  text-align: center;
  max-width: 620px;
  margin: 35px auto;
  padding: 35px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
}
.com-welcome h3 {
  font-size: 24px;
}
.com-welcome p {
  font-size: 14px;
  line-height: 2;
  color: var(--muted);
  margin-bottom: 25px;
}
.com-welcome-icon {
  color: var(--accent);
  background: var(--soft);
  border-radius: 20px;
  display: grid;
  place-items: center;
  width: 65px;
  height: 65px;
  margin: 0 auto;
}
.com-top-tabs {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 20px 0;
}
.com-top-tabs > span {
  font-size: 12px;
  color: var(--muted);
  margin-inline-start: auto;
}
.com-chat-layout {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  background: var(--surface);
}
.com-rooms {
  background: var(--soft);
  padding: 20px;
}
.com-rooms h3 {
  font-size: 14px;
  margin: 0 0 20px;
}
.com-rooms .btn {
  width: 100%;
  margin-bottom: 7px;
  background: transparent;
  border: 0;
  justify-content: flex-start;
}
.com-rooms .active {
  background: var(--surface);
  color: var(--accent);
}
.com-rooms p {
  font-size: 12px;
  line-height: 1.9;
  color: var(--muted);
  margin-top: 22px;
}
.com-private-label {
  padding: 12px;
  font-size: 12px;
  background: var(--surface);
  color: var(--accent);
  border-radius: 12px;
}
.com-conversation {
  min-width: 0;
}
.com-chat-caption {
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.com-chat-caption strong {
  font-size: 13px;
}
.com-chat-caption span {
  font-size: 12px;
  color: var(--muted);
}
.com-messages {
  height: 390px;
  overflow: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  scroll-behavior: smooth;
}
.com-message {
  max-width: 86%;
  border: 1px solid var(--line);
  background: var(--bg);
  border-radius: 16px;
  padding: 13px 16px;
  align-self: flex-end;
  min-width: min(150px, 100%);
}
.com-message.mine {
  align-self: flex-start;
  background: var(--soft);
  border-color: transparent;
}
.com-message-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 16px;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.com-message-meta time {
  color: var(--muted);
  font-size: 12px;
}
.com-message p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 13px;
  line-height: 1.8;
  margin: 9px 0 0;
}
.com-message-actions {
  display: flex;
  justify-content: flex-end;
  gap: 5px;
  margin-top: 6px;
}
.com-message-actions .btn {
  font-size: 12px;
  padding: 7px 10px;
  min-height: 44px;
}
.com-compose {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  padding: 18px;
  border-top: 1px solid var(--line);
}
.com-compose textarea {
  min-width: 0;
  resize: vertical;
  max-height: 180px;
  min-height: 52px;
  flex: 1;
}
.com-compose .btn {
  white-space: nowrap;
}
.com-empty {
  text-align: center;
  padding: 35px 20px;
  width: 100%;
  color: var(--muted);
  font-size: 13px;
}
.com-empty h3 {
  color: var(--ink);
  font-size: 19px;
}
.com-empty p {
  line-height: 1.9;
}
.com-directory-filters {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}
.com-directory-filters input {
  flex: 1;
  min-width: 0;
}
.com-directory-filters select {
  width: 160px;
}
.com-directory-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 15px;
}
.com-profile-card {
  min-width: 0;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 19px;
  display: flex;
  flex-direction: column;
}
.com-profile-top {
  display: flex;
  gap: 12px;
  align-items: center;
}
.com-profile-top > div {
  min-width: 0;
}
.com-avatar {
  flex: 0 0 43px;
  width: 43px;
  height: 43px;
  background: var(--soft);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--accent);
  font-size: 20px;
  font-weight: 700;
}
.com-profile-card h3 {
  font-size: 15px;
  margin: 0 0 4px;
  overflow-wrap: anywhere;
}
.com-profile-card small {
  color: var(--muted);
  font-size: 12px;
}
.com-profile-card p {
  font-size: 12px;
  line-height: 1.9;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.com-profile-tags {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin: 15px 0;
}
.com-profile-tags span {
  font-size: 12px;
  background: var(--soft);
  color: var(--accent);
  border-radius: 20px;
  padding: 4px 8px;
}
.com-profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: space-between;
  margin-top: auto;
}
.com-profile-actions .btn {
  font-size: 12px;
  padding: 8px 11px;
}
.com-check {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin: 16px 0;
  font-size: 13px;
  line-height: 1.8;
}
.com-check input {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  margin-top: 4px;
  accent-color: var(--accent);
}
.com-profile-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
}
.com-meet-settings {
  background: var(--soft);
  padding: 18px;
  border-radius: 15px;
  margin-top: 20px;
}
.com-meet-settings h3,
.com-blocked h3 {
  font-size: 14px;
  margin: 0 0 8px;
}
.com-meet-settings small {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.8;
}
.com-blocked {
  margin-top: 20px;
}
.com-blocked > div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
  font-size: 12px;
}
.com-notice {
  padding: 14px 18px;
  border-radius: 13px;
  background: var(--soft);
  color: var(--accent);
  font-size: 12px;
  line-height: 1.9;
}
.com-report-count {
  background: var(--surface);
  padding: 16px 25px;
  border-radius: 18px;
  text-align: center;
  display: flex;
  flex-direction: column;
  min-width: 140px;
}
.com-report-count strong {
  font-size: 36px;
  color: var(--accent);
}
.com-report-count span {
  font-size: 12px;
  color: var(--muted);
}
.com-moderation-list {
  display: grid;
  gap: 15px;
}
.com-moderation-card {
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
}
.com-moderation-card.hidden-message {
  opacity: 0.65;
}
.com-moderation-top {
  display: flex;
  gap: 15px;
  align-items: center;
  flex-wrap: wrap;
}
.com-moderation-top small {
  font-size: 12px;
  color: var(--muted);
}
.com-moderation-top > span {
  font-size: 12px;
  background: var(--soft);
  padding: 4px 9px;
  border-radius: 12px;
}
.com-moderation-card > p {
  font-size: 13px;
  line-height: 1.9;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.com-report-reason {
  padding: 15px;
  border-radius: 13px;
  background: var(--soft);
  font-size: 12px;
}
.com-report-reason p {
  margin: 5px 0;
}
.com-report-reason small {
  color: var(--muted);
}
.com-moderation-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 15px;
}
@media (max-width: 850px) {
  .com-directory-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .com-header {
    align-items: flex-start;
  }
  .com-chat-layout {
    grid-template-columns: 155px minmax(0, 1fr);
  }
}
@media (max-width: 600px) {
  .com-header {
    display: block;
    padding: 22px;
  }
  .com-identity {
    margin-top: 20px;
  }
  .com-directory-grid {
    grid-template-columns: 1fr;
  }
  .com-chat-layout {
    display: block;
  }
  .com-rooms {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    padding: 12px;
  }
  .com-rooms h3,
  .com-rooms p {
    display: none;
  }
  .com-rooms .btn {
    width: auto;
    margin: 0;
    font-size: 12px;
    padding: 8px 12px;
  }
  .com-private-label {
    width: 100%;
  }
  .com-messages {
    height: 350px;
    padding: 15px;
  }
  .com-compose {
    padding: 12px;
    gap: 8px;
  }
  .com-compose .btn {
    padding: 11px;
    font-size: 12px;
  }
  .com-message {
    max-width: 95%;
  }
  .com-chat-caption {
    padding: 13px;
  }
  .com-chat-caption span {
    display: none;
  }
  .com-directory-filters {
    flex-wrap: wrap;
  }
  .com-directory-filters input,
  .com-directory-filters select {
    width: 100%;
    flex: auto;
  }
  .com-top-tabs .btn {
    font-size: 12px;
  }
  .com-top-tabs > span {
    width: 100%;
    margin: 0;
  }
  .com-profile-fields {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .com-welcome {
    padding: 25px;
  }
  .com-report-count {
    margin-top: 20px;
  }
  .com-capability-note {
    font-size: 12px;
  }
}

.com-avatar-image {
  width: 43px;
  height: 43px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
.com-profile-photo {
  padding: 16px;
  background: var(--soft);
  border-radius: 14px;
  margin: 16px 0;
  display: grid;
  gap: 10px;
}
.com-profile-photo small {
  color: var(--muted);
  line-height: 1.6;
}
.com-profile-photo input[type="file"] {
  width: 100%;
  max-width: 100%;
  font-size: 13px;
}

.com-header > div,
.com-identity,
.com-moderation-card,
.com-report-reason,
.com-blocked > div > span {
  min-width: 0;
  overflow-wrap: anywhere;
}
.community-guest .btn,
.com-admin .btn,
.com-profile-actions .btn {
  min-height: 44px;
  max-width: 100%;
  white-space: normal;
  font-size: 13px;
  line-height: 1.5;
}
.com-rooms .btn {
  text-align: start;
  overflow-wrap: anywhere;
}
.com-profile-actions .btn {
  flex: 1 1 auto;
}
.com-chat-caption > span {
  line-height: 1.6;
}
.com-message-actions,
.com-blocked > div {
  flex-wrap: wrap;
  gap: 8px;
}
.com-messages {
  overscroll-behavior: contain;
}
@media (max-width: 600px) {
  .com-header,
  .com-welcome {
    padding: 20px;
  }
  .com-messages {
    height: clamp(260px, 45dvh, 390px);
    padding: 12px;
  }
  .com-message {
    padding: 12px;
    max-width: 100%;
  }
  .com-compose {
    flex-wrap: wrap;
  }
  .com-compose textarea {
    flex: 1 1 100%;
    font-size: 16px;
  }
  .com-compose .btn {
    margin-inline-start: auto;
    min-width: 88px;
  }
  .com-identity select,
  .com-directory-filters :is(input, select),
  .com-profile-fields :is(input, select) {
    font-size: 16px;
  }
  .com-chat-caption span {
    display: block;
  }
}
@media (prefers-reduced-motion: reduce) {
  .com-messages {
    scroll-behavior: auto;
  }
}
