.fc-context-nav {
  --fc-nav-paper: rgba(247, 244, 237, .88);
  --fc-nav-ink: #292621;
  --fc-nav-muted: #716b61;
  position: fixed;
  left: 50%;
  bottom: max(14px, calc(env(safe-area-inset-bottom) + 10px));
  z-index: 442;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  width: max-content;
  max-width: calc(100vw - 24px);
  height: 52px;
  padding: 0;
  transform: translateX(-50%) translateY(10px);
  opacity: 0;
  isolation: isolate;
  transition: opacity .28s ease, transform .4s cubic-bezier(.22, 1, .36, 1);
  box-sizing: border-box;
  font-family: "Noto Serif SC", "Songti SC", "STSong", serif;
}

.fc-context-nav.is-ready {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.fc-context-nav::after {
  content: "";
  position: absolute;
  z-index: 0;
  top: -14px;
  left: 50%;
  width: 100vw;
  height: calc(64px + max(14px, calc(env(safe-area-inset-bottom) + 10px)));
  background: linear-gradient(
    to bottom,
    rgba(247, 244, 237, 0),
    var(--fc-nav-safe-surface, rgba(247, 244, 237, .96)) 52%,
    var(--fc-nav-safe-surface, rgba(247, 244, 237, .96))
  );
  transform: translateX(-50%);
  pointer-events: none;
}

/* Legacy product pages opt into the shared interaction layer explicitly. */
.fc-context-nav--foundation {
  transition:
    opacity var(--fc-motion-state, 180ms) var(--fc-state-ease, cubic-bezier(.2, 0, 0, 1)),
    transform var(--fc-motion-medium, 220ms) var(--fc-state-ease, cubic-bezier(.2, 0, 0, 1));
}

.fc-context-nav[hidden],
.fc-context-nav__item[hidden] {
  display: none !important;
}

.fc-context-nav *,
.fc-context-nav *::before,
.fc-context-nav *::after {
  box-sizing: border-box;
}

.fc-context-nav__item {
  position: relative;
  z-index: 1;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 7px;
  height: 46px;
  min-width: 46px;
  margin: 0 !important;
  padding: 0 13px !important;
  border: 1px solid rgba(255, 255, 255, .74) !important;
  border-radius: 999px !important;
  background: var(--fc-nav-paper) !important;
  color: var(--fc-nav-muted) !important;
  box-shadow: 0 13px 30px rgba(32, 28, 23, .15), inset 0 1px 0 rgba(255, 255, 255, .84) !important;
  font: inherit !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  letter-spacing: .08em !important;
  text-decoration: none !important;
  white-space: nowrap;
  cursor: pointer !important;
  -webkit-tap-highlight-color: transparent;
  -webkit-backdrop-filter: blur(24px) saturate(1.35);
  backdrop-filter: blur(24px) saturate(1.35);
  transition: color .2s ease, background-color .2s ease, transform .2s ease !important;
}

.fc-context-nav--foundation .fc-context-nav__item {
  transition:
    color var(--fc-motion-state, 180ms) var(--fc-state-ease, cubic-bezier(.2, 0, 0, 1)),
    background-color var(--fc-motion-state, 180ms) var(--fc-state-ease, cubic-bezier(.2, 0, 0, 1)),
    transform var(--fc-motion-fast, 150ms) var(--fc-state-ease, cubic-bezier(.2, 0, 0, 1)) !important;
}

.fc-context-nav__item:hover {
  background: rgba(250, 248, 242, .96) !important;
  color: var(--fc-nav-ink) !important;
}

.fc-context-nav__item:active {
  transform: scale(.96);
}

.fc-context-nav--foundation .fc-context-nav__item:active {
  transform: scale(var(--fc-motion-press-scale, .96));
}

.fc-context-nav__item:focus-visible {
  outline: 2px solid rgba(161, 35, 35, .66) !important;
  outline-offset: 2px;
}

.fc-context-nav__item.is-disabled {
  cursor: not-allowed !important;
  opacity: .58;
}

.fc-context-nav__item svg {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
}

.fc-context-nav--foundation .fc-context-nav__item svg {
  width: var(--fc-icon-size, 18px);
  height: var(--fc-icon-size, 18px);
  stroke-width: var(--fc-icon-stroke, 1.5);
}

.fc-context-nav__home,
.fc-context-nav__new {
  width: 46px;
  padding: 0 !important;
}

.fc-context-nav__home span,
.fc-context-nav__new span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.fc-context-nav__context {
  color: var(--fc-nav-ink) !important;
}

.fc-context-nav__ai {
  min-width: 58px;
  border-color: rgba(255, 255, 255, .22) !important;
  background: var(--fc-nav-ink) !important;
  color: #fffdf7 !important;
  box-shadow: 0 8px 18px rgba(31, 28, 24, .2) !important;
}

.fc-context-nav__ai:hover {
  background: #171512 !important;
  color: #fffdf7 !important;
}

.fc-context-nav__ai::after {
  content: "";
  width: 4px;
  height: 4px;
  margin-left: -2px;
  border-radius: 50%;
  background: #d5b66f;
  box-shadow: 0 0 0 3px rgba(213, 182, 111, .13);
}

@media (max-width: 620px) {
  .fc-context-nav--foundation {
    left: max(14px, env(safe-area-inset-left));
    transform: translateY(10px);
  }

  .fc-context-nav--foundation.is-ready {
    transform: translateY(0);
  }

  .fc-context-nav--foundation::after {
    left: calc(50vw - max(14px, env(safe-area-inset-left)));
  }
}

@media (max-width: 420px) {
  .fc-context-nav {
    height: 50px;
    gap: 8px;
  }

  .fc-context-nav__item {
    height: 44px;
    padding: 0 12px !important;
    font-size: 10px !important;
  }

  .fc-context-nav__home,
  .fc-context-nav__new {
    width: 44px;
    min-width: 44px;
    padding: 0 !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fc-context-nav,
  .fc-context-nav__item {
    transition: none !important;
  }

  .fc-context-nav--foundation,
  .fc-context-nav--foundation .fc-context-nav__item {
    transition-duration: var(--fc-motion-instant, .001ms) !important;
  }
}

@media print {
  .fc-context-nav {
    display: none !important;
  }
}
