/* Frequent destinations stay labelled; secondary destinations share disclosures. */
#game-shell .topbar {
  gap: 8px;
  padding-inline: 10px;
  overflow: visible;
}
/* A child popup cannot escape the HUD's stacking context. Raise its navbar
   while open, above the panel switch/chat and below drawer backdrops (20+). */
#game-shell .topbar:has([data-navigation-disclosure][aria-expanded="true"]) {
  z-index: 19;
}
.topbar .brand,
.topbar .top-right {
  flex: none;
}
#game-shell .topbar .navbar-brand-logo.ui-pixel-icon {
  position: relative;
  display: block;
  flex: none;
  width: var(--ui-pixel-inline-size, 56px);
  height: 40px;
}
.navbar-brand-logo > img {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 56px;
  height: 56px;
  transform: translate(-50%, -50%);
  object-fit: contain;
  image-rendering: pixelated;
}
.navbar-discord-link {
  flex: none;
  width: 36px;
  height: 36px;
  padding: 0;
  text-decoration: none;
}
.navbar-discord-link .ui-icon {
  width: 18px;
  height: 18px;
}
.icon-discord {
  --ui-icon: url("/_assets/b88d45443fa2dbfe501f/icons/discord.svg");
}
.navbar-view-controls {
  display: flex;
  align-items: center;
  flex: none;
  gap: 4px;
}
.navbar-view-trigger {
  flex: none;
  width: 36px;
  height: 36px;
  padding: 0;
  font-size: 24px;
  line-height: 1;
}
.navbar-view-trigger .icon-settings {
  width: 28px;
  height: 28px;
}
#game-shell .topbar .navbar-menu #display-settings-open {
  padding-block: 2px;
  column-gap: var(--ui-space-2);
}
.navbar-view-menu .hud-visibility[aria-pressed="false"] .navbar-view-show,
.navbar-view-menu .hud-visibility[aria-pressed="true"] .navbar-view-hide {
  display: none !important;
}
.topbar .top-actions,
.navbar-secondary,
#navbar-desktop-slot,
#navbar-shop-slot,
#navbar-trainer-slot {
  display: flex;
  align-items: center;
  gap: 2px;
  min-width: 0;
}
.navbar-secondary,
#navbar-desktop-slot,
#navbar-shop-slot,
#navbar-trainer-slot,
.navbar-group {
  flex: none;
}
#game-shell .topbar .nav-button {
  position: relative;
  flex: none;
  min-width: 36px;
  height: 36px;
  padding-inline: 8px;
  gap: 6px;
  font: 600 12px/1.2 var(--ui-font-body);
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
}
.topbar .nav-button .nav-label,
.topbar #nav-hunt-label {
  display: block !important;
  max-width: none;
  font-size: inherit;
}
.topbar :is(#nav-inventory, #nav-shop, #nav-pokepedia) {
  display: flex;
}
/* Supersede the old phone-only omission; the more specific online account
   policy still hides developer destinations in online sessions. */
