/* =========================================================
   mobile-app.css  -  ADDITIVE. Load AFTER style.css and dashboard-theme.css.
   Nothing in those files is edited.
   - Online-stores strip (all screen sizes)
   - "App mode" for phones / small tablets (<= 820px):
       bottom tab bar, compact header + hero, sheet-style cards,
       dashboard menu becomes the bottom bar, tables become cards.
   Desktop (> 820px) is unchanged apart from the online strip.
   ========================================================= */

:root {
    --tabbar-h: 64px;
    --safe-b: env(safe-area-inset-bottom, 0px);
}

/* =========================================================
   1. Section headings + online stores strip (all sizes)
   ========================================================= */
.os-wrap {
    padding: 28px 0 0;
}

.os-fallback {
    padding-top: 22px;
}

.os-head, .sec-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

    .os-head h3, .sec-head h3 {
        display: flex;
        align-items: center;
        gap: 8px;
        font-size: 15px;
        text-transform: uppercase;
        letter-spacing: .04em;
        color: var(--slate);
    }

.sec-head {
    margin-top: 0;
}

.os-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex: 0 0 auto;
    background: var(--forest);
    box-shadow: 0 0 0 4px rgba(47, 109, 79, .18);
}

.os-dot-near {
    background: var(--stamp);
    box-shadow: 0 0 0 4px rgba(230, 57, 70, .16);
}

.os-all {
    font-size: 13px;
    font-weight: 700;
    color: var(--stamp);
    white-space: nowrap;
}

    .os-all:hover {
        text-decoration: underline;
    }

.os-scroll {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    padding: 4px 2px 12px;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

    .os-scroll::-webkit-scrollbar {
        height: 6px;
    }

    .os-scroll::-webkit-scrollbar-thumb {
        background: var(--line);
        border-radius: 10px;
    }

.os-card {
    flex: 0 0 auto;
    width: 214px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    scroll-snap-align: start;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-m);
    backdrop-filter: blur(var(--blur));
    -webkit-backdrop-filter: blur(var(--blur));
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

    .os-card:hover {
        transform: translateY(-4px);
        box-shadow: var(--glass-shadow);
        background: var(--glass-bg-strong);
    }

.os-logo {
    position: relative;
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--ink);
    color: var(--paper);
    font-family: var(--font-mono);
    font-size: 13px;
    border: 2px solid var(--white);
}

    .os-logo img {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        background: #fff;
    }

