

#streaming-content {

    --hm-gutter: 50px;
}

@media (min-width: 769px) and (max-width: 1150px) {
    #streaming-content {
        --hm-gutter: max(34px, env(safe-area-inset-left), env(safe-area-inset-right));
    }
}

@media (max-width: 768px) {
    #streaming-content {
        --hm-gutter: max(16px, env(safe-area-inset-left), env(safe-area-inset-right));
    }
}

@media (min-width: 601px) and (max-width: 768px) {
    #streaming-content {
        --hm-gutter: max(24px, env(safe-area-inset-left), env(safe-area-inset-right));
    }
}

#streaming-content .row h2 {
    margin-left: var(--hm-gutter);
}

#streaming-content .row__posters {
    padding-left: var(--hm-gutter) !important;
}

#streaming-content .hm-library > .discover-grid,
#streaming-content .top-charts-header ~ .discover-grid {
    padding-left: var(--hm-gutter) !important;
    padding-right: var(--hm-gutter) !important;
}

#streaming-content .top-charts-header {
    padding-left: var(--hm-gutter);
    padding-right: var(--hm-gutter);
}

#streaming-content .top-podium {
    padding-left: var(--hm-gutter);
    padding-right: var(--hm-gutter);
}

.hm-chapter {
    position: relative;
    margin-top: 64px;
}

.hm-chapter[hidden],
.hm-band[hidden],
.hm-ad[hidden] {
    display: none !important;
}

.hm-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px 24px;
    padding: 0 var(--hm-gutter);
    margin: 0 0 6px;
}

.hm-head-text {
    min-width: 0;
}

.hm-kicker {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.7rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--primary-soft, #b7a9ff);
}

.hm-kicker i {
    font-size: 0.8rem;
}

.hm-title {
    margin: 8px 0 0;
    font-family: var(--font-display);
    font-size: clamp(1.4rem, 1.05rem + 1.2vw, 2.05rem);
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -0.012em;
    text-transform: none;
    color: #fff;
}

.hm-sub {
    margin: 6px 0 0;
    max-width: 62ch;
    font-size: 0.92rem;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.55);
}

.hm-more {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 40px;
    padding: 0 16px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-top-color: rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.86);
    font: inherit;
    font-size: 0.84rem;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.2s ease-out, border-color 0.2s ease-out, color 0.2s ease-out;
}

.hm-more i {
    font-size: 0.78rem;
    color: var(--primary-soft, #b7a9ff);
    transition: transform 0.2s ease-out;
}

.hm-more .fa-dice-five {
    font-size: 0.95rem;
}

@media (hover: hover) {
    .hm-more:hover {
        background: rgba(255, 255, 255, 0.1);
        border-color: rgba(255, 255, 255, 0.2);
        color: #fff;
    }

    .hm-more:hover i {
        transform: translateX(2px);
    }
}

.hm-more:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 3px;
}

.hm-body > .row:first-child,
.hm-body > .hm-band:first-child {
    margin-top: 4px;
}

.row h2 > i,
.row h2 > .material-symbols-outlined:not(.rt-ico) {
    flex: none;
    width: 1.25em;
    font-size: 0.88rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.5) !important;
    text-shadow: none;
}

.hm-band,
.hm-tone--soon {
    isolation: isolate;
}

.hm-band {
    position: relative;
    margin: 0 0 14px;
    padding: 30px 0 22px;
}

.hm-band::before,
.hm-tone--soon::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
}

.hm-band--stage::before {
    background:
        radial-gradient(ellipse 46% 68% at 13% 50%, rgba(var(--primary-rgb), 0.26), transparent 70%),
        linear-gradient(180deg,
            rgba(var(--primary-rgb), 0) 0%,
            rgba(var(--primary-rgb), 0.11) 22%,
            rgba(var(--primary-rgb), 0.11) 78%,
            rgba(var(--primary-rgb), 0) 100%);
}

.row .row__posters.is-swapping {
    opacity: 0.4;
    pointer-events: none;
    transition: opacity 0.2s ease-out;
}

