            /* ============================================================
               ОБЁРТКА ЛЕНТЫ
               ============================================================ */

            .feed-widget {
                width: 100%;
                max-width: 470px;
                margin: 0 auto;
                display: flex;
                flex-direction: column;
                font-family: system-ui, -apple-system, sans-serif;
                color: #fff;
                position: relative;
                z-index: 1;
                height: 100vh;
                height: 100dvh;
                overflow: hidden;
            }

            .feed-header {
                flex-shrink: 0;
            }

            /* ============================================================
               СКРОЛЛ-КОНТЕЙНЕР
               ============================================================ */

            .feed-scroll {
                width: 100%;
                height: 100%;
                min-height: 0;
                flex: 1 1 auto;
                overflow-y: scroll;
                scroll-snap-type: y mandatory;
                -webkit-overflow-scrolling: touch;
                scrollbar-width: none;
            }

            .feed-scroll::-webkit-scrollbar {
                display: none;
            }

            /* ============================================================
               КАРТОЧКА
               ============================================================ */

            .post-card {
                width: 100%;
                height: 100%;
                min-height: 100%;
                scroll-snap-align: start;
                scroll-snap-stop: always;
                position: relative;
                background: #000;
                overflow: hidden;
                margin: 0;
                padding: 0;
            }

            /* ============================================================
               МЕДИА
               ============================================================ */

            .post-media {
                width: 100%;
                height: 100%;
                position: relative;
                display: flex;
                align-items: center;
                justify-content: center;
                background: #000;
            }

            .post-media img,
            .post-media video {
                width: 100%;
                height: 100%;
                object-fit: cover;
                display: block;
            }

            /* ============================================================
               ОВЕРЛЕЙ
               ============================================================ */

            .post-overlay {
                position: absolute;
                inset: 0;
                display: flex;
                flex-direction: column;
                justify-content: space-between;
                pointer-events: none;
                z-index: 2;
            }

            .post-header {
                display: flex;
                align-items: center;
                padding: 24px 16px 40px;
                gap: 12px;
                background: linear-gradient(
                    to bottom,
                    rgba(0, 0, 0, 0.8) 0%,
                    transparent 100%
                );
                pointer-events: auto;
            }

            .avatar {
                width: 40px;
                height: 40px;
                border-radius: 50%;
                background: #3b3b4f center / cover no-repeat;
                flex-shrink: 0;
                position: relative;
                border: 2px solid rgba(255, 255, 255, 0.2);
                text-decoration: none;
                box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
            }

            .post-user {
                flex: 1;
                min-width: 0;
            }

            .post-user .username {
                font-size: 15px;
                font-weight: 600;
                color: #fff;
                text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
            }

            .post-user .username a {
                color: inherit;
                text-decoration: none;
            }

            .post-user .location {
                font-size: 12px;
                color: rgba(255, 255, 255, 0.8);
                margin-top: 2px;
            }

            .post-menu {
                color: #fff;
                font-size: 20px;
                font-weight: bold;
                text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
            }

.post-caption-wrap {
    position: relative;
    padding: 40px 16px 24px;
    pointer-events: auto;
    max-height: 65%;
    overflow-y: auto;
    overflow-wrap: anywhere;
    scrollbar-width: none;
    -ms-overflow-style: none;

    /* фон убираем отсюда */
    background: transparent;

    /* плавное затухание самого контейнера по краям */
    -webkit-mask-image: linear-gradient(
        to bottom,
        transparent 0%,
        #000 18%,
        #000 100%
    );
    mask-image: linear-gradient(
        to bottom,
        transparent 0%,
        #000 18%,
        #000 100%
    );
}

.post-caption-wrap::-webkit-scrollbar {
    display: none;
}
.post-caption-wrap::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: -1;

    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.92) 0%,
        rgba(0, 0, 0, 0.75) 45%,
        rgba(0, 0, 0, 0.35) 75%,
        rgba(0, 0, 0, 0) 100%
    );
}
.post-card.is-caption-expanded .post-caption-wrap::before {
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.96) 0%,
        rgba(0, 0, 0, 0.88) 40%,
        rgba(0, 0, 0, 0.55) 75%,
        rgba(0, 0, 0, 0) 100%
    );
}