.topbar #nav-moves,
.topbar #nav-debug {
  display: flex;
  margin-right: 0;
}
.topbar .ui-notification-badge:not([hidden]) {
  display: inline-flex !important;
}
.topbar [data-navbar-notification] {
  top: -5px;
  height: 16px;
  min-width: 16px;
  font-size: 9px;
}
.topbar #nav-trainer .nav-label {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.navbar-ruby-icon {
  flex: none;
  width: 20px;
  height: 20px;
  object-fit: contain;
  image-rendering: pixelated;
}
.topbar #nav-shop .navbar-ruby-icon {
  width: 24px;
  height: 24px;
}
.navbar-chevron {
  flex: none;
  width: 12px;
  height: 12px;
  color: var(--ui-color-text-muted);
}
.navbar-group-trigger[aria-expanded="true"] {
  color: var(--ui-color-primary-hover);
  border-color: var(--ui-color-primary);
  background: color-mix(in srgb, var(--ui-color-primary) 12%, transparent);
}
.navbar-group-trigger[aria-expanded="true"] .navbar-chevron {
  transform: rotate(180deg);
}
.navbar-menu {
  --ui-navigation-width: 192px;
  position: absolute;
  z-index: 12;
  display: grid;
  align-content: start;
  gap: 2px;
  padding: 4px;
  border: 1px solid var(--ui-color-border);
  background: var(--ui-color-surface-raised);
  color: var(--ui-color-text);
  box-shadow: 0 8px 24px #0008;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--ui-color-border) transparent;
}
#game-shell .topbar .navbar-menu .nav-button {
  width: 100%;
  min-height: 32px;
  height: 32px;
  justify-content: flex-start;
  padding: 6px;
  text-align: left;
}
.navbar-menu .ui-notification-badge {
  top: 3px;
  right: 3px;
}
.navbar-group-heading {
  display: none;
  margin: 0;
  color: var(--ui-color-text-muted);
  font: 600 12px/1.2 var(--ui-font-body);
}
.topbar .navbar-menu-trigger {
  display: none;
}
.navbar-menu-trigger .icon-menu {
  -webkit-mask: none;
  mask: none;
  background:
    linear-gradient(currentColor, currentColor) left top / 100% 2px no-repeat,
    linear-gradient(currentColor, currentColor) left center / 100% 2px no-repeat,
    linear-gradient(currentColor, currentColor) left bottom / 100% 2px no-repeat;
  height: 14px;
}
.navbar-compact-menu {
  --ui-navigation-width: 304px;
}
.topbar[data-navbar-layout="compact"] {
  height: 56px;
}
.topbar[data-navbar-layout="compact"] .brand,
.topbar[data-navbar-layout="compact"] .top-right,
.topbar[data-navbar-layout="compact"] #navbar-desktop-slot {
  display: none;
}
.topbar[data-navbar-layout="compact"] .top-actions {
  justify-content: flex-start;
  gap: 4px;
}
.topbar[data-navbar-layout="compact"] .navbar-view-trigger {
  width: 44px;
  height: 44px;
}
.topbar[data-navbar-layout="compact"] .navbar-menu-trigger {
  display: flex;
  margin-left: auto;
}
#game-shell .topbar[data-navbar-layout="compact"] .top-actions > .nav-button {
  height: 44px;
}
#game-shell
  .topbar[data-navbar-layout="compact"]
  .navbar-group--primary
  > .navbar-group-trigger {
  height: 44px;
}
.topbar[data-navbar-layout="compact"] .navbar-secondary {
  display: grid;
  align-items: stretch;
  gap: 4px;
  width: 100%;
}
.topbar[data-navbar-layout="compact"] .navbar-secondary .navbar-group-trigger {
  display: none;
}
.topbar[data-navbar-layout="compact"]
  .navbar-secondary
  .navbar-group
  > .navbar-menu {
  position: static;
  width: auto !important;
  max-height: none !important;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}
