.poster-gallery-page {
    height: 100dvh;
    overflow: hidden;
    background: #050d1c;
}

.poster-page {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: calc(var(--header-h) + 12px) 20px 16px;
    overflow-y: auto;
    color: #fff;
    background:
        radial-gradient(ellipse 70% 50% at 50% 0%, rgba(56, 104, 176, 0.36), transparent 62%),
        radial-gradient(circle at 88% 88%, rgba(240, 176, 70, 0.13), transparent 46%),
        radial-gradient(circle at 8% 82%, rgba(124, 198, 232, 0.1), transparent 42%),
        linear-gradient(160deg, #050d1d 0%, #0a1b33 55%, #050d1c 100%);
}

.star-field {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.poster-shell {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    width: min(100%, 1320px);
    margin: auto;
}

.poster-heading {
    flex: 0 0 auto;
    margin-bottom: clamp(10px, 2vh, 22px);
    text-align: center;
}

.poster-title {
    font-family: var(--font-serif);
    font-size: clamp(24px, 3.2vw, 40px);
    font-weight: 700;
    letter-spacing: 0.12em;
    background: linear-gradient(100deg, #fff3d2 0%, #f8cd74 48%, #ffeec6 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 8px 26px rgba(247, 201, 106, 0.28));
}

.poster-sub {
    margin-top: 8px;
    font-size: 13px;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.5);
}

.poster-carousel {
    --stage-h: clamp(250px, 52vh, 600px);
    display: flex;
    flex: 1;
    min-height: 0;
    flex-direction: column;
    justify-content: center;
}

.poster-showcase {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(10px, 2vw, 26px);
}

.poster-stage {
    position: relative;
    flex: 0 0 auto;
    width: min(calc(var(--stage-h) * 0.75), 84vw);
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 18px;
    touch-action: pan-y;
    background: #0a1526;
    box-shadow:
        0 50px 90px -40px rgba(0, 0, 0, 0.95),
        0 0 0 1px rgba(255, 255, 255, 0.12),
        0 0 70px -20px rgba(247, 201, 106, 0.28);
}

.poster-slides {
    position: absolute;
    inset: 0;
}

.poster-slide {
    position: absolute;
    inset: 0;
    margin: 0;
    opacity: 0;
    transform: scale(1.03);
    transition: opacity 0.75s var(--ease), transform 1.1s var(--ease);
    pointer-events: none;
}

.poster-slide.is-active {
    z-index: 1;
    opacity: 1;
    transform: none;
    pointer-events: auto;
}

.poster-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.poster-preview {
    position: relative;
    flex: 0 0 auto;
    width: auto;
    height: calc(var(--stage-h) * 0.74);
    aspect-ratio: 3 / 4;
    padding: 0;
    overflow: hidden;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 18px 40px -28px rgba(0, 0, 0, 0.8);
    opacity: 0.42;
    filter: saturate(0.85);
    transition: opacity 0.4s var(--ease), transform 0.4s var(--ease), filter 0.4s;
}

.poster-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.poster-preview:hover {
    opacity: 0.85;
    filter: none;
    transform: translateY(-3px);
}

.poster-preview::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(5, 13, 28, 0.1), rgba(5, 13, 28, 0.55));
}

.poster-arrow {
    position: absolute;
    top: 50%;
    z-index: 3;
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.34);
    background: linear-gradient(150deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.06)), rgba(6, 14, 30, 0.56);
    -webkit-backdrop-filter: blur(14px) saturate(155%);
    backdrop-filter: blur(14px) saturate(155%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.36), 0 14px 30px -16px rgba(0, 0, 0, 0.8);
    font-size: 15px;
    color: #fff;
    opacity: 0;
    transform: translateY(-50%);
    transition: opacity 0.3s var(--ease), background 0.3s, border-color 0.3s, color 0.3s;
}

.poster-stage:hover .poster-arrow,
.poster-arrow:focus-visible {
    opacity: 1;
}

.poster-arrow:hover {
    background: rgba(247, 201, 106, 0.9);
    border-color: transparent;
    color: #35240a;
}

