.bottom-nav {
    display: none;
}

/* Final cross-page authority: legacy inline navbar rules must not change its geometry. */
@media (max-width: 768px) {
    html body {
        padding-bottom: var(--gg-bottom-nav-height) !important;
    }

    html body .bottom-nav {
        position: fixed !important;
        inset: auto 0 0 0 !important;
        z-index: 9999 !important;
        display: block !important;
        width: auto !important;
        max-width: none !important;
        height: var(--gg-bottom-nav-height) !important;
        min-height: 0 !important;
        max-height: var(--gg-bottom-nav-height) !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: visible !important;
        box-sizing: border-box !important;
        transform: none !important;
    }

    html body .bottom-nav > .bottom-nav-content {
        display: flex !important;
        width: 100% !important;
        height: var(--gg-bottom-nav-content-height) !important;
        margin: 0 !important;
        padding: 0 4px !important;
        align-items: center !important;
        justify-content: space-between !important;
        box-sizing: border-box !important;
        transform: none !important;
    }

    html body .bottom-nav > .bottom-nav-content > .nav-item {
        display: flex !important;
        width: 20% !important;
        min-width: 0 !important;
        max-width: 20% !important;
        height: var(--gg-bottom-nav-content-height) !important;
        flex: 0 0 20% !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        margin: 0 !important;
        padding: 4px 0 !important;
        line-height: 1 !important;
        box-sizing: border-box !important;
    }

    html body .bottom-nav > .bottom-nav-content > .nav-item > #bootom_icon {
        font-size: 14px !important;
        line-height: 1 !important;
    }

    html body .bottom-nav > .bottom-nav-content > .nav-item > p {
        margin: 4px 0 0 !important;
        padding: 0 !important;
        font-size: 9px !important;
        line-height: 1 !important;
    }
}

@media (max-width: 768px) {
    :root {
        --gg-bottom-nav-content-height: 58px;
        /* Kept as a reference; Android/browser visible viewport already excludes system UI. */
        --gg-device-safe-area-bottom: env(safe-area-inset-bottom, 0px);
        --gg-bottom-nav-safe-area: 0px;
        --gg-bottom-nav-height: calc(var(--gg-bottom-nav-content-height) + var(--gg-bottom-nav-safe-area));
    }

    html,
    body {
        width: 100%;
        min-height: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    body {
        padding-bottom: var(--gg-bottom-nav-height);
        box-sizing: border-box;
    }

    .bottom-nav {
        position: fixed;
        right: 0;
        bottom: 0;
        left: 0;
        top: auto;
        z-index: 9999;
        display: block;
        width: auto;
        max-width: none;
        height: var(--gg-bottom-nav-height);
        min-height: 0;
        padding: 0;
        background: #0a0b10;
        box-shadow: 0 -2px 5px rgba(0, 0, 0, .2);
        box-sizing: border-box;
        transform: none;
        isolation: isolate;
    }

    .bottom-nav-content {
        display: flex;
        width: 100%;
        height: var(--gg-bottom-nav-content-height);
        align-items: center;
        justify-content: space-between;
        padding: 0 4px;
        box-sizing: border-box;
    }

    .bottom-nav-content > .nav-item {
        display: flex;
        min-width: 0;
        height: var(--gg-bottom-nav-content-height);
        width: 20%;
        max-width: 20%;
        flex: 0 0 20%;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 4px 0;
        color: #f2f2f2;
        font-family: 'Raleway', sans-serif;
        font-size: 12px;
        line-height: 1;
        text-decoration: none !important;
        box-sizing: border-box;
        transition: transform .25s cubic-bezier(.25, 1.25, .5, 1), background-color .3s, color .2s ease;
    }

    .bottom-nav-content > .nav-item:hover,
    .bottom-nav-content > .nav-item:focus,
    .bottom-nav-content > .nav-item.active {
        color: #ff8d00;
    }

    .bottom-nav-content > .nav-item:hover {
        transform: scale(1.1);
    }

    .bottom-nav-content > .nav-item:active {
        transform: scale(.9);
    }

    .bottom-nav-content > .nav-item > #bootom_icon {
        font-size: 14px;
        line-height: 1;
    }

    .bottom-nav-content > .nav-item > p {
        margin: 4px 0 0;
        font-family: 'Raleway', sans-serif;
        font-size: 9px;
        line-height: 1;
        white-space: nowrap;
    }
}
