.kudrama-bottom-nav {
    display: none;
}

@media (max-width: 767.98px) {
    :root {
        --kudrama-bottom-nav-height: 68px;
    }

    body:not(:has(.surprise-feed-page)) .app-footer {
        padding-bottom: calc(var(--kudrama-bottom-nav-height) + env(safe-area-inset-bottom));
    }

    .kudrama-bottom-nav {
        position: fixed;
        z-index: 11050;
        right: 0;
        bottom: 0;
        left: 0;
        display: grid !important;
        width: 100%;
        height: calc(var(--kudrama-bottom-nav-height) + env(safe-area-inset-bottom));
        padding: 7px 4px max(7px, env(safe-area-inset-bottom));
        grid-template-columns: repeat(7, minmax(0, 1fr));
        align-items: end;
        isolation: isolate;
        background: rgba(4, 4, 4, .985);
        border-top: 1px solid rgba(255, 255, 255, .07);
        box-shadow: 0 -10px 30px rgba(0, 0, 0, .42);
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
    }

    .kudrama-bottom-nav__item {
        display: flex;
        min-width: 0;
        height: 52px;
        padding: 5px 3px 3px;
        border: 0;
        border-radius: 9px;
        align-items: center;
        justify-content: center;
        flex-direction: column;
        gap: 4px;
        color: #8f8f97;
        background: transparent;
        font: inherit;
        text-decoration: none;
    }

    .kudrama-bottom-nav__item i {
        font-size: 17px;
        line-height: 1;
        opacity: 1;
        filter: none;
        text-shadow: none;
        -webkit-font-smoothing: antialiased;
        transform: translateZ(0);
    }

    .kudrama-bottom-nav__item span {
        max-width: 100%;
        overflow: hidden;
        font-size: 9px;
        font-weight: 650;
        line-height: 1;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .kudrama-bottom-nav__item.is-active {
        color: #fff;
    }

    .kudrama-bottom-nav__item.is-active i {
        color: var(--theme-color);
    }

    .kudrama-bottom-nav__shorts {
        position: relative;
        display: grid;
        height: 52px;
        border: 0;
        place-items: center;
        color: #fff;
        text-decoration: none;
    }

    .kudrama-bottom-nav__shorts > span {
        position: absolute;
        bottom: 4px;
        display: grid;
        width: 54px;
        height: 54px;
        padding-left: 3px;
        border: 4px solid #050505;
        border-radius: 50%;
        place-items: center;
        color: #fff;
        background: var(--theme-color);
        box-shadow: 0 8px 24px color-mix(in srgb, var(--theme-color) 36%, transparent);
        transition: transform .16s ease;
    }

    .kudrama-bottom-nav__shorts:active > span {
        transform: scale(.94);
    }

    .kudrama-bottom-nav__shorts.is-active > span {
        box-shadow: 0 0 0 2px rgba(255, 255, 255, .9), 0 8px 24px color-mix(in srgb, var(--theme-color) 46%, transparent);
    }

    .kudrama-bottom-nav__shorts i {
        font-size: 17px;
        opacity: 1;
        filter: none;
        text-shadow: none;
        -webkit-font-smoothing: antialiased;
        transform: translateZ(0);
    }

    body:has(.surprise-feed-page) .kudrama-bottom-nav {
        background: linear-gradient(to top, rgba(0, 0, 0, .96), rgba(0, 0, 0, .68));
        border-top-color: rgba(255, 255, 255, .05);
    }

    body:has(#aside.show) .kudrama-bottom-nav {
        opacity: 0;
        pointer-events: none;
    }

    body:has(.episode-short-page.is-mobile-shorts) .kudrama-bottom-nav {
        display: none !important;
    }

    #aside.nav-aside {
        width: min(88vw, 360px) !important;
        max-width: min(88vw, 360px) !important;
        padding: 18px 14px calc(24px + env(safe-area-inset-bottom));
        border-right: 1px solid rgba(255, 255, 255, .07);
        background: #050505;
        box-shadow: 24px 0 70px rgba(0, 0, 0, .62);
    }

    #aside.nav-aside.show {
        right: auto;
        bottom: 0;
    }

    #aside .nav-user {
        min-height: 62px;
        margin: 0 0 10px !important;
        padding: 0;
    }

    #aside .nav-user > li,
    #aside .nav-user .nav-profile {
        width: 100%;
    }

    #aside .nav-user .nav-profile {
        min-height: 58px;
        padding: 6px 8px;
        border-radius: 12px;
        background: rgba(255, 255, 255, .035);
    }

    #aside .nav-user .nav-profile .avatar {
        width: 44px;
        height: 44px;
    }

    #aside .nav-user .nav-profile .profile-text {
        padding-left: 11px;
    }

    #aside .catshort-locale-picker-sidebar {
        margin: 4px 0 12px;
        border: 1px solid rgba(255, 255, 255, .06);
        border-radius: 10px;
        background: rgba(255, 255, 255, .025);
    }

    #aside .catshort-locale-picker-sidebar .nav-link {
        min-height: 42px;
        padding: 0 13px;
    }

    #aside #nav-bar-scroll-mobile {
        max-height: calc(100svh - 165px);
        margin: 0;
        padding: 2px 0 24px;
        overflow-x: hidden;
        overflow-y: auto;
        scrollbar-width: thin;
        scrollbar-color: rgba(255, 255, 255, .14) transparent;
    }

    #aside #nav-bar-scroll-mobile .nav-header {
        padding: 16px 10px 7px;
        color: #696971;
        font-size: 9px;
        font-weight: 750;
        letter-spacing: .1em;
        text-transform: uppercase;
    }

    #aside #nav-bar-scroll-mobile > li:not(.nav-header) {
        margin: 2px 0;
    }

    #aside #nav-bar-scroll-mobile > li:not(.nav-header) > a {
        width: 100%;
        min-height: 43px;
        padding: 0 11px;
        border-radius: 9px;
        color: #aaaab2;
        font-size: 13px;
        font-weight: 600;
        transition: color .15s ease, background-color .15s ease;
    }

    #aside #nav-bar-scroll-mobile > li:not(.nav-header) > a:hover,
    #aside #nav-bar-scroll-mobile > li.active > a {
        color: #fff;
        background: rgba(255, 255, 255, .055);
    }

    #aside #nav-bar-scroll-mobile > li.active > a {
        box-shadow: inset 3px 0 0 var(--theme-color);
    }

    #aside #nav-bar-scroll-mobile .nav-icon {
        width: 17px;
        height: 17px;
        margin-right: 12px;
        color: currentColor;
        fill: currentColor;
        stroke: currentColor;
    }

    #aside #nav-bar-scroll-mobile > li.active .nav-icon {
        color: var(--theme-color);
        fill: var(--theme-color);
        stroke: var(--theme-color);
    }
}

@media (prefers-reduced-motion: reduce) {
    .kudrama-bottom-nav__shorts > span {
        transition: none;
    }
}
