html.help-page,
html.help-page body {
  overflow: auto;
  height: auto;
  min-height: 100%;
  width: 100%;
}

html.help-page body {
  cursor: default;
}

.help-wrap {
  min-height: 100vh;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(0, 255, 136, 0.08), transparent),
    linear-gradient(180deg, #060a12 0%, #080e18 40%, #060a12 100%);
}

.help-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 24px;
  background: rgba(6, 10, 18, 0.92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
}

.help-logo {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--text);
  text-decoration: none;
}

.help-logo .accent { color: var(--accent); }

.help-back {
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 2px;
  text-decoration: none;
  color: var(--accent);
  border: 1px solid var(--border);
  padding: 8px 16px;
  border-radius: 2px;
  transition: background 0.2s, box-shadow 0.2s;
}

.help-back:hover {
  background: rgba(0, 255, 136, 0.1);
  box-shadow: 0 0 16px rgba(0, 255, 136, 0.2);
}

.help-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 32px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 24px 64px;
}

.help-nav {
  position: sticky;
  top: 72px;
  align-self: start;
}

.help-nav-title {
  font-family: var(--font-display);
  font-size: 9px;
  letter-spacing: 4px;
  color: var(--text-dim);
  margin-bottom: 12px;
}

.help-nav a {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-dim);
  text-decoration: none;
  padding: 6px 0;
  border-left: 2px solid transparent;
  padding-left: 10px;
  margin-left: -10px;
  transition: color 0.15s, border-color 0.15s;
}

.help-nav a:hover,
.help-nav a:focus {
  color: var(--accent);
  border-left-color: var(--accent);
}

.help-main { min-width: 0; }

/* Prevent game HUD/canvas rules from leaking via shared ids */
.help-page .help-section {
  position: static;
  inset: auto;
  pointer-events: auto;
  overflow: visible;
}

.help-hero {
  margin-bottom: 40px;
}

.help-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(28px, 5vw, 40px);
  font-weight: 900;
  letter-spacing: 2px;
  margin-bottom: 8px;
}

.help-hero h1 .accent { color: var(--accent); }

.help-hero p {
  font-size: 18px;
  color: var(--text-dim);
  line-height: 1.5;
  max-width: 560px;
}

.help-section {
  margin-bottom: 40px;
  scroll-margin-top: 80px;
}

.help-section h2 {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 4px;
  color: var(--accent);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.help-section h3 {
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--cyan);
  margin: 20px 0 10px;
}

.help-section p,
.help-section li {
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  margin-bottom: 10px;
}

.help-section ul,
.help-section ol {
  padding-left: 20px;
  margin-bottom: 12px;
}

.help-section li { margin-bottom: 6px; }

.help-note {
  background: rgba(0, 212, 255, 0.08);
  border: 1px solid rgba(0, 212, 255, 0.25);
  border-radius: 4px;
  padding: 12px 16px;
  font-size: 15px;
  color: var(--text);
  margin: 12px 0;
}

.help-note strong { color: var(--cyan); }

.help-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  margin: 12px 0 16px;
}

.help-table th,
.help-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(0, 255, 136, 0.12);
}

.help-table th {
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--text-dim);
  font-weight: 600;
}

.help-table td:first-child {
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
}

.help-kbd {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 3px 8px;
  background: rgba(0, 255, 136, 0.12);
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--accent);
}

.help-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin: 12px 0;
}

.help-card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 14px;
}

.help-card strong {
  display: block;
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--accent);
  margin-bottom: 6px;
}

.help-card span {
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.45;
}

.help-footer {
  text-align: center;
  padding: 32px 24px 48px;
  font-size: 14px;
  color: var(--text-dim);
  border-top: 1px solid var(--border);
}

.help-footer a {
  color: var(--accent);
  text-decoration: none;
}

.help-footer a:hover { text-decoration: underline; }

@media (max-width: 768px) {
  .help-layout {
    grid-template-columns: 1fr;
    padding: 20px 16px 48px;
  }

  .help-nav {
    position: static;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 8px;
  }

  .help-nav-title { width: 100%; }

  .help-nav a {
    border: none;
    padding: 4px 0;
    margin: 0;
    font-size: 14px;
  }

  .help-table { font-size: 14px; }

  .help-table td:first-child { white-space: normal; }
}
