body > header {
  position: relative;
  z-index: 10;
}

.game-guide-menu {
  position: relative;
}

.game-guide-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  padding: 0 13px;
  background: #1c2517;
  border: 1px solid #92b54b;
  border-radius: 6px;
  color: var(--lime);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}

.game-guide-toggle[aria-expanded="true"] {
  background: var(--lime);
  color: #15190d;
}

.game-guide-panel {
  position: absolute;
  top: 100%;
  left: 50%;
  width: min(610px, calc(100vw - 32px));
  max-height: min(70vh, 570px);
  max-height: min(70dvh, 570px);
  transform: translateX(-50%);
  overflow: auto;
  overscroll-behavior: contain;
  background: #141820;
  border: 1px solid #ffffff35;
  border-radius: 12px;
  padding: 18px 20px;
  box-shadow: 0 24px 62px #000b;
}

.game-guide-panel[hidden] {
  display: none;
}

.game-guide-panel h2 {
  margin: 0 0 14px;
  font-size: 20px;
}

.game-guide-sections {
  column-count: 2;
  column-gap: 22px;
}

.game-guide-sections > section {
  break-inside: avoid;
}

.game-guide-panel section h3 {
  margin: 0;
  padding: 9px 0 5px;
  border-top: 1px solid #ffffff24;
  color: var(--lime);
  font-size: 13px;
}

.game-guide-panel ul {
  list-style: none;
  padding: 0;
  margin: 0 0 10px;
}

.game-guide-panel a,
.game-guide-panel a:last-child {
  display: flex;
  align-items: center;
  min-height: 34px;
  padding: 5px 7px;
  border-radius: 4px;
  color: var(--text);
  font-size: 13px;
  line-height: 1.3;
}

.game-guide-panel a:hover,
.game-guide-panel a:focus-visible {
  color: var(--lime);
  background: #222b26;
}

.game-guide-panel .game-guide-library {
  border-top: 1px solid #ffffff24;
  border-radius: 0;
  color: var(--lime);
}

@media (max-width: 1050px) {
  .game-guide-menu {
    position: static;
  }

  .game-guide-panel {
    left: auto;
    right: 5%;
    transform: none;
  }
}

@media (max-width: 760px) {
  .game-guide-toggle {
    gap: 5px;
    padding: 0 8px;
    font-size: 12px;
  }

  .game-guide-panel {
    left: 12px;
    right: 12px;
    width: auto;
    transform: none;
  }
}

@media (max-width: 480px) {
  .game-guide-sections {
    column-count: 1;
  }

  .game-guide-panel a,
  .game-guide-panel a:last-child {
    min-height: 44px;
  }
}
