body {
    padding-bottom: calc(var(--nav-bot) + var(--safe-b) + 26px);
}

.tb {
    position: sticky;
    top: 0;
    z-index: 9990;
    display: flex;
    align-items: center;
    gap: 6px;
    height: calc(var(--nav-top) + var(--safe-t));
    padding: var(--safe-t) 12px 0;
    background: var(--card);
    border-bottom: 1px solid var(--line);
    transition: transform .3s var(--ease);
}
.tb.is-hidden {
    transform: translateY(-100%);
}
.tb_prog {
    position: absolute;
    left: 0;
    bottom: -1px;
    height: 2px;
    width: 100%;
    background: var(--brand);
    transform: scaleX(var(--sp, 0));
    transform-origin: left;
    opacity: 0;
    transition: opacity .2s;
}
.tb.is-scrolled .tb_prog {
    opacity: 1;
}

.tb_bars,
.tb_back,
.tb_search,
.tb_bell,
.tb_mode {
    position: relative;
    flex: 0 1 40px;
    width: 40px;
    min-width: 30px;
    height: 40px;
    border: 0;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: transparent;
    color: var(--text1);
    font-size: 17px;
    cursor: pointer;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    transition: background-color .18s;
}
.tb_bars:hover,
.tb_back:hover,
.tb_search:hover,
.tb_search[aria-expanded="true"],
.tb_bell:hover,
.tb_mode:hover,
.tb_bell[aria-expanded="true"] {
    background: var(--rgba2);
}

.tb_brand {
    flex: 1 1 auto;
    min-width: 0;
    height: 100%;
    display: flex;
    align-items: center;
    color: var(--text1);
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}
.tb_logo {
    display: block;
    height: clamp(20px, calc(var(--nav-top) - 30px), 26px);
    aspect-ratio: 696 / 180;
    max-width: 100%;
    background: url("/images/logo-nav-light.webp") left center / contain no-repeat;
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}
html[data-theme="dark"] .tb_logo {
    background-image: url("/images/logo-nav-dark.webp");
}

.tb a,
.tb button,
.bn a,
.bn button,
.bn_it {
    outline: 0;
    -webkit-tap-highlight-color: transparent;
}
.tb a:focus,
.tb a:focus-visible,
.tb button:focus,
.tb button:focus-visible,
.bn a:focus,
.bn a:focus-visible {
    outline: 0;
    box-shadow: none;
    animation: none;
}

#bell_num {
    position: absolute;
    top: 3px;
    right: 2px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 8px;
    background: var(--danger);
    color: #fff;
    font: 600 9.5px/16px var(--font-ui);
    text-align: center;
    box-shadow: 0 0 0 2px var(--bg);
}

@media (min-width: 900px) {
    .tb {
        padding-left: max(18px, calc((100vw - 1200px) / 2 + 14px));
        padding-right: max(18px, calc((100vw - 1200px) / 2 + 14px));
    }
}

#nav_shadow {
    position: fixed;
    inset: 0;
    z-index: 9992;
    display: none;
    background: rgba(5, 10, 13, .55);
    opacity: 0;
    transition: opacity .25s ease;
}
#nav_shadow.is-on {
    display: block;
}
#nav_shadow.is-show {
    opacity: 1;
}

#search_menu {
    position: fixed;
    z-index: 9995;
    top: calc(var(--safe-t) + 8px);
    left: 10px;
    right: 10px;
    max-width: 640px;
    margin: 0 auto;
    visibility: hidden;
    opacity: 0;
    transform: translateY(-14px);
    transition: opacity .2s ease, transform .28s var(--ease), visibility 0s linear .28s;
}
#search_menu.is-open {
    visibility: visible;
    opacity: 1;
    transform: none;
    transition: opacity .2s ease, transform .28s var(--ease);
}
#search_table {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 50px;
    padding: 0 6px 0 14px;
    border: 1px solid var(--brand);
    border-radius: 14px;
    background: var(--card);
    box-shadow: 0 14px 34px -14px rgba(0, 0, 0, .55);
}
#search_table .search_btn {
    color: var(--brand-text);
    font-size: 14px;
}
#search_input {
    flex: 1;
    min-width: 0;
    height: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text1);
    font: 400 14px var(--font-ui);
}
#search_input::placeholder {
    color: var(--text-dim);
}
#search_input::-webkit-search-cancel-button {
    display: none;
}
#search_close,
.search_view {
    flex: none;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 10px;
    display: grid;
    place-items: center;
    cursor: pointer;
    font-size: 14px;
    -webkit-tap-highlight-color: transparent;
}
#search_close {
    display: none;
    background: transparent;
    color: var(--text-dim);
}
.search_view {
    background: var(--rgba2);
    color: var(--text-dim);
    transition: background-color .15s, color .15s;
}
.search_view.is-ready {
    background: var(--brand-deep);
    color: #fff;
}
#search_sugestion {
    display: none;
    margin-top: 8px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--card);
    box-shadow: 0 14px 34px -14px rgba(0, 0, 0, .55);
}
#search_sugestion .search-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    color: var(--text1);
    font-size: 13.5px;
    cursor: pointer;
    transition: background-color .12s;
}
#search_sugestion .search-item + .search-item {
    border-top: 1px solid var(--line);
}
#search_sugestion .search-item:hover {
    background: var(--rgba2);
}
#search_sugestion .search-item.empty {
    color: var(--text-dim);
    cursor: default;
}
#search_sugestion .search-item > i:first-child {
    color: var(--text-dim);
    font-size: 13px;
}
#search_sugestion .search-item .title {
    flex: 1;
    min-width: 0;
}
#search_sugestion .search-item [data-fill] {
    color: var(--text-dim);
    font-size: 12px;
    transform: rotate(-45deg);
    padding: 6px;
}