.topbar[data-navbar-layout="compact"] .navbar-secondary .navbar-group-heading {
  display: block;
  padding: 8px 10px 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#game-shell .topbar[data-navbar-layout="compact"] .navbar-menu .nav-button {
  min-height: 44px;
  height: 44px;
  padding: 8px;
}
.topbar[data-navbar-layout="compact"] .navbar-group + .navbar-group,
.topbar[data-navbar-layout="compact"] #nav-pokepedia,
.topbar[data-navbar-layout="compact"] [data-navbar-group="tools"] {
  border-top: 1px solid var(--ui-color-border-subtle);
}
.hunt-menu-head {
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--ui-space-2);
}
#nav-center,
#nav-depot,
#nav-breeding {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--ui-space-2);
  white-space: nowrap;
}
@media (min-width: 841px) and (max-width: 1100px) {
  #game-shell .topbar {
    padding-inline: 8px;
  }
  .topbar[data-navbar-layout="desktop"] .top-right {
    gap: 3px;
  }
  #game-shell
    .topbar[data-navbar-layout="desktop"]
    :is(
      .top-actions > .nav-button,
      .navbar-group-trigger,
      #nav-shop,
      #nav-pokepedia
    ) {
    padding-inline: 5px;
  }
  .topbar #nav-trainer .nav-label {
    max-width: 72px;
  }
}
@media (max-width: 700px) {
  #game-shell .topbar {
    gap: 0;
    padding-inline: 4px;
  }
  .topbar[data-navbar-layout="compact"] .top-actions {
    gap: 2px;
    width: auto;
  }
  .topbar[data-navbar-layout="compact"] .navbar-group--primary {
    flex: 1 1 auto;
    min-width: 0;
  }
  .topbar[data-navbar-layout="compact"]
    .navbar-group--primary
    > .navbar-group-trigger {
    width: 100%;
  }
  #game-shell
    .topbar[data-navbar-layout="compact"]
    :is(
      .top-actions > .nav-button,
      .navbar-group--primary > .navbar-group-trigger
    ) {
    flex: 1 1 auto;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    padding: 2px;
    gap: 3px;
    font-size: 10px;
  }
  #game-shell .topbar[data-navbar-layout="compact"] #nav-shop {
    padding: 0;
    gap: 0;
  }
  .topbar[data-navbar-layout="compact"] #nav-shop .nav-label {
    white-space: normal;
    line-height: 1;
  }
  .topbar[data-navbar-layout="compact"] .navbar-menu-trigger {
    margin-left: 0;
  }
}
@media (max-width: 359px) {
  #game-shell
    .topbar[data-navbar-layout="compact"]
    :is(
      .top-actions > .nav-button,
      .navbar-group--primary > .navbar-group-trigger
    ) {
    font-size: 9px;
  }
}
@media (max-height: 500px) and (min-width: 521px) {
  .topbar[data-navbar-layout="compact"] {
    height: 48px;
  }
}
@media (any-pointer: coarse) {
  #game-shell .topbar .navbar-menu .nav-button {
    min-height: 44px;
    height: 44px;
    padding: 8px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .topbar .nav-button,
  .navbar-chevron {
    transition: none;
  }
}
.icon-notices {
  --ui-icon: url("/_assets/b88d45443fa2dbfe501f/icons/bell.svg");
}

#nav-notices {
  position: relative;
}

/* Reserve visible physical bounds horizontally; the approved raster stays 36. */
#game-shell .topbar .ui-pixel-icon {
  width: var(--ui-pixel-inline-size, 36px);
}
#game-shell .topbar .nav-button:has(.ui-pixel-icon) {
  column-gap: var(--ui-space-1);
}
/* Menu rows use their own logical thumbnails, including image-load fallback. */
#game-shell .topbar .navbar-menu .ui-pixel-icon,
#game-shell .topbar .navbar-menu .ui-pixel-icon > img {
  width: 28px;
  height: 28px;
}
#game-shell .topbar .navbar-menu .nav-button:has(> .ui-pixel-icon) {
  padding-block: 2px;
  column-gap: var(--ui-space-2);
}
/* The compact Menu trigger leaves room for every primary destination label. */
#game-shell .topbar #nav-menu > .ui-pixel-icon,
#game-shell .topbar #nav-menu > .ui-pixel-icon > img {
  width: 24px;
  height: 24px;
}
/* Keep the existing label-to-chevron intervals within the visible group. */
#game-shell .topbar :is(#nav-pokemon, #nav-commerce, #nav-combats) > .navbar-chevron {
  margin-left: -2px;
}
#game-shell .topbar #nav-trainer:has(.ui-pixel-icon) > .navbar-chevron {
  margin-left: 2px;
}
#game-shell .topbar[data-navbar-layout="desktop"] :is(#nav-pokemon, #nav-hunt, #nav-commerce, #nav-inventory, #nav-combats, #nav-guild, #nav-ranking, #nav-pokepedia, #nav-tools, #nav-trainer),
#game-shell .topbar[data-navbar-layout="desktop"] .navbar-secondary > #nav-battle-pass {
  padding-inline: var(--ui-space-1);
}
/* Link de afiliado keeps its 28px menu art; Game Pass uses its own 36px grid. */
#game-shell .topbar #nav-affiliates > .ui-pixel-icon,
#game-shell .topbar #nav-affiliates > .ui-pixel-icon > img {
  width: 28px;
  height: 28px;
}
#game-shell .topbar .navbar-secondary > #nav-battle-pass > .ui-pixel-icon {
  width: var(--ui-pixel-inline-size, 36px);
  height: 36px;
}
#game-shell .topbar .navbar-secondary > #nav-battle-pass > .ui-pixel-icon > img {
  width: 36px;
  height: 36px;
}
#game-shell .topbar[data-navbar-layout="desktop"] :is(.top-actions, .navbar-secondary, #navbar-desktop-slot, #navbar-shop-slot, #navbar-trainer-slot) {
  gap: var(--ui-space-2);
}
@media (max-width: 700px) {
  /* The 36px grid plus a 12px label must fit inside the hover target. */
  #game-shell .topbar[data-navbar-layout="compact"] {
    min-height: 56px;
  }
  #game-shell .topbar[data-navbar-layout="compact"] :is(.top-actions > .nav-button, .navbar-group--primary > .navbar-group-trigger) {
    height: 52px;
  }
  #game-shell .topbar[data-navbar-layout="compact"] :is(.top-actions > .nav-button, .navbar-group--primary > .navbar-group-trigger):has(> .ui-pixel-icon) {
    padding-block: 0;
    row-gap: 0;
  }
  #game-shell .topbar[data-navbar-layout="compact"] :is(.top-actions > .nav-button, .navbar-group--primary > .navbar-group-trigger) > .ui-pixel-icon {
    width: 36px;
    height: 36px;
  }
  .topbar[data-navbar-layout="compact"] :is(#nav-pokemon, #nav-hunt, #nav-shop) .nav-label {
    flex-shrink: 0;
  }
  .topbar[data-navbar-layout="compact"] #nav-pokemon .navbar-chevron {
    position: absolute;
    right: 3px;
    bottom: 4px;
    width: 8px;
    height: 8px;
  }
}

