.sidebar-cookie-preferences {
  min-height: 44px;
  padding: 8px 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 11px;
  text-align: left;
  cursor: pointer;
}

.sidebar-cookie-preferences:focus-visible {
  outline: 2px solid var(--cream);
  outline-offset: 2px;
}

.member-menu {
  position: fixed;
  inset: auto 12px calc(80px + max(10px, 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 :is(a, button) {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 52px;
  padding: 12px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.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: transparent;
  color: var(--coral);
}

.sidebar nav a:is(.active, :hover) {
  background: transparent;
  color: var(--coral);
  box-shadow: none;
}

.sidebar nav a.active span {
  color: inherit;
}

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

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

@media (max-width: 820px) {
  :root {
    --member-nav-offset: max(10px, env(safe-area-inset-bottom));
    --member-nav-reserve: calc(64px + var(--member-nav-offset) + 24px);
  }
  body {
    padding-bottom: 0;
  }

  .bottom-nav {
    --member-nav-foreground: #0f3d3e;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: center;
    justify-items: center;
    gap: 2px;
    bottom: var(--member-nav-offset);
    height: 64px;
    padding: 4px 6px;
    border-radius: 21px;
    background: rgba(241, 90, 36, .55);
    color: var(--member-nav-foreground);
    border-color: #ffffff38;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    transition: height 230ms ease, padding 230ms ease, border-radius 230ms ease;
  }

  .bottom-nav > a,
  .bottom-nav > button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    width: 100%;
    min-width: 44px;
    min-height: 50px;
    padding: 3px 0;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: inherit;
    opacity: 1;
    font-size: 9px;
    line-height: 1.2;
    white-space: nowrap;
    transition: min-height 230ms ease, gap 230ms ease, background-color 230ms ease, color 230ms ease;
    -webkit-tap-highlight-color: transparent;
  }

  .bottom-nav .bottom-nav-label {
    display: block;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    max-height: 12px;
    opacity: 1;
    overflow: hidden;
    transition: max-height 230ms ease, opacity 230ms ease, transform 230ms ease;
  }

  .bottom-nav svg {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    opacity: 1;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .bottom-nav > a[data-nav="programme"] {
    align-self: center;
    justify-self: center;
  }

  .bottom-nav > a[data-nav="programme"] svg {
    width: 36px;
    height: 36px;
    transition: width 230ms ease, height 230ms ease;
  }

  .bottom-nav > .bottom-nav-offers {
    width: 60px;
    max-width: 100%;
    min-height: 54px;
    margin: 0;
    border-radius: 14px;
    background: var(--coral);
    color: var(--deep);
    font-size: 10px;
    font-weight: 700;
    box-shadow: 0 4px 18px #001e1840;
    transition: width 230ms ease, min-height 230ms ease, border-radius 230ms ease, gap 230ms ease, box-shadow 230ms ease;
  }

  .bottom-nav > .bottom-nav-offers .bottom-nav-label {
    font-size: 10px;
  }

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

  .bottom-nav > :is(a, button).active:not(.bottom-nav-offers),
  .bottom-nav > .bottom-nav-account[aria-expanded="true"] {
    color: var(--member-nav-foreground);
    background: transparent;
    box-shadow: none;
  }

  .bottom-nav.is-compact {
    height: 52px;
    padding: 3px 6px;
    border-radius: 19px;
  }

  .bottom-nav.is-compact > :is(a, button) {
    min-height: 44px;
    gap: 0;
  }

  .bottom-nav.is-compact > a[data-nav="programme"] svg {
    width: 22px;
    height: 22px;
  }

  .bottom-nav.is-compact .bottom-nav-label {
    max-height: 0;
    opacity: 0;
    transform: translateY(3px);
  }

  .bottom-nav.is-compact > .bottom-nav-offers {
    width: 48px;
    min-height: 44px;
    border-radius: 12px;
  }

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

  .bottom-nav > :is(a, button):active {
    color: var(--member-nav-foreground);
    background: transparent;
  }

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

  .app-shell:not(.public-mode) .view {
    padding-bottom: var(--member-nav-reserve);
  }
}

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