.wrap {
    padding: 12px
}
.stories {
    display: flex;
    align-items: flex-start;
    flex-wrap: nowrap !important;
    overflow: auto !important;
    padding: .5rem !important;
    gap: 12px;
}

.story.is-new .ring {
   background: linear-gradient(315deg, #e03d96, #feda01);
}

.story {
    width: 80px;
    min-width: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #111;
}

.ring {
    width: 80px;
    height: 80px;
    border-radius: 999px;
    background: #00a41f;
    padding: 3px;
    position: relative;
    flex: 0 0 auto;
}

.inner {
    width: 100%;
    height: 100%;
    border-radius: 999px;
    background: #fff;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3px;
}

.inner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 100%;
}

.title {
    margin-top: 11px;
    font-size: 12px;
    line-height: 1.2;
    width: 72px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #2b2b2b;
}

.badge {
    color: #fff;
    text-align: center;
    background: #fe0b85;
    border: 2px solid #fff;
    border-radius: 6px;
    min-width: 28px;
    padding: 2px 5px;
    font-size: 12px;
    font-weight: 400;
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translate(-50%) translateY(50%);
    box-shadow: 0 2px 6px #00000014;
    white-space: nowrap;
}

.viewer {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.sheet {
    width: 100vw;
    height: var(--app-h);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.head-story {
    background: #fff;
    color: #111;
    padding-top: calc(10px + env(safe-area-inset-top));
    padding-bottom: 10px;
    padding-left: 12px;
    padding-right: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
}

.progress {
    flex: 1;
    display: flex;
    gap: 6px;
    height: auto;
    background-color: transparent;
}

.seg {
    flex: 1;
    height: 3px;
    background: rgba(0, 0, 0, .12);
    border-radius: 999px;
    overflow: hidden
}

.fill {
    height: 100%;
    width: 100%;
    transform: scaleX(0);
    transform-origin: right center;
    background: #111;
    opacity: .55;
    transition: transform 60ms linear;
}

.hTitle {
    font-size: 14px;
    max-width: 160px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis
}

.hTime {
    font-size: 12px;
    opacity: .75;
    margin-right: auto
}

.stage {
    position: relative;
    flex: 1 1 auto;
    overflow: hidden;
    padding-bottom: env(safe-area-inset-bottom);
}

.snap {
    height: 100%;
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    direction: ltr;
}

.snap::-webkit-scrollbar {
    display: none
}

.slide {
    width: 100%;
    height: 100%;
    flex: 0 0 100%;
    scroll-snap-align: start;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    direction: rtl;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    user-select: none;
}

.slide video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.closeBtn {
    position: absolute;
    top: calc(10px + env(safe-area-inset-top));
    left: 10px;
    z-index: 11;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: #fe0b85;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.navBtn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 11;
    border: 0;
    border-radius: 10px;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, .92);
    color: #111;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(0, 0, 0, .18);
}

.navPrev {
    right: 10px
}

.navNext {
    left: 10px
}

.cta {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: calc(14px + env(safe-area-inset-bottom));
     z-index: 100000;
    width: calc(100% - 28px);
    max-width: 420px;
    background: rgba(255, 255, 255, .95);
    color: #111;
    padding: 12px 14px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, .18);
}

.cta span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis
}

.cta i {
    opacity: .7
}

.tap {
    position: absolute;
    inset: 0;
    z-index: 10;
    background: transparent
}

.edge {
    position: absolute;
    top: 53px;
    bottom: 0;
    z-index: 12;
    background: transparent;
    touch-action: manipulation;
}

.edge.left {
    left: 0;
    width: 38vw;
}

.edge.right {
    right: 0;
    width: 38vw;
}

.edge.center {
    left: 38vw;
    right: 38vw;
}

@media (min-width: 768px) {
    body {
        overflow: auto
    }

    .viewer {
        padding: 24px
    }

    .sheet {
        width: 420px;
        height: min(720px, calc(var(--app-h) - 48px));
        border-radius: 16px;
        box-shadow: 0 18px 60px rgba(0, 0, 0, .35);
    }

    .closeBtn {
        top: 10px
    }

    .edge.left,
    .edge.right {
        width: 140px;
    }

    .edge.center {
        left: 140px;
        right: 140px;
    }
}


















