@charset "UTF-8";

        /* ---------------------------------------------------------------- рамка: прозора смуга до низу екрана */
        .bottom-nav.is-glass {
            --gn-h: 62px;
            --gn-side: 14px;
            --gn-bottom: 10px;
            --gn-ink: rgba(0, 0, 0, .88);
            --gn-tint: #8849FE;
            --gn-glass: rgba(255, 255, 255, .3);
            --gn-pill: rgba(0, 0, 0, .075);
            --gn-lens: rgba(255, 255, 255, .24);
            left: 0;
            right: 0;
            bottom: 0;
            transform: none;
            width: auto;
            max-width: none;
            height: auto;
            display: flex;
            justify-content: center;
            align-items: flex-end;
            padding: 28px var(--gn-side) calc(var(--gn-bottom) + env(safe-area-inset-bottom, 0px));
            /* Край гортання, як в iOS: вміст під панеллю м'яко тане, скло «піднімається» над ним. */
            background: linear-gradient(to bottom, rgba(243, 244, 246, 0), rgba(243, 244, 246, .5) 55%, rgba(243, 244, 246, .78));
            box-shadow: none;
            pointer-events: none;
        }

        body.dark .bottom-nav.is-glass {
            --gn-ink: rgba(255, 255, 255, .92);
            --gn-tint: #B48CFF;
            --gn-glass: rgba(30, 30, 34, .42);
            --gn-pill: rgba(255, 255, 255, .15);
            --gn-lens: rgba(255, 255, 255, .09);
            background: linear-gradient(to bottom, rgba(15, 15, 15, 0), rgba(15, 15, 15, .5) 55%, rgba(15, 15, 15, .78));
            box-shadow: none;
        }

        /* Місце під панеллю, щоб вона не ховала низ сторінки (на ПК панелі немає). */
        @media (max-width: 1023px) {
            .container:has(> .bottom-nav.is-glass) {
                padding-bottom: calc(62px + 10px + 14px + env(safe-area-inset-bottom, 0px));
            }
        }

        /* ---------------------------------------------------------------- скло капсули */
        .gn-bar {
            position: relative;
            flex: 1 1 auto;
            max-width: 520px;
            height: var(--gn-h);
            border-radius: calc(var(--gn-h) / 2);
            background: var(--gn-glass);
            /* Як в iOS 26: скло прозоре — під ним видно вміст, лише трохи розмитий; форму тримають обідок і тінь. */
            -webkit-backdrop-filter: blur(7px) saturate(190%) brightness(1.06);
            backdrop-filter: blur(7px) saturate(190%) brightness(1.06);
            box-shadow:
                0 8px 28px rgba(16, 24, 40, .13),
                0 0 0 .5px rgba(16, 24, 40, .09),
                inset 0 1.5px 1px rgba(255, 255, 255, .9),
                inset 0 -1px 1px rgba(255, 255, 255, .45);
            pointer-events: auto;
            touch-action: none;
            user-select: none;
            -webkit-user-select: none;
            -webkit-tap-highlight-color: transparent;
            isolation: isolate;
        }

        /* Обідок із бліком: світло падає зліва згори — яскравий край там, слабший знизу справа. */
        .gn-bar::after {
            content: '';
            position: absolute;
            inset: 0;
            z-index: 4;
            border-radius: inherit;
            padding: 1.5px;
            background: linear-gradient(160deg, rgba(255, 255, 255, 1), rgba(255, 255, 255, .45) 30%, rgba(255, 255, 255, .25) 60%, rgba(255, 255, 255, .85));
            -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
            -webkit-mask-composite: xor;
            mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
            pointer-events: none;
        }

        body.dark .gn-bar {
            box-shadow:
                0 10px 30px rgba(0, 0, 0, .45),
                0 1px 3px rgba(0, 0, 0, .35),
                inset 0 1px 1px rgba(255, 255, 255, .18),
                inset 0 -1px 1px rgba(255, 255, 255, .06);
        }

        body.dark .gn-bar::after {
            background: linear-gradient(135deg, rgba(255, 255, 255, .45), rgba(255, 255, 255, .08) 32%, rgba(255, 255, 255, 0) 55%, rgba(255, 255, 255, .2));
        }

        /* ---------------------------------------------------------------- вкладки */
        /* Два однакові ряди вкладок: справжній і кольоровий (копія, колір акценту). Кольоровий видно лише в межах
           пігулки/лінзи, справжній там схований — під лінзою значок кольоровий рівно в її межах, як в iOS 26, і без
           подвоєння: ряди розкладені однаково, межі рахує скрипт (clip-path щокадру). */
        .gn-items,
        .gn-color {
            position: absolute;
            inset: 0;
            display: grid;
            grid-template-columns: repeat(5, 1fr);
            align-items: center;
            padding: 0 4px;
        }

        .gn-items {
            z-index: 2;
        }

        .gn-color {
            z-index: 4;
            clip-path: inset(50%);
            pointer-events: none;
        }

        /* З .gn-bar — інакше нижче .gn-bar .nav-icon (та сама вага, пізніше) фарбував копії чорним, і фіолетовою під лінзою
           була лише поточна вкладка: лінза сідала на нову чорною, колір «вмикався» вже на новій сторінці. */
        .gn-bar .gn-color .nav-icon,
        .gn-bar .gn-color .nav-text,
        .gn-bar .gn-color .nav-item:hover .nav-icon {
            color: var(--gn-tint);
        }

        /* transition: none — розмір значка під лінзою задає скрипт щокадру. Загальне transition: all .2s з main.css
           тягнуло його із запізненням, а по закінченні WebKit перемальовував значок з округленням — той «стрибав» на піксель. */
        .gn-bar .nav-item {
            position: relative;
            z-index: 2;
            height: 100%;
            gap: 2px;
            padding: 0;
            overflow: visible;
            transition: none;
        }

        .gn-bar .nav-icon {
            width: 23px;
            height: 23px;
            color: var(--gn-ink);
            transition: color .25s ease;
        }

        .gn-bar .nav-text {
            font-size: 10px;
            font-weight: 600;
            color: var(--gn-ink);
            transition: color .25s ease;
        }

        .gn-bar .nav-item.active .nav-icon,
        .gn-bar .nav-item.active .nav-text {
            color: var(--gn-tint);
        }

        .gn-bar .nav-item:hover .nav-icon {
            color: var(--gn-ink);
        }

        .gn-bar .nav-item.active:hover .nav-icon {
            color: var(--gn-tint);
        }

        /* Серце по центру — рожевий скляний кружок. */
        .gn-heart-dot {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 46px;
            height: 46px;
            border-radius: 50%;
            background: linear-gradient(135deg, #FF2D6E 0%, #E11D48 55%, #BE123C 100%);
            box-shadow:
                0 4px 12px rgba(225, 29, 72, .35),
                inset 0 1px 1px rgba(255, 255, 255, .55),
                inset 0 -1px 2px rgba(0, 0, 0, .12);
        }

        .gn-bar .gn-heart .nav-icon,
        .gn-bar .gn-heart:hover .nav-icon,
        .gn-bar .gn-heart.active .nav-icon {
            width: 23px;
            height: 23px;
            color: #fff;
            fill: none;
        }

        .gn-bar .gn-heart.active .nav-icon {
            fill: rgba(255, 255, 255, .95);
        }

        /* ---------------------------------------------------------------- пігулка / лінза */
        .gn-pill {
            position: absolute;
            top: 0;
            left: 0;
            z-index: 1;
            width: 0;
            height: 0;
            border-radius: 999px;
            background: var(--gn-pill);
            opacity: 0;
            transform-origin: 50% 50%;
            transition: background-color .25s ease, box-shadow .25s ease, opacity .2s ease;
            pointer-events: none;
            will-change: transform;
        }

        .gn-pill.is-on {
            opacity: 1;
        }

        /* Лінза (за відео Apple Music з iOS 26 і після перевірки на iPhone 17 Pro): світла прозора бульбашка з яскравим
           обідком і легкою «веселкою» по нижньому краю; значок під її центром більшає (скрипт). Без розмиття й копій —
           вони двоїли текст і гальмували. Розмір — лише transform. */
        .gn-pill.is-lift {
            z-index: 3;
            background: var(--gn-lens);
            box-shadow:
                0 8px 22px rgba(16, 24, 40, .16),
                0 0 0 .5px rgba(16, 24, 40, .1),
                inset 0 1.5px 1px rgba(255, 255, 255, .95),
                inset 0 -1.5px 1px rgba(255, 70, 90, .28),
                inset 0 -3px 3px rgba(70, 160, 255, .22),
                inset 0 0 0 1.5px rgba(255, 255, 255, .7);
        }

        body.dark .gn-pill.is-lift {
            box-shadow:
                0 8px 22px rgba(0, 0, 0, .45),
                0 0 0 .5px rgba(255, 255, 255, .12),
                inset 0 1.5px 1px rgba(255, 255, 255, .5),
                inset 0 -1.5px 1px rgba(255, 90, 110, .3),
                inset 0 -3px 3px rgba(90, 170, 255, .22),
                inset 0 0 0 1.5px rgba(255, 255, 255, .25);
        }

        .gn-bar .gn-heart {
            z-index: 5;
        }

        /* Лінза як у Telegram (data-lens="tg"; власник, 22.10.2026: «повторити ползунок ефект як в тг», «став на сайт» — усім):
           поки лінза піднята, її вміст малює WebGL на цьому полотні (скрипт нижче), кольоровий ряд тим часом схований. */
        .gn-lens-gl {
            position: absolute;
            left: 0;
            top: 0;
            z-index: 4;
            pointer-events: none;
            will-change: transform;
        }

        .gn-lens-gl[hidden] {
            display: none;
        }

        /* Колір вибраної вкладки дає кольоровий ряд; CSS-колір справжнього ряду лишається лише без скрипта. */
        .gn-bar.gn-js .gn-items .nav-item.active .nav-icon,
        .gn-bar.gn-js .gn-items .nav-item.active .nav-text {
            color: var(--gn-ink);
        }

        /* Світло з-під пальця. */
        .gn-glow {
            position: absolute;
            inset: 0;
            z-index: 1;
            border-radius: inherit;
            background: radial-gradient(120px circle at var(--gx, 50%) var(--gy, 50%), rgba(255, 255, 255, .55), rgba(255, 255, 255, 0) 70%);
            opacity: 0;
            transition: opacity .45s ease;
            pointer-events: none;
        }

        body.dark .gn-glow {
            background: radial-gradient(120px circle at var(--gx, 50%) var(--gy, 50%), rgba(255, 255, 255, .16), rgba(255, 255, 255, 0) 70%);
        }

        .gn-bar.is-touch .gn-glow {
            opacity: 1;
            transition-duration: .12s;
        }

        /* ---------------------------------------------------------------- доступність */
        @media (prefers-reduced-transparency: reduce) {
            .bottom-nav.is-glass {
                --gn-glass: rgba(255, 255, 255, .94);
            }

            body.dark .bottom-nav.is-glass {
                --gn-glass: rgba(30, 30, 33, .96);
            }
        }
    

    /* ------------------------------------------------------------- the button
       One shape, four skins. The filled one is the only call to action on the
       card, so the other three are quiet: a following you already have is not
       something the page should keep shouting about. */
    .follow-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        min-width: 0;
        height: 34px;
        padding: 0 14px;
        border: none;
        border-radius: 10px;
        font-size: 13.5px;
        font-weight: 600;
        line-height: 1;
        font-family: inherit;
        cursor: pointer;
        white-space: nowrap;
        transition: background .15s, color .15s, opacity .15s;
        -webkit-tap-highlight-color: transparent;
    }

    .follow-btn.is-follow,
    .follow-btn.is-follow_back {
        background: var(--accent-color, #7C5CFF);
        color: #fff;
    }

    /* «Ви підписані» — свій колір, а не сірий контур (власник, 18.10.2026):
       м'який фіолетовий, як і значок поруч. Запит, що чекає, — просто сірий,
       теж без обводки. */
    .follow-btn.is-following {
        background: rgba(136, 73, 254, .12);
        color: var(--accent-color, #8849FE);
        box-shadow: none;
    }

    body.dark .follow-btn.is-following {
        background: rgba(136, 73, 254, .22);
        color: #C4A6FF;
    }

    .follow-btn.is-requested {
        background: var(--bg-secondary);
        color: var(--text-secondary);
        box-shadow: none;
    }

    body.dark .follow-btn.is-requested {
        background: var(--bg-tertiary, #2a2a2a);
    }

    .follow-btn:active {
        transform: scale(.97);
    }

    /* Поки запит іде, кнопка лишається своїх кольорів — раніше вона ставала
       disabled, і сторінка профілю фарбувала її текст сірим просто на
       фіолетовому. Тепер замість значка крутиться кільце, і все. */
    .follow-btn.is-busy {
        cursor: progress;
        pointer-events: none;
    }

    .follow-btn-spin {
        width: 15px;
        height: 15px;
        flex: 0 0 auto;
        border: 2px solid currentColor;
        border-right-color: transparent;
        border-radius: 50%;
        animation: follow-spin .7s linear infinite;
    }

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

    /* An SVG is shrinkable and a word is not, so in a narrow card the icon
       collapses to a sliver and the label runs on. The icon holds its size and
       the label is the thing that gives. */
    .follow-btn-icon {
        width: 15px;
        height: 15px;
        flex: 0 0 auto;
        display: block;
    }

    .follow-btn-label {
        overflow: hidden;
        text-overflow: ellipsis;
        min-width: 0;
    }



    /* ------------------------------------------------- people you may know */
    /* One line that scrolls, same as everywhere else on the site — a grid of
       strangers would take the whole first screen for something nobody asked
       for. */
    .people-strip {
        margin-bottom: 12px;
    }

    .people-strip-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        margin-bottom: 10px;
        padding: 0 2px;
    }

    .people-strip-title {
        display: flex;
        align-items: center;
        gap: 7px;
        font-size: 13.5px;
        font-weight: 500;
        line-height: 1;
        color: var(--text-secondary);
    }

    .people-strip-icon,
    svg.people-strip-icon {
        width: 16px;
        height: 16px;
        display: block;
        flex: 0 0 auto;
        color: var(--text-tertiary);
    }

    /* Стрілки гортання. Тільки на великому екрані: пальцем смуга гортається
       сама, а на миші перетягувати її нема чим — колесо в горизонтальному
       списку не працює. */
    .people-strip-tools {
        display: flex;
        align-items: center;
        gap: 6px;
    }

    .people-strip-arrow {
        display: none;
        align-items: center;
        justify-content: center;
        width: 28px;
        height: 28px;
        padding: 0;
        border: none;
        border-radius: 8px;
        background: var(--bg-primary);
        color: var(--text-secondary);
        cursor: pointer;
        transition: color .15s, opacity .15s;
    }

    .people-strip-arrow:hover {
        color: var(--accent-color);
    }

    /* Кінець смуги — кнопка гасне й перестає натискатися, а не зникає:
       заголовок, який стрибає на кнопку вбік щоразу, коли догортав до краю,
       смикає весь блок. */
    .people-strip-arrow:disabled {
        opacity: .35;
        color: var(--text-tertiary);
        cursor: default;
    }

    .people-strip-arrow i[data-lucide],
    .people-strip-arrow svg {
        width: 16px;
        height: 16px;
        display: block;
    }

    @media (min-width: 769px) {
        .people-strip-arrow {
            display: inline-flex;
        }
    }

    .people-strip-all {
        display: inline-flex;
        align-items: center;
        gap: 3px;
        padding: 6px 9px;
        border-radius: 8px;
        background: var(--bg-primary);
        font-size: 12.5px;
        font-weight: 500;
        line-height: 1;
        color: var(--text-secondary);
        text-decoration: none;
    }

    .people-strip-all i[data-lucide],
    .people-strip-all svg {
        width: 14px;
        height: 14px;
        display: block;
    }

    /* Сховати смугу — і на телефоні, і на ПК. */
    .people-strip-close {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 28px;
        height: 28px;
        padding: 0;
        border: none;
        border-radius: 8px;
        background: var(--bg-primary);
        color: var(--text-tertiary);
        cursor: pointer;
        transition: color .15s;
    }

    .people-strip-close:hover {
        color: var(--text-primary);
    }

    .people-strip-close i[data-lucide],
    .people-strip-close svg {
        width: 16px;
        height: 16px;
        display: block;
    }

    .people-strip {
        transition: height .3s ease, opacity .25s ease, margin .3s ease;
    }

    .people-strip.is-leaving {
        overflow: hidden;
        opacity: 0;
        margin-bottom: 0;
    }

    .people-strip-row {
        display: flex;
        gap: 8px;
        overflow-x: auto;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 2px;
    }

    .people-strip-row::-webkit-scrollbar {
        display: none;
    }

    .people-card {
        flex: 0 0 auto;
        width: 132px;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 6px;
        padding: 14px 10px 12px;
        border-radius: 16px;
        background: var(--card-bg);
        box-shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .04);
        text-align: center;
    }

    body.dark .people-card {
        box-shadow: 0 1px 2px rgba(0, 0, 0, .4);
    }

    .people-card-face {
        position: relative;
        display: block;
        flex: 0 0 auto;
        /* Room for the pill that hangs off the bottom of it. */
        margin-bottom: 5px;
    }

    .people-card-face img {
        width: 64px;
        height: 64px;
        border-radius: 50%;
        object-fit: cover;
        display: block;
        background: var(--bg-secondary);
    }

    /* Straddling the bottom edge, centred. The ring is the card's own colour,
       so the pill reads as sitting on the picture rather than in it. */
    .people-card-vip {
        position: absolute;
        left: 50%;
        bottom: -7px;
        transform: translateX(-50%);
        box-shadow: 0 1px 3px rgba(16, 24, 40, .18);
    }

    .people-card-name {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 4px;
        max-width: 100%;
        text-decoration: none;
    }

    .people-card-nick {
        font-size: 13.5px;
        font-weight: 600;
        color: var(--text-primary);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .people-card-tick,
    svg.people-card-tick {
        width: 13px;
        height: 13px;
        flex: 0 0 auto;
    }

    .people-card-why {
        min-height: 15px;
        font-size: 11.5px;
        line-height: 1.3;
        color: var(--text-tertiary);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        max-width: 100%;
    }

    /* Layout only. Which colour the button is depends on whether you already
       follow this person, and that lives with the button — see
       includes/components/follow_button.php. */
    .people-card-add.follow-btn {
        width: 100%;
        height: auto;
        margin-top: 2px;
        padding: 7px 8px;
        border-radius: 9px;
        font-size: 12.5px;
        gap: 5px;
    }

    /* A stroked icon reads smaller than lettering of the same nominal size —
       the glyph is a few thin lines in the middle of its box, where a capital
       fills most of its own. 16 against 12.5px text is what makes the two look
       like one size. */
    /* flex: 0 0 auto is the whole fix. An SVG is shrinkable by default and a
       word is not — so on a narrow card the icon was the only thing that could
       give, and it gave all of it, down to a couple of pixels. The label
       shortens instead. */
    .people-card-add.follow-btn .follow-btn-icon {
        width: 16px;
        height: 16px;
    }

    .people-card-add.follow-btn .follow-btn-label {
        white-space: nowrap;
    }

    /* ------------------------------------------------------ loading more */
    .feed-more {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 26px 0 34px;
    }

    /* Two rings, one of them cut open and turning. Cheaper than an animated
       image and it takes the accent with it when the accent changes. */
    .feed-spinner {
        width: 26px;
        height: 26px;
        border-radius: 50%;
        border: 2.5px solid var(--border-color);
        border-top-color: var(--accent-color);
        animation: feed-spin .7s linear infinite;
    }

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


    /* Оновлення кнопкою «Головна»: крутилка розкривається над стрічкою, самі
       дописи на мить притихають. */
    .feed-refresh {
        display: flex;
        align-items: center;
        justify-content: center;
        height: 0;
        overflow: hidden;
        opacity: 0;
        transition: height .22s ease, opacity .22s ease;
    }

    .feed-refresh.is-on {
        height: 58px;
        opacity: 1;
    }

    #feedList {
        transition: opacity .2s ease;
    }

    #feedList.is-refreshing {
        opacity: .45;
        pointer-events: none;
    }

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

    @media (prefers-reduced-motion: reduce) {
        .feed-spinner {
            animation-duration: 2.4s;
        }
    }



    /* ---------------------------------------------------------- смуга */
    .st-tray {
        position: relative;
        margin-bottom: 12px;
        padding: 12px 0 10px;
        border-radius: 22px;
        background: var(--card-bg);
        box-shadow: var(--card-shadow);
    }

    .st-row {
        display: flex;
        gap: 6px;
        padding: 2px 12px;
        overflow-x: auto;
        overflow-y: hidden;
        overscroll-behavior-x: contain;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
        transition: -webkit-mask-image .2s, mask-image .2s;
    }

    .st-row::-webkit-scrollbar {
        display: none;
    }

    .st-tray.can-left .st-row {
        -webkit-mask-image: linear-gradient(to right, transparent 0, #000 22px);
        mask-image: linear-gradient(to right, transparent 0, #000 22px);
    }

    .st-tray.can-right .st-row {
        -webkit-mask-image: linear-gradient(to left, transparent 0, #000 22px);
        mask-image: linear-gradient(to left, transparent 0, #000 22px);
    }

    .st-tray.can-left.can-right .st-row {
        -webkit-mask-image: linear-gradient(to right, transparent 0, #000 22px, #000 calc(100% - 22px), transparent 100%);
        mask-image: linear-gradient(to right, transparent 0, #000 22px, #000 calc(100% - 22px), transparent 100%);
    }

    .st-item {
        flex: 0 0 auto;
        width: 76px;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 6px;
        padding: 0;
        border: 0;
        background: none;
        color: inherit;
        font: inherit;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
        -webkit-touch-callout: none;
        user-select: none;
    }

    .st-ring {
        position: relative;
        display: block;
        width: 68px;
        height: 68px;
        transition: transform .18s ease;
    }

    .st-item:active .st-ring {
        transform: scale(.94);
    }

    /* Кільце — три шари однієї форми: фарба, щілина кольору картки й
       обличчя. Маска обрізає своїх нащадків, тож кожен шар — окрема маска,
       а не рамка: border по суперелiпсу не намалювати. */
    .st-paint,
    .st-gap,
    .st-face {
        position: absolute;
        display: block;
        -webkit-mask-image: var(--avatar-squircle);
        mask-image: var(--avatar-squircle);
        -webkit-mask-size: 100% 100%;
        mask-size: 100% 100%;
        -webkit-mask-repeat: no-repeat;
        mask-repeat: no-repeat;
    }

    .st-paint {
        inset: 0;
        overflow: hidden;
        opacity: 0;
    }

    .st-paint::before {
        content: '';
        position: absolute;
        inset: -25%;
        background: conic-gradient(from 200deg, #FFD36B, #FF8A3D, #F43F75, #C13BD8, #8849FE, #5B6CFF, #FFD36B);
    }

    .st-gap {
        inset: 2.5px;
        background: var(--card-bg);
    }

    .st-face {
        inset: 5px;
        background: var(--bg-secondary);
    }

    .st-face img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

    .st-item.has-story .st-paint {
        opacity: 1;
    }

    /* «Близькі друзі» — зелене кільце, як в Instagram. */
    .st-item.is-close .st-paint::before {
        background: linear-gradient(135deg, #6BEA8E, #1FBF5B 55%, #0FA34A);
    }

    .st-item.is-seen .st-paint::before {
        background: #D3D7DE;
    }

    body.dark .st-item.is-seen .st-paint::before {
        background: #3F4350;
    }

    /* Поки готується перша картинка — фарба крутиться, як в Instagram. */
    .st-item.is-loading .st-paint {
        opacity: 1;
    }

    .st-item.is-loading .st-paint::before {
        animation: st-spin .9s linear infinite;
    }

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

    /* Своя історія вантажиться — кільце стає смужкою поступу. */
    @property --st-p {
        syntax: '<number>';
        inherits: true;
        initial-value: 0;
    }

    .st-item.is-uploading .st-paint {
        opacity: 1;
        transition: --st-p .35s ease;
    }

    .st-item.is-uploading .st-paint::before {
        background: conic-gradient(#8849FE calc(var(--st-p) * 1%), rgba(136, 73, 254, .16) 0);
        inset: 0;
        animation: none;
    }

    .st-item.is-failed .st-paint {
        opacity: 1;
    }

    .st-item.is-failed .st-paint::before {
        background: #EF4444;
    }

    .st-plus {
        position: absolute;
        right: -3px;
        bottom: -3px;
        width: 24px;
        height: 24px;
        display: grid;
        place-items: center;
        border-radius: 50%;
        background: linear-gradient(135deg, #8849FE, #C13BD8);
        border: 2.5px solid var(--card-bg);
        color: #fff;
    }

    .st-plus svg {
        width: 13px;
        height: 13px;
        fill: none;
        stroke: currentColor;
        stroke-width: 3;
        stroke-linecap: round;
    }

    .st-item.is-failed .st-plus {
        background: #EF4444;
    }

    .st-name {
        max-width: 78px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 11.5px;
        line-height: 14px;
        font-weight: 500;
        color: var(--text-primary);
    }

    .st-item.is-seen:not(.is-me) .st-name {
        color: var(--text-secondary);
        font-weight: 400;
    }

    /* Стрілки — лише там, де є миша й куди гортати. */
    .st-arrow {
        position: absolute;
        top: 36px;
        z-index: 2;
        width: 30px;
        height: 30px;
        display: none;
        place-items: center;
        padding: 0;
        border: 0;
        border-radius: 50%;
        background: var(--card-bg);
        color: var(--text-primary);
        box-shadow: 0 2px 10px rgba(0, 0, 0, .14);
        cursor: pointer;
        opacity: 0;
        transition: opacity .18s ease;
    }

    .st-arrow svg {
        width: 16px;
        height: 16px;
        fill: none;
        stroke: currentColor;
        stroke-width: 2.4;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    .st-arrow.is-left {
        left: 6px;
    }

    .st-arrow.is-right {
        right: 6px;
    }

    @media (hover: hover) and (pointer: fine) {
        .st-arrow {
            display: grid;
        }

        .st-tray:hover.can-left .st-arrow.is-left,
        .st-tray:hover.can-right .st-arrow.is-right {
            opacity: 1;
        }
    }

    /* Перетягують файл на смугу — вона показує, що прийме. */
    .st-tray.is-drop {
        box-shadow: 0 0 0 2px #8849FE, var(--card-shadow);
    }

    @media (prefers-reduced-motion: reduce) {
        .st-item.is-loading .st-paint::before {
            animation-duration: 2.4s;
        }
    }


    .sv {
        position: fixed;
        inset: 0;
        z-index: 1400;
        overflow: hidden;
        color: #fff;
        -webkit-user-select: none;
        user-select: none;
        /* Утримання — пауза, а не меню «зберегти картинку» (iOS). */
        -webkit-touch-callout: none;
        -webkit-tap-highlight-color: transparent;
        touch-action: none;
        --fw: 390px;
        --fh: 693px;
        --fx: 0px;
        --fy: 0px;
        --ch: 693px;
        --cy: 0px;
    }

    .sv[hidden] {
        display: none;
    }

    .sv-back {
        position: absolute;
        inset: 0;
        background: #000;
        opacity: 0;
        transition: opacity .28s ease;
    }

    .sv.is-shown .sv-back {
        opacity: 1;
    }

    /* ПК: розмите тло з тієї самої історії, як у Instagram. */
    .sv-blur {
        position: absolute;
        inset: -40px;
        background-size: cover;
        background-position: center;
        filter: blur(40px) brightness(.45) saturate(1.2);
        opacity: 0;
        transition: opacity .4s ease, background-image .4s ease;
        display: none;
    }

    .sv.is-wide .sv-blur {
        display: block;
    }

    .sv.is-wide.is-shown .sv-blur {
        opacity: 1;
    }

    .sv-stage {
        position: absolute;
        inset: 0;
        perspective: 1400px;
        perspective-origin: calc(var(--fx) + var(--fw) / 2) calc(var(--fy) + var(--fh) / 2);
        transform-origin: calc(var(--fx) + var(--fw) / 2) calc(var(--fy) + var(--fh) / 2);
    }

    .sv-stage.is-anim {
        transition: transform .3s cubic-bezier(.2, .8, .2, 1), opacity .3s ease;
    }

    .sv-cube {
        position: absolute;
        left: var(--fx);
        top: var(--fy);
        width: var(--fw);
        height: var(--fh);
        transform-style: preserve-3d;
        transform: translateZ(calc(var(--fw) / -2));
    }

    .sv-face {
        position: absolute;
        inset: 0;
        overflow: hidden;
        backface-visibility: hidden;
        -webkit-backface-visibility: hidden;
        background: #111;
        border-radius: var(--fr, 0px);
    }

    .sv-face[data-pos="cur"] {
        transform: translateZ(calc(var(--fw) / 2));
    }

    .sv-face[data-pos="next"] {
        transform: rotateY(90deg) translateZ(calc(var(--fw) / 2));
    }

    .sv-face[data-pos="prev"] {
        transform: rotateY(-90deg) translateZ(calc(var(--fw) / 2));
    }

    .sv-face:empty {
        visibility: hidden;
    }

    /* Вміст — завжди 9:16 на всю ширину кадру; кадр нижчий — лишок
       обрізається порівну зверху й знизу (--cy від'ємне). Написи стоять у
       тій самій коробці, тож не з'їжджають. */
    .sv-media {
        position: absolute;
        left: 0;
        right: 0;
        top: var(--cy);
        height: var(--ch);
        overflow: hidden;
        background: #111;
    }

    .sv-media > img,
    .sv-media > video {
        position: absolute;
        display: block;
        pointer-events: none;
        -webkit-user-drag: none;
    }

    .sv-thumb,
    .sv-img {
        inset: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .sv-img.is-contain {
        object-fit: contain;
    }

    /* Мініатюра — того самого розміру й місця, що й фото (без збільшення):
       коли різке фото лягає зверху, нічого не «скаче». Без розмиття (власник,
       21.10.2026: «спочатку блюр на секунду — навіщо?»): грань куба бере вже
       завантажене повне фото (faceSrc), мініатюра — лише поки його ще немає. */

    .sv-img {
        opacity: 0;
        transition: opacity .16s ease;
    }

    .sv-img.is-ready {
        opacity: 1;
    }

    .sv-img.is-instant {
        transition: none;
    }

    /* Обкладинка відео — різка, рівно там, де стане відео (fitBox). */
    .sv-media > .sv-poster {
        left: 0;
        top: 0;
        object-fit: fill;
    }

    .sv-media > video {
        left: 0;
        top: 0;
        object-fit: fill;
        background: transparent;
        opacity: 0;
        transition: opacity .12s ease;
    }

    .sv-media > video.is-ready {
        opacity: 1;
    }

    .sv-shade {
        position: absolute;
        inset: 0;
        background: #000;
        opacity: 0;
        pointer-events: none;
        z-index: 6;
    }

    /* Верх: смужки поступу, автор, кнопки. */
    .sv-top {
        position: absolute;
        left: 0;
        right: 0;
        top: 0;
        z-index: 4;
        padding: 8px 8px 26px;
        background: linear-gradient(to bottom, rgba(0, 0, 0, .42), rgba(0, 0, 0, 0));
        transition: opacity .2s ease;
    }

    .sv-segs {
        display: flex;
        gap: 3px;
        height: 2.5px;
        margin: 0 2px 9px;
    }

    .sv-seg {
        position: relative;
        flex: 1 1 0;
        overflow: hidden;
        border-radius: 2px;
        background: rgba(255, 255, 255, .35);
    }

    .sv-seg > i {
        position: absolute;
        inset: 0;
        background: #fff;
        border-radius: 2px;
        transform: scaleX(0);
        transform-origin: left center;
        will-change: transform;
    }

    .sv-seg.is-done > i {
        transform: scaleX(1);
    }

    .sv-who {
        display: flex;
        align-items: center;
        gap: 9px;
        min-height: 36px;
        padding: 0 2px 0 4px;
    }

    .sv-ava {
        flex: 0 0 auto;
        width: 32px;
        height: 32px;
        display: block;
        -webkit-mask-image: var(--avatar-squircle);
        mask-image: var(--avatar-squircle);
        -webkit-mask-size: 100% 100%;
        mask-size: 100% 100%;
        background: rgba(255, 255, 255, .2);
    }

    .sv-ava img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

    .sv-meta {
        flex: 1 1 auto;
        min-width: 0;
        display: flex;
        align-items: baseline;
        gap: 7px;
        text-shadow: 0 1px 2px rgba(0, 0, 0, .3);
    }

    .sv-name {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 14px;
        font-weight: 650;
        color: #fff;
        text-decoration: none;
    }

    .sv-vf {
        flex: 0 0 auto;
        width: 14px;
        height: 14px;
        align-self: center;
        margin-left: -3px;
    }

    .sv-when {
        flex: 0 0 auto;
        font-size: 12.5px;
        color: rgba(255, 255, 255, .78);
        white-space: nowrap;
    }

    .sv-aud {
        flex: 0 0 auto;
        width: 13px;
        height: 13px;
        align-self: center;
        opacity: .85;
    }

    /* «Близькі друзі» — зелена позначка біля часу, як в Instagram. */
    .sv-cf {
        flex: 0 0 auto;
        align-self: center;
        display: inline-flex;
        align-items: center;
        gap: 3px;
        height: 20px;
        padding: 0 7px 0 5px;
        border-radius: 10px;
        background: #1FBF5B;
        color: #fff;
        font-size: 11px;
        font-weight: 700;
        line-height: 1;
        text-shadow: none;
        white-space: nowrap;
    }

    .sv .sv-cf svg {
        width: 11px;
        height: 11px;
        fill: #fff;
        stroke: none;
    }

    /* Світле фото зверху — значки, ім'я й смужки темні; темне — білі.
       Тон рахує tone() з мініатюри. */
    .sv-face.is-light-top .sv-top {
        background: linear-gradient(to bottom, rgba(255, 255, 255, .38), rgba(255, 255, 255, 0));
        color: #111;
    }

    .sv-face.is-light-top .sv-seg {
        background: rgba(0, 0, 0, .18);
    }

    .sv-face.is-light-top .sv-seg > i {
        background: #111;
    }

    .sv-face.is-light-top .sv-meta {
        text-shadow: none;
    }

    .sv-face.is-light-top .sv-name {
        color: #111;
    }

    .sv-face.is-light-top .sv-when {
        color: rgba(0, 0, 0, .62);
    }

    .sv-face.is-light-top .sv-btn {
        background: rgba(24, 24, 28, .52);
        color: #fff;
        box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22), inset 0 1px 1px rgba(255, 255, 255, .3), 0 2px 8px rgba(0, 0, 0, .14);
    }

    .sv.is-light-bot.is-bar-in .sv-bar {
        background: linear-gradient(to top, rgba(255, 255, 255, .5), rgba(255, 255, 255, 0));
        color: #111;
    }

    .sv.is-light-bot.is-bar-in .sv-input,
    .sv.is-light-bot.is-bar-in .sv-heart {
        background: rgba(24, 24, 28, .52);
        color: #fff;
        box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22), inset 0 1px 1px rgba(255, 255, 255, .3), 0 2px 8px rgba(0, 0, 0, .12);
    }

    .sv.is-light-bot.is-bar-in .sv-input::placeholder {
        color: rgba(255, 255, 255, .72);
    }

    .sv.is-light-bot.is-bar-in .sv-own-likes {
        color: #111;
    }

    .sv.is-light-bot.is-bar-in .sv-views {
        background: rgba(24, 24, 28, .52);
        color: #fff;
        box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22), inset 0 1px 1px rgba(255, 255, 255, .3);
    }

    /* Кнопки зверху — «рідке скло», як у новій iOS: на темному фото світле
       з темним значком, на світлому — темне з білим (tone(), is-light-top). */
    .sv-btn {
        flex: 0 0 auto;
        width: 34px;
        height: 34px;
        display: grid;
        place-items: center;
        padding: 0;
        border: 0;
        border-radius: 50%;
        background: rgba(255, 255, 255, .66);
        color: #111;
        box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .45), inset 0 1px 1px rgba(255, 255, 255, .7), 0 2px 8px rgba(0, 0, 0, .2);
        -webkit-backdrop-filter: blur(14px) saturate(180%);
        backdrop-filter: blur(14px) saturate(180%);
        cursor: pointer;
        transition: background .2s ease, color .2s ease;
    }

    .sv-btn svg {
        width: 19px;
        height: 19px;
    }

    .sv-btn:active {
        transform: scale(.9);
    }

    .sv svg {
        fill: none;
        stroke: currentColor;
        stroke-width: 2;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    .sv-btn.is-x svg {
        width: 20px;
        height: 20px;
        stroke-width: 2.4;
    }

    .sv.is-wide .sv-btn.is-x {
        display: none;
    }

    /* Звук: заклик торкнутися, коли браузер не дав звуку сам. */
    .sv-sound-hint {
        position: absolute;
        left: 50%;
        top: 74px;
        z-index: 5;
        transform: translateX(-50%);
        padding: 7px 12px;
        border-radius: 14px;
        background: rgba(0, 0, 0, .5);
        font-size: 12.5px;
        white-space: nowrap;
        pointer-events: none;
        animation: sv-fade 2.6s ease forwards;
    }

    @keyframes sv-fade {
        0%, 75% { opacity: 1; }
        100% { opacity: 0; }
    }

    /* Написи на історії: координати й розмір відносно ширини кадру — у
       редакторі й тут вони стоять однаково, хоч кадр різного розміру. */
    .sv-ov {
        position: absolute;
        left: 0;
        right: 0;
        top: var(--cy);
        height: var(--ch);
        z-index: 2;
        pointer-events: none;
    }

    /* width: max-content — інакше блок, поставлений серединою на left: 50%,
       стискається до половини кадру й переносить навіть короткий напис. */
    .sv-tx {
        position: absolute;
        width: max-content;
        max-width: calc(var(--ow, var(--fw)) * .86);
        padding: calc(var(--ow, var(--fw)) * .012) calc(var(--ow, var(--fw)) * .028);
        border-radius: calc(var(--ow, var(--fw)) * .03);
        font-size: calc(var(--ow, var(--fw)) * .072);
        font-weight: 750;
        line-height: 1.22;
        text-align: center;
        white-space: pre-wrap;
        overflow-wrap: anywhere;
        transform-origin: center center;
        -webkit-box-decoration-break: clone;
        box-decoration-break: clone;
    }

    .sv-tx.is-b0 {
        text-shadow: 0 1px 3px rgba(0, 0, 0, .45), 0 0 1px rgba(0, 0, 0, .3);
    }

    .sv-tx.is-b2 {
        background: rgba(0, 0, 0, .5);
    }

    /* Підпис унизу кадру. */
    .sv-cap {
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 3;
        padding: 46px 16px calc(14px + var(--bar-in, 0px));
        background: linear-gradient(to top, rgba(0, 0, 0, .55), rgba(0, 0, 0, 0));
        font-size: 14.5px;
        line-height: 1.4;
        text-shadow: 0 1px 2px rgba(0, 0, 0, .35);
        transition: opacity .2s ease;
    }

    .sv-cap:empty {
        display: none;
    }

    .sv-cap-text {
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 3;
        overflow: hidden;
        white-space: pre-line;
        overflow-wrap: anywhere;
    }

    .sv-cap.is-open .sv-cap-text {
        -webkit-line-clamp: unset;
        max-height: calc(var(--fh) * .5);
        overflow-y: auto;
    }

    .sv-cap a {
        color: #fff;
        font-weight: 600;
        text-decoration: underline;
    }

    .sv-cap.is-open {
        background: rgba(0, 0, 0, .62);
    }

    .sv-spin {
        position: absolute;
        left: 50%;
        top: 50%;
        z-index: 3;
        width: 42px;
        height: 42px;
        margin: -21px 0 0 -21px;
        border: 3px solid rgba(255, 255, 255, .25);
        border-top-color: #fff;
        border-radius: 50%;
        animation: st-spin .8s linear infinite;
        opacity: 0;
        transition: opacity .2s ease;
        pointer-events: none;
    }

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

    .sv-face.is-wait .sv-spin {
        opacity: 1;
    }

    .sv-err {
        position: absolute;
        left: 50%;
        top: 50%;
        z-index: 5;
        transform: translate(-50%, -50%);
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 12px;
        font-size: 14px;
        text-align: center;
    }

    .sv-err button {
        padding: 9px 18px;
        border: 0;
        border-radius: 18px;
        background: rgba(255, 255, 255, .18);
        color: #fff;
        font: inherit;
        font-weight: 600;
        cursor: pointer;
    }

    /* Утримання — пауза, і все зайве гасне. */
    .sv.is-holding .sv-face[data-pos="cur"] .sv-top,
    .sv.is-holding .sv-face[data-pos="cur"] .sv-cap,
    .sv.is-holding .sv-bar {
        opacity: 0;
    }

    .sv-pausemark {
        position: absolute;
        left: 50%;
        top: 50%;
        z-index: 5;
        width: 64px;
        height: 64px;
        margin: -32px 0 0 -32px;
        display: grid;
        place-items: center;
        border-radius: 50%;
        background: rgba(0, 0, 0, .35);
        opacity: 0;
        transition: opacity .2s ease;
        pointer-events: none;
    }

    .sv-pausemark svg {
        width: 26px;
        height: 26px;
        fill: #fff;
        stroke: none;
    }

    .sv.is-paused-key .sv-face[data-pos="cur"] .sv-pausemark {
        opacity: 1;
    }

    /* Рядок унизу: відповідь і серце; у своєї — перегляди. */
    .sv-bar {
        position: absolute;
        left: var(--fx);
        width: var(--fw);
        top: calc(var(--fy) + var(--fh));
        z-index: 8;
        display: flex;
        align-items: center;
        gap: 10px;
        height: 60px;
        padding: 8px 10px 8px 12px;
        box-sizing: border-box;
        transition: opacity .2s ease;
    }

    .sv.is-bar-in .sv-bar {
        top: calc(var(--fy) + var(--fh) - 60px);
        border-radius: 0 0 var(--fr, 0px) var(--fr, 0px);
        background: linear-gradient(to top, rgba(0, 0, 0, .4), rgba(0, 0, 0, 0));
    }

    .sv-bar:empty {
        display: none;
    }

    .sv-input {
        flex: 1 1 auto;
        min-width: 0;
        height: 44px;
        padding: 0 16px;
        border: 0;
        border-radius: 22px;
        background: rgba(255, 255, 255, .66);
        color: #111;
        box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .45), inset 0 1px 1px rgba(255, 255, 255, .7), 0 2px 8px rgba(0, 0, 0, .16);
        -webkit-backdrop-filter: blur(14px) saturate(180%);
        backdrop-filter: blur(14px) saturate(180%);
        font: inherit;
        font-size: 15px;
        outline: none;
        -webkit-user-select: text;
        user-select: text;
        touch-action: manipulation;
    }

    /* Поле відповіді — те саме «скло», що й кнопки, без рамки. */
    .sv-input::placeholder {
        color: rgba(0, 0, 0, .55);
    }

    .sv-input:focus {
        background: rgba(255, 255, 255, .82);
    }

    .sv-heart {
        background: rgba(255, 255, 255, .66);
        color: #111;
        box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .45), inset 0 1px 1px rgba(255, 255, 255, .7), 0 2px 8px rgba(0, 0, 0, .16);
        -webkit-backdrop-filter: blur(14px) saturate(180%);
        backdrop-filter: blur(14px) saturate(180%);
    }

    .sv .sv-heart svg {
        width: 24px;
        height: 24px;
    }

    .sv-heart,
    .sv-send {
        flex: 0 0 auto;
        width: 44px;
        height: 44px;
        display: grid;
        place-items: center;
        padding: 0;
        border: 0;
        border-radius: 50%;
        background: none;
        color: #fff;
        cursor: pointer;
        touch-action: manipulation;
    }

    .sv-heart svg,
    .sv-send svg {
        width: 27px;
        height: 27px;
    }

    .sv-heart .sv-emo {
        font-size: 27px;
        line-height: 1;
    }

    .sv-heart.is-on svg {
        fill: #FF3B5C;
        stroke: #FF3B5C;
    }

    .sv-heart.is-pop {
        animation: sv-pop .38s cubic-bezier(.2, .9, .3, 1.4);
    }

    @keyframes sv-pop {
        0% { transform: scale(1); }
        40% { transform: scale(1.35); }
        100% { transform: scale(1); }
    }

    .sv-send {
        display: none;
        background: #8849FE;
    }

    .sv-send svg {
        width: 21px;
        height: 21px;
        margin-left: -2px;
    }

    .sv-bar.is-typing .sv-heart {
        display: none;
    }

    .sv-bar.is-typing .sv-send {
        display: grid;
    }

    .sv-views {
        display: inline-flex;
        align-items: center;
        gap: 7px;
        height: 40px;
        padding: 0 14px 0 12px;
        border: 0;
        border-radius: 20px;
        background: rgba(255, 255, 255, .66);
        color: #111;
        box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .45), inset 0 1px 1px rgba(255, 255, 255, .7);
        -webkit-backdrop-filter: blur(14px) saturate(180%);
        backdrop-filter: blur(14px) saturate(180%);
        font: inherit;
        font-size: 14px;
        font-weight: 650;
        cursor: pointer;
    }

    .sv-views svg {
        width: 19px;
        height: 19px;
    }

    .sv-own-likes {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        margin-left: auto;
        font-size: 14px;
        font-weight: 600;
    }

    .sv-own-likes svg {
        width: 20px;
        height: 20px;
        fill: #FF3B5C;
        stroke: #FF3B5C;
    }

    /* Набір реакцій — над серцем, з'являється від утримання. */
    .sv-picker {
        position: absolute;
        z-index: 9;
        display: flex;
        gap: 2px;
        padding: 5px;
        border-radius: 28px;
        background: rgba(30, 30, 34, .92);
        box-shadow: 0 8px 28px rgba(0, 0, 0, .35);
        transform-origin: right bottom;
        animation: sv-pick .2s cubic-bezier(.2, .9, .3, 1.2);
    }

    .sv-picker[hidden] {
        display: none;
    }

    @keyframes sv-pick {
        from { transform: scale(.6); opacity: 0; }
    }

    .sv-picker button {
        width: 44px;
        height: 44px;
        padding: 0;
        border: 0;
        border-radius: 50%;
        background: none;
        font-size: 28px;
        line-height: 44px;
        cursor: pointer;
        transition: transform .12s ease;
    }

    .sv-picker button:hover,
    .sv-picker button:active {
        transform: scale(1.25);
    }

    /* Велика реакція, що злітає над кадром. */
    .sv-burst {
        position: absolute;
        z-index: 10;
        font-size: 64px;
        line-height: 1;
        pointer-events: none;
        animation: sv-burst .9s cubic-bezier(.2, .8, .2, 1) forwards;
    }

    @keyframes sv-burst {
        0% { transform: translate(-50%, 0) scale(.4); opacity: 0; }
        25% { transform: translate(-50%, -40px) scale(1.15); opacity: 1; }
        100% { transform: translate(-50%, -150px) scale(.9); opacity: 0; }
    }

    .sv-nav,
    .sv-close-pc {
        position: absolute;
        z-index: 7;
        display: none;
        place-items: center;
        padding: 0;
        border: 0;
        border-radius: 50%;
        color: #fff;
        cursor: pointer;
    }

    .sv-nav {
        top: calc(var(--fy) + var(--fh) / 2 - 20px);
        width: 40px;
        height: 40px;
        background: rgba(255, 255, 255, .9);
        color: #111;
        box-shadow: 0 2px 12px rgba(0, 0, 0, .25);
        transition: opacity .2s ease, transform .15s ease;
    }

    .sv-nav svg {
        width: 22px;
        height: 22px;
        stroke-width: 2.4;
    }

    .sv-nav.is-prev {
        left: calc(var(--fx) - 58px);
    }

    .sv-nav.is-next {
        left: calc(var(--fx) + var(--fw) + 18px);
    }

    .sv-nav:hover {
        transform: scale(1.06);
    }

    .sv-nav[disabled] {
        opacity: 0;
        pointer-events: none;
    }

    .sv-close-pc {
        top: 16px;
        right: 18px;
        width: 44px;
        height: 44px;
        background: none;
    }

    .sv-close-pc svg {
        width: 30px;
        height: 30px;
    }

    .sv.is-wide .sv-nav,
    .sv.is-wide .sv-close-pc {
        display: grid;
    }

    /* Хто переглянув. */
    .sv-sheet {
        position: absolute;
        inset: 0;
        z-index: 11;
        background: rgba(0, 0, 0, .4);
        animation: sv-dim .2s ease;
        touch-action: auto;
    }

    .sv-sheet[hidden] {
        display: none;
    }

    @keyframes sv-dim {
        from { background: rgba(0, 0, 0, 0); }
    }

    .sv-sheet-card {
        position: absolute;
        left: var(--fx);
        width: var(--fw);
        bottom: calc(100% - var(--fy) - var(--fh) - (var(--bar-out, 0px)));
        height: min(62%, calc(var(--fh) * .66));
        display: flex;
        flex-direction: column;
        border-radius: 20px 20px 0 0;
        background: var(--card-bg, #fff);
        color: var(--text-primary, #111);
        animation: sv-up .28s cubic-bezier(.2, .8, .2, 1);
        -webkit-user-select: text;
        user-select: text;
    }

    @keyframes sv-up {
        from { transform: translateY(100%); }
    }

    .sv-sheet-grip {
        width: 36px;
        height: 4px;
        margin: 8px auto 2px;
        border-radius: 2px;
        background: var(--border-color, #ddd);
    }

    .sv-sheet-head {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 6px 10px 8px 18px;
    }

    .sv-sheet-title {
        flex: 1 1 auto;
        font-size: 16px;
        font-weight: 700;
    }

    .sv-sheet-x {
        width: 34px;
        height: 34px;
        display: grid;
        place-items: center;
        padding: 0;
        border: 0;
        border-radius: 50%;
        background: var(--bg-secondary, #f2f2f2);
        color: var(--text-primary, #111);
        cursor: pointer;
    }

    .sv-sheet-x svg {
        width: 18px;
        height: 18px;
    }

    .sv-sheet-list {
        flex: 1 1 auto;
        overflow-y: auto;
        overscroll-behavior: contain;
        padding: 0 8px 16px;
        touch-action: pan-y;
    }

    .sv-vrow {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 8px 10px;
        border-radius: 14px;
        color: inherit;
        text-decoration: none;
    }

    .sv-vrow:hover {
        background: var(--bg-secondary, #f4f4f4);
    }

    .sv-vrow img {
        width: 42px;
        height: 42px;
        object-fit: cover;
        -webkit-mask-image: var(--avatar-squircle);
        mask-image: var(--avatar-squircle);
        -webkit-mask-size: 100% 100%;
        mask-size: 100% 100%;
        opacity: 0;
        transition: opacity .25s ease;
    }

    .sv-vrow img.is-in {
        opacity: 1;
    }

    .sv-vrow-text {
        flex: 1 1 auto;
        min-width: 0;
    }

    .sv-vrow-name {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 14.5px;
        font-weight: 600;
    }

    .sv-vrow-when {
        font-size: 12.5px;
        color: var(--text-secondary, #888);
    }

    .sv-vrow-r {
        font-size: 22px;
    }

    .sv-sheet-empty {
        padding: 36px 16px;
        text-align: center;
        color: var(--text-secondary, #888);
        font-size: 14px;
    }

    .sv-toast {
        position: absolute;
        left: 50%;
        top: calc(var(--fy) + 84px);
        z-index: 12;
        transform: translateX(-50%);
        max-width: calc(var(--fw) - 40px);
        padding: 9px 16px;
        border-radius: 18px;
        background: rgba(20, 20, 22, .86);
        font-size: 14px;
        text-align: center;
        animation: sv-pick .2s ease;
        pointer-events: none;
    }

    .sv-toast[hidden] {
        display: none;
    }

    @media (prefers-reduced-motion: reduce) {
        .sv-stage.is-anim,
        .sv-back {
            transition-duration: .01s;
        }
    }


    .sc {
        position: fixed;
        inset: 0;
        z-index: 1450;
        overflow: hidden;
        color: #fff;
        -webkit-tap-highlight-color: transparent;
        /* Утримання пальця — жест (тягнути напис, записувати відео), а не
           виділення тексту й не меню браузера. Поля вводу — свої. */
        -webkit-user-select: none;
        user-select: none;
        -webkit-touch-callout: none;
        touch-action: none;
        --fw: 390px;
        --fh: 693px;
        --fx: 0px;
        --fy: 0px;
        --ch: 693px;
        --cy: 0px;
    }

    .sc textarea,
    .sc input {
        -webkit-user-select: text;
        user-select: text;
        -webkit-touch-callout: default;
    }

    .sc[hidden] {
        display: none;
    }

    .sc-back {
        position: absolute;
        inset: 0;
        background: #000;
        opacity: 0;
        transition: opacity .25s ease;
    }

    .sc.is-shown .sc-back {
        opacity: 1;
    }

    .sc.is-wide .sc-back {
        background: #0d0d10;
    }

    .sc-frame {
        position: absolute;
        left: var(--fx);
        top: var(--fy);
        width: var(--fw);
        height: var(--fh);
        overflow: hidden;
        border-radius: var(--fr, 0px);
        background: #0b0b0d;
        opacity: 0;
        transform: translateY(24px) scale(.97);
        transition: opacity .25s ease, transform .3s cubic-bezier(.2, .8, .2, 1);
    }

    .sc.is-shown .sc-frame {
        opacity: 1;
        transform: none;
    }

    /* Вміст — 9:16 на всю ширину кадру; лишок обрізається, як у перегляді. */
    .sc-media {
        position: absolute;
        left: 0;
        right: 0;
        top: var(--cy);
        height: var(--ch);
        overflow: hidden;
    }

    .sc-media > .sc-bg {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        display: block;
    }

    .sc-media > .sc-shade {
        position: absolute;
        inset: 0;
        background: rgba(0, 0, 0, .22);
    }

    .sc-media > .sc-main {
        position: absolute;
        left: 0;
        top: 0;
        display: block;
        max-width: none;
        transform-origin: 0 0;
        will-change: transform;
        pointer-events: none;
        -webkit-user-drag: none;
    }

    .sc-ov {
        position: absolute;
        left: 0;
        right: 0;
        top: var(--cy);
        height: var(--ch);
        z-index: 2;
    }

    .sc-nopreview {
        position: absolute;
        inset: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 12px;
        padding: 0 40px;
        background: linear-gradient(160deg, #26262c, #111114);
        color: rgba(255, 255, 255, .75);
        font-size: 14.5px;
        line-height: 1.4;
        text-align: center;
    }

    .sc-nopreview svg {
        width: 42px;
        height: 42px;
        stroke-width: 1.6;
        opacity: .7;
    }

    .sc-ov .sv-tx {
        cursor: grab;
        touch-action: none;
    }

    .sc-ov .sv-tx.is-drag {
        cursor: grabbing;
    }

    .sc-ov .sv-tx.is-over-trash {
        opacity: .45;
    }

    /* ------------------------------------------------------------ камера */
    .sc-cam {
        position: absolute;
        inset: 0;
        z-index: 3;
        background: #000;
    }

    .sc-cam[hidden] {
        display: none;
    }

    .sc-cam-video {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        opacity: 0;
        transition: opacity .25s ease;
        pointer-events: none;
    }

    .sc-cam-video.is-front {
        transform: scaleX(-1);
    }

    .sc-cam.is-on .sc-cam-video {
        opacity: 1;
    }

    .sc-cam-empty {
        position: absolute;
        left: 24px;
        right: 24px;
        top: 50%;
        transform: translateY(-58%);
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 14px;
        text-align: center;
        font-size: 14.5px;
        line-height: 1.4;
        color: rgba(255, 255, 255, .78);
    }

    .sc-cam.is-on .sc-cam-empty {
        display: none;
    }

    .sc-cam-empty > svg {
        width: 46px;
        height: 46px;
        stroke-width: 1.6;
        color: rgba(255, 255, 255, .55);
    }

    .sc-cam-btns {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }

    .sc-pill {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        height: 44px;
        padding: 0 18px;
        border: 0;
        border-radius: 22px;
        background: #fff;
        color: #111;
        font: inherit;
        font-size: 15px;
        font-weight: 650;
        cursor: pointer;
    }

    .sc-pill.is-ghost {
        background: rgba(255, 255, 255, .16);
        color: #fff;
    }

    .sc-pill svg {
        width: 19px;
        height: 19px;
    }

    .sc-spin {
        width: 34px;
        height: 34px;
        border: 3px solid rgba(255, 255, 255, .22);
        border-top-color: #fff;
        border-radius: 50%;
        animation: st-spin .8s linear infinite;
    }

    .sc-flash {
        position: absolute;
        inset: 0;
        background: #fff;
        opacity: 0;
        pointer-events: none;
    }

    .sc-flash.is-on {
        animation: sc-flash .35s ease-out;
    }

    @keyframes sc-flash {
        0% { opacity: .85; }
        100% { opacity: 0; }
    }

    .sc-cam-bottom {
        position: absolute;
        left: 0;
        right: 0;
        bottom: 22px;
        display: grid;
        grid-template-columns: 1fr auto 1fr;
        align-items: center;
        padding: 0 22px;
    }

    .sc-gal {
        justify-self: start;
        width: 48px;
        height: 48px;
        display: grid;
        place-items: center;
        padding: 0;
        border: 2px solid #fff;
        border-radius: 12px;
        background: rgba(255, 255, 255, .14) center / cover no-repeat;
        color: #fff;
        cursor: pointer;
        -webkit-backdrop-filter: blur(8px);
        backdrop-filter: blur(8px);
    }

    .sc-gal svg {
        width: 22px;
        height: 22px;
    }

    .sc-flip {
        justify-self: end;
    }

    .sc-shutter {
        position: relative;
        width: 80px;
        height: 80px;
        padding: 0;
        border: 0;
        border-radius: 50%;
        background: none;
        cursor: pointer;
        touch-action: none;
        --rp: 0;
    }

    .sc-shutter-ring {
        position: absolute;
        inset: 0;
        border-radius: 50%;
        border: 5px solid #fff;
        box-sizing: border-box;
        transition: transform .2s ease;
    }

    .sc-shutter-dot {
        position: absolute;
        inset: 11px;
        border-radius: 50%;
        background: #fff;
        transition: transform .18s ease, background .18s ease, border-radius .18s ease;
    }

    .sc-shutter:active .sc-shutter-dot {
        transform: scale(.9);
    }

    .sc-shutter[disabled] {
        opacity: .45;
    }

    /* Запис: кільце — поступ до межі тривалості, крапка — червона. */
    .sc-shutter.is-rec .sc-shutter-ring {
        transform: scale(1.18);
        border: 0;
        background: conic-gradient(#F43F75 calc(var(--rp) * 1turn), rgba(255, 255, 255, .35) 0);
        -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 6px), #000 calc(100% - 5px));
        mask: radial-gradient(farthest-side, transparent calc(100% - 6px), #000 calc(100% - 5px));
    }

    .sc-shutter.is-rec .sc-shutter-dot {
        transform: scale(.48);
        border-radius: 22%;
        background: #F43F75;
    }

    .sc-hint {
        position: absolute;
        left: var(--fx);
        width: var(--fw);
        top: calc(var(--fy) + var(--fh));
        height: 64px;
        display: none;
        align-items: center;
        justify-content: center;
        padding: 0 16px;
        box-sizing: border-box;
        font-size: 13px;
        color: rgba(255, 255, 255, .62);
        text-align: center;
    }

    .sc.is-cam .sc-hint {
        display: flex;
    }

    .sc.is-cam .sc-actions,
    .sc.is-cam .sc-foot {
        display: none;
    }

    /* ---------------------------------------------- верх: хрестик і знаряддя */
    .sc-top {
        position: absolute;
        left: 0;
        right: 0;
        top: 0;
        z-index: 4;
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        padding: 12px 12px 30px;
        background: linear-gradient(to bottom, rgba(0, 0, 0, .3), rgba(0, 0, 0, 0));
        pointer-events: none;
        transition: background .25s ease;
    }

    .sc-top > *,
    .sc-tools > * {
        pointer-events: auto;
    }

    .sc-tools {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        gap: 10px;
    }

    .sc-tool {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 0;
        border: 0;
        background: none;
        color: inherit;
        font: inherit;
        cursor: pointer;
    }

    .sc-tool[hidden] {
        display: none;
    }

    .sc-tl {
        font-size: 14px;
        font-weight: 650;
        white-space: nowrap;
        color: #fff;
        text-shadow: 0 1px 3px rgba(0, 0, 0, .6);
        transition: color .2s ease;
    }

    /* Кнопки — «рідке скло», як у новій iOS: на темному фото світле
       (видно й на чорному), на світлому — темне; розмиття під ним, світлий
       відблиск по краю. Прозоре темне на чорному власник не бачив. */
    .sc-ibtn {
        flex: 0 0 auto;
        width: 44px;
        height: 44px;
        display: grid;
        place-items: center;
        padding: 0;
        border: 0;
        border-radius: 50%;
        background: rgba(255, 255, 255, .66);
        color: #111;
        box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .45), inset 0 1px 1px rgba(255, 255, 255, .7), 0 2px 10px rgba(0, 0, 0, .2);
        -webkit-backdrop-filter: blur(14px) saturate(180%);
        backdrop-filter: blur(14px) saturate(180%);
        cursor: pointer;
        transition: background .2s ease, color .2s ease;
    }

    .sc-ibtn[hidden] {
        display: none;
    }

    .sc-ibtn svg {
        width: 22px;
        height: 22px;
    }

    .sc-tool:active .sc-ibtn,
    .sc-ibtn:active {
        transform: scale(.92);
    }

    .sc svg {
        fill: none;
        stroke: currentColor;
        stroke-width: 2;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    .sc-aa {
        font-size: 18px;
        font-weight: 750;
        letter-spacing: -.02em;
    }

    /* Світле фото — кружки темні з білим значком, підписи темні. */
    .sc.is-light-top .sc-top {
        background: linear-gradient(to bottom, rgba(255, 255, 255, .28), rgba(255, 255, 255, 0));
    }

    .sc.is-light-top .sc-top .sc-ibtn {
        background: rgba(24, 24, 28, .52);
        color: #fff;
        box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22), inset 0 1px 1px rgba(255, 255, 255, .3), 0 2px 10px rgba(0, 0, 0, .14);
    }

    .sc.is-light-top .sc-tl {
        color: #111;
        text-shadow: 0 0 6px rgba(255, 255, 255, .8);
    }

    .sc-trash {
        position: absolute;
        left: 50%;
        bottom: 26px;
        z-index: 5;
        width: 56px;
        height: 56px;
        margin-left: -28px;
        display: grid;
        place-items: center;
        border-radius: 50%;
        background: rgba(0, 0, 0, .45);
        transition: transform .15s ease, background .15s ease;
        pointer-events: none;
    }

    .sc-trash[hidden] {
        display: none;
    }

    .sc-trash svg {
        width: 24px;
        height: 24px;
    }

    .sc-trash.is-hot {
        transform: scale(1.18);
        background: #EF4444;
    }

    /* ------------------------------------------------- низ кадру: підпис */
    .sc-foot {
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 3;
        display: flex;
        flex-direction: column;
        gap: 10px;
        padding: 44px 12px 12px;
        background: linear-gradient(to top, rgba(0, 0, 0, .45), rgba(0, 0, 0, 0));
        transition: transform .2s ease;
    }

    .sc.is-dragging .sc-foot,
    .sc.is-dragging .sc-top {
        opacity: 0;
        transition: opacity .15s ease;
    }

    .sc-thumbs {
        display: flex;
        gap: 8px;
        padding: 2px 2px 0;
        overflow-x: auto;
        scrollbar-width: none;
        touch-action: pan-x;
    }

    .sc-thumbs[hidden] {
        display: none;
    }

    .sc-thumbs::-webkit-scrollbar {
        display: none;
    }

    .sc-th {
        position: relative;
        flex: 0 0 auto;
        width: 50px;
        height: 84px;
        padding: 0;
        overflow: hidden;
        border: 0;
        border-radius: 10px;
        background: #2a2a2e center / cover no-repeat;
        cursor: pointer;
        box-shadow: 0 0 0 1px rgba(255, 255, 255, .18);
        transition: box-shadow .15s ease, transform .15s ease;
    }

    .sc-th.is-on {
        box-shadow: 0 0 0 2.5px #fff;
    }

    .sc-th:active {
        transform: scale(.95);
    }

    /* Прибрати — помітна біла кнопка в куті, не дрібний хрестик на фото. */
    .sc-th-x {
        position: absolute;
        right: 3px;
        top: 3px;
        width: 22px;
        height: 22px;
        display: grid;
        place-items: center;
        border-radius: 50%;
        background: #fff;
        color: #111;
        box-shadow: 0 1px 4px rgba(0, 0, 0, .45);
    }

    .sc-th-x::before {
        content: '';
        position: absolute;
        inset: -8px;
    }

    .sc-th-x svg {
        width: 13px;
        height: 13px;
        stroke-width: 3;
    }

    .sc-th.is-video::after {
        content: '';
        position: absolute;
        left: 5px;
        bottom: 5px;
        border-left: 8px solid #fff;
        border-top: 5px solid transparent;
        border-bottom: 5px solid transparent;
        filter: drop-shadow(0 0 2px rgba(0, 0, 0, .7));
    }

    .sc-trim[hidden] {
        display: none;
    }

    .sc-trim-track {
        position: relative;
        height: 46px;
        border-radius: 10px;
        overflow: hidden;
        background: rgba(255, 255, 255, .12);
        touch-action: none;
    }

    .sc-trim-tiles {
        position: absolute;
        inset: 0;
        display: flex;
        opacity: .55;
    }

    .sc-trim-tiles > span {
        flex: 1 1 0;
        background: center / cover no-repeat;
    }

    .sc-trim-win {
        position: absolute;
        top: 0;
        bottom: 0;
        left: 0;
        border: 3px solid #fff;
        border-radius: 10px;
        box-shadow: 0 0 0 999px rgba(0, 0, 0, .35);
        cursor: grab;
        background: transparent;
    }

    .sc-trim-win > i {
        position: absolute;
        top: 50%;
        width: 3px;
        height: 16px;
        margin-top: -8px;
        border-radius: 2px;
        background: #fff;
    }

    .sc-trim-win > i:first-child {
        left: 4px;
    }

    .sc-trim-win > i:last-child {
        right: 4px;
    }

    .sc-trim-label {
        margin-top: 6px;
        font-size: 12px;
        text-align: center;
        color: rgba(255, 255, 255, .85);
        font-variant-numeric: tabular-nums;
    }

    .sc-cap-wrap {
        position: relative;
    }

    .sc-cap-wrap[hidden] {
        display: none;
    }

    .sc-cap {
        display: block;
        width: 100%;
        min-height: 44px;
        max-height: 120px;
        box-sizing: border-box;
        padding: 11px 16px;
        border: 0;
        border-radius: 22px;
        background: rgba(255, 255, 255, .66);
        color: #111;
        box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .45), inset 0 1px 1px rgba(255, 255, 255, .7), 0 2px 8px rgba(0, 0, 0, .16);
        -webkit-backdrop-filter: blur(14px) saturate(180%);
        backdrop-filter: blur(14px) saturate(180%);
        font: inherit;
        font-size: 15px;
        line-height: 22px;
        resize: none;
        outline: none;
        touch-action: manipulation;
        transition: background .2s ease, color .2s ease, border-color .2s ease;
    }

    /* Підпис — «скло» без рамки, як кнопки й поле відповіді в перегляді. */
    .sc-cap::placeholder {
        color: rgba(0, 0, 0, .55);
    }

    .sc.is-light-bot .sc-foot {
        background: linear-gradient(to top, rgba(255, 255, 255, .3), rgba(255, 255, 255, 0));
    }

    .sc.is-light-bot .sc-cap {
        background: rgba(24, 24, 28, .52);
        color: #fff;
        box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22), inset 0 1px 1px rgba(255, 255, 255, .3), 0 2px 8px rgba(0, 0, 0, .12);
    }

    .sc.is-light-bot .sc-cap::placeholder {
        color: rgba(255, 255, 255, .72);
    }

    .sc-count {
        position: absolute;
        right: 12px;
        bottom: -17px;
        font-size: 11px;
        color: rgba(255, 255, 255, .8);
    }

    .sc-count.is-over {
        color: #FCA5A5;
    }

    /* ------------------------------------- під кадром: куди опублікувати */
    .sc-actions {
        position: absolute;
        left: var(--fx);
        width: var(--fw);
        top: calc(var(--fy) + var(--fh));
        z-index: 6;
        display: flex;
        align-items: center;
        gap: 8px;
        height: 64px;
        padding: 10px 10px;
        box-sizing: border-box;
    }

    .sc-share {
        flex: 1 1 0;
        min-width: 0;
        height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 7px;
        padding: 0 10px 0 7px;
        border: 0;
        border-radius: 22px;
        background: #29292d;
        color: #fff;
        font: inherit;
        font-size: 14px;
        font-weight: 650;
        white-space: nowrap;
        cursor: pointer;
        transition: background .15s ease, transform .15s ease;
    }

    .sc-share:active {
        transform: scale(.97);
        background: #333338;
    }

    .sc-share > span:last-child {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .sc-share img,
    .sc-star {
        flex: 0 0 auto;
        width: 26px;
        height: 26px;
        object-fit: cover;
        -webkit-mask-image: var(--avatar-squircle);
        mask-image: var(--avatar-squircle);
        -webkit-mask-size: 100% 100%;
        mask-size: 100% 100%;
    }

    .sc-star {
        display: grid;
        place-items: center;
        border-radius: 50%;
        background: #1FBF5B;
        -webkit-mask-image: none;
        mask-image: none;
    }

    .sc .sc-star svg {
        width: 15px;
        height: 15px;
        fill: #fff;
        stroke: none;
    }

    .sc-share .sc-aud-i {
        width: 15px;
        height: 15px;
        flex: 0 0 auto;
        opacity: .75;
    }

    .sc-share.is-busy {
        opacity: .7;
        pointer-events: none;
    }

    .sc-go {
        flex: 0 0 auto;
        width: 44px;
        height: 44px;
        display: grid;
        place-items: center;
        padding: 0;
        border: 0;
        border-radius: 50%;
        background: #8849FE;
        color: #fff;
        cursor: pointer;
    }

    .sc-go svg {
        width: 22px;
        height: 22px;
        stroke-width: 2.4;
    }

    .sc-go:active {
        transform: scale(.94);
    }

    .sc-actions.is-busy {
        pointer-events: none;
    }

    .sc-actions.is-busy .sc-go svg {
        animation: st-spin .8s linear infinite;
    }

    /* Напис: окремий шар над кадром із полем, кольорами й виглядом. Поки
       пишеш — усе інше ховається, як в Instagram. */
    .sc-text {
        position: absolute;
        inset: 0;
        z-index: 8;
        background: rgba(0, 0, 0, .6);
        touch-action: auto;
    }

    .sc-top,
    .sc-foot,
    .sc-actions {
        transition: opacity .18s ease;
    }

    .sc.is-texting .sc-top,
    .sc.is-texting .sc-foot,
    .sc.is-texting .sc-actions,
    .sc.is-texting .sc-ov {
        opacity: 0;
        pointer-events: none;
    }

    .sc-text[hidden] {
        display: none;
    }

    .sc-text-top {
        position: absolute;
        left: var(--fx);
        width: var(--fw);
        top: calc(var(--fy) + 12px);
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0 12px;
        box-sizing: border-box;
    }

    .sc-done {
        height: 38px;
        padding: 0 16px;
        border: 0;
        border-radius: 19px;
        background: #fff;
        color: #111;
        font: inherit;
        font-size: 15px;
        font-weight: 700;
        cursor: pointer;
    }

    .sc-text-left {
        display: flex;
        gap: 10px;
    }

    .sc-style .sc-st {
        display: grid;
        place-items: center;
        width: 24px;
        height: 24px;
        box-sizing: border-box;
        border-radius: 6px;
        font-size: 15px;
        font-weight: 800;
        border: 2px solid currentColor;
    }

    .sc-text-stage {
        position: absolute;
        left: var(--fx);
        width: var(--fw);
        top: calc(var(--fy) + var(--fh) * .28);
        display: flex;
        justify-content: center;
        --ow: var(--fw);
    }

    .sc-text-input.sv-tx {
        position: relative;
        width: auto;
        min-width: 40px;
        field-sizing: content;
        border: 0;
        outline: none;
        resize: none;
        overflow: hidden;
        font-family: inherit;
        caret-color: #fff;
        background: transparent;
        transform: none;
    }

    .sc-text-input::placeholder {
        color: rgba(255, 255, 255, .55);
    }

    .sc-colors {
        position: absolute;
        left: var(--fx);
        width: var(--fw);
        bottom: 18px;
        display: flex;
        justify-content: center;
        gap: 10px;
        padding: 0 10px;
        box-sizing: border-box;
    }

    .sc-colors button {
        width: 30px;
        height: 30px;
        padding: 0;
        border: 2.5px solid #fff;
        border-radius: 50%;
        cursor: pointer;
        box-shadow: 0 1px 4px rgba(0, 0, 0, .3);
        transition: transform .12s ease;
    }

    .sc-colors button.is-on {
        transform: scale(1.22);
    }

    /* ------------------------------------------------ «Близькі друзі» */
    .sc-cf {
        position: absolute;
        inset: 0;
        z-index: 9;
        background: rgba(0, 0, 0, .5);
        touch-action: auto;
        animation: sc-dim .2s ease;
    }

    .sc-cf[hidden] {
        display: none;
    }

    @keyframes sc-dim {
        from { background: rgba(0, 0, 0, 0); }
    }

    .sc-cf-card {
        position: absolute;
        left: var(--fx);
        width: var(--fw);
        bottom: 0;
        height: min(82%, 660px);
        display: flex;
        flex-direction: column;
        border-radius: 20px 20px 0 0;
        background: var(--card-bg, #fff);
        color: var(--text-primary, #111);
        animation: sc-up .28s cubic-bezier(.2, .8, .2, 1);
    }

    @keyframes sc-up {
        from { transform: translateY(100%); }
    }

    .sc-cf-grip {
        width: 36px;
        height: 4px;
        margin: 8px auto 2px;
        border-radius: 2px;
        background: var(--border-color, #ddd);
    }

    .sc-cf-head {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 6px 12px 10px 16px;
    }

    .sc-cf-badge {
        width: 30px;
        height: 30px;
        display: grid;
        place-items: center;
        border-radius: 50%;
        background: #1FBF5B;
        color: #fff;
    }

    .sc .sc-cf-badge svg {
        width: 16px;
        height: 16px;
        fill: #fff;
        stroke: none;
    }

    .sc-cf-title {
        flex: 1 1 auto;
        min-width: 0;
        font-size: 16.5px;
        font-weight: 700;
    }

    .sc-cf-title small {
        display: block;
        font-size: 12.5px;
        font-weight: 500;
        color: var(--text-secondary, #6b7280);
    }

    .sc-cf-done {
        height: 36px;
        padding: 0 16px;
        border: 0;
        border-radius: 18px;
        background: #8849FE;
        color: #fff;
        font: inherit;
        font-size: 14.5px;
        font-weight: 700;
        cursor: pointer;
    }

    .sc-cf-search {
        display: flex;
        align-items: center;
        gap: 8px;
        margin: 0 14px;
        height: 40px;
        padding: 0 12px;
        border-radius: 12px;
        background: var(--bg-secondary, #f2f3f5);
        color: var(--text-secondary, #6b7280);
    }

    .sc-cf-sicon svg {
        width: 18px;
        height: 18px;
        display: block;
    }

    .sc-cf-search input {
        flex: 1 1 auto;
        min-width: 0;
        height: 100%;
        border: 0;
        background: none;
        color: var(--text-primary, #111);
        font: inherit;
        font-size: 15px;
        outline: none;
    }

    .sc-cf-hint {
        padding: 8px 18px 4px;
        font-size: 12.5px;
        color: var(--text-secondary, #6b7280);
    }

    .sc-cf-list {
        flex: 1 1 auto;
        overflow-y: auto;
        overscroll-behavior: contain;
        padding: 4px 8px 20px;
        touch-action: pan-y;
    }

    .sc-cf-row {
        display: flex;
        align-items: center;
        gap: 12px;
        width: 100%;
        padding: 8px 10px;
        border: 0;
        border-radius: 14px;
        background: none;
        color: inherit;
        font: inherit;
        text-align: left;
        cursor: pointer;
    }

    .sc-cf-row:active {
        background: var(--bg-secondary, #f4f4f4);
    }

    .sc-cf-row img {
        flex: 0 0 auto;
        width: 44px;
        height: 44px;
        object-fit: cover;
        -webkit-mask-image: var(--avatar-squircle);
        mask-image: var(--avatar-squircle);
        -webkit-mask-size: 100% 100%;
        mask-size: 100% 100%;
        background: var(--bg-secondary, #eee);
    }

    .sc-cf-text {
        flex: 1 1 auto;
        min-width: 0;
        display: flex;
        flex-direction: column;
    }

    .sc-cf-text b,
    .sc-cf-text i {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .sc-cf-text b {
        font-size: 14.5px;
        font-weight: 600;
    }

    .sc-cf-text i {
        font-size: 12.5px;
        font-style: normal;
        color: var(--text-secondary, #6b7280);
    }

    .sc-cf-check {
        flex: 0 0 auto;
        width: 26px;
        height: 26px;
        display: grid;
        place-items: center;
        border: 2px solid var(--border-color, #d1d5db);
        border-radius: 50%;
        box-sizing: border-box;
        color: #fff;
        transition: background .15s ease, border-color .15s ease, transform .15s ease;
    }

    .sc-cf-check svg {
        width: 15px;
        height: 15px;
        stroke-width: 3;
        opacity: 0;
    }

    .sc-cf-row.is-on .sc-cf-check {
        border-color: #1FBF5B;
        background: #1FBF5B;
        transform: scale(1.06);
    }

    .sc-cf-row.is-on .sc-cf-check svg {
        opacity: 1;
    }

    .sc-cf-empty {
        padding: 40px 20px;
        text-align: center;
        font-size: 14px;
        color: var(--text-secondary, #6b7280);
    }

    .sc-drop {
        position: absolute;
        inset: 16px;
        z-index: 10;
        display: grid;
        place-items: center;
        border: 2px dashed rgba(255, 255, 255, .7);
        border-radius: 22px;
        background: rgba(136, 73, 254, .25);
        font-size: 16px;
        font-weight: 600;
        pointer-events: none;
    }

    .sc-drop[hidden] {
        display: none;
    }

    @media (prefers-reduced-motion: reduce) {
        .sc-frame,
        .sc-back {
            transition-duration: .01s;
        }
    }


        .feed-caught {
            display: flex;
            flex-direction: column;
            align-items: center;
            margin: 0 0 12px;
            padding: 6px 4px;
            text-align: center;
        }

        .fc-top {
            display: flex;
            align-items: center;
            gap: 14px;
            width: 100%;
            margin-bottom: 12px;
        }

        .fc-line {
            flex: 1 1 0;
            height: 1px;
            background: var(--border-color);
        }

        .fc-ico {
            flex: 0 0 auto;
            width: 56px;
            height: 56px;
        }

        .fc-ico svg {
            display: block;
            width: 100%;
            height: 100%;
        }

        .fc-tick {
            stroke-dasharray: 32;
            stroke-dashoffset: 0;
        }

        .feed-caught.is-wait .fc-tick {
            stroke-dashoffset: 32;
        }

        .feed-caught.is-in .fc-tick {
            transition: stroke-dashoffset .55s cubic-bezier(.65, 0, .35, 1) .1s;
        }

        .fc-title {
            font-size: 17px;
            font-weight: 700;
            line-height: 1.3;
            color: var(--text-primary);
        }

        .fc-text {
            max-width: 300px;
            margin-top: 4px;
            font-size: 13.5px;
            line-height: 1.4;
            color: var(--text-secondary);
        }

        .fc-next {
            margin-top: 12px;
            font-size: 13px;
            font-weight: 600;
            color: var(--accent-color);
        }

        .feed-earlier {
            display: flex;
            align-items: center;
            gap: 12px;
            margin: 2px 0 14px;
            font-size: 13px;
            font-weight: 600;
            color: var(--text-secondary);
        }

        .feed-earlier::before,
        .feed-earlier::after {
            content: '';
            flex: 1 1 0;
            height: 1px;
            background: var(--border-color);
        }

        @media (prefers-reduced-motion: reduce) {
            .feed-caught.is-wait .fc-tick {
                stroke-dashoffset: 0;
            }
        }
    

    .media-viewer {
        position: fixed;
        inset: 0;
        z-index: 2000;
        display: none;
        background: rgba(0, 0, 0, .95);
        overscroll-behavior: contain;
        -webkit-user-select: none;
        user-select: none;
    }

    .media-viewer.active {
        display: block;
        animation: mv-in .18s ease-out;
    }

    @keyframes mv-in {
        from {
            opacity: 0;
        }
    }

    /* Свайп униз закриває (як в Instagram): тло тьмяніє разом із пальцем. */
    .media-viewer.is-dragging-down {
        background: rgba(0, 0, 0, var(--mv-bg, .95));
    }

    /* The strip of three. It sits one slide to the left so the middle one is
       the one on screen; every drag is measured from there. */
    .media-viewer-track {
        position: absolute;
        inset: 0;
        display: flex;
        will-change: transform;
        transform: translate3d(-100%, 0, 0);
        touch-action: pan-y;
    }

    .media-viewer-track.is-settling {
        transition: transform .26s cubic-bezier(.22, .61, .36, 1);
    }

    .media-viewer-slide {
        flex: 0 0 100%;
        width: 100%;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 56px 16px calc(56px + env(safe-area-inset-bottom, 0px));
    }

    .media-viewer-slide img {
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
        border-radius: 8px;
        display: block;
    }

    .media-viewer-slide video {
        max-width: 100%;
        max-height: 100%;
        border-radius: 8px;
        display: block;
        background: #000;
    }

    .media-viewer-slide video[hidden] {
        display: none;
    }

    /* A slide with nothing in it — the outer neighbours of a set of one. */
    .media-viewer-slide img:not([src]),
    .media-viewer-slide img[src=""] {
        display: none;
    }

    .media-viewer-close,
    .media-viewer-nav {
        position: absolute;
        z-index: 2;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0;
        border: none;
        border-radius: 50%;
        /* Темне «рідке скло» (власник, 20.10.2026): розмиття фото під кнопкою,
           світлий відблиск по краю. */
        background: rgba(40, 40, 46, .42);
        box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18), inset 0 1px 1px rgba(255, 255, 255, .3), 0 2px 10px rgba(0, 0, 0, .2);
        -webkit-backdrop-filter: blur(14px) saturate(180%);
        backdrop-filter: blur(14px) saturate(180%);
        color: #fff;
        cursor: pointer;
        transition: background .2s;
        -webkit-tap-highlight-color: transparent;
    }

    .media-viewer-close:hover,
    .media-viewer-nav:hover,
    .media-viewer-dl:hover {
        background: rgba(60, 60, 68, .55);
    }

    .media-viewer-close:active,
    .media-viewer-nav:active {
        background: rgba(255, 255, 255, .3);
    }

    .media-viewer-close {
        top: calc(14px + env(safe-area-inset-top, 0px));
        right: 14px;
        width: 40px;
        height: 40px;
    }

    .media-viewer-close svg {
        width: 22px;
        height: 22px;
    }

    .media-viewer-nav {
        top: 50%;
        margin-top: -24px;
        width: 48px;
        height: 48px;
    }

    .media-viewer-nav svg {
        width: 26px;
        height: 26px;
    }

    .media-viewer-nav.prev {
        left: 14px;
    }

    .media-viewer-nav.next {
        right: 14px;
    }

    /* On a phone the arrows are in the way of the picture and the swipe does
       the same job better. */
    @media (max-width: 640px) {
        .media-viewer-nav {
            display: none;
        }
    }

    /* A viewer holding a single picture has nothing to step to, so the arrows
       and the counter are not drawn at all. Leaving them there and letting them
       loop back to the same photograph is a control that lies about what it
       does. */
    .media-viewer.is-single .media-viewer-nav,
    .media-viewer.is-single .media-viewer-count {
        display: none;
    }

    /* Лічильник — скляна таблетка вгорі ліворуч (знизу тепер смуга плеєра). */
    .media-viewer-count {
        position: absolute;
        left: 14px;
        top: calc(19px + env(safe-area-inset-top, 0px));
        z-index: 2;
        padding: 9px 13px;
        border-radius: 999px;
        background: rgba(40, 40, 46, .42);
        box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18), inset 0 1px 1px rgba(255, 255, 255, .3);
        -webkit-backdrop-filter: blur(14px) saturate(180%);
        backdrop-filter: blur(14px) saturate(180%);
        color: #fff;
        font-size: 13px;
        font-weight: 600;
        line-height: 1;
        font-variant-numeric: tabular-nums;
        pointer-events: none;
    }

    /* «Скачати» — та сама скляна кнопка, що й хрестик, ліворуч від нього. */
    .media-viewer-dl {
        position: absolute;
        top: calc(14px + env(safe-area-inset-top, 0px));
        right: 62px;
        z-index: 2;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        padding: 0;
        border: none;
        border-radius: 50%;
        background: rgba(40, 40, 46, .42);
        box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18), inset 0 1px 1px rgba(255, 255, 255, .3), 0 2px 10px rgba(0, 0, 0, .2);
        -webkit-backdrop-filter: blur(14px) saturate(180%);
        backdrop-filter: blur(14px) saturate(180%);
        color: #fff;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }

    .media-viewer-dl svg {
        width: 20px;
        height: 20px;
    }

    .media-viewer.is-video .media-viewer-dl {
        display: none;
    }

    /* ---------------------------------------------------------- плеєр */
    .mv-play {
        position: absolute;
        left: 50%;
        top: 50%;
        z-index: 3;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 72px;
        height: 72px;
        margin: -36px 0 0 -36px;
        padding: 0 0 0 4px;
        border: none;
        border-radius: 50%;
        background: rgba(40, 40, 46, .38);
        box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2), inset 0 1px 1px rgba(255, 255, 255, .32), 0 6px 20px rgba(0, 0, 0, .25);
        -webkit-backdrop-filter: blur(14px) saturate(180%);
        backdrop-filter: blur(14px) saturate(180%);
        color: #fff;
        cursor: pointer;
        animation: mv-pop .22s cubic-bezier(.3, 1.4, .5, 1);
        -webkit-tap-highlight-color: transparent;
    }

    .mv-play[hidden] {
        display: none;
    }

    .mv-play svg {
        width: 32px;
        height: 32px;
    }

    @keyframes mv-pop {
        from {
            opacity: 0;
            transform: scale(.7);
        }
    }

    .mv-ctrl {
        position: absolute;
        left: 50%;
        bottom: calc(14px + env(safe-area-inset-bottom, 0px));
        z-index: 3;
        display: flex;
        align-items: center;
        gap: 10px;
        width: min(560px, calc(100% - 28px));
        height: 48px;
        padding: 0 8px;
        border-radius: 24px;
        background: rgba(40, 40, 46, .42);
        box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16), inset 0 1px 1px rgba(255, 255, 255, .26), 0 6px 20px rgba(0, 0, 0, .25);
        -webkit-backdrop-filter: blur(16px) saturate(180%);
        backdrop-filter: blur(16px) saturate(180%);
        color: #fff;
        transform: translateX(-50%);
        transition: opacity .25s ease, transform .25s ease;
    }

    .mv-ctrl[hidden] {
        display: none;
    }

    .media-viewer.mv-idle .mv-ctrl {
        opacity: 0;
        transform: translate(-50%, 8px);
        pointer-events: none;
    }

    .mv-btn {
        flex: 0 0 auto;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        padding: 0;
        border: none;
        border-radius: 50%;
        background: transparent;
        color: #fff;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }

    .mv-btn:active {
        background: rgba(255, 255, 255, .14);
    }

    .mv-btn svg {
        width: 22px;
        height: 22px;
    }

    #mvToggle .mv-i-pause,
    .media-viewer.mv-playing #mvToggle .mv-i-play,
    #mvMute .mv-i-mute,
    .media-viewer.mv-muted #mvMute .mv-i-vol {
        display: none;
    }

    .media-viewer.mv-playing #mvToggle .mv-i-pause,
    .media-viewer.mv-muted #mvMute .mv-i-mute {
        display: block;
    }

    .mv-time {
        flex: 0 0 auto;
        min-width: 34px;
        font-size: 12.5px;
        font-weight: 600;
        font-variant-numeric: tabular-nums;
        text-align: center;
        opacity: .92;
    }

    /* Доріжка: тонка, на дотик товстішає; кружечок — лише поки тягнеш. */
    .mv-seek {
        position: relative;
        flex: 1 1 auto;
        height: 28px;
        cursor: pointer;
        touch-action: none;
    }

    .mv-seek::before,
    .mv-seek-buf,
    .mv-seek-fill {
        position: absolute;
        left: 0;
        top: 50%;
        height: 4px;
        margin-top: -2px;
        border-radius: 2px;
        transition: height .15s, margin .15s;
    }

    .mv-seek::before {
        content: '';
        right: 0;
        background: rgba(255, 255, 255, .25);
    }

    .mv-seek-buf {
        width: 0;
        background: rgba(255, 255, 255, .35);
    }

    .mv-seek-fill {
        width: 0;
        background: #fff;
    }

    .mv-seek-fill i {
        position: absolute;
        right: -7px;
        top: 50%;
        width: 14px;
        height: 14px;
        margin-top: -7px;
        border-radius: 50%;
        background: #fff;
        box-shadow: 0 1px 4px rgba(0, 0, 0, .3);
        transform: scale(0);
        transition: transform .15s;
    }

    .mv-seek.is-seeking::before,
    .mv-seek.is-seeking .mv-seek-buf,
    .mv-seek.is-seeking .mv-seek-fill {
        height: 6px;
        margin-top: -3px;
    }

    .mv-seek.is-seeking .mv-seek-fill i,
    .mv-seek:hover .mv-seek-fill i {
        transform: scale(1);
    }

    /* Кінець відео в картці (власник 20.10.2026, як в Instagram): не по колу,
       а затемнений останній кадр, «Більше відео Reels» і «Дивитися знову». */
    .fv-end {
        position: absolute;
        inset: 0;
        /* Над відео, але під шапкою картки (.pc2-head — 2) і її кнопками:
           «Підписатися» й ⋮ лишаються живими. */
        z-index: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 14px;
        background: rgba(0, 0, 0, .45);
        cursor: default;
        animation: fv-end-in .25s ease both;
    }

    @keyframes fv-end-in {
        from {
            opacity: 0;
        }
    }

    .fv-end-more {
        display: inline-flex;
        align-items: center;
        gap: 10px;
        padding: 12px 22px 12px 18px;
        border: 0;
        border-radius: 14px;
        background: #fff;
        color: #111827;
        font: inherit;
        font-size: 15px;
        font-weight: 600;
        line-height: 1.2;
        box-shadow: 0 6px 20px rgba(0, 0, 0, .22);
        cursor: pointer;
        transition: transform .15s ease;
    }

    .fv-end-more svg {
        width: 22px;
        height: 22px;
        flex: 0 0 auto;
    }

    .fv-end-again {
        padding: 6px 12px;
        border: 0;
        background: none;
        color: #fff;
        font: inherit;
        font-size: 15px;
        font-weight: 600;
        text-shadow: 0 1px 3px rgba(0, 0, 0, .45);
        cursor: pointer;
        transition: transform .15s ease;
    }

    .fv-end-more:active,
    .fv-end-again:active {
        transform: scale(.95);
    }

    .fv-end button:focus {
        outline: none;
    }

    .fv-end button:focus-visible {
        outline: 2px solid #fff;
        outline-offset: 2px;
    }

    /* Звучне відео стрічки (FeedVideo) — з'являється з першим кадром. */
    .post-video.is-playing > video.fv-snd:not(.is-on),
    .post-video > video.fv-snd:not(.is-on) {
        opacity: 0;
    }

    .post-video > video.fv-snd.is-on {
        opacity: 1;
    }


        /* Без резерву ширини (власник, 19.10.2026: «не робити фікс-блок, хай
           краще змінюється розмір колонок, поверни як було»): лічильник займає
           рівно стільки, скільки його цифри, і сусіди посуваються разом із ним.
           Барабан лишається. */
        .post-action-btn .count,
        .post-views .count,
        .rc {
            display: inline-block;
            white-space: nowrap;
        }

        .rc-c {
            position: relative;
            display: inline-block;
        }

        .rc-o {
            position: absolute;
            left: 0;
            top: 0;
        }

        .rc-up .rc-n { animation: rcInUp .26s cubic-bezier(.25, .8, .25, 1) both; }
        .rc-up .rc-o { animation: rcOutUp .26s cubic-bezier(.25, .8, .25, 1) both; }
        .rc-down .rc-n { animation: rcInDown .26s cubic-bezier(.25, .8, .25, 1) both; }
        .rc-down .rc-o { animation: rcOutDown .26s cubic-bezier(.25, .8, .25, 1) both; }

        @keyframes rcInUp { from { transform: translateY(.62em); opacity: 0; } to { transform: none; opacity: 1; } }
        @keyframes rcOutUp { from { transform: none; opacity: 1; } to { transform: translateY(-.62em); opacity: 0; } }
        @keyframes rcInDown { from { transform: translateY(-.62em); opacity: 0; } to { transform: none; opacity: 1; } }
        @keyframes rcOutDown { from { transform: none; opacity: 1; } to { transform: translateY(.62em); opacity: 0; } }

        @media (prefers-reduced-motion: reduce) {
            .rc-c .rc-n, .rc-c .rc-o { animation: none !important; }
            .rc-c .rc-o { display: none; }
        }
    

        .lk-veil {
            position: fixed;
            inset: 0;
            /* Під ActionSheet (1500): «Ви підписані» в рядку відкриває його поверх. */
            z-index: 1400;
            display: none;
            align-items: flex-end;
            justify-content: center;
            background-color: rgba(10, 10, 15, 0);
            transition: background-color .22s ease;
            -webkit-tap-highlight-color: transparent;
        }

        .lk-veil.is-open {
            display: flex;
        }

        .lk-veil.is-shown {
            background-color: rgba(10, 10, 15, .45);
        }

        .lk-wrap {
            display: flex;
            flex-direction: column;
            width: 100%;
            max-width: 520px;
            /* Висота — за вмістом, але не нижче середини екрана (власник:
               «мінімум до середини, навіть якщо лайк один»). */
            min-height: min(50vh, 640px);
            max-height: min(72vh, 640px);
            padding-bottom: env(safe-area-inset-bottom, 0px);
            border-radius: 18px 18px 0 0;
            background: var(--as-card, #fff);
            transform: translateY(101%);
            transition: transform .26s cubic-bezier(.2, .9, .3, 1);
        }

        .lk-veil.is-shown .lk-wrap {
            transform: none;
        }

        .lk-wrap:focus {
            outline: none;
        }

        .lk-head {
            position: relative;
            flex: 0 0 auto;
            padding: 0 52px 12px;
            border-bottom: 1px solid var(--as-line, #E6E7EB);
            text-align: center;
        }

        .lk-head .as-grip {
            margin-bottom: 10px;
        }

        .lk-title {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            font-size: 16px;
            font-weight: 700;
            color: var(--as-text, #111827);
        }

        /* Лічильник — на кольоровій таблетці. */
        .lk-title span {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-width: 24px;
            height: 22px;
            padding: 0 8px;
            border-radius: 999px;
            background: rgba(136, 73, 254, .12);
            color: var(--as-accent, #8849FE);
            font-size: 13px;
            font-weight: 700;
            font-variant-numeric: tabular-nums;
        }

        .lk-title span:empty {
            display: none;
        }

        body.dark .lk-title span {
            background: rgba(168, 85, 247, .18);
            color: #C4A1FF;
        }

        /* Хрестик — і з телефона, і з ПК. */
        .lk-close {
            position: absolute;
            right: 12px;
            bottom: 7px;
            display: flex;
            align-items: center;
            justify-content: center;
            width: 32px;
            height: 32px;
            padding: 0;
            border: 0;
            border-radius: 50%;
            background: var(--as-tint, #EEF0F3);
            color: var(--as-text, #111827);
            cursor: pointer;
        }

        .lk-close svg {
            width: 18px;
            height: 18px;
        }

        .lk-list {
            flex: 0 1 auto;
            min-height: 0;
            overflow-y: auto;
            overscroll-behavior: contain;
            padding: 6px 0 10px;
        }

        .lk-row {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 8px 16px;
        }

        .lk-link {
            display: flex;
            flex: 1 1 auto;
            align-items: center;
            gap: 12px;
            min-width: 0;
            color: inherit;
            text-decoration: none;
            -webkit-tap-highlight-color: transparent;
        }

        /* Обличчя: сіра форма стоїть одразу, картинка в ній проявляється,
           коли приїхала. */
        .lk-face {
            display: block;
            flex: 0 0 auto;
            width: 44px;
            height: 44px;
            overflow: hidden;
            border-radius: 28%;
            background: var(--as-hover, #E8EAEF);
            -webkit-mask-image: var(--avatar-squircle);
            mask-image: var(--avatar-squircle);
            -webkit-mask-size: 100% 100%;
            mask-size: 100% 100%;
        }

        .lk-face img {
            display: block;
            width: 100%;
            height: 100%;
            object-fit: cover;
            opacity: 0;
            transition: opacity .3s ease;
        }

        .lk-face img.is-ld {
            opacity: 1;
        }

        .lk-who {
            display: flex;
            flex-direction: column;
            gap: 2px;
            min-width: 0;
        }

        .lk-name {
            display: flex;
            align-items: center;
            gap: 4px;
            font-size: 15px;
            font-weight: 600;
            color: var(--as-text, #111827);
        }

        .lk-sub {
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            font-size: 13px;
            color: var(--as-sub, #6B7280);
        }

        .lk-row .follow-btn {
            flex: 0 0 auto;
        }

        /* Сірий рядок на місці того, що ще їде. */
        .lk-row.is-sk .lk-face,
        .lk-row.is-sk .lk-bar {
            background-color: #E5E7EB;
            background-image: linear-gradient(100deg, rgba(255, 255, 255, 0) 20%, rgba(255, 255, 255, .65) 50%, rgba(255, 255, 255, 0) 80%);
            background-size: 220% 100%;
            animation: img-shimmer 1.3s ease-in-out infinite;
        }

        .lk-bar {
            display: block;
            height: 11px;
            border-radius: 6px;
        }

        .lk-row.is-sk .lk-who {
            flex: 1 1 auto;
            gap: 8px;
        }

        .lk-row.is-sk .lk-bar:first-child {
            width: 46%;
        }

        .lk-row.is-sk .lk-bar:last-child {
            width: 28%;
        }

        body.dark .lk-row.is-sk .lk-face,
        body.dark .lk-row.is-sk .lk-bar {
            background-color: #262626;
            background-image: linear-gradient(100deg, rgba(255, 255, 255, 0) 20%, rgba(255, 255, 255, .09) 50%, rgba(255, 255, 255, 0) 80%);
        }

        .lk-empty {
            padding: 40px 24px;
            text-align: center;
            font-size: 14px;
            color: var(--as-sub, #6B7280);
        }

        @media (min-width: 1024px) {
            .lk-veil {
                align-items: center;
            }

            .lk-wrap {
                max-width: 420px;
                min-height: min(50vh, 560px);
                max-height: min(70vh, 560px);
                padding-bottom: 0;
                border-radius: 18px;
                box-shadow: 0 24px 64px rgba(0, 0, 0, .28);
                opacity: 0;
                transform: scale(.94);
                transition: opacity .18s ease, transform .2s cubic-bezier(.2, .9, .3, 1);
            }

            .lk-veil.is-shown .lk-wrap {
                opacity: 1;
                transform: none;
            }

            .lk-head {
                padding-top: 14px;
            }

            .lk-head .as-grip {
                display: none;
            }

            body.dark .lk-wrap {
                box-shadow: 0 24px 64px rgba(0, 0, 0, .6);
            }
        }

        @media (prefers-reduced-motion: reduce) {
            .lk-wrap,
            .lk-face img,
            .lk-row.is-sk .lk-face,
            .lk-row.is-sk .lk-bar {
                transition: none;
                animation: none;
            }
        }
    

        /* ------------------------------------------------ кнопка під дописом */
        /* Кнопка — така сама, як серце й коментар (36, значок 22, відступ 6;
           власник: «в алмаза наче більше простору»), виріз щільний: 8 + три
           кнопки по 36 + 4 («збільшив простір справа від кристала»). Числа на
           кнопці немає — скільки надіслали, видно рядком над описом (.pc2-gems
           нижче). */
        .pc2.has-star {
            --pc2-tab-w: 120px;
        }

        .pc2-star {
            position: relative;
        }

        .pc2-star .pc2-star-ico {
            position: relative;
            z-index: 1;
            display: block;
            width: 22px;
            height: 22px;
            transition: filter .25s ease;
        }

        /* ------------------------------------- «💎 12 кристалів від 3 людей»
           Рядок над описом (власник: «може в постах не треба лічильник, а гарно
           гармошкою виїжджає перший раз і завжди над описом — так буде
           крутіше»). Плашка тону кристала; порожній рядок згорнутий (is-shut),
           перший кристал розгортає його гармошкою, і по плашці пробігає
           відблиск. Дотик — вікно реакції з лідерами. */
        .pc2-gems {
            display: grid;
            grid-template-rows: 1fr;
            transition: grid-template-rows .55s cubic-bezier(.2, .9, .3, 1), opacity .4s ease;
        }

        .pc2-gems.is-shut {
            grid-template-rows: 0fr;
            opacity: 0;
        }

        .pc2-gems-in {
            min-height: 0;
            overflow: hidden;
        }

        .pc2-gems-row {
            position: relative;
            overflow: hidden;
            display: inline-flex;
            align-items: center;
            gap: 7px;
            max-width: 100%;
            margin: 6px 0 2px;
            padding: 5px 13px 5px 8px;
            box-sizing: border-box;
            border: 0;
            border-radius: 15px;
            background: color-mix(in srgb, var(--gem-c) 13%, transparent);
            color: var(--text-secondary);
            font: inherit;
            font-size: 13px;
            line-height: 1.35;
            text-align: left;
            -webkit-tap-highlight-color: transparent;
        }

        button.pc2-gems-row {
            cursor: pointer;
            transition: transform .15s ease;
        }

        button.pc2-gems-row:active {
            transform: scale(.97);
        }

        body.dark .pc2-gems-row {
            background: color-mix(in srgb, var(--gem-c) 18%, transparent);
        }

        .pc2-gems.is-new .pc2-gems-row::after {
            content: '';
            position: absolute;
            top: 0;
            bottom: 0;
            left: -60%;
            width: 45%;
            background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .55), transparent);
            transform: skewX(-18deg);
            animation: gstSweep 1.1s ease .35s 2 both;
            pointer-events: none;
        }

        body.dark .pc2-gems.is-new .pc2-gems-row::after {
            background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .18), transparent);
        }

        @keyframes gstSweep {
            from { left: -60%; }
            to { left: 130%; }
        }

        .pc2-gems-ico {
            position: relative;
            flex: 0 0 auto;
            width: 18px;
            height: 18px;
        }

        .pc2-gems-ico img {
            display: block;
            width: 18px;
            height: 18px;
        }

        /* Дві іскорки біля кристала в рядку — мерехтять. */
        .pc2-gems-ico i {
            position: absolute;
            width: 6px;
            height: 6px;
            background: var(--gem-c);
            clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%);
            animation: gstTwinkle 2.2s ease-in-out infinite;
        }

        .pc2-gems-ico i:nth-of-type(1) { right: -5px; top: -4px; }
        .pc2-gems-ico i:nth-of-type(2) { left: -4px; bottom: -3px; width: 5px; height: 5px; animation-delay: 1.1s; }

        .pc2-gems-t {
            min-width: 0;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .pc2-gems-t b {
            font-weight: 700;
        }

        /* Є хоч один кристал — навколо літають іскорки (власник: «маленькі
           зірочки щоб літали навколо»): три чотирипроменеві, як у вікні й на
           VIP, кружляють і мерехтять не в такт. */
        .pc2-gem-fx {
            position: absolute;
            left: 17px;
            top: 50%;
            display: none;
            width: 0;
            height: 0;
            pointer-events: none;
            animation: gstOrbit 7s linear infinite;
        }

        .pc2-star.has-gems .pc2-gem-fx {
            display: block;
        }

        .pc2-gem-fx i {
            position: absolute;
            left: 0;
            top: 0;
            width: var(--s);
            height: var(--s);
            margin: calc(var(--s) / -2) 0 0 calc(var(--s) / -2);
            transform: rotate(var(--a)) translateX(var(--r));
        }

        .pc2-gem-fx i::before {
            content: '';
            display: block;
            width: 100%;
            height: 100%;
            background: var(--c, var(--gem-c));
            clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%);
            animation: gstTwinkle 2.1s ease-in-out infinite;
            animation-delay: var(--d);
        }

        .pc2-gem-fx i:nth-child(1) { --a: 15deg; --r: 16px; --s: 7px; --d: 0s; }
        .pc2-gem-fx i:nth-child(2) { --a: 140deg; --r: 15px; --s: 6px; --d: .7s; --c: color-mix(in srgb, var(--gem-c) 55%, #fff); }
        .pc2-gem-fx i:nth-child(3) { --a: 255deg; --r: 17px; --s: 5px; --d: 1.4s; }

        @keyframes gstOrbit { to { transform: rotate(360deg); } }
        @keyframes gstTwinkle {
            0%, 100% { transform: scale(.15) rotate(0deg); opacity: 0; }
            50% { transform: scale(1) rotate(45deg); opacity: 1; }
        }

        /* Свої кристали на дописі — легке сяйво навколо. */
        .pc2-star.is-mine .pc2-star-ico {
            filter: drop-shadow(0 0 5px color-mix(in srgb, var(--gem-c) 70%, transparent));
        }

        .pc2-star.is-hit .pc2-star-ico {
            animation: gstHit .5s cubic-bezier(.2, .8, .2, 1.4);
        }

        @keyframes gstHit {
            0% { transform: scale(1); }
            28% { transform: scale(.76) rotate(-10deg); }
            64% { transform: scale(1.34) rotate(8deg); }
            100% { transform: scale(1); }
        }

        /* «1/4» чи таймер відео стоять по центру фото; ширший виріз на
           вузькому екрані налазив на них — тоді вони відсуваються праворуч від
           вирізу (половина плашки ≤ 48px), плашку лайків доміряє fitChip. */
        .pc2.has-star .pc2-media > .pc2-badge {
            left: max(50%, calc(var(--pc2-tab-w) + var(--pc2-tab-r) + 52px));
        }

        /* «Підтримати» на сторінці групи. */
        .gst-donate img {
            width: 20px;
            height: 20px;
        }

        /* ------------------------------------------- розсип після надсилання */
        .gst-fx {
            position: fixed;
            inset: 0;
            z-index: 10060;
            overflow: hidden;
            pointer-events: none;
        }

        .gst-p {
            position: absolute;
            left: 0;
            top: 0;
            display: block;
            will-change: transform, opacity;
        }

        .gst-p img {
            display: block;
            width: 100%;
            height: 100%;
        }

        .gst-dot {
            border-radius: 50%;
            background: radial-gradient(circle, #fff 0 30%, color-mix(in srgb, var(--gem-c) 60%, #fff) 55%, transparent 72%);
        }

        .gst-ring {
            position: absolute;
            left: 0;
            top: 0;
            width: 10px;
            height: 10px;
            border: 2px solid var(--gem-c);
            border-radius: 50%;
        }

        .gst-plus {
            position: absolute;
            left: 0;
            top: 0;
            font-size: 15px;
            font-weight: 800;
            line-height: 1;
            color: var(--gem-t);
            text-shadow: 0 1px 2px rgba(0, 0, 0, .18);
            white-space: nowrap;
        }

        /* ------------------------------------------------------------ вікно */
        .gst-veil {
            --gst-line: #EEF0F3;
            --gst-tint: #F1F2F5;
            --vp-grad: linear-gradient(90deg, #6C5CFF 0%, #8849FE 36%, #C04CDB 70%, #EC4899 100%);
            position: fixed;
            inset: 0;
            z-index: 1450;
            display: none;
            align-items: flex-end;
            justify-content: center;
            background-color: rgba(0, 0, 0, 0);
            transition: background-color .28s ease;
            -webkit-tap-highlight-color: transparent;
        }

        body.dark .gst-veil {
            --gst-line: #262626;
            --gst-tint: #2C2C31;
        }

        .gst-veil.is-open {
            display: flex;
        }

        .gst-veil.is-shown {
            background-color: rgba(0, 0, 0, .45);
        }

        .gst-wrap {
            position: relative;
            display: flex;
            flex-direction: column;
            align-items: center;
            width: 100%;
            max-width: 520px;
            max-height: calc(100dvh - 20px);
            overflow-x: hidden;
            overflow-y: auto;
            overscroll-behavior: contain;
            padding: 0 16px calc(14px + env(safe-area-inset-bottom, 0px));
            box-sizing: border-box;
            border-radius: 28px 28px 0 0;
            background: var(--card-bg, #fff);
            color: var(--text-primary);
            transform: translateY(101%);
            transition: transform .36s cubic-bezier(.2, .9, .3, 1);
        }

        .gst-veil.is-shown .gst-wrap {
            transform: none;
        }

        .gst-wrap:focus {
            outline: none;
        }

        .gst-wrap .as-grip {
            margin: 8px auto 0;
        }

        /* Шапка: хрестик — назва — баланс (у Telegram там «від імені»). */
        .gst-head {
            position: relative;
            z-index: 2;
            display: grid;
            grid-template-columns: 1fr auto 1fr;
            align-items: center;
            gap: 8px;
            align-self: stretch;
            min-height: 48px;
            margin-top: 2px;
        }

        .gst-x {
            justify-self: start;
            display: flex;
            align-items: center;
            justify-content: center;
            width: 36px;
            height: 36px;
            padding: 0;
            border: 0;
            border-radius: 50%;
            background: var(--gst-tint);
            color: var(--text-primary);
            cursor: pointer;
        }

        .gst-x svg {
            width: 18px;
            height: 18px;
        }

        .gst-title {
            font-size: 17px;
            font-weight: 700;
            line-height: 1.25;
            text-align: center;
        }

        .gst-bal {
            justify-self: end;
            display: inline-flex;
            align-items: center;
            gap: 4px;
            height: 30px;
            padding: 0 11px 0 8px;
            border-radius: 15px;
            background: var(--gst-tint);
            font-size: 13.5px;
            font-weight: 700;
            font-variant-numeric: tabular-nums;
            white-space: nowrap;
        }

        .gst-bal img {
            width: 16px;
            height: 16px;
        }

        .gst-bal b {
            color: var(--gem-t);
        }

        /* Повзунок: бульбашка із сумою над товстою доріжкою. */
        .gst-pick {
            position: relative;
            align-self: stretch;
            height: 112px;
            margin-top: 6px;
        }

        .gst-sky {
            position: absolute;
            left: -16px;
            top: -34px;
            width: calc(100% + 32px);
            height: calc(100% + 34px);
            pointer-events: none;
        }

        .gst-bubble {
            position: absolute;
            top: 8px;
            left: 50%;
            z-index: 1;
            display: inline-flex;
            align-items: center;
            gap: 6px;
            height: 48px;
            padding: 0 17px 0 13px;
            border-radius: 24px;
            background: var(--gem-c);
            background-image: linear-gradient(180deg, rgba(255, 255, 255, .22), rgba(255, 255, 255, 0) 60%);
            box-shadow: 0 8px 20px color-mix(in srgb, var(--gem-c) 35%, transparent);
            color: #fff;
            font-size: 24px;
            font-weight: 800;
            line-height: 1;
            white-space: nowrap;
            transform: translateX(-50%);
        }

        .gst-bubble::after {
            content: '';
            position: absolute;
            left: calc(50% + var(--tail, 0px));
            bottom: -6px;
            z-index: -1;
            width: 14px;
            height: 14px;
            margin-left: -7px;
            border-radius: 2px;
            background: var(--gem-c);
            transform: rotate(45deg);
        }

        .gst-bubble img {
            width: 24px;
            height: 24px;
            filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .15));
        }

        .gst-bubble b {
            font-variant-numeric: tabular-nums;
        }

        .gst-track {
            position: absolute;
            left: 0;
            right: 0;
            bottom: 6px;
            height: 34px;
            overflow: hidden;
            border-radius: 17px;
            background: var(--gst-tint);
        }

        .gst-fill {
            position: absolute;
            left: 0;
            top: 0;
            bottom: 0;
            width: 34px;
            border-radius: 17px;
            background: linear-gradient(90deg, color-mix(in srgb, var(--gem-c) 72%, #fff), var(--gem-c));
        }

        .gst-fizz {
            position: absolute;
            inset: 0;
            width: 100%;
            height: 100%;
            pointer-events: none;
        }

        /* «Лідер» на доріжці: за бігунцем сірим, у заливці — білим. */
        .gst-lead {
            position: absolute;
            top: 0;
            bottom: 0;
            display: flex;
            align-items: center;
            font-size: 13px;
            font-weight: 800;
            letter-spacing: .05em;
            text-transform: uppercase;
            color: var(--text-tertiary, #9CA3AF);
            white-space: nowrap;
            pointer-events: none;
        }

        .gst-lead.is-in {
            color: rgba(255, 255, 255, .92);
        }

        .gst-lead[hidden] {
            display: none;
        }

        /* Повзунок свій, не рідний: рідний на iPhone не їздить за пальцем
           з будь-якого місця доріжки й стрибав кроками (власник: «ползунок
           не плавний»). Бігунець іде точно за пальцем, сума — з кривої. Рідний
           <input type=range> лишився невидимим — для клавіатури й читалок. */
        .gst-range {
            position: absolute;
            left: 0;
            bottom: 6px;
            width: 100%;
            height: 34px;
            margin: 0;
            opacity: 0;
            pointer-events: none;
        }

        .gst-knob {
            position: absolute;
            left: 17px;
            bottom: 8px;
            z-index: 1;
            width: 30px;
            height: 30px;
            margin-left: -15px;
            border-radius: 50%;
            background: #fff;
            box-shadow: 0 2px 6px rgba(0, 0, 0, .25);
            pointer-events: none;
            transition: transform .15s ease;
        }

        .gst-pick.is-drag .gst-knob {
            transform: scale(1.08);
        }

        .gst-range:focus-visible + .gst-knob {
            box-shadow: 0 0 0 3px color-mix(in srgb, var(--gem-c) 45%, transparent), 0 2px 6px rgba(0, 0, 0, .25);
        }

        /* Дотик — по всій доріжці й трохи вище за неї. */
        .gst-hit {
            position: absolute;
            left: -8px;
            right: -8px;
            bottom: 0;
            z-index: 2;
            height: 52px;
            cursor: pointer;
            touch-action: none;
            -webkit-tap-highlight-color: transparent;
        }

        .gst-sub {
            max-width: 380px;
            margin: 16px 4px 0;
            font-size: 15px;
            line-height: 1.45;
            text-align: center;
        }

        .gst-sub b {
            font-weight: 700;
        }

        .gst-note {
            color: var(--text-secondary);
        }

        /* «Лідери» — плашка на лінії, під нею обличчя з сумою. */
        .gst-lh {
            position: relative;
            align-self: stretch;
            margin: 20px 0 14px;
            text-align: center;
        }

        .gst-lh::before {
            content: '';
            position: absolute;
            left: 0;
            right: 0;
            top: 50%;
            height: 1px;
            background: var(--gst-line);
        }

        .gst-lh span {
            position: relative;
            display: inline-block;
            padding: 6px 16px;
            border-radius: 16px;
            background: var(--gem-c) linear-gradient(180deg, rgba(255, 255, 255, .25), rgba(255, 255, 255, 0) 65%);
            text-shadow: 0 1px 1px rgba(0, 0, 0, .22);
            color: #fff;
            font-size: 14px;
            font-weight: 700;
        }

        .gst-top {
            align-self: stretch;
            overflow-x: auto;
            scrollbar-width: none;
        }

        .gst-top::-webkit-scrollbar {
            display: none;
        }

        /* Мало облич — по центру, багато — гортаються вбік. */
        .gst-top-in {
            display: flex;
            gap: 14px;
            width: max-content;
            margin: 0 auto;
            padding: 0 4px 2px;
        }

        .gst-fan {
            display: flex;
            flex: 0 0 76px;
            flex-direction: column;
            align-items: center;
            gap: 11px;
            min-width: 0;
            color: inherit;
            text-decoration: none;
        }

        .gst-fan-face {
            position: relative;
            width: 64px;
            height: 64px;
        }

        .gst-fan-face > img,
        .gst-anon {
            display: block;
            width: 100%;
            height: 100%;
            border-radius: 50%;
            object-fit: cover;
            background: var(--bg-secondary, #F3F4F6);
        }

        .gst-anon {
            display: flex;
            align-items: center;
            justify-content: center;
            background: #B8BEC9;
            color: #fff;
        }

        body.dark .gst-anon {
            background: #4B5563;
        }

        .gst-anon svg {
            width: 34px;
            height: 34px;
        }

        .gst-fan-n {
            position: absolute;
            left: 50%;
            bottom: -8px;
            display: inline-flex;
            align-items: center;
            gap: 2px;
            height: 20px;
            padding: 0 6px 0 4px;
            box-sizing: border-box;
            border: 2px solid var(--card-bg, #fff);
            border-radius: 10px;
            background: var(--gem-c) linear-gradient(180deg, rgba(255, 255, 255, .25), rgba(255, 255, 255, 0) 65%);
            text-shadow: 0 1px 1px rgba(0, 0, 0, .22);
            color: #fff;
            font-size: 11px;
            font-weight: 800;
            white-space: nowrap;
            transform: translateX(-50%);
        }

        .gst-fan-n img {
            width: 11px;
            height: 11px;
        }

        .gst-fan-name {
            display: block;
            max-width: 100%;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            font-size: 13px;
        }

        .gst-hr {
            align-self: stretch;
            height: 1px;
            margin-top: 18px;
            background: var(--gst-line);
        }

        /* «Показувати мене серед лідерів» — кружок, як вибір тарифу на VIP. */
        .gst-me {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 12px;
            align-self: stretch;
            padding: 16px 0 2px;
            font-size: 16px;
            cursor: pointer;
            -webkit-tap-highlight-color: transparent;
        }

        .gst-me input {
            flex: 0 0 auto;
            width: 24px;
            height: 24px;
            margin: 0;
            border-radius: 50%;
            box-shadow: inset 0 0 0 2px var(--text-tertiary, #9CA3AF);
            opacity: .75;
            -webkit-appearance: none;
            appearance: none;
            cursor: pointer;
            transition: opacity .2s ease, box-shadow .2s ease;
        }

        .gst-me input:checked {
            opacity: 1;
            box-shadow: none;
            background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 14px no-repeat, linear-gradient(135deg, #8849FE, #B44CF0);
        }

        .gst-me input:focus-visible {
            outline: 2px solid #8849FE;
            outline-offset: 2px;
        }

        /* Кнопка — як «Підключити за …» на VIP. */
        .gst-send {
            position: relative;
            overflow: hidden;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 7px;
            align-self: stretch;
            height: 52px;
            margin-top: 18px;
            border: 0;
            border-radius: 999px;
            background: var(--vp-grad);
            color: #fff;
            font-family: inherit;
            font-size: 16px;
            font-weight: 700;
            cursor: pointer;
            -webkit-tap-highlight-color: transparent;
            transition: transform .15s ease, opacity .2s ease;
        }

        .gst-send::after {
            content: '';
            position: absolute;
            top: 0;
            bottom: 0;
            left: -60%;
            width: 45%;
            background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .32), transparent);
            transform: skewX(-18deg);
            animation: gstShine 3.8s ease-in-out infinite;
            pointer-events: none;
        }

        @keyframes gstShine {
            0%, 62% { left: -60%; }
            100% { left: 130%; }
        }

        .gst-send:active:not(:disabled) {
            transform: scale(.98);
        }

        .gst-send:disabled {
            opacity: .45;
            cursor: default;
        }

        .gst-send:disabled::after {
            display: none;
        }

        .gst-send img {
            width: 18px;
            height: 18px;
        }

        .gst-foot {
            display: inline-flex;
            flex-wrap: wrap;
            align-items: center;
            justify-content: center;
            gap: 4px;
            margin-top: 10px;
            font-size: 12.5px;
            line-height: 1.5;
            color: var(--text-tertiary, #9CA3AF);
            text-align: center;
        }

        .gst-foot img {
            width: 13px;
            height: 13px;
        }

        .gst-foot:empty {
            display: none;
        }

        /* Поки їдуть дані — доріжка дихає, решта на своїх місцях невидима. */
        .gst-wrap.is-loading :is(.gst-bubble, .gst-knob, .gst-sub, .gst-lh, .gst-top, .gst-me, .gst-foot) {
            visibility: hidden;
        }

        .gst-wrap.is-loading .gst-track {
            animation: gstPulse 1.2s ease-in-out infinite;
        }

        @keyframes gstPulse { 50% { opacity: .5; } }

        .gst-wrap[data-mode="note"] :is(.gst-pick, .gst-lh, .gst-top, .gst-hr, .gst-me, .gst-foot),
        .gst-wrap[data-mode="view"] :is(.gst-pick, .gst-hr, .gst-me, .gst-foot),
        .gst-wrap[data-mode="payout"] :is(.gst-lh, .gst-top, .gst-hr, .gst-me),
        .gst-wrap.no-top :is(.gst-lh, .gst-top) {
            display: none;
        }

        /* Вікно власника (gsv): своє, не перемальоване з «надіслати». Місце під лідерів відведене наперед — поки їдуть,
           там сірі кружки; ніхто ще не надсилав — рядок тексту тієї ж висоти. */
        .gsv .gst-top {
            min-height: 96px;
        }

        .gsv a.gst-send {
            text-decoration: none;
        }

        .gsv-skel {
            display: flex;
            justify-content: center;
            gap: 14px;
        }

        .gsv-skel i {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 13px;
            width: 76px;
        }

        .gsv-skel i::before,
        .gsv-skel i::after {
            content: '';
            display: block;
            border-radius: 999px;
            background: var(--gst-tint);
            animation: gstPulse 1.2s ease-in-out infinite;
        }

        .gsv-skel i::before {
            width: 64px;
            height: 64px;
        }

        .gsv-skel i::after {
            width: 52px;
            height: 12px;
        }

        .gsv-empty {
            display: flex;
            align-items: center;
            justify-content: center;
            min-height: 96px;
            padding: 0 12px;
            box-sizing: border-box;
            font-size: 14px;
            line-height: 1.45;
            text-align: center;
            color: var(--text-secondary);
        }

        .gsv .gst-top-in {
            animation: gsvIn .3s ease both;
        }

        @keyframes gsvIn {
            from { opacity: 0; }
        }

        @media (min-width: 1024px) {
            .gst-veil {
                align-items: center;
            }

            .gst-wrap {
                max-width: 420px;
                max-height: calc(100vh - 48px);
                padding-bottom: 20px;
                border-radius: 28px;
                box-shadow: 0 24px 64px rgba(0, 0, 0, .28);
                opacity: 0;
                transform: scale(.94);
                transition: opacity .26s ease, transform .26s ease;
            }

            .gst-veil.is-shown .gst-wrap {
                opacity: 1;
                transform: none;
            }

            .gst-wrap .as-grip {
                visibility: hidden;
            }
        }

        @media (prefers-reduced-motion: reduce) {
            .gst-send::after,
            .pc2-star.is-hit .pc2-star-ico,
            .pc2-gem-fx,
            .pc2-gems-ico i,
            .pc2-gems.is-new .pc2-gems-row::after {
                animation: none;
            }

            .pc2-gem-fx i::before {
                animation: none;
                opacity: .9;
                transform: none;
            }
        }
    

        /* ------------------------------------------------------- картка */
        /* Фото й відео — впритул до верху й боків картки (власник, 19.10).
           Тло картки починається нижче: під заокругленим кутом фото не
           світиться біла облямівка від такого самого кута картки.
           Старі правила .post-card (main.css, сторінки) тут перекрито:
           картка не обрізає вміст (overflow) — подвійне обрізання кутів
           дає ту саму тонку лінію, що й накладка всередині фото. */
        article.post-card.pc2 {
            overflow: visible;
            margin: 0 0 10px;
            padding: 0 0 14px;
            border: 0;
            border-radius: var(--pc2-card-r);
            background: linear-gradient(to bottom, transparent 48px, var(--pc2-bg) 48px);
            box-shadow: var(--card-shadow);
        }

        article.post-card.pc2.pc2--plain {
            padding-top: 14px;
            background: var(--pc2-bg);
        }

        .pc2 {
            /* Кути — круглі (власник, 19.10: «все-таки все більш заокруглене»). */
            --pc2-r: 24px;
            --pc2-card-r: 30px;
            --pc2-tab-h: 42px;
            /* Ширина вирізу: 8 + дві кнопки по 36 + 4 (з кристалом — ширша,
               її ставить сама картка). Від неї (плюс зворотний кут)
               починається нижній ряд з лічильником і лайками. */
            --pc2-tab-w: 84px;
            /* Кут вирізу праворуч — рівно половина його висоти: вигин вирізу й
               зворотний кут під ним разом займають усю висоту. Більший кут
               (24 при висоті 42) налазив на зворотний і лишав сходинку. */
            --pc2-tab-r: calc(var(--pc2-tab-h) / 2);
            --pc2-bg: var(--card-bg, #fff);
        }

        .pc2-stage {
            position: relative;
        }

        /* --------------------------------------------- скелетон картки */
        /* Три сірі значки — як серце, коментар і кристал (виріз той самий, що
           в картки з кристалом, star_react.php). */
        .pc2.pc2-sk {
            --pc2-tab-w: 120px;
        }

        .pc2-sk .pc2-media,
        .pc2-sk .pc2-sk-ic,
        .pc2-sk .pc2-sk-lines .pc2-sk-l {
            background: var(--sk-base, #E5E7EB) var(--sk-shine) no-repeat;
            background-size: 220% 100%;
            animation: pc2-sk-shine 1.15s ease-in-out infinite;
        }

        /* «Фото» скелетона — темніше за тло сторінки (воно саме сіре,
           --bg-primary), інакше картка зливається з ним. */
        .pc2-sk .pc2-media {
            background-color: #D5D9E0;
            pointer-events: none;
        }

        body.dark .pc2-sk .pc2-media {
            background-color: #2A2A2F;
        }

        /* На «фото» — світлі напівпрозорі заглушки, як текст на справжньому фото. */
        .pc2-sk .pc2-sk-ava,
        .pc2-sk .pc2-head .pc2-sk-l,
        .pc2-sk .pc2-sk-chip {
            display: block;
            background: rgba(255, 255, 255, .55);
        }

        body.dark .pc2-sk .pc2-sk-ava,
        body.dark .pc2-sk .pc2-head .pc2-sk-l,
        body.dark .pc2-sk .pc2-sk-chip {
            background: rgba(255, 255, 255, .12);
        }

        .pc2-sk .pc2-sk-ava {
            width: 34px;
            height: 34px;
            border-radius: 11px;
        }

        .pc2-sk .pc2-ava {
            filter: none;
        }

        .pc2-sk-l {
            display: block;
            height: 10px;
            border-radius: 5px;
        }

        .pc2-sk .pc2-head .pc2-sk-l.is-name {
            width: 110px;
            height: 11px;
        }

        .pc2-sk .pc2-head .pc2-sk-l.is-sub {
            width: 64px;
            height: 8px;
            margin-top: 4px;
        }

        .pc2-sk .pc2-more {
            pointer-events: none;
        }

        .pc2-sk .pc2-sk-chip {
            width: 96px;
            height: 32px;
            margin-left: auto;
            border-radius: 16px;
        }

        .pc2-sk .pc2-act {
            cursor: default;
        }

        .pc2-sk .pc2-sk-ic {
            display: block;
            width: 22px;
            height: 22px;
            border-radius: 50%;
        }

        .pc2-sk .pc2-sk-lines {
            display: grid;
            gap: 9px;
            padding: 6px 0 2px;
        }

        .pc2-sk .pc2-sk-lines .pc2-sk-l.is-short {
            width: 58%;
        }

        .pc2-sk .pc2-sk-lines .pc2-sk-l.is-time {
            width: 38%;
            height: 8px;
            margin-top: 4px;
        }

        @keyframes pc2-sk-shine {
            from { background-position: 160% 0; }
            to { background-position: -60% 0; }
        }

        @media (prefers-reduced-motion: reduce) {
            .pc2-sk .pc2-media,
            .pc2-sk .pc2-sk-ic,
            .pc2-sk .pc2-sk-lines .pc2-sk-l {
                animation: none;
            }
        }

        .pc2-media {
            position: relative;
            aspect-ratio: 4 / 5;
            max-height: 640px;
            width: 100%;
            overflow: hidden;
            border-radius: var(--pc2-card-r) var(--pc2-card-r) var(--pc2-r) var(--pc2-r);
            background: var(--bg-secondary, #F3F4F6);
            isolation: isolate;
            -webkit-tap-highlight-color: transparent;
            /* Подвійний тап — серце, а не збільшення сторінки; без виділення. */
            touch-action: manipulation;
            -webkit-user-select: none;
            user-select: none;
        }

        .pc2-fill {
            position: absolute;
            inset: 0;
            width: 100%;
            height: 100%;
            object-fit: cover;
            cursor: zoom-in;
        }

        /* Відео без обкладинки: сіре тло замість значка битої картинки. */
        .pc2-fill:not([src]) {
            visibility: hidden;
        }

        /* Слайдер: свайп пальцем, кадр ловиться посередині. */
        .pc2-track {
            position: absolute;
            inset: 0;
            display: flex;
            overflow-x: auto;
            scroll-snap-type: x mandatory;
            overscroll-behavior-x: contain;
            scrollbar-width: none;
        }

        .pc2-track::-webkit-scrollbar {
            display: none;
        }

        .pc2-slide {
            position: relative;
            flex: 0 0 100%;
            scroll-snap-align: center;
        }

        /* Плитка (автор вибрав «сітку»): 2 — поруч; 3 — велике ліворуч і два
           праворуч; 4 — 2×2; 5 і більше — дві великі згори, три внизу, на
           п'ятій «+N». Рядки й стовпчики — flex (у CSS grid Safari інколи не
           розтягував фото на всю клітинку). */
        .pc2-grid {
            position: absolute;
            inset: 0;
            display: flex;
            flex-direction: column;
            gap: 2px;
            background: var(--pc2-bg);
        }

        .pc2-grid-3 {
            flex-direction: row;
        }

        .pc2-row,
        .pc2-col {
            display: flex;
            flex: 1 1 0;
            gap: 2px;
            min-width: 0;
            min-height: 0;
        }

        .pc2-col {
            flex-direction: column;
            flex-grow: 2;
        }

        .pc2-row--big {
            flex-grow: 1.5;
        }

        .pc2-cell {
            position: relative;
            flex: 1 1 0;
            min-width: 0;
            min-height: 0;
            overflow: hidden;
        }

        .pc2-grid-3 > .pc2-cell {
            flex-grow: 3;
        }

        .pc2-rest {
            position: absolute;
            inset: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            background: rgba(0, 0, 0, .42);
            color: #fff;
            font-size: 22px;
            font-weight: 700;
            pointer-events: none;
        }

        .pc2-vid {
            position: absolute;
            inset: 0;
        }

        .pc2 .pc2-vid > video {
            object-fit: cover;
        }

        /* Шапка поверх фото. Тінь — кутом під аватаркою й назвою (власник:
           «затемнення трохи в той кут»), а не смугою на всю ширину: праворуч
           кнопки мають власне скло. Ледь помітна смуга згори лишається, щоб
           кут не виглядав плямою. */
        .pc2-scrim {
            position: absolute;
            inset: 0 0 auto;
            height: 170px;
            background:
                radial-gradient(ellipse 320px 160px at 0 0, rgba(0, 0, 0, .5) 0%, rgba(0, 0, 0, .26) 45%, rgba(0, 0, 0, 0) 100%),
                linear-gradient(to bottom, rgba(0, 0, 0, .14), rgba(0, 0, 0, 0) 90px);
            pointer-events: none;
            z-index: 1;
        }

        .pc2-head {
            position: absolute;
            inset: 0 0 auto;
            z-index: 2;
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 14px 14px 0;
            pointer-events: none;
        }

        .pc2-head > * {
            pointer-events: auto;
        }

        /* Аватарка групи — та сама, що в дописах стрічки (.post-avatar:
           сайтовий скруглений квадрат), без обводки. */
        /* Тінь іде за формою аватарки: filter на обгортці бачить уже обрізаний
           маскою скруглений квадрат. */
        .pc2-ava {
            flex: 0 0 auto;
            display: block;
            width: 34px;
            height: 34px;
            filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .26));
        }

        .pc2 .pc2-ava .post-avatar {
            display: block;
            width: 34px;
            height: 34px;
        }

        .pc2-who {
            flex: 1 1 auto;
            display: flex;
            flex-direction: column;
            gap: 2px;
            min-width: 0;
            color: #fff;
            text-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 0 14px rgba(0, 0, 0, .22);
        }

        .pc2-name {
            display: flex;
            align-items: center;
            gap: 4px;
            min-width: 0;
            color: #fff;
            font-size: 14px;
            font-weight: 700;
            line-height: 1.15;
            letter-spacing: -.01em;
            text-decoration: none;
        }

        .pc2-name span {
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .pc2-ver {
            flex: 0 0 auto;
            width: 15px;
            height: 15px;
            color: #A855F7;
            filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .25));
        }

        /* Шпилька — лише в закріпленого: стіна групи міняє data-pinned, і
           значок з'являється чи зникає сам, без перемальовування картки. */
        .pc2-pin {
            display: none;
            flex: 0 0 auto;
            width: 14px;
            height: 14px;
            stroke-width: 2.2;
        }

        .pc2[data-pinned="1"] .pc2-pin {
            display: block;
        }

        /* Тип вмісту під назвою: значок по центру букв (flex + center, шрифт
           ReeUI вирівняний сам — без ручних зсувів). */
        .pc2-sub {
            display: flex;
            align-items: center;
            gap: 4px;
            font-size: 11.5px;
            font-weight: 500;
            line-height: 14px;
            color: rgba(255, 255, 255, .86);
        }

        .pc2-sub svg {
            flex: 0 0 auto;
            width: 13px;
            height: 13px;
            stroke-width: 2.1;
            filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .3));
        }

        /* Лічильник кадрів «1/4» і таймер відео — рівно по центру фото, на
           одній лінії з лайками й тієї самої висоти. Стоїть сам по собі, не в
           ряду з плашкою: серце міняє ширину плашки, а лічильник не рухається
           (власник, 19.10). Плашка займає лише місце до нього (fitChip у
           скрипті). Вигляд — темне «рідке скло» з білими цифрами в обох темах
           (власник, 20.10): прозоре, розмиття, відблиск по краю. Тап крізь нього
           йде на фото. */
        .pc2-badge {
            position: absolute;
            left: 50%;
            bottom: 5px;
            z-index: 3;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 4px;
            height: 32px;
            min-width: 32px;
            padding: 0 12px;
            transform: translateX(-50%);
            border-radius: 16px;
            background: rgba(20, 20, 24, .42);
            box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18), inset 0 1px 1px rgba(255, 255, 255, .28), 0 2px 8px rgba(0, 0, 0, .14);
            -webkit-backdrop-filter: blur(14px) saturate(180%);
            backdrop-filter: blur(14px) saturate(180%);
            color: #fff;
            font-size: 13px;
            font-weight: 600;
            line-height: 1;
            font-variant-numeric: tabular-nums;
            pointer-events: none;
        }

        .pc2-badge > span {
            text-box: trim-both cap alphabetic;
        }

        /* Таймер відео — і кнопка звуку: тап по ньому вмикає чи вимикає звук
           одразу на всіх відео (VideoSound), а не відкриває переглядач. */
        .pc2-timer {
            padding-left: 10px;
            border: none;
            font-family: inherit;
            cursor: pointer;
            pointer-events: auto;
            touch-action: manipulation;
            -webkit-tap-highlight-color: transparent;
        }

        .pc2-timer svg {
            flex: 0 0 auto;
            width: 12px;
            height: 12px;
        }

        .pc2-timer .pc2-i-off,
        .pc2-timer .pc2-i-on {
            display: none;
            width: 15px;
            height: 15px;
        }

        /* Грає — замість трикутника динамік: закреслений (тихо) чи зі звуком. */
        .pc2-vid.is-playing ~ .pc2-timer .pc2-i-play {
            display: none;
        }

        .pc2-vid.is-playing ~ .pc2-timer .pc2-i-off {
            display: block;
        }

        .pc2-vid.is-playing[data-snd="1"] ~ .pc2-timer .pc2-i-off {
            display: none;
        }

        .pc2-vid.is-playing[data-snd="1"] ~ .pc2-timer .pc2-i-on {
            display: block;
        }

        .pc2-timer:active {
            transform: translateX(-50%) scale(.94);
        }

        /* ⋮ — «рідке скло», як у новій iOS (і як кнопки в історіях):
           прозоріше, розмиття під ним, світлий відблиск по краю; темний значок. */
        .pc2-more {
            flex: 0 0 auto;
            display: flex;
            align-items: center;
            justify-content: center;
            width: 36px;
            height: 36px;
            padding: 0;
            border: none;
            border-radius: 50%;
            background: rgba(255, 255, 255, .6);
            box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .45), inset 0 1px 1px rgba(255, 255, 255, .75), 0 2px 8px rgba(0, 0, 0, .14);
            -webkit-backdrop-filter: blur(14px) saturate(180%);
            backdrop-filter: blur(14px) saturate(180%);
            color: #111827;
            cursor: pointer;
        }

        /* «Підписатися» на рекомендації — та сама скляна таблетка, що ⋮;
           після дотику — «Ви підписані» м'яким фіолетовим (як кнопки підписки). */
        .pc2-join {
            flex: 0 0 auto;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            height: 32px;
            padding: 0 14px;
            border: none;
            border-radius: 16px;
            /* Сама кнопка фіолетова, текст білий (власник, 20.10); відблиск по
               краю — як у скляних кнопок поруч. */
            background: var(--accent-color, #8849FE);
            box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22), inset 0 1px 1px rgba(255, 255, 255, .4), 0 2px 8px rgba(0, 0, 0, .14);
            color: #fff;
            font: inherit;
            font-size: 13px;
            font-weight: 700;
            line-height: 1;
            white-space: nowrap;
            cursor: pointer;
            transition: background .2s ease, color .2s ease, opacity .2s ease;
            -webkit-tap-highlight-color: transparent;
        }

        .pc2-join.is-busy {
            opacity: .6;
        }

        .pc2-join.is-on {
            background: rgba(237, 233, 254, .72);
            color: #6D28D9;
        }

        .pc2--plain .pc2-join {
            box-shadow: none;
        }

        /* «Ви підписані» — м'який фіолетовий, без обводки (як кнопки підписки);
           на фото — скло, щоб не губилося. */
        .pc2-join.is-on {
            -webkit-backdrop-filter: blur(14px) saturate(180%);
            backdrop-filter: blur(14px) saturate(180%);
        }

        .pc2--plain .pc2-join.is-on {
            background: rgba(136, 73, 254, .12);
            color: var(--accent-color, #8849FE);
            -webkit-backdrop-filter: none;
            backdrop-filter: none;
        }

        body.dark .pc2-join.is-on {
            background: rgba(76, 29, 149, .45);
            color: #DDD6FE;
        }

        body.dark .pc2--plain .pc2-join.is-on {
            background: rgba(136, 73, 254, .16);
            color: #C4B5FD;
        }

        body.dark .pc2-more {
            background: rgba(24, 24, 28, .5);
            box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16), inset 0 1px 1px rgba(255, 255, 255, .22), 0 2px 8px rgba(0, 0, 0, .2);
            color: #F3F4F6;
        }

        .pc2-more svg {
            width: 20px;
            height: 20px;
        }

        /* --- виріз із діями: накладка кольору картки + два зворотні кути.
           Вона поза обрізом фото і заходить на 2px за нижній край (там поле
           картки того самого кольору), а лівий край у неї спільний з фото й
           карткою: згладжений край фото накрито повністю — лінії не
           лишається. Кути заходять на 1px у саму накладку, щоб не було шва. */
        .pc2-tab {
            position: absolute;
            left: 0;
            bottom: -2px;
            z-index: 3;
            display: flex;
            align-items: center;
            gap: 0;
            box-sizing: border-box;
            width: var(--pc2-tab-w);
            height: calc(var(--pc2-tab-h) + 2px);
            padding: 2px 4px 2px 8px;
            background: var(--pc2-bg);
            border-top-right-radius: var(--pc2-tab-r);
        }

        .pc2-tab::before,
        .pc2-tab::after {
            content: '';
            position: absolute;
            background: radial-gradient(circle at 100% 0, transparent calc(var(--pc2-r) - .5px), var(--pc2-bg) var(--pc2-r));
            pointer-events: none;
        }

        .pc2-tab::before {
            left: 0;
            bottom: calc(100% - 1px);
            width: var(--pc2-r);
            height: calc(var(--pc2-r) + 1px);
        }

        .pc2-tab::after {
            left: calc(100% - 1px);
            bottom: 0;
            width: calc(var(--pc2-tab-r) + 1px);
            height: calc(var(--pc2-tab-r) + 2px);
            background: radial-gradient(circle at 100% 0, transparent calc(var(--pc2-tab-r) - .5px), var(--pc2-bg) var(--pc2-tab-r));
        }

        .pc2-act {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            height: 36px;
            min-width: 36px;
            padding: 0 6px;
            border: none;
            border-radius: 14px;
            background: none;
            color: var(--text-primary);
            font: inherit;
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
            -webkit-tap-highlight-color: transparent;
            transition: transform .15s ease;
        }

        .pc2-act:active {
            transform: scale(.9);
        }

        .pc2-act svg {
            width: 22px;
            height: 22px;
            stroke-width: 1.9;
        }

        .pc2-like.liked svg {
            color: #FF3B5C;
            fill: #FF3B5C;
        }

        .pc2-like.is-pop svg {
            animation: pc2Pop .45s cubic-bezier(.2, .8, .2, 1.4);
        }

        @keyframes pc2Pop {
            0% { transform: scale(.6); }
            60% { transform: scale(1.25); }
            100% { transform: scale(1); }
        }

        /* --- унизу праворуч від вирізу: «1/4» / таймер і хто вподобав */
        .pc2-dock {
            position: absolute;
            left: calc(var(--pc2-tab-w) + var(--pc2-tab-r) + 4px);
            right: 10px;
            bottom: 5px;
            z-index: 3;
            display: flex;
            align-items: center;
            gap: 6px;
            pointer-events: none;
        }

        .pc2-dock > * {
            pointer-events: auto;
        }

        /* Лайки — до правого краю. Коли на фото є лічильник, плашка не
           ширша за місце до нього; не влазить — ховає обличчя (вони є й під
           фото в «Вподобали …»), лишає число й слово. */
        .pc2-likes.is-tight {
            padding: 0 10px;
        }

        /* «Будьте першим» без сердечка — текст рівно посередині, без зайвого
           відступу зліва (власник, 21.10.2026: «не влазить»). */
        .pc2-likes.is-tight .pc2-likes-0 {
            padding-left: 0;
        }

        .pc2-likes.is-tight .pc2-faces,
        .pc2-likes.is-tight .pc2-likes-0 svg {
            display: none;
        }

        /* Зовсім тісно (★ з числом у вирізі й таймер поруч): лише сердечко,
           а коли лайки є — сердечко й число. */
        .pc2-likes.is-min {
            padding: 0 10px;
        }

        .pc2-likes.is-min .pc2-likes-w {
            display: none;
        }

        .pc2-likes.is-min .pc2-likes-n::before {
            content: '\2665';
            margin-right: 4px;
            color: #FF3B5C;
        }

        .pc2-likes.is-min .pc2-likes-0 {
            gap: 0;
            padding-left: 0;
            font-size: 0;
        }

        .pc2-likes.is-min .pc2-likes-0 svg {
            display: block;
        }

        .pc2-likes {
            position: relative;
            display: flex;
            flex: 0 1 auto;
            margin-left: auto;
            align-items: center;
            gap: 6px;
            min-width: 0;
            height: 32px;
            box-sizing: border-box;
            overflow: hidden;
            padding: 0 12px 0 4px;
            cursor: pointer;
            -webkit-tap-highlight-color: transparent;
            border-radius: 16px;
            /* «Рідке скло» — як ⋮ і кнопки історій. */
            background: rgba(255, 255, 255, .6);
            box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .45), inset 0 1px 1px rgba(255, 255, 255, .75), 0 2px 8px rgba(0, 0, 0, .12);
            -webkit-backdrop-filter: blur(14px) saturate(180%);
            backdrop-filter: blur(14px) saturate(180%);
            color: #111827;
            font-size: 13px;
            white-space: nowrap;
        }

        .pc2-faces {
            display: flex;
            flex: 0 0 auto;
        }

        .pc2-likes.is-empty {
            cursor: default;
        }

        /* «Будьте першим» ↔ обличчя з числом — плашка міняє ширину плавно, а
           вміст проявляється (обидва напрямки). */
        .pc2-likes.is-swap > * {
            animation: pc2Swap .34s ease both;
        }

        @keyframes pc2Swap {
            from {
                opacity: 0;
                transform: translateY(5px) scale(.96);
            }
        }

        /* Стоси облич: розмір --s і заступ --o — змінні, бо поява й зникнення
           рахуються від них (див. pc2FaceIn / pc2FaceOut). */
        .pc2-faces {
            --s: 24px;
            --o: 9px;
        }

        .pc2-face {
            width: var(--s);
            height: var(--s);
            border-radius: 50%;
            border: 2px solid #fff;
            object-fit: cover;
            background: #E5E7EB;
        }

        .pc2-face + .pc2-face,
        .pc2-by-face + .pc2-by-face {
            margin-left: calc(-1 * var(--o));
        }

        /* Перше обличчя — зверху, далі кожне під попереднім. Порядок задано
           явно: без нього нове обличчя на час руху (transform) ставало над
           сусідами, а після — ховалося під них. */
        .pc2-face,
        .pc2-by-face {
            position: relative;
        }

        :is(.pc2-faces, .pc2-by-faces) > :nth-child(1) {
            z-index: 4;
        }

        :is(.pc2-faces, .pc2-by-faces) > :nth-child(2) {
            z-index: 3;
        }

        :is(.pc2-faces, .pc2-by-faces) > :nth-child(3) {
            z-index: 2;
        }

        :is(.pc2-faces, .pc2-by-faces) > :nth-child(n+4) {
            z-index: 1;
        }

        /* Картинка проявляється, коли приїхала; сіре коло стоїть одразу. */
        .pc2-face,
        .pc2-by-face,
        .pc2-fl img {
            transition: opacity .3s ease;
        }

        .pc2-face:not(.is-ld),
        .pc2-by-face:not(.is-ld),
        .pc2-fl img:not(.is-ld) {
            opacity: .35;
        }

        /* Своє обличчя після серця в'їжджає першим і розсуває решту; зняте
           серце — так само плавно з'їжджає. Відступ на початку руху рівно
           такий, що сусід не зсувається ні на піксель. */
        .pc2-in {
            animation: pc2FaceIn .42s cubic-bezier(.2, .9, .3, 1.25) both;
        }

        .pc2-out-first {
            animation: pc2FaceOutFirst .3s ease both;
        }

        .pc2-out {
            animation: pc2FaceOut .3s ease both;
        }

        @keyframes pc2FaceIn {
            from {
                margin-left: calc(var(--o) - var(--s));
                opacity: 0;
                transform: scale(.3);
            }
        }

        @keyframes pc2FaceOutFirst {
            to {
                margin-left: calc(var(--o) - var(--s));
                opacity: 0;
                transform: scale(.3);
            }
        }

        @keyframes pc2FaceOut {
            to {
                margin-left: calc(-1 * var(--s));
                opacity: 0;
                transform: scale(.3);
            }
        }

        .pc2-likes-n {
            overflow: hidden;
            text-overflow: ellipsis;
            color: #374151;
        }

        .pc2-likes-n b {
            font-weight: 700;
            color: #111827;
        }

        .pc2-likes-0 {
            display: none;
            align-items: center;
            gap: 6px;
            padding-left: 6px;
            font-weight: 600;
        }

        .pc2-likes-0 svg {
            width: 16px;
            height: 16px;
            color: #FF3B5C;
        }

        .pc2-likes.is-empty .pc2-faces,
        .pc2-likes.is-empty .pc2-likes-n {
            display: none;
        }

        .pc2-likes.is-empty .pc2-likes-0 {
            display: inline-flex;
        }

        /* Обличчя з сердечками над вирізом, ледь пливуть. */
        .pc2-floats {
            position: absolute;
            left: 14px;
            bottom: calc(var(--pc2-tab-h) + 6px);
            z-index: 2;
            width: 60px;
            height: 52px;
            pointer-events: none;
        }

        /* Менші, нижче, ледь помітний рух — щоб не набридали. */
        .pc2-fl {
            position: absolute;
            width: 28px;
            height: 28px;
            animation: pc2Bob 4.6s ease-in-out infinite alternate;
        }

        .pc2-fl img {
            width: 100%;
            height: 100%;
            border-radius: 50%;
            border: 2px solid #fff;
            object-fit: cover;
            box-shadow: 0 3px 10px rgba(0, 0, 0, .18);
        }

        .pc2-fl i {
            position: absolute;
            top: -3px;
            right: -3px;
            display: flex;
            align-items: center;
            justify-content: center;
            width: 14px;
            height: 14px;
            border-radius: 50%;
            background: #FF3B5C;
            border: 1.5px solid #fff;
        }

        .pc2-fl i svg {
            width: 7px;
            height: 7px;
            color: #fff;
            fill: #fff;
            stroke-width: 3;
        }

        .pc2-fl-0 {
            left: 0;
            top: 0;
        }

        .pc2-fl-1 {
            left: 24px;
            top: 22px;
            animation-delay: -2.3s;
        }

        @keyframes pc2Bob {
            from { transform: translateY(0); }
            to { transform: translateY(-3px); }
        }

        /* Подвійний тап — велике серце посеред фото. */
        .pc2-burst {
            position: absolute;
            left: 50%;
            top: 50%;
            z-index: 4;
            width: 96px;
            height: 96px;
            margin: -48px 0 0 -48px;
            pointer-events: none;
            filter: drop-shadow(0 6px 18px rgba(0, 0, 0, .28));
            animation: pc2Burst .9s cubic-bezier(.2, .8, .2, 1) both;
        }

        /* Другий тап уже поверх переглядача чи читача — серце посеред екрана. */
        .pc2-burst--screen {
            position: fixed;
            z-index: 5000;
            width: 120px;
            height: 120px;
            margin: -60px 0 0 -60px;
        }

        .pc2-burst svg {
            width: 100%;
            height: 100%;
            fill: #fff;
            stroke: none;
        }

        @keyframes pc2Burst {
            0% { opacity: 0; transform: scale(.2); }
            15% { opacity: 1; transform: scale(1.18); }
            30% { transform: scale(.94); }
            45% { transform: scale(1); }
            75% { opacity: 1; transform: scale(1); }
            100% { opacity: 0; transform: translateY(-14px) scale(1.06); }
        }

        /* --- під фото */
        .pc2-meta {
            padding: 6px 16px 0;
        }

        /* Час · перегляди · коментарі — завжди один рядок (власник: «злазить з
           лінії» — російською коментарі падали на другий). Тісно (fitTime) —
           спершу без слова «коментарів», далі й без «переглядів»: лишаються
           значки з числами. Слово — окремий <i class="pc2-w">, ховається
           повністю (нуль шрифту тягнув за собою висоту рядка, і цифра
           підскакувала — власник: «чого текст поплив»). */
        .pc2-time {
            display: flex;
            flex-wrap: nowrap;
            align-items: center;
            column-gap: 6px;
            overflow: hidden;
            white-space: nowrap;
            font-size: 12.5px;
            color: var(--text-tertiary, #9CA3AF);
        }

        .pc2-w {
            font-style: normal;
        }

        .pc2-time.is-tight .pc2-cmts .pc2-w,
        .pc2-time.is-min .pc2-views .pc2-w {
            display: none;
        }

        .pc2-views {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            font-variant-numeric: tabular-nums;
        }

        .pc2-views::before {
            content: '·';
            margin-right: 2px;
        }

        .pc2-views svg {
            flex: 0 0 auto;
            width: 14px;
            height: 14px;
        }

        /* Текст біля значка — по висоті великої літери (text-box): значок
           стає рівно по середині букв на будь-якому шрифті — SF на iPhone,
           Roboto, Segoe. Де text-box немає, лишається звичайне центрування. */
        .pc2-time > span:first-child,
        .pc2-views > span,
        .pc2-sub > span {
            text-box: trim-both cap alphabetic;
        }

        .pc2-views b {
            font-weight: inherit;
        }

        /* Коментарі — праворуч у тому самому рядку. */
        .pc2-cmts {
            margin: 0 0 0 auto;
            padding: 0;
            border: 0;
            background: none;
            color: inherit;
            font: inherit;
            cursor: pointer;
            -webkit-tap-highlight-color: transparent;
        }

        .pc2-cmts::before {
            content: none;
        }

        /* «Вподобали …» з трьома маленькими обличчями попереду; тап — аркуш. */
        .pc2-by {
            display: flex;
            align-items: center;
            gap: 4px;
            margin-top: 6px;
            font-size: 13px;
            color: var(--text-secondary);
            cursor: pointer;
            -webkit-tap-highlight-color: transparent;
        }

        .pc2-by[hidden],
        .pc2-by [hidden] {
            display: none;
        }

        .pc2-by-faces {
            --s: 20px;
            --o: 8px;
            display: flex;
            flex: 0 0 auto;
        }

        .pc2-by-faces:empty {
            display: none;
        }

        .pc2-by-face {
            width: var(--s);
            height: var(--s);
            border-radius: 50%;
            border: 2px solid var(--pc2-bg);
            object-fit: cover;
            background: #E5E7EB;
        }

        .pc2-by-text {
            min-width: 0;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .pc2-by b {
            font-weight: 600;
            color: var(--text-primary);
        }

        /* Підпис: два рядки, у кінці другого — «… ще» одразу за трьома
           крапками, як в Instagram; тап по «ще» або по тексту розгортає
           гармошкою (висота їде плавно), у кінці стоїть «сховати».
           Поки скрипт не підібрав довжину — звичайне обрізання двома
           рядками (без стрибка); після — is-fit і текст рівно під «… ще». */
        .pc2-cap {
            display: -webkit-box;
            margin-top: 6px;
            overflow: hidden;
            -webkit-box-orient: vertical;
            -webkit-line-clamp: 2;
            font-size: 14.5px;
            line-height: 21px;
            color: var(--text-primary);
        }

        /* Переноси рядків автора лишаються. */
        .pc2-cap-text {
            white-space: pre-line;
            overflow-wrap: anywhere;
        }

        .pc2-cap.is-fit {
            display: block;
            -webkit-line-clamp: unset;
        }

        .pc2-cap.is-long {
            cursor: pointer;
        }

        .pc2-cap-name {
            font-weight: 700;
            color: var(--text-primary);
            text-decoration: none;
        }

        .pc2-cap-more {
            display: inline;
            margin: 0;
            padding: 0;
            border: 0;
            background: none;
            color: var(--accent-color, #8849FE);
            font: inherit;
            font-weight: 600;
            cursor: pointer;
            -webkit-tap-highlight-color: transparent;
        }

        .pc2-cap-more[hidden] {
            display: none;
        }

        /* Час · перегляди · коментарі під описом. */
        .pc2-meta > .pc2-time {
            margin-top: 6px;
        }

        .pc2-art-desc + .pc2-time,
        .pc2-art-title + .pc2-time {
            margin-top: 8px;
        }

        body.dark .pc2-cap-more {
            color: #B794FF;
        }

        .pc2-art-title {
            display: block;
            margin-top: 8px;
            font-size: 18px;
            font-weight: 700;
            line-height: 1.28;
            color: var(--text-primary);
            text-decoration: none;
        }

        .pc2-art-desc {
            display: -webkit-box;
            margin: 6px 0 0;
            overflow: hidden;
            -webkit-box-orient: vertical;
            -webkit-line-clamp: 2;
            font-size: 14px;
            line-height: 1.45;
            color: var(--text-secondary);
        }

        /* «Перекласти» — над часом: фіолетовий текст без фону, дрібно
           (власник, 19.10). Фіолетовий і після перекладу. */
        .pc2-tr {
            margin-top: 6px;
        }

        .pc2-tr .tr-btn,
        .pc2-tr .tr-btn.is-on {
            font-size: 13px;
            color: var(--accent-color, #8849FE);
        }

        .pc2-tr .tr-btn svg {
            width: 14px;
            height: 14px;
        }

        .pc2-tr .tr-btn span {
            text-box: trim-both cap alphabetic;
        }

        body.dark .pc2-tr .tr-btn,
        body.dark .pc2-tr .tr-btn.is-on {
            color: #B794FF;
        }

        .pc2 .pc2-art-btn {
            margin-top: 12px;
            border-radius: 16px;
        }

        body.dark .pc2-likes {
            background: rgba(24, 24, 28, .5);
            box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16), inset 0 1px 1px rgba(255, 255, 255, .22), 0 2px 8px rgba(0, 0, 0, .2);
            color: #F3F4F6;
        }

        body.dark .pc2-likes-n,
        body.dark .pc2-likes-n b {
            color: #F3F4F6;
        }

        body.dark .pc2-face,
        body.dark .pc2-fl img,
        body.dark .pc2-fl i {
            border-color: #1C1C21;
        }

        /* ------------------------------- плоска картка — допис без фото,
           стаття без обкладинки, уся стаття на сторінці допису: шапка
           звичайним рядком, текст, рядок дій із лайками праворуч. */
        .pc2--plain .pc2-head {
            position: static;
            padding: 0 14px;
            pointer-events: auto;
        }

        .pc2--plain .pc2-ava {
            filter: none;
        }

        .pc2--plain .pc2-who {
            color: var(--text-primary);
            text-shadow: none;
        }

        .pc2--plain .pc2-name {
            color: var(--text-primary);
        }

        .pc2--plain .pc2-sub {
            color: var(--text-tertiary, #9CA3AF);
        }

        .pc2--plain .pc2-sub svg,
        .pc2--plain .pc2-ver {
            filter: none;
        }

        .pc2--plain .pc2-more {
            background: var(--bg-secondary, #F3F4F6);
            -webkit-backdrop-filter: none;
            backdrop-filter: none;
            color: var(--text-primary);
        }

        body.dark .pc2--plain .pc2-more {
            background: rgba(255, 255, 255, .08);
            color: #F3F4F6;
        }

        .pc2-body {
            padding: 10px 16px 0;
        }

        .pc2--plain .pc2-cap {
            margin-top: 0;
        }

        .pc2-cap--big {
            font-size: 16px;
            line-height: 23px;
            -webkit-line-clamp: 5;
        }

        .pc2-body .pc2-art-title {
            margin-top: 0;
        }

        /* Уся стаття на сторінці допису: поля дає сама картка, а «Стаття ·
           N хв» уже є в шапці — другий такий рядок усередині зайвий. */
        .pc2-body .art-full {
            padding: 0;
        }

        .pc2-body .art-full-kicker {
            display: none;
        }

        /* «Час · перегляди … коментарі» плоскої картки — над діями; під ним лінія від краю до краю картки
           (власник, 21.10: спершу «зверху бордер», потім «зроби бордер під»). Видимі проміжки між рядками тут
           однакові, ~10px: від тексту чи «Перекласти» до кристалів чи часу, кристали → час, час → лінія,
           лінія → «Вподобали», «Вподобали» → дії (власник: «зверху більше, ніж знизу», «не вирівняний»;
           заміряно лінійкою shots/plain_gaps.js — у тексту й значків свій запас, тому поля різні). */
        .pc2-line {
            margin-top: 6px;
            padding: 0 16px 10px;
            border-bottom: 1px solid #EEF0F3;
        }

        /* Без «Перекласти» над рядком — сам текст, у нього запас під буквами менший. */
        .pc2-body:not(:has(.pc2-tr)) + .pc2-line {
            margin-top: 9px;
        }

        body.dark .pc2-line {
            border-bottom-color: #262626;
        }

        /* «💎 N кристалів» — над часом; поки кристалів немає, рядок згорнутий і місця не займає. */
        .pc2-line .pc2-gems-row {
            margin: 0;
        }

        .pc2-line > .pc2-gems:not(.is-shut) + .pc2-time {
            margin-top: 10px;
        }

        /* «Вподобали …» — під лінією, над діями; без вподобайок рядок прихований і місця не займає. */
        .pc2-byrow {
            padding: 0 16px;
        }

        .pc2-byrow > .pc2-by {
            margin-top: 10px;
        }

        .pc2-byrow:has(> .pc2-by:not([hidden])) + .pc2-bar {
            padding-top: 2px;
        }

        .pc2-bar {
            display: flex;
            align-items: center;
            gap: 6px;
            padding: 4px 10px 0 8px;
        }

        .pc2-acts {
            display: flex;
            flex: 0 0 auto;
        }

        .pc2--plain .pc2-dock {
            position: static;
            flex: 1 1 auto;
            min-width: 0;
        }

        .pc2--plain .pc2-likes {
            background: var(--bg-secondary, #F3F4F6);
            -webkit-backdrop-filter: none;
            backdrop-filter: none;
        }

        body.dark .pc2--plain .pc2-likes {
            background: rgba(255, 255, 255, .07);
        }

        @media (prefers-reduced-motion: reduce) {
            .pc2-fl,
            .pc2-burst,
            .pc2-likes.is-swap > *,
            .pc2-in,
            .pc2-out,
            .pc2-out-first {
                animation: none;
            }
        }
    

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

    /* Смужка на місці прихованого допису. */
    .feed-hidden {
        display: flex;
        align-items: center;
        gap: 12px;
        margin-bottom: 12px;
        padding: 12px 14px;
        border-radius: 18px;
        background: var(--card-bg);
        box-shadow: var(--card-shadow);
        animation: fh-in .25s ease both;
    }

    @keyframes fh-in {
        from { opacity: 0; transform: scale(.98); }
    }

    .fh-ico {
        display: flex;
        flex: 0 0 auto;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        border-radius: 12px;
        background: var(--bg-secondary);
        color: var(--text-secondary);
    }

    .fh-ico svg {
        width: 18px;
        height: 18px;
    }

    .fh-t {
        display: flex;
        flex: 1 1 auto;
        flex-direction: column;
        gap: 2px;
        min-width: 0;
    }

    .fh-t b {
        font-size: 14px;
        font-weight: 600;
        color: var(--text-primary);
    }

    .fh-t small {
        display: -webkit-box;
        overflow: hidden;
        font-size: 12px;
        line-height: 1.35;
        color: var(--text-secondary);
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow-wrap: anywhere;
    }

    .fh-undo {
        flex: 0 0 auto;
        height: 32px;
        padding: 0 14px;
        border: none;
        border-radius: 16px;
        background: rgba(136, 73, 254, .12);
        color: var(--accent-color);
        font-family: inherit;
        font-size: 13px;
        font-weight: 600;
        cursor: pointer;
        touch-action: manipulation;
    }

    body.dark .fh-undo {
        background: rgba(136, 73, 254, .22);
        color: #C4A6FF;
    }


    .reels {
        --rl-bar: calc(64px + env(safe-area-inset-bottom, 0px));
        position: fixed;
        inset: 0;
        z-index: 950;
        background: #000;
        color: #fff;
        overscroll-behavior: contain;
        -webkit-user-select: none;
        user-select: none;
        -webkit-tap-highlight-color: transparent;
    }

    .reels[hidden] {
        display: none;
    }

    /* Рамка фокусу — лише з клавіатури, не після дотику чи кліку. */
    .reels button:focus {
        outline: none;
    }

    .reels button:focus-visible {
        outline: 2px solid rgba(255, 255, 255, .7);
        outline-offset: 2px;
        border-radius: 12px;
    }

    .reels.is-anim {
        transition: background-color .28s ease, transform .26s cubic-bezier(.2, .8, .2, 1), opacity .26s ease;
    }

    .reels-safe {
        position: absolute;
        top: 0;
        left: 0;
        width: 1px;
        height: env(safe-area-inset-top, 0px);
        pointer-events: none;
    }

    /* Слайди — над полем «Додайте коментар…», як в Instagram. */
    .reels-scroll {
        position: absolute;
        top: 0;
        right: 0;
        bottom: var(--rl-bar);
        left: 0;
        overflow-x: hidden;
        overflow-y: auto;
        scroll-snap-type: y mandatory;
        overscroll-behavior: contain;
        scrollbar-width: none;
        touch-action: pan-y;
    }

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

    .reels.is-sheet .reels-scroll {
        overflow: hidden;
    }

    .reel {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
        height: 100%;
        overflow: hidden;
        scroll-snap-align: start;
        scroll-snap-stop: always;
        transition: padding .3s cubic-bezier(.2, .8, .2, 1);
    }

    .reel-frame {
        position: relative;
        width: 100%;
        height: 100%;
        overflow: hidden;
        background: #000;
        transform-origin: 50% 0;
    }

    .reel-back {
        position: absolute;
        top: -40px;
        left: -40px;
        width: calc(100% + 80px);
        height: calc(100% + 80px);
        object-fit: cover;
        filter: blur(28px) brightness(.5) saturate(1.2);
        transform: translateZ(0);
        pointer-events: none;
    }

    .reel-poster,
    .reel-frame > video {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        object-fit: contain;
        pointer-events: none;
    }

    .reel.is-cover .reel-poster,
    .reel.is-cover .reel-frame > video {
        object-fit: cover;
    }

    .reel.is-cover .reel-back {
        display: none;
    }

    /* Відео показується з першим кадром (наступне — ще до свого черги), до
       того видно обкладинку, не чорне. */
    .reel-frame > video {
        opacity: 0;
        transition: opacity .12s linear;
    }

    .reel-frame > video.is-ready {
        opacity: 1;
    }

    .reel-shade {
        position: absolute;
        right: 0;
        bottom: 0;
        left: 0;
        height: 42%;
        background: linear-gradient(to top, rgba(0, 0, 0, .55), rgba(0, 0, 0, .2) 55%, rgba(0, 0, 0, 0));
        transition: opacity .25s ease;
        pointer-events: none;
    }

    .reel-wait {
        position: absolute;
        top: 50%;
        left: 50%;
        width: 44px;
        height: 44px;
        margin: -22px 0 0 -22px;
        border: 3px solid rgba(255, 255, 255, .25);
        border-top-color: #fff;
        border-radius: 50%;
        opacity: 0;
        animation: reel-spin .8s linear infinite;
        transition: opacity .2s;
        pointer-events: none;
    }

    .reel.is-wait .reel-wait {
        opacity: 1;
    }

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

    /* ---------------------------------------------- низ слайда: хто й про що */
    .reel-info {
        position: absolute;
        right: 72px;
        bottom: 18px;
        left: 14px;
        z-index: 2;
        transition: opacity .2s ease;
    }

    .reel-who {
        display: flex;
        align-items: center;
        gap: 10px;
        min-width: 0;
    }

    .reel-ava {
        flex: 0 0 auto;
    }

    .reel-ava img {
        display: block;
        width: 34px;
        height: 34px;
        border-radius: 50%;
        object-fit: cover;
        box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .9);
    }

    .reel-name {
        display: flex;
        align-items: center;
        gap: 4px;
        min-width: 0;
        color: #fff;
        font-size: 15px;
        font-weight: 700;
        text-decoration: none;
        text-shadow: 0 1px 2px rgba(0, 0, 0, .35);
    }

    .reel-name span {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .reel-ver,
    .cri-name .reel-ver {
        flex: 0 0 auto;
        width: 15px;
        height: 15px;
        color: #4AA3FF;
    }

    .reel .reel-join {
        flex: 0 0 auto;
        height: 32px;
        margin: 0;
        padding: 0 13px;
        border: 1.5px solid rgba(255, 255, 255, .8);
        border-radius: 10px;
        background: rgba(0, 0, 0, .08);
        color: #fff;
        font-family: inherit;
        font-size: 14px;
        font-weight: 600;
        line-height: 1;
        box-shadow: none;
        cursor: pointer;
    }

    .reel .reel-join.is-on {
        border-color: rgba(255, 255, 255, .35);
        color: rgba(255, 255, 255, .85);
    }

    .reel .reel-join.is-busy {
        opacity: .6;
    }

    /* Підпис — один рядок; дотик відкриває шторку з усім описом. */
    .reel-cap {
        display: block;
        width: 100%;
        margin: 10px 0 0;
        padding: 0;
        border: none;
        background: none;
        color: #fff;
        font-family: inherit;
        font-size: 14.5px;
        line-height: 1.35;
        text-align: left;
        text-shadow: 0 1px 2px rgba(0, 0, 0, .45);
        cursor: pointer;
    }

    .reel-cap span {
        display: block;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .reel-friends {
        display: flex;
        align-items: center;
        gap: 8px;
        margin-top: 10px;
        color: rgba(255, 255, 255, .82);
        font-size: 13px;
        text-shadow: 0 1px 2px rgba(0, 0, 0, .4);
    }

    .reel-faces {
        display: flex;
        flex: 0 0 auto;
    }

    .reel-faces img {
        width: 20px;
        height: 20px;
        border-radius: 50%;
        object-fit: cover;
        box-shadow: 0 0 0 1.5px #000;
    }

    .reel-faces img + img {
        margin-left: -6px;
    }

    .reel-friends-t {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .reel-friends-t b {
        color: #fff;
        font-weight: 600;
    }

    /* Смуга — тонка лінія внизу відео; дотик її товщає й перемотує. */
    .reel-bar {
        position: absolute;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 3;
        height: 14px;
        cursor: pointer;
        touch-action: none;
    }

    .reel-bar::before,
    .reel-bar i {
        position: absolute;
        bottom: 0;
        left: 0;
        height: 2px;
        transition: height .15s;
    }

    .reel-bar::before {
        content: '';
        right: 0;
        background: rgba(255, 255, 255, .22);
    }

    .reel-bar i {
        width: 0;
        background: #fff;
    }

    .reel-bar.is-seeking::before,
    .reel-bar.is-seeking i,
    .reel-bar:hover::before,
    .reel-bar:hover i {
        height: 4px;
    }

    /* ---------------------------------------------- праворуч: дії з числами */
    .reel-side {
        position: absolute;
        right: 6px;
        bottom: 22px;
        z-index: 2;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 18px;
        transition: opacity .2s ease;
    }

    .reel-act {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 4px;
        width: 56px;
        padding: 0;
        border: none;
        background: none;
        color: #fff;
        font-family: inherit;
        cursor: pointer;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }

    .reel-act svg {
        width: 30px;
        height: 30px;
        stroke-width: 1.8;
        filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .35));
        transition: transform .15s ease;
    }

    .reel-act:active svg {
        transform: scale(.88);
    }

    .reel-act b {
        min-height: 16px;
        font-size: 13px;
        font-weight: 600;
        line-height: 16px;
        text-shadow: 0 1px 2px rgba(0, 0, 0, .45);
        font-variant-numeric: tabular-nums;
    }

    .reel-act b:empty {
        display: none;
    }

    .reel-like.is-on svg {
        fill: #FF3040;
        stroke: #FF3040;
    }

    .reel-like.is-pop svg {
        animation: reel-pop .4s cubic-bezier(.3, 1.6, .5, 1);
    }

    @keyframes reel-pop {
        40% { transform: scale(1.3); }
    }

    .reel-burst {
        position: absolute;
        z-index: 4;
        width: 96px;
        height: 96px;
        margin: -48px 0 0 -48px;
        pointer-events: none;
        animation: reel-burst .9s cubic-bezier(.2, .8, .2, 1) forwards;
    }

    .reel-burst svg {
        width: 100%;
        height: 100%;
        fill: #FF3040;
        stroke: none;
        filter: drop-shadow(0 4px 14px rgba(0, 0, 0, .3));
    }

    @keyframes reel-burst {
        0% { opacity: 0; transform: scale(.3) rotate(var(--rot, -12deg)); }
        18% { opacity: 1; transform: scale(1.15) rotate(var(--rot, -12deg)); }
        32% { transform: scale(.95) rotate(var(--rot, -12deg)); }
        70% { opacity: 1; transform: scale(1) rotate(var(--rot, -12deg)) translateY(0); }
        100% { opacity: 0; transform: scale(1.05) rotate(var(--rot, -12deg)) translateY(-70px); }
    }

    /* ---------------------------------------------- верх: «назад» і звук */
    .reels-top {
        position: absolute;
        top: 0;
        right: 0;
        left: 0;
        z-index: 5;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: calc(6px + env(safe-area-inset-top, 0px)) 8px 26px;
        background: linear-gradient(to bottom, rgba(0, 0, 0, .35), rgba(0, 0, 0, 0));
        pointer-events: none;
        transition: opacity .2s ease;
    }

    .reels-ico {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        padding: 0;
        border: none;
        background: none;
        color: #fff;
        cursor: pointer;
        pointer-events: auto;
        -webkit-tap-highlight-color: transparent;
    }

    .reels-ico svg {
        width: 28px;
        height: 28px;
        filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .4));
    }

    .reels .rl-i-off,
    .reels.is-muted .rl-i-on {
        display: none;
    }

    .reels.is-muted .rl-i-off {
        display: block;
    }

    .reels-nav {
        position: absolute;
        top: 50%;
        right: 24px;
        z-index: 5;
        display: none;
        flex-direction: column;
        gap: 12px;
        transform: translateY(-50%);
    }

    .reels-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 46px;
        height: 46px;
        padding: 0;
        border: none;
        border-radius: 50%;
        background: rgba(40, 40, 46, .42);
        box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18), inset 0 1px 1px rgba(255, 255, 255, .3);
        color: #fff;
        cursor: pointer;
        -webkit-backdrop-filter: blur(14px) saturate(180%);
        backdrop-filter: blur(14px) saturate(180%);
    }

    .reels-btn:hover {
        background: rgba(60, 60, 68, .55);
    }

    .reels-btn:disabled {
        opacity: .35;
        cursor: default;
    }

    .reels-btn svg {
        width: 22px;
        height: 22px;
    }

    /* ---------------------------------------------- посередині: пауза й звук */
    .reels-mid {
        position: absolute;
        top: calc((100% - var(--rl-bar)) / 2);
        left: 50%;
        z-index: 4;
        display: none;
        flex-direction: column;
        align-items: center;
        gap: 16px;
        transform: translate(-50%, -50%);
        pointer-events: none;
    }

    .reels.is-paused .reels-mid,
    .reels.is-flash .reels-mid {
        display: flex;
    }

    .reels-mute {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        padding: 0;
        border: none;
        border-radius: 50%;
        background: rgba(30, 30, 34, .55);
        color: #fff;
        cursor: pointer;
        pointer-events: auto;
        -webkit-backdrop-filter: blur(10px);
        backdrop-filter: blur(10px);
        animation: reel-in .2s ease;
    }

    .reels-mute svg {
        width: 20px;
        height: 20px;
    }

    .reels-paused {
        display: none;
        align-items: center;
        justify-content: center;
        width: 72px;
        height: 72px;
        padding-left: 4px;
        border-radius: 50%;
        background: rgba(30, 30, 34, .5);
        -webkit-backdrop-filter: blur(14px) saturate(180%);
        backdrop-filter: blur(14px) saturate(180%);
        animation: reel-in .22s cubic-bezier(.3, 1.4, .5, 1);
    }

    .reels.is-paused .reels-paused {
        display: flex;
    }

    .reels-paused svg {
        width: 32px;
        height: 32px;
    }

    @keyframes reel-in {
        from { opacity: 0; transform: scale(.7); }
    }

    .reels-hint {
        position: absolute;
        top: calc(60px + env(safe-area-inset-top, 0px));
        left: 50%;
        z-index: 5;
        display: inline-flex;
        align-items: center;
        gap: 8px;
        max-width: calc(100% - 28px);
        height: 36px;
        padding: 0 14px;
        border: none;
        border-radius: 18px;
        background: rgba(30, 30, 34, .6);
        color: #fff;
        font-family: inherit;
        font-size: 13px;
        font-weight: 600;
        white-space: nowrap;
        transform: translateX(-50%);
        cursor: pointer;
        -webkit-backdrop-filter: blur(14px);
        backdrop-filter: blur(14px);
        animation: reel-in .22s ease;
    }

    .reels-hint[hidden] {
        display: none;
    }

    .reels-hint svg {
        width: 18px;
        height: 18px;
    }

    /* ---------------------------------------------- під відео: поле коментаря */
    .reels-bar {
        position: absolute;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 5;
        display: flex;
        align-items: flex-start;
        height: var(--rl-bar);
        padding: 9px 12px env(safe-area-inset-bottom, 0px);
        background: #000;
        transition: opacity .2s ease;
    }

    .reels-say {
        display: flex;
        align-items: center;
        width: 100%;
        height: 46px;
        padding: 0 18px;
        border: 1px solid rgba(255, 255, 255, .14);
        border-radius: 23px;
        background: rgba(255, 255, 255, .07);
        color: rgba(255, 255, 255, .62);
        font-family: inherit;
        font-size: 15px;
        text-align: left;
        cursor: text;
    }

    /* Затиснув — пауза й чистий екран. */
    .reels.is-hold .reel-info,
    .reels.is-hold .reel-side,
    .reels.is-hold .reel-shade,
    .reels.is-hold .reels-top,
    .reels.is-hold .reels-hint {
        opacity: 0;
    }

    /* Шторка відкрита — відео зменшене вгорі, решта ховається. */
    .reels.is-sheet .reel-info,
    .reels.is-sheet .reel-side,
    .reels.is-sheet .reel-shade,
    .reels.is-sheet .reels-top,
    .reels.is-sheet .reels-bar,
    .reels.is-sheet .reels-nav,
    .reels.is-sheet .reels-hint,
    .reels.is-sheet .reels-mid {
        opacity: 0;
        pointer-events: none;
    }

    /* ---------------------------------------------- останній слайд */
    .reel-end {
        background: radial-gradient(120% 80% at 50% 30%, #1d1430 0%, #000 70%);
    }

    .reel-end-box {
        display: flex;
        flex-direction: column;
        align-items: center;
        max-width: 300px;
        padding: 0 24px;
        text-align: center;
    }

    .reel-end-ico {
        width: 64px;
        height: 64px;
        margin-bottom: 16px;
    }

    .reel-end-ico svg {
        display: block;
        width: 100%;
        height: 100%;
    }

    .reel-end-box b {
        font-size: 19px;
        font-weight: 700;
    }

    .reel-end-box > span:not(.reel-end-ico) {
        margin-top: 6px;
        color: rgba(255, 255, 255, .72);
        font-size: 14px;
        line-height: 1.4;
    }

    .reel-end-btn {
        height: 42px;
        margin-top: 22px;
        padding: 0 22px;
        border: none;
        border-radius: 21px;
        background: #fff;
        color: #111;
        font-family: inherit;
        font-size: 14px;
        font-weight: 700;
        cursor: pointer;
    }

    /* ---------------------------------------------- «про допис» у шторці */
    .cri {
        padding: 4px 16px 16px;
        border-bottom: 1px solid var(--border-color, #EEF0F3);
        color: var(--text-primary);
    }

    body.dark .cri {
        border-color: #262626;
    }

    .cri-who {
        display: flex;
        align-items: center;
        gap: 10px;
        min-width: 0;
    }

    .cri-ava img {
        display: block;
        width: 36px;
        height: 36px;
        border-radius: 50%;
        object-fit: cover;
    }

    .cri-name {
        display: flex;
        flex: 1 1 auto;
        align-items: center;
        gap: 4px;
        min-width: 0;
        color: var(--text-primary);
        font-size: 15px;
        font-weight: 700;
        text-decoration: none;
    }

    .cri-name span {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .cri .cri-join {
        flex: 0 0 auto;
        height: 32px;
        margin: 0;
        padding: 0 14px;
        border: none;
        border-radius: 10px;
        background: var(--accent-color, #8849FE);
        color: #fff;
        font-family: inherit;
        font-size: 14px;
        font-weight: 600;
        box-shadow: none;
        cursor: pointer;
    }

    .cri .cri-join.is-on {
        background: var(--bg-secondary);
        color: var(--text-primary);
    }

    .cri-text {
        margin-top: 12px;
        font-size: 15px;
        line-height: 1.45;
        white-space: pre-line;
        overflow-wrap: anywhere;
        user-select: text;
        -webkit-user-select: text;
    }

    .cri-meta {
        margin-top: 12px;
        color: var(--text-secondary);
        font-size: 13.5px;
    }

    .cri-tr {
        margin-top: 8px;
    }

    .cri-chips {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        margin-top: 12px;
    }

    .cri-chip {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        height: 34px;
        padding: 0 12px;
        border-radius: 17px;
        background: var(--bg-secondary);
        color: var(--text-primary);
        font-size: 13.5px;
        font-weight: 600;
        text-decoration: none;
    }

    .cri-chip > svg {
        width: 15px;
        height: 15px;
        color: var(--text-secondary);
    }

    /* Тема — назвою кольору її значка, без значка (власник 20.10.2026: значок
       лише на сторінці групи). Свої стилі: каталожних на головній немає. */
    .cri-chip .gt-tx {
        color: color-mix(in srgb, var(--gt-b, #7C3AED) 78%, #000);
    }

    body.dark .cri-chip .gt-tx {
        color: var(--gt-a, #A78BFA);
    }

    /* ---------------------------------------------- ПК */
    @media (min-width: 768px) {
        .reels {
            --rl-bar: 0px;
        }

        .reels-bar {
            display: none;
        }

        .reel {
            gap: 16px;
            padding: 20px 0;
        }

        .reels.is-sheet .reel.is-current {
            padding-right: 420px;
        }

        .reel-frame {
            width: auto;
            max-width: calc(100vw - 260px);
            height: 100%;
            aspect-ratio: var(--fr, .5625);
            border-radius: 14px;
        }

        .reel-side {
            position: static;
            align-self: flex-end;
            padding-bottom: 8px;
        }

        .reel-info {
            right: 14px;
        }

        .reels-nav {
            display: flex;
        }

        .reels.is-sheet .reel-side {
            opacity: 1;
            pointer-events: auto;
        }
    }

    @media (prefers-reduced-motion: reduce) {
        .reel-burst {
            animation-duration: .01s;
        }
    }


    /* =====================================================================
       Аркуш коментарів
       ---------------------------------------------------------------------
       Знизу вгору: шапка зі стрілкою назад і назвою з лічильником, стрічка,
       рядок відповіді, швидкі реакції, форма. Усі кольори — з токенів
       застосунку; свого тут немає жодного.
       ==================================================================== */

    /* Простий стос на весь екран: шапка, список, форма. Нічого не міряємо й
       нічого не посуваємо під клавіатуру — з нею браузер розбирається сам, як
       і на решті сторінок. */
    .comments-modal {
        position: fixed;
        inset: 0;
        z-index: 1000;
        display: none;
        flex-direction: column;
        height: 100vh;
        height: 100dvh;
        /* Білим, а не --bg-primary: у світлій темі цей токен — #E5E7EB, тобто
           сірий фон сторінки. Аркуш — це аркуш, він білий. */
        background: #FFFFFF;
        /* Виїжджає справа, як читач статті (власник, 19.10: «модалка статті
           гарно збоку виїжджає, так само треба і коментарі»); закривається
           свайпом праворуч. */
        transform: translate3d(100%, 0, 0);
        transition: transform .34s cubic-bezier(.2, .8, .2, 1);
        will-change: transform;
        box-shadow: -18px 0 40px rgba(0, 0, 0, .16);
    }

    .comments-modal.active {
        display: flex;
    }

    .comments-modal.is-shown {
        transform: none;
    }

    .comments-modal.is-dragging {
        transition: none;
    }

    /* ---- шторка (Reels, власник 20.10.2026: «коли розгортаю інфу — як в
       Instagram, але нашими стилями») ----------------------------------------
       openComments(id, { sheet: true, top, info }) — той самий аркуш, але
       знизу під зменшеним відео: заокруглений верх, «вушко», угорі блок «про
       допис» (info), далі коментарі. Тягнеш за вушко вгору — на весь екран,
       униз — закрити. З комп'ютера — панель праворуч. */
    .comments-grip {
        display: none;
    }

    .comments-info[hidden] {
        display: none;
    }

    .comments-modal.is-sheet {
        top: var(--cs-top, 40%);
        height: auto;
        border-radius: 22px 22px 0 0;
        transform: translate3d(0, 100%, 0);
        box-shadow: 0 -10px 40px rgba(0, 0, 0, .28);
        transition: transform .34s cubic-bezier(.2, .8, .2, 1), top .3s cubic-bezier(.2, .8, .2, 1), border-radius .3s;
        overflow: hidden;
    }

    .comments-modal.is-sheet.is-shown {
        transform: none;
    }

    .comments-modal.is-sheet.is-full {
        top: 0;
        border-radius: 0;
    }

    .comments-modal.is-sheet.is-dragging {
        transition: none;
    }

    .comments-modal.is-sheet .comments-grip {
        position: relative;
        display: block;
        flex: none;
        height: 22px;
        cursor: grab;
        touch-action: none;
    }

    /* Вушко — на тлі шапки, одним шматком із нею. */
    .comments-modal.is-sheet .comments-grip {
        background: #FFFFFF;
    }

    body.dark .comments-modal.is-sheet .comments-grip {
        background: #1a1a1a;
    }

    .comments-grip::before {
        content: '';
        position: absolute;
        top: 9px;
        left: 50%;
        width: 40px;
        height: 5px;
        margin-left: -20px;
        border-radius: 3px;
        background: #D1D5DB;
    }

    body.dark .comments-grip::before {
        background: #3F3F46;
    }

    .comments-modal.is-sheet .comments-header {
        min-height: 44px;
        padding-top: 0;
        padding-bottom: 8px;
        touch-action: none;
    }

    .comments-modal.is-sheet .comments-back svg {
        transform: rotate(-90deg);
    }

    @media (min-width: 768px) {
        .comments-modal.is-sheet {
            top: 0;
            left: auto;
            width: 420px;
            border-radius: 0;
            transform: translate3d(100%, 0, 0);
            box-shadow: -18px 0 40px rgba(0, 0, 0, .28);
        }

        .comments-modal.is-sheet .comments-grip {
            display: none;
        }

        .comments-modal.is-sheet .comments-header {
            padding-top: 9px;
        }

        .comments-modal.is-sheet .comments-back svg {
            transform: none;
        }
    }

    @media (prefers-reduced-motion: reduce) {
        .comments-modal {
            transition: none;
        }
    }

    /* Текст у списку не виділяється.
       Меню відкривається затиском — а затиск це рівно той самий жест, яким
       браузер починає виділяти слово й показує своє «копіювати». Виходило
       двоє меню на один палець. Копіювання нікуди не поділося: воно в картці,
       і бере текст із самого рядка.

       Форма — виняток: там пишуть, там виділення потрібне. */
    .comments-body {
        user-select: none;
        -webkit-user-select: none;
        -webkit-touch-callout: none;
    }

    .comments-modal .input-wrapper,
    .comments-modal .message-input {
        user-select: text;
        -webkit-user-select: text;
        -webkit-touch-callout: default;
    }

    /* Піднятий рядок лишається на своєму білому: завіса затемнює те, що ПІД
       ним, а не його самого. Без власного фону крізь рядок просвічував
       притемнений аркуш, і виділене виглядало темнішим за решту. */
    .comment-item.hold-lifted {
        background: #FFFFFF;
    }

    body.dark .comment-item.hold-lifted {
        background: #0f0f0f;
    }

    body.dark .comments-modal {
        background: #0f0f0f;
    }

    /* ---- шапка ---------------------------------------------------------- */

    .comments-header {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        min-height: 56px;
        padding: 9px 64px;
        border-bottom: 1px solid var(--border-color, #EEF0F3);
        background: #FFFFFF;
        flex: none;
    }

    body.dark .comments-header {
        background: #1a1a1a;
        border-color: #262626;
    }

    /* Та сама кнопка, що в шапці сайту: сіра плитка 36×36 із заокругленням 10
       і стрілкою поверх неї. Розміри й кольори взяті з .back-btn у main.css —
       щоб повернення звідси виглядало так само, як повернення звідусіль. */
    .comments-back {
        position: absolute;
        left: 16px;
        top: 50%;
        transform: translateY(-50%);
        width: 36px;
        height: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0;
        border: none;
        border-radius: 10px;
        background: #F3F4F6;
        color: var(--text-primary, #111827);
        cursor: pointer;
        transition: background .2s;
    }

    .comments-back:hover {
        background: #E5E7EB;
    }

    body.dark .comments-back {
        background: #262626;
    }

    body.dark .comments-back:hover {
        background: #333333;
    }

    .comments-back svg {
        width: 20px;
        height: 20px;
        display: block;
    }

    /* Одним кольором. Число раніше писалося сірим окремим шматком — виходив
       заголовок із двох частин там, де мала бути одна фраза. */
    .comments-title {
        font-size: 16px;
        font-weight: 700;
        color: var(--text-primary, #111827);
        line-height: 1.2;
        font-variant-numeric: tabular-nums;
    }

    /* ---- стрічка -------------------------------------------------------- */

    /* Фон тут названо явно, а не залишено «як вийде»: у main.css під списком
       лежав --bg-secondary, і аркуш був білий лише по краях, а всередині
       сірий. Оболонка аркуша належить цьому файлу — отже, і фон теж. */
    .comments-body {
        flex: 1;
        overflow-y: auto;
        padding: 4px 0 8px;
        background: #FFFFFF;
    }

    body.dark .comments-body {
        background: #0f0f0f;
    }

/* Замість кнопки «Завантажити ще» — вартовий у кінці списку, так само як у
       стрічці: доїхав до нього — наступна сторінка вже їде. Видимий він лише
       поки є що вантажити, і несе тільки кружечок. */
    .comments-more {
        display: flex;
        align-items: center;
        justify-content: center;
        height: 46px;
    }

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

    .comments-more::before {
        content: '';
        width: 18px;
        height: 18px;
        border-radius: 50%;
        border: 2px solid var(--border-color, #E5E7EB);
        border-top-color: var(--accent-color, #8849FE);
        animation: comments-spin .7s linear infinite;
    }

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

    /* ---- один коментар -------------------------------------------------- */

    /* Щільніше по вертикалі: між сусідніми коментарями стояло стільки ж
       повітря, скільки всередині одного, і список читався як список карток, а
       не як розмова. */
    .comment-item {
        display: flex;
        align-items: flex-start;
        gap: 10px;
        padding: 6px 14px;
    }

    /* Відстань між коментарями й між відповідями задається тут, а не в
       main.css: там на .comments-list і .comment-replies висить gap: 10px. */
    .comments-list,
    .comment-replies {
        gap: 2px;
    }

    /* Закріплений — такий самий на вигляд, як усі: підсвітка робила з нього
       сіру плиту посеред білого аркуша. Що він закріплений, каже шпилька. */
    .comment-item.is-pinned {
        background: none;
    }

    .comment-avatar {
        flex: 0 0 auto;
        width: 34px;
        height: 34px;
        border-radius: 50%;
        object-fit: cover;
        background: var(--bg-secondary, #E5E7EB);
    }

    /* min-width:0, щоб довге слово переносилося, а не відпихало серце. */
    .comment-body {
        flex: 1 1 auto;
        min-width: 0;
    }

    .comment-author {
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        gap: 5px;
        font-size: 12.5px;
        line-height: 1.3;
    }

    .comment-name {
        font-weight: 600;
        color: var(--text-primary, #111827);
        text-decoration: none;
    }

    .comment-time {
        color: var(--text-tertiary, #9CA3AF);
    }

    .comment-tag {
        display: inline-flex;
        align-items: center;
        gap: 3px;
        color: var(--text-tertiary, #9CA3AF);
    }

    /* Шпилька без розміру бралася за 24px від бібліотеки іконок — поруч із
       12-піксельним підписом це виглядало як помилка верстки. */
    .comment-tag svg,
    .comment-tag i[data-lucide] {
        width: 13px;
        height: 13px;
        display: block;
    }

    /* «Автор» — не просто ще один сірий підпис: це те, заради чого на нього
       дивляться. */
    .comment-tag.is-author {
        color: var(--accent-color, #8849FE);
        font-weight: 600;
    }

    .comment-text {
        margin-top: 2px;
        font-size: 13.5px;
        line-height: 1.42;
        color: var(--text-primary, #111827);
        overflow-wrap: anywhere;
    }

    .comment-mention {
        color: var(--accent-color, #8849FE);
        text-decoration: none;
    }

    .comment-actions {
        display: flex;
        align-items: center;
        gap: 14px;
        margin-top: 4px;
    }

    .comment-action-btn {
        padding: 0;
        border: none;
        background: none;
        color: var(--text-tertiary, #9CA3AF);
        font-family: inherit;
        font-size: 12px;
        font-weight: 600;
        cursor: pointer;
    }

    .comment-action-btn:hover {
        color: var(--text-secondary, #6B7280);
    }

    /* Серце й число — В ОДИН РЯДОК. Числом під іконкою воно з'їжджало вниз і
       читалося як окремий підпис, а не як лічильник цього серця. */
    .comment-like {
        flex: 0 0 auto;
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 5px;
        padding: 2px 0 0;
        border: none;
        background: none;
        color: var(--text-tertiary, #9CA3AF);
        cursor: pointer;
    }

    .comment-like svg,
    .comment-like i[data-lucide] {
        width: 17px;
        height: 17px;
        display: block;
    }

    .comment-like.is-liked {
        color: #EF4444;
    }

    .comment-like.is-liked svg {
        fill: currentColor;
    }

    .comment-like-count {
        font-size: 12px;
        font-weight: 600;
        font-variant-numeric: tabular-nums;
    }

    /* ---- відповіді ------------------------------------------------------ */

    /* Гілка. Відступ лишається — він і показує вкладеність; смужки збоку не
       треба, вона тільки додає ліній на й так неспокійний екран.
       (У main.css тут border-left, тому й знімаємо явно.) */
    .comment-replies {
        margin-top: 2px;
        padding-left: 44px;
        border-left: none;
    }

    /* ОБОВ'ЯЗКОВО. Гілку ховає атрибут hidden, а в main.css у .comment-replies
       стоїть display:flex — і атрибут програє будь-якому чужому display. Саме
       через це «Сховати відповіді» нічого не ховало: клас перемикався, текст
       кнопки мінявся, а гілка лишалася на екрані. */
    .comment-replies[hidden] {
        display: none;
    }

    /* Праворуч — той самий відступ, що й у верхніх коментарів: серце й меню
       відповіді мають стояти рівно під серцем і меню того, кому відповідають. */
    .comment-replies .comment-item {
        padding-left: 0;
        padding-right: 14px;
    }

    .comment-replies .comment-avatar {
        width: 26px;
        height: 26px;
    }

    .comment-replies-toggle {
        display: flex;
        align-items: center;
        gap: 10px;
        margin-top: 6px;
        padding: 0;
        border: none;
        background: none;
        color: var(--text-tertiary, #9CA3AF);
        font-family: inherit;
        font-size: 12px;
        font-weight: 600;
        cursor: pointer;
    }

    .comment-replies-toggle::before {
        content: '';
        width: 22px;
        height: 1px;
        background: currentColor;
        opacity: .5;
    }

    /* Наведення тут не буває взагалі.
       На сенсорному екрані :hover не знімається сам: тапнув один раз — і рядок
       так і лишився чорним, ніби вибраний. А відрізнити «навів» від «тапнув»
       CSS не вміє, тому просто нічого не міняємо. У main.css на цей рядок
       висить і колір, і підкреслювання — знімаємо обидва. */
    .comment-replies-toggle:hover {
        text-decoration: none;
        color: var(--text-tertiary, #9CA3AF);
    }

    /* Згадка на початку відповіді — те, що замінює вкладеність: видно, кому
       відповідають, і при цьому все лежить в одній гілці. */
    .comment-text .comment-mention {
        font-weight: 600;
    }

    /* ---- рядок «відповідаю на» ------------------------------------------ */

    /* Той самий, що над формою в чаті. Без нього відповідь нічим не
       відрізняється від нового коментаря — ані на вигляд, ані на дотик. */
    /* Фон бере від низу аркуша: свій колір робив із нього окрему смугу.
       Лінія зверху лишається — вона тут за розділювач, і видно її лише поки
       справді комусь відповідаєш. */
    .comments-reply-bar {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 8px 16px;
        border-top: 1px solid var(--border-color, #EEF0F3);
        background: transparent;
        flex: none;
    }

    .comments-reply-bar[hidden] {
        display: none;
    }

    body.dark .comments-reply-bar {
        border-color: #262626;
    }

    .comments-reply-bar > svg {
        width: 18px;
        height: 18px;
        flex: none;
        color: var(--accent-color, #8849FE);
    }

    .crb-text {
        flex: 1 1 auto;
        min-width: 0;
        border-left: 2px solid var(--accent-color, #8849FE);
        padding-left: 8px;
    }

    .crb-title {
        font-size: 12.5px;
        font-weight: 700;
        color: var(--accent-color, #8849FE);
    }

    .crb-quote {
        font-size: 12.5px;
        color: var(--text-tertiary, #9CA3AF);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .crb-close {
        flex: none;
        width: 30px;
        height: 30px;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0;
        border: none;
        border-radius: 50%;
        background: none;
        color: var(--text-tertiary, #9CA3AF);
        cursor: pointer;
    }

    .crb-close svg {
        width: 16px;
        height: 16px;
    }

    /* ---- форма ---------------------------------------------------------- */

    /* Низ аркуша — рядок відповіді разом із формою. Клавіатура підводить саме
       його, і робить це transform'ом: він рухає намальоване, не чіпаючи
       розмітки. Тому висота списку не міняється, рядки не перескакують і
       місце, на якому читали, лишається на місці. */
    /* Низ аркуша: рядок відповіді й форма. Простим шматком у кінці стосу. */
    .comments-foot {
        flex: none;
        background: #FFFFFF;
    }

    body.dark .comments-foot {
        background: #0f0f0f;
    }

    /* Рядка швидких смайлів більше немає: свої смайли вже є в панелі, і другий
       набір поруч із нею — це два різні відповіді на те саме питання.

       .input-container і .input-wrapper приходять із main.css — ті самі, що в
       чаті. Тут лишається тільки те, чого в них немає. */
    /* Ані свого фону, ані рамки зверху: під полем виходила біла смуга з
       лінією — окремий блок там, де має бути просто низ аркуша. Саме поле
       уже має власну форму, більше нічого малювати не треба. */
    /* По центру, а не по нижньому краю. У чаті поле росте вгору на кілька
       рядків, і низ там — правильна опора; у коментарі рядок майже завжди
       один, і текст при опорі на низ стояв вище за кнопки поруч.
       min-height теж знімаємо: воно робило поле вищим за свій рядок, і
       вирівнювати було вже нічого. */
    /* Ліворуч аватар, тож зліва відступ такий самий, як справа: інакше він
       стояв би глибше в полі, ніж кнопки з того боку. */
    .comments-modal .input-wrapper {
        align-items: center;
        padding-left: 8px;
    }

    .comments-modal .message-input {
        min-height: 0;
    }

    /* Аватар — рівно як кнопка смайлів, ліворуч від тексту. */
    .comments-me {
        width: 25px;
        height: 25px;
        border-radius: 50%;
        object-fit: cover;
        flex-shrink: 0;
        background: var(--bg-secondary, #E5E7EB);
    }

    .comments-modal .input-container,
    body.dark .comments-modal .input-container {
        padding-top: 8px;
        background: transparent;
        border-top: none;
    }

    .comments-modal .message-input {
        max-height: 120px;
        overflow-y: auto;
    }

    .comments-modal .emoji-button {
        background: none;
        border: none;
        padding: 0;
        margin: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        cursor: pointer;
    }

    .comments-modal .emoji-button svg {
        width: 25px;
        height: 25px;
        color: #9CA3AF;
        transition: color .2s;
    }

    /* Тільки там, де наведення справжнє: на сенсорному екрані :hover не
       знімається сам, і кнопка лишалася б підсвіченою після закриття панелі. */
    @media (hover: hover) and (pointer: fine) {
        .comments-modal .emoji-button:hover svg {
            color: var(--accent-color, #8849FE);
        }
    }

    .comments-modal .emoji-button.is-on svg {
        color: var(--accent-color, #8849FE);
    }

    /* Рівно та сама плитка, що й у кнопки смайлів: її видимий розмір — це
       25×25 іконки. Кружечок на 34 стирчав поруч із нею більшим за все інше в
       рядку. */
    .comments-send {
        width: 25px;
        height: 25px;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0;
        border: none;
        border-radius: 50%;
        background: var(--accent-color, #8849FE);
        color: #fff;
        cursor: pointer;
        flex-shrink: 0;
        transition: background .2s, opacity .2s;
    }

    .comments-send:disabled {
        background: #D1D5DB;
        cursor: default;
    }

    body.dark .comments-send:disabled {
        background: #374151;
    }

    .comments-send svg {
        width: 15px;
        height: 15px;
        display: block;
    }



        /* Завіса. Лежить ПІД піднятим рядком — усе, що по ній влучило, за
           визначенням є дотиком повз. */
        .hold-veil {
            position: fixed;
            inset: 0;
            z-index: 1400;
            display: none;
            background-color: rgba(10, 10, 15, 0);
            transition: background-color .2s ease;
        }

        .hold-veil.is-open {
            display: block;
        }

        .hold-veil.is-shown {
            background-color: rgba(10, 10, 15, .5);
        }

        /* Підіймаємо на місці, без transform: він зробив би з рядка окремий шар
           і власний контейнер — саме той клас проблем, від якого чати свого
           часу тікали. */
        .hold-lifted {
            position: relative;
            z-index: 1401;
        }

        body.hold-open {
            overflow: hidden;
        }

        /* Картка. Розміри й кольори — з .reaction-picker у room.css. */
        .hold-card {
            position: fixed;
            z-index: 1402;
            min-width: 220px;
            max-width: calc(100vw - 24px);
            overflow-y: auto;
            overscroll-behavior: contain;
            padding: 4px 0;
            border-radius: 16px;
            background: #FFFFFF;
            box-shadow: 0 12px 40px rgba(0, 0, 0, .3);
            opacity: 0;
            transform: scale(.92);
            transition: opacity .2s ease, transform .22s cubic-bezier(.2, .9, .3, 1);
        }

        .hold-card.is-shown {
            opacity: 1;
            transform: scale(1);
        }

        body.dark .hold-card {
            background: #262626;
            box-shadow: 0 12px 40px rgba(0, 0, 0, .55);
        }

        .hold-card-item {
            display: flex;
            align-items: center;
            gap: 10px;
            width: 100%;
            padding: 11px 15px;
            border: none;
            background: none;
            font-family: inherit;
            font-size: 14px;
            text-align: left;
            color: #374151;
            cursor: pointer;
            transition: background .15s;
        }

        body.dark .hold-card-item {
            color: #d1d5db;
        }

        .hold-card-item.danger {
            color: #EF4444;
        }

        /* Тільки там, де наведення справжнє: на сенсорному екрані :hover не
           знімається сам, і рядок лишався б підсвіченим після дотику. */
        @media (hover: hover) and (pointer: fine) {
            .hold-card-item:hover {
                background: #F3F4F6;
            }

            body.dark .hold-card-item:hover {
                background: rgba(255, 255, 255, .08);
            }
        }

        .hold-card-item svg,
        .hold-card-item i[data-lucide] {
            width: 16px;
            height: 16px;
            flex: none;
        }
    

        /* Коментар до блоку — у самому аркуші, як поле скарги (.rp-note). */
        .gb-note {
            display: block;
            width: 100%;
            min-height: 76px;
            padding: 12px 14px;
            border: none;
            border-radius: 14px;
            background: var(--as-card);
            font-family: inherit;
            font-size: 15px;
            line-height: 1.4;
            color: var(--as-text);
            resize: none;
        }

        .gb-note:focus {
            outline: 2px solid var(--as-accent);
            outline-offset: -2px;
        }

        .gb-note-wrap {
            margin-bottom: 10px;
        }

        .gb-left {
            margin: 6px 4px 0;
            font-size: 12px;
            text-align: right;
            color: var(--as-sub);
        }
    

    /* ------------------------------------------------------- поле вводу */

    /* Той самий вигляд, що й у <textarea>, якою воно було. Різниці дві:
       контейнеру треба min-width, бо flex-елемент інакше не дає собі
       звузитися, і потрібна власна прокрутка, бо max-height у div не
       прокручується сам. */
    .message-input[contenteditable] {
        min-width: 0;
        overflow-y: auto;
        overflow-x: hidden;
        white-space: pre-wrap;
        overflow-wrap: anywhere;
        -webkit-user-modify: read-write-plaintext-only;
    }

    /* Підказка. У div немає placeholder, тож це єдиний спосіб — і :empty тут
       працює тільки тому, що поле справді лишається порожнім: жодного <br>
       про запас у нього не кладеться. */
    .message-input[contenteditable]:empty::before {
        content: attr(data-placeholder);
        color: #9CA3AF;
        pointer-events: none;
        display: block;
    }

    body.dark .message-input[contenteditable]:empty::before {
        color: #6b7280;
    }

    .message-input[contenteditable] .emo {
        width: 1.5em;
        height: 1.5em;
        vertical-align: -0.35em;
    }


    /* Панель — сусід форми в тому самому контейнері, тож ширину й відступи з
       боків вона дістає задарма: їх задає сам .input-container. Лишається не
       додати власних.

       Висота на шосту меншає проти першого варіанта: половина екрана під
       смайлами лишала від переписки смужку, а прокрутити розділи однаково
       треба — вони довші за будь-яку панель. */
    .emoji-panel {
        display: none;
        flex-direction: column;
        height: min(38vh, 250px);
        margin-bottom: 6px;
        background: var(--card-bg, #FFFFFF);
        border-radius: 18px;
        overflow: hidden;
        box-shadow: 0 1px 2px rgba(17, 24, 39, .06), 0 2px 10px rgba(17, 24, 39, .05);
    }

    /* Клас, а не [hidden]: будь-яке авторське display вище перемагає атрибут, і
       панель лишилася б відкритою назавжди. */
    .emoji-panel.is-open {
        display: flex;
    }

    body.dark .emoji-panel {
        background: #242424;
        box-shadow: 0 1px 2px rgba(0, 0, 0, .4);
    }

    /* Поки панель відкрита, кнопка має виглядати натиснутою — інакше єдина
       ознака, що вона щось робить, це сама панель, а вона внизу. */
    .emoji-button.is-on svg {
        color: var(--primary, #8849FE);
    }

    /* ---------------------------------------------------------- вкладки */

    .emoji-tabs {
        display: flex;
        align-items: center;
        gap: 2px;
        padding: 6px 8px;
        overflow-x: auto;
        overflow-y: hidden;
        flex-shrink: 0;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
        border-bottom: 1px solid rgba(17, 24, 39, .07);
    }

    .emoji-tabs::-webkit-scrollbar {
        display: none;
    }

    body.dark .emoji-tabs {
        border-bottom-color: rgba(255, 255, 255, .08);
    }

    .emoji-tab {
        flex: 0 0 auto;
        width: 34px;
        height: 30px;
        border: 0;
        padding: 0;
        background: none;
        border-radius: 9px;
        font-size: 19px;
        line-height: 1;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        opacity: .5;
        transition: opacity .12s ease, background .12s ease;
        -webkit-tap-highlight-color: transparent;
    }

    .emoji-tab img {
        width: 22px;
        height: 22px;
        object-fit: contain;
    }

    .emoji-tab.is-active {
        opacity: 1;
        background: var(--bg-secondary, #F3F4F6);
    }

    body.dark .emoji-tab.is-active {
        background: #333333;
    }

    /* --------------------------------------------------------- розділи */

    .emoji-scroll {
        /* position: relative не для вигляду: він робить цей блок системою
           координат для offsetTop клітинок. Без нього довелося б питати в
           кожної getBoundingClientRect, а це змушує браузер рахувати розкладку
           заново — сімдесят разів на кожен перегляд видимого. */
        position: relative;
        flex: 1;
        min-height: 0;
        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
        padding: 0 8px 10px;
    }

    .emoji-sec-title {
        margin: 0;
        padding: 10px 4px 6px;
        font-size: 12px;
        font-weight: 600;
        color: #9CA3AF;
        position: sticky;
        top: 0;
        background: var(--card-bg, #FFFFFF);
        z-index: 1;
    }

    body.dark .emoji-sec-title {
        background: #242424;
        color: #8b8b8b;
    }

    /* auto-fill, а не фіксовані вісім у рядку: на широкому екрані смайли
       розповзалися б, а на вузькому не влазили. */
    .emoji-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(38px, 1fr));
        gap: 2px;
    }

    .emoji-cell {
        border: 0;
        background: none;
        padding: 0;
        height: 38px;
        font-size: 24px;
        line-height: 1;
        cursor: pointer;
        border-radius: 9px;
        display: flex;
        align-items: center;
        justify-content: center;
        -webkit-tap-highlight-color: transparent;
        transition: background .1s ease;
    }

    /* Тридцять, а не двадцять вісім: поруч стоять стандартні емодзі, намальовані
       шрифтом, і гліф при кеглі 24 px дає близько тридцяти пікселів чорнила.
       Картинка в коробці 28 px виглядала поруч із ним помітно дрібнішою. */
    .emoji-cell img {
        width: 30px;
        height: 30px;
        object-fit: contain;
        pointer-events: none;
    }

    /* Поки рухома картинка на місці, нерухома не потрібна — але й прибирати її
       з розмітки не треба: вона вже намальована, і повернення до неї має бути
       миттєвим. Клас, а не атрибут hidden: будь-яке авторське display вище
       перемогло б атрибут. */
    .emoji-cell.is-live > .emo-still {
        display: none;
    }

    .emoji-cell:hover,
    .emoji-cell:active {
        background: var(--bg-secondary, #F3F4F6);
    }

    body.dark .emoji-cell:hover,
    body.dark .emoji-cell:active {
        background: #333333;
    }

    /* Поки розділ ще не побудований — місце під нього. Без цього список
       підстрибував би щоразу, коли черговий розділ наповнюється. */
    .emoji-grid.is-blank {
        min-height: 80px;
    }

    .emoji-empty {
        padding: 24px 8px;
        text-align: center;
        font-size: 13px;
        color: #9CA3AF;
    }

    /* ---------------------------------------------------- розділи за преміум

       Замкнений розділ видно й гортається — інакше про те, що на сайті є ще
       кількасот смайлів, ніхто б і не дізнався. Але він не рухається й нічого
       не вставляє: у заголовку замок, під заголовком один рядок із тим, що з
       цим робити, а самі смайли трохи бліді.

       Бліді через opacity, а не filter: opacity браузер малює на відеокарті
       готовим шаром, а grayscale перемальовує кожен кадр кожної анімації. */
    .emoji-sec-title {
        display: flex;
        align-items: center;
        gap: 6px;
    }

    .emoji-lock {
        display: inline-flex;
        align-items: center;
        gap: 3px;
        padding: 2px 6px;
        border-radius: 6px;
        background: rgba(136, 73, 254, .12);
        color: var(--accent-color, #8849FE);
        font-size: 10.5px;
        font-weight: 700;
        letter-spacing: .02em;
        text-transform: uppercase;
        line-height: 1.4;
    }

    .emoji-lock svg {
        width: 11px;
        height: 11px;
        display: block;
    }

    /* Рядок «за що це відкривається». Один на розділ, а не значок на кожній
       з п'ятисот клітинок. */
    .emoji-sec-cta {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        width: 100%;
        margin: 0 0 6px;
        padding: 8px 10px;
        border: 0;
        border-radius: 10px;
        background: rgba(136, 73, 254, .1);
        color: var(--accent-color, #8849FE);
        font-family: inherit;
        font-size: 12.5px;
        font-weight: 600;
        line-height: 1;
        text-decoration: none;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }

    .emoji-sec-cta svg {
        width: 14px;
        height: 14px;
        display: block;
    }

    .emoji-sec.is-locked .emoji-grid {
        opacity: .55;
    }

    /* Замок на вкладці — щоб було видно ще до того, як до розділу догортали. */
    .emoji-tab.is-locked::after {
        content: '';
        position: absolute;
        right: 1px;
        bottom: 1px;
        width: 7px;
        height: 7px;
        border-radius: 50%;
        background: var(--accent-color, #8849FE);
        box-shadow: 0 0 0 1.5px var(--card-bg, #FFFFFF);
    }

    body.dark .emoji-tab.is-locked::after {
        box-shadow: 0 0 0 1.5px #242424;
    }

    .emoji-tab {
        position: relative;
    }


    .app-toasts {
        position: fixed;
        left: 50%;
        bottom: 12px;
        z-index: 10050;
        width: calc(100% - 24px);
        max-width: 440px;
        height: 0;
        transform: translateX(-50%);
        pointer-events: none;
    }

    /* Плоска заливка одним кольором — без градієнта, глянцю й кольорового
       світіння. */
    .app-toast {
        --t-bg: #7C3AED;
        --t-fg: #FFFFFF;
        --t-glass: rgba(255, 255, 255, .2);
        --t-glass-hover: rgba(255, 255, 255, .3);
        --t-edge: rgba(255, 255, 255, .38);
        --t-line: rgba(255, 255, 255, .45);
        --y: 0px;
        --s: 1;
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        box-sizing: border-box;
        display: flex;
        align-items: center;
        gap: 10px;
        min-height: 54px;
        padding: 8px 8px 8px 16px;
        overflow: hidden;
        border-radius: 16px;
        background: var(--t-bg);
        color: var(--t-fg);
        font-size: 14.5px;
        line-height: 1.35;
        box-shadow: 0 8px 24px rgba(17, 24, 39, .18);
        transform: translate3d(0, var(--y), 0) scale(var(--s));
        transform-origin: 50% 100%;
        transition: transform .5s cubic-bezier(.18, 1.2, .4, 1), translate .3s ease, opacity .3s ease, height .3s ease;
        pointer-events: auto;
        touch-action: pan-y;
        -webkit-tap-highlight-color: transparent;
        user-select: none;
        -webkit-user-select: none;
    }

    /* Кольори — трохи темніші й насиченіші (власник того ж вечора). */
    .app-toast.is-success {
        --t-bg: #039855;
    }

    .app-toast.is-error {
        --t-bg: #D92D20;
    }

    /* Жовта — з темним текстом: білий на жовтому не читається. */
    .app-toast.is-warning {
        --t-bg: #F79009;
        --t-fg: #2B1700;
        --t-glass: rgba(255, 255, 255, .38);
        --t-glass-hover: rgba(255, 255, 255, .55);
        --t-edge: rgba(255, 255, 255, .6);
        --t-line: rgba(59, 35, 0, .3);
    }

    body.dark .app-toast {
        box-shadow: 0 8px 26px rgba(0, 0, 0, .5);
    }

    /* Появи: знизу з пружинкою. Відхід: униз і тане. */
    .app-toast.is-in {
        --y: 26px !important;
        --s: .9 !important;
        opacity: 0 !important;
        transition: none;
    }

    .app-toast.is-out {
        opacity: 0 !important;
        transition: transform .3s ease, translate .3s ease, opacity .25s ease;
        pointer-events: none;
    }

    .app-toast.is-out:not(.is-swiped) {
        --y: 14px !important;
        --s: .94 !important;
    }

    .app-toast.is-dragging {
        transition: none;
    }

    /* Те саме вдруге — не ще одна картка, а легкий поштовх старої. */
    .app-toast.is-bump {
        animation: at-bump .35s ease;
    }

    @keyframes at-bump {
        40% {
            scale: 1.03;
        }
    }

    .app-toast > * {
        position: relative;
        transition: opacity .2s ease;
    }

    /* Задні в стосі: висота передньої, вміст прихований. */
    .app-toast.is-back > * {
        opacity: 0;
    }

    /* ---- текст */
    .at-body {
        flex: 1 1 auto;
        display: flex;
        flex-direction: column;
        gap: 1px;
        min-width: 0;
        padding: 4px 0;
    }

    .at-title {
        font-weight: 700;
        overflow-wrap: anywhere;
    }

    .at-text {
        font-weight: 600;
        overflow-wrap: anywhere;
    }

    .at-title + .at-text {
        font-size: 13.5px;
        font-weight: 500;
        opacity: .92;
    }

    /* ---- скло: хрестик і кнопка дії */
    .at-x,
    .at-act {
        flex: 0 0 auto;
        border: 1px solid var(--t-edge);
        background: var(--t-glass);
        color: inherit;
        -webkit-backdrop-filter: blur(10px) saturate(160%);
        backdrop-filter: blur(10px) saturate(160%);
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 1px 2px rgba(0, 0, 0, .06);
        cursor: pointer;
        transition: background-color .15s ease, transform .15s ease;
    }

    .at-x:hover,
    .at-act:hover {
        background: var(--t-glass-hover);
    }

    .at-x:active,
    .at-act:active {
        transform: scale(.93);
    }

    .at-x {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 32px;
        height: 32px;
        padding: 0;
        border-radius: 50%;
    }

    .at-x svg {
        width: 14px;
        height: 14px;
        display: block;
        fill: none;
        stroke: currentColor;
        stroke-width: 2.6;
        stroke-linecap: round;
    }

    .at-act {
        display: inline-flex;
        align-items: center;
        gap: 7px;
        height: 36px;
        padding: 0 10px 0 14px;
        border-radius: 12px;
        font: inherit;
        font-size: 14px;
        font-weight: 700;
    }

    .app-toast button:focus {
        outline: none;
    }

    .app-toast button:focus-visible {
        outline: 2px solid currentColor;
        outline-offset: 1px;
    }

    /* ---- зворотний відлік кільцем — усередині кнопки «Скасувати» */
    .at-count {
        position: relative;
        flex: 0 0 auto;
        width: 22px;
        height: 22px;
    }

    .at-count svg {
        position: absolute;
        inset: 0;
        width: 22px;
        height: 22px;
        transform: rotate(-90deg);
        fill: none;
        stroke-width: 2.4;
    }

    .at-count .at-track {
        stroke: var(--t-line);
    }

    .at-count .at-arc {
        stroke: currentColor;
        stroke-linecap: round;
        stroke-dasharray: 56.55;
        stroke-dashoffset: 0;
        animation: at-arc linear forwards;
        animation-duration: var(--t-dur, 10s);
    }

    @keyframes at-arc {
        to {
            stroke-dashoffset: 56.55;
        }
    }

    .at-count b {
        position: absolute;
        inset: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 11px;
        font-weight: 800;
        font-variant-numeric: tabular-nums;
    }

    .at-count b.is-tick {
        animation: at-tick .3s ease;
    }

    @keyframes at-tick {
        from {
            transform: translateY(-4px);
            opacity: 0;
        }
    }

    /* ---- скільки лишилося */
    .at-time {
        position: absolute !important;
        left: 0;
        right: 0;
        bottom: 0;
        height: 3px;
        background: var(--t-line);
        transform-origin: 0 50%;
        animation: at-time linear forwards;
        animation-duration: var(--t-dur, 3s);
    }

    @keyframes at-time {
        to {
            transform: scaleX(0);
        }
    }

    .app-toasts.is-paused .at-time,
    .app-toasts.is-paused .at-arc {
        animation-play-state: paused;
    }

    @media (prefers-reduced-motion: reduce) {
        .app-toast {
            transition: opacity .2s ease;
        }

        .at-count b.is-tick {
            animation: none !important;
        }
    }


    /* ============================================================ шари */
    /* Над нижньою смугою й шапкою сайту, під аркушем дій (1500): з шару
       питають «вийти без збереження?», і питання має лягти зверху. */
    body .modal-overlay.ep-layer {
        z-index: 1400;
    }

    body .modal-overlay.ep-layer > .modal > .modal-header {
        gap: 8px;
        justify-content: flex-start;
    }

    body .modal-overlay.ep-layer > .modal > .modal-header .modal-title {
        flex: 1 1 auto;
        min-width: 0;
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
    }

    /* Стрілка — лише в панелі збоку на телефоні, хрестик — лише з ПК. */
    .ep-back,
    body .modal-overlay.ep-layer .ep-x {
        display: none;
    }

    .ep-back {
        align-items: center;
        justify-content: center;
        flex: 0 0 auto;
        width: 36px;
        height: 36px;
        padding: 0;
        border: none;
        border-radius: 12px;
        background: var(--as-tint);
        color: var(--as-text);
        cursor: pointer;
    }

    .ep-back svg,
    .ep-back i[data-lucide] {
        width: 20px;
        height: 20px;
    }

    /* Скільки обрано — праворуч у шапці, числом. */
    .ep-note {
        flex: 0 0 auto;
        padding: 3px 8px;
        border-radius: 8px;
        background: var(--as-tint);
        font-size: 12.5px;
        font-weight: 700;
        color: var(--as-sub);
        font-variant-numeric: tabular-nums;
    }

    body .modal-overlay.ep-layer > .modal > .modal-body.is-plain {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    /* Картка з полями — біла на сірому споді, як група рядків в аркуші. */
    .ep-card {
        flex: 0 0 auto;
        display: flex;
        flex-direction: column;
        gap: 18px;
        padding: 14px;
        border-radius: 14px;
        background: var(--as-card);
    }

    /* Розділ інтересів: підпис і плитки під ним — один блок. */
    .ep-card.is-group {
        gap: 0;
    }

    .ep-field {
        min-width: 0;
    }

    .ep-label {
        display: flex;
        align-items: center;
        gap: 6px;
        margin-bottom: 8px;
        font-size: 13px;
        font-weight: 600;
        line-height: 1.3;
        color: var(--as-sub);
    }

    .ep-label svg,
    .ep-label i[data-lucide] {
        width: 15px;
        height: 15px;
        flex: 0 0 auto;
    }

    .ep-input {
        display: block;
        width: 100%;
        min-width: 0;
        padding: 11px 13px;
        border: 1px solid transparent;
        border-radius: 12px;
        background: var(--as-tint);
        font-family: inherit;
        font-size: 15px;
        line-height: 1.35;
        color: var(--as-text);
        outline: none;
        -webkit-appearance: none;
        appearance: none;
        transition: border-color .15s ease, background-color .15s ease;
    }

    .ep-input::placeholder {
        color: var(--as-sub);
        opacity: .8;
    }

    .ep-input:focus {
        border-color: var(--as-accent);
        background: var(--as-card);
    }

    .ep-field.is-error .ep-input {
        border-color: #F43F5E;
    }

    textarea.ep-input {
        min-height: 120px;
        resize: none;
    }

    .ep-hint {
        display: flex;
        justify-content: space-between;
        gap: 10px;
        margin-top: 6px;
        font-size: 12px;
        line-height: 1.35;
        color: var(--as-sub);
    }

    .ep-count {
        flex: 0 0 auto;
        margin-left: auto;
        font-variant-numeric: tabular-nums;
    }

    /* Поле з приставкою: «@» перед username, «см» після зросту. */
    .ep-affix {
        position: relative;
    }

    .ep-affix.is-pre .ep-input {
        padding-left: 30px;
    }

    .ep-pre,
    .ep-suf {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        font-size: 15px;
        color: var(--as-sub);
        pointer-events: none;
    }

    .ep-pre {
        left: 14px;
    }

    .ep-suf {
        right: 14px;
    }

    .ep-affix:has(.ep-suf) .ep-input {
        padding-right: 44px;
    }

    /* ----------------------------------------------- дата трьома списками */
    .ep-date {
        display: grid;
        grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.6fr) minmax(0, 1fr);
        gap: 8px;
    }

    .ep-select {
        position: relative;
        display: block;
        min-width: 0;
    }

    .ep-select select {
        padding-right: 30px;
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
        cursor: pointer;
    }

    .ep-select svg,
    .ep-select i[data-lucide] {
        position: absolute;
        top: 50%;
        right: 10px;
        width: 16px;
        height: 16px;
        transform: translateY(-50%);
        color: var(--as-sub);
        pointer-events: none;
    }

    /* ---------------------------------------------------------- фішки */
    .ep-chips {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

    /* Стать — три рівні клітинки в ряд, без переносу. */
    .ep-seg {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .ep-chip,
    .ep-tag {
        min-width: 0;
        padding: 9px 14px;
        border: 1px solid transparent;
        border-radius: 12px;
        background: var(--as-tint);
        font-family: inherit;
        font-size: 14px;
        font-weight: 500;
        line-height: 1.25;
        color: var(--as-text);
        cursor: pointer;
        transition: background-color .15s ease, border-color .15s ease, color .15s ease, opacity .15s ease;
        -webkit-tap-highlight-color: transparent;
    }

    .ep-seg .ep-chip {
        padding-left: 6px;
        padding-right: 6px;
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
    }

    .ep-chip.active,
    .ep-tag.selected {
        background: var(--as-accent);
        border-color: var(--as-accent);
        color: #FFFFFF;
    }

    /* «Не вказано» — теж вибір, але тихий: обраний кольором, він світився б
       десятьма фіолетовими плашками на порожній анкеті. */
    .ep-chip[data-value=""].active {
        background: var(--as-card);
        border-color: var(--as-line);
        color: var(--as-sub);
    }

    .ep-tags {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

    .ep-tag {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 8px 12px;
    }

    .ep-tag svg,
    .ep-tag i[data-lucide] {
        width: 15px;
        height: 15px;
        flex: 0 0 auto;
    }

    .ep-tags.is-full .ep-tag:not(.selected) {
        opacity: .45;
    }

    @media (hover: hover) and (pointer: fine) {
        .ep-chip:not(.active):hover,
        .ep-tag:not(.selected):hover {
            background: var(--as-hover);
        }
    }

    /* ------------------------------------------- помилка гармошкою */
    .ep-alert {
        flex: 0 0 auto;
        display: grid;
        grid-template-rows: 0fr;
        transition: grid-template-rows .28s cubic-bezier(.2, .8, .2, 1), margin-top .28s cubic-bezier(.2, .8, .2, 1);
    }

    .ep-alert > div {
        min-height: 0;
        overflow: hidden;
    }

    .ep-alert.is-open {
        grid-template-rows: 1fr;
        margin-top: 10px;
    }

    .ep-alert p {
        display: flex;
        align-items: center;
        gap: 9px;
        margin: 0;
        padding: 10px 13px;
        border: 1px solid #FECDD3;
        border-radius: 12px;
        background: #FFF1F2;
        color: #BE123C;
        font-size: 13.5px;
        font-weight: 500;
        line-height: 1.35;
        opacity: 0;
        transform: translateY(-4px);
        transition: opacity .2s ease, transform .2s ease;
    }

    .ep-alert.is-open p {
        opacity: 1;
        transform: none;
    }

    .ep-alert svg,
    .ep-alert i[data-lucide] {
        width: 18px;
        height: 18px;
        flex: 0 0 auto;
    }

    body.dark .ep-alert p {
        border-color: rgba(244, 63, 94, .3);
        background: rgba(244, 63, 94, .12);
        color: #FDA4AF;
    }

    /* ------------------------------------------------------- кнопки */
    body .modal-overlay.ep-layer .modal-btn {
        font-family: inherit;
        box-shadow: none;
    }

    body .modal-overlay.ep-layer .modal-btn:disabled {
        opacity: .45;
        cursor: default;
    }

    /* Неактивна головна — суцільна блідо-фіолетова, а не напівпрозора: на телефоні кнопка лежить поверх умісту
       (розмиття під нею), і крізь прозору просвічував би текст. Колір той самий, що давала прозорість на сірому. */
    body .modal-overlay.ep-layer .modal-btn-primary:disabled,
    body .modal-overlay.ep-layer .modal-btn-primary:disabled:hover {
        opacity: 1;
        background: color-mix(in srgb, #8849FE 45%, var(--as-ground));
        color: rgba(255, 255, 255, .85);
    }

    body .modal-overlay.ep-layer .modal-btn[hidden] {
        display: none;
    }

    /* ------------------------------------------------------- рух */
    .ep-layer.is-leaving {
        opacity: 0;
        transition: opacity .2s ease;
    }

    .ep-layer.is-leaving > .modal {
        transform: translateY(100%);
        transition: transform .22s cubic-bezier(.4, 0, .6, 1);
    }

    /* ======================================= телефон: панель збоку */
    @media (max-width: 1023px) {
        body .modal-overlay.ep-layer.is-side {
            align-items: stretch;
            justify-content: stretch;
            background: rgba(10, 10, 15, .32);
            -webkit-backdrop-filter: none;
            backdrop-filter: none;
        }

        body .modal-overlay.ep-layer.is-side > .modal {
            display: flex;
            flex-direction: column;
            width: 100%;
            max-width: none;
            height: 100%;
            max-height: none;
            padding: 0;
            overflow: hidden;
            border-radius: 0;
            background: var(--as-ground);
            animation: epSideIn .3s cubic-bezier(.2, .8, .2, 1);
        }

        body .modal-overlay.ep-layer.is-side > .modal > .modal-handle {
            display: none;
        }

        body .modal-overlay.ep-layer.is-side > .modal > .modal-header {
            flex: 0 0 auto;
            min-height: calc(56px + env(safe-area-inset-top, 0px));
            padding: env(safe-area-inset-top, 0px) 12px 0;
            background: var(--as-card);
            border-bottom: 1px solid var(--as-line);
        }

        body .modal-overlay.ep-layer.is-side > .modal > .modal-header .modal-title {
            font-size: 16px;
        }

        body .modal-overlay.ep-layer.is-side .ep-back {
            display: inline-flex;
        }

        body .modal-overlay.ep-layer.is-side > .modal > .modal-body {
            padding: 10px 10px 16px;
        }

        body .modal-overlay.ep-layer.is-side > .ep-alert,
        body .modal-overlay.ep-layer.is-side > .modal > .ep-alert {
            margin-left: 10px;
            margin-right: 10px;
        }

        body .modal-overlay.ep-layer.is-side > .modal > .ep-alert.is-open {
            margin-top: 0;
            margin-bottom: 10px;
        }

        /* Низ шару — без білої смуги: кнопка (і помилка над нею) лежить поверх умісту, під нею розмиття, що згасає
           вгору, як кнопка внизу в подарунках (власник, 22.10.2026: «під кнопкою не треба фон, у нас є блюр»; «зроби
           розмиття в групах… всюди»). Уміст тягнеться під цей низ на --dock (його висоту міряє скрипт нижче: помилка
           розгортається, кнопок буває дві) і має стільки ж запасу знизу, щоб останнє в ньому виринало над кнопкою. */
        body .modal-overlay.ep-layer.is-side > .modal > .modal-body {
            margin-bottom: calc(-1 * var(--dock, 0px));
            padding-bottom: calc(16px + var(--dock, 0px));
        }

        body .modal-overlay.ep-layer.is-side > .modal > .ep-alert,
        body .modal-overlay.ep-layer.is-side > .modal > .modal-footer {
            position: relative;
            z-index: 1;
        }

        body .modal-overlay.ep-layer.is-side > .modal > .modal-footer {
            --veil: rgba(241, 242, 244, .5);
            margin: 0;
            padding: 30px 12px calc(12px + env(safe-area-inset-bottom, 0px));
            border-top: 0;
            background: none;
        }

        body.dark .modal-overlay.ep-layer.is-side > .modal > .modal-footer {
            --veil: rgba(14, 14, 18, .5);
        }

        /* Розмиття тягнеться й під розгорнуту помилку (--dock-up — її висота з запасом), щоб уміст над нею не
           обривався різко. */
        body .modal-overlay.ep-layer.is-side > .modal > .modal-footer::before {
            content: '';
            position: absolute;
            inset: calc(-1 * var(--dock-up, 0px)) 0 0;
            z-index: -1;
            -webkit-backdrop-filter: blur(18px) saturate(140%);
            backdrop-filter: blur(18px) saturate(140%);
            background: linear-gradient(to bottom, transparent 0%, var(--veil) 72%);
            -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 72%);
            mask-image: linear-gradient(to bottom, transparent 0%, #000 72%);
            pointer-events: none;
        }

        /* «Скасувати» тепер на сірому розмитті — білою карткою, як на сторінці. */
        body .modal-overlay.ep-layer.is-side > .modal > .modal-footer .modal-btn-cancel {
            background: var(--as-card);
        }

        .ep-layer.is-side.is-leaving {
            opacity: 1;
            background: rgba(10, 10, 15, 0);
            transition: background-color .22s ease;
        }

        .ep-layer.is-side.is-leaving > .modal {
            transform: translate3d(100%, 0, 0);
            transition: transform .24s cubic-bezier(.4, 0, .6, 1);
        }
    }

    @keyframes epSideIn {
        from {
            transform: translate3d(100%, 0, 0);
        }

        to {
            transform: none;
        }
    }

    /* ========================================== ПК: картка по центру */
    @media (min-width: 1024px) {
        body .modal-overlay.ep-layer > .modal:not(.modal-fullscreen) {
            width: calc(100% - 48px);
            max-width: 460px;
            max-height: 86vh;
        }

        body .modal-overlay.ep-layer.is-side > .modal:not(.modal-fullscreen) {
            max-width: 560px;
        }

        body .modal-overlay.ep-layer > .modal > .modal-header {
            padding: 4px 4px 12px 8px;
        }

        body .modal-overlay.ep-layer .ep-x {
            display: inline-flex;
        }

        .ep-layer.is-leaving > .modal {
            transform: scale(.96);
            transition: transform .2s ease;
        }
    }

    @media (prefers-reduced-motion: reduce) {
        body .modal-overlay.ep-layer > .modal,
        .ep-layer.is-leaving,
        .ep-layer.is-leaving > .modal {
            animation: none;
            transition: none;
        }
    }


    .tip-note {
        position: relative;
        overflow: hidden;
        padding: 12px 14px;
        border-radius: 16px;
        background: #FFF4C7;
        color: #5C4300;
        font-size: 13px;
        line-height: 1.45;
    }

    /* Лампочка — великою й прозорою в правому нижньому куті, а не значком перед текстом. */
    .tip-ico {
        position: absolute;
        right: -6px;
        bottom: -9px;
        width: 52px;
        height: 52px;
        color: #D08A00;
        opacity: .22;
        transform: rotate(-12deg);
        pointer-events: none;
    }

    .tip-ico svg {
        display: block;
        width: 52px;
        height: 52px;
    }

    .tip-text {
        position: relative;
        display: block;
        min-width: 0;
        overflow-wrap: anywhere;
    }

    .tip-key {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 22px;
        height: 22px;
        margin: 0 2px;
        padding: 0 5px;
        border-radius: 7px;
        background: #FFFFFF;
        color: #5C4300;
        font-weight: 800;
        line-height: 1;
        vertical-align: -1px;
        box-shadow: 0 1px 3px rgba(120, 85, 0, .25);
    }

    .tip-btn {
        display: inline-flex;
        align-items: center;
        height: 1.55em;
        margin: 0 .1em;
        padding: 0 .5em;
        border-radius: .5em;
        background: rgba(136, 73, 254, .14);
        color: #6D28D9;
        font-size: .93em;
        font-weight: 600;
        line-height: 1;
        white-space: nowrap;
        vertical-align: middle;
    }

    body.dark .tip-note {
        background: rgba(255, 196, 40, .15);
        color: #FFE38F;
    }

    body.dark .tip-ico {
        color: #FFC83D;
        opacity: .2;
    }

    body.dark .tip-key {
        background: rgba(255, 255, 255, .14);
        color: #FFE38F;
        box-shadow: none;
    }

    body.dark .tip-btn {
        background: rgba(168, 85, 247, .24);
        color: #D8C4FF;
    }


    /* Сховане ховається: рядки, кнопки й значки мають свій display. */
    .dq-layer [hidden],
    .dq-page [hidden],
    .dq-head-btn[hidden],
    [data-dq-count][hidden],
    [data-dq-take-sum][hidden],
    [data-dq-later][hidden] {
        display: none !important;
    }

    /* Тіло шару — гнучка колонка заввишки з екран: без цього жовта підказка (overflow: hidden) стискалась і
       різала свій текст, щойно карток ставало багато (власник, 22.10.2026, знімок з iPhone). */
    .dq-layer .modal-body > * {
        flex-shrink: 0;
    }

    .dq-body {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    /* Баланс у шапці — плашкою, як число в шапці шарів (.ep-note); число докручується барабаном (RollCount). */
    .dq-bal {
        display: inline-flex;
        align-items: center;
        gap: 4px;
        color: var(--as-text);
    }

    .dq-bal b {
        color: var(--gem-t);
    }

    .dq-gem {
        flex: 0 0 auto;
        display: inline-block;
        width: 14px;
        height: 14px;
        vertical-align: -2px;
    }

    /* Однорядковий текст біля значка — до висоти букв: тоді центр рядка = середина великої літери на будь-якому
       шрифті (SF на iPhone теж), і значок стоїть рівно (правило власника). */
    .dq-trim {
        text-box: trim-both cap alphabetic;
    }

    .dq-layer .settings-content > span,
    .dq-page .settings-content > span {
        display: block;
    }

    /* «Забрати» — як кнопка «Підписатися» в рядках людей; «Отримано» — кружок із галочкою, як «Ви підписані». */
    .dq-take,
    .dq-got {
        flex: 0 0 auto;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 5px;
        height: 34px;
        padding: 0 12px;
        border: none;
        border-radius: 10px;
        font-family: inherit;
        font-size: 13.5px;
        font-weight: 600;
        line-height: 1;
        white-space: nowrap;
        font-variant-numeric: tabular-nums;
    }

    .dq-take {
        background: var(--as-accent);
        color: #fff;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }

    .dq-take:active {
        transform: scale(.97);
    }

    .dq-take:disabled {
        opacity: .6;
        cursor: default;
    }

    .dq-got {
        width: 34px;
        padding: 0;
        border-radius: 50%;
        background: rgba(136, 73, 254, .12);
        color: var(--as-accent);
    }

    body.dark .dq-got {
        background: rgba(168, 85, 247, .2);
    }

    .dq-got svg {
        width: 15px;
        height: 15px;
    }

    /* Скільки до нових — плашкою (власник, 22.10.2026: «бейджом виділити»), м'яким фіолетовим, як «Ви підписані». */
    .dq-timer {
        display: inline-flex;
        align-items: center;
        gap: 5px;
        min-width: 0;
        height: 26px;
        padding: 0 9px;
        border-radius: 8px;
        background: rgba(136, 73, 254, .1);
        color: var(--as-accent);
        font-size: 12.5px;
        font-weight: 600;
        white-space: nowrap;
        font-variant-numeric: tabular-nums;
    }

    body.dark .dq-timer {
        background: rgba(168, 85, 247, .18);
    }

    .dq-timer svg {
        flex: 0 0 auto;
        width: 14px;
        height: 14px;
    }

    /* Кільце: доріжка — той самий колір блідо (сіра на білому не видна), дуга — колір; число посередині. */
    .dq-ring {
        position: relative;
        flex: 0 0 auto;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .dq-ring svg {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        transform: rotate(-90deg);
    }

    .dq-ring circle {
        fill: none;
        stroke-width: 3.6;
    }

    .dq-ring .dq-ring-bg {
        stroke: color-mix(in srgb, var(--c) 20%, var(--as-tint));
    }

    .dq-ring .dq-ring-fg {
        stroke: var(--c);
        stroke-linecap: round;
    }

    .dq-ring b {
        position: relative;
        font-size: 11px;
        font-weight: 700;
        color: var(--as-text);
        font-variant-numeric: tabular-nums;
    }

    /* ------------------------------------------------- день */
    .dq-hero {
        display: flex;
        align-items: center;
        gap: 14px;
    }

    .ep-card.dq-hero {
        flex-direction: row;
    }

    .dq-hero .dq-ring b {
        font-size: 15px;
    }

    .dq-hero-c {
        flex: 1 1 auto;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
        min-width: 0;
    }

    .dq-hero-t {
        font-size: 15px;
        font-weight: 600;
        color: var(--as-text);
        font-variant-numeric: tabular-nums;
    }

    .dq-hero-s {
        font-size: 13px;
        color: var(--as-sub);
    }

    .dq-hero-s b {
        color: var(--as-text);
        font-weight: 600;
    }

    .dq-hero .dq-timer {
        margin-top: 3px;
    }

    /* ------------------------------------------------- серія */
    .ep-card.dq-streak {
        gap: 14px;
    }

    .dq-streak-top {
        display: flex;
        align-items: center;
        gap: 14px;
    }

    .dq-is-zero .settings-icon-wrap.orange {
        --sw-c: #8E8E93;
    }

    .dq-days {
        display: flex;
        justify-content: space-between;
        gap: 4px;
    }

    .dq-day {
        flex: 1 1 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 5px;
        min-width: 0;
        font-size: 11.5px;
        font-weight: 600;
        color: var(--as-sub);
        font-variant-numeric: tabular-nums;
    }

    .dq-dot {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 30px;
        height: 30px;
        border-radius: 50%;
        background: var(--as-tint);
        color: var(--as-sub);
        font-size: 12px;
        font-weight: 700;
    }

    .dq-dot svg {
        width: 15px;
        height: 15px;
    }

    .dq-day.is-done .dq-dot,
    .dq-day.is-today .dq-dot {
        background: #FF9500;
        color: #fff;
    }

    .dq-day.is-today .dq-dot {
        box-shadow: 0 0 0 2px var(--as-card), 0 0 0 4px #FF9500;
    }

    .dq-day.is-today {
        color: #E07F00;
    }

    .dq-day.is-gift .dq-dot {
        background: color-mix(in srgb, var(--as-accent) 14%, transparent);
        color: var(--as-accent);
    }

    .dq-day.is-gift.is-today .dq-dot,
    .dq-day.is-gift.is-done .dq-dot {
        background: var(--as-accent);
        color: #fff;
    }

    .dq-day.is-gift > span:last-child {
        color: var(--gem-t);
    }

    /* Коло довше за 10 днів — смугою: 6 px, доріжка помаранчевим блідо. */
    .dq-bar {
        overflow: hidden;
        height: 6px;
        border-radius: 3px;
        background: color-mix(in srgb, #FF9500 20%, var(--as-tint));
    }

    .dq-bar i {
        display: block;
        height: 100%;
        border-radius: inherit;
        background: #FF9500;
    }

    /* ------------------------------------------- рядки — як «Тема» й «Тип» у «Новій групі» */
    .ep-card.dq-rows {
        gap: 0;
        padding: 0;
        overflow: hidden;
    }

    .dq-rows .settings-item {
        width: 100%;
        margin: 0;
        border: 0;
        border-bottom: 1px solid var(--as-line);
        background: none;
        color: inherit;
        font-family: inherit;
        text-align: left;
        text-decoration: none;
        -webkit-tap-highlight-color: transparent;
    }

    .dq-rows .settings-item:last-child {
        border-bottom: 0;
    }

    .dq-rows div.settings-item {
        cursor: default;
    }

    .dq-rows div.settings-item:hover {
        background: none;
    }

    /* ------------------------------------------------- низ */
    /* Під «Забрати все» — розмиття замість білої смуги: спільне правило шарів збоку (settings_layer.php, --dock). */
    .dq-go {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        width: 100%;
    }

    .dq-go .dq-gem {
        width: 16px;
        height: 16px;
    }

    /* /tasks: баланс рядком над картками, «Забрати все» — під ними. */
    .dq-page-bal {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        margin-bottom: 10px;
        padding: 12px 14px;
        border-radius: 14px;
        background: var(--as-card);
        box-shadow: var(--as-shadow);
        font-size: 14px;
        font-weight: 600;
    }

    .dq-page .tip-note.dq-tip {
        margin-top: 10px;
    }

    .dq-page .dq-go {
        margin-top: 12px;
        padding: 13px 20px;
        font-size: 15px;
    }

    /* Кристал летить із кнопки в баланс. */
    .dq-fly {
        position: fixed;
        z-index: 1460;
        width: 24px;
        height: 24px;
        margin: -12px 0 0 -12px;
        pointer-events: none;
    }

    .dq-fly img {
        display: block;
        width: 100%;
        height: 100%;
    }

    /* ----------------------------- точки входу: шапка, бічна панель, праворуч */
    .dq-head-btn .header-icon-slot {
        position: relative;
    }

    .dq-head-btn .star-ico {
        display: block;
        width: 24px;
        height: 24px;
    }

    .dq-head-dot {
        position: absolute;
        top: -1px;
        right: -2px;
        width: 9px;
        height: 9px;
        border: 2px solid var(--header-bg, #fff);
        border-radius: 50%;
        background: #F43F5E;
    }

    .dq-rs {
        cursor: pointer;
    }

    .dq-rs-n {
        margin-left: auto;
        font-size: 12.5px;
        font-weight: 700;
        color: var(--text-secondary);
        font-variant-numeric: tabular-nums;
    }

    .dq-rs-foot {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        margin-top: 10px;
        font-size: 12.5px;
        font-weight: 600;
        color: var(--text-secondary);
    }

    .dq-rs-streak {
        display: inline-flex;
        align-items: center;
        gap: 4px;
    }

    .dq-rs-streak svg {
        width: 15px;
        height: 15px;
        color: #FF9500;
    }

    .dq-rs .dq-take {
        height: 30px;
        padding: 0 10px;
        font-size: 12.5px;
    }



    /* Рідне «потягніть» браузера — геть: тягнемо самі. */
    @media (pointer: coarse) {
        html,
        body {
            overscroll-behavior-y: none;
        }
    }

    /* Кружечок за шапку — скляний, як кнопки сайту. */
    .ptr-dot {
        position: fixed;
        left: 50%;
        top: calc(env(safe-area-inset-top, 0px) + 10px);
        z-index: 2000;
        display: grid;
        place-items: center;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        background: rgba(255, 255, 255, .72);
        box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .5), inset 0 1px 1px rgba(255, 255, 255, .8), 0 4px 16px rgba(17, 24, 39, .16);
        -webkit-backdrop-filter: blur(14px) saturate(180%);
        backdrop-filter: blur(14px) saturate(180%);
        color: var(--text-secondary, #6B7280);
        opacity: 0;
        transform: translate(-50%, -52px);
        pointer-events: none;
    }

    body.dark .ptr-dot {
        background: rgba(38, 38, 42, .66);
        box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14), inset 0 1px 1px rgba(255, 255, 255, .2), 0 4px 16px rgba(0, 0, 0, .4);
    }

    .ptr-dot svg {
        width: 19px;
        height: 19px;
    }

    .ptr-dot.is-back {
        transition: transform .3s cubic-bezier(.22, 1, .36, 1), opacity .2s;
    }

    .ptr-dot.is-ready {
        color: var(--accent-color, #8849FE);
    }

    .ptr-dot.is-spin svg {
        animation: ptr-spin .5s linear infinite;
    }

    /* Щілина над колонкою: кільце-поступ, стрілка, підпис. */
    .ptr-list {
        position: fixed;
        z-index: 90;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 6px;
        height: 0;
        overflow: hidden;
        opacity: 0;
        pointer-events: none;
        color: var(--text-secondary, #6B7280);
        font-size: 12px;
        font-weight: 500;
    }

    .ptr-list.is-settle,
    .content.ptr-settle {
        transition: transform .45s cubic-bezier(.22, 1, .36, 1), height .45s cubic-bezier(.22, 1, .36, 1), opacity .3s;
    }

    .content.ptr-pulling {
        will-change: transform;
    }

    .ptr-ring {
        position: relative;
        display: grid;
        place-items: center;
        width: 30px;
        height: 30px;
    }

    .ptr-svg {
        position: absolute;
        inset: 0;
        width: 30px;
        height: 30px;
        transform: rotate(-90deg);
    }

    .ptr-trk {
        fill: none;
        stroke: var(--border-color, #E5E7EB);
        stroke-width: 2.5;
    }

    .ptr-arc {
        fill: none;
        stroke: var(--text-secondary, #9CA3AF);
        stroke-width: 2.5;
        stroke-linecap: round;
        stroke-dasharray: 75.4;
        stroke-dashoffset: 75.4;
        transition: stroke .2s;
    }

    .ptr-list.is-ready {
        color: var(--accent-color, #8849FE);
    }

    .ptr-list.is-ready .ptr-arc {
        stroke: var(--accent-color, #8849FE);
    }

    .ptr-list.is-loading .ptr-arc {
        stroke: var(--accent-color, #8849FE);
        stroke-dashoffset: 50 !important;
    }

    .ptr-list.is-loading .ptr-trk {
        stroke: transparent;
    }

    .ptr-list.is-loading .ptr-svg {
        animation: ptr-ring-spin .5s linear infinite;
    }

    /* Список, що чекає (не з тих, де рядки самі стають скелетоном), — притихає. */
    .ptr-wait {
        opacity: .45;
        transition: opacity .2s;
    }

    /* Свіжі рядки підтягуються один за одним. */
    .ptr-fresh > * {
        animation: ptr-in .3s ease-out both;
    }

    .ptr-fresh > :nth-child(2) { animation-delay: .03s; }
    .ptr-fresh > :nth-child(3) { animation-delay: .06s; }
    .ptr-fresh > :nth-child(4) { animation-delay: .09s; }
    .ptr-fresh > :nth-child(5) { animation-delay: .12s; }
    .ptr-fresh > :nth-child(6) { animation-delay: .15s; }
    .ptr-fresh > :nth-child(7) { animation-delay: .18s; }
    .ptr-fresh > :nth-child(n+8) { animation-delay: .21s; }

    @keyframes ptr-in {
        from {
            opacity: 0;
            transform: translateY(6px);
        }
    }

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

    @keyframes ptr-ring-spin {
        from {
            transform: rotate(-90deg);
        }

        to {
            transform: rotate(270deg);
        }
    }

    @media (prefers-reduced-motion: reduce) {
        .ptr-list.is-settle,
        .content.ptr-settle,
        .ptr-fresh > * {
            transition: none;
            animation: none;
        }
    }
