.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  --accent-brass: #d2ad62;
  --header-line: rgba(255, 255, 255, 0.14);
  --menu-surface: #111c25;
  border-bottom: 1px solid var(--header-line);
  background: rgba(8, 15, 21, 0.88);
  backdrop-filter: blur(14px);
  -webkit-tap-highlight-color: rgba(210, 173, 98, 0.22);
}
.site-header .header-inner {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.site-header .brand {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 12px;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
}
.site-header .brand-mark {
  width: 42px;
  height: 42px;
  object-fit: cover;
  border-radius: 6px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.16);
}
.site-header .brand strong {
  display: block;
  font-size: 20px;
  line-height: 1.1;
}
.site-header .brand small {
  display: block;
  margin-top: 4px;
  color: #cfd8dc;
  font-size: 12px;
}
.site-header .navigation-panel {
  display: flex;
  flex: 1;
  min-width: 0;
  align-items: center;
  gap: 16px;
}
.site-header .site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-inline: auto;
}
.site-header .nav-group { position: relative; }
.site-header .nav-control,
.site-header .menu-toggle,
.site-header .download-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 12px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #e5e7eb;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}
.site-header .nav-control:hover,
.site-header .nav-control.router-link-active,
.site-header .nav-control.is-current,
.site-header .group-toggle[aria-expanded='true'],
.site-header .menu-toggle[aria-expanded='true'] {
  background: rgba(210, 173, 98, 0.12);
  color: #f3d38b;
}
.site-header .chevron {
  width: 6px;
  height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}
.site-header .group-toggle[aria-expanded='true'] .chevron { transform: translateY(2px) rotate(225deg); }
.site-header .nav-links {
  position: absolute;
  inset: calc(100% + 8px) auto auto 0;
  display: none;
  min-width: 168px;
  padding: 6px;
  border: 1px solid var(--header-line);
  border-radius: 8px;
  background: var(--menu-surface);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.34);
  list-style: none;
}
.site-header .nav-links.is-open { display: block; }
.site-header .nav-links a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 6px 10px;
  border-radius: 5px;
  color: #e5e7eb;
  font-size: 14px;
  text-decoration: none;
}
.site-header .nav-links a:hover,
.site-header .nav-links a.router-link-active {
  background: rgba(210, 173, 98, 0.12);
  color: #f3d38b;
}
.site-header .group-label,
.site-header .menu-toggle { display: none; }
.site-header .download-action {
  flex: 0 0 auto;
  background: var(--accent-brass);
  color: #171a1b;
  font-weight: 700;
}
.site-header .download-action:hover { background: #e3c781; }
.site-header :is(a, button):focus-visible {
  outline: 2px solid #f3d38b;
  outline-offset: 2px;
}
.site-header .account-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.site-header .account-actions .el-button {
  min-height: 40px;
  margin: 0;
  padding: 0 10px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #f1f3f2;
  background: transparent;
}
.site-header .account-actions .join-action { border-color: rgba(255, 255, 255, 0.24); }
.site-header .account-actions .el-button:hover { color: #fff; background: rgba(255, 255, 255, 0.1); }
.site-header .welcome-text { max-width: 120px; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-header .mobile-navigation { display: none; }
.site-header .account-entry {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 10px;
  border-radius: 6px;
  color: #f1f3f2;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}
.site-header .account-entry.join-action { border: 1px solid rgba(255, 255, 255, 0.24); }
.site-header .account-entry:hover { color: #fff; background: rgba(255, 255, 255, 0.1); }
.site-header .account-entry[hidden] { display: none; }
.site-header .saved-account {
  display: block;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 40px;
}
.handbook-header summary { list-style: none; }
.handbook-header summary::-webkit-details-marker { display: none; }
.handbook-header summary:focus-visible { outline: 2px solid #f3d38b; outline-offset: 2px; }
.handbook-header details[open] > .group-toggle .chevron { transform: translateY(2px) rotate(225deg); }
.handbook-header .nav-links { margin: 0; }
@media (max-width: 940px) {
  .site-header .desktop-navigation { display: none; }
  .site-header .mobile-navigation { display: block; }
  .site-header .header-inner { justify-content: flex-start; gap: 8px; }
  .site-header .brand { margin-inline-end: auto; }
  .site-header .menu-toggle {
    display: inline-flex;
    border: 1px solid var(--header-line);
  }
  .site-header .menu-toggle:hover { background: rgba(255, 255, 255, 0.08); }
  .site-header .menu-icon {
    width: 14px;
    height: 12px;
    border-block: 1.5px solid currentColor;
    background: linear-gradient(currentColor, currentColor) center / 100% 1.5px no-repeat;
  }
  .site-header .navigation-panel {
    position: absolute;
    inset: calc(100% + 1px) 0 auto auto;
    display: none;
    width: min(100%, 400px);
    max-height: calc(100vh - 73px);
    max-height: calc(100dvh - 73px);
    overflow-y: auto;
    padding: 12px;
    border: 1px solid var(--header-line);
    border-radius: 0 0 10px 10px;
    background: var(--menu-surface);
    box-shadow: 0 16px 30px rgba(0, 0, 0, 0.4);
  }
  .site-header .navigation-panel.is-open { display: block; }
  .site-header .site-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 8px;
    margin: 0;
  }
  .site-header .site-nav > .nav-control {
    justify-content: flex-start;
  }
  .site-header .site-nav > .nav-control:not(:hover, .router-link-active, .is-current) {
    background: rgba(255, 255, 255, 0.05);
  }
  .site-header .nav-group { grid-column: 1 / -1; }
  .site-header .group-toggle { display: none; }
  .site-header .group-label {
    display: block;
    margin: 0 10px 2px;
    color: #c4aa79;
    font-size: 12px;
    font-weight: 600;
  }
  .site-header .nav-links {
    position: static;
    display: block;
    min-width: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }
  .site-header .account-actions { margin-top: 12px; padding: 12px 4px 0; border-top: 1px solid var(--header-line); }
}
@media (max-width: 640px) {
  .site-header .header-inner { width: calc(100% - 24px); }
  .site-header .brand { gap: 8px; }
  .site-header .brand strong { font-size: 16px; }
  .site-header .brand-mark { width: 34px; height: 34px; }
  .site-header .brand small { display: none; }
}
@media (max-width: 380px) {
  .site-header .brand strong { font-size: 14px; }
  .site-header .brand-mark { width: 30px; height: 30px; }
  .site-header .menu-toggle, .site-header .download-action { gap: 6px; padding-inline: 8px; font-size: 13px; }
}