.post-card.is-caption-expanded .post-caption-wrap {
    max-height: 75%;
}

            .post-caption {
                font-size: 14px;
                line-height: 1.4;
                color: #fff;
                text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
            }

            .post-caption .username {
                font-weight: 600;
                margin-right: 4px;
            }

            .post-caption-more {
                background: none;
                border: 0;
                color: #7aa9ff;
                font: inherit;
                font-weight: 600;
                cursor: pointer;
                padding: 0;
            }

            .post-caption-more:hover {
                text-decoration: underline;
            }

            .post-caption-short,
            .post-caption-full {
                display: inline;
            }

            .post-caption-full[hidden],
            .post-caption-short[hidden] {
                display: none;
            }

            .post-status-note {
                position: absolute;
                top: 80px;
                right: 16px;
                font-size: 12px;
                color: #fff;
                background: rgba(0, 0, 0, 0.6);
                padding: 4px 8px;
                border-radius: 4px;
                z-index: 3;
            }

            /* ============================================================
               ПОДГРУЗКА
               ============================================================ */

            .feed-more {
                text-align: center;
                padding: 20px 0;
                color: #6a6a88;
                font-size: 14px;
                background: #0a0a0c;
                flex-shrink: 0;
            }

            .feed-more-btn {
                background: none;
                border: 0;
                color: inherit;
                font: inherit;
                cursor: pointer;
                display: inline-flex;
                align-items: center;
                gap: 8px;
                padding: 8px 16px;
            }

            .feed-more-btn:disabled {
                cursor: wait;
                opacity: 0.8;
            }

            .feed-more-btn .spinner {
                width: 14px;
                height: 14px;
                border: 2px solid rgba(255, 255, 255, 0.1);
                border-top-color: #7aa9ff;
                border-radius: 50%;
                animation: ppfd-spin 1s linear infinite;
                display: inline-block;
                visibility: hidden;
            }

            .feed-more-btn.is-loading .spinner {
                visibility: visible;
            }

            .feed-more-error {
                margin-top: 6px;
                color: #e98b8b;
                font-size: 12px;
            }

            .feed-more-error[hidden] {
                display: none;
            }

            @keyframes ppfd-spin {
                to {
                    transform: rotate(360deg);
                }
            }

            .ppfd-empty {
                text-align: center;
                padding: 40px 20px;
                color: #6a6a88;
            }

            /* ============================================================
               ПЛЕЙСХОЛДЕР
               ============================================================ */

            .ppfd-placeholder {
                width: 100%;
                height: 100%;
                display: flex;
                align-items: center;
                justify-content: center;
                background-size: cover;
                background-position: center;
                position: relative;
            }

            .ppfd-placeholder::after {
                content: "";
                position: absolute;
                inset: 0;
                background: rgba(0, 0, 0, 0.4);
            }

            .ppfd-placeholder span {
                position: relative;
                z-index: 2;
                color: #fff;
                font-size: 24px;
                font-weight: 700;
                text-align: center;
                padding: 0 20px;
            }

            /* ============================================================
               КАСТОМНОЕ УПРАВЛЕНИЕ ВИДЕО
               ============================================================ */

            .feed-widget .media-video {
                position: relative;
            }

            /* Крупная кнопка в центре. */
            .feed-widget .ppfd-video-center {
                position: absolute;
                top: 50%;
                left: 50%;
                z-index: 4;

                width: 58px;
                height: 58px;
                padding: 0;

                display: flex;
                align-items: center;
                justify-content: center;

                border: 1px solid rgba(255, 255, 255, 0.35);
                border-radius: 50%;
                background: rgba(0, 0, 0, 0.45);
                color: #fff;

                cursor: pointer;
                transform: translate(-50%, -50%);
                transition: opacity 0.2s ease, background 0.2s ease;
                -webkit-tap-highlight-color: transparent;
            }

            .feed-widget .ppfd-video-center:hover {
                background: rgba(0, 0, 0, 0.65);
            }

            .feed-widget .media-video[data-playing="1"] .ppfd-video-center {
                opacity: 0;
                pointer-events: none;
            }

            /* Нижняя панель. */
            .feed-widget .ppfd-video-controls {
                position: absolute;
                left: 0;
                right: 0;
                bottom: 0;
                z-index: 4;

                display: flex;
                align-items: center;
                gap: 10px;

                padding: 10px 16px 14px;
                background: linear-gradient(
                    to top,
                    rgba(0, 0, 0, 0.65),
                    transparent
                );
            }

            /* Маленькая кнопка Play/Pause. */
            .feed-widget .ppfd-video-toggle {
                width: 28px;
                height: 28px;
                padding: 0;

                display: flex;
                align-items: center;
                justify-content: center;
                flex: 0 0 28px;

                border: 0;
                background: transparent;
                color: #fff;

                cursor: pointer;
                -webkit-tap-highlight-color: transparent;
            }

            /* Значок Play. */
            .feed-widget .ppfd-video-icon {
                display: block;
                width: 0;
                height: 0;

                border-top: 8px solid transparent;
                border-bottom: 8px solid transparent;
                border-left: 12px solid currentColor;

                margin-left: 3px;
            }

            /* Значок Pause. */
            .feed-widget .media-video[data-playing="1"]
            .ppfd-video-toggle .ppfd-video-icon {
                width: 12px;
                height: 16px;
                margin-left: 0;

                border: 0;
                background: linear-gradient(
                    to right,
                    currentColor 0 4px,
                    transparent 4px 8px,
                    currentColor 8px 12px
                );
            }

            /* Жёлто-зелёная полоса перемотки. */
            .feed-widget .ppfd-video-progress {
                --ppfd-progress: 0%;

                display: block;
                flex: 1;
                min-width: 0;
                width: 100%;
                height: 4px;
                margin: 0;
                padding: 0;

                border: 0;
                border-radius: 999px;
                outline: none;
                cursor: pointer;

                appearance: none;
                -webkit-appearance: none;

                background: linear-gradient(
                    to right,
                    #d7ff00 0%,
                    #d7ff00 var(--ppfd-progress),
                    rgba(255, 255, 255, 0.4) var(--ppfd-progress),
                    rgba(255, 255, 255, 0.4) 100%
                );
            }

            .feed-widget .ppfd-video-progress::-webkit-slider-thumb {
                width: 10px;
                height: 10px;
                border: 0;
                border-radius: 50%;
                background: #d7ff00;
                cursor: pointer;

                appearance: none;
                -webkit-appearance: none;
            }

            .feed-widget .ppfd-video-progress::-moz-range-thumb {
                width: 10px;
                height: 10px;
                border: 0;
                border-radius: 50%;
                background: #d7ff00;
                cursor: pointer;
            }

            .feed-widget .ppfd-video-progress::-moz-range-track {
                height: 4px;
                border: 0;
                border-radius: 999px;
                background: transparent;
            }

            /* Отступ подписи от нижней панели видео. */
            .feed-widget .media-video .post-caption-wrap {
                padding-bottom: 58px;
            }

            .feed-widget .ppfd-video-center:focus-visible,
            .feed-widget .ppfd-video-toggle:focus-visible,
            .feed-widget .ppfd-video-progress:focus-visible,
            .feed-widget .feed-more-btn:focus-visible {
                outline: 2px solid #d7ff00;
                outline-offset: 3px;
            }

            /* ============================================================
               ДЕСКТОП ≥900px: 3 КОЛОНКИ
               ============================================================ */

            @media (min-width: 900px) {
                .feed-widget {
                    max-width: 1160px;
                    height: auto;
                    margin: 40px auto;
                    border-radius: 0;
                    box-shadow: none;
                    border: 0;
                    overflow: visible;
                }

                .feed-scroll {
                    height: auto;
                    overflow: visible;
                    scroll-snap-type: none;
                    display: grid;
                    grid-template-columns: repeat(3, 1fr);
                    gap: 20px;
                }

                .post-card {
                    height: auto;
                    min-height: 0;
                    aspect-ratio: 3 / 4;
                    border-radius: 16px;
                    overflow: hidden;
                    scroll-snap-align: none;
                    scroll-snap-stop: normal;
                }

                .post-media {
                    height: 100%;
                }

                .post-media img,
                .post-media video {
                    height: 100%;
                    object-fit: cover;
                }

                .feed-more {
                    background: transparent;
                }
            }

            /* ============================================================
               ПЛАНШЕТ 768–899px: 2 КОЛОНКИ
               ============================================================ */

            @media (min-width: 768px) and (max-width: 899px) {
                .feed-widget {
                    max-width: 760px;
                    height: auto;
                    margin: 30px auto;
                    border-radius: 0;
                    box-shadow: none;
                    border: 0;
                    overflow: visible;
                }

                .feed-scroll {
                    height: auto;
                    overflow: visible;
                    scroll-snap-type: none;
                    display: grid;
                    grid-template-columns: repeat(2, 1fr);
                    gap: 16px;
                }

                .post-card {
                    height: auto;
                    min-height: 0;
                    aspect-ratio: 3 / 4;
                    border-radius: 14px;
                    overflow: hidden;
                    scroll-snap-align: none;
                    scroll-snap-stop: normal;
                }

                .post-media {
                    height: 100%;
                }

                .post-media img,
                .post-media video {
                    height: 100%;
                    object-fit: cover;
                }

                .feed-more {
                    background: transparent;
                }
            }

            /* ============================================================
               МОБИЛА <768px: ВЕРТИКАЛЬНЫЙ СВАЙП
               ============================================================ */

            @media (max-width: 767px) {
                .feed-widget {
                    max-width: 100%;
                    height: 100vh;
                    height: 100dvh;
                    border-radius: 0;
                    margin: 0;
                    margin-left: calc(-1 * var(--content-padding, 0px));
                    margin-right: calc(-1 * var(--content-padding, 0px));
                    width: calc(100% + 2 * var(--content-padding, 0px));
                }

                .feed-scroll {
                    height: 100%;
                }
            }

            /* ============================================================
               СЕТКА [ppaf_slider]
               ============================================================ */

            .feed-widget--grid {
                max-width: 1160px;
                height: auto;
                margin: 40px auto;
                border-radius: 0;
                box-shadow: none;
                border: 0;
                overflow: visible;
            }

            .feed-grid {
                display: grid;
                grid-template-columns: repeat(3, 1fr);
                gap: 20px;
                width: 100%;
            }

            .feed-widget--grid .feed-scroll {
                display: contents;
            }

            .feed-widget--grid .post-card {
                position: relative;
                background: #000;
                border-radius: 16px;
                overflow: hidden;
                aspect-ratio: 3 / 4;
                height: auto;
                min-height: 0;
                scroll-snap-align: none;
            }

            .feed-widget--grid .post-media {
                height: 100%;
            }

            .feed-widget--grid .post-media img,
            .feed-widget--grid .post-media video {
                width: 100%;
                height: 100%;
                object-fit: cover;
            }

            @media (max-width: 899px) {
                .feed-grid {
                    grid-template-columns: repeat(2, 1fr);
                }

                .feed-widget--grid {
                    margin: 30px auto;
                }
            }

            @media (max-width: 599px) {
                .feed-grid {
                    grid-template-columns: 1fr;
                    gap: 12px;
                }

                .feed-widget--grid {
                    margin: 20px auto;
                    padding: 0 12px;
                }
            }
