/* Сообщества пользователя в профиле */
.cm-profile {
    margin-bottom: 20px;
}

.cm-profile__total {
    margin-left: 4px;
    color: var(--lightgray);
    font-family: Montserrat, sans-serif;
    font-size: 14px;
}

.cm-profile__all {
    font-size: 14px;
    font-weight: 500;
    color: var(--yellow);
}

.cm-profile__list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

/* По верху: длинное название переносится, аватарка и иконка роли остаются на месте */
.cm-profile__item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-width: 0;
    padding: 8px 10px;
    border-radius: 10px;
    background: var(--bggray);
    color: #ffffff;
    text-decoration: none;
}

.cm-profile__item:hover {
    color: var(--yellow);
    text-decoration: none;
}

.cm-profile__ava {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--bgblack);
}

.cm-profile__name {
    flex: 1 1 auto;
    min-width: 0;
    padding-top: 9px;
    font-size: 14px;
    line-height: 18px;
    font-weight: 600;
    overflow-wrap: anywhere;
}

/* Роль — иконкой: корона владельца, корона модератора у куратора */
.cm-profile__role {
    flex-shrink: 0;
    margin-top: 9px;
    width: 18px;
    height: 18px;
}

.cm-profile__empty {
    margin: 0;
    font-size: 14px;
    color: var(--lightgray);
}

.cm-profile__empty a {
    color: var(--yellow);
}

@media (max-width: 1199px) {
    .cm-profile__list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575px) {
    .cm-profile__list {
        grid-template-columns: minmax(0, 1fr);
    }
}
