/* ==========================================================================
   Home shelves — "free", "completed" and "new" (shelves design 1 "accordion spotlight")
   free / completed: a row of glass-capped posters; the hovered or focused one opens into a wide card
   with its synopsis. new: wide "premiere" cards whose poster pops out of the card top.
   Markup: partials/home/{shelf-head,accordion-shelf,new-anime}.php
   JS: initAccordionShelves() in public/js/animetv-home.js
   The recessed glass on the posters (.atv-lq*) lives in home-rail.css and reads --rl-w / --rl-h.
   ========================================================================== */

.atv-shelf {
    /* free: lime green */
    --sh-ac: #8fe36b;
    --sh-line: rgba(143, 227, 107, 0.45);
    --sh-glow: rgba(120, 220, 80, 0.55);
    --sh-soft: rgba(120, 220, 80, 0.12);
    --sh-t1: #86e05e;
    --sh-t2: #e4ffd4;
    --sh-on-ac: #0d2405;
    --sh-surface: rgba(255, 255, 255, 0.02);
    --sh-border: rgba(255, 255, 255, 0.07);
    --sh-card: #1a1b23;
    --sh-raise: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015));
    --sh-text: #eef0f4;
    --sh-text-2: #c3c8d2;
    --sh-muted: #8b92a1;
    --sh-chip: rgba(255, 255, 255, 0.05);
    --sh-chip-line: rgba(255, 255, 255, 0.1);
    --sh-star: #ffd96b;
    --sh-drop: rgba(0, 0, 0, 0.95);
    --sh-w: 200px;
    --sh-h: 290px;
    --sh-info: 420px;
    --sh-gap: 24px;
    --sh-pad: 28px;

    position: relative;
    width: calc(100% - 48px);
    max-width: 1320px; /* same column as the hero slider and the release rails */
    margin: 34px auto 0;
    padding: var(--sh-pad);
    border-radius: 30px;
    overflow: hidden;
    direction: rtl;
    color: var(--sh-text);
    border: 1px solid var(--sh-border);
    background: radial-gradient(760px 320px at 100% 0%, var(--sh-soft), transparent 70%), var(--sh-surface);
}
.atv-shelf::before {
    content: "";
    position: absolute;
    top: 0;
    right: 60px;
    left: 55%;
    height: 1px;
    pointer-events: none;
    background: linear-gradient(90deg, transparent, var(--sh-line), transparent);
}
/* completed: amber */
.atv-shelf.is-done {
    --sh-ac: #ffb648;
    --sh-line: rgba(255, 182, 72, 0.45);
    --sh-glow: rgba(255, 160, 40, 0.6);
    --sh-soft: rgba(255, 160, 40, 0.12);
    --sh-t1: #ffa940;
    --sh-t2: #ffe6bf;
    --sh-on-ac: #2a1600;
}
/* new: blue */
.atv-shelf.is-new {
    --sh-ac: #6fb8ff;
    --sh-line: rgba(111, 184, 255, 0.45);
    --sh-glow: rgba(70, 150, 255, 0.6);
    --sh-soft: rgba(70, 150, 255, 0.12);
    --sh-t1: #5aa9ff;
    --sh-t2: #d9ecff;
    --sh-on-ac: #04182e;
}
#animetvApp.day .atv-shelf {
    --sh-ac: #3f8f1f;
    --sh-line: rgba(63, 143, 31, 0.35);
    --sh-glow: rgba(80, 170, 40, 0.35);
    --sh-soft: rgba(80, 170, 40, 0.09);
    --sh-t1: #3b7f1d;
    --sh-t2: #2c6614;
    --sh-on-ac: #ffffff;
    --sh-surface: #ffffff;
    --sh-border: rgba(15, 23, 42, 0.08);
    --sh-card: #f3f5f9;
    --sh-raise: linear-gradient(180deg, #f8fafc, #f1f4f9);
    --sh-text: #0f172a;
    --sh-text-2: #334155;
    --sh-muted: #64748b;
    --sh-chip: #eef1f6;
    --sh-chip-line: rgba(15, 23, 42, 0.1);
    --sh-star: #d99a00;
    --sh-drop: rgba(15, 23, 42, 0.5);
}
#animetvApp.day .atv-shelf.is-done {
    --sh-ac: #b45309;
    --sh-line: rgba(180, 83, 9, 0.35);
    --sh-glow: rgba(217, 119, 6, 0.35);
    --sh-soft: rgba(217, 119, 6, 0.09);
    --sh-t1: #b45309;
    --sh-t2: #92400e;
}
#animetvApp.day .atv-shelf.is-new {
    --sh-ac: #1d6fd1;
    --sh-line: rgba(29, 111, 209, 0.35);
    --sh-glow: rgba(37, 99, 235, 0.35);
    --sh-soft: rgba(37, 99, 235, 0.08);
    --sh-t1: #1d6fd1;
    --sh-t2: #1557a8;
}
.atv-shelf *,
.atv-shelf *::before,
.atv-shelf *::after {
    box-sizing: border-box;
}

