/* ═══════════════════════════════════════════════════════════
   Header — premium product bar
   Apple / Nike discipline: filled, precise, never cluttered
   ═══════════════════════════════════════════════════════════ */

.glass-navbar .glass-content {
  display: block;
  padding: 0;
  min-height: 0;
}

#nav.glass-navbar {
  overflow: visible;
  contain: none;
}
#nav.glass-navbar > .glass-bg,
#nav.glass-navbar > .glass-bg-chrome { border-radius: inherit; }

.nav-shell {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(14px, 2vw, 32px);
  min-height: 58px;
  padding: 8px clamp(16px, 2.4vw, 28px);
  width: 100%;
  box-sizing: border-box;
}

.glass-navbar.glass-navbar-scrolled .nav-shell {
  min-height: 58px;
  padding: 8px clamp(16px, 2.4vw, 28px);
}

/* ── Brand ──────────────────────────────────────────────── */
.nav-zone-brand {
  justify-self: start;
  min-width: 0;
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  margin: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  min-height: 34px;
  transition: opacity 0.2s ease;
}
.nav-brand:hover { opacity: 0.88; }
.nav-brand .cb-brand { align-items: center; }

.nav-brand-text {
  font-family: var(--font-display, var(--font-ui));
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: oklch(0.96 0.01 260);
  white-space: nowrap;
}

/* ── Center product tabs ────────────────────────────────── */
.nav-zone-tabs {
  justify-self: center;
  min-width: 0;
  width: 100%;
  max-width: 720px;
  display: flex;
  justify-content: center;
}

