.community-main { width: min(100% - 32px, 1120px); margin: 0 auto; padding: 42px 0 80px; }
.community-page { display: grid; gap: 18px; }
.community-heading { padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.community-heading h1 { margin: 0; font-family: inherit; font-size: clamp(1.5rem, 4vw, 2.15rem); font-weight: 500; }
.community-heading p { max-width: 720px; margin: 7px 0 0; color: var(--text-muted); font-size: .76rem; line-height: 1.5; }
.community-search-panel { display: grid; grid-template-columns: minmax(240px, 400px) max-content max-content minmax(220px, 1fr); align-items: center; gap: 12px; padding: 15px; border-radius: var(--radius-panel); background: var(--surface); }
.community-color-field, .community-updated-field { min-width: 0; }
.community-color-filter > .ui-selection-menu-trigger, .community-updated-filter > .ui-selection-menu-trigger { width: auto; }
.community-color-filter .ui-selection-menu-selection, .community-updated-filter .ui-selection-menu-selection { margin-left: 0; }
.community-updated-label { padding-right: 8px; padding-left: 8px; }
.community-color-options { display: grid; gap: 3px; }
.community-color-option { min-height: 30px; font-size: .68rem; }
.community-color-option img { width: 20px; height: 20px; }
.community-filter-actions { min-width: max-content; display: flex; justify-content: flex-end; gap: 7px; }
.community-results { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); align-items: stretch; gap: 12px; }
.community-deck-card { min-width: 0; display: grid; align-content: start; gap: 12px; padding: 15px; border-radius: var(--radius-panel); background: var(--surface-raised); transition: background-color var(--motion-fast) ease; }
.community-deck-card:hover { background: var(--surface-overlay); }
.community-deck-heading { min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 10px; }
.community-deck-heading .ui-avatar { margin-left: 0; }
.community-deck-title { min-width: 0; display: grid; gap: 3px; }
.community-deck-title h2 { margin: 0; overflow: hidden; font-family: inherit; font-size: .92rem; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.community-deck-title h2 a { color: var(--text-strong); text-decoration: none; }
.community-deck-title h2 a:hover, .community-deck-title h2 a:focus-visible { outline: none; color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.community-owner-link { width: fit-content; max-width: 100%; overflow: hidden; color: var(--text-muted); font-size: .66rem; text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }
.community-owner-link:hover, .community-owner-link:focus-visible { outline: none; color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.community-deck-description { min-height: 2.9em; margin: 0; overflow: hidden; color: var(--text-subtle); font-size: .71rem; line-height: 1.45; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.community-deck-lineage { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: -2px 0 0; color: var(--text-muted); font-size: .66rem; }
.community-deck-lineage .lucide-icon { width: 14px; height: 14px; flex: 0 0 auto; }
.community-deck-lineage a { color: var(--text); text-underline-offset: 3px; }
.community-deck-footer { display: grid; align-items: start; gap: 9px; margin-top: auto; padding-top: 10px; }
.community-deck-meta { min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.community-fork-count .lucide-icon { width: 12px; height: 12px; }
.community-color-identity { display: inline-flex; align-items: center; padding-left: 4px; }
.community-color-identity img { width: 20px; height: 20px; margin-left: -4px; filter: drop-shadow(0 2px 3px rgba(0,0,0,.38)); }
.community-color-identity img:first-child { margin-left: 0; }
.community-fork-button, .community-report-button { min-height: 30px; padding: 5px 9px; font-size: .66rem; }
.community-deck-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.community-fork-button .lucide-icon, .community-report-button .lucide-icon { width: 14px; height: 14px; }
.community-profile { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px 18px; padding: 17px; border-radius: var(--radius-panel); background: var(--surface); }
.community-profile-back { grid-column: 1 / -1; width: fit-content; color: var(--text-muted); font-size: .68rem; text-underline-offset: 3px; }
.community-profile-identity { min-width: 0; display: flex; align-items: center; gap: 12px; }
.community-profile-identity > div:last-child { min-width: 0; display: grid; gap: 3px; }
.community-profile-avatar.ui-avatar { width: 52px; height: 52px; flex-basis: 52px; margin-left: 0; font-size: .9rem; }
.community-profile h2 { margin: 0; overflow: hidden; font-family: inherit; font-size: 1.1rem; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.community-profile-identity span, .community-profile > p { color: var(--text-muted); font-size: .7rem; }
.community-profile > p { grid-column: 1 / -1; margin: 0; line-height: 1.5; white-space: pre-wrap; }
.community-empty { grid-column: 1 / -1; margin: 0; padding: 30px 16px; color: var(--text-muted); font-size: .76rem; text-align: center; }

@media (max-width: 960px) {
  .community-search-panel { grid-template-columns: minmax(0, 1fr) max-content max-content; }
  .community-search { grid-column: 1 / -1; }
  .community-filter-actions { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
  .community-main { width: calc(100% - 24px); padding-top: 28px; }
  .community-search-panel { grid-template-columns: minmax(0, 1fr); }
  .community-search, .community-color-field, .community-updated-field, .community-filter-actions { grid-column: 1; }
  .community-color-filter > .ui-selection-menu-trigger, .community-updated-filter > .ui-selection-menu-trigger { width: 100%; justify-content: space-between; }
  .community-color-filter .ui-selection-menu-selection, .community-updated-filter .ui-selection-menu-selection { margin-left: auto; }
  .community-filter-actions { align-items: stretch; flex-direction: column-reverse; }
  .community-filter-actions .button { width: 100%; }
  .community-results { grid-template-columns: minmax(0, 1fr); }
  .community-profile { grid-template-columns: minmax(0, 1fr); }
  .community-profile > .ui-status-badge { width: fit-content; }
}