.poster-arrow--previous {
    left: 12px;
}

.poster-arrow--next {
    right: 12px;
}

.poster-caption {
    margin-top: clamp(10px, 1.8vh, 18px);
    min-height: 1.7em;
    font-family: var(--font-serif);
    font-size: clamp(14px, 1.3vw, 16px);
    letter-spacing: 0.1em;
    text-align: center;
    color: #ffeccb;
}

.poster-caption-text {
    display: inline-block;
    animation: caption-in 0.6s var(--ease);
}

@keyframes caption-in {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: none; }
}

.poster-controls {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-top: clamp(10px, 1.8vh, 18px);
}

.poster-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 11.5px;
    letter-spacing: 0.18em;
    color: rgba(255, 255, 255, 0.4);
}

.poster-count {
    font-family: var(--font-serif);
    font-size: 13px;
    letter-spacing: 0.16em;
    color: rgba(255, 255, 255, 0.72);
}

.poster-count .poster-sep {
    margin: 0 5px;
    color: rgba(247, 201, 106, 0.6);
}

.poster-hint {
    position: relative;
    padding-left: 18px;
}

.poster-hint::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--gold-400);
    transform: translateY(-50%);
    animation: hint-pulse 2.4s ease-in-out infinite;
}

.poster-touch-hint {
    display: none;
    font-size: 11.5px;
    letter-spacing: 0.14em;
    color: rgba(255, 255, 255, 0.52);
}

@keyframes hint-pulse {
    0%, 100% { opacity: 0.35; box-shadow: 0 0 0 0 rgba(247, 201, 106, 0.4); }
    50% { opacity: 1; box-shadow: 0 0 0 4px rgba(247, 201, 106, 0.08); }
}

@media (max-width: 900px) {
    .poster-preview {
        display: none;
    }

    .poster-carousel {
        --stage-h: clamp(280px, 58vh, 560px);
    }

    .poster-arrow {
        opacity: 1;
        width: 38px;
        height: 38px;
    }
}

@media (max-width: 640px) {
    .poster-page {
        padding: calc(var(--header-h) + 10px) 14px 14px;
    }

    .poster-carousel {
        --stage-h: clamp(240px, 50vh, 430px);
    }

    .poster-stage {
        width: min(calc(var(--stage-h) * 0.75), 86vw);
        border-radius: 14px;
    }

    .poster-sub {
        margin-top: 6px;
        font-size: 11.5px;
        letter-spacing: 0.06em;
        color: rgba(255, 255, 255, 0.46);
    }

    .poster-arrow {
        display: none;
    }

    .poster-hint {
        display: none;
    }

    .poster-touch-hint {
        display: block;
    }
}

@keyframes poster-rise {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes poster-zoom {
    from {
        opacity: 0;
        transform: scale(0.955);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes poster-soft {
    from {
        opacity: 0;
    }
    to {
        opacity: var(--enter-opacity, 1);
    }
}

@media (prefers-reduced-motion: no-preference) {
    .poster-gallery-page .site-header {
        animation: poster-soft 0.8s var(--ease) backwards;
    }

    .star-field {
        animation: poster-soft 1.8s ease-out backwards;
    }

    .poster-title {
        animation: poster-rise 0.85s var(--ease) 0.14s backwards;
    }

    .poster-sub {
        animation: poster-rise 0.7s var(--ease) 0.24s backwards;
    }

    .poster-stage {
        animation: poster-zoom 1.2s var(--ease) 0.2s backwards;
    }

    .poster-preview {
        --enter-opacity: 0.42;
        animation: poster-soft 0.9s var(--ease) 0.45s backwards;
    }

    .poster-caption {
        animation: poster-rise 0.75s var(--ease) 0.55s backwards;
    }

    .poster-meta,
    .poster-touch-hint {
        animation: poster-soft 0.7s var(--ease) 0.7s backwards;
    }
}

@media (prefers-reduced-motion: reduce) {
    .poster-slide {
        transition: none;
    }

    .poster-caption-text,
    .poster-hint::before {
        animation: none;
    }
}