.os-text {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.os-name {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 14px;
    color: var(--ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.os-sub {
    font-size: 12px;
    color: var(--slate);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

    .os-sub.os-deal {
        color: var(--amber-dark);
        font-weight: 700;
    }

.os-more {
    width: 150px;
    justify-content: center;
    background: var(--ink);
    border-color: var(--ink);
}

    .os-more .os-name {
        color: var(--paper);
    }

    .os-more .os-logo {
        background: var(--stamp);
        border-color: transparent;
        font-size: 18px;
    }

.app-back, .app-tabbar {
    display: none;
}

/* =========================================================
   2. APP MODE  (phones + small tablets)
   ========================================================= */
@media (max-width: 820px) {

    html {
        -webkit-text-size-adjust: 100%;
    }

    a, button, label {
        -webkit-tap-highlight-color: transparent;
    }

    .container {
        padding-left: 16px;
        padding-right: 16px;
    }

    /* press feedback instead of hover lift */
    .store-card:active, .os-card:active, .store-row:active, .btn:active,
    .app-tabbar a:active, .mobile-filter-trigger:active {
        transform: scale(.97);
    }

    @media (hover: none) {
        .store-card:hover, .os-card:hover {
            transform: none;
            box-shadow: none;
        }
    }

    /* ---------- room for bars ---------- */
    body.app-pad {
        padding-bottom: calc(var(--tabbar-h) + var(--safe-b));
    }

    body.app-footer .site-footer {
        padding-bottom: calc(var(--tabbar-h) + var(--safe-b) + 8px);
    }

    /* ---------- compact header ---------- */
    .header-inner {
        padding: 8px 0;
        gap: 8px;
    }

    .site-logo {
        height: 40px;
    }

    /* ---------- bottom tab bar ---------- */
    .app-tabbar {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 140; /* below drawers/backdrops (150/160) */
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        height: calc(var(--tabbar-h) + var(--safe-b));
        padding-bottom: var(--safe-b);
        background: rgba(251, 246, 236, .92);
        backdrop-filter: blur(18px) saturate(170%);
        -webkit-backdrop-filter: blur(18px) saturate(170%);
        border-top: 1px solid var(--line);
        box-shadow: 0 -8px 24px -14px rgba(20, 26, 46, .35);
    }

        .app-tabbar a {
            position: relative;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 4px;
            font-size: 10.5px;
            font-weight: 700;
            color: var(--slate);
            transition: transform .12s ease;
        }

            .app-tabbar a i {
                font-size: 19px;
                transition: transform .15s ease, color .15s ease;
            }

            .app-tabbar a.active {
                color: var(--ink);
            }

                .app-tabbar a.active i {
                    color: var(--stamp);
                    transform: translateY(-1px);
                }

                .app-tabbar a.active::before {
                    content: "";
                    position: absolute;
                    top: 0;
                    left: 30%;
                    right: 30%;
                    height: 3px;
                    border-radius: 0 0 4px 4px;
                    background: var(--stamp);
                }

    body.has-dash .app-tabbar,
    body.kbd-open .app-tabbar,
    body.kbd-open .dashborad-menus {
        display: none;
    }
    /* dashboard has its own bar; hide bars while typing */

    /* ---------- hero = app bar ---------- */
    .page-hero {
        padding: 12px 0 18px;
        border-radius: 0 0 26px 26px;
    }

        .page-hero .eyebrow, .page-hero .breadcrumb, .page-hero .hero-sep {
            display: none;
        }

        .page-hero h1 {
            font-size: 22px;
            line-height: 1.2;
            margin-top: 0;
        }

            .page-hero h1 .city-label {
                display: block;
                margin-top: 4px;
                font-family: var(--font-body);
                font-size: 12.5px;
                font-weight: 600;
                color: var(--amber);
            }

                .page-hero h1 .city-label::before {
                    content: "\1F4CD\00a0";
                }

    .app-back {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        margin-bottom: 10px;
        border-radius: 50%;
        background: rgba(255, 255, 255, .14);
        color: var(--paper);
        font-size: 18px;
    }

    /* ---------- online strip -> "stories" row ---------- */
    .os-wrap {
        padding-top: 18px;
    }

    .os-head, .sec-head {
        margin-bottom: 10px;
    }

    .os-scroll {
        gap: 14px;
        padding: 2px 0 10px;
        margin: 0 -16px;
        padding-left: 16px;
        padding-right: 16px;
        scrollbar-width: none;
    }

        .os-scroll::-webkit-scrollbar {
            display: none;
        }

    .os-card {
        width: 76px;
        flex-direction: column;
        gap: 6px;
        padding: 0;
        text-align: center;
        background: none;
        border: 0;
        border-radius: 0;
        box-shadow: none;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    .os-logo {
        flex-basis: 64px;
        width: 64px;
        height: 64px;
        border: 0;
        font-size: 15px;
        box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--forest);
    }

    .os-text {
        align-items: center;
        width: 100%;
    }

    .os-name {
        white-space: normal;
        font-size: 11.5px;
        line-height: 1.2;
        max-width: 76px;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }

    .os-sub {
        display: none;
    }

    .os-more {
        width: 76px;
        background: none;
        border: 0;
    }

        .os-more .os-name {
            color: var(--ink);
        }

        .os-more .os-logo {
            box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--stamp);
        }

    /* ---------- sponsored strip: peek next card ---------- */
    .sponsored-strip-wrap {
        padding-top: 20px;
    }

    .scroll-x {
        grid-auto-columns: 76%;
        gap: 12px;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
    }

        .scroll-x::-webkit-scrollbar {
            display: none;
        }

        .scroll-x .store-card .ph {
            height: 120px;
        }

    /* ---------- list area ---------- */
    .layout-with-sidebar {
        padding: 16px 0 24px;
    }

    /* Offer listings stay two-up on phones. */
    .offer-store-list,
    .store-offers-grid,
    .city-offer-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .offer-store-list .store-row {
        display: block;
        min-width: 0;
        padding: 0;
    }

        .offer-store-list .store-row .ph {
            height: 110px;
            border-radius: var(--radius-m) var(--radius-m) 0 0;
        }

        .offer-store-list .store-row > div:nth-child(2) {
            padding: 10px;
        }

        .offer-store-list .store-row .side {
            padding: 0 10px 10px;
            text-align: left;
            align-items: flex-start;
        }

        .offer-store-list .store-row h4 {
            font-size: 13px;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }

        .offer-store-list .store-row .rating,
        .offer-store-list .store-row .distance,
        .offer-store-list .store-row .reel-links {
            display: none;
        }

    .store-offers-grid .coupon-ticket {
        min-width: 0;
    }

    .city-offer-grid .store-card .ph {
        height: 120px;
    }

    .city-offer-grid .store-card-body {
        padding: 10px;
    }

    .city-offer-grid .store-card h4 {
        font-size: 13px;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .result-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        margin: 0 -16px 14px;
        padding: 2px 16px;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

        .result-tabs::-webkit-scrollbar {
            display: none;
        }

        .result-tabs button {
            flex: 0 0 auto;
            white-space: nowrap;
        }

    /* filter trigger -> floating pill above the tab bar */
    .mobile-filter-trigger {
        position: fixed;
        left: 50%;
        transform: translateX(-50%);
        bottom: calc(var(--tabbar-h) + var(--safe-b) + 14px);
        width: auto;
        margin: 0;
        padding: 12px 22px;
        z-index: 130;
        box-shadow: 0 10px 24px -8px rgba(20, 26, 46, .55);
    }

        .mobile-filter-trigger:active {
            transform: translateX(-50%) scale(.96);
        }

    body.kbd-open .mobile-filter-trigger {
        display: none;
    }

    /* ---------- footer -> accordion ---------- */
    .site-footer {
        padding-top: 26px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 0;
        padding-bottom: 12px;
    }

    .footer-brand {
        padding-bottom: 18px;
    }

    .footer-col {
        border-top: 1px solid rgba(255, 255, 255, .1);
    }

        .footer-col h5 {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin: 0;
            padding: 15px 0;
            cursor: pointer;
            user-select: none;
        }

            .footer-col h5::after {
                content: "+";
                font-size: 20px;
                font-weight: 400;
                color: #8493B8;
            }

        .footer-col.open h5::after {
            content: "\2013";
        }

        .footer-col ul {
            display: none;
            padding-bottom: 12px;
        }

        .footer-col.open ul {
            display: block;
        }

    .footer-bottom {
        justify-content: center;
        text-align: center;
    }

    /* =====================================================
       3. DASHBOARD + USER SECTION  (body.has-dash set by JS
          when .dashborad-menus exists)
       ===================================================== */
    body.has-dash.app-pad {
        padding-bottom: calc(var(--tabbar-h) + var(--safe-b));
    }

    body.has-dash.app-footer .site-footer {
        padding-bottom: calc(var(--tabbar-h) + var(--safe-b) + 8px);
    }

    /* menu -> bottom bar (scrolls sideways if many items) */
    body.has-dash .dashborad-menus {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 140;
        margin: 0;
        display: flex;
        flex-wrap: nowrap;
        gap: 2px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding: 6px 8px calc(6px + var(--safe-b));
        border: 0;
        border-top: 1px solid var(--line);
        border-radius: 0;
        background: rgba(251, 246, 236, .94);
        backdrop-filter: blur(18px) saturate(170%);
        -webkit-backdrop-filter: blur(18px) saturate(170%);
        box-shadow: 0 -8px 24px -14px rgba(20, 26, 46, .35);
        scrollbar-width: none;
        scroll-snap-type: x proximity;
    }

        body.has-dash .dashborad-menus::-webkit-scrollbar {
            display: none;
        }

        body.has-dash .dashborad-menus li {
            flex: 1 0 74px;
            scroll-snap-align: center;
        }

            body.has-dash .dashborad-menus li a {
                flex-direction: column;
                justify-content: center;
                gap: 4px;
                padding: 8px 4px;
                border-radius: 14px;
                font-size: 10.5px;
                line-height: 1.15;
                text-align: center;
                white-space: nowrap;
            }

                body.has-dash .dashborad-menus li a i {
                    font-size: 19px;
                }

            body.has-dash .dashborad-menus li.active a {
                background: var(--ink);
                color: var(--paper);
            }

                body.has-dash .dashborad-menus li.active a i {
                    color: var(--amber);
                }

    /* page title = compact app bar */
    .breadcrumb-bar {
        padding: 16px 0 18px;
        border-radius: 0 0 24px 24px;
    }

        .breadcrumb-bar .breadcrumb-title {
            font-size: 21px;
            text-align: left;
        }

        .breadcrumb-bar .page-breadcrumb {
            display: none;
        }

        .breadcrumb-bar .row {
            text-align: left;
        }

    .dashboard-content {
        padding: 14px 0 24px;
    }

    .profile-content, .dash-listingcontent {
        margin-top: 14px;
    }

    /* cards */
    .card.dash-cards, .card {
        border-radius: 18px;
        margin-bottom: 14px;
    }

        .card .card-header {
            flex-direction: row;
            align-items: center;
            padding: 14px 16px;
        }

            .card .card-header h4 {
                font-size: 16px;
            }

        .card .card-body {
            padding: 16px;
        }

    /* forms: 16px stops iOS zoom, 46px touch targets */
    .dashboard-content input:not([type=checkbox]):not([type=radio]):not([type=file]),
    .dashboard-content select,
    .dashboard-content textarea {
        font-size: 16px;
        min-height: 46px;
        border-radius: 12px;
    }

    .dashboard-content .btn {
        min-height: 46px;
    }

    .dashboard-content .btn-block, .dashboard-content button[type=submit] {
        width: 100%;
    }

    .listing-search, .sorting-div {
        margin-bottom: 12px;
    }

    .sorting-div {
        justify-content: flex-start;
    }

    /* modern dashboard home */
    .modern-dashboard {
        padding: 14px 0 24px;
        min-height: 0;
    }

        .modern-dashboard .dash-page-head h1 {
            font-size: 22px;
        }

        .modern-dashboard .dash-kpi-grid,
        .modern-dashboard .dash-mini-grid {
            grid-template-columns: 1fr 1fr;
            gap: 10px;
        }
        /* keep 2-up, not 1 */
        .modern-dashboard .dash-kpi {
            min-height: 96px;
            padding: 12px;
        }

        .modern-dashboard .dash-kpi-content > strong {
            font-size: 22px;
        }

        .modern-dashboard .dash-kpi-icon {
            width: 36px;
            height: 36px;
            flex-basis: 36px;
        }

        .modern-dashboard .dash-head-actions {
            flex-wrap: wrap;
        }

    /* tables -> cards (JS adds .app-table + data-label) */
    .app-table {
        display: block;
        border-spacing: 0;
    }

        .app-table thead {
            display: none;
        }

        .app-table tbody {
            display: block;
        }

            .app-table tbody tr {
                display: block;
                margin: 0 0 12px;
                padding: 6px 14px;
                background: var(--white);
                border: 1px solid var(--line);
                border-radius: 16px;
                box-shadow: 0 6px 16px -12px rgba(20, 26, 46, .4);
            }

            .app-table tbody td {
                display: flex;
                align-items: center;
                justify-content: space-between;
                gap: 14px;
                padding: 9px 0 !important;
                border: 0 !important;
                border-radius: 0 !important;
                border-bottom: 1px dashed var(--line) !important;
                text-align: right;
                font-size: 13.5px;
            }

                .app-table tbody td:last-child {
                    border-bottom: 0 !important;
                }

                .app-table tbody td::before {
                    content: attr(data-label);
                    flex: 0 0 auto;
                    max-width: 42%;
                    text-align: left;
                    font-size: 10.5px;
                    font-weight: 800;
                    letter-spacing: .05em;
                    text-transform: uppercase;
                    color: var(--slate);
                }

                .app-table tbody td:not([data-label])::before {
                    display: none;
                }

                .app-table tbody td[colspan] {
                    display: block;
                    text-align: center;
                }

                .app-table tbody td .action {
                    justify-content: flex-end;
                }

        .app-table .avatar-img {
            max-width: 48px;
            height: 48px;
        }
}

@media (prefers-reduced-motion: reduce) {
    .app-tabbar a, .app-tabbar a i, .os-card {
        transition: none;
    }
}

/* =========================================================
   Image with fallback (dashboard lists etc.)
   <span class="avatar-box"><i class="fa-solid fa-ticket"></i><img class="avatar-img" ...></span>
   Icon always sits underneath; image covers it. No image / broken image -> icon shows.
   ========================================================= */
.avatar-box {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100px;
    height: 50px;
    border-radius: 8px;
    overflow: hidden;
    vertical-align: middle;
    background: var(--paper-2);
    color: var(--stamp);
    font-size: 20px;
}

    .avatar-box .avatar-img {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        max-width: none;
        object-fit: cover;
        border-radius: 0;
    }


/* =========================================================
   Store reels strip (home) + reel popup.   ADDITIVE.
   Mobile: 2 reels + a peek of the 3rd, swipe right for more.
   ========================================================= */
.reels-section {
    padding: 34px 0 8px;
}

.reel-wrap {
    position: relative;
}

.reel-scroll {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    padding: 6px 2px 14px;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

    .reel-scroll::-webkit-scrollbar {
        height: 6px;
    }

    .reel-scroll::-webkit-scrollbar-thumb {
        background: var(--line);
        border-radius: 10px;
    }

.reel-card {
    position: relative;
    display: block;
    flex: 0 0 200px;
    aspect-ratio: 9 / 16;
    border-radius: var(--radius-m);
    overflow: hidden;
    color: #fff;
    scroll-snap-align: start;
    box-shadow: 0 10px 24px -14px rgba(20, 26, 46, .55);
    transition: transform .18s ease, box-shadow .18s ease;
}

    .reel-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 16px 30px -14px rgba(20, 26, 46, .6);
    }

.reel-thumb {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    padding-bottom: 34px;
    background: linear-gradient(165deg, hsl(var(--h) 70% 48%), hsl(calc(var(--h) + 40) 75% 26%));
}

.reel-card {
    --h: 210;
}

.reel-logo {
    position: relative;
    width: 68px;
    height: 68px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    color: hsl(var(--h) 45% 28%);
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 26px;
    border: 3px solid rgba(255, 255, 255, .9);
}

    .reel-logo img {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        background: #fff;
    }

.reel-play {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    padding-left: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, .95);
    color: var(--stamp);
    font-size: 16px;
    box-shadow: 0 8px 18px -8px rgba(0, 0, 0, .5);
}

.reel-tag {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 100px;
    background: rgba(20, 26, 46, .55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
}

.reel-meta {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    padding: 26px 12px 12px;
    background: linear-gradient(to top, rgba(0, 0, 0, .7), transparent);
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 13.5px;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    overflow-wrap: anywhere;
}

.reel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-60%);
    z-index: 3;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: var(--white);
    color: var(--ink);
    font-size: 24px;
    line-height: 1;
    box-shadow: 0 8px 18px -8px rgba(20, 26, 46, .5);
}

.reel-prev {
    left: -14px;
}

.reel-next {
    right: -14px;
}

.reel-nav:hover {
    background: var(--ink);
    color: var(--paper);
}

.reel-wrap.at-start .reel-prev, .reel-wrap.at-end .reel-next {
    display: none;
}

/* popup */
.reel-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

    .reel-modal[hidden] {
        display: none;
    }

.reel-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 14, 24, .7);
    backdrop-filter: blur(2px);
}

