.community-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,19rem),1fr));gap:1.25rem;margin:1.5rem 0}.community-card{border:1px solid var(--mud-palette-lines-default);border-radius:16px;padding:1.5rem;background:var(--mud-palette-surface);overflow-wrap:anywhere}.community-card h2,.community-card h3{margin:.6rem 0;font-weight:700}.community-card h2{font-size:1.35rem}.community-card p{margin:.6rem 0;color:var(--mud-palette-text-secondary)}.community-eyebrow{font-size:.85rem;color:var(--mud-palette-text-secondary)}.community-form{display:flex;flex-direction:column;gap:1rem;max-width:800px;padding:1.5rem 0}.community-form h2{font-size:1.4rem;font-weight:700;margin-top:1rem}.community-form h3{font-size:1.1rem;font-weight:700}.community-options{display:flex;flex-wrap:wrap;gap:.25rem 1rem}.community-selection{display:flex;justify-content:space-between;align-items:center;gap:1rem;padding:.75rem;border-bottom:1px solid var(--mud-palette-lines-default);overflow-wrap:anywhere}.community-selection>span{min-width:0}.community-save{display:flex;flex-wrap:wrap;align-items:center;gap:1rem;padding:1.5rem 0;border-top:1px solid var(--mud-palette-lines-default)}.community-save>span{color:var(--mud-palette-text-secondary)}
.community-page{width:min(var(--cc-page-max),calc(100% - var(--cc-page-gutters)));margin-inline:auto;padding-bottom:2rem;min-width:0}
.community-page>.page-heading{width:100%;margin-inline:0}
.community-page .community-form{width:100%;min-width:0}
.community-page h1{overflow-wrap:anywhere}
.community-search{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1.25rem;align-items:start;padding:1.5rem;border:1px solid var(--mud-palette-lines-default);border-radius:16px;background:var(--mud-palette-surface)}
.community-search>*{min-width:0}
.community-search-location{display:flex;flex-wrap:wrap;align-items:center;min-height:56px}
.community-search-actions{grid-column:1/-1;display:flex;flex-wrap:wrap;gap:.75rem}
.community-platforms{padding:1.5rem 0;min-width:0}
.community-platforms>h2,.connection-heading h2{font-size:1.4rem;font-weight:700}
.community-platforms>p{margin:.5rem 0 1.5rem;color:var(--mud-palette-text-secondary)}
.community-connections{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,20rem),1fr));gap:1rem;margin-bottom:1.5rem}
.connection-summary{padding:1rem 1.25rem}
.connection-selected{border-color:var(--mud-palette-primary);box-shadow:inset 0 0 0 1px var(--mud-palette-primary)}
.connection-links,.connection-actions{display:flex;flex-wrap:wrap;gap:.5rem}
.connection-workspace{border:1px solid var(--mud-palette-lines-default);border-radius:16px;background:var(--mud-palette-surface);overflow:hidden}
.connection-heading{display:flex;justify-content:space-between;align-items:center;gap:1rem;padding:1.5rem}
.connection-heading h2{margin:.25rem 0;overflow-wrap:anywhere}
.connection-heading p,.connection-section-heading p{color:var(--mud-palette-text-secondary);margin:.4rem 0 0}
.connection-settings,.connection-history{padding:1.5rem;min-width:0}
.connection-section-heading h3,.connection-add h3{font-size:1.15rem;font-weight:700}
.connection-tabs .mud-tab{padding:12px 18px}
.connection-settings .community-form{padding-bottom:0}
.connection-settings .community-form>.mud-button-root{align-self:flex-start}
.connection-empty{padding:2rem 1.5rem;line-height:1.6;color:var(--mud-palette-text-secondary)}
.connection-history .connection-empty{padding-inline:0}
.history-heading{display:flex;justify-content:space-between;align-items:center;gap:1rem;margin-bottom:1.5rem}
.destination-delivery-history{border:1px solid var(--mud-palette-lines-default);border-radius:10px;overflow:hidden}
.destination-delivery-history .mud-table-cell{vertical-align:top;padding:1rem;overflow-wrap:anywhere}
.delivery-content{display:flex;flex-direction:column;gap:.4rem;min-width:10rem}
.delivery-content>span{color:var(--mud-palette-text-secondary);font-size:.85rem}
.delivery-status{display:inline-block;border:1px solid var(--mud-palette-lines-default);border-radius:20px;padding:.15rem .65rem;font-size:.85rem;font-weight:600;white-space:nowrap}
.delivery-outcome{min-width:0;text-align:left;max-width:28rem;flex:1}
.delivery-reference{margin-top:.5rem;font-size:.85rem;color:var(--mud-palette-text-secondary)}
.delivery-reference summary{cursor:pointer;color:var(--mud-palette-primary)}
.delivery-reference small{display:block;max-width:18rem;margin-top:.5rem;overflow-wrap:anywhere}
.destination-delivery-history p{margin:.6rem 0;max-width:28rem}
@media(max-width:600px){.connection-heading,.history-heading{align-items:flex-start;flex-direction:column}.connection-heading,.connection-settings,.connection-history{padding:1rem}.connection-actions{width:100%}.connection-links .mud-button-root{font-size:.75rem}.destination-delivery-history .mud-table-cell{padding:.75rem}.destination-delivery-history .mud-table-cell:before{padding-right:1rem;min-width:5rem;text-align:left}.delivery-content{min-width:0}.connection-history .mud-table-cell{gap:.75rem}.connection-tabs .mud-tab{font-size:.8rem;padding:12px}.connection-settings .community-form>.mud-button-root{width:100%}}
@media(max-width:1100px){.community-search{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){.community-search{grid-template-columns:minmax(0,1fr);padding:1rem}.community-page .page-heading{padding-top:1.5rem}.community-save>.mud-button-root{width:100%}.community-save>span{font-size:.9rem}.community-card{padding:1.1rem}}
@media(max-width:600px){.community-tabs .mud-tabs-tabbar-wrapper{width:100%}.community-tabs .mud-tabs-tabbar-wrapper>.mud-tooltip-root{flex:1;min-width:0}.community-tabs .mud-tab{padding:12px 6px;font-size:.75rem;letter-spacing:0}}

.admin-community-page .page-heading { width: 100%; }
.admin-community-page > .mud-input-control { max-width: 36rem; }
.organizer-card.without-image, .managed-organizer-card:not(:has(> img)) { grid-template-columns: minmax(0, 1fr); min-height: 0; }
.organizer-card .catalog-photo { max-height: 280px; }
.community-form .organizer-search-form, .community-form .result-toolbar, .community-form .catalog-grid { width: 100%; margin: 0; }
.community-form .organizer-search-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.community-organizer-results { grid-template-columns: minmax(0, 1fr); }
.community-organizer-results .organizer-card { border: 1px solid var(--cc-line); border-radius: var(--cc-panel-radius); overflow: hidden; }
.community-profile-section { margin-block: 2rem; }
.community-discord-card { display: flex; flex-direction: column; gap: .875rem; min-width: 0; padding: 1.25rem; background: var(--cc-surface); border: 1px solid var(--cc-line); border-radius: 12px; }
.community-discord-identity { display: flex; align-items: center; gap: .875rem; min-width: 0; }
.community-discord-identity > div { min-width: 0; }
.community-discord-identity h3 { margin: .2rem 0 0; font-size: 1.25rem; line-height: 1.3; overflow-wrap: anywhere; }
.community-discord-identity img, .community-discord-icon { flex-shrink: 0; width: 64px; height: 64px; border-radius: 16px; object-fit: cover; }
.community-discord-icon { display: grid; place-items: center; background: var(--cc-surface-muted); color: var(--cc-ink); }
.community-discord-description { margin: 0; color: var(--cc-muted); line-height: 1.6; overflow-wrap: anywhere; }
.community-discord-counts { display: flex; flex-wrap: wrap; gap: .5rem 1rem; font-size: .875rem; }
.community-discord-counts > span { display: inline-flex; align-items: center; gap: .4rem; }
.community-discord-online { width: .5rem; height: .5rem; border-radius: 50%; background: var(--cc-green); }
.community-discord-card small { color: var(--cc-muted); font-size: .75rem; }
.community-discord-join { display: flex; flex-direction: column; align-items: stretch; gap: .5rem; margin-top: auto; padding-top: .875rem; border-top: 1px solid var(--cc-line); }
.community-discord-join .mud-button-root { min-height: 44px; text-transform: none; }
.community-profile-section h2 { margin-bottom: 1rem; }
.community-profile-stats { display: flex; flex-wrap: wrap; gap: 1.5rem; color: var(--cc-muted); }
.community-profile-stats strong { color: var(--cc-ink); }
.community-profile-news { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 1rem; }
.community-profile-news article { padding: 1.25rem; border: 1px solid var(--cc-line); border-radius: var(--cc-panel-radius); background: var(--cc-surface); overflow-wrap: anywhere; }
.community-profile-news p { white-space: pre-line; }
@media (max-width: 600px) { .community-form .organizer-search-form { grid-template-columns: minmax(0, 1fr); } }

.community-pagination { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-top: 1.5rem; }
.community-pagination > span { white-space: nowrap; }
.community-profile-page > .page-heading p { overflow-wrap: anywhere; }
.community-profile-section > p { margin-bottom: 1rem; line-height: 1.6; }
@media (max-width: 600px) {
    .community-search-page > .page-heading { padding-top: .5rem; }
    .community-search-page .community-search { gap: .75rem; }
    .community-search-location { min-height: 44px; }
    .community-search-location > .mud-button-root { min-height: 44px; }
    .community-search-actions { flex-direction: column; gap: .5rem; }
    .community-search-actions > .mud-button-root { width: 100%; min-height: 44px; }
    .community-pagination { justify-content: space-between; gap: .5rem; }
    .community-pagination > .mud-button-root { min-height: 44px; }
    .community-search-page .community-card > .mud-button-root,
    .community-profile-page .community-card > .mud-button-root { width: 100%; min-height: 44px; margin-top: .5rem; }
    .community-profile-page > .mud-button-root { min-height: 44px; padding-inline: 0; }
    .community-profile-page > .page-heading { padding-top: 1rem; padding-bottom: 1rem; }
    .community-profile-stats { gap: .5rem 1rem; }
    .community-profile-stats > span:last-child { flex-basis: 100%; }
    .community-profile-section { margin-block: 1.5rem; }
    .community-profile-section h2 { line-height: 1.3; }
    .community-profile-section .community-options { gap: .5rem; }
    .community-profile-section .community-options > .mud-chip { margin: 0; max-width: 100%; height: auto; min-height: 32px; }
    .community-profile-section .mud-chip-content { white-space: normal; overflow-wrap: anywhere; }
    .community-profile-section .community-options > .mud-button-root { width: 100%; min-height: 44px; overflow-wrap: anywhere; }
    .community-profile-section .community-grid { gap: 1rem; margin-top: 1rem; }
}
@media (max-width: 500px) {
    .community-profile-section .event-card { grid-template-columns: 52px minmax(0, 1fr); }
    .community-profile-section .event-card-body { padding: .75rem; }
}

/* Keep workspace controls readable inside narrow tab panels. */
.community-form .pagination-row { width: 100%; margin-inline: 0; }
@media (max-width: 600px) {
    .community-tabs > .mud-tabs-tabbar .mud-tab { text-transform: none; padding-inline: 0; min-height: 48px; white-space: normal; line-height: 1.25; }
    .community-tabs .community-form { gap: .75rem; padding-top: 1rem; }
    .community-tabs .community-form h2 { margin-top: .5rem; line-height: 1.3; }
    .community-tabs .community-form p { line-height: 1.6; }
    .community-tabs .community-selection { gap: .5rem; padding-inline: 0; }
    .community-tabs .community-selection > .mud-button-root { flex-shrink: 0; min-height: 44px; }
    .community-tabs .organizer-search-form { padding: 1rem; gap: .75rem; }
    .community-tabs .organizer-search-form .mud-button-root { min-height: 44px; }
    .community-tabs .result-toolbar { padding-block: .5rem; gap: .5rem; }
    .community-tabs .community-organizer-results .mud-button-root { width: 100%; min-height: 44px; }
    .community-tabs .pagination-row { justify-content: space-between; flex-wrap: nowrap; gap: .25rem; padding-block: .75rem; font-size: .85rem; }
    .community-tabs .pagination-row > .mud-button-root { min-width: 0; padding-inline: .5rem; min-height: 44px; }
    .community-tabs .pagination-row > span { white-space: nowrap; }
    .community-tabs .community-platforms { padding-top: 1rem; }
    .community-tabs .community-connections { gap: .75rem; }
    .connection-links, .connection-actions { flex-direction: column; align-items: stretch; width: 100%; }
    .connection-links > .mud-button-root, .connection-actions > .mud-button-root,
    .connection-add > .mud-button-root, .history-heading > .mud-button-root,
    .connection-settings .community-form > .mud-button-root { min-height: 44px; width: 100%; }
    .connection-tabs .mud-tab { text-transform: none; padding-inline: 8px; line-height: 1.25; white-space: normal; }
    .connection-heading { gap: .75rem; }
    .connection-heading > div { min-width: 0; }
    .connection-heading h2 { line-height: 1.3; }
    .connection-add { padding-top: 1.5rem; }
    .connection-add > .mud-link { overflow-wrap: anywhere; }
    .connection-history .destination-delivery-history .mud-table-cell { display: flex; flex-direction: column; align-items: stretch; gap: .4rem; text-align: left; }
    .connection-history .destination-delivery-history .mud-table-cell::before { min-width: 0; padding: 0; align-self: flex-start; font-size: .75rem; color: var(--cc-muted); }
    .connection-history .delivery-outcome, .connection-history .delivery-content { width: 100%; }
    .connection-history .delivery-reference summary { padding-block: .5rem; }
}
