.an-row {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-left: 16px;
    margin: 0 -16px;
    padding: 4px 16px 12px;
    scrollbar-width: none;
}
.an-row::-webkit-scrollbar { display: none; }

.an-item {
    flex: none;
    width: 118px;
    scroll-snap-align: start;
    text-decoration: none;
    color: inherit;
    outline: none;
}
.an-poster {
    position: relative;
    aspect-ratio: 2 / 3;
    border-radius: 8px;
    overflow: hidden;
    background: var(--surface-soft);
    box-shadow: 0 6px 18px -10px rgba(0, 0, 0, 0.6);
    transition: transform 0.3s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.an-poster img { width: 100%; height: 100%; object-fit: cover; display: block; }
.an-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 4px 8px;
    border-radius: 6px;
    background: #560E1B;
    color: #FFFFFF;
    font-family: var(--font-title);
    font-size: 9px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.an-title {
    margin: 8px 0 0;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.an-sub { margin: 2px 0 0; font-size: 12px; color: var(--text-muted); }
.an-item:focus-visible .an-poster { outline: 2px solid var(--accent); outline-offset: 2px; }

#an-pop {
    position: fixed;
    inset: 0;
    z-index: 2147482000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}
.an-pop-bg {
    position: absolute;
    inset: 0;
    background: rgba(10, 6, 7, 0.62);
    backdrop-filter: blur(3px);
    opacity: 0;
    transition: opacity 0.25s ease;
}
.an-pop-card {
    position: relative;
    width: 100%;
    max-height: 92vh;
    overflow-y: auto;
    background: var(--bg-card-solid, var(--bg-card));
    border: 1px solid var(--line);
    border-radius: 18px 18px 0 0;
    box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.7);
    transform: translateY(24px);
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.2, 0.7, 0.2, 1), opacity 0.25s ease;
}
#an-pop.is-open .an-pop-bg { opacity: 1; }
#an-pop.is-open .an-pop-card { transform: none; opacity: 1; }

.an-pop-x {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 3;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(18, 12, 14, 0.6);
    color: #FFFFFF;
    cursor: pointer;
}
.an-pop-x:hover { background: rgba(18, 12, 14, 0.85); }

.an-pop-media {
    position: relative;
    height: 170px;
    background: #560E1B;
}
.an-pop-media > img:first-child {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.an-pop-media.is-cover > img:first-child { filter: blur(18px) brightness(0.7); transform: scale(1.2); }
.an-pop-media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, var(--bg-card-solid, var(--bg-card)) 0%, rgba(0, 0, 0, 0) 60%);
}
.an-pop-poster {
    position: absolute;
    left: 20px;
    bottom: -36px;
    z-index: 2;
    width: 88px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid var(--bg-card-solid, var(--bg-card));
    box-shadow: 0 10px 24px -10px rgba(0, 0, 0, 0.7);
}

.an-pop-body { padding: 48px 20px 22px; }
.an-pop-media:not(:has(.an-pop-poster)) + .an-pop-body { padding-top: 14px; }
.an-pop-tag {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 6px;
    background: #560E1B;
    color: #FFFFFF;
    font-family: var(--font-title);
    font-size: 10px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}
html #an-pop h2 {
    margin: 12px 0 6px;
    font-family: var(--font-title);
    font-size: 20px;
    line-height: 1.25;
    color: var(--text-primary) !important;
}
#an-pop-d {
    margin: 0;
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.5;
    color: var(--text-muted);
}
.an-pop-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 18px;
}
.an-pop-actions .hm-btn { width: 100%; }
.an-pop-ghost {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--line);
}
.an-pop-ghost:hover { border-color: var(--accent); }
.an-pop-more {
    display: block;
    margin: 14px auto 0;
    padding: 6px 10px;
    border: 0;
    background: none;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 700;
    color: var(--accent);
    cursor: pointer;
}
.an-pop-more:hover { text-decoration: underline; }

@media (min-width: 640px) {
    #an-pop { align-items: center; padding: 24px; }
    .an-pop-card { max-width: 440px; border-radius: 18px; }
    .an-pop-media { height: 190px; }
    .an-pop-actions { flex-direction: row; }
    .an-pop-actions .hm-btn { flex: 1; padding: 0 16px; }
    html #an-pop h2 { font-size: 22px; }
}

@media (min-width: 769px) {
    .an-row { margin: 0 -8px; padding: 8px 8px 14px; scroll-padding-left: 8px; gap: 16px; }
    .an-item { width: 150px; }
    .an-item:hover .an-poster { transform: translateY(-4px); }
}

@media (prefers-reduced-motion: reduce) {
    .an-pop-bg, .an-pop-card, .an-poster { transition: none; }
}
