.header-main {
  min-height: 70px;
  grid-template-columns: auto auto minmax(24px, 1fr) minmax(260px, 380px);
  justify-content: stretch;
  gap: 12px;
}

.brand-slot {
  grid-column: 1;
}

.site-logo {
  width: min(185px, 100%);
  max-height: 52px;
}

.header-quick-nav {
  grid-column: 2;
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  white-space: nowrap;
}

.header-quick-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 9px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 9px;
  background: rgba(17,27,40,.5);
  color: #cbd7e3;
  font-size: .75rem;
  font-weight: 760;
}

.header-quick-nav a:hover,
.header-quick-nav a:focus-visible {
  border-color: rgba(40,215,196,.32);
  color: var(--accent);
  background: rgba(40,215,196,.08);
}

.header-search {
  grid-column: 4;
  justify-self: end;
  width: min(380px, 100%);
  height: 40px;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  border-radius: 11px;
}

.header-search button {
  padding: 0 .78rem;
  font-size: .76rem;
}

.game-side-menu .games-menu-list {
  width: 100%;
  max-height: none;
  padding: 8px 7px 16px;
}

.game-side-menu .game-index-menu {
  grid-template-columns: 1fr;
}

.game-side-menu .games-menu-list a {
  padding: 8px 10px;
  border-radius: 9px;
  font-size: .78rem;
  line-height: 1.12;
}

@media (max-width: 1050px) {
  .header-main {
    grid-template-columns: auto auto minmax(220px, 1fr);
    gap: 8px;
  }

  .brand-slot { grid-column: 1; }
  .header-quick-nav { grid-column: 2; }
  .header-search { grid-column: 3; width: 100%; }

  .site-logo {
    width: min(165px, 100%);
  }

  .header-quick-nav a {
    padding-inline: 7px;
    font-size: .69rem;
  }
}

@media (max-width: 760px) {
  .header-main {
    min-height: 0;
    padding-block: 8px;
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }

  .brand-slot,
  .header-quick-nav,
  .header-search {
    grid-column: 1;
  }

  .brand-slot { grid-row: 1; }
  .header-quick-nav {
    grid-row: 2;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 1px;
  }
  .header-quick-nav::-webkit-scrollbar { display: none; }
  .header-search { grid-row: 3; width: 100%; height: 40px; }

  .site-logo {
    width: min(175px, 56vw);
    max-height: 44px;
  }

  .game-side-menu .games-menu-list { max-height: none; }
  .game-side-menu .game-index-menu { grid-template-columns: 1fr; }
}
