:root { --site-header-height: 72px; --site-header-mobile-height: 132px; }
.site-header { position: fixed; z-index: 50; top: 0; right: 0; left: 0; display: flex; height: calc(var(--site-header-height) + env(safe-area-inset-top, 0px)); align-items: center; gap: clamp(18px, 3vw, 38px); padding: env(safe-area-inset-top, 0px) clamp(18px, 4vw, 58px) 0; border-bottom: 1px solid rgba(132, 221, 248, 0.2); background: rgba(6, 25, 52, 0.96); color: #ffffff; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif; }
.site-header .brand { display: inline-flex; min-width: 0; align-items: center; flex: 0 0 auto; gap: 10px; color: #ffffff; font-weight: 850; text-decoration: none; }
.site-header .brand img { width: 38px; height: 38px; flex: 0 0 auto; border-radius: 7px; }
.site-header .brand span { display: block; white-space: nowrap; }
.site-header .nav-links { display: flex; min-width: 0; align-items: center; flex: 1 1 auto; justify-content: flex-end; gap: clamp(14px, 2vw, 28px); }
.site-header .nav-links a { color: #b7c9da; font-size: 0.9rem; font-weight: 750; text-decoration: none; white-space: nowrap; }
.site-header .nav-links a:hover, .site-header .nav-links a:focus-visible { color: #ffffff; }
.language-switch { display: inline-flex; overflow: hidden; flex: 0 0 auto; border: 1px solid rgba(132, 221, 248, 0.32); border-radius: 6px; }
.language-switch button { min-width: 38px; height: 32px; padding: 0 8px; border: 0; border-right: 1px solid rgba(132, 221, 248, 0.22); background: transparent; color: #9fb5c8; cursor: pointer; font: inherit; font-size: 0.74rem; font-weight: 800; }
.language-switch button:last-child { border-right: 0; }
.language-switch button[aria-pressed="true"] { background: #ffffff; color: #082453; }
body.sub_page { padding-top: calc(var(--site-header-height) + env(safe-area-inset-top, 0px)); }

@media (max-width: 860px) {
  .site-header { height: calc(var(--site-header-mobile-height) + env(safe-area-inset-top, 0px)); align-content: center; align-items: center; flex-wrap: wrap; gap: 8px 14px; padding-top: calc(10px + env(safe-area-inset-top, 0px)); padding-bottom: 10px; }
  .site-header .brand { margin-right: auto; }
  .site-header .nav-links { order: 3; overflow-x: auto; flex: 0 0 100%; justify-content: flex-start; padding: 4px 0 2px; }
  body.sub_page { padding-top: calc(var(--site-header-mobile-height) + env(safe-area-inset-top, 0px)); }
}

@media (max-width: 440px) {
  .site-header { gap: 8px; padding-right: 14px; padding-left: 14px; }
  .site-header .brand { gap: 8px; font-size: 0.92rem; }
  .site-header .brand img { width: 34px; height: 34px; }
  .site-header .brand span { max-width: 144px; overflow: hidden; text-overflow: ellipsis; }
  .language-switch button { min-width: 30px; padding: 0 4px; font-size: 0.68rem; }
}
