/* Community mobile layout and touch compatibility. */
@media (max-width: 700px) {
  .community-page {
    width: 100%;
    padding-bottom: 32px;
    overflow: hidden;
  }

  .community-support-notice,
  .community-hero,
  .community-composer,
  .community-post {
    border-radius: 16px;
  }

  .community-hero {
    gap: 18px;
    padding: 21px 18px;
  }

  .community-hero h1 {
    font-size: 30px;
    line-height: 1.08;
  }

  .community-stat { padding: 14px; }
  .community-composer { padding: 17px; }

  .community-composer textarea {
    min-height: 140px;
    margin: 14px 0 8px;
    font-size: 16px;
  }

  .community-compose-head > div,
  .community-post header > div,
  .community-comment > div {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .community-compose-actions label {
    display: flex;
    flex-direction: column;
    gap: 7px;
    width: 100%;
  }

  .community-compose-actions select {
    width: 100%;
    min-height: 44px;
    margin: 0;
    font-size: 16px;
  }

  .community-post { padding: 16px; }

  .community-post header {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .community-type { margin-left: 58px; }

  .community-post-body,
  .community-comment p {
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .community-post-body {
    padding: 16px 0;
    font-size: 15px;
    line-height: 1.6;
  }

  .community-post-actions {
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
  }

  .community-post-actions form:last-child { margin-left: 0; }
  .community-action { min-height: 44px; }

  .community-delete {
    min-height: 44px;
    padding: 8px !important;
  }

  .community-comment {
    align-items: flex-start;
    padding: 11px;
  }

  .comment-delete-form button { min-height: 40px; }

  .community-reply {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
  }

  .community-reply input {
    width: 100%;
    min-height: 46px;
    font-size: 16px;
  }

  .community-reply .community-emoji-picker { align-self: center; }

  .community-reply > button {
    grid-column: 1 / -1;
    width: 100%;
    min-height: 46px;
    padding: 10px 16px;
  }

  .emoji-panel {
    right: 0;
    left: auto;
    width: min(260px, calc(100vw - 48px));
    max-height: 210px;
    overflow-y: auto;
  }

  .emoji-panel button {
    width: 42px;
    height: 42px;
  }
}

@media (max-width: 420px) {
  .community-type { margin-left: 0; }

  .community-avatar {
    width: 42px;
    height: 42px;
    flex-basis: 42px;
  }

  .community-post header small { font-size: 10px; }
  .community-post-actions > span { width: 100%; }
}
