.footnote {
    color: #441f1d;
    cursor: pointer;
    text-decoration: underline;
    position: relative;
    display: inline-block;
}

.footnote-popup {
    position: absolute;
    background: rgba(0, 0, 0, 0.9);
    color: #fff;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 14px;
    max-width: 300px;
    z-index: 1000;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.15);
    white-space: normal;
    word-wrap: break-word;
    line-height: 1.4;
    opacity: 1;
    transition: opacity 0.2s ease-in-out;
}

/* Убираем баг с max-width */
@media (max-width: 768px) {
    .footnote-popup {
        max-width: 90%;
    }
    .book-page__content div.scroll img {
        max-width: 100%;  /* Чтобы картинка не выходила за границы */
        height: auto;      /* Сохраняем пропорции */
        max-height: none;  /* Отменяем ограничение в 450px */
        float: none;       /* Отменяем float, чтобы картинка не вылезала */
        display: block;    /* Чтобы занимала всю ширину родителя */
        margin: 0 auto 10px; /* Выравниваем по центру */
    }
}
.bx-editor-foo-btn {
    background: url("/bitrix/images/alfa.footnote/footnote_icon.png") no-repeat center center;
    background-size: contain;
    width: 20px;
    height: 20px;
    display: inline-block;
}
.book-swiper__wrapper .content {
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    transform: translateZ(0); /* Включает GPU-рендеринг, уменьшает артефакты */
    will-change: transform;
}