/* Автоматическая подгрузка публикаций */

.feed-scroll .ppfd-auto-load {
    grid-column: 1 / -1;
    width: 100%;
    min-height: 1px;
    padding: 0;
    margin: 0;
    background: transparent;
    color: #8b8b9c;
    text-align: center;
    font-size: 14px;
    scroll-snap-align: none;
}

.feed-scroll .ppfd-auto-load.is-loading,
.feed-scroll .ppfd-auto-load.is-error {
    padding: 16px 0;
}
.post-caption-full {
    display: inline;
}

.post-caption-full[hidden] {
    display: none;
}

/* Когда открыт полный текст — усиливаем затемнение всего оверлея */
.post-card.is-caption-expanded .post-caption-wrap {
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.95) 0%,
        rgba(0, 0, 0, 0.85) 100%
    );
    max-height: 75%;
}

/* Текст не перекрывает кнопку видео */
.feed-widget .post-caption-wrap {
    pointer-events: none;
}

/* Но кнопки «ещё» и «скрыть» остаются кликабельными */
.feed-widget .post-caption,
.feed-widget .post-caption button {
    pointer-events: auto;
}

/* Во время воспроизведения убираем аватар и имя */
.feed-widget .media-video[data-playing="1"] .post-header {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.feed-widget .post-header {
    transition: opacity 0.2s ease;
}
.feed-widget .ppfd-video-fullscreen {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 23px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
}

.feed-widget .ppfd-video-fullscreen:focus-visible {
    outline: 2px solid #d7ff00;
    outline-offset: 3px;
}
/* Личная лента внутри страницы — не полноэкранный контейнер */
.feed-widget--owner {
    width: 100%;
    max-width: 1160px;
    height: auto;
    min-height: 0;
    margin: 40px auto;
    overflow: visible;
}

/* Убираем внутренний скролл */
.feed-widget--owner .feed-scroll {
    width: 100%;
    height: auto;
    min-height: 0;
    overflow: visible;
    scroll-snap-type: none;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

/* Карточки становятся обычными карточками страницы */
.feed-widget--owner .post-card {
    width: 100%;
    height: auto;
    min-height: 0;
    aspect-ratio: 3 / 4;
    scroll-snap-align: none;
    scroll-snap-stop: normal;
    border-radius: 16px;
    overflow: hidden;
}

/* Убираем растягивание медиа на 100vh */
.feed-widget--owner .post-media {
    width: 100%;
    height: 100%;
}

/* Подгрузка занимает всю ширину сетки */
.feed-widget--owner .feed-more {
    grid-column: 1 / -1;
}

/* Планшет */
@media (min-width: 768px) and (max-width: 899px) {
    .feed-widget--owner .feed-scroll {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Телефон */
@media (max-width: 767px) {
    .feed-widget--owner {
        width: 100%;
        max-width: none;
        height: auto;
        margin: 20px 0;
        overflow: visible;
    }

    .feed-widget--owner .feed-scroll {
        display: grid;
        grid-template-columns: 1fr;
        gap: 12px;
        height: auto;
        overflow: visible;
    }

    .feed-widget--owner .post-card {
        width: 100%;
        height: auto;
        min-height: 0;
        aspect-ratio: 3 / 4;
        border-radius: 12px;
    }
}