.top {
  background: linear-gradient(125deg, #172e23, #111c17 60%);
  border-bottom-color: #7b6847;
}
.top .brand { gap: .55rem; }
.top .mark { background: #213c2c; }
#navigation { flex-wrap: nowrap; gap: .4rem; }
.header-menu { position: relative; }
.nav-item, #wallet-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  min-height: 2.75rem;
  padding: .45rem .65rem;
  border: 1px solid transparent;
  border-bottom-width: 2px;
  border-radius: .45rem;
  color: #f3ead7;
}
.header-menu > summary { cursor: pointer; list-style: none; }
.header-menu > summary::-webkit-details-marker { display: none; }
#play-menu > summary::after { content: '⌄'; color: var(--gold); }
.nav-item:hover, #wallet-link:hover { background: #254335; }
#navigation .nav-item[aria-current], #play-menu.current-game > summary, #wallet-link[aria-current] {
  background: #284538;
  border-bottom-color: var(--gold);
  color: var(--gold);
}
.header-dropdown {
  position: absolute;
  top: calc(100% + .35rem);
  right: 0;
  z-index: 16;
  display: grid;
  min-width: 12rem;
  width: max-content;
  padding: .4rem;
  gap: .2rem;
  border: 1px solid #807254;
  border-radius: .55rem;
  background: #172c22;
  box-shadow: 0 .4rem 1.2rem #0a140e;
}
#play-menu .play-menu-links { top: calc(100% + .35rem); right: auto; left: 0; z-index: 16; }
.header-dropdown a, .header-dropdown button { min-height: 2.75rem; border-radius: .35rem; }
.header-dropdown a { display: flex; align-items: center; gap: .5rem; }
.header-dropdown a:hover, .header-dropdown a[aria-current] { background: #284538; }
#nav-current-table { margin: .15rem .5rem .35rem; max-width: 18rem; color: var(--gold); font-size: .85rem; }
#nav-table-desktop {
  display: block;
  max-width: 8rem;
  font-size: .7rem;
  line-height: 1.2;
}
#account { gap: .25rem; }
.wallet-summary { font-size: .85rem; }
.wallet-summary small { max-width: 12rem; }

@media (max-width: 58rem) {
  body:has(#navigation:not([hidden])) {
    --club-bar: calc(3.7rem + env(safe-area-inset-bottom, 0px));
    padding-bottom: var(--club-bar);
  }
  .top { gap: .4rem .7rem; padding: .55rem 1rem; }
  .top .brand { font-size: 1.2rem; }
  .top .brand small { font-size: .7rem; }
  #navigation {
    position: fixed;
    z-index: 15;
    inset: auto 0 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    padding: .25rem .4rem calc(.25rem + env(safe-area-inset-bottom, 0px));
    background: #15291f;
    border-top: 1px solid #897454;
  }
  #navigation .nav-item { width: 100%; flex-direction: column; gap: .05rem; padding: .2rem; font-size: .82rem; min-height: 3.1rem; }
  #play-menu > summary::after, #nav-table-desktop { display: none; }
  #play-menu .play-menu-links { top: auto; bottom: calc(100% + .45rem); left: 0; width: min(15rem, 67vw); }
  #wallet-link { padding: .35rem; }
  #mobile-chat { bottom: calc(.65rem + var(--club-bar, 0px)); }
  #chat.mobile-chat-open { bottom: calc(3.9rem + var(--club-bar, 0px)); }
  .mobile-actions, .race-own { bottom: calc(3.65rem + var(--club-bar, 0px)); }
}