/* Keep the native icon grid, but place phone labels beside it to free height. */
@media (max-width: 650px) {
  #game-shell .topbar[data-navbar-layout="compact"] {
    top: 4px;
    height: 48px;
    min-height: 48px;
  }
  #game-shell
    .topbar[data-navbar-layout="compact"]
    :is(
      .top-actions > .nav-button,
      .navbar-group--primary > .navbar-group-trigger
    ) {
    height: 44px;
    min-height: 44px;
    flex-direction: row;
    gap: 2px;
    padding: 2px;
    font-size: 10px;
  }
  #game-shell
    .topbar[data-navbar-layout="compact"]
    :is(#nav-pokemon, #nav-hunt, #nav-shop, #nav-menu)
    .nav-label {
    min-width: 0;
    flex-shrink: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.1;
  }
  #game-shell
    .topbar[data-navbar-layout="compact"]
    #nav-pokemon
    .navbar-chevron {
    position: static;
    margin-left: 0;
  }
}

/* Below the single-panel breakpoint, keep complete labels above the map even
   with the HUD eye. The native icon row is too wide for these five controls. */
@media (max-width: 430px) {
  #game-shell .topbar[data-navbar-layout="compact"] {
    height: 56px;
    min-height: 56px;
  }
  #game-shell
    .topbar[data-navbar-layout="compact"]
    :is(
      .top-actions > .nav-button,
      .navbar-group--primary > .navbar-group-trigger
    ) {
    height: 52px;
    min-height: 52px;
    flex-direction: column;
    row-gap: 0;
    font-size: 9px;
  }
  #game-shell
    .topbar[data-navbar-layout="compact"]
    :is(#nav-pokemon, #nav-hunt, #nav-shop, #nav-menu)
    .nav-label {
    flex-shrink: 0;
    max-width: 100%;
    overflow: visible;
    text-overflow: clip;
  }
  #game-shell .topbar[data-navbar-layout="compact"] .navbar-group--primary {
    min-width: 51px;
  }
  #game-shell .topbar[data-navbar-layout="compact"] #nav-pokemon .nav-label {
    padding-right: 10px;
  }
  #game-shell .topbar[data-navbar-layout="compact"] #nav-pokemon .navbar-chevron {
    position: absolute;
    right: 2px;
    bottom: 4px;
  }
  #game-shell .topbar[data-navbar-layout="compact"] #nav-hunt {
    min-width: 40px;
  }
  #game-shell .topbar[data-navbar-layout="compact"] #nav-shop {
    min-width: 55px;
  }
  #game-shell .topbar[data-navbar-layout="compact"] #nav-menu {
    min-width: 24px;
  }
}