.row h2 > capy-loader {
    flex: none;
    margin-left: 4px;
}

.hm-tone--soon {
    padding: 40px 0 18px;
}

.hm-tone--soon::before {
    background:
        radial-gradient(ellipse 46% 68% at 86% 50%, rgba(var(--accent-rgb), 0.3), transparent 70%),
        linear-gradient(180deg,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, 0.03) 24%,
            rgba(255, 255, 255, 0.03) 76%,
            rgba(255, 255, 255, 0) 100%),
        linear-gradient(180deg,
            rgba(var(--accent-rgb), 0) 0%,
            rgba(var(--accent-rgb), 0.1) 24%,
            rgba(var(--accent-rgb), 0.1) 76%,
            rgba(var(--accent-rgb), 0) 100%);
}

@media (min-width: 769px) {
    .row--continue .row__poster-container.is-wide {
        width: 384px !important;
    }

    .row--continue .row__poster-container.is-wide .row__poster {
        height: 216px !important;
    }
}

@media (min-width: 1900px) {
    .row--continue .row__poster-container.is-wide {
        width: 448px !important;
    }

    .row--continue .row__poster-container.is-wide .row__poster {
        height: 252px !important;
    }
}

@media (max-width: 768px) {
    .row--continue .row__poster-container.is-wide {
        width: 300px !important;
    }

    .row--continue .row__poster-container.is-wide .row__poster {
        height: 169px !important;
    }
}

.hm-chapter .fx-moods {
    margin: 14px 0 6px;
    padding: 0;
}

.hm-chapter .fx-moods-bar {
    padding: 4px var(--hm-gutter) 8px;
    scroll-padding-inline: var(--hm-gutter);
}

@media (hover: hover) and (min-width: 769px) {
    .hm-chapter .fx-moods-bar {
        flex-wrap: wrap;
        overflow: visible;
    }
}

.ad-native.hm-ad {
    max-width: 1060px;
    margin: 64px auto;
    padding: 0 var(--hm-gutter);
}

.ad-native.hm-ad.ad-lazy-wait,
.ad-native.hm-ad.hm-ad--wait {
    display: block;
    height: 1px;
    min-height: 1px;
    margin: 0 auto;
    padding: 0;
    overflow: hidden;
}

.ad-native.hm-ad.hm-ad--wait > * {
    display: none;
}

.hm-ad .ad-native-card {
    max-width: 970px;
    padding: 12px 14px 14px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-top-color: rgba(255, 255, 255, 0.16);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.32);
}

.hm-ad--banner .ad-native-card {
    max-width: 760px;
}

.hm-library {
    margin-top: 64px;

    scroll-margin-top: 84px;
}

.hm-library > .hm-head {
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.hm-head .discover-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.hm-head .custom-select-wrapper {
    min-width: 210px;
}

.hm-head .custom-select-trigger {
    height: 40px;
    padding: 0 16px 0 18px;
    border-radius: 999px;
    border-color: rgba(255, 255, 255, 0.1);
    border-top-color: rgba(255, 255, 255, 0.18);
    font-size: 0.84rem;
    font-weight: 700;
    box-shadow: none;
}

.hm-head .custom-select-trigger:hover {
    transform: none;
    box-shadow: none;
}

.hm-head .custom-select-trigger:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 3px;
}

@media (max-width: 768px) {
    .hm-library .discover-grid > .row__poster-container {
        width: 100% !important;
    }
}

@media (min-width: 560px) and (max-width: 768px) {

    #streaming-content .discover-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)) !important;
    }
}

.hm-lib-wait {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 280px;
}

.hm-lib-wait--over {
    position: relative;
    z-index: 20;
    align-items: flex-start;
    min-height: 0;
    height: 0;
}

.hm-lib-wait--over > capy-loader {
    margin-top: 110px;
}

.hm-library > .discover-grid,
.hm-library > .hm-pager {
    transition: opacity 0.2s ease-out;
}

