.mobile-nav { display: none; }

@media (max-width: 767px) {
    body.with-mobile-nav {
        --mobile-nav-height: calc(68px + env(safe-area-inset-bottom, 0px));
        padding-bottom: var(--mobile-nav-height);
    }

    html:has(.with-mobile-nav) {
        scroll-padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px));
    }

    .mobile-nav {
        position: fixed;
        z-index: 10;
        inset: auto 0 0;
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        min-height: var(--mobile-nav-height);
        padding: 4px max(8px, env(safe-area-inset-right, 0px)) calc(4px + env(safe-area-inset-bottom, 0px)) max(8px, env(safe-area-inset-left, 0px));
        border: 1px solid #353038;
        border-bottom: 0;
        border-radius: 15px 15px 0 0;
        background: #1c1b20;
        box-shadow: 0 -5px 22px #0005;
    }

    .mobile-nav a {
        display: grid;
        align-content: center;
        justify-items: center;
        gap: 4px;
        min-width: 0;
        min-height: 54px;
        padding: 2px;
        border-radius: 9px;
        color: #bdb4bd;
        font: 650 .76rem/1.2 system-ui, sans-serif;
        text-decoration: none;
    }

    .mobile-nav a[aria-current="page"] { color: #ff8278; }
    .mobile-nav a:focus-visible { outline: 2px solid #c3adff; outline-offset: -2px; }
    .mobile-nav svg {
        width: 21px;
        height: 21px;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.8;
        stroke-linecap: round;
        stroke-linejoin: round;
    }
}