.bn {
    --bn-pad: 6px;
    position: fixed;
    z-index: 9990;
    left: 10px;
    right: 10px;
    bottom: calc(10px + var(--safe-b));
    max-width: 400px;
    height: var(--nav-bot);
    margin: 0 auto;
    padding: 0 var(--bn-pad);
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    container-type: inline-size;
    container-name: bn;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: var(--card);
    box-shadow: 0 12px 30px -14px rgba(0, 0, 0, .6);
    transition: transform .3s var(--ease), height .3s var(--ease);
}


.bn_it {
    position: relative;
    z-index: 1;
    min-width: 0;
    padding: 5px 0 0;
    border: 0;
    background: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-dim);
    font-family: var(--font-ui);
    text-decoration: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.bn_ic {
    position: relative;
    flex: none;
    width: clamp(30px, 9.5cqw, 38px);
    height: clamp(30px, 9.5cqw, 38px);
    display: grid;
    place-items: center;
    font-size: 17px;
    transition: color .2s, transform .2s var(--ease);
}
.bn_tx {
    margin-top: 2px;
    max-width: 100%;
    padding: 0 2px;
    box-sizing: border-box;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: clamp(9px, 2.9cqw, 10.5px);
    font-weight: 500;
    line-height: 14px;
    transition: color .2s, opacity .2s;
}
.bn_it.on {
    color: var(--text1);
}
.bn_it.on .bn_ic {
    color: var(--brand-text);
}

.bn_ava {
    flex: none;
    width: clamp(20px, 7cqw, 28px);
    height: clamp(20px, 7cqw, 28px);
    aspect-ratio: 1;
    border-radius: 50%;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: var(--rgba2) center / cover no-repeat;
    color: inherit;
    font-size: clamp(10px, 3.2cqw, 13px);
}
.bn_it.on .bn_ava {
    box-shadow: 0 0 0 2px var(--brand);
}

@media (max-height: 460px) {
    .bn {
        --nav-bot: 52px;
    }
    .bn .bn_tx {
        opacity: 0;
        height: 0;
        margin: 0;
    }
    .bn .bn_it {
        padding-top: 7px;
    }
}
@media (max-width: 359px) {
    .tb {
        gap: 2px;
        padding-left: 8px;
        padding-right: 8px;
    }
    .tb_bars,
    .tb_back,
    .tb_search,
    .tb_bell,
    .tb_mode {
        flex-basis: 34px;
        width: 34px;
        height: 34px;
        font-size: 15px;
    }
}

.bn.is-compact {
    --nav-bot: 52px;
}
.bn.is-compact .bn_tx {
    opacity: 0;
    height: 0;
    margin: 0;
}
.bn.is-compact .bn_it {
    padding-top: 7px;
}

@media (min-width: 900px) {
    .bn {
        max-width: 380px;
    }
}

@media (max-width: 899px) {
    .bn {
        left: 0;
        right: 0;
        bottom: 0;
        max-width: none;
        height: calc(var(--nav-bot) + var(--safe-b));
        padding: 0 var(--bn-pad) var(--safe-b);
        border-width: 1px 0 0;
        border-radius: 0;
        box-shadow: 0 -10px 28px -16px rgba(0, 0, 0, .5);
    }
}

body .xw-notif-panel {
    top: calc(var(--nav-top) + var(--safe-t) + 8px);
}

@media (prefers-reduced-motion: reduce) {
    .tb,
    .bn,
        #search_menu,
    #nav_shadow {
        transition: none;
    }
}

.tb_bars[hidden] {
    display: none;
}
.tb_bars {
    flex-basis: 36px;
    width: 36px;
    height: 36px;
    font-size: 16px;
}
#shadow_menu {
    position: fixed;
    inset: 0;
    z-index: 99998;
    display: none;
    background: rgba(5, 10, 13, .55);
}

img,
video,
canvas {
    -webkit-touch-callout: none;
    -webkit-user-drag: none;
    user-select: none;
    -webkit-user-select: none;
}
#menu_bars #ico_p,
#menu_bars #ico_img_1,
#menu_bars #ico_img_2,
#menu_bars #ico_img_3 {
    -webkit-touch-callout: none;
    user-select: none;
    -webkit-user-select: none;
}
