.member-menu {
  position: fixed;
  inset: auto 12px calc(104px + env(safe-area-inset-bottom)) auto;
  margin: 0;
  width: min(360px, calc(100% - 24px));
  max-height: calc(100dvh - 160px);
  overflow-y: auto;
  padding: 18px;
  border: 1px solid #ffffff24;
  border-radius: 22px;
  background: var(--deep);
  color: var(--cream);
  box-shadow: 0 18px 55px #001e1870;
}

.member-menu::backdrop {
  background: #001e1866;
}

.member-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #ffffff1e;
}

.member-menu-header h2 {
  font: 700 18px var(--sans);
}

.member-menu-header button {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: #ffffff0c;
  color: var(--cream);
}

.member-menu-links {
  display: grid;
  gap: 8px;
  padding-top: 12px;
}

.member-menu-links a {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 52px;
  padding: 12px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
}

.member-menu svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.member-menu-links a.active {
  background: #ffffff0c;
  color: var(--coral);
}

.member-menu [hidden] {
  display: none;
}

.member-menu :is(a, button):focus-visible {
  outline: 2px solid var(--cream);
  outline-offset: 2px;
}

@media (max-width: 820px) {
  body {
    padding-bottom: calc(90px + env(safe-area-inset-bottom));
  }

  .bottom-nav {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(72px, 1.35fr) minmax(0, 1fr) minmax(0, 1fr);
    align-items: stretch;
    gap: 2px;
    height: 78px;
    padding: 8px;
    border-radius: 21px;
  }

  .bottom-nav > a,
  .bottom-nav > button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-width: 0;
    min-height: 48px;
    padding: 4px 0;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: inherit;
    font-size: 10px;
    line-height: 1.2;
    white-space: nowrap;
    transition: background-color 160ms, color 160ms;
    -webkit-tap-highlight-color: transparent;
  }

  .bottom-nav > a > span {
    font-size: 23px;
    line-height: 1;
  }

  .bottom-nav-account svg {
    width: 25px;
    height: 25px;
    fill: currentColor;
  }

  .bottom-nav > .bottom-nav-offers {
    min-height: 64px;
    margin-top: -8px;
    border-radius: 16px;
    background: var(--coral);
    color: var(--deep);
    font-size: 12px;
    font-weight: 700;
    box-shadow: 0 4px 18px #001e1840;
  }

  .bottom-nav > .bottom-nav-offers > span {
    font-size: 27px;
  }

  .bottom-nav > .bottom-nav-offers.active {
    color: var(--deep);
    box-shadow: inset 0 0 0 2px var(--cream), 0 4px 18px #001e1840;
  }

  .bottom-nav > .bottom-nav-account.active {
    color: var(--coral);
    background: #ffffff0c;
  }

  .bottom-nav > :is(a, button):focus-visible {
    outline: 2px solid var(--cream);
    outline-offset: -3px;
  }

  .bottom-nav > :is(a, button):active {
    background: #ffffff15;
  }

  .bottom-nav > .bottom-nav-offers:active {
    background: var(--coral);
    box-shadow: inset 0 0 0 2px var(--deep);
  }

  .app-shell:not(.public-mode) .view {
    padding-bottom: calc(118px + env(safe-area-inset-bottom));
  }
}

@media (prefers-reduced-motion: reduce) {
  .bottom-nav > a,
  .bottom-nav > button {
    transition: none;
  }
}
