.mswam,
.mswam-carousel,
.mswam-video-rail,
.mswam-video-rail * {
    box-sizing: border-box;
}

.mswam-video-rail {
    position: relative;
    width: 100%;
    height: 460px;
    overflow: hidden;
    padding: 10px 0;
    cursor: grab;
    touch-action: pan-y;
}

.mswam-video-rail.is-dragging {
    cursor: grabbing;
    user-select: none;
}

.mswam-video-rail__track {
    display: flex;
    column-gap: 18px;
    width: max-content;
    height: 100%;
    will-change: transform;
}

.mswam-video-rail__set {
    display: flex;
    gap: 18px;
    height: 100%;
}

.mswam-video-card {
    position: relative;
    width: 250px;
    height: 100%;
    flex: 0 0 250px;
    overflow: hidden;
    border-radius: 16px;
    background: #000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .15);
    transform: translateZ(0);
    transition: transform .4s cubic-bezier(.16, 1, .3, 1), box-shadow .4s ease;
}

.mswam-video-card__frame {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #161616, #050505);
}

.mswam-video-card__poster,.mswam-spotlight__panel>.mswam-video-card__poster{position:absolute;inset:0;z-index:2;display:block;width:100%;height:100%!important;object-fit:cover;pointer-events:none;opacity:1;visibility:visible;transition:opacity .18s ease}
.mswam-video-card.is-playing>.mswam-video-card__poster,.mswam-spotlight__panel.is-playing>.mswam-video-card__poster{opacity:0;visibility:hidden}
@media(prefers-reduced-motion:reduce){.mswam-video-card__poster{transition:none}}

.mswam-video-rail.has-spotlight .mswam-video-card:not(.is-spotlight) {
    opacity: .48;
    filter: saturate(.65);
}

.mswam-video-card.is-spotlight {
    z-index: 5;
    transform: translateY(-6px) scale(1.08);
    box-shadow: 0 22px 54px rgba(0, 0, 0, .46);
}

.mswam-spotlight {
    box-sizing: border-box;
    position: fixed;
    inset: 0;
    z-index: 2147483000;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(4, 7, 10, .78);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
}

.mswam-spotlight__panel {
    position: relative;
    width: min(420px, 100%, 49.5dvh);
    aspect-ratio: 9 / 16;
    max-height: 88vh;
    overflow: hidden;
    border-radius: 20px;
    background: #000;
    box-shadow: 0 26px 90px rgba(0, 0, 0, .58);
}

.mswam-spotlight__panel iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    pointer-events: none;
}

.mswam-spotlight .mswam-spotlight__close {
    position: absolute;
    top: max(16px, env(safe-area-inset-top));
    right: max(16px, env(safe-area-inset-right));
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid rgba(255,255,255,.5);
    border-radius: 50%;
    color: #fff;
    background: rgba(0,0,0,.6);
    font: 400 30px/1 Arial,sans-serif;
    cursor: pointer;
}
.mswam-spotlight .mswam-spotlight__close:focus-visible { outline: 2px solid #fff; outline-offset: 4px; }

.mswam-video-card:hover,
.mswam-video-card:focus-within {
    z-index: 2;
    transform: translateY(-8px) scale(1.025);
    box-shadow: 0 16px 36px rgba(0, 0, 0, .4);
}

.mswam-video-card iframe {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    pointer-events: none;
}

.mswam-video-card__shade,
.mswam-video-card__action {
    position: absolute;
    inset: 0;
}

.mswam-video-card__shade {
    z-index: 1;
    background: transparent;
}

.mswam-video-card__action {
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, .2);
    opacity: 0;
    transition: opacity .35s ease;
}

.mswam-video-card:hover .mswam-video-card__action,
.mswam-video-card:focus-within .mswam-video-card__action {
    opacity: 1;
}

.mswam-video-card__audio {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .92);
    color: #080b0e;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .2);
    cursor: pointer;
    transform: scale(.85);
    transition: transform .3s cubic-bezier(.34, 1.56, .64, 1);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

.mswam-video-card:hover .mswam-video-card__audio,
.mswam-video-card:focus-within .mswam-video-card__audio {
    transform: scale(1);
}

.mswam-video-card__audio svg {
    fill: currentColor;
}

.mswam-video-card__audio:focus-visible,
.mswam-carousel__controls button:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 3px;
}

.mswam-video-card.is-playing-audio .mswam-video-card__action {
    opacity: 0;
    pointer-events: none;
}

.mswam-video-rail--single {
    cursor: default;
}

.mswam-video-rail--single .mswam-video-rail__track {
    width: 100%;
}

.mswam-video-rail--single .mswam-video-rail__set {
    width: 100%;
    justify-content: center;
}

.mswam__award-stage {
    position: relative;
    min-height: 420px;
    overflow: hidden;
}

.mswam__plate,
.mswam__model {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    will-change: transform, opacity;
}

.mswam__plate {
    animation: mswam-plate-in .8s ease-out both;
}

.mswam__model {
    object-position: center bottom;
    animation: mswam-model-in .8s .16s ease-out both;
}

.mswam-carousel {
    position: relative;
    max-width: 1200px;
    margin-inline: auto;
}

.mswam-carousel__slide[hidden] {
    display: none;
}

.mswam-carousel__controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 16px;
}

.mswam-carousel__controls button {
    padding: 9px 16px;
    border: 1px solid currentColor;
    border-radius: 999px;
    background: transparent;
    color: inherit;
    cursor: pointer;
}

@keyframes mswam-plate-in {
    from { opacity: 0; transform: scale(.92) rotate(-2deg); }
    to { opacity: 1; transform: none; }
}

@keyframes mswam-model-in {
    from { opacity: 0; transform: translateY(7%); }
    to { opacity: 1; transform: none; }
}

@media (max-width: 768px) {
    .mswam-video-rail {
        height: 380px;
    }

    .mswam-video-rail__track {
        column-gap: 12px;
    }

    .mswam-video-rail__set {
        gap: 12px;
    }

    .mswam-video-card {
        width: 200px;
        flex-basis: 200px;
    }

    .mswam-video-card__action {
        opacity: 1;
        background: linear-gradient(180deg, transparent 55%, rgba(0, 0, 0, .18));
        align-items: flex-end;
        justify-content: flex-end;
        padding: 14px;
    }

    .mswam-video-card__audio {
        width: 44px;
        height: 44px;
        transform: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .mswam-video-rail {
        overflow-x: auto;
        scroll-snap-type: x mandatory;
    }

    .mswam-video-rail__track {
        transform: none !important;
    }

    .mswam-video-rail__set[aria-hidden="true"] {
        display: none;
    }

    .mswam-video-card {
        scroll-snap-align: center;
    }

    .mswam *,
    .mswam-carousel *,
    .mswam-video-rail * {
        animation: none !important;
        transition: none !important;
    }
}

/* Keep the prepared spotlight player mounted without showing the closed dialog. */
.mswam-spotlight[hidden]{display:none!important}
