/* Saga Member bottom navigation — authoritative iPhone/PWA layout contract. */
:root {
  --saga-nav-safe-bottom: env(safe-area-inset-bottom, 0px);
  --saga-nav-indicator-size: 42px;
}

.bottom-nav {
  --nav-indicator-size: var(--saga-nav-indicator-size);
  position: fixed;
  inset-block-start: auto;
  inset-inline-end: max(12px, calc((100vw - 430px) / 2 + 12px));
  inset-block-end: max(10px, var(--saga-nav-safe-bottom));
  inset-inline-start: max(12px, calc((100vw - 430px) / 2 + 12px));
  z-index: var(--z-nav);
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: center;
  width: auto;
  max-width: 406px;
  min-height: 58px;
  margin: 0 auto;
  padding: 5px;
  overflow: visible;
  isolation: isolate;
  border: 1px solid rgb(255 255 255 / 9%);
  border-radius: 22px;
  background: rgb(29 24 21 / 97%);
  box-shadow: 0 16px 32px rgb(29 23 20 / 24%);
}

.bottom-nav[hidden] {
  display: none;
}

.bottom-nav-indicator {
  position: absolute;
  inset-block-start: auto;
  inset-block-end: 8px;
  inset-inline-start: 0;
  z-index: 0;
  width: var(--nav-indicator-size);
  height: var(--nav-indicator-size);
  border: 1px solid rgb(255 255 255 / 20%);
  border-radius: 15px;
  background: #f1d7ae;
  box-shadow: 0 5px 14px rgb(0 0 0 / 18%);
  opacity: 0;
  pointer-events: none;
  transform: translate3d(0, 0, 0);
}

.bottom-nav button {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 48px;
  padding: 0;
  border: 0;
  border-radius: 17px;
  background: transparent !important;
  color: #cfc7c1;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.bottom-nav button[aria-current="page"] {
  background: transparent !important;
  color: #f1d7ae;
}

.bottom-nav button > [data-feather] {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
}

.bottom-nav .feather-icon {
  width: 22px;
  height: 22px;
}

.bottom-nav .pass-destination .feather-icon {
  box-sizing: border-box;
  width: 22px;
  height: 22px;
  padding: 0;
  border-radius: 0;
  background: transparent;
}

.bottom-nav button[aria-current="page"] .feather-icon {
  color: var(--v7-ink);
  transform: none;
}

.bottom-nav .nav-label {
  position: absolute;
  inset-block-end: calc(100% + 10px);
  inset-inline-start: 50%;
  z-index: 3;
  box-sizing: border-box;
  min-height: 28px;
  padding: 7px 11px;
  border: 1px solid rgb(255 255 255 / 14%);
  border-radius: 10px;
  background: #211a16;
  box-shadow: 0 8px 18px rgb(24 20 17 / 20%);
  color: #fff8ed;
  font-size: 0.72rem;
  font-weight: 750;
  line-height: 1;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transform: translate(-50%, 4px);
  transition: opacity 140ms ease-out, transform 140ms ease-out, visibility 0s linear 140ms;
}

.bottom-nav .nav-label::after {
  position: absolute;
  inset-block-start: 100%;
  inset-inline-start: 50%;
  width: 8px;
  height: 8px;
  border-right: 1px solid rgb(255 255 255 / 14%);
  border-bottom: 1px solid rgb(255 255 255 / 14%);
  background: #211a16;
  content: "";
  transform: translate(-50%, -4px) rotate(45deg);
}

.bottom-nav button[aria-current="page"] .nav-label {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
  transition-delay: 0s;
}

@media (prefers-reduced-motion: reduce) {
  .bottom-nav button,
  .bottom-nav .nav-label {
    transition: none;
  }
}

@media (forced-colors: active) {
  .bottom-nav {
    border: 1px solid CanvasText;
    background: Canvas;
  }

  .bottom-nav-indicator,
  .bottom-nav .nav-label {
    border: 1px solid CanvasText;
    background: Highlight;
    color: HighlightText;
    box-shadow: none;
  }
}