.nav-tab-track {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  max-width: 100%;
  padding: 4px;
  border-radius: 980px;
  background:
    linear-gradient(180deg, oklch(1 0 0 / 0.06), oklch(0 0 0 / 0.18));
  box-shadow:
    inset 0 1px 0 oklch(1 0 0 / 0.1),
    inset 0 0 0 1px oklch(1 0 0 / 0.06),
    0 8px 24px oklch(0 0 0 / 0.18);
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.nav-tab-track::-webkit-scrollbar { display: none; }

.nav-link-pill {
  position: absolute;
  top: 4px;
  left: 4px;
  z-index: 0;
  border-radius: 980px;
  pointer-events: none;
  opacity: 0;
  background:
    linear-gradient(180deg, oklch(1 0 0 / 0.18), oklch(1 0 0 / 0.08));
  box-shadow:
    inset 0 1px 0 oklch(1 0 0 / 0.28),
    0 2px 8px oklch(0 0 0 / 0.2);
  transition:
    left 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    top 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    width 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    height 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.2s ease;
  will-change: left, width, height;
}

.nav-tab {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 34px;
  padding: 0 13px;
  border: none;
  border-radius: 980px;
  background: transparent;
  font-family: var(--font-ui);
  font-size: 12.5px;
  font-weight: 550;
  letter-spacing: -0.02em;
  color: oklch(0.72 0.012 260);
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}
.nav-tab:hover { color: oklch(0.95 0.01 260); }
.nav-tab.act {
  color: #fff;
  font-weight: 650;
}

.nav-tab-label--short { display: none; }

.nav-tab .quest-nav-dot {
  position: static;
  top: auto;
  right: auto;
  min-width: 16px;
  height: 16px;
  padding: 0 5px;
  font-size: 9px;
  font-weight: 700;
  background: #0a84ff;
  box-shadow: 0 2px 6px oklch(0.5 0.16 250 / 0.4);
  animation: none;
  transform: none;
}

/* Missions — gold medallion star (Nike/Apple product accent) */
.nav-tab--mission {
  gap: 7px;
  padding-left: 10px;
}
.nav-mission-ico {
  position: relative;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: #ffd60a;
  background:
    radial-gradient(circle at 32% 28%, oklch(1 0 0 / 0.45), transparent 50%),
    linear-gradient(160deg, oklch(0.35 0.04 80), oklch(0.2 0.03 80));
  box-shadow:
    inset 0 1px 0 oklch(1 0 0 / 0.2),
    0 0 0 1px oklch(0.8 0.14 85 / 0.25),
    0 2px 8px oklch(0 0 0 / 0.25);
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.22s ease, filter 0.2s ease;
}
.nav-mission-ico__star {
  display: block;
  filter: drop-shadow(0 1px 2px oklch(0 0 0 / 0.35));
}
.nav-tab--mission:hover .nav-mission-ico {
  transform: scale(1.06);
  box-shadow:
    inset 0 1px 0 oklch(1 0 0 / 0.28),
    0 0 0 1px oklch(0.85 0.14 85 / 0.4),
    0 4px 12px oklch(0.7 0.14 85 / 0.25);
}
.nav-mission-ico.is-on {
  color: #1c1200;
  background:
    radial-gradient(circle at 32% 28%, oklch(1 0 0 / 0.55), transparent 48%),
    linear-gradient(160deg, #ffd60a, #ff9f0a 60%, #ff6b00);
  box-shadow:
    inset 0 1px 0 oklch(1 0 0 / 0.45),
    0 0 0 1.5px oklch(0.85 0.14 85 / 0.45),
    0 4px 14px oklch(0.7 0.16 55 / 0.4);
}
.nav-tab--mission.act {
  color: #ffd60a;
}
.nav-mission-ico__badge {
  position: absolute;
  top: -5px;
  right: -6px;
  min-width: 14px;
  height: 14px;
  padding: 0 3px;
  border-radius: 99px;
  display: grid;
  place-items: center;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #1c1200;
  background: linear-gradient(180deg, #fff1a8, #ffd60a);
  box-shadow:
    0 0 0 1.5px oklch(0.12 0.02 260),
    0 2px 6px oklch(0.7 0.14 80 / 0.45);
  line-height: 1;
}
.nav-mission-ico.has-pending {
  animation: nav-mission-pulse 2.2s ease-in-out infinite;
}
@keyframes nav-mission-pulse {
  0%, 100% { box-shadow: inset 0 1px 0 oklch(1 0 0 / 0.2), 0 0 0 1px oklch(0.8 0.14 85 / 0.25), 0 2px 8px oklch(0 0 0 / 0.25); }
  50% { box-shadow: inset 0 1px 0 oklch(1 0 0 / 0.2), 0 0 0 3px oklch(0.85 0.14 85 / 0.2), 0 4px 14px oklch(0.75 0.14 85 / 0.3); }
}
.nav-mission-ico.is-on.has-pending {
  animation: none;
}

/* ── Actions — filled, premium, ordered ─────────────────── */
.nav-zone-actions {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.nav-action-sep {
  width: 1px;
  height: 22px;
  margin: 0 2px;
  background: oklch(1 0 0 / 0.12);
  flex-shrink: 0;
}

.nav-hud {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 4px 3px 3px;
  border-radius: 980px;
  background: oklch(1 0 0 / 0.05);
  border: 1px solid oklch(1 0 0 / 0.08);
  box-shadow: inset 0 1px 0 oklch(1 0 0 / 0.06);
}

.nav-hud .xp-hud {
  background: transparent;
  border: none;
  padding: 0 6px 0 0;
  gap: 8px;
  cursor: pointer;
}
.nav-hud .xp-hud:hover { border: none; }

/* Missions level medallion — beside the speaker */
.nav-hud .xp-badge {
  position: relative;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
  font-family: var(--font-ui);
}
.nav-hud .xp-badge__ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.nav-hud .xp-badge__ring-track,
.nav-hud .xp-badge__ring-prog {
  fill: none;
  stroke-width: 2.4;
}
.nav-hud .xp-badge__ring-track {
  stroke: oklch(1 0 0 / 0.12);
}
.nav-hud .xp-badge__ring-prog {
  stroke: url(#xpRingGrad);
  stroke: #ffd60a;
  stroke-linecap: round;
  stroke-dasharray: 97.4;
  transition: stroke-dashoffset 0.55s cubic-bezier(0.22, 1, 0.36, 1);
  filter: drop-shadow(0 0 3px oklch(0.8 0.14 85 / 0.45));
}
.nav-hud .xp-badge__core {
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #1c1200;
  background:
    radial-gradient(circle at 32% 28%, oklch(1 0 0 / 0.55), transparent 48%),
    linear-gradient(160deg, #ffd60a, #ff9f0a 55%, #ff6b00);
  box-shadow:
    inset 0 1px 0 oklch(1 0 0 / 0.45),
    inset 0 -2px 4px oklch(0.5 0.12 45 / 0.35),
    0 3px 10px oklch(0.65 0.14 55 / 0.4);
}
.nav-hud .xp-badge__star {
  position: absolute;
  width: 18px;
  height: 18px;
  fill: oklch(0.2 0.04 70 / 0.18);
  pointer-events: none;
}
.nav-hud .xp-badge__lvl {
  position: relative;
  z-index: 1;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  color: #1c1200;
  text-shadow: 0 1px 0 oklch(1 0 0 / 0.25);
}
.nav-hud .xp-badge__dot {
  position: absolute;
  top: -3px;
  right: -3px;
  z-index: 2;
  min-width: 14px;
  height: 14px;
  padding: 0 3px;
  border-radius: 99px;
  display: grid;
  place-items: center;
  font-size: 8px;
  font-weight: 800;
  color: #1c1200;
  background: linear-gradient(180deg, #fff6c2, #ffd60a);
  box-shadow: 0 0 0 1.5px oklch(0.12 0.02 260), 0 2px 6px oklch(0.7 0.14 80 / 0.4);
}
.nav-hud .xp-hud:hover .xp-badge__core {
  filter: brightness(1.05);
  transform: scale(1.04);
}
.nav-hud .xp-hud.pulse .xp-badge__core {
  animation: hud-mission-pulse 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}
.nav-hud .xp-hud.has-pending .xp-badge__ring-prog {
  stroke: #ffd60a;
}
@keyframes hud-mission-pulse {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.12); }
  100% { transform: scale(1); }
}

.nav-hud .xp-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  padding-right: 4px;
}
.nav-hud .xp-title {
  font-family: var(--font-ui);
  font-size: 9.5px;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: oklch(0.7 0.015 260);
  max-width: 88px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nav-hud .xp-track {
  width: 72px;
  height: 4px;
  border-radius: 99px;
  background: oklch(1 0 0 / 0.1);
  overflow: hidden;
}
.nav-hud .xp-fill {
  background: linear-gradient(90deg, #30d158, #64d2ff);
}

.nav-hud .sfx-toggle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: oklch(1 0 0 / 0.05);
  border: none;
  color: oklch(0.78 0.01 260);
  transition: background 0.18s ease, color 0.18s ease;
}
.nav-hud .sfx-toggle:hover {
  background: oklch(1 0 0 / 0.1);
  color: #fff;
}

.nav-icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid oklch(1 0 0 / 0.1);
  background: oklch(1 0 0 / 0.05);
  color: oklch(0.88 0.01 260);
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
  transition: background 0.18s ease, transform 0.2s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.18s ease;
}
.nav-icon-btn:hover {
  background: oklch(1 0 0 / 0.1);
  border-color: oklch(1 0 0 / 0.16);
  transform: translateY(-1px);
}
.nav-icon-btn:active { transform: scale(0.94); }

.nav-cta {
  min-height: 34px;
  padding: 0 16px;
  border: none;
  border-radius: 980px;
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 650;
  letter-spacing: -0.02em;
  color: #fff;
  background: linear-gradient(180deg, #409cff, #0a84ff);
  box-shadow:
    inset 0 1px 0 oklch(1 0 0 / 0.32),
    0 6px 16px oklch(0.5 0.16 250 / 0.32);
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1), filter 0.15s ease;
}
.nav-cta:hover { filter: brightness(1.06); transform: translateY(-1px); }
.nav-cta:active { transform: scale(0.97); }

.nav-signin {
  min-height: 34px;
  padding: 0 14px;
  border-radius: 980px;
  border: 1px solid oklch(1 0 0 / 0.14);
  background: oklch(1 0 0 / 0.06);
  color: oklch(0.93 0.01 260);
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 560;
  letter-spacing: -0.015em;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease;
}
.nav-signin:hover {
  background: oklch(1 0 0 / 0.1);
  border-color: oklch(1 0 0 / 0.2);
}

.demo-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 10px;
  border: 1px solid oklch(0.8 0.14 85 / 0.35);
  border-radius: 980px;
  background: oklch(0.75 0.12 85 / 0.12);
  color: #ffd60a;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.02em;
  cursor: pointer;
}
.demo-pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ffd60a;
}

.nav-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(145deg, #64d2ff, #0a84ff);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  border: none;
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow:
    inset 0 1px 0 oklch(1 0 0 / 0.3),
    0 0 0 1px oklch(1 0 0 / 0.08);
}
.nav-avatar:hover { transform: scale(1.05); }
.nav-avatar.open {
  box-shadow:
    inset 0 1px 0 oklch(1 0 0 / 0.3),
    0 0 0 2px oklch(0.55 0.16 250 / 0.5);
}

.glass-navbar .glass-btn .glass-bg {
  box-shadow: inset 0 1px 0 oklch(1 0 0 / 0.28) !important;
}
.glass-navbar .glass-btn-solid .glass-bg {
  background: linear-gradient(180deg, #409cff, #0a84ff) !important;
}

.live-pill { display: none !important; }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 1280px) {
  .nav-tab-label--full { display: none; }
  .nav-tab-label--short { display: inline; }
  .nav-tab { padding: 0 11px; }
  .nav-zone-tabs { max-width: 560px; }
}

@media (max-width: 1100px) {
  .nav-hud .xp-meta { display: none; }
  .nav-hud { padding: 3px; gap: 4px; }
  .nav-cta { padding: 0 13px; }
}

@media (max-width: 900px) {
  .nav-action-sep { display: none; }
  .nav-icon-btn { display: none; }
}

@media (max-width: 768px) {
  .nav-shell {
    grid-template-columns: 1fr auto;
    min-height: 52px;
    padding: calc(6px + var(--safe-top, 0px)) var(--page-px, 16px) 6px;
    gap: 10px;
  }
  .glass-navbar.glass-navbar-scrolled .nav-shell {
    min-height: 52px;
    padding: calc(6px + var(--safe-top, 0px)) var(--page-px, 16px) 6px;
  }
  .nav-zone-tabs { display: none; }
  .nav-zone-brand { justify-self: start; }
  .nav-cta { min-height: 32px; font-size: 12.5px; padding: 0 12px; }
}

@media (max-width: 430px) {
  .nav-zone-actions { gap: 6px; }
  .nav-hud .sfx-toggle { width: 28px; height: 28px; }
  .nav-hud .xp-badge { width: 28px; height: 28px; }
  .nav-avatar { width: 32px; height: 32px; }
  .nav-cta span,
  .nav-cta { letter-spacing: -0.02em; }
}

/* ── Profile dropdown ───────────────────────────────────── */
.nav-profile { position: relative; }

.profile-dropdown-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 14px 10px;
}

.profile-dropdown-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
  background: linear-gradient(145deg, #64d2ff, #0a84ff);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 650;
  color: #fff;
  box-shadow: inset 0 1px 0 oklch(1 0 0 / 0.3);
}

.profile-dropdown-meta { min-width: 0; }

.profile-dropdown-name {
  font-size: 14px;
  font-weight: 650;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.02em;
  font-family: var(--font-ui);
}

.profile-dropdown-email {
  font-size: 11px;
  color: var(--text-faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}

.profile-dropdown-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
  align-items: center;
  min-width: 0;
  row-gap: 4px;
}
.profile-dropdown-badges .chip { font-size: 9px; }

.pstat-tier-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 980px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--tier);
  background: color-mix(in oklab, var(--tier) 16%, transparent);
  border: 1px solid color-mix(in oklab, var(--tier) 40%, transparent);
}

