hljs css
Copy
/* Базовое выравнивание текста по ширине */
.uc-justify {
    text-align: justify;
    text-align-last: left;
    hyphens: auto;
    -webkit-hyphens: auto;
    -ms-hyphens: auto;
}

.uc-justify::after {
    content: "";
    display: inline-block;
    width: 100%;
}

.uc-justify p,
.uc-justify div,
.uc-justify span,
.uc-justify h2,
.uc-justify h3,
.uc-justify h4,
.uc-justify h5,
.uc-justify h6 {
    text-align: justify;
    text-align-last: left;
}

/* h1 явно исключён - оставляем как есть */
.uc-justify h1 {
    text-align: inherit;
}

/* Последняя строка по центру */
.uc-justify-center-last {
    text-align: justify;
    text-align-last: center;
    hyphens: auto;
    -webkit-hyphens: auto;
    -ms-hyphens: auto;
}

.uc-justify-center-last p,
.uc-justify-center-last div,
.uc-justify-center-last span,
.uc-justify-center-last h2,
.uc-justify-center-last h3,
.uc-justify-center-last h4,
.uc-justify-center-last h5,
.uc-justify-center-last h6 {
    text-align: justify;
    text-align-last: center;
}

.uc-justify-center-last h1 {
    text-align: inherit;
}

/* Последняя строка справа */
.uc-justify-right-last {
    text-align: justify;
    text-align-last: right;
    hyphens: auto;
    -webkit-hyphens: auto;
    -ms-hyphens: auto;
}

.uc-justify-right-last p,
.uc-justify-right-last div,
.uc-justify-right-last span,
.uc-justify-right-last h2,
.uc-justify-right-last h3,
.uc-justify-right-last h4,
.uc-justify-right-last h5,
.uc-justify-right-last h6 {
    text-align: justify;
    text-align-last: right;
}

.uc-justify-right-last h1 {
    text-align: inherit;
}

/* Отключение на мобильных */
@media screen and (max-width: 640px) {
    .uc-justify-mobile-off,
    .uc-justify-mobile-off p,
    .uc-justify-mobile-off div,
    .uc-justify-mobile-off span,
    .uc-justify-mobile-off h2,
    .uc-justify-mobile-off h3,
    .uc-justify-mobile-off h4,
    .uc-justify-mobile-off h5,
    .uc-justify-mobile-off h6 {
        text-align: left;
    }
}