/* Shared desktop disclosures and mobile navigation. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fffffffa;
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}
.header-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  max-width: 1420px;
  height: 76px;
  margin: auto;
  padding: 0 36px;
}
.site-logo { display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0; white-space: nowrap; text-decoration: none; color: var(--ink); font-size: 20px; font-weight: 850; letter-spacing: -1px; }
.logo-mark { display: grid; place-items: center; width: 38px; height: 38px; background: var(--primary); border-radius: 12px; color: white; box-shadow: 0 3px 9px #2456d626; }
.logo-mark svg { width: 24px; height: 24px; }
.logo-caption { display: block; font-size: 10px; letter-spacing: 1.3px; color: var(--muted); line-height: 1.1; }
.main-nav { display: flex; align-items: center; gap: 4px; flex-wrap: nowrap; white-space: nowrap; }
.header-menu { flex-shrink: 0; }
.nav-link { display: flex; align-items: center; justify-content: space-between; gap: 9px; min-height: 44px; padding: 9px 12px; border-radius: 9px; color: #40506a; font-size: 14px; font-weight: 700; white-space: nowrap; list-style: none; cursor: pointer; }
.nav-link::-webkit-details-marker { display: none; }
.nav-link:hover, .nav-link.is-current-section, .header-menu[open] > .nav-link { color: var(--primary); background: #eef3ff; }
.nav-chevron { width: 6px; height: 6px; margin: -3px 2px 0; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); flex-shrink: 0; }
.header-menu[open] > .nav-link .nav-chevron { transform: rotate(225deg); margin-top: 3px; }
.header-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.header-search, .header-all-pages, .mobile-menu-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; min-width: 44px; padding: 9px 12px; border-radius: 9px; color: var(--ink); font-size: 13px; font-weight: 700; white-space: nowrap; text-decoration: none; }
.header-search:hover { background: #eef3ff; color: var(--primary); }
.header-all-pages { color: var(--primary); border: 1px solid #d5def2; background: #f5f8ff; }
.header-all-pages:hover { background: #e9f0ff; }
.mobile-menu-btn { display: none; border: 1px solid var(--line); background: white; }
.mobile-menu-btn[aria-expanded="true"] { color: var(--primary); border-color: #b7c8ed; background: #eef3ff; }
.header-panel {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  width: min(1000px, calc(100% - 48px));
  max-height: calc(100vh - 100px);
  max-height: calc(100dvh - 100px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 24px;
  background: white;
  border: 1px solid var(--line);
  border-top: 3px solid var(--primary);
  border-radius: 0 0 18px 18px;
  box-shadow: 0 20px 45px #10243b24;
  white-space: normal;
}
.header-panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 14px; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.header-panel-heading > span { color: var(--ink); font-size: 18px; font-weight: 800; }
.header-page-link { display: flex; align-items: center; gap: 12px; min-width: 0; min-height: 44px; padding: 10px 12px; border-radius: 9px; color: #40506a; text-decoration: none; line-height: 1.5; }
.header-page-link > span:last-child { min-width: 0; }
.header-page-link:hover, .header-page-link[aria-current="page"] { color: var(--primary); background: #eef3ff; }
.header-link-title { display: block; font-size: 14px; font-weight: 650; overflow-wrap: anywhere; }
.header-page-link[aria-current="page"] .header-link-title { font-weight: 800; text-decoration: underline; text-underline-offset: 4px; }
.header-page-link small { display: block; margin-top: 4px; font-size: 12px; color: var(--muted); }
.header-panel-heading .header-page-link { color: var(--primary); }
.header-panel-heading .header-link-title { font-size: 12px; }
.header-link-icon { display: grid; place-items: center; width: 38px; height: 38px; flex-shrink: 0; border-radius: 10px; color: var(--primary); background: #eef3ff; }
.header-product-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.header-product-grid .header-page-link { padding: 16px; border: 1px solid var(--line); }
.header-panel-shortcuts { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--line); }
.header-panel-shortcuts > span, .header-column-title { color: var(--muted); font-size: 12px; font-weight: 700; }
.header-panel-shortcuts > span { margin-right: 10px; }
.header-guide-grid, .header-tools-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.header-column-title { padding: 0 12px 9px; }
.header-tools-grid { gap: 8px; }
.header-game-search { display: flex; align-items: center; gap: 10px; padding: 0 12px; margin-bottom: 12px; border: 1px solid #cbd5e1; background: #f6f8fc; border-radius: 10px; }
.header-game-search > svg { color: var(--muted); }
.header-game-search input[type="search"] { flex: 1; min-width: 0; padding: 12px 0; border: 0; background: transparent; border-radius: 0; font-size: 14px; box-shadow: none; }
.header-game-search input[type="search"]:focus { outline: none; }
.header-game-search:focus-within { outline: 3px solid #adc4ff; outline-offset: 2px; }
#header-game-count { flex-shrink: 0; color: var(--muted); font-size: 12px; }
.header-game-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: start; gap: 4px; max-height: 340px; overflow-y: auto; overscroll-behavior: contain; padding: 5px; scrollbar-gutter: stable; }
.header-game-list .header-link-title { font-size: 13px; }
.header-game-empty { padding: 24px 12px; color: var(--muted); font-size: 14px; text-align: center; }
.header-mobile-shortcuts { display: none; }
.header-fallback { padding: 10px 20px; text-align: center; font-size: 13px; border-top: 1px solid var(--line); }
@media (max-width: 1180px) {
  .header-inner { gap: 14px; padding-inline: 24px; }
  .nav-link { padding-inline: 10px; }
  .header-search > span { display: none; }
}
@media (max-width: 1060px) {
  .header-inner { height: 68px; }
  .mobile-menu-btn { display: inline-flex; }
  .header-all-pages { display: none; }
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: calc(100vh - 68px);
    max-height: calc(100dvh - 68px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 12px 24px 24px;
    padding-bottom: max(24px, env(safe-area-inset-bottom));
    background: white;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 18px 30px #10243b20;
  }
  .site-header.is-menu-open .main-nav { display: block; }
  .header-menu { border-bottom: 1px solid var(--line); padding: 5px 0; }
  .nav-link { min-height: 52px; font-size: 15px; padding-inline: 12px; }
  .header-panel { position: static; transform: none; width: 100%; max-height: none; overflow: visible; padding: 14px 0; border: 0; border-radius: 0; box-shadow: none; }
  .header-panel-heading { margin-bottom: 12px; padding: 0 0 8px; border: 0; }
  .header-panel-heading > span { display: none; }
  .header-panel-shortcuts { gap: 4px; margin-top: 12px; padding-top: 8px; }
  .header-panel-shortcuts > span { display: none; }
  .header-game-list { max-height: none; overflow: visible; grid-template-columns: repeat(3, minmax(0, 1fr)); scrollbar-gutter: auto; }
  .header-mobile-shortcuts { display: flex; flex-wrap: wrap; gap: 4px; padding-top: 12px; white-space: normal; }
  .header-mobile-shortcuts .header-link-title { font-size: 13px; }
  .header-mobile-shortcuts .header-page-link { color: var(--primary); background: #f5f8ff; }
}
@media (max-width: 640px) {
  .header-inner { padding-inline: 16px; gap: 10px; }
  .site-logo { font-size: 18px; }
  .header-actions { gap: 4px; }
  .main-nav { padding-inline: 16px; }
  .header-guide-grid, .header-tools-grid { grid-template-columns: minmax(0, 1fr); }
  .header-guide-grid { gap: 20px; }
  .header-tools-grid { gap: 4px; }
  .header-game-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; }
  .header-game-search { flex-wrap: wrap; gap: 0 8px; }
  #header-game-count { width: 100%; padding: 0 0 8px; }
  .header-product-grid { grid-template-columns: minmax(0, 1fr); }
  .header-product-grid .header-page-link { padding: 13px; }
}
@media (max-width: 380px) {
  .site-logo { font-size: 16px; }
  .logo-mark { width: 34px; height: 34px; }
  .mobile-menu-btn > span { display: none; }
}
@media print { .site-header { display: none; } }