.reel-modal-dialog {
    position: relative;
    width: 100%;
    max-width: 420px;
    max-height: 94vh;
    display: flex;
    flex-direction: column;
    outline: none;
    background: var(--paper);
    border-radius: var(--radius-m);
    overflow: hidden;
    box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .6);
}

.reel-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 3;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: var(--white);
    color: var(--ink);
    display: flex;
    align-items: center;
    justify-content: center;
}

    .reel-modal-close:hover {
        background: var(--stamp);
        border-color: var(--stamp);
        color: #fff;
    }

.reel-modal-frame {
    position: relative;
    height: min(68vh, 620px);
    background: #000;
}

    .reel-modal-frame iframe {
        position: relative;
        z-index: 1;
        width: 100%;
        height: 100%;
        border: 0;
        background: #fff;
    }

.reel-loading {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 24px;
}

.reel-modal-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    padding: 12px 14px calc(12px + env(safe-area-inset-bottom, 0px));
}

.reel-modal-store {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 14px;
    min-width: 0;
    overflow-wrap: anywhere;
}

.reel-modal-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

    .reel-modal-actions .btn {
        padding: 9px 16px;
        font-size: 13px;
    }

body.reel-lock {
    overflow: hidden;
}

@media (hover: none) {
    .reel-card:hover {
        transform: none;
        box-shadow: 0 10px 24px -14px rgba(20, 26, 46, .55);
    }
}

