.stories-wrapper {
    position: relative;
    margin-bottom: 18px
}

.stories {
    display: flex;
    gap: 14px;
    margin-top: 15px;
    overflow-x: auto;
    padding: 4px 4px 6px;
    scrollbar-width: none;
    scroll-behavior: smooth
}

.stories::-webkit-scrollbar {
    display: none
}

.story {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    flex-shrink: 0
}

.story__ring {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    padding: 3px;
    transition: transform .2s, box-shadow .2s
}

.story:hover .story__ring {
    transform: scale(1.06);
    box-shadow: 0 4px 16px rgba(224, 0, 122, .2)
}

.story__img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid var(--white);
    background: var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--gray-400);
    overflow: hidden
}

.story__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%
}

.story__add .story__ring {
    background: none;
    padding: 0
}

.story__add .story__img {
    border: 2px dashed var(--gray-300);
    background: var(--gray-100);
    color: var(--fuchsia-500);
    font-size: 1.5rem
}


.story__add--has-stories.story--viewed .story__ring {
    background: var(--gray-300);
}

.story__add--has-stories .story__img {
    border: 3px solid var(--white);
    background: var(--gray-200);
    color: var(--gray-400);
    font-size: 1.2rem
}

/* Badge sits on .story__ring (outside .story__img overflow:hidden) */
.story__add-plus {
    position: absolute;
    bottom: 1px;
    right: 1px;
    width: 20px;
    height: 20px;
    background: var(--fuchsia-500);
    color: #fff;
    border-radius: 50%;
    border: 2px solid #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .7rem;
    font-weight: 700;
    line-height: 1;
    pointer-events: none
}

.story__name {
    font-size: .7rem;
    font-weight: 500;
    color: var(--gray-600);
    max-width: 72px;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap
}

.stories-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-60%);
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1.5px solid var(--gray-200);
    background: var(--white);
    color: var(--gray-600);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 5;
    box-shadow: var(--shadow-md);
    transition: all .2s;
    opacity: 0;
    pointer-events: none
}

.stories-wrapper:hover .stories-nav {
    opacity: 1;
    pointer-events: auto
}

.stories-nav:hover {
    border-color: var(--fuchsia-400);
    color: var(--fuchsia-500);
    background: var(--rose-50);
    box-shadow: var(--shadow-lg)
}

.stories-nav svg {
    width: 16px;
    height: 16px
}

.stories-nav--left {
    left: -6px
}

.stories-nav--right {
    right: -6px
}

.stories-nav--hidden {
    opacity: 0 !important;
    pointer-events: none !important
}

.stories-wrapper::before,
.stories-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 6px;
    width: 40px;
    z-index: 3;
    pointer-events: none
}

.stories-wrapper::before {
    left: 0;
    background: linear-gradient(to right, var(--gray-50), transparent)
}

.stories-wrapper::after {
    right: 0;
    background: linear-gradient(to left, var(--gray-50), transparent)
}

@media(max-width:768px) {
    .stories-nav {
        display: none !important
    }

    .stories-wrapper::before,
    .stories-wrapper::after {
        width: 20px
    }
}
