:root {
  --mobile-nav-height: 64px;
  --mobile-nav-gap: 10px;
}

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

@media (max-width: 700px) {
  body {
    padding-bottom: calc(var(--mobile-nav-height) + 28px + env(safe-area-inset-bottom)) !important;
  }

  .mobile-bottom-nav {
    position: fixed;
    z-index: 1000;
    right: 12px;
    bottom: calc(var(--mobile-nav-gap) + env(safe-area-inset-bottom));
    left: 12px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    height: var(--mobile-nav-height);
    padding: 5px;
    border: 1px solid rgba(255, 209, 128, 0.22);
    border-radius: 22px;
    background: rgba(8, 11, 20, 0.82);
    box-shadow: 0 16px 44px rgba(0, 0, 0, 0.36);
    -webkit-backdrop-filter: blur(20px) saturate(145%);
    backdrop-filter: blur(20px) saturate(145%);
  }

  .mobile-bottom-nav__item {
    position: relative;
    min-width: 0;
    min-height: 54px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    border-radius: 17px;
    color: rgba(255, 255, 255, 0.56);
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
    transition: color 160ms ease, background-color 160ms ease, transform 160ms ease;
  }

  .mobile-bottom-nav__item:active {
    transform: scale(0.96);
  }

  .mobile-bottom-nav__item[aria-current="page"] {
    color: #ffd180;
    background: linear-gradient(180deg, rgba(255, 149, 0, 0.16), rgba(255, 149, 0, 0.07));
  }

  .mobile-bottom-nav__item[aria-current="page"]::after {
    content: "";
    position: absolute;
    right: 24%;
    bottom: 2px;
    left: 24%;
    height: 2px;
    border-radius: 999px;
    background: #ff9500;
    box-shadow: 0 0 10px rgba(255, 149, 0, 0.62);
  }

  .mobile-bottom-nav__icon {
    width: 20px;
    height: 20px;
    display: block;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.7;
  }

  .mobile-bottom-nav__label {
    overflow: hidden;
    font-size: 10px;
    font-weight: 500;
    line-height: 1;
    letter-spacing: 0.08em;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

@media (max-width: 340px) {
  .mobile-bottom-nav {
    right: 8px;
    left: 8px;
  }

  .mobile-bottom-nav__label {
    font-size: 9px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mobile-bottom-nav__item {
    transition: none;
  }
}
