.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  min-height: 68px;
  padding: 8px clamp(16px, 2vw, 32px);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 20px;
  background: #111313f5;
  backdrop-filter: blur(12px);
}

.app-primary-navigation,
.app-mobile-navigation {
  display: flex;
  align-items: center;
}

.app-primary-navigation {
  min-width: 0;
  justify-content: center;
  gap: 4px;
}

.app-nav-item {
  min-width: 0;
  min-height: 40px;
  padding: 7px 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid transparent;
  border-radius: 4px;
  color: #aaa69f;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.app-nav-item svg,
.topbar-nav svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  stroke-width: 1.8;
}

.app-nav-item:hover {
  border-color: #4a453b;
  background: #1b1c1c;
  color: #eee8dc;
}

.app-nav-item.is-active {
  border-color: #78633e;
  background: #242019;
  color: #edcf87;
}

.topbar-nav {
  gap: 6px;
}

.topbar-nav .hub-link,
.topbar-nav button {
  min-height: 38px;
  padding: 6px 9px;
  gap: 6px;
  border-color: #504736;
  background: #191816;
  font-size: 13px;
}

.app-mobile-navigation {
  display: none;
}

@media (max-width: 1180px) and (min-width: 900px) {
  .topbar {
    gap: 10px;
  }
  .brand-block .eyebrow {
    display: none;
  }
  .app-primary-navigation {
    gap: 0;
  }
  .app-nav-item {
    padding-inline: 8px;
  }
  .topbar-nav span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }
  .topbar-nav .hub-link,
  .topbar-nav button {
    width: 38px;
    padding: 0;
  }
}

@media (max-width: 899px) {
  body {
    padding-bottom: calc(64px + env(safe-area-inset-bottom));
  }

  .topbar {
    min-height: 58px;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    padding: 6px 12px;
  }

  .brand-logo {
    width: 36px;
    height: 36px;
  }

  .brand-block .eyebrow {
    display: none;
  }

  .brand-block h1 {
    font-size: 20px;
  }

  .app-primary-navigation {
    display: none;
  }

  .topbar-nav .hub-link,
  .topbar-nav button {
    width: 38px;
    height: 38px;
    padding: 0;
  }

  .topbar-nav span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }

  .app-mobile-navigation {
    position: fixed;
    z-index: 40;
    right: 0;
    bottom: 0;
    left: 0;
    height: calc(64px + env(safe-area-inset-bottom));
    padding: 4px 6px env(safe-area-inset-bottom);
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    border-top: 1px solid #5b4c34;
    background: #111313f7;
    backdrop-filter: blur(14px);
  }

  .app-mobile-navigation .app-nav-item {
    min-height: 56px;
    padding: 4px 2px;
    flex-direction: column;
    gap: 2px;
    border: 0;
    font-size: 11px;
  }

  .app-mobile-navigation .app-nav-item svg {
    width: 20px;
    height: 20px;
  }

  .app-mobile-navigation .app-nav-item.is-active {
    background: transparent;
    color: #edcf87;
  }

  .deck-detail {
    padding-bottom: 24px;
  }
}