.bottom-nav {
  position: fixed;
  z-index: 60;
  left: 50%;
  bottom: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2px;
  width: min(100%, 560px);
  padding:
    6px
    max(8px, env(safe-area-inset-right))
    max(6px, env(safe-area-inset-bottom))
    max(8px, env(safe-area-inset-left));
  border-top: 1px solid var(--line);
  background: rgba(8, 13, 29, .94);
  box-shadow: 0 -14px 34px rgba(0, 0, 0, .34);
  transform: translateX(-50%);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.bottom-nav__item {
  display: flex;
  min-width: 0;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 3px;
  padding: 5px 2px;
  border-radius: 12px;
  color: var(--faint);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.bottom-nav__item svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bottom-nav__label {
  overflow: hidden;
  font-size: 10px;
  font-weight: 650;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bottom-nav__item:hover {
  color: var(--text);
  background: rgba(255, 255, 255, .045);
}

.bottom-nav__item[aria-current="page"] {
  color: #dfe7ff;
  background: var(--brand-soft);
  box-shadow: inset 0 0 0 1px rgba(109, 140, 255, .24);
}

.bottom-nav__item[aria-current="page"] svg {
  stroke: #9eb1ff;
}

body.has-bottom-nav .shelf-shell,
body.has-bottom-nav .orders-shell,
body.has-bottom-nav .detail-shell,
body.has-bottom-nav .page-shell {
  padding-bottom: calc(82px + env(safe-area-inset-bottom));
}

@media (min-width: 700px) {
  .bottom-nav {
    bottom: max(14px, env(safe-area-inset-bottom));
    border: 1px solid var(--line-strong);
    border-radius: 18px;
    padding: 6px;
  }

  body.has-bottom-nav .shelf-shell,
  body.has-bottom-nav .orders-shell,
  body.has-bottom-nav .detail-shell,
  body.has-bottom-nav .page-shell {
    padding-bottom: calc(108px + env(safe-area-inset-bottom));
  }
}

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