.hero-stories {
    position: relative;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 100%;
    margin: 2px 0 20px;
    color: #fff;
}

.hero-stories-slot--desktop {
    position: absolute;
    z-index: 6;
    top: -88px;
    bottom: -112px;
    left: 50%;
    display: grid;
    width: min(560px, 46vw);
    transform: translateX(-50%);
}

.hero-stories-slot--desktop .hero-stories {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    display: flex;
    width: 100%;
    align-items: flex-end;
    justify-content: center;
    gap: 12px;
    margin: 0;
}

.hero-stories-slot--desktop .story-group--principal {
    position: static;
    margin: 0;
}

.hero-stories-slot--desktop .story-categories {
    position: static;
    max-width: none;
    padding-inline: 0;
}

@media (min-width: 769px) {
    .hero-image-wrapper {
        top: -52px;
    }
}

.hero-stories-slot--mobile {
    display: none;
}

.hero-stories[hidden] {
    display: none !important;
}

.story-group {
    appearance: none;
    border: 0;
    font: inherit;
    cursor: pointer;
}

.story-group--principal {
    display: grid;
    flex: 0 0 auto;
    justify-items: center;
    gap: 5px;
    padding: 0;
    background: transparent;
    color: #fff;
}

.story-avatar {
    position: relative;
    display: grid;
    width: 72px;
    height: 72px;
    padding: 4px;
    place-items: center;
    border-radius: 50%;
    background: conic-gradient(from 215deg, #57a9ff 0 60%, #f9c515 60% 96%, #57a9ff 96%);
    box-shadow: 0 8px 22px rgba(1, 28, 64, .28);
}

.story-avatar::after {
    content: '';
    position: absolute;
    inset: 4px;
    border: 3px solid #073a74;
    border-radius: inherit;
    pointer-events: none;
}

.story-avatar img {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #eef4fb;
    object-fit: cover;
    object-position: 50% 18%;
}

.story-avatar__play {
    position: absolute;
    right: auto;
    bottom: 6px;
    left: 2px;
    z-index: 3;
    display: grid;
    width: 22px;
    height: 22px;
    place-items: center;
    border: 2px solid #fff;
    border-radius: 50%;
    background: #fff;
    color: #0752a5;
    box-shadow: 0 3px 8px rgba(0, 24, 55, .25);
}

.story-avatar__play svg {
    width: 11px;
    height: 11px;
    margin-left: 1px;
}

.story-group--principal > span:last-child {
    padding: 3px 9px;
    border-radius: 6px;
    background: #fff;
    color: #073a74;
    font-size: .63rem;
    font-weight: 800;
    line-height: 1.15;
    white-space: nowrap;
}

.story-categories {
    display: flex;
    min-width: 0;
    gap: 10px;
    overflow-x: auto;
    padding: 3px 1px 7px;
    scrollbar-width: none;
    overscroll-behavior-inline: contain;
}

.story-categories::-webkit-scrollbar {
    display: none;
}

.story-group--category {
    display: inline-flex;
    flex: 0 0 auto;
    min-height: 48px;
    align-items: center;
    gap: 8px;
    padding: 5px 13px 5px 6px;
    border: 1px solid rgba(255, 255, 255, .34);
    border-radius: 24px;
    background: rgba(255, 255, 255, .1);
    color: #fff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12);
    font-size: .78rem;
    font-weight: 700;
    white-space: nowrap;
}

.story-group--category img {
    width: 38px;
    height: 38px;
    border: 2px solid rgba(255, 255, 255, .7);
    border-radius: 50%;
    background: #eaf1f8;
    object-fit: cover;
}

.story-group:hover,
.story-group:focus-visible {
    transform: translateY(-2px);
}

.story-group:focus-visible {
    outline: 3px solid #f9c515;
    outline-offset: 3px;
}

.story-viewer {
    width: min(430px, calc(100vw - 32px));
    height: min(760px, calc(100dvh - 32px));
    max-width: none;
    max-height: none;
    margin: auto;
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 20px;
    background: #06162a;
    color: #fff;
    box-shadow: 0 30px 90px rgba(0, 0, 0, .5);
}

.story-viewer::backdrop {
    background: rgba(0, 0, 0, .86);
    backdrop-filter: blur(5px);
}

.story-viewer[open] {
    display: grid;
}

.story-viewer__shell {
    position: relative;
    display: grid;
    min-width: 0;
    min-height: 0;
    background: #06162a;
}

.story-viewer__media,
.story-viewer__media img,
.story-viewer__media video {
    width: 100%;
    height: 100%;
}

.story-viewer__media {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    overflow: hidden;
}

.story-viewer__media img,
.story-viewer__media video {
    display: block;
    object-fit: contain;
    background: #06162a;
}

.story-viewer__chrome {
    position: relative;
    z-index: 2;
    display: grid;
    align-content: space-between;
    min-height: 100%;
    padding: 12px;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(0, 0, 0, .68), transparent 24%, transparent 76%, rgba(0, 0, 0, .34));
}

.story-viewer__top {
    display: grid;
    gap: 10px;
}

.story-viewer__progress {
    display: flex;
    gap: 4px;
}

.story-viewer__progress span {
    height: 3px;
    flex: 1;
    overflow: hidden;
    border-radius: 4px;
    background: rgba(255, 255, 255, .32);
}

.story-viewer__progress i {
    display: block;
    width: 0;
    height: 100%;
    background: #fff;
}