/* phones + small tablets: 2 full reels + a peek of the 3rd */
@media (max-width: 820px) {
    .reels-section {
        padding-top: 24px;
    }

    .reel-nav {
        display: none;
    }

    .reel-scroll {
        gap: 10px;
        margin: 0 -16px;
        padding: 4px 16px 12px;
        scrollbar-width: none;
        scroll-snap-type: x mandatory;
        scroll-padding-left: 16px;
    }

        .reel-scroll::-webkit-scrollbar {
            display: none;
        }

    .reel-card {
        flex: 0 0 calc((100% - 10px) / 2.2);
    }

    .reel-logo {
        width: 56px;
        height: 56px;
        font-size: 22px;
    }

    .reel-play {
        width: 40px;
        height: 40px;
        font-size: 14px;
    }

    .reel-meta {
        font-size: 12.5px;
        padding: 22px 10px 10px;
    }

    .reel-modal {
        align-items: flex-end;
        padding: 0;
    }

    .reel-modal-dialog {
        max-width: none;
        max-height: 96vh;
        border-radius: 20px 20px 0 0;
    }

    .reel-modal-frame {
        height: min(72vh, 640px);
    }
}


/* Reel cover image (falls back to the coloured tile when there is no cover or it fails to load) */
.reel-cover {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.reel-card.has-cover .reel-logo {
    display: none;
}

.reel-card.has-cover .reel-thumb {
    padding-bottom: 0;
}

    .reel-card.has-cover .reel-thumb::after {
        content: "";
        position: absolute;
        inset: 0;
        background: linear-gradient(to bottom, rgba(0, 0, 0, .28), transparent 32%, transparent 58%, rgba(0, 0, 0, .4));
    }

.reel-card.has-cover .reel-play {
    position: relative;
    z-index: 2;
    background: rgba(255, 255, 255, .92);
}
