.pop_start.poster-carousel {
    z-index: 2147482001; /* Keep the close button above the floating AI widget. */
    width: min(480px, calc(100vw - 32px), calc((100vh - 128px) * 0.7069555));
    width: min(480px, calc(100vw - 32px), calc((100dvh - 128px) * 0.7069555));
    max-width: calc(100vw - 32px);
    max-height: calc(100vh - 32px);
    max-height: calc(100dvh - 32px);
    overflow: auto;
    border-radius: 10px;
    background: #252525;
    color: #fff;
}

.poster-carousel .poster-slide {
    position: relative;
}

.poster-carousel .poster-slide[hidden] {
    display: none;
}

.poster-carousel .poster-slide > a,
.poster-carousel .poster-slide img {
    display: block;
    width: 100%;
}

.poster-carousel .poster-slide img {
    height: auto;
    max-height: none;
}

.pop_start.poster-carousel .poster_hint_text {
    bottom: 20px;
}

.poster-carousel .poster-controls,
.poster-carousel .poster-dots {
    display: flex;
    align-items: center;
    justify-content: center;
}

.poster-carousel .poster-controls {
    position: relative;
    min-height: 44px;
    border-bottom: 1px solid #444;
}

.poster-carousel .poster-controls button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
    touch-action: manipulation;
}

.poster-carousel .poster-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #888;
}

.poster-carousel .poster-dots [aria-pressed="true"] span {
    width: 22px;
    border-radius: 5px;
    background: #f4c769;
}

.poster-carousel .poster-count {
    position: absolute;
    left: 14px;
    font-size: 12px;
    color: #ddd;
}

.poster-carousel .poster-controls .poster-pause {
    position: absolute;
    right: 0;
}

.pop_start.poster-carousel .btn {
    padding: 0;
    min-height: 44px;
    background: #333;
}

.pop_start.poster-carousel .btn a {
    min-height: 44px;
    padding: 8px;
    font-size: 12px;
    white-space: normal;
}

.poster-carousel button:focus-visible,
.poster-carousel a:focus-visible {
    outline: 2px solid #f4c769;
    outline-offset: -3px;
}

@media (prefers-reduced-motion: reduce) {
    .pop_start.poster-carousel .poster_hint {
        display: none;
    }
}
