/* Shared top chrome: App Store bar + mobile hamburger. */

html.app-bar-hidden .app-bar {
  display: none;
}

.app-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.35rem 0.35rem 0.35rem clamp(0.65rem, 3vw, 1.25rem);
  background: linear-gradient(180deg, #fff8e6 0%, #fffdf7 100%);
  border-bottom: 1px solid rgba(188, 162, 49, 0.4);
  color: var(--ink);
}

.app-bar-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  min-width: 0;
  flex: 1;
  padding: 0.15rem 0.5rem;
  color: inherit;
  text-decoration: none;
}

.app-bar-link:hover {
  background: linear-gradient(180deg, #fff3d4 0%, #fff8e6 100%);
}

.app-bar-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  flex-shrink: 0;
}

.app-bar-close:hover,
.app-bar-close:focus-visible {
  color: var(--ink);
}

.app-bar-close svg {
  width: 18px;
  height: 18px;
}

.app-bar-icon {
  width: 40px;
  height: 40px;
  max-width: none;
  border-radius: 9px;
  flex-shrink: 0;
  box-shadow: 0 1px 2px rgba(20, 18, 14, 0.18);
}

.app-bar-copy {
  display: flex;
  flex-direction: column;
  gap: 0.08rem;
  min-width: 0;
}

.app-bar-copy strong {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  line-height: 1.25;
}

.app-bar-sub {
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.app-bar-badge {
  height: 32px;
  width: auto;
  max-width: none;
  flex-shrink: 0;
}

.header-nav {
  position: relative;
}

.nav-panel {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(188, 162, 49, 0.45);
  background: linear-gradient(180deg, #fffdf7 0%, var(--ivory) 100%);
  color: var(--gold-deep);
  cursor: pointer;
}

.nav-toggle:hover {
  border-color: rgba(188, 162, 49, 0.75);
  box-shadow: 0 6px 18px rgba(20, 18, 14, 0.06);
}

.nav-toggle svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.nav-toggle .nav-toggle-close {
  display: none;
}

.header-nav.is-open .nav-toggle .nav-toggle-open {
  display: none;
}

.header-nav.is-open .nav-toggle .nav-toggle-close {
  display: block;
}

@media (min-width: 901px) {
  .nav-from-home {
    display: none !important;
  }
}

@media (max-width: 900px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav-panel {
    display: none;
    position: absolute;
    top: calc(100% + 0.7rem);
    right: 0;
    z-index: 60;
    min-width: 16.75rem;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 0;
    padding: 0.35rem 0;
    background: var(--ivory);
    border: 1px solid var(--line);
    box-shadow: 0 14px 36px rgba(20, 18, 14, 0.12);
  }

  .header-nav.is-open .nav-panel {
    display: flex;
  }

  .nav-panel a {
    padding: 0.85rem 1.15rem;
  }

  .nav-panel a:hover,
  .nav-panel a:focus-visible {
    background: #fff8e6;
    color: var(--gold-deep);
  }
}

@media (max-width: 560px) {
  .app-bar {
    gap: 0.15rem;
    padding: 0.3rem 0.15rem 0.3rem 0.65rem;
    justify-content: flex-start;
  }

  .app-bar-link {
    gap: 0.55rem;
    justify-content: flex-start;
    padding: 0.1rem 0.25rem;
  }

  .app-bar-sub {
    display: none;
  }

  .app-bar-copy strong {
    font-size: 0.68rem;
  }

  .app-bar-badge {
    height: 28px;
    margin-left: auto;
  }

  .app-bar-icon {
    width: 32px;
    height: 32px;
    border-radius: 7px;
  }
}