/* ---------- Head (same build as the release rails) ---------- */
.atv-shelf__head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 22px;
}
.atv-shelf__bar {
    flex-shrink: 0;
    width: 12px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(180deg, var(--sh-ac), var(--sh-soft));
    box-shadow: 0 0 22px var(--sh-glow);
}
.atv-shelf__titles {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.25;
    font-family: 'IRANYekanX', 'Vazirmatn', sans-serif;
}
.atv-shelf__kicker {
    display: block;
    color: #c4c4d0;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.8;
}
#animetvApp.day .atv-shelf__kicker {
    color: #596174;
}
.atv-shelf .atv-shelf__titles h2 {
    display: block;
    width: fit-content;
    max-width: 100%;
    margin: 0;
    color: var(--sh-t1);
    background: linear-gradient(110deg, var(--sh-t1) 25%, var(--sh-t2));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-family: inherit;
    font-size: 25px;
    font-weight: 900;
    line-height: 1.4;
}
.atv-shelf__desc {
    margin-top: 2px;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 12.5px;
    color: var(--sh-muted);
    white-space: nowrap;
}
.atv-shelf__stats {
    list-style: none;
    margin: 0 8px 0 0;
    padding: 0;
    display: flex;
    gap: 10px;
    min-width: 0;
}
.atv-shelf__stat {
    height: 62px;
    padding: 0 16px 0 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    border-radius: 18px;
    background: var(--sh-chip);
    border: 1px solid var(--sh-chip-line);
}
.atv-shelf__stat-ico {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: var(--sh-soft);
    color: var(--sh-ac);
    font-size: 15px;
}
.atv-shelf__stat-txt {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
}
.atv-shelf__stat-txt b {
    font-size: 20px;
    font-weight: 900;
    color: var(--sh-text);
}
.atv-shelf__stat-txt small {
    font-size: 11.5px;
    color: var(--sh-muted);
    white-space: nowrap;
}
.atv-shelf__stat.is-hot {
    border-color: var(--sh-line);
    background: linear-gradient(135deg, var(--sh-soft), rgba(255, 255, 255, 0.02));
    box-shadow: 0 0 30px -14px var(--sh-glow);
}
.atv-shelf__stat.is-hot .atv-shelf__stat-ico {
    background: var(--sh-ac);
    color: var(--sh-on-ac);
    box-shadow: 0 0 16px var(--sh-glow);
}
#animetvApp.day .atv-shelf__stat.is-hot {
    background: linear-gradient(135deg, var(--sh-soft), #ffffff);
}
.atv-shelf__tools {
    margin-right: auto;
    display: flex;
    align-items: center;
    gap: 10px;
}
.atv-shelf .atv-shelf__all {
    height: 44px;
    padding: 0 18px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 999px;
    border: 1px solid var(--sh-line);
    background: var(--sh-soft);
    color: var(--sh-ac);
    font-size: 13.5px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    transition: box-shadow 0.2s;
}
.atv-shelf .atv-shelf__all i {
    font-size: 12px;
}
.atv-shelf .atv-shelf__nav {
    width: 44px;
    height: 44px;
    margin: 0;
    padding: 0;
    display: grid;
    place-items: center;
    border-radius: 50%;
    border: 1px solid var(--sh-chip-line);
    background: var(--sh-chip);
    color: var(--sh-text);
    font-size: 14px;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s, opacity 0.2s;
}
.atv-shelf .atv-shelf__nav:disabled {
    opacity: 0.35;
    cursor: default;
}
.atv-shelf .atv-shelf__all:focus-visible,
.atv-shelf .atv-shelf__nav:focus-visible {
    outline: 2px solid var(--sh-ac);
    outline-offset: 3px;
}

