.global-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  display: flex;
  justify-content: space-around;
  gap: 0.2rem;
  padding: 0.35rem 0.5rem calc(0.5rem + env(safe-area-inset-bottom));
  background: rgba(16, 19, 26, 0.96);
  backdrop-filter: blur(16px);
  border-top: 1px solid #2a3140;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.35);
}

.global-nav a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: 52px;
  padding: 0.35rem 0.25rem;
  border-radius: 12px;
  text-decoration: none;
  color: #8b94a3;
  font-size: 0.7rem;
  font-weight: 500;
  line-height: 1.15;
  position: relative;
}

.global-nav a .ico { display: none; }

.global-nav a.active {
  color: #eef0f3;
  background: rgba(59, 130, 246, 0.15);
}

.global-nav a.active::before {
  content: "";
  position: absolute;
  top: 4px;
  left: 25%;
  right: 25%;
  height: 3px;
  border-radius: 99px;
  background: #3b82f6;
}

body.has-global-nav {
  padding-bottom: calc(72px + env(safe-area-inset-bottom));
}

.subnav {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  padding: 0.5rem 1rem;
  background: rgba(20, 24, 32, 0.85);
  border-bottom: 1px solid #2a3140;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.subnav::-webkit-scrollbar { display: none; }

.subnav button {
  flex: 0 0 auto;
  border: 1px solid #2a3140;
  background: #1a1f28;
  color: #8b94a3;
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  font-size: 0.8rem;
  cursor: pointer;
  min-height: 40px;
}

.subnav button.active {
  background: #3b82f6;
  border-color: #3b82f6;
  color: #fff;
}

.step-nav {
  display: flex;
  gap: 0.4rem;
  margin: 0 0 0.75rem;
  padding: 0;
}

.step-nav button {
  flex: 1;
  border: 1px solid #2a3140;
  background: #1a1f28;
  color: #8b94a3;
  padding: 0.65rem 0.4rem;
  border-radius: 10px;
  font-size: 0.72rem;
  min-height: 44px;
  line-height: 1.2;
}

.step-nav button.active {
  background: #3b82f6;
  border-color: #3b82f6;
  color: #fff;
}

.step-nav button.done {
  border-color: #22c55e;
  color: #a7f3d0;
}

.crumb {
  font-size: 0.75rem;
  color: #6b7280;
  padding: 0.35rem 1rem 0.5rem;
  margin: 0;
}

.crumb strong {
  color: #9ca3af;
  font-weight: 600;
}

@media (min-width: 900px) {
  body.has-global-nav {
    padding-bottom: 0;
    padding-left: 108px;
  }

  .global-nav {
    top: 0;
    bottom: 0;
    right: auto;
    width: 108px;
    flex-direction: column;
    justify-content: flex-start;
    padding: calc(0.85rem + env(safe-area-inset-top)) 0.5rem 1rem;
    gap: 0.35rem;
    border-top: none;
    border-right: 1px solid #2a3140;
    box-shadow: none;
  }

  .global-nav a {
    width: 100%;
    font-size: 0.74rem;
    min-height: 56px;
  }

  .global-nav a.active::before {
    top: auto;
    left: 4px;
    bottom: 25%;
    right: auto;
    width: 3px;
    height: 50%;
  }
}