.stories {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 14px;
}

.tile {
    position: relative;
    aspect-ratio: 9 / 16;
    border-radius: 18px;
    overflow: hidden;
    cursor: pointer;
    border: 0;
    padding: 0;
    background: var(--card);
    color: inherit;
    text-align: left;
}

.tile img,
.tile video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.tile .grad {
    position: absolute;
    inset: auto 0 0 0;
    height: 46%;
    background: linear-gradient(transparent, rgba(0, 0, 0, .75));
}

.tile .meta {
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 10px;
}

.tile .name {
    font-size: 13px;
    font-weight: 650;
}

.tile .count {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, .55);
    border: 1px solid rgba(255, 255, 255, .15);
    font-size: 11px;
    padding: 4px 7px;
    border-radius: 999px;
}

.tile.seen {
    opacity: .72;
}

.viewer {
    position: fixed;
    inset: 0;
    background: hsl(0deg 0% 0% / 60%);
    backdrop-filter: blur(15px);
    z-index: 50;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: .3s all;
}

.viewer.open {
    display: flex;
    opacity: 1;
    pointer-events: auto;
}

.stage {
    position: relative;
    width: min(420px, 100vw);
    height: min(92vh, 780px);
    background: #111;
    overflow: hidden;
    border-radius: 12px;
}

.media,
.media img,
.media video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.media video {
    background: #000;
}

.bars {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    z-index: 4;
    display: flex;
    gap: 4px;
}

.bar {
    flex: 1;
    height: 3px;
    background: rgba(255, 255, 255, .28);
    border-radius: 4px;
    overflow: hidden;
}

.bar>i {
    display: block;
    height: 100%;
    width: 0;
    background: #fff;
    transform-origin: left center;
}

.head {
    position: absolute;
    top: 20px;
    left: 12px;
    right: 48px;
    z-index: 4;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ava {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, .4);
    display: none;
}

.who {
    font-size: 13px;
    font-weight: 650;
}

.when {
    font-size: 11px;
    color: #ddd;
}

.close {
    position: absolute;
    top: 16px;
    right: 10px;
    z-index: 5;
    width: 36px;
    height: 36px;
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
}

.hit {
    position: absolute;
    top: 54px;
    bottom: 0;
    width: 50%;
    z-index: 3;
    background: transparent;
    border: 0;
    cursor: pointer;
}

.hit.left {
    left: 0;
}

.hit.right {
    right: 0;
}

.paused-note {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 4;
    pointer-events: none;
    opacity: 0;
    transition: opacity .15s;
    background: rgba(0, 0, 0, .45);
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 12px;
}

.viewer.holding .paused-note {
    opacity: 1;
}

.stories.withMore {
    max-width: 800px;
    position: relative;
}

.stories-more {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 9 / 16;
    border-radius: 18px;
    border: 1px dashed rgba(255,255,255,.22);
    background: rgba(255,255,255,.04);
    color: var(--text);
    cursor: pointer;
    font: inherit;
    font-weight: 650;
    font-size: 14px;
    text-decoration: none;
    text-align: center;
}

.stories-more:hover {
    background: rgba(255,255,255,.08);
}

.sound {
    position: absolute;
    top: 16px;
    right: 46px;
    z-index: 6;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, .35);
    color: #fff;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.sound.show {
    display: flex;
}

.sound svg {
    width: 20px;
    height: 20px;
    display: block;
}

@media (max-width: 520px) {
    .stage {
        width: 100vw;
        height: 100vh;
        border-radius: 0;
    }
}