.story-viewer__progress span.is-complete i {
    width: 100%;
}

.story-viewer__progress span.is-active i {
    animation: storyProgress var(--story-duration, 6s) linear forwards;
}

.story-viewer.is-paused .story-viewer__progress span.is-active i {
    animation-play-state: paused;
}

.story-viewer__heading {
    display: flex;
    align-items: center;
    gap: 10px;
}

.story-viewer__heading img {
    width: 36px;
    height: 36px;
    border: 2px solid #f9c515;
    border-radius: 50%;
    background: #fff;
    object-fit: cover;
    object-position: 50% 18%;
}

.story-viewer__identity {
    display: grid;
    min-width: 0;
    gap: 1px;
}

.story-viewer__identity strong {
    font-size: .86rem;
}

.story-viewer__identity span {
    color: rgba(255, 255, 255, .74);
    font-size: .7rem;
}

.story-viewer__button {
    display: grid;
    width: 44px;
    height: 44px;
    padding: 0;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, .36);
    color: #fff;
    cursor: pointer;
    pointer-events: auto;
}

.story-viewer__button:hover,
.story-viewer__button:focus-visible {
    background: rgba(255, 255, 255, .2);
}

.story-viewer__button svg[hidden] {
    display: none;
}

.story-viewer__button:focus-visible {
    outline: 2px solid #f9c515;
    outline-offset: 2px;
}

.story-viewer__mute {
    margin-left: auto;
}

.story-viewer__nav {
    position: absolute;
    z-index: 3;
    inset-block: 76px 92px;
    width: 40%;
    border: 0;
    background: transparent;
    color: transparent;
    cursor: pointer;
}

.story-viewer__prev { left: 0; }
.story-viewer__next { right: 0; }

.story-viewer__nav:focus-visible {
    outline: 3px solid #f9c515;
    outline-offset: -5px;
    background: linear-gradient(90deg, rgba(249, 197, 21, .16), transparent);
}

.story-viewer__next:focus-visible {
    background: linear-gradient(270deg, rgba(249, 197, 21, .16), transparent);
}

.story-viewer__status {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

.story-viewer__hint {
    justify-self: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(0, 0, 0, .4);
    color: rgba(255, 255, 255, .82);
    font-size: .68rem;
}

.story-viewer__bottom {
    display: grid;
    justify-items: center;
    gap: 7px;
}

.story-viewer__instagram {
    display: inline-flex;
    min-height: 30px;
    align-items: center;
    gap: 7px;
    padding: 5px 14px;
    border: 1px solid rgba(255, 255, 255, .58);
    border-radius: 8px;
    background: rgba(5, 19, 37, .66);
    color: #fff;
    font-size: .69rem;
    font-weight: 750;
    letter-spacing: .02em;
    pointer-events: auto;
}

.story-viewer__instagram:hover,
.story-viewer__instagram:focus-visible {
    border-color: #f9c515;
    background: #f9c515;
    color: #052f62;
}

.story-viewer__instagram:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

@keyframes storyProgress {
    to { width: 100%; }
}

@media (max-width: 768px) {
    .hero-stories-slot--desktop {
        display: none;
    }

    .hero-stories-slot--mobile {
        order: 5;
        display: block;
        width: calc(100% + 40px);
        margin: -14px -20px -10px;
        padding: 16px 20px;
        background: linear-gradient(180deg,
            rgba(6, 52, 105, 0) 0%,
            rgba(6, 52, 105, .86) 22%,
            #063469 48%,
            #063469 66%,
            rgba(6, 52, 105, .78) 84%,
            rgba(6, 52, 105, 0) 100%);
        transform: translateY(var(--hero-action-lift, -122px));
    }

    .hero-stories {
        width: 100%;
        gap: 8px;
        margin: 0;
    }

    .story-categories {
        gap: 4px;
    }

    .story-group--category {
        min-height: 44px;
        gap: 4px;
        padding: 4px 6px 4px 4px;
        border-color: rgba(255, 255, 255, .5);
        background: rgba(255, 255, 255, .14);
        box-shadow: none;
        font-size: .65rem;
    }

    .story-group--category img {
        width: 32px;
        height: 32px;
    }

    .story-viewer {
        width: 100vw;
        height: 100dvh;
        border-radius: 0;
    }
}

@media (max-width: 380px), (max-height: 690px) and (max-width: 768px) {
    .story-avatar {
        width: 64px;
        height: 64px;
    }

    .story-avatar img {
        width: 56px;
        height: 56px;
    }
}

@media (max-height: 620px) and (max-width: 768px) {
    .hero-stories-slot--mobile {
        margin-top: -10px;
        padding-block: 10px;
    }

    .hero-stories {
        gap: 5px;
    }

    .story-avatar {
        width: 52px;
        height: 52px;
    }

    .story-avatar img {
        width: 44px;
        height: 44px;
    }

    .story-avatar__play {
        bottom: 2px;
        width: 19px;
        height: 19px;
    }

    .story-group--principal {
        gap: 2px;
    }

    .story-group--principal > span:last-child {
        padding: 2px 6px;
        font-size: .54rem;
    }

    .story-group--category {
        min-height: 38px;
        font-size: .58rem;
    }

    .story-group--category img {
        width: 28px;
        height: 28px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .story-group { transition: none; }
    .story-viewer__progress span.is-active i { animation: none; width: 100%; }
}
