.story-circles-section {
    background: var(--bs-body-bg);
}

.story-circles-scroll {
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}

.story-circles-scroll::-webkit-scrollbar {
    height: 4px;
}

.story-circle-ring {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
    width: 72px;
    height: 72px;
}

.story-circle-img {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border: 2px solid #fff;
}

.story-circle-btn:hover .story-circle-ring,
.story-circle-btn:focus .story-circle-ring {
    opacity: 0.9;
}

.story-circles-next {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 32px;
    height: 32px;
    padding: 0;
    align-items: center;
    justify-content: center;
}

/* —— Viewer —— */
.story-viewer {
    position: fixed;
    inset: 0;
    z-index: 1080;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    touch-action: none;
    opacity: 0;
    transition: opacity 0.22s ease;
}

.story-viewer.is-open {
    opacity: 1;
}

.story-viewer[hidden] {
    display: none !important;
}

.story-viewer-backdrop {
    position: absolute;
    inset: 0;
    background: #000;
}

.story-viewer-inner {
    position: relative;
    width: 100%;
    max-width: 420px;
    height: 100%;
    max-height: 100dvh;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    background: #000;
    transform: scale(0.94);
    opacity: 0;
    transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.28s ease;
}

.story-viewer.is-open .story-viewer-inner {
    transform: scale(1);
    opacity: 1;
}

.story-progress-bars {
    display: flex;
    gap: 4px;
    padding: 12px 12px 0;
    position: relative;
    z-index: 5;
}

.story-progress-bar {
    flex: 1;
    height: 3px;
    background: rgba(255, 255, 255, 0.35);
    border-radius: 2px;
    overflow: hidden;
}

.story-progress-bar-fill {
    height: 100%;
    width: 0%;
    background: #fff;
    border-radius: 2px;
    will-change: width;
    transition: width 0.05s linear;
}

.story-viewer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    position: relative;
    z-index: 5;
    animation: storyHeaderIn 0.35s ease 0.08s both;
}

@keyframes storyHeaderIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.story-viewer-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.story-viewer-avatar {
    width: 36px;
    height: 36px;
    object-fit: cover;
}

.story-viewer-profile-link {
    color: rgba(255, 255, 255, 0.75);
}

.story-viewer-close {
    font-size: 1.25rem;
    padding: 0.25rem 0.5rem;
}

.story-slide-area {
    flex: 1;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    min-height: 0;
    background: #000;
}

.story-slide-pause-overlay {
    position: absolute;
    inset: 0;
    z-index: 4;
    background: rgba(0, 0, 0, 0);
    pointer-events: none;
    transition: background 0.2s ease;
}

.story-viewer.is-paused .story-slide-pause-overlay {
    background: rgba(0, 0, 0, 0.25);
}

.story-slide-media {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    min-height: 0;
    width: 100%;
}

.story-slide-image {
    max-width: 100%;
    max-height: calc(100dvh - 220px);
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    will-change: transform, opacity;
}

.story-slide-image.story-anim-in-next {
    animation: storySlideInNext 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.story-slide-image.story-anim-in-prev {
    animation: storySlideInPrev 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.story-slide-image.story-anim-in-none {
    animation: storySlideFadeIn 0.22s ease;
}

@keyframes storySlideInNext {
    from {
        opacity: 0;
        transform: translateX(28px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes storySlideInPrev {
    from {
        opacity: 0;
        transform: translateX(-28px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes storySlideFadeIn {
    from {
        opacity: 0;
        transform: scale(0.98);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.story-slide-bottom {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 5;
    padding: 0 14px 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    pointer-events: none;
    animation: storyBottomIn 0.38s ease 0.12s both;
}

@keyframes storyBottomIn {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.story-slide-swipe-hint {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    font-size: 0.8rem;
    font-weight: 500;
    opacity: 0;
    visibility: hidden;
    pointer-events: auto;
    transition: opacity 0.2s ease;
}

.story-slide-area.has-link .story-slide-swipe-hint {
    opacity: 1;
    visibility: visible;
    animation: storySwipeHintFloat 2.2s ease-in-out infinite;
}

.story-slide-swipe-icon {
    font-size: 1.1rem;
    line-height: 1;
}

@keyframes storySwipeHintFloat {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

.story-slide-area.is-swipe-up .story-slide-swipe-hint {
    animation: storySwipeHintExit 0.32s ease forwards;
}

@keyframes storySwipeHintExit {
    to {
        opacity: 0;
        transform: translateY(-18px);
    }
}

.story-slide-card {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 12px 12px 14px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(8, 8, 8, 0.92);
    pointer-events: auto;
}

.story-slide-card-main {
    flex: 1;
    min-width: 0;
}

.story-slide-vehicle {
    color: #fff;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.story-slide-specs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 6px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.78rem;
    line-height: 1.2;
}

.story-slide-specs:empty {
    display: none;
}

.story-slide-specs span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.story-slide-specs .bi {
    font-size: 0.85rem;
    opacity: 0.9;
}

.story-slide-price-pill {
    flex-shrink: 0;
    padding: 10px 12px;
    border-radius: 12px;
    background: #fff;
    color: #111;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

.story-slide-price-pill:empty {
    display: none;
}

.story-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 6;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease, transform 0.15s ease;
}

.story-nav:active {
    transform: translateY(-50%) scale(0.92);
}

.story-nav-prev {
    left: -56px;
}

.story-nav-next {
    right: -56px;
}

.story-viewer.is-closing {
    opacity: 0;
}

.story-viewer.is-closing .story-viewer-inner {
    transform: scale(0.94);
    opacity: 0;
}

@media (max-width: 576px) {
    .story-nav-prev {
        left: 8px;
    }

    .story-nav-next {
        right: 8px;
    }

    .story-nav {
        background: rgba(0, 0, 0, 0.35);
    }
}

@media (min-width: 577px) {
    .story-viewer-inner {
        height: 100%;
        max-height: 100dvh;
    }
}

@media (prefers-reduced-motion: reduce) {
    .story-viewer-inner,
    .story-slide-image,
    .story-slide-swipe-hint,
    .story-slide-bottom,
    .story-viewer-header {
        animation: none !important;
        transition: none !important;
    }
}
