/* Loaded after page styles so sticky behavior is consistent on every screen. */
.site-icon,
.catalog-art .site-icon,
.detail-poster .site-icon {
    position: static;
    inset: auto;
    width: 25px;
    height: 25px;
    object-fit: contain;
    filter: none;
    transform: none;
    z-index: auto;
    vertical-align: middle;
    flex-shrink: 0;
}

.catalog-original,
.detail-poster-brand {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    line-height: 1;
}

.catalog-original small,
.detail-poster-brand small {
    margin-left: 0;
    line-height: 1.2;
}

.site-brand-image {
    width: auto;
    max-width: 170px;
    height: 34px;
    object-fit: contain;
    flex-shrink: 0;
}

.logo .site-brand-name {
    color: #f3eef7;
    min-width: 0;
    max-width: 190px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.topbar.site-navbar {
    position: sticky;
    top: 0;
    z-index: 80;
    min-height: 76px;
    height: auto;
    padding: 14px 5vw;
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: clamp(18px, 3vw, 42px);
    background: #101014f5;
    border-bottom: 1px solid #ffffff12;
    backdrop-filter: blur(18px);
    overflow: visible;
}

.site-navbar .logo {
    flex-shrink: 0;
}

.site-navbar .tools {
    margin-left: auto;
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 18px;
}

.site-navbar .search {
    position: static;
    display: block;
    width: clamp(160px, 20vw, 260px);
    border: 1px solid #ffffff20;
    border-radius: 7px;
    background: #ffffff05;
}

.site-navbar .search input {
    width: 100%;
    min-width: 0;
    padding: 10px 12px;
    border: 0;
    background: transparent;
    font-size: 12px;
}

.profile-dropdown {
    position: relative;
    flex-shrink: 0;
}

.profile-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    border-radius: 8px;
    cursor: pointer;
    list-style: none;
}

.profile-toggle::-webkit-details-marker {
    display: none;
}

.profile-avatar {
    width: 37px;
    height: 37px;
    display: grid;
    place-items: center;
    border: 1px solid #ffffff25;
    border-radius: 50%;
    background: #25252e;
    color: #e3dfe9;
}

.profile-avatar svg {
    width: 23px;
    height: 23px;
}

.profile-chevron {
    width: 16px;
    height: 16px;
    stroke: #a9a4b2;
    fill: none;
    stroke-width: 1.5;
}

.profile-dropdown[open] .profile-chevron {
    transform: rotate(180deg);
}

.profile-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 14px);
    width: min(278px, calc(100vw - 32px));
    max-height: calc(100dvh - 160px);
    overflow-y: auto;
    padding: 8px;
    border: 1px solid #ffffff24;
    border-radius: 12px;
    background: #1b1a21;
    box-shadow: 0 18px 60px #0009;
}

.profile-panel-heading {
    padding: 13px 12px 17px;
    border-bottom: 1px solid #ffffff12;
    margin-bottom: 6px;
}

.profile-panel-heading span {
    display: block;
    font-size: 9px;
    letter-spacing: 1.5px;
    color: #8d859a;
    margin-bottom: 6px;
}

.profile-panel-heading strong,
.profile-panel-heading small {
    display: block;
    overflow-wrap: anywhere;
}

.profile-panel-heading strong {
    font-size: 14px;
    color: #efeaf5;
}

.profile-panel-heading small {
    font-size: 11px;
    color: #9990a5;
    margin-top: 4px;
}

.profile-menu-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 12px;
    min-height: 44px;
    font-size: 12px;
    color: #cbc4d5;
    text-align: left;
    border-radius: 6px;
}

.profile-menu-item:hover,
.profile-menu-item:focus-visible {
    background: #ffffff09;
    color: #fff;
}

.profile-menu-item svg {
    width: 19px;
    height: 19px;
    flex-shrink: 0;
}

.profile-menu-divider {
    margin-top: 7px;
    border-top: 1px solid #ffffff12;
    border-radius: 0 0 6px 6px;
    padding-top: 17px;
}

.profile-logout {
    color: #eb7c85;
}

html {
    scroll-padding-top: 145px;
}

.detail-page .detail-hero {
    padding-top: 35px;
}

#episodes,
#about,
#recommendations {
    scroll-margin-top: 100px;
}

@media (max-width: 950px) {
    .site-navbar .nav {
        gap: 17px;
    }
}

@media (max-width: 720px) {
    .topbar.site-navbar {
        min-height: 106px;
        padding: 12px 5vw;
        gap: 10px;
        flex-wrap: wrap;
    }

    .site-navbar .logo {
        font-size: 22px;
    }

    .site-navbar .nav {
        display: none;
    }

    .site-navbar .tools {
        display: contents;
    }

    .site-navbar .profile-dropdown,
    .site-navbar .auth-btns {
        margin-left: auto;
    }

    .site-navbar .search {
        order: 3;
        flex-basis: 100%;
        width: 100%;
    }

    .site-navbar .search input {
        padding: 8px 12px;
    }

    .profile-panel {
        top: calc(100% + 8px);
    }

    .catalog-home .catalog-hero-copy {
        margin-top: 45px;
    }

    .detail-page .detail-hero {
        padding-top: 25px;
    }
}