/* The shared retro key owns the bevel; navbar rules own only its layout. */
#game-shell .topbar[data-navbar-layout] #nav-shop {
  display: grid;
  grid-template-columns: auto auto;
  grid-template-rows: 18px 16px;
  align-content: center;
  align-items: center;
  justify-content: center;
  column-gap: var(--ui-space-1);
  row-gap: 0;
  height: 40px;
  margin-bottom: 4px;
  padding: 0 8px;
  font: 400 18px/1 var(--ui-font-display);
}
#game-shell .topbar[data-navbar-layout] #nav-shop > .nav-icon {
  grid-column: 1;
  grid-row: 1 / 3;
}
.navbar-ruby-sale {
  grid-column: 2;
  grid-row: 1;
  justify-self: start;
  padding-inline: 3px;
  border: 1px solid var(--ui-color-background);
  background: var(--ui-color-on-primary);
  color: var(--ui-color-background);
  box-shadow: 1px 1px 0 var(--ui-retro-shade);
  font: 400 18px/16px var(--ui-font-display);
  text-shadow: none;
}
#game-shell .topbar[data-navbar-layout] #nav-shop .nav-label {
  grid-column: 2;
  grid-row: 2;
  padding: 0;
  font: 400 14px/16px var(--ui-font-display);
  white-space: nowrap;
}
/* Without a sale badge, the desktop label shares the icon's full-height area. */
@media (min-width: 651px) {
  #game-shell .topbar[data-navbar-layout] #nav-shop:has(.navbar-ruby-sale[hidden]) .nav-label {
    grid-row: 1 / 3;
  }
}
#game-shell .topbar[data-navbar-layout="compact"] #nav-shop {
  height: 44px;
}
@media (max-width: 650px) {
  #game-shell .topbar[data-navbar-layout="compact"] {
    height: 64px;
    min-height: 64px;
  }
  #game-shell .topbar[data-navbar-layout="compact"] #nav-shop {
    display: grid;
    grid-template-columns: auto auto;
    grid-template-rows: 36px 12px;
    align-content: center;
    justify-items: center;
    column-gap: 0;
    row-gap: 0;
    height: 52px;
    padding-inline: 2px;
  }
  #game-shell .topbar[data-navbar-layout="compact"] #nav-shop > .nav-icon {
    grid-row: 1;
    width: var(--ui-pixel-inline-size, 36px);
  }
  .navbar-ruby-sale {
    padding-inline: 2px;
    font-size: 16px;
  }
  #game-shell .topbar[data-navbar-layout="compact"] #nav-shop .nav-label {
    grid-column: 1 / 3;
    font-size: 12px;
    line-height: 12px;
  }
}
@media (max-width: 430px) {
  #game-shell .topbar[data-navbar-layout="compact"] #nav-shop .nav-label {
    font-size: 11px;
  }
}
@media (max-width: 299px) {
  #game-shell .topbar[data-navbar-layout="compact"] #nav-shop {
    padding-inline: 0;
  }
  #game-shell .topbar[data-navbar-layout="compact"] #nav-shop .nav-label {
    font-size: 10px;
  }
  .navbar-ruby-sale {
    padding-inline: 0;
    font-size: 14px;
  }
}
@media (max-width: 259px) {
  .navbar-ruby-sale {
    font-size: 10px;
    line-height: 12px;
  }
}
/* Game Pass remains a direct destination when secondary groups enter Menu. */
.topbar #navbar-game-pass-slot {
  display: flex;
  flex: none;
  align-items: center;
}
.topbar #navbar-game-pass-slot:empty { display: none; }
#game-shell .topbar #nav-battle-pass > .ui-pixel-icon {
  width: var(--ui-pixel-inline-size, 36px);
  height: 36px;
}
#game-shell .topbar #nav-battle-pass > .ui-pixel-icon > img {
  width: 36px;
  height: 36px;
}
@media (max-width: 840px) {
  #game-shell .topbar[data-navbar-layout="compact"] #nav-battle-pass {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 50px;
    height: 52px;
    padding: 0 2px;
    gap: 0;
    font-size: 9px;
  }
  #game-shell .topbar[data-navbar-layout="compact"] #nav-battle-pass .nav-label {
    white-space: nowrap;
    line-height: 1.1;
  }
}
