[data-community-feed-dialog] {
    overflow: clip;
    color-scheme: dark;
    overscroll-behavior: none;
}

[data-community-feed-dialog] > div {
    overflow: clip;
}

[data-community-feed-track] {
    height: 100%;
    transition: transform .42s cubic-bezier(.22, 1, .36, 1);
    will-change: transform;
}

[data-community-feed-item] {
    height: 100%;
    min-height: 100%;
}

.community-short-card {
    display: flex;
    height: 100%;
    min-height: 0;
    flex-direction: column;
    background: #0b0d10;
}

.community-short-stage {
    position: relative;
    display: flex;
    min-height: 0;
    flex: 1 1 auto;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: flex-basis .32s ease;
}

.community-short-visual {
    position: relative;
    display: flex;
    width: 100%;
    height: 100%;
    min-height: 0;
    align-items: center;
    justify-content: center;
}

.community-like-burst {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 8;
    width: clamp(5rem, 18vw, 7.5rem);
    height: clamp(5rem, 18vw, 7.5rem);
    color: #fff;
    filter: drop-shadow(0 .45rem 1.25rem rgb(0 0 0 / .38));
    pointer-events: none;
    transform: translate(-50%, -50%) scale(.35) rotate(-8deg);
    animation: community-like-burst .72s cubic-bezier(.2, .85, .25, 1) both;
}

.community-like-burst svg {
    display: block;
    width: 100%;
    height: 100%;
}

@keyframes community-like-burst {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(.35) rotate(-8deg); }
    24% { opacity: 1; transform: translate(-50%, -50%) scale(1.15) rotate(2deg); }
    56% { opacity: 1; transform: translate(-50%, -50%) scale(.96) rotate(0); }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(1.08) rotate(0); }
}

.community-short-visual .community-post-media {
    width: auto;
    max-width: 100%;
    height: min(100%, calc(100vw * 4 / 3));
    max-height: 100%;
    border-radius: 0;
}

.community-short-panel {
    position: relative;
    z-index: 2;
    max-height: 13.5rem;
    flex: 0 0 auto;
    overflow: hidden;
    border-radius: 1.25rem 1.25rem 0 0;
    border-top: 1px solid rgb(255 255 255 / .08);
    background: #17181d;
    color: #f8fafc;
    transition: max-height .32s ease, flex-basis .32s ease;
}

.community-short-panel-scroll {
    max-height: 100%;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-color: rgb(255 255 255 / .22) transparent;
}

[data-community-feed-dialog] .community-post-excerpt[data-collapsible="true"] {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

[data-community-feed-item].is-caption-open .community-post-excerpt {
    display: block;
    overflow: visible;
    -webkit-line-clamp: unset;
}

.community-short-thread-panel {
    display: none;
}

[data-community-feed-item].is-panel-open .community-short-stage {
    flex: 0 0 min(50dvh, 28rem);
}

[data-community-feed-item].is-panel-open .community-short-panel {
    min-height: 0;
    max-height: none;
    flex: 1 1 auto;
}

[data-community-feed-item].is-panel-open .community-short-panel-scroll {
    height: 100%;
}

[data-community-feed-item].is-panel-open .community-short-actions {
    display: none;
}

[data-community-feed-item].is-thread-open .community-short-caption-section {
    display: none;
}

[data-community-feed-item].is-thread-open .community-short-thread-panel {
    display: flex;
}

[data-community-panel-close] {
    display: none;
}

[data-community-feed-item].is-caption-open [data-community-caption-close],
[data-community-feed-item].is-thread-open [data-community-thread-close] {
    display: inline-flex;
}

.community-short-actions {
    position: absolute;
    z-index: 5;
    right: .75rem;
    bottom: .85rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .65rem;
}

.community-short-action {
    display: inline-flex;
    min-width: 3.25rem;
    min-height: 3.25rem;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .15rem;
    border: 1px solid rgb(255 255 255 / .16);
    border-radius: 999px;
    background: rgb(11 13 16 / .58);
    color: #fff;
    font-size: .65rem;
    font-weight: 900;
    line-height: 1;
    box-shadow: 0 .5rem 1.5rem rgb(0 0 0 / .2);
    backdrop-filter: blur(.6rem);
}

.community-short-action[aria-pressed="true"] {
    color: #ff8ca2;
}

[data-community-feed-nav] {
    display: none;
}

@media (min-width: 1024px) {
    [data-community-feed-viewport] {
        padding: 1.25rem 6.5rem 1.25rem 1.5rem;
    }

    .community-short-card {
        display: grid;
        width: min(100%, 74rem);
        height: calc(100dvh - 2.5rem);
        margin: 0 auto;
        overflow: hidden;
        border-radius: 1.5rem;
        grid-template-columns: minmax(0, 1fr) minmax(20rem, 24rem);
    }

    .community-short-stage {
        display: grid;
        height: 100%;
        grid-template-columns: minmax(0, 1fr) 4.75rem;
    }

    .community-short-visual {
        min-width: 0;
    }

    .community-short-visual .community-post-media {
        width: auto;
        max-width: 100%;
        height: min(100%, 56rem);
        overflow: hidden;
        border-radius: 1.25rem;
    }

    .community-short-actions,
    [data-community-feed-item].is-panel-open .community-short-actions {
        position: static;
        display: flex;
        align-self: end;
        padding-bottom: 1.25rem;
    }

    .community-short-panel {
        height: 100%;
        max-height: none;
        border-top: 0;
        border-left: 1px solid rgb(255 255 255 / .08);
        border-radius: 0;
    }

    .community-short-panel-scroll {
        height: 100%;
        overflow-y: auto;
    }

    [data-community-feed-dialog] .community-post-excerpt[data-collapsible="true"] {
        display: block;
        overflow: visible;
        -webkit-line-clamp: unset;
    }

    [data-community-caption-toggle],
    [data-community-panel-close] {
        display: none;
    }

    .community-short-thread-panel,
    [data-community-feed-item].is-thread-open .community-short-thread-panel {
        display: flex;
    }

    [data-community-feed-item].is-thread-open .community-short-caption-section {
        display: block;
    }

    [data-community-feed-nav] {
        position: fixed;
        z-index: 30;
        top: 50%;
        right: 1.35rem;
        display: flex;
        flex-direction: column;
        gap: .75rem;
        transform: translateY(-50%);
    }
}

@media (prefers-reduced-motion: reduce) {
    [data-community-feed-track],
    .community-short-stage,
    .community-short-panel {
        transition: none;
    }

    .community-like-burst {
        animation-duration: .24s;
    }
}