.hm-library.is-loading > .discover-grid,
.hm-library.is-loading > .hm-pager {
    opacity: 0.35;
    pointer-events: none;
}

.hm-pager {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 24px 16px 64px;
}

.hm-page {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 12px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-top-color: rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.86);
    font: inherit;
    font-size: 0.92rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    cursor: pointer;
    transition: background 0.2s ease-out, border-color 0.2s ease-out, color 0.2s ease-out;
}

.hm-page--step i {
    font-size: 0.8rem;
}

@media (hover: hover) {
    .hm-page:not(.is-active):hover {
        background: rgba(255, 255, 255, 0.1);
        border-color: rgba(255, 255, 255, 0.2);
        color: #fff;
    }
}

.hm-page.is-active {
    background: var(--btn-bg, var(--primary));
    border-color: transparent;
    color: var(--on-primary, #fff);
    box-shadow: 0 8px 22px rgba(var(--primary-rgb), 0.35);
    cursor: default;
}

.hm-page:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 3px;
}

@media (max-width: 780px) {
    .hm-chapter,
    .hm-library {
        margin-top: 44px;
    }

    .hm-sub {
        font-size: 0.86rem;
    }

    .hm-band {
        padding: 22px 0 14px;
    }

    .hm-tone--soon {
        padding: 30px 0 12px;
    }

    .ad-native.hm-ad {
        margin: 44px auto;
    }
}

@media (max-width: 560px) {
    .hm-more {
        width: 40px;
        padding: 0;
    }

    .hm-more > span {
        display: none;
    }

    .hm-more i {
        font-size: 0.86rem;
    }
}

@media (max-width: 480px) {
    .hm-sub {
        display: none;
    }

    .hm-title {
        margin-top: 6px;
    }
}

@media (max-width: 720px) {
    .row__poster-container .release-badge {
        font-size: 0.66rem;
        letter-spacing: 0.3px;
        gap: 5px;
        padding: 5px 8px;
    }
}

@media (hover: none) {
    .row__poster-container:hover {
        transform: none;
        z-index: auto;
        background: rgba(16, 17, 28, 0.55);
        border-color: rgba(255, 255, 255, 0.08);
        border-top-color: rgba(255, 255, 255, 0.2);
        box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5), inset 0 0 10px rgba(255, 255, 255, 0.02);
    }

    .row__poster-container:hover::after {
        opacity: 0;
    }

    .row__poster-container:hover .row__poster {
        filter: none;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    }

    .row__poster-container:hover .logo-overlay,
    .row__poster-container:hover .direct-play-btn {
        opacity: 0;
    }

    .row__poster-container:hover .time-ago-badge,
    .row__poster-container:hover .poster-progress-container,
    .row__poster-container:hover .wide-logo-overlay {
        opacity: 1;
        transform: none;
    }

    .row__poster-container:hover .wide-card-logo {
        transform: none;
    }

    .top10-slot:hover .top10-rank {
        -webkit-text-stroke-color: var(--primary, #8b76ff);
        transform: none;
        filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.7))
                drop-shadow(0 0 8px rgba(var(--primary-rgb, 139, 118, 255), 0.16));
    }

    #streaming-content .handle {
        display: none;
    }
}

@media (pointer: coarse) {
    .rowsel-trigger {
        min-height: 40px;
        padding-inline: 12px 14px;
    }
}

@media (max-width: 1024px) {
    #streaming-content .top-podium-card {
        flex: none;
    }
}

#streaming-content .top-charts-header ~ .discover-grid > .row__poster-container {
    width: 100% !important;
}

