/* Ordered reel feed. Loaded after the original stylesheet so payment UI stays intact. */
html, body {
    overflow: hidden;
    background: #080b09;
}

.legacy-scene { display: none !important; }

.reels-feed {
    width: 100%;
    height: 100vh;
    height: 100svh;
    margin: 0 auto;
    overflow-y: auto;
    overflow-x: hidden;
    padding-bottom: 132px;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    background: #080b09;
}
.reels-feed::-webkit-scrollbar { display: none; }

.reel-card {
    width: 100%;
    height: calc(100svh - 132px);
    min-height: 420px;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    background: #080b09;
}

.reel-titlebar {
    height: 72px;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    color: #fff;
    background: linear-gradient(90deg, #101812, #0c110d);
    border-bottom: 1px solid rgba(255,255,255,.12);
}
.reel-title-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(145deg, var(--c-primary), var(--c-accent));
    box-shadow: 0 5px 18px rgba(0,0,0,.28);
}
.reel-title-icon svg { width: 20px; height: 20px; margin-left: 2px; }
.reel-title-copy { min-width: 0; display: block; }
.reel-titlebar h2 {
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 17px;
    line-height: 1.2;
    font-weight: 750;
}
.reel-title-copy small {
    display: block;
    margin-top: 4px;
    color: rgba(255,255,255,.52);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .35px;
    text-transform: uppercase;
}
.reel-top-badge {
    padding: 5px 8px;
    border: 1px solid rgba(255,255,255,.22);
    border-radius: 999px;
    color: #dfffe8;
    background: rgba(29,143,67,.22);
    font-size: 10px;
    font-weight: 850;
    letter-spacing: .8px;
}

.reel-media {
    position: relative;
    width: 100%;
    height: calc(100% - 72px);
    overflow: hidden;
    background: #000;
}
.reel-poster {
    position: absolute;
    inset: -18px;
    background-color: #09120c;
    background-position: center;
    background-size: cover;
    filter: blur(20px) brightness(.52);
    transform: scale(1.08);
}
.reel-locked-cover {
    position: absolute;
    z-index: 2;
    inset: 0;
    display: none;
    background-color: #030504;
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
}
.reel-card.is-locked .reel-locked-cover { display: block; }
.reel-card.is-locked .reel-video { opacity: 0; }
.reel-card.is-locked .reel-sound,
.reel-card.is-locked .reel-progress { display: none; }
.reel-video {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: transparent;
}

.reel-sound,
.reel-play {
    position: absolute;
    z-index: 4;
    border: 0;
    color: #fff;
    background: rgba(0,0,0,.56);
    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.reel-sound {
    right: 14px;
    bottom: 18px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: grid;
    place-items: center;
}
.reel-sound svg { width: 19px; height: 19px; }
.reel-sound .sound-on { display: none; }
.reel-sound[aria-pressed="true"] .sound-on { display: block; }
.reel-sound[aria-pressed="true"] .sound-off { display: none; }
.reel-play {
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 78px;
    height: 78px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,.25);
    box-shadow: 0 9px 30px rgba(0,0,0,.42);
}
.reel-play svg { width: 34px; height: 34px; margin: 4px 0 0 5px; }
.reel-play[hidden] { display: none; }

.reel-progress {
    position: absolute;
    z-index: 5;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    background: rgba(255,255,255,.24);
}
.reel-progress span {
    display: block;
    width: 0;
    height: 100%;
    background: var(--c-primary);
    transition: width .1s linear;
}
.reel-ended {
    position: absolute;
    z-index: 3;
    inset: 0;
    display: grid;
    place-items: center;
    color: rgba(255,255,255,.9);
    background: rgba(0,0,0,.28);
    font-size: 13px;
    font-weight: 750;
    letter-spacing: .2px;
}
.reel-ended[hidden] { display: none; }

.reel-empty {
    min-height: 100svh;
    display: grid;
    place-items: center;
    background: linear-gradient(160deg, #0a1f0f, #1a4a25);
}

.sheet-backdrop {
    background: rgba(0,0,0,0);
    -webkit-backdrop-filter: blur(0);
    backdrop-filter: blur(0);
    transition: background .25s ease, backdrop-filter .25s ease;
}
.sheet-backdrop.active {
    background: rgba(0,0,0,.32);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
}
.reels-feed.is-behind-paywall { pointer-events: none; }
.payment-sheet { position: relative; }

@media (min-width: 560px) {
    .reels-feed {
        max-width: 520px;
        border-left: 1px solid rgba(255,255,255,.08);
        border-right: 1px solid rgba(255,255,255,.08);
        box-shadow: 0 0 70px rgba(0,0,0,.5);
    }
}

@media (max-height: 560px) {
    .reels-feed { padding-bottom: 96px; }
    .reel-card { height: calc(100svh - 96px); min-height: 360px; }
    .reel-titlebar { height: 58px; }
    .reel-media { height: calc(100% - 58px); }
}

@media (prefers-reduced-motion: reduce) {
    .reels-feed { scroll-behavior: auto; }
    .reel-progress span { transition: none; }
}