/* ---------- Scroller ---------- */
.atv-shelf__viewport {
    margin: -8px calc(var(--sh-pad) * -1) 0;
    padding: 8px var(--sh-pad) 18px;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    scroll-padding-inline: var(--sh-pad);
    scrollbar-width: none;
}
.atv-shelf__viewport::-webkit-scrollbar {
    display: none;
}
/* fade the edge that still hides cards (RTL: "next" is on the left) */
.atv-shelf__viewport.can-next {
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 72px);
    mask-image: linear-gradient(to right, transparent 0, #000 72px);
}
.atv-shelf__viewport.can-prev {
    -webkit-mask-image: linear-gradient(to left, transparent 0, #000 72px);
    mask-image: linear-gradient(to left, transparent 0, #000 72px);
}
.atv-shelf__viewport.can-prev.can-next {
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 72px, #000 calc(100% - 72px), transparent 100%);
    mask-image: linear-gradient(to right, transparent 0, #000 72px, #000 calc(100% - 72px), transparent 100%);
}
.atv-shelf__track {
    display: flex;
    gap: var(--sh-gap);
    width: max-content;
}

/* ---------- Accordion card (free / completed) ---------- */
.atv-shelf .atv-shelf__card {
    position: relative;
    flex: 0 0 var(--sh-w);
    height: var(--sh-h);
    display: flex;
    border-radius: 24px;
    overflow: hidden;
    background: var(--sh-card);
    color: var(--sh-text);
    text-decoration: none;
    scroll-snap-align: start;
    box-shadow: 0 24px 40px -26px var(--sh-drop), 0 0 0 1px var(--sh-chip-line);
    transition: flex-basis 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.35s, transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.atv-shelf .atv-shelf__card.is-open {
    flex-basis: calc(var(--sh-w) + var(--sh-info));
    box-shadow: 0 34px 60px -30px var(--sh-drop), 0 0 0 1px var(--sh-line), 0 0 70px -22px var(--sh-glow);
}
.atv-shelf .atv-shelf__card:focus-visible {
    outline: 2px solid var(--sh-ac);
    outline-offset: 3px;
}
/* The poster box is exactly --sh-w × --sh-h: the glass copies (home-rail.css) line up with it pixel for pixel. */
.atv-shelf__poster {
    --rl-w: var(--sh-w);
    --rl-h: var(--sh-h);
    position: relative;
    flex: 0 0 var(--sh-w);
    width: var(--sh-w);
    height: var(--sh-h);
    overflow: hidden;
    background: #16181f;
}
.atv-shelf__poster > img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.atv-shelf__tag {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 5;
    height: 24px;
    padding: 0 9px;
    display: inline-flex;
    align-items: center;
    border-radius: 8px;
    font-size: 11.5px;
    font-weight: 800;
    color: var(--sh-on-ac);
    background: var(--sh-ac);
    box-shadow: 0 4px 14px -4px var(--sh-glow);
}
.atv-shelf .atv-lq--pan {
    transition: opacity 0.3s, transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.atv-shelf .atv-shelf__card.is-open .atv-lq--pan {
    opacity: 0;
    transform: translateY(12px);
}
.atv-shelf__cap {
    display: none;
}

/* the card's info side, revealed when the card opens */
.atv-shelf__info {
    position: relative;
    flex: 0 0 var(--sh-info);
    width: var(--sh-info);
    min-width: 0;
    padding: 22px 24px 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-16px);
    background: radial-gradient(420px 240px at 100% 0%, var(--sh-soft), transparent 70%), var(--sh-raise);
    transition: opacity 0.2s, transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0s 0.45s;
}
.atv-shelf__info::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 1px;
    background: linear-gradient(180deg, transparent, var(--sh-line), transparent);
}
.atv-shelf__card.is-open .atv-shelf__info {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity 0.35s 0.2s, transform 0.5s 0.15s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0s;
}
.atv-shelf__feat {
    align-self: flex-start;
    height: 28px;
    padding: 0 11px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 9px;
    font-size: 12px;
    font-weight: 800;
    color: var(--sh-on-ac);
    background: var(--sh-ac);
    box-shadow: 0 6px 18px -6px var(--sh-glow);
    white-space: nowrap;
}
.atv-shelf__feat i {
    font-size: 10px;
}
.atv-shelf .atv-shelf__title {
    display: block;
    font-size: 21px;
    font-weight: 800;
    line-height: 1.45;
    color: var(--sh-text);
    text-align: right;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.atv-shelf .atv-shelf__title.is-latin {
    font-family: 'AtvKalameh', 'Vazirmatn', sans-serif;
    font-size: 23px;
    font-weight: 700;
}
.atv-shelf__meta {
    font-size: 12.5px;
    color: var(--sh-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.atv-shelf__ex {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 13px;
    line-height: 1.95;
    color: var(--sh-text-2);
}
.atv-shelf__foot {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 8px;
}
.atv-shelf__fx {
    height: 48px;
    padding: 0 12px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1.35;
    border-radius: 14px;
    background: var(--sh-chip);
    border: 1px solid var(--sh-chip-line);
    white-space: nowrap;
}
.atv-shelf__fx small {
    font-size: 10.5px;
    color: var(--sh-muted);
}
.atv-shelf__fx b {
    font-size: 13px;
    color: var(--sh-text);
}
.atv-shelf__fx b i {
    font-style: normal;
    color: var(--sh-star);
}
.atv-shelf__go {
    margin-right: auto;
    height: 48px;
    padding: 0 18px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 14px;
    font-size: 13.5px;
    font-weight: 900;
    color: var(--sh-on-ac);
    background: var(--sh-ac);
    box-shadow: 0 14px 30px -12px var(--sh-glow), inset 0 1px 0 rgba(255, 255, 255, 0.45);
    white-space: nowrap;
    transition: transform 0.2s;
}
.atv-shelf__go i {
    font-size: 11px;
}

/* ---------- Premiere card (new) ---------- */
.atv-shelf__track.is-prem {
    padding-top: 30px; /* room for the posters popping out of the card tops */
}
.atv-shelf .atv-prem {
    position: relative;
    flex: 0 0 410px;
    height: 196px;
    padding: 18px 174px 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    border-radius: 24px;
    color: var(--sh-text);
    text-decoration: none;
    scroll-snap-align: start;
    background: radial-gradient(300px 180px at 100% 0%, var(--sh-soft), transparent 70%), var(--sh-raise);
    border: 1px solid var(--sh-chip-line);
    box-shadow: 0 24px 40px -28px var(--sh-drop);
    transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.35s, border-color 0.35s;
}
.atv-shelf .atv-prem::before {
    content: "";
    position: absolute;
    top: -1px;
    right: 24px;
    left: 24px;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, transparent, var(--sh-ac), transparent);
    opacity: 0.85;
}
.atv-shelf .atv-prem:focus-visible {
    outline: 2px solid var(--sh-ac);
    outline-offset: 3px;
}
.atv-prem__poster {
    position: absolute;
    right: 18px;
    bottom: 18px;
    width: 136px;
    height: 204px;
    border-radius: 18px;
    overflow: hidden;
    background: #16181f;
    transform: rotate(2.5deg);
    box-shadow: 0 26px 40px -18px var(--sh-drop), 0 0 0 1px rgba(255, 255, 255, 0.1);
    transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.45s;
}
.atv-prem__poster img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.atv-prem__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
}
.atv-prem__live {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    font-weight: 800;
    color: var(--sh-ac);
    white-space: nowrap;
}
.atv-prem__live i {
    width: 8px;
    height: 8px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--sh-ac);
}
.atv-prem.is-fresh .atv-prem__live i {
    animation: atvShelfPulse 1.8s ease-out infinite;
}
@keyframes atvShelfPulse {
    0% {
        box-shadow: 0 0 0 0 var(--sh-glow);
    }
    100% {
        box-shadow: 0 0 0 10px rgba(0, 0, 0, 0);
    }
}
.atv-prem__time {
    font-size: 11.5px;
    color: var(--sh-muted);
    white-space: nowrap;
}
.atv-shelf .atv-prem__title {
    display: block;
    font-size: 17px;
    font-weight: 800;
    line-height: 1.45;
    color: var(--sh-text);
    text-align: right;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.atv-shelf .atv-prem__title.is-latin {
    font-family: 'AtvKalameh', 'Vazirmatn', sans-serif;
    font-size: 19px;
    font-weight: 700;
}
.atv-prem__genres {
    font-size: 12.5px;
    color: var(--sh-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.atv-prem__foot {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 8px;
}
.atv-prem__chip {
    height: 30px;
    padding: 0 10px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 700;
    color: var(--sh-text);
    background: var(--sh-chip);
    border: 1px solid var(--sh-chip-line);
    white-space: nowrap;
}
.atv-prem__chip i {
    font-style: normal;
    color: var(--sh-star);
}
.atv-prem__play {
    margin-right: auto;
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    border-radius: 50%;
    font-size: 12px;
    color: var(--sh-on-ac);
    background: var(--sh-ac);
    box-shadow: 0 0 18px -4px var(--sh-glow);
}

/* ---------- Hover ---------- */
@media (hover: hover) {
    .atv-shelf .atv-shelf__all:hover {
        color: var(--sh-ac);
        box-shadow: 0 0 26px -6px var(--sh-glow);
    }
    .atv-shelf .atv-shelf__nav:not(:disabled):hover {
        border-color: var(--sh-line);
        box-shadow: 0 0 22px -4px var(--sh-glow);
    }
    .atv-shelf .atv-shelf__card:not(.is-open):hover {
        transform: translateY(-6px);
        box-shadow: 0 30px 50px -26px var(--sh-drop), 0 0 0 1px var(--sh-line), 0 0 40px -16px var(--sh-glow);
    }
    /* the cover never zooms (the glass copies must stay aligned); the glass sinks a little deeper instead */
    .atv-shelf .atv-shelf__card:hover .atv-lq--pan .atv-lq__e img {
        transform: scale(0.78);
    }
    .atv-shelf .atv-shelf__card:hover .atv-lq--tile .atv-lq__e img {
        transform: scale(0.74);
    }
    .atv-shelf .atv-shelf__card.is-open:hover .atv-shelf__go {
        transform: translateY(-2px);
    }
    .atv-shelf .atv-prem:hover {
        transform: translateY(-4px);
        border-color: var(--sh-line);
        box-shadow: 0 30px 50px -28px var(--sh-drop), 0 0 46px -18px var(--sh-glow);
    }
    .atv-shelf .atv-prem:hover .atv-prem__poster {
        transform: rotate(0deg) translateY(-8px) scale(1.03);
        box-shadow: 0 30px 44px -18px var(--sh-drop), 0 0 0 1px var(--sh-line), 0 0 40px -10px var(--sh-glow);
    }
}

/* ---------- Narrower desktops ---------- */
@media (max-width: 1100px) {
    .atv-shelf__stat:not(.is-hot),
    .atv-shelf__desc {
        display: none;
    }
}

/* ---------- Tablet ---------- */
@media (max-width: 980px) {
    .atv-shelf {
        --sh-w: 168px;
        --sh-h: 244px;
        --sh-info: 340px;
        --sh-gap: 18px;
        --sh-pad: 22px;
        border-radius: 26px;
    }
    .atv-shelf__info {
        padding: 16px 18px;
        gap: 6px;
    }
    .atv-shelf .atv-shelf__title {
        font-size: 18px;
    }
    .atv-shelf .atv-shelf__title.is-latin {
        font-size: 20px;
    }
    .atv-shelf__ex {
        -webkit-line-clamp: 2;
    }
    .atv-shelf__fx,
    .atv-shelf__go {
        height: 42px;
    }
    .atv-shelf__go {
        padding: 0 14px;
        font-size: 12.5px;
    }
    .atv-shelf .atv-prem {
        flex-basis: 360px;
        height: 180px;
        padding: 16px 150px 16px 16px;
    }
    .atv-prem__poster {
        right: 16px;
        bottom: 16px;
        width: 116px;
        height: 174px;
        border-radius: 16px;
    }
}

/* ---------- Phone ---------- */
@media (max-width: 640px) {
    .atv-shelf {
        --sh-w: 132px;
        --sh-h: 192px;
        --sh-info: min(calc(100vw - 220px), 320px);
        --sh-gap: 12px;
        --sh-pad: 14px;
        width: calc(100% - 32px);
        margin-top: 24px;
        padding: 20px 14px;
        border-radius: 24px;
    }
    .atv-shelf__head {
        flex-wrap: wrap;
        gap: 10px;
        margin-bottom: 14px;
    }
    .atv-shelf__stats {
        order: 5;
        flex-basis: 100%;
        margin: 4px 0 0;
        gap: 8px;
    }
    /* both stat tiles side by side (narrower desktops keep only the first one) */
    .atv-shelf__stat,
    .atv-shelf__stat:not(.is-hot),
    .atv-shelf__stat.is-hot {
        display: flex;
        flex: 1 1 0;
        min-width: 0;
        height: 54px;
        gap: 9px;
        padding: 0 10px 0 12px;
    }
    .atv-shelf__stat-ico {
        width: 32px;
        height: 32px;
        border-radius: 10px;
        font-size: 13px;
    }
    .atv-shelf__stat-txt {
        min-width: 0;
    }
    .atv-shelf__stat-txt b {
        font-size: 18px;
    }
    .atv-shelf__stat-txt small {
        font-size: 11px;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .atv-shelf__bar {
        width: 10px;
        height: 32px;
    }
    .atv-shelf__kicker {
        font-size: 11.5px;
        line-height: 1.6;
    }
    .atv-shelf .atv-shelf__titles h2 {
        font-size: 24px;
    }
    .atv-shelf .atv-shelf__nav {
        display: none;
    }
    .atv-shelf .atv-shelf__all {
        height: 38px;
        padding: 0 14px;
        font-size: 12.5px;
    }
    .atv-shelf__viewport,
    .atv-shelf__viewport.can-next,
    .atv-shelf__viewport.can-prev,
    .atv-shelf__viewport.can-prev.can-next {
        -webkit-mask-image: none;
        mask-image: none;
    }
    .atv-shelf .atv-shelf__card {
        border-radius: 18px;
    }
    /* the glass is hidden on phones (home-rail.css), so closed posters get a plain caption */
    .atv-shelf__cap {
        position: absolute;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 2;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        padding: 26px 10px 9px;
        font-size: 12px;
        font-weight: 700;
        line-height: 1.5;
        color: #ffffff;
        background: linear-gradient(180deg, transparent, rgba(8, 9, 13, 0.92));
    }
    .atv-shelf__card.is-open .atv-shelf__cap {
        display: none;
    }
    .atv-shelf__tag {
        top: 8px;
        right: 8px;
        height: 22px;
        font-size: 11px;
    }
    .atv-shelf__info {
        padding: 12px 14px;
        gap: 4px;
    }
    .atv-shelf__feat,
    .atv-shelf__ex,
    .atv-shelf__fx.is-rate {
        display: none;
    }
    .atv-shelf .atv-shelf__title {
        font-size: 15px;
    }
    .atv-shelf .atv-shelf__title.is-latin {
        font-size: 17px;
    }
    .atv-shelf__meta {
        font-size: 11.5px;
        white-space: normal;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }
    .atv-shelf__foot {
        flex-wrap: wrap;
        gap: 6px;
    }
    .atv-shelf__fx {
        height: 38px;
        padding: 0 10px;
        border-radius: 12px;
    }
    .atv-shelf__go {
        margin-right: 0;
        height: 38px;
        padding: 0 12px;
        border-radius: 12px;
        font-size: 12px;
    }
    .atv-shelf__track.is-prem {
        padding-top: 24px;
    }
    .atv-shelf .atv-prem {
        flex-basis: min(calc(100vw - 92px), 340px);
        height: 158px;
        padding: 14px 122px 14px 14px;
        border-radius: 20px;
    }
    .atv-prem__poster {
        right: 14px;
        bottom: 14px;
        width: 96px;
        height: 144px;
        border-radius: 14px;
    }
    .atv-shelf .atv-prem__title {
        font-size: 15px;
    }
    .atv-shelf .atv-prem__title.is-latin {
        font-size: 16px;
    }
    .atv-prem__genres {
        font-size: 11.5px;
    }
    .atv-prem__chip {
        height: 28px;
        font-size: 11.5px;
    }
    .atv-prem__play {
        width: 34px;
        height: 34px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .atv-shelf .atv-shelf__card,
    .atv-shelf__info,
    .atv-shelf__card.is-open .atv-shelf__info,
    .atv-shelf .atv-lq--pan,
    .atv-shelf .atv-prem,
    .atv-prem__poster {
        transition: none;
    }
    .atv-prem.is-fresh .atv-prem__live i {
        animation: none;
    }
}