.upcoming-hero-badge {
    color: var(--primary-soft, #c4b5fd);
    background: rgba(var(--primary-rgb), 0.14);
    border: 1px solid rgba(var(--primary-rgb), 0.36);
    box-shadow: none;
}

.upcoming-hero-title {
    letter-spacing: -0.02em;
    text-wrap: balance;
}

.upcoming-countdown {
    color: #ece8ff;
    background: rgba(10, 10, 15, 0.78);
    border: 1px solid rgba(var(--primary-rgb), 0.45);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.upcoming-countdown i {
    color: var(--primary-soft, #c4b5fd);
    opacity: 1;
}

.upcoming-chip.active {
    background: rgba(var(--primary-rgb), 0.16);
    border-color: rgba(var(--primary-rgb), 0.4);
}

html.no-gpu .upcoming-countdown {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: rgba(12, 12, 18, 0.94);
}

@media (max-width: 768px) {
    #search-view .srch-filters {
        margin-inline: -16px;
        padding-inline: 16px;
    }
}

#search-view .srch-placeholder {
    color: rgba(255, 255, 255, 0.5);
}

#search-view .srch-placeholder h2 {
    opacity: 1;
    color: rgba(255, 255, 255, 0.74);

    text-wrap: balance;
}

#search-view .srch-placeholder p {
    opacity: 1;
    color: rgba(255, 255, 255, 0.5);
}

@media (max-width: 780px) {

    #search-view #search-results-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)) !important;

        padding: 0 !important;
    }

    #search-view #search-results-grid > .row__poster-container {
        width: 100% !important;
    }
}

@media (max-width: 420px) {
    #search-view #search-results-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (pointer: coarse) {
    #search-view .srch-seg {
        padding: 3px;
    }

    #search-view .srch-seg .sort-chip,
    #search-view .srch-genres .genre-chip {
        min-height: 40px;
    }

    #search-view .search-type-chips .sort-chip {
        min-width: 40px;
        justify-content: center;
    }

    #search-view .srch-mood {
        min-width: 40px;
        height: 40px;
    }
}

#tonkanime-view .tka-searchbar {
    padding-block: 0;
}

#tonkanime-view #tka-search-input {
    height: 46px;
}

@media (pointer: coarse) {
    .site-footer .footer-nav-col {
        gap: 2px;
    }

    .site-footer .footer-nav-link {
        display: inline-flex;
        align-items: center;
        min-height: 44px;
        padding: 0;
    }

    .site-footer .footer-logo {
        display: flex;
        align-items: center;
        align-self: flex-start;
        min-height: 44px;
        margin-block: -7px;
    }
}

.site-footer {
    padding-bottom: max(40px, calc(env(safe-area-inset-bottom) + 24px));
}

@media (max-width: 380px) {
    .site-footer {
        padding-bottom: max(30px, calc(env(safe-area-inset-bottom) + 20px));
    }
}

.site-footer .footer-nav-link i {
    color: rgba(255, 255, 255, 0.4);
    transition: color 0.2s ease-out;
}

@media (hover: hover) {
    .site-footer .footer-nav-link:hover i {
        color: var(--primary-soft, #b7a9ff);
    }
}

@media (hover: none) {
    .site-footer .footer-nav-link:hover {
        transform: none;
    }
}

.site-footer .footer-disclaimer,
.site-footer .footer-copyright {
    color: #7a7a86;
}

.site-footer .footer-disclaimer strong {
    color: #9a9aa6;
}

@media (max-width: 768px) {
    .site-footer .footer-disclaimer {
        text-align: left;
    }
}

#streaming-content button:focus-visible,
#streaming-content a:focus-visible,
#streaming-content [tabindex]:focus-visible,
#search-view button:focus-visible,
#upcoming-view button:focus-visible,
.site-footer a:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 3px;
}

html.reduce-motion .hm-more,
html.reduce-motion .hm-more i,
html.reduce-motion .row .row__posters.is-swapping,
html.reduce-motion .hm-page,
html.reduce-motion .hm-library > .discover-grid,
html.reduce-motion .hm-library > .hm-pager {
    transition: none;
}

html.reduce-motion .hm-more:hover i {
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    .hm-more,
    .hm-more i,
    .row .row__posters.is-swapping,
    .hm-page,
    .hm-library > .discover-grid,
    .hm-library > .hm-pager {
        transition: none;
    }

    .hm-more:hover i {
        transform: none;
    }
}