.profile-dropdown.glass-menu.glass-chrome,
.profile-dropdown.glass-menu.glass-chrome .glass-bg-chrome {
  background: oklch(0.14 0.02 260 / 0.97) !important;
}

.profile-dropdown {
  max-height: min(70vh, 520px);
  overflow-x: hidden;
  overflow-y: auto;
  width: min(268px, calc(100vw - 24px)) !important;
}

.profile-dropdown-head { min-width: 0; }
.profile-dropdown-name,
.profile-dropdown-email { max-width: 100%; }

.pstat.pstat--slim {
  padding: 8px 14px 12px;
  margin: 0 0 4px;
  border-top: 1px solid oklch(1 0 0 / 0.06);
  border-bottom: 1px solid oklch(1 0 0 / 0.06);
}

.pstat-bar {
  height: 3px;
  border-radius: 99px;
  background: oklch(1 0 0 / 0.07);
  overflow: hidden;
  margin-bottom: 8px;
}

.pstat-bar-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg,
    color-mix(in oklab, var(--tier) 55%, transparent),
    var(--tier));
  transition: width 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.pstat-slim-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.pstat-slim-item {
  font-size: 11px;
  color: var(--text-faint);
  white-space: nowrap;
}
.pstat-slim-item strong {
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  margin-right: 2px;
}
.pstat-slim-item--coin {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #ffd60a;
}
.pstat-slim-item--coin strong { color: #ffd60a; }

.pstat-rank, .pstat-tier, .pstat-coin, .pstat-grid, .pstat-next { display: none; }

.nav-ico {
  width: 22px;
  height: 22px;
  object-fit: contain;
  border-radius: 6px;
  display: block;
  opacity: 0.9;
  transition: opacity 0.16s ease, transform 0.16s ease;
}
.glass-menu-item:hover .nav-ico { opacity: 1; transform: scale(1.05); }

.glass-menu-item svg { color: var(--text-dim); transition: color 0.16s ease; }
.glass-menu-item:hover svg { color: #64d2ff; }

@media (prefers-reduced-motion: reduce) {
  .nav-link-pill { transition: none; }
  .nav-cta:hover, .nav-icon-btn:hover, .nav-avatar:hover { transform: none; }
  .nav-mission-ico.has-pending { animation: none; }
}
