
.stories-bar {
    background: #0000007d;
    width: fit-content;
	max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    position: absolute;
    bottom: 45px;
    left: 50%;
    transform: translateX(-50%);
	border-radius: 15px;
}

.stories-bar::-webkit-scrollbar {
    display: none;
}

.stories-scroll {
    display: flex;
    gap: 10px;
    padding: 10px 14px 12px;
    width: max-content;
    min-width: 100%;
    box-sizing: border-box;
}

.story-thumb-wrap {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    position: relative;
}

.story-play-icon {
    position: absolute;
    top: 55px;      
    left: 50%;
    transform: translate(-50%, -50%);
    width: 26px;
    height: 26px;
    pointer-events: none;
    opacity: 0.9;
}

.story-thumb {
    width: 80px;
    height: 110px;
    border-radius: 15%;
    object-fit: cover;
    border: 1px solid #e31010;  
    box-sizing: border-box;
    display: block;
    transition: border-color 0.25s ease, opacity 0.2s;
    background: #222;
}

.story-thumb:active {
    opacity: 0.8;
}

.story-thumb.seen {
    border-color: #444;
}

.stories-see-all-wrap {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}

.stories-see-all-circle {
    width: 68px;
    height: 93px;
    border-radius: 15%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: white;
    background: #1a1a1a;
    box-sizing: border-box;
    transition: border-color 0.2s, color 0.2s;
}

.stories-see-all-wrap:hover .stories-see-all-circle,
.stories-see-all-wrap:active .stories-see-all-circle {
    border-color: #e31010;
    color: #fff;
}

.story-label {
    font-size: 10px;
    color: white;
    max-width: 64px;
    text-align: center;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-family: inherit;
    line-height: 1.2;
}


.stories-overlay {
    position: fixed;
    inset: 0;
    background: #000;
    z-index: 9999;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overscroll-behavior: contain;
}

.stories-overlay.active {
    display: flex;
}

@media (min-width: 640px) {
    .stories-overlay {
        background: rgba(0, 0, 0, 0.88);
    }
}


.stories-progress-wrap {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 430px;
    display: flex;
    gap: 4px;
    padding: 12px 10px 0;
    box-sizing: border-box;
    z-index: 10;
}

@supports (padding-top: env(safe-area-inset-top)) {
    .stories-progress-wrap {
        padding-top: calc(12px + env(safe-area-inset-top));
    }
}

.stories-progress-bar {
    flex: 1;
    height: 3px;
    background: rgba(255, 255, 255, 0.35);
    border-radius: 2px;
    overflow: hidden;
	text-align: left;
}

.stories-progress-fill {
    height: 100%;
    background: #fff;
    width: 0%;
    border-radius: 2px;
}

.stories-progress-fill.done {
    width: 100% !important;
    transition: none !important;
}


.stories-content {
    position: relative;
    width: 100%;
    max-width: 430px;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.stories-content img,
.stories-content video {
    max-width: 100%;
    max-height: 100vh;
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}


.stories-tap-prev,
.stories-tap-next {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 38%;
    z-index: 5;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.stories-tap-prev { left: 0; }
.stories-tap-next { right: 0; }


.stories-close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 20;
    background: none;
    border: none;
    color: #fff;
    font-size: 26px;
    cursor: pointer;
    line-height: 1;
    padding: 6px 8px;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.9);
    -webkit-tap-highlight-color: transparent;
}

.stories-close:focus {
    outline: 2px solid rgba(255,255,255,0.6);
    border-radius: 4px;
}

@supports (top: env(safe-area-inset-top)) {
    .stories-close {
        top: calc(14px + env(safe-area-inset-top));
    }
